@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.
Files changed (83) hide show
  1. package/dist/assets/{chevron_right.ec5f150c.js → chevron_right.f4a05ecb.js} +6 -6
  2. package/dist/assets/index.039c8af5.js +156 -0
  3. package/dist/assets/index.8143f5fa.js +183 -0
  4. package/dist/assets/{index.a0d0f2b6.js → index.bd887e31.js} +356 -314
  5. package/dist/index.html +1 -1
  6. package/dist/types/components/AnimateHeight/index.d.ts +10 -0
  7. package/dist/types/components/AnimateHeight/index.d.ts.map +1 -0
  8. package/dist/types/components/AnimateHeight/index.js +22 -0
  9. package/dist/types/components/AnimateHeight/index.js.map +1 -0
  10. package/dist/types/components/AnimateHeight/styles.d.ts +2 -0
  11. package/dist/types/components/AnimateHeight/styles.d.ts.map +1 -0
  12. package/dist/types/components/AnimateHeight/styles.js +6 -0
  13. package/dist/types/components/AnimateHeight/styles.js.map +1 -0
  14. package/dist/types/features/geocodes/index.d.ts +3 -0
  15. package/dist/types/features/geocodes/index.d.ts.map +1 -0
  16. package/dist/types/features/geocodes/index.js +3 -0
  17. package/dist/types/features/geocodes/index.js.map +1 -0
  18. package/dist/types/features/geocodes/keyFactory.d.ts +11 -0
  19. package/dist/types/features/geocodes/keyFactory.d.ts.map +1 -0
  20. package/dist/types/features/geocodes/keyFactory.js +5 -0
  21. package/dist/types/features/geocodes/keyFactory.js.map +1 -0
  22. package/dist/types/features/geocodes/types.d.ts +11 -0
  23. package/dist/types/features/geocodes/types.d.ts.map +1 -0
  24. package/dist/types/features/geocodes/types.js +2 -0
  25. package/dist/types/features/geocodes/types.js.map +1 -0
  26. package/dist/types/features/reverse-geocodes/index.d.ts +3 -0
  27. package/dist/types/features/reverse-geocodes/index.d.ts.map +1 -0
  28. package/dist/types/features/reverse-geocodes/index.js +3 -0
  29. package/dist/types/features/reverse-geocodes/index.js.map +1 -0
  30. package/dist/types/features/reverse-geocodes/keyFactory.d.ts +13 -0
  31. package/dist/types/features/reverse-geocodes/keyFactory.d.ts.map +1 -0
  32. package/dist/types/features/reverse-geocodes/keyFactory.js +5 -0
  33. package/dist/types/features/reverse-geocodes/keyFactory.js.map +1 -0
  34. package/dist/types/features/reverse-geocodes/types.d.ts +14 -0
  35. package/dist/types/features/reverse-geocodes/types.d.ts.map +1 -0
  36. package/dist/types/features/reverse-geocodes/types.js +2 -0
  37. package/dist/types/features/reverse-geocodes/types.js.map +1 -0
  38. package/dist/types/features/suggestions/index.d.ts +3 -0
  39. package/dist/types/features/suggestions/index.d.ts.map +1 -0
  40. package/dist/types/features/suggestions/index.js +3 -0
  41. package/dist/types/features/suggestions/index.js.map +1 -0
  42. package/dist/types/features/suggestions/keyFactory.d.ts +13 -0
  43. package/dist/types/features/suggestions/keyFactory.d.ts.map +1 -0
  44. package/dist/types/features/suggestions/keyFactory.js +5 -0
  45. package/dist/types/features/suggestions/keyFactory.js.map +1 -0
  46. package/dist/types/features/suggestions/types.d.ts +16 -0
  47. package/dist/types/features/suggestions/types.d.ts.map +1 -0
  48. package/dist/types/features/suggestions/types.js +2 -0
  49. package/dist/types/features/suggestions/types.js.map +1 -0
  50. package/dist/types/hooks/useOnEventOutside.d.ts +4 -0
  51. package/dist/types/hooks/useOnEventOutside.d.ts.map +1 -0
  52. package/dist/types/hooks/useOnEventOutside.js +14 -0
  53. package/dist/types/hooks/useOnEventOutside.js.map +1 -0
  54. package/dist/types/sdks/DataExplorer/components/Map/Search/index.d.ts +10 -0
  55. package/dist/types/sdks/DataExplorer/components/Map/Search/index.d.ts.map +1 -0
  56. package/dist/types/sdks/DataExplorer/components/Map/Search/index.js +50 -0
  57. package/dist/types/sdks/DataExplorer/components/Map/Search/index.js.map +1 -0
  58. package/dist/types/sdks/DataExplorer/components/Map/Search/styles.d.ts +6 -0
  59. package/dist/types/sdks/DataExplorer/components/Map/Search/styles.d.ts.map +1 -0
  60. package/dist/types/sdks/DataExplorer/components/Map/Search/styles.js +46 -0
  61. package/dist/types/sdks/DataExplorer/components/Map/Search/styles.js.map +1 -0
  62. package/dist/types/sdks/DataExplorer/components/Map/index.d.ts.map +1 -1
  63. package/dist/types/sdks/DataExplorer/components/Map/index.js +67 -28
  64. package/dist/types/sdks/DataExplorer/components/Map/index.js.map +1 -1
  65. package/dist/types/sdks/DataExplorer/components/Map/styles.d.ts +1 -0
  66. package/dist/types/sdks/DataExplorer/components/Map/styles.d.ts.map +1 -1
  67. package/dist/types/sdks/DataExplorer/components/Map/styles.js +22 -0
  68. package/dist/types/sdks/DataExplorer/components/Map/styles.js.map +1 -1
  69. package/dist/types/sdks/DataExplorer/features/useGeocodes.d.ts +3 -0
  70. package/dist/types/sdks/DataExplorer/features/useGeocodes.d.ts.map +1 -0
  71. package/dist/types/sdks/DataExplorer/features/useGeocodes.js +17 -0
  72. package/dist/types/sdks/DataExplorer/features/useGeocodes.js.map +1 -0
  73. package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.d.ts +5 -0
  74. package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.d.ts.map +1 -0
  75. package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.js +23 -0
  76. package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.js.map +1 -0
  77. package/dist/types/sdks/DataExplorer/features/useSuggestions.d.ts +3 -0
  78. package/dist/types/sdks/DataExplorer/features/useSuggestions.d.ts.map +1 -0
  79. package/dist/types/sdks/DataExplorer/features/useSuggestions.js +15 -0
  80. package/dist/types/sdks/DataExplorer/features/useSuggestions.js.map +1 -0
  81. package/package.json +3 -3
  82. package/dist/assets/index.1f109f78.js +0 -183
  83. package/dist/assets/index.3f82b283.js +0 -95
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/sdks/DataExplorer/components/Map/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,oEAIxB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/sdks/DataExplorer/components/Map/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,oEAOxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,oEAkB7B,CAAC"}
@@ -4,5 +4,27 @@ export const MapContainer = styled.div `
4
4
  height: 400px;
5
5
  display: flex;
6
6
  border: 2px solid ${theme["--ll-color-on-background"]};
7
+ position: relative;
8
+ border-radius: ${theme["--ll-border-radius-small"]};
9
+ overflow: hidden;
10
+ `;
11
+ export const LocationIndicator = styled.div `
12
+ position: absolute;
13
+ color: ${theme["--ll-color-on-background"]};
14
+ z-index: 1;
15
+ padding: ${theme["--ll-spacing-xx-small"]} ${theme["--ll-spacing-x-small"]};
16
+ font-family: ${theme["--ll-font-family-mono"]};
17
+
18
+ &:after {
19
+ content: "";
20
+ position: absolute;
21
+ top: 0;
22
+ bottom: 0;
23
+ right: 0;
24
+ left: 0;
25
+ background-color: ${theme["--ll-color-background"]};
26
+ opacity: 0.8;
27
+ z-index: -1;
28
+ }
7
29
  `;
8
30
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/sdks/DataExplorer/components/Map/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;sBAGhB,KAAK,CAAC,0BAA0B,CAAC;CACtD,CAAC"}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/sdks/DataExplorer/components/Map/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;sBAGhB,KAAK,CAAC,0BAA0B,CAAC;;mBAEpC,KAAK,CAAC,0BAA0B,CAAC;;CAEnD,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;WAEhC,KAAK,CAAC,0BAA0B,CAAC;;aAE/B,KAAK,CAAC,uBAAuB,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAAC;iBAC3D,KAAK,CAAC,uBAAuB,CAAC;;;;;;;;;wBASvB,KAAK,CAAC,uBAAuB,CAAC;;;;CAIrD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { GeocodeResponse } from "~/features/geocodes";
2
+ export declare function useGeocodes(locationid: string): import("@tanstack/react-query").UseQueryResult<GeocodeResponse, unknown>;
3
+ //# sourceMappingURL=useGeocodes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGeocodes.d.ts","sourceRoot":"","sources":["../../../../../src/sdks/DataExplorer/features/useGeocodes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAe,MAAM,qBAAqB,CAAC;AAInE,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,4EAe7C"}
@@ -0,0 +1,17 @@
1
+ import { useQuery } from "@tanstack/react-query";
2
+ import { geocodeKeys } from "~/features/geocodes";
3
+ const HERE_ENDPOINT = "https://geocoder.ls.hereapi.com/6.2/geocode.json?";
4
+ export function useGeocodes(locationid) {
5
+ const options = {
6
+ locationid,
7
+ country: "CAN,USA",
8
+ apiKey: import.meta.env.VITE_HERE_API_KEY,
9
+ };
10
+ const fetchGeocodes = () => fetch(HERE_ENDPOINT + new URLSearchParams(options))
11
+ .then((response) => response.json())
12
+ .then((response) => response.Response.View[0].Result[0]);
13
+ return useQuery(geocodeKeys.list(options), fetchGeocodes, {
14
+ enabled: !!locationid,
15
+ });
16
+ }
17
+ //# sourceMappingURL=useGeocodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGeocodes.js","sourceRoot":"","sources":["../../../../../src/sdks/DataExplorer/features/useGeocodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAmB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnE,MAAM,aAAa,GAAG,mDAAmD,CAAC;AAE1E,MAAM,UAAU,WAAW,CAAC,UAAkB;IAC5C,MAAM,OAAO,GAAG;QACd,UAAU;QACV,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,iBAA2B;KACpD,CAAC;IAEF,MAAM,aAAa,GAAG,GAA6B,EAAE,CACnD,KAAK,CAAC,aAAa,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC;SAChD,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;SACnC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAE7D,OAAO,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE;QACxD,OAAO,EAAE,CAAC,CAAC,UAAU;KACtB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare function useReverseGeocodes({ lat, lng }: {
2
+ lat: number;
3
+ lng: number;
4
+ }): import("@tanstack/react-query").UseQueryResult<Response, unknown>;
5
+ //# sourceMappingURL=useReverseGeocodes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useReverseGeocodes.d.ts","sourceRoot":"","sources":["../../../../../src/sdks/DataExplorer/features/useReverseGeocodes.ts"],"names":[],"mappings":"AAMA,wBAAgB,kBAAkB,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,qEAc5E"}
@@ -0,0 +1,23 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { useQuery } from "@tanstack/react-query";
11
+ import { reverseGeocodeKeys } from "~/features/reverse-geocodes";
12
+ const HERE_ENDPOINT = "https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json";
13
+ export function useReverseGeocodes({ lat, lng }) {
14
+ const options = {
15
+ lat: lat.toString(),
16
+ lng: lng.toString(),
17
+ apiKey: import.meta.env.VITE_HERE_API_KEY,
18
+ };
19
+ return useQuery(reverseGeocodeKeys.list(options), () => __awaiter(this, void 0, void 0, function* () { return fetch(HERE_ENDPOINT + new URLSearchParams(options)); }), {
20
+ enabled: !!options,
21
+ });
22
+ }
23
+ //# sourceMappingURL=useReverseGeocodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useReverseGeocodes.js","sourceRoot":"","sources":["../../../../../src/sdks/DataExplorer/features/useReverseGeocodes.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,aAAa,GACjB,iEAAiE,CAAC;AAEpE,MAAM,UAAU,kBAAkB,CAAC,EAAE,GAAG,EAAE,GAAG,EAAgC;IAC3E,MAAM,OAAO,GAAG;QACd,GAAG,EAAE,GAAG,CAAC,QAAQ,EAAE;QACnB,GAAG,EAAE,GAAG,CAAC,QAAQ,EAAE;QACnB,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,iBAA2B;KACpD,CAAC;IAEF,OAAO,QAAQ,CACb,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,EAChC,GAAS,EAAE,gDAAC,OAAA,KAAK,CAAC,aAAa,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,CAAA,GAAA,EAC/D;QACE,OAAO,EAAE,CAAC,CAAC,OAAO;KACnB,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { SuggestionsResponse } from "~/features/suggestions";
2
+ export declare function useSuggestions(query: string): import("@tanstack/react-query").UseQueryResult<SuggestionsResponse, unknown>;
3
+ //# sourceMappingURL=useSuggestions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSuggestions.d.ts","sourceRoot":"","sources":["../../../../../src/sdks/DataExplorer/features/useSuggestions.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,gFAe3C"}
@@ -0,0 +1,15 @@
1
+ import { useQuery } from "@tanstack/react-query";
2
+ import { suggestionKeys } from "~/features/suggestions";
3
+ const HERE_ENDPOINT = "https://autocomplete.geocoder.ls.hereapi.com/6.2/suggest.json?";
4
+ export function useSuggestions(query) {
5
+ const options = {
6
+ query,
7
+ country: "CAN,USA",
8
+ apiKey: import.meta.env.VITE_HERE_API_KEY,
9
+ };
10
+ const fetchSuggestions = () => fetch(HERE_ENDPOINT + new URLSearchParams(options)).then((response) => response.json());
11
+ return useQuery(suggestionKeys.list(options), fetchSuggestions, {
12
+ enabled: !!query.length,
13
+ });
14
+ }
15
+ //# sourceMappingURL=useSuggestions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSuggestions.js","sourceRoot":"","sources":["../../../../../src/sdks/DataExplorer/features/useSuggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAuB,MAAM,wBAAwB,CAAC;AAE7E,MAAM,aAAa,GACjB,gEAAgE,CAAC;AAEnE,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,MAAM,OAAO,GAAG;QACd,KAAK;QACL,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,iBAA2B;KACpD,CAAC;IAEF,MAAM,gBAAgB,GAAG,GAAiC,EAAE,CAC1D,KAAK,CAAC,aAAa,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CACpE,QAAQ,CAAC,IAAI,EAAE,CAChB,CAAC;IAEJ,OAAO,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,gBAAgB,EAAE;QAC9D,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM;KACxB,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@local-logic/sdks-app",
3
- "version": "1.0.0-beta.52",
3
+ "version": "1.0.0-beta.53",
4
4
  "main": "dist/types/index.js",
5
5
  "typings": "dist/types/index.d.ts",
6
6
  "files": [
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@local-logic/channel": "1.1.0-beta.10",
11
11
  "@local-logic/client": "1.0.0-beta.13",
12
- "@local-logic/elements-react": "1.0.0-beta.33",
12
+ "@local-logic/elements-react": "1.0.0-beta.34",
13
13
  "@radix-ui/react-accordion": "^1.0.0",
14
14
  "@radix-ui/react-select": "^1.0.0",
15
15
  "@sentry/react": "^7.11.1",
@@ -35,7 +35,7 @@
35
35
  "devDependencies": {
36
36
  "@jest/globals": "^28.1.1",
37
37
  "@local-logic/eslint-config": "2.1.0-beta.3",
38
- "@local-logic/ui": "1.0.0-beta.19",
38
+ "@local-logic/ui": "1.0.0-beta.20",
39
39
  "@testing-library/react": "^13.3.0",
40
40
  "@types/jest": "^28.1.4",
41
41
  "@types/json2csv": "^5.0.3",
@@ -1,183 +0,0 @@
1
- import{c as W,u as dt,p as te,s as ee,M as xt,a as ne,$ as oe,b as ie,d as re,e as se,S as ae,f as ce,g as le,m as ue,N as de,P as pe}from"./chevron_right.ec5f150c.js";import{R as O,r as y,h as Ot,j as a,s as F,i as Z,u as q,a as tt,b as pt,c as w,x as g,F as et,d as L,e as it,k as V,U as Et,f as Tt,E as nt,g as I,_ as U,S as K,O as fe,t as D,l as he,m as Q,n as ge,o as me,p as ve,q as ye}from"./index.a0d0f2b6.js";const zt=O.createContext({}),E=()=>y.exports.useContext(zt),xe=(t,e)=>{switch(e.type){case"CATEGORY":return{...t,activeCategory:e.value};case"SCORE":{const n=F.find(o=>e.value===""?o.value===t.activeCategory:o.scores.includes(e.value)).value;return{activeCategory:n,activeScoreByCategory:{...t.activeScoreByCategory,[n]:e.value}}}}},be=({children:t})=>{const[e,n]=y.exports.useState(!1),o=window.innerWidth<Ot.screenSizes.mobileL?{activeCategory:"commute",activeScoreByCategory:{commute:"pedestrian_friendly",amenities:"groceries",character:"vibrant",nature:"parks",education:"high_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},[i,s]=y.exports.useReducer(xe,o),[c,l]=y.exports.useState(),[r,u]=y.exports.useState(),{activeCategory:d}=i,p=i.activeScoreByCategory[d],h=x=>{s({type:"SCORE",value:x})},f=x=>{s({type:"CATEGORY",value:x})},m=y.exports.useMemo(()=>({activeScore:p,setActiveScore:h,activeCategory:d,setActiveCategory:f,activePOI:c,setActivePOI:l,hoveredPOI:r,setHoveredPOI:u,showMobileList:e,setShowMobileList:n}),[p,h,d,f,c,l,r,u,e,n]);return a(zt.Provider,{value:m,children:t})};function Rt(t,e,n){n===void 0&&(n={});var o={type:"Feature"};return(n.id===0||n.id)&&(o.id=n.id),n.bbox&&(o.bbox=n.bbox),o.properties=e||{},o.geometry=t,o}function bt(t,e,n){if(n===void 0&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!wt(t[0])||!wt(t[1]))throw new Error("coordinates must contain numbers");var o={type:"Point",coordinates:t};return Rt(o,e,n)}function we(t,e,n){n===void 0&&(n={});var o={type:"MultiPoint",coordinates:t};return Rt(o,e,n)}function wt(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function Ht(t,e,n){if(t!==null)for(var o,i,s,c,l,r,u,d=0,p=0,h,f=t.type,m=f==="FeatureCollection",x=f==="Feature",b=m?t.features.length:1,v=0;v<b;v++){u=m?t.features[v].geometry:x?t.geometry:t,h=u?u.type==="GeometryCollection":!1,l=h?u.geometries.length:1;for(var k=0;k<l;k++){var C=0,S=0;if(c=h?u.geometries[k]:u,c!==null){r=c.coordinates;var $=c.type;switch(d=n&&($==="Polygon"||$==="MultiPolygon")?1:0,$){case null:break;case"Point":if(e(r,p,v,C,S)===!1)return!1;p++,C++;break;case"LineString":case"MultiPoint":for(o=0;o<r.length;o++){if(e(r[o],p,v,C,S)===!1)return!1;p++,$==="MultiPoint"&&C++}$==="LineString"&&C++;break;case"Polygon":case"MultiLineString":for(o=0;o<r.length;o++){for(i=0;i<r[o].length-d;i++){if(e(r[o][i],p,v,C,S)===!1)return!1;p++}$==="MultiLineString"&&C++,$==="Polygon"&&S++}$==="Polygon"&&C++;break;case"MultiPolygon":for(o=0;o<r.length;o++){for(S=0,i=0;i<r[o].length;i++){for(s=0;s<r[o][i].length-d;s++){if(e(r[o][i][s],p,v,C,S)===!1)return!1;p++}S++}C++}break;case"GeometryCollection":for(o=0;o<c.geometries.length;o++)if(Ht(c.geometries[o],e,n)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ct(t){var e=[1/0,1/0,-1/0,-1/0];return Ht(t,function(n){e[0]>n[0]&&(e[0]=n[0]),e[1]>n[1]&&(e[1]=n[1]),e[2]<n[0]&&(e[2]=n[0]),e[3]<n[1]&&(e[3]=n[1])}),e}ct.default=ct;const Me={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0},Ce=()=>{const[t,e]=y.exports.useState(null),[n,o]=y.exports.useState(Me),i=y.exports.useMemo(()=>new window.ResizeObserver(s=>{if(s[0]){const{x:c,y:l,width:r,height:u,top:d,left:p,bottom:h,right:f}=s[0].contentRect;o({x:c,y:l,width:r,height:u,top:d,left:p,bottom:h,right:f})}}),[]);return y.exports.useLayoutEffect(()=>{if(!!t)return i.observe(t),()=>{i.disconnect()}},[t]),[e,n,t]};var $e="Expected a function",Mt=0/0,Se="[object Symbol]",Pe=/^\s+|\s+$/g,Le=/^[-+]0x[0-9a-f]+$/i,ke=/^0b[01]+$/i,Ie=/^0o[0-7]+$/i,_e=parseInt,Ae=typeof W=="object"&&W&&W.Object===Object&&W,Oe=typeof self=="object"&&self&&self.Object===Object&&self,Ee=Ae||Oe||Function("return this")(),Te=Object.prototype,ze=Te.toString,Re=Math.max,He=Math.min,rt=function(){return Ee.Date.now()};function Ze(t,e,n){var o,i,s,c,l,r,u=0,d=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError($e);e=Ct(e)||0,lt(n)&&(d=!!n.leading,p="maxWait"in n,s=p?Re(Ct(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h);function f(M){var _=o,T=i;return o=i=void 0,u=M,c=t.apply(T,_),c}function m(M){return u=M,l=setTimeout(v,e),d?f(M):c}function x(M){var _=M-r,T=M-u,j=e-_;return p?He(j,s-T):j}function b(M){var _=M-r,T=M-u;return r===void 0||_>=e||_<0||p&&T>=s}function v(){var M=rt();if(b(M))return k(M);l=setTimeout(v,x(M))}function k(M){return l=void 0,h&&o?f(M):(o=i=void 0,c)}function C(){l!==void 0&&clearTimeout(l),u=0,o=r=i=l=void 0}function S(){return l===void 0?c:k(rt())}function $(){var M=rt(),_=b(M);if(o=arguments,i=this,r=M,_){if(l===void 0)return m(r);if(p)return l=setTimeout(v,e),f(r)}return l===void 0&&(l=setTimeout(v,e)),c}return $.cancel=C,$.flush=S,$}function lt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Ve(t){return!!t&&typeof t=="object"}function je(t){return typeof t=="symbol"||Ve(t)&&ze.call(t)==Se}function Ct(t){if(typeof t=="number")return t;if(je(t))return Mt;if(lt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=lt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(Pe,"");var n=ke.test(t);return n||Ie.test(t)?_e(t.slice(2),n?2:8):Le.test(t)?Mt:+t}var Ne=Ze;const Be=()=>{const[t,e]=y.exports.useState(!1);return y.exports.useLayoutEffect(()=>{const n=()=>{e(window.innerWidth<Ot.screenSizes.mobileL)};return window.addEventListener("resize",Ne(n,250)),n(),()=>window.removeEventListener("resize",n)},[]),t},De=t=>y.exports.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},y.exports.createElement("g",{clipPath:"url(#clip0_6_16062)"},y.exports.createElement("path",{d:"M3 13H5V11H3V13ZM3 17H5V15H3V17ZM3 9H5V7H3V9ZM7 13H21V11H7V13ZM7 17H21V15H7V17ZM7 7V9H21V7H7ZM3 13H5V11H3V13ZM3 17H5V15H3V17ZM3 9H5V7H3V9ZM7 13H21V11H7V13ZM7 17H21V15H7V17ZM7 7V9H21V7H7Z"}))),{scorePois:Ge}=Z.Constants;function Zt(){var l;const{client:t}=q(),{sdkState:e}=tt(),n=pt(e.options,250),{activeScore:o}=E(),i=o?Ge[o]:void 0,c={...y.exports.useMemo(()=>n!=null&&n.marker?n.marker:{lat:n==null?void 0:n.lat,lng:n==null?void 0:n.lng},[n]),limit:10,radius:2e3,include:i};return dt(te.list(c),async()=>t.getPois(c),{enabled:!!c&&!!((l=c.include)!=null&&l.length)&&!!c.lat&&!!c.lng})}function Vt(){const{client:t}=q(),{sdkState:e}=tt(),n=pt(e.options,250),i={...y.exports.useMemo(()=>n!=null&&n.marker?n.marker:{lat:n==null?void 0:n.lat,lng:n==null?void 0:n.lng},[n]),limit:10,radius:2e3};return dt(ee.list(i),async()=>t.getSchools(i),{enabled:!!i&&!!i.lat&&!!i.lng})}const jt=O.createContext({}),Nt=()=>y.exports.useContext(jt),Fe=({children:t,mapRef:e,mapPadding:n})=>a(jt.Provider,{value:{mapRef:e,mapPadding:n},children:t});function ut(t,e,n,o,i,s){if(i-o<=n)return;const c=o+i>>1;Bt(t,e,c,o,i,s%2),ut(t,e,n,o,c-1,s+1),ut(t,e,n,c+1,i,s+1)}function Bt(t,e,n,o,i,s){for(;i>o;){if(i-o>600){const u=i-o+1,d=n-o+1,p=Math.log(u),h=.5*Math.exp(2*p/3),f=.5*Math.sqrt(p*h*(u-h)/u)*(d-u/2<0?-1:1),m=Math.max(o,Math.floor(n-d*h/u+f)),x=Math.min(i,Math.floor(n+(u-d)*h/u+f));Bt(t,e,n,m,x,s)}const c=e[2*n+s];let l=o,r=i;for(B(t,e,o,n),e[2*i+s]>c&&B(t,e,o,i);l<r;){for(B(t,e,l,r),l++,r--;e[2*l+s]<c;)l++;for(;e[2*r+s]>c;)r--}e[2*o+s]===c?B(t,e,o,r):(r++,B(t,e,r,i)),r<=n&&(o=r+1),n<=r&&(i=r-1)}}function B(t,e,n,o){st(t,n,o),st(e,2*n,2*o),st(e,2*n+1,2*o+1)}function st(t,e,n){const o=t[e];t[e]=t[n],t[n]=o}function We(t,e,n,o,i,s,c){const l=[0,t.length-1,0],r=[];let u,d;for(;l.length;){const p=l.pop(),h=l.pop(),f=l.pop();if(h-f<=c){for(let b=f;b<=h;b++)u=e[2*b],d=e[2*b+1],u>=n&&u<=i&&d>=o&&d<=s&&r.push(t[b]);continue}const m=Math.floor((f+h)/2);u=e[2*m],d=e[2*m+1],u>=n&&u<=i&&d>=o&&d<=s&&r.push(t[m]);const x=(p+1)%2;(p===0?n<=u:o<=d)&&(l.push(f),l.push(m-1),l.push(x)),(p===0?i>=u:s>=d)&&(l.push(m+1),l.push(h),l.push(x))}return r}function Ue(t,e,n,o,i,s){const c=[0,t.length-1,0],l=[],r=i*i;for(;c.length;){const u=c.pop(),d=c.pop(),p=c.pop();if(d-p<=s){for(let b=p;b<=d;b++)$t(e[2*b],e[2*b+1],n,o)<=r&&l.push(t[b]);continue}const h=Math.floor((p+d)/2),f=e[2*h],m=e[2*h+1];$t(f,m,n,o)<=r&&l.push(t[h]);const x=(u+1)%2;(u===0?n-i<=f:o-i<=m)&&(c.push(p),c.push(h-1),c.push(x)),(u===0?n+i>=f:o+i>=m)&&(c.push(h+1),c.push(d),c.push(x))}return l}function $t(t,e,n,o){const i=t-n,s=e-o;return i*i+s*s}const Ke=t=>t[0],Qe=t=>t[1];class St{constructor(e,n=Ke,o=Qe,i=64,s=Float64Array){this.nodeSize=i,this.points=e;const c=e.length<65536?Uint16Array:Uint32Array,l=this.ids=new c(e.length),r=this.coords=new s(e.length*2);for(let u=0;u<e.length;u++)l[u]=u,r[2*u]=n(e[u]),r[2*u+1]=o(e[u]);ut(l,r,i,0,l.length-1,0)}range(e,n,o,i){return We(this.ids,this.coords,e,n,o,i,this.nodeSize)}within(e,n,o){return Ue(this.ids,this.coords,e,n,o,this.nodeSize)}}const Ye={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},X=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1));class Je{constructor(e){this.options=G(Object.create(Ye),e),this.trees=new Array(this.options.maxZoom+1)}load(e){const{log:n,minZoom:o,maxZoom:i,nodeSize:s}=this.options;n&&console.time("total time");const c=`prepare ${e.length} points`;n&&console.time(c),this.points=e;let l=[];for(let r=0;r<e.length;r++)!e[r].geometry||l.push(qe(e[r],r));this.trees[i+1]=new St(l,Lt,kt,s,Float32Array),n&&console.timeEnd(c);for(let r=i;r>=o;r--){const u=+Date.now();l=this._cluster(l,r),this.trees[r]=new St(l,Lt,kt,s,Float32Array),n&&console.log("z%d: %d clusters in %dms",r,l.length,+Date.now()-u)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let o=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const c=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)o=-180,s=180;else if(o>s){const d=this.getClusters([o,i,180,c],n),p=this.getClusters([-180,i,s,c],n);return d.concat(p)}const l=this.trees[this._limitZoom(n)],r=l.range(Y(o),J(c),Y(s),J(i)),u=[];for(const d of r){const p=l.points[d];u.push(p.numPoints?Pt(p):this.points[p.index])}return u}getChildren(e){const n=this._getOriginId(e),o=this._getOriginZoom(e),i="No cluster with the specified id.",s=this.trees[o];if(!s)throw new Error(i);const c=s.points[n];if(!c)throw new Error(i);const l=this.options.radius/(this.options.extent*Math.pow(2,o-1)),r=s.within(c.x,c.y,l),u=[];for(const d of r){const p=s.points[d];p.parentId===e&&u.push(p.numPoints?Pt(p):this.points[p.index])}if(u.length===0)throw new Error(i);return u}getLeaves(e,n,o){n=n||10,o=o||0;const i=[];return this._appendLeaves(i,e,n,o,0),i}getTile(e,n,o){const i=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:c,radius:l}=this.options,r=l/c,u=(o-r)/s,d=(o+1+r)/s,p={features:[]};return this._addTileFeatures(i.range((n-r)/s,u,(n+1+r)/s,d),i.points,n,o,s,p),n===0&&this._addTileFeatures(i.range(1-r/s,u,1,d),i.points,s,o,s,p),n===s-1&&this._addTileFeatures(i.range(0,u,r/s,d),i.points,-1,o,s,p),p.features.length?p:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const o=this.getChildren(e);if(n++,o.length!==1)break;e=o[0].properties.cluster_id}return n}_appendLeaves(e,n,o,i,s){const c=this.getChildren(n);for(const l of c){const r=l.properties;if(r&&r.cluster?s+r.point_count<=i?s+=r.point_count:s=this._appendLeaves(e,r.cluster_id,o,i,s):s<i?s++:e.push(l),e.length===o)break}return s}_addTileFeatures(e,n,o,i,s,c){for(const l of e){const r=n[l],u=r.numPoints;let d,p,h;if(u)d=Dt(r),p=r.x,h=r.y;else{const x=this.points[r.index];d=x.properties,p=Y(x.geometry.coordinates[0]),h=J(x.geometry.coordinates[1])}const f={type:1,geometry:[[Math.round(this.options.extent*(p*s-o)),Math.round(this.options.extent*(h*s-i))]],tags:d};let m;u?m=r.id:this.options.generateId?m=r.index:this.points[r.index].id&&(m=this.points[r.index].id),m!==void 0&&(f.id=m),c.features.push(f)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const o=[],{radius:i,extent:s,reduce:c,minPoints:l}=this.options,r=i/(s*Math.pow(2,n));for(let u=0;u<e.length;u++){const d=e[u];if(d.zoom<=n)continue;d.zoom=n;const p=this.trees[n+1],h=p.within(d.x,d.y,r),f=d.numPoints||1;let m=f;for(const x of h){const b=p.points[x];b.zoom>n&&(m+=b.numPoints||1)}if(m>f&&m>=l){let x=d.x*f,b=d.y*f,v=c&&f>1?this._map(d,!0):null;const k=(u<<5)+(n+1)+this.points.length;for(const C of h){const S=p.points[C];if(S.zoom<=n)continue;S.zoom=n;const $=S.numPoints||1;x+=S.x*$,b+=S.y*$,S.parentId=k,c&&(v||(v=this._map(d,!0)),c(v,this._map(S)))}d.parentId=k,o.push(Xe(x/m,b/m,k,m,v))}else if(o.push(d),m>1)for(const x of h){const b=p.points[x];b.zoom<=n||(b.zoom=n,o.push(b))}}return o}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n){if(e.numPoints)return n?G({},e.properties):e.properties;const o=this.points[e.index].properties,i=this.options.map(o);return n&&i===o?G({},i):i}}function Xe(t,e,n,o,i){return{x:X(t),y:X(e),zoom:1/0,id:n,parentId:-1,numPoints:o,properties:i}}function qe(t,e){const[n,o]=t.geometry.coordinates;return{x:X(Y(n)),y:X(J(o)),zoom:1/0,index:e,parentId:-1}}function Pt(t){return{type:"Feature",id:t.id,properties:Dt(t),geometry:{type:"Point",coordinates:[tn(t.x),en(t.y)]}}}function Dt(t){const e=t.numPoints,n=e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?`${Math.round(e/100)/10}k`:e;return G(G({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function Y(t){return t/360+.5}function J(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function tn(t){return(t-.5)*360}function en(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function G(t,e){for(const n in e)t[n]=e[n];return t}function Lt(t){return t.x}function kt(t){return t.y}var It=Object.prototype.hasOwnProperty;function _t(t,e,n){for(n of t.keys())if(H(n,e))return n}function H(t,e){var n,o,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((o=t.length)===e.length)for(;o--&&H(t[o],e[o]););return o===-1}if(n===Set){if(t.size!==e.size)return!1;for(o of t)if(i=o,i&&typeof i=="object"&&(i=_t(e,i),!i)||!e.has(i))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(o of t)if(i=o[0],i&&typeof i=="object"&&(i=_t(e,i),!i)||!H(o[1],e.get(i)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((o=t.byteLength)===e.byteLength)for(;o--&&t.getInt8(o)===e.getInt8(o););return o===-1}if(ArrayBuffer.isView(t)){if((o=t.byteLength)===e.byteLength)for(;o--&&t[o]===e[o];);return o===-1}if(!n||typeof t=="object"){o=0;for(n in t)if(It.call(t,n)&&++o&&!It.call(e,n)||!(n in e)||!H(t[n],e[n]))return!1;return Object.keys(e).length===o}}return t!==t&&e!==e}function nn(t){var e=y.exports.useRef(t),n=y.exports.useRef(0);return H(t,e.current)||(e.current=t,n.current+=1),y.exports.useMemo(function(){return e.current},[n.current])}function on(t,e){return y.exports.useEffect(t,nn(e))}var rn=function(e){var n=e.points,o=e.bounds,i=e.zoom,s=e.options,c=y.exports.useRef(),l=y.exports.useRef(),r=y.exports.useState([]),u=r[0],d=r[1],p=Math.round(i);return on(function(){(!c.current||!H(l.current,n)||!H(c.current.options,s))&&(c.current=new Je(s),c.current.load(n)),o&&d(c.current.getClusters(o,p)),l.current=n},[n,o,p,s]),{clusters:u,supercluster:c.current}};const sn=w.div`
2
- border-radius: 50%;
3
- background: linear-gradient(
4
- to top,
5
- ${g["--ll-color-primary-variant1"]},
6
- ${g["--ll-color-primary"]}
7
- );
8
- color: ${g["--ll-color-on-primary"]};
9
- height: ${({diameter:t})=>t}px;
10
- width: ${({diameter:t})=>t}px;
11
- display: flex;
12
- justify-content: center;
13
- align-items: center;
14
- line-height: 1;
15
- font-family: ${g["--ll-font-family"]};
16
- font-size: ${({diameter:t})=>t/2.5}px;
17
- border: 2px solid #fff;
18
- box-shadow: ${g["--ll-shadow-small"]};
19
- cursor: default;
20
- `,an=({cluster:t,pointsCount:e,onClick:n})=>{const o=t.properties.point_count,i=20+o/e*25;return a(sn,{diameter:i,onClick:()=>n&&n(t),children:t.properties.point_count})};function cn(t){return t.properties.cluster!==void 0}const Gt=O.memo(({rect:t,zoom:e,mapRef:n,points:o,isMobile:i,activePOI:s,hoveredPOI:c,isMapMoving:l,setActivePOI:r})=>{var h;const u=(h=n==null?void 0:n.current)==null?void 0:h.getMap().getBounds().toArray().flat(),{clusters:d,supercluster:p}=rn({points:o,bounds:u,zoom:e,options:{radius:50,maxZoom:18}});return a(et,{children:d.map((f,m)=>{const[x,b]=f.geometry.coordinates;if(cn(f))return a(xt,{latitude:b,longitude:x,children:a(an,{cluster:f,pointsCount:o.length,onClick:()=>{var M;const $=Math.min(p.getClusterExpansionZoom(f.id),20);(M=n.current)==null||M.flyTo({zoom:$,center:[x,b],duration:1e3})}})},`cluster-${f.id}`);const{poi:v,type:k}=f.properties,C=s===v,S=c===v;return a(xt,{latitude:v.lat,longitude:v.lng,style:{zIndex:C?1:0},children:L(it.Root,{options:{type:k,poi:v,isOpen:l?!1:C,isHovered:S,side:"top",collisionPadding:i?{top:t.height+32,bottom:V*2,left:V*2,right:V*2}:{left:t.width+32,right:V*2,top:V*2,bottom:V*2}},onChange:$=>{$.type==="open-change"&&($.data?setTimeout(()=>{r(v)},0):C&&r(void 0))},children:[a(it.Marker,{}),a(it.Content,{})]})},`${v.name}-${v.lat}-${v.lng}-${m}`)})})});Gt.displayName="Markers";function ft(t){const{client:e}=q(),{sdkState:n}=tt(),o=pt(n.options,250),s={...y.exports.useMemo(()=>o!=null&&o.marker?o.marker:{lat:o==null?void 0:o.lat,lng:o==null?void 0:o.lng},[o]),geographyLevels:["10","30"],locationScoresRounding:!1,include:t};return dt(ne.list(s),async()=>e.getScores(s),{enabled:!!s})}const ln=w.div`
21
- padding: ${g["--ll-spacing-small"]} ${g["--ll-spacing-medium"]};
22
- background-color: ${g["--ll-color-surface"]};
23
- display: flex;
24
- flex-direction: column;
25
- overflow: hidden;
26
- flex: 1;
27
- `,un=w.div`
28
- display: grid;
29
- grid-template-columns: min-content 1fr;
30
- grid-gap: ${g["--ll-spacing-medium"]};
31
- margin-bottom: ${g["--ll-spacing-medium"]};
32
- `,dn=w.div`
33
- overflow: auto;
34
-
35
- &:not(:empty) {
36
- margin-top: ${g["--ll-spacing-medium"]};
37
- }
38
- `,pn=Et({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),fn=Et({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),hn=w(oe)`
39
- margin: 0;
40
- `,Ft=w(ie)`
41
- background: none;
42
- border: none;
43
- display: flex;
44
- align-items: center;
45
- width: 100%;
46
- padding: ${g["--ll-spacing-x-small"]} 0;
47
- `,gn=w(re)`
48
- background-color: ${g["--ll-color-surface"]};
49
- position: relative;
50
- z-index: 1;
51
- overflow: hidden;
52
- margin-left: calc(-1 * ${g["--ll-spacing-medium"]});
53
- margin-right: calc(-1 * ${g["--ll-spacing-medium"]});
54
-
55
- [data-state="open"] & {
56
- animation: ${pn} 300ms cubic-bezier(0.87, 0, 0.13, 1);
57
- }
58
-
59
- [data-state="closed"] & {
60
- animation: ${fn} 300ms cubic-bezier(0.87, 0, 0.13, 1);
61
- }
62
- `,mn=w.div`
63
- padding: ${g["--ll-spacing-medium"]};
64
- `,vn=w.span`
65
- ${Ft}[data-state=open] & {
66
- transform: rotate(90deg);
67
- } ;
68
- `;w.div`
69
- display: flex;
70
- align-items: flex-start;
71
- justify-content: space-between;
72
- `;const ht=w.div`
73
- margin: ${g["--ll-spacing-small"]} 0;
74
- `,yn=w.div`
75
- margin-top: ${g["--ll-spacing-large"]};
76
-
77
- &:empty {
78
- margin: 0;
79
- }
80
- `,Wt=O.memo(({result:t,poi:e})=>{const{activePOI:n,setActivePOI:o,hoveredPOI:i,setHoveredPOI:s}=E(),{mapRef:c,mapPadding:l}=Nt();return!t.data||!t.data[e]?null:a(Z.Content,{options:{value:e},children:a(Tt.Root,{options:{type:"poi",data:t.data[e],activePOI:n,hoveredPOI:i},onChange:r=>{var u;if(r.type==="poi-click"){const d=r.data;o(d);const p=window.innerWidth-l.left,h=window.innerWidth/2,f=p/2+l.left-h;d&&((u=c.current)==null||u.flyTo({zoom:18,center:[d.lng,d.lat],duration:1e3,offset:[f,0]}))}r.type==="poi-hover"&&s(r.data)}})},e)});Wt.displayName="POI";const gt=O.memo(({include:t})=>{const e=Zt();return e.isLoading&&t.length?a(et,{children:[...Array(10)].map((n,o)=>a(ht,{children:a(nt,{height:"34px",width:"100%"})},o))}):e.data?L(Z.Root,{options:{include:t},children:[a(Z.Tabs,{}),t.map(n=>a(Wt,{poi:n,result:e},n))]}):null});gt.displayName="POIs";const Ut=({score:t})=>{const{data:e,isLoading:n}=Vt(),{activePOI:o,setActivePOI:i,hoveredPOI:s,setHoveredPOI:c}=E(),{mapRef:l,mapPadding:r}=Nt();return n?a(et,{children:[...Array(10)].map(u=>a(ht,{children:a(nt,{height:"34px",width:"100%"})},u))}):e?a(Tt.Root,{options:{type:"school",data:e==null?void 0:e[t],activePOI:o,hoveredPOI:s},onChange:u=>{var d;if(u.type==="poi-click"){const p=u.data;i(p);const h=window.innerWidth-r.left,f=window.innerWidth/2,m=h/2+r.left-f;p&&((d=l.current)==null||d.easeTo({zoom:18,center:[p.lng,p.lat],duration:1e3,offset:[m,0]}))}u.type==="poi-hover"&&c(u.data)}}):null},{scorePois:At}=Z.Constants,xn=()=>{const{activeCategory:t,activeScore:e,showMobileList:n}=E(),o=F.find(l=>l.value===t),{data:i,isLoading:s}=ft(o.scores),c=l=>!n||!At[l].length?null:l==="high_schools"||l==="primary_schools"?a(Ut,{score:l}):a(gt,{include:At[l]});return e&&(i==null?void 0:i.location[e])?s?a("div",{children:"Loading"}):a(I.Root,{options:{score:e,data:i},children:L(ln,{children:[L(un,{children:[a(I.Badge,{}),a(I.BarChart,{})]}),a(I.Description,{}),a(dn,{children:c(e)})]})}):null},bn=w.div`
81
- display: flex;
82
- overflow-x: scroll;
83
- padding: ${g["--ll-spacing-x-small"]} ${g["--ll-spacing-medium"]};
84
- flex-shrink: 0;
85
- position: relative;
86
- `,wn=w.button`
87
- position: relative;
88
- display: flex;
89
- flex-direction: column;
90
- align-items: center;
91
- background: none;
92
- border: none;
93
- min-width: 60px;
94
- padding: 0;
95
- margin: 0 8px;
96
- flex-shrink: 0;
97
-
98
- &:first-child {
99
- margin-left: 0;
100
- }
101
-
102
- &:last-child {
103
- margin-right: 0;
104
- }
105
- `,Mn=w.div`
106
- position: absolute;
107
- top: -6px;
108
- right: 4px;
109
- border: 2px solid ${g["--ll-color-background"]};
110
- border-radius: 6px;
111
- `,Cn=w.div`
112
- flex: 1;
113
- display: flex;
114
- align-items: center;
115
- `,$n=w.div`
116
- margin: 0 2px;
117
- `,Sn=({category:t})=>{const{data:e,isLoading:n,isFetching:o}=ft(t.scores),{activeScore:i,setActiveScore:s,setActiveCategory:c,setShowMobileList:l}=E();return a(bn,{children:t.scores.map(r=>{const u=r===i,d=u?"--ll-color-primary":"--ll-color-disabled";return n||o?a($n,{children:a(nt,{height:"44px",width:"60px"})},r):a(I.Root,{options:{score:r,data:e},children:L(wn,{onClick:()=>{l(!1),c(t.value),s(r)},children:[a(I.Icon,{options:{color:d,height:28,width:28}}),a(Cn,{children:a(I.Title,{options:{variant:"caption1",color:d,noWrap:!0,noMargin:!0,weight:"--ll-font-weight-bold"}})}),a(Mn,{children:a(I.Badge,{options:{variant:"small",isPrimary:u}})})]})},r)})})},Pn=w.div`
118
- display: flex;
119
- padding: ${g["--ll-spacing-x-small"]} ${g["--ll-spacing-medium"]} ${g["--ll-spacing-xx-small"]} ${g["--ll-spacing-medium"]};
120
- `,Ln=w.div`
121
- position: absolute;
122
- top: 0;
123
- left: 0;
124
- right: 0;
125
- bottom: ${({showMobileList:t})=>t&&0};
126
- z-index: 3;
127
- box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
128
- background-color: #fff;
129
- overflow: hidden;
130
- display: flex;
131
- flex-direction: column;
132
- background-color: ${g["--ll-color-background"]};
133
- border: 1px solid ${g["--ll-color-border"]};
134
- `,Kt=O.forwardRef(({showMobileList:t},e)=>{const{activeCategory:n,setActiveCategory:o}=E();return L(Ln,{ref:e,showMobileList:t,children:[a(Pn,{children:L(U.Root,{value:n,onValueChange:i=>o(i),children:[a(U.Trigger,{size:"large",children:a(K.Root,{options:{scoreCategory:n},children:a(K.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},n)}),a(U.Content,{children:F.map(i=>a(K.Root,{options:{scoreCategory:i.value},children:a(U.Item,{value:i.value,children:a(K.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},i.value))})]})}),a(Sn,{category:F.find(i=>i.value===n)}),a(xn,{})]})});Kt.displayName="MobileScores";const{scorePois:kn}=Z.Constants,Qt=O.memo(({score:t,isLoading:e,data:n})=>e?a(ht,{children:a(nt,{height:"34px",width:"100%"},t)}):a(se,{value:t,children:L(I.Root,{options:{score:t,data:n},children:[a(hn,{children:L(Ft,{children:[a(vn,{children:a(fe,{SVGElement:ae,fill:g["--ll-color-on-background-variant1"]})}),a(D,{spacing:"--ll-spacing-small"}),a(I.Icon,{}),a(D,{spacing:"--ll-spacing-small"}),a(I.Title,{}),a(D,{}),a(I.Badge,{})]})}),a(gn,{children:L(mn,{children:[a(I.Description,{}),a(D,{vertical:!0,spacing:"--ll-spacing-small"}),a(I.BarChart,{}),a(yn,{children:t==="high_schools"||t==="primary_schools"?a(Ut,{score:t}):a(gt,{include:kn[t]})})]})})]})},t));Qt.displayName="Score";const In=w.div`
135
- padding: ${g["--ll-spacing-small"]} ${g["--ll-spacing-medium"]};
136
- `,_n=w.div`
137
- display: flex;
138
- justify-content: space-between;
139
- align-items: center;
140
- `,Yt=O.memo(({data:t,isLoading:e,isFetching:n,tabContent:o})=>{const{translations:i}=he();return L(In,{children:[L(_n,{children:[a(Q.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),n&&!e&&a(ge,{size:"small"})]}),a(D,{spacing:"--ll-spacing-small",vertical:!0}),!n&&!Object.keys((t==null?void 0:t.location)||{}).length&&a(me,{color:"--ll-color-on-background-variant1",children:i.EMPTY_TEXT}),o.scores.map(s=>a(Qt,{score:s,data:t,isLoading:e},s))]})});Yt.displayName="ScoreCategory";const Jt=O.memo(({tabContent:t})=>{q();const{data:e,isLoading:n,isFetching:o}=ft(t.scores),{activeScore:i,setActiveScore:s}=E();return a(ce,{value:i,onValueChange:c=>{s(c)},type:"single",collapsible:!0,children:a(Yt,{data:e,isLoading:n,isFetching:o,tabContent:t})})});Jt.displayName="ScoreCategoryAccordion";const An=w.div`
141
- overflow-y: auto;
142
- `,On=w.div`
143
- position: absolute;
144
- top: ${g["--ll-spacing-medium"]};
145
- left: ${g["--ll-spacing-medium"]};
146
- width: 360px;
147
- max-height: calc(100% - 2 * ${g["--ll-spacing-medium"]});
148
- z-index: 1;
149
- border-radius: ${g["--ll-border-radius-medium"]};
150
- box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
151
- background-color: #fff;
152
- overflow: hidden;
153
- display: flex;
154
- flex-direction: column;
155
- background-color: ${g["--ll-color-background"]};
156
- border: 1px solid ${g["--ll-color-border"]};
157
- `;w.div`
158
- display: flex;
159
- justify-content: center;
160
- padding: ${g["--ll-spacing-small"]};
161
- `;const En=w.div`
162
- padding: ${g["--ll-spacing-x-small"]};
163
- border-bottom: 1px solid ${g["--ll-color-border"]};
164
- `,Tn=w.div`
165
- display: flex;
166
- justify-content: center;
167
- padding: ${g["--ll-spacing-small"]};
168
- background-color: ${g["--ll-color-background"]};
169
- `,Xt=()=>a(Tn,{children:a(ve.Root,{})}),qt=O.forwardRef((t,e)=>{const{activeCategory:n,setActiveCategory:o,setShowMobileList:i}=E();return a(Q.Root,{options:{currentTab:n},onChange:s=>{o(s.data)},children:L(On,{ref:e,children:[a(En,{children:a(Q.Tabs,{})}),a(An,{children:F.map(s=>a(Q.Content,{options:{value:s.value},children:a(Jt,{tabContent:s},s.value)},s.value))}),a(Xt,{})]})})});qt.displayName="DesktopScores";const zn=w.div`
170
- position: relative;
171
- display: flex;
172
- flex-direction: column;
173
- height: 100vh;
174
- `,Rn=w.div`
175
- position: absolute;
176
- bottom: 86px;
177
- right: 10px;
178
- background-color: ${g["--ll-color-background"]};
179
- z-index: 3;
180
- border-radius: 50%;
181
- `,Hn=w(ye)`
182
- box-shadow: ${g["--ll-shadow-medium"]};
183
- `,{scorePois:at}=Z.Constants,Zn=()=>{var T,j,mt;const{sdkState:t,setSdkState:e}=tt(),{activeScore:n,activePOI:o,setActivePOI:i,hoveredPOI:s,showMobileList:c,setShowMobileList:l}=E(),r=Be(),u=Zt(),d=Vt(),p=((j=(T=t==null?void 0:t.globalOptions)==null?void 0:T.appearance)==null?void 0:j.theme)==="night"?"basic-v2-dark":"600d69cb-288d-445e-9839-3dfe4d76b31a",[h,f]=y.exports.useState(!1),m=y.exports.useMemo(()=>{var P;return(n==="high_schools"||n==="primary_schools")&&!d.isFetching?{[n]:((P=d==null?void 0:d.data)==null?void 0:P[n])||[]}:!(n&&at[n]&&at[n].length)&&!u.isFetching?{[n]:[]}:u.data},[u.data,d.data,n]),x=y.exports.useMemo(()=>m?Object.entries(m).map(([z,R])=>R.map(A=>bt([A.lng,A.lat],{poi:A,type:z}))).flat().filter((z,R,A)=>A.findIndex(ot=>["lat","lng","name"].every(N=>ot.properties.poi[N]===z.properties.poi[N]))===R):[],[m]),b=y.exports.useMemo(()=>{var z,R,A;const P=((z=t==null?void 0:t.options)==null?void 0:z.marker)&&bt([(R=t==null?void 0:t.options)==null?void 0:R.marker.lng,(A=t==null?void 0:t.options)==null?void 0:A.marker.lat]);return[...x,...P?[P]:[]]},[x,(mt=t==null?void 0:t.options)==null?void 0:mt.marker]),v=y.exports.useRef(),[k,C]=Ce(),S=y.exports.useMemo(()=>({top:25+C.height,bottom:25,left:25,right:25}),[C.height]),$=y.exports.useMemo(()=>({top:50,bottom:50,left:C.width+32+50,right:50}),[C.width]),M=r?S:$,_=P=>{e({...t,options:{...t.options,lat:P.viewState.latitude,lng:P.viewState.longitude,zoom:P.viewState.zoom,bearing:P.viewState.bearing,pitch:P.viewState.pitch}})};return y.exports.useEffect(()=>{var N,vt;if(!b.length||!((N=t.options)!=null&&N.marker))return;const P=we(b.map(({geometry:yt})=>[yt.coordinates[1],yt.coordinates[0]])),[z,R,A,ot]=ct(P);(vt=v==null?void 0:v.current)==null||vt.fitBounds([[R,z],[ot,A]],{maxZoom:17,padding:M,duration:1e3})},[b,M]),t.options?a(Fe,{mapRef:v,mapPadding:M,children:L(zn,{children:[L(le,{ref:v,mapLib:ue,latitude:t.options.lat,longitude:t.options.lng,zoom:t.options.zoom,pitch:t.options.pitch,bearing:t.options.bearing,style:{flex:1,width:"100vw"},mapStyle:`https://api.maptiler.com/maps/${p}/style.json?key=9jNGatuzs05Q1oNlctEs`,onMove:_,cooperativeGestures:t.options.cooperativeGestures,onMoveStart:()=>f(!0),onMoveEnd:()=>f(!1),children:[a(de,{showCompass:!0,style:{marginTop:r?16+C.height:16,marginRight:16}}),t.options.marker&&a(pe,{marker:t.options.marker}),a(Gt,{rect:C,zoom:t.options.zoom,mapRef:v,points:x,isMobile:r,activePOI:o,hoveredPOI:s,isMapMoving:h,setActivePOI:i}),r?a(Kt,{ref:k,showMobileList:c}):a(qt,{ref:k})]}),r&&L(et,{children:[a(Rn,{children:a(Hn,{size:"large",SVGElement:De,onClick:()=>l(P=>!P),disabled:!(n&&!!at[n].length)})}),a(Xt,{})]})]})}):a("div",{children:"No options provided."})},Nn=()=>a(be,{children:a(Zn,{})});export{Nn as default};