@local-logic/sdks-app 1.3.3 → 1.4.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.
Files changed (54) hide show
  1. package/dist/assets/{index-legacy.23b32b2c.js → index-legacy.18d30aa6.js} +1 -1
  2. package/dist/assets/index-legacy.794e5e8f.js +1 -0
  3. package/dist/assets/{index-legacy.2a39163e.js → index-legacy.8fa657cd.js} +5 -5
  4. package/dist/assets/{index-legacy.37a48384.js → index-legacy.ecbf4d15.js} +2 -2
  5. package/dist/assets/index.5c2eb175.js +242 -0
  6. package/dist/assets/{index.593fd8da.js → index.8baa8ea5.js} +2 -2
  7. package/dist/assets/{index.a71b3d5e.js → index.98a268d7.js} +206 -204
  8. package/dist/assets/{index.ee043df4.js → index.ea7647ef.js} +1 -1
  9. package/dist/index.html +2 -2
  10. package/dist/types/components/Search/index.d.ts.map +1 -1
  11. package/dist/types/components/Search/index.js +3 -2
  12. package/dist/types/components/Search/index.js.map +1 -1
  13. package/dist/types/features/calculateRoute/keyFactory.d.ts +3 -3
  14. package/dist/types/features/calculateRoute/keyFactory.d.ts.map +1 -1
  15. package/dist/types/features/calculateRoute/keyFactory.js +3 -3
  16. package/dist/types/features/calculateRoute/keyFactory.js.map +1 -1
  17. package/dist/types/features/calculateRoute/useCommute.d.ts +2 -1
  18. package/dist/types/features/calculateRoute/useCommute.d.ts.map +1 -1
  19. package/dist/types/features/calculateRoute/useCommute.js +4 -4
  20. package/dist/types/features/calculateRoute/useCommute.js.map +1 -1
  21. package/dist/types/features/reverse-geocodes/keyFactory.d.ts +6 -0
  22. package/dist/types/features/reverse-geocodes/keyFactory.d.ts.map +1 -1
  23. package/dist/types/features/reverse-geocodes/keyFactory.js.map +1 -1
  24. package/dist/types/features/reverse-geocodes/types.d.ts +2 -5
  25. package/dist/types/features/reverse-geocodes/types.d.ts.map +1 -1
  26. package/dist/types/features/reverse-geocodes/useReverseGeocodes.d.ts +7 -0
  27. package/dist/types/features/reverse-geocodes/useReverseGeocodes.d.ts.map +1 -0
  28. package/dist/types/features/reverse-geocodes/useReverseGeocodes.js +24 -0
  29. package/dist/types/features/reverse-geocodes/useReverseGeocodes.js.map +1 -0
  30. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.d.ts.map +1 -1
  31. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.js +3 -2
  32. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.js.map +1 -1
  33. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.d.ts +1 -1
  34. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.d.ts.map +1 -1
  35. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.js +1 -1
  36. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.js.map +1 -1
  37. package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.d.ts.map +1 -1
  38. package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.js +6 -7
  39. package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.js.map +1 -1
  40. package/dist/types/sdks/LocalContent/Map/Markers/Marker/index.d.ts +2 -0
  41. package/dist/types/sdks/LocalContent/Map/Markers/Marker/index.d.ts.map +1 -1
  42. package/dist/types/sdks/LocalContent/Map/Markers/Marker/index.js +43 -2
  43. package/dist/types/sdks/LocalContent/Map/Markers/Marker/index.js.map +1 -1
  44. package/dist/types/sdks/LocalContent/context.d.ts +4 -1
  45. package/dist/types/sdks/LocalContent/context.d.ts.map +1 -1
  46. package/dist/types/sdks/LocalContent/context.js +5 -0
  47. package/dist/types/sdks/LocalContent/context.js.map +1 -1
  48. package/package.json +2 -2
  49. package/dist/assets/index-legacy.f312d7a3.js +0 -1
  50. package/dist/assets/index.70b9d59a.js +0 -242
  51. package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.d.ts +0 -5
  52. package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.d.ts.map +0 -1
  53. package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.js +0 -23
  54. package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.js.map +0 -1
@@ -1 +0,0 @@
1
- !function(){var e,t,n,r,o,i,a,l,c,s,u,d,p,f,h,v,m,g,y,b,x,w,C,M,S,P,O,k,L,I,E,j,A,_,z,T,R,N;function Z(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t,n){return t&&V(e.prototype,t),n&&V(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */H=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(O){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),a=new M(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=x(a,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(O){return{type:"throw",arg:O}}}e.wrap=c;var u={};function d(){}function p(){}function f(){}var h={};l(h,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==t&&n.call(m,o)&&(h=m);var g=f.prototype=d.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function r(o,i,a,l){var c=s(e[o],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==W(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,l)}),(function(e){r("throw",e,a,l)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,l)}))}l(c.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return p.prototype=f,l(g,"constructor",f),l(f,"constructor",p),p.displayName=l(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(b.prototype),l(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new b(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(g),l(g,a,"Generator"),l(g,o,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function B(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(s){return void n(s)}l.done?t(c):Promise.resolve(c).then(r,o)}function U(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){B(i,r,o,a,l,"next",e)}function l(e){B(i,r,o,a,l,"throw",e)}a(void 0)}))}}function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function $(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=q(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){l=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||q(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){if(e){if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){J(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}System.register(["./index-legacy.37a48384.js","./index-legacy.2a39163e.js"],(function(V,B){"use strict";var q,K,Q,ee,te,ne,re,oe,ie,ae,le,ce,se,ue,de,pe,fe,he,ve,me,ge,ye,be,xe,we,Ce,Me,Se,Pe,Oe,ke,Le,Ie,Ee,je,Ae,_e,ze,Te,Re,Ne,Ze,De,Ge,Ve,Fe,He,Be,Ue,We,$e,Ye,qe,Ke,Qe,Xe,Je;return{setters:[function(e){q=e.M,K=e.d,Q=e.u,ee=e.p,te=e.s,ne=e.a,re=e.b,oe=e.$,ie=e.c,ae=e.e,le=e.f,ce=e.S,se=e.g,ue=e.h,de=e.i,pe=e.A,fe=e.j,he=e.k,ve=e.m,me=e.l,ge=e.N,ye=e.P},function(e){be=e.R,xe=e.r,we=e.Z,Ce=e.j,Me=e.l,Se=e.c,Pe=e.d,Oe=e.u,ke=e.a,Le=e.$,Ie=e.s,Ee=e.m,je=e.y,Ae=e.b,_e=e.H,ze=e.C,Te=e.o,Re=e.F,Ne=e.k,Ze=e.e,De=e.n,Ge=e.f,Ve=e.U,Fe=e.N,He=e.z,Be=e.q,Ue=e.T,We=e.g,$e=e.h,Ye=e.O,qe=e.i,Ke=e.M,Qe=e.p,Xe=e.Q,Je=e.A}],execute:function(){var B=be.createContext({}),et=function(){return xe.exports.useContext(B)},tt=function(e,t){switch(t.type){case"CATEGORY":return X(X({},e),{},{activeCategory:t.value});case"SCORE":var n=Me.find((function(n){return""===t.value?n.value===e.activeCategory:n.scores.includes(t.value)})).value;return{activeCategory:n,activeScoreByCategory:X(X({},e.activeScoreByCategory),{},J({},n,t.value))}}},nt=function(e){var t=e.children,n=window.innerWidth<we.screenSizes.tablet?{activeCategory:"commute",activeScoreByCategory:{commute:"transit_friendly",amenities:"groceries",character:"quiet",nature:"parks",education:"primary_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},r=Y(xe.exports.useReducer(tt,n),2),o=r[0],i=r[1],a=Y(xe.exports.useState(),2),l=a[0],c=a[1],s=Y(xe.exports.useState(),2),u=s[0],d=s[1],p=Y(xe.exports.useState(),2),f=p[0],h=p[1],v=Y(xe.exports.useState(),2),m=v[0],g=v[1],y=o.activeCategory,b=o.activeScoreByCategory[y],x=function(e){i({type:"SCORE",value:e})},w=function(e){i({type:"CATEGORY",value:e})},C=xe.exports.useMemo((function(){return{activeScore:b,setActiveScore:x,activeCategory:y,setActiveCategory:w,activePOI:l,setActivePOI:c,hoveredPOI:u,setHoveredPOI:d,commuteGeojson:f,setCommuteGeojson:h,destination:m,setDestination:g}}),[b,x,y,w,l,c,u,d,f,h,m,g]);return Ce(B.Provider,{value:C,children:t})};function rt(e,t){if(!e)throw new Error(t)}var ot=0;function it(e){var t=xe.exports.useContext(q).map.getMap(),n=xe.exports.useRef(e),r=Y(xe.exports.useState(0),2)[1],o=xe.exports.useMemo((function(){return e.id||"jsx-source-".concat(ot++)}),[]);xe.exports.useEffect((function(){if(t){var e=function(){return r((function(e){return e+1}))};return t.on("styledata",e),e(),function(){var n;if(t.off("styledata",e),t.style&&t.style._loaded&&t.getSource(o)){var r=null===(n=t.getStyle())||void 0===n?void 0:n.layers;if(r){var i,a=$(r);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.source===o&&t.removeLayer(l.id)}}catch(c){a.e(c)}finally{a.f()}}t.removeSource(o)}}}}),[t]);var i=t&&t.style&&t.getSource(o);return i?function(e,t,n){rt(t.id===n.id,"source id changed"),rt(t.type===n.type,"source type changed");var r="",o=0;for(var i in t)"children"===i||"id"===i||K(n[i],t[i])||(r=i,o++);if(o){var a=t.type;if("geojson"===a)e.setData(t.data);else if("image"===a)e.updateImage({url:t.url,coordinates:t.coordinates});else if("canvas"!==a&&"video"!==a||1!==o||"coordinates"!==r)if("vector"===a&&"setUrl"in e)switch(r){case"url":e.setUrl(t.url);break;case"tiles":e.setTiles(t.tiles)}else console.warn("Unable to update <Source> prop: ".concat(r));else e.setCoordinates(t.coordinates)}}(i,e,n.current):i=function(e,t,n){if(e.style&&e.style._loaded){var r=X({},n);return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}(t,o,e),n.current=e,i&&xe.exports.Children.map(e.children,(function(e){return e&&xe.exports.cloneElement(e,{source:o})}))||null}var at=0;function lt(e){var t=xe.exports.useContext(q).map.getMap(),n=xe.exports.useRef(e),r=Y(xe.exports.useState(0),2)[1],o=xe.exports.useMemo((function(){return e.id||"jsx-layer-".concat(at++)}),[]);if(xe.exports.useEffect((function(){if(t){var e=function(){return r((function(e){return e+1}))};return t.on("styledata",e),e(),function(){t.off("styledata",e),t.style&&t.style._loaded&&t.getLayer(o)&&t.removeLayer(o)}}}),[t]),t&&t.style&&t.getLayer(o))try{!function(e,t,n,r){if(rt(n.id===r.id,"layer id changed"),rt(n.type===r.type,"layer type changed"),"custom"!==n.type&&"custom"!==r.type){var o=n.layout,i=void 0===o?{}:o,a=n.paint,l=void 0===a?{}:a,c=n.filter,s=n.minzoom,u=n.maxzoom,d=n.beforeId;if(d!==r.beforeId&&e.moveLayer(t,d),i!==r.layout){var p=r.layout||{};for(var f in i)K(i[f],p[f])||e.setLayoutProperty(t,f,i[f]);for(var h in p)i.hasOwnProperty(h)||e.setLayoutProperty(t,h,void 0)}if(l!==r.paint){var v=r.paint||{};for(var m in l)K(l[m],v[m])||e.setPaintProperty(t,m,l[m]);for(var g in v)l.hasOwnProperty(g)||e.setPaintProperty(t,g,void 0)}K(c,r.filter)||e.setFilter(t,c),s===r.minzoom&&u===r.maxzoom||e.setLayerZoomRange(t,s,u)}}(t,o,e,n.current)}catch(i){console.warn(i)}else!function(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){var r=X(X({},n),{},{id:t});delete r.beforeId,e.addLayer(r,n.beforeId)}}(t,o,e);return n.current=e,null}function ct(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function st(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ut(e[0])||!ut(e[1]))throw new Error("coordinates must contain numbers");return ct({type:"Point",coordinates:e},t,n)}function ut(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function dt(e,t,n){if(null!==e)for(var r,o,i,a,l,c,s,u,d=0,p=0,f=e.type,h="FeatureCollection"===f,v="Feature"===f,m=h?e.features.length:1,g=0;g<m;g++){l=(u=!!(s=h?e.features[g].geometry:v?e.geometry:e)&&"GeometryCollection"===s.type)?s.geometries.length:1;for(var y=0;y<l;y++){var b=0,x=0;if(null!==(a=u?s.geometries[y]:s)){c=a.coordinates;var w=a.type;switch(d=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(c,p,g,b,x))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<c.length;r++){if(!1===t(c[r],p,g,b,x))return!1;p++,"MultiPoint"===w&&b++}"LineString"===w&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<c.length;r++){for(o=0;o<c[r].length-d;o++){if(!1===t(c[r][o],p,g,b,x))return!1;p++}"MultiLineString"===w&&b++,"Polygon"===w&&x++}"Polygon"===w&&b++;break;case"MultiPolygon":for(r=0;r<c.length;r++){for(x=0,o=0;o<c[r].length;o++){for(i=0;i<c[r][o].length-d;i++){if(!1===t(c[r][o][i],p,g,b,x))return!1;p++}x++}b++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===dt(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function pt(e){var t=[1/0,1/0,-1/0,-1/0];return dt(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}pt.default=pt;var ft=/^\s+|\s+$/g,ht=/^[-+]0x[0-9a-f]+$/i,vt=/^0b[01]+$/i,mt=/^0o[0-7]+$/i,gt=parseInt,yt="object"==W(Se)&&Se&&Se.Object===Object&&Se,bt="object"==("undefined"==typeof self?"undefined":W(self))&&self&&self.Object===Object&&self,xt=yt||bt||Function("return this")(),wt=Object.prototype.toString,Ct=Math.max,Mt=Math.min,St=function(){return xt.Date.now()};function Pt(e){var t=W(e);return!!e&&("object"==t||"function"==t)}function Ot(e){return"symbol"==W(e)||function(e){return!!e&&"object"==W(e)}(e)&&"[object Symbol]"==wt.call(e)}function kt(e){if("number"==typeof e)return e;if(Ot(e))return NaN;if(Pt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Pt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(ft,"");var n=vt.test(e);return n||mt.test(e)?gt(e.slice(2),n?2:8):ht.test(e)?NaN:+e}var Lt=function(e,t,n){var r,o,i,a,l,c,s=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,i=o;return r=o=void 0,s=t,a=e.apply(i,n)}function h(e){return s=e,l=setTimeout(m,t),u?f(e):a}function v(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=i}function m(){var e=St();if(v(e))return g(e);l=setTimeout(m,function(e){var n=t-(e-c);return d?Mt(n,i-(e-s)):n}(e))}function g(e){return l=void 0,p&&r?f(e):(r=o=void 0,a)}function y(){var e=St(),n=v(e);if(r=arguments,o=this,c=e,n){if(void 0===l)return h(c);if(d)return l=setTimeout(m,t),f(c)}return void 0===l&&(l=setTimeout(m,t)),a}return t=kt(t)||0,Pt(n)&&(u=!!n.leading,i=(d="maxWait"in n)?Ct(kt(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),y.cancel=function(){void 0!==l&&clearTimeout(l),s=0,r=c=o=l=void 0},y.flush=function(){return void 0===l?a:g(St())},y},It=function(){var e=Y(xe.exports.useState(!1),2),t=e[0],n=e[1];return xe.exports.useLayoutEffect((function(){var e=function(){n(window.innerWidth<we.screenSizes.tablet)};return window.addEventListener("resize",Lt(e,250)),e(),function(){return window.removeEventListener("resize",e)}}),[]),t};function Et(){var e,t=Pe().client,n=Oe().sdkState,r=ke(n.options,250),o=et().activeScore,i=o?Le[o]:void 0,a=X(X({},xe.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{limit:10,radius:2e3,include:i});return Q(ee.list(a),U(H().mark((function e(){return H().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getPois(a));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!(a&&null!==(e=a.include)&&void 0!==e&&e.length&&a.lat&&a.lng)})}function jt(){var e=Pe().client,t=Oe().sdkState,n=ke(t.options,250),r=et().activeScore,o="high_schools"===r||"primary_schools"===r,i=X(X({},xe.exports.useMemo((function(){return!(null==n||!n.marker)?n.marker:{lat:null==n?void 0:n.lat,lng:null==n?void 0:n.lng}}),[n])),{},{limit:10,radius:2e3});return Q(te.list(i),U(H().mark((function t(){return H().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getSchools(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i&&!!i.lat&&!!i.lng&&o})}var At=be.createContext({}),_t=function(){return xe.exports.useContext(At)},zt=function(e){var t=e.children,n=e.mapRef,r=e.mapPadding;return Ce(At.Provider,{value:{mapRef:n,mapPadding:r},children:t})};function Tt(e,t,n,r,o,i){if(!(o-r<=n)){var a=r+o>>1;Rt(e,t,a,r,o,i%2),Tt(e,t,n,r,a-1,i+1),Tt(e,t,n,a+1,o,i+1)}}function Rt(e,t,n,r,o,i){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,c=Math.log(a),s=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*s*(a-s)/a)*(l-a/2<0?-1:1);Rt(e,t,n,Math.max(r,Math.floor(n-l*s/a+u)),Math.min(o,Math.floor(n+(a-l)*s/a+u)),i)}var d=t[2*n+i],p=r,f=o;for(Nt(e,t,r,n),t[2*o+i]>d&&Nt(e,t,r,o);p<f;){for(Nt(e,t,p,f),p++,f--;t[2*p+i]<d;)p++;for(;t[2*f+i]>d;)f--}t[2*r+i]===d?Nt(e,t,r,f):Nt(e,t,++f,o),f<=n&&(r=f+1),n<=f&&(o=f-1)}}function Nt(e,t,n,r){Zt(e,n,r),Zt(t,2*n,2*r),Zt(t,2*n+1,2*r+1)}function Zt(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Dt(e,t,n,r){var o=e-n,i=t-r;return o*o+i*i}var Gt,Vt=function(e){return e[0]},Ft=function(e){return e[1]},Ht=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vt,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ft,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;G(this,e),this.nodeSize=o,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,l=this.ids=new a(t.length),c=this.coords=new i(2*t.length),s=0;s<t.length;s++)l[s]=s,c[2*s]=n(t[s]),c[2*s+1]=r(t[s]);Tt(l,c,o,0,l.length-1,0)}return F(e,[{key:"range",value:function(e,t,n,r){return function(e,t,n,r,o,i,a){for(var l,c,s=[0,e.length-1,0],u=[];s.length;){var d=s.pop(),p=s.pop(),f=s.pop();if(p-f<=a)for(var h=f;h<=p;h++)l=t[2*h],c=t[2*h+1],l>=n&&l<=o&&c>=r&&c<=i&&u.push(e[h]);else{var v=Math.floor((f+p)/2);l=t[2*v],c=t[2*v+1],l>=n&&l<=o&&c>=r&&c<=i&&u.push(e[v]);var m=(d+1)%2;(0===d?n<=l:r<=c)&&(s.push(f),s.push(v-1),s.push(m)),(0===d?o>=l:i>=c)&&(s.push(v+1),s.push(p),s.push(m))}}return u}(this.ids,this.coords,e,t,n,r,this.nodeSize)}},{key:"within",value:function(e,t,n){return function(e,t,n,r,o,i){for(var a=[0,e.length-1,0],l=[],c=o*o;a.length;){var s=a.pop(),u=a.pop(),d=a.pop();if(u-d<=i)for(var p=d;p<=u;p++)Dt(t[2*p],t[2*p+1],n,r)<=c&&l.push(e[p]);else{var f=Math.floor((d+u)/2),h=t[2*f],v=t[2*f+1];Dt(h,v,n,r)<=c&&l.push(e[f]);var m=(s+1)%2;(0===s?n-o<=h:r-o<=v)&&(a.push(d),a.push(f-1),a.push(m)),(0===s?n+o>=h:r+o>=v)&&(a.push(f+1),a.push(u),a.push(m))}}return l}(this.ids,this.coords,e,t,n,this.nodeSize)}}]),e}(),Bt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(e){return e}},Ut=Math.fround||(Gt=new Float32Array(1),function(e){return Gt[0]=+e,Gt[0]}),Wt=function(){function e(t){G(this,e),this.options=en(Object.create(Bt),t),this.trees=new Array(this.options.maxZoom+1)}return F(e,[{key:"load",value:function(e){var t=this.options,n=t.log,r=t.minZoom,o=t.maxZoom,i=t.nodeSize;n&&console.time("total time");var a="prepare ".concat(e.length," points");n&&console.time(a),this.points=e;for(var l=[],c=0;c<e.length;c++)e[c].geometry&&l.push(Yt(e[c],c));this.trees[o+1]=new Ht(l,tn,nn,i,Float32Array),n&&console.timeEnd(a);for(var s=o;s>=r;s--){var u=+Date.now();l=this._cluster(l,s),this.trees[s]=new Ht(l,tn,nn,i,Float32Array),n&&console.log("z%d: %d clusters in %dms",s,l.length,+Date.now()-u)}return n&&console.timeEnd("total time"),this}},{key:"getClusters",value:function(e,t){var n=((e[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,e[1])),o=180===e[2]?180:((e[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,o=180;else if(n>o){var a=this.getClusters([n,r,180,i],t),l=this.getClusters([-180,r,o,i],t);return a.concat(l)}var c,s=this.trees[this._limitZoom(t)],u=[],d=$(s.range(Qt(n),Xt(i),Qt(o),Xt(r)));try{for(d.s();!(c=d.n()).done;){var p=c.value,f=s.points[p];u.push(f.numPoints?qt(f):this.points[f.index])}}catch(h){d.e(h)}finally{d.f()}return u}},{key:"getChildren",value:function(e){var t=this._getOriginId(e),n=this._getOriginZoom(e),r="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(r);var i=o.points[t];if(!i)throw new Error(r);var a,l=this.options.radius/(this.options.extent*Math.pow(2,n-1)),c=[],s=$(o.within(i.x,i.y,l));try{for(s.s();!(a=s.n()).done;){var u=a.value,d=o.points[u];d.parentId===e&&c.push(d.numPoints?qt(d):this.points[d.index])}}catch(p){s.e(p)}finally{s.f()}if(0===c.length)throw new Error(r);return c}},{key:"getLeaves",value:function(e,t,n){t=t||10,n=n||0;var r=[];return this._appendLeaves(r,e,t,n,0),r}},{key:"getTile",value:function(e,t,n){var r=this.trees[this._limitZoom(e)],o=Math.pow(2,e),i=this.options,a=i.extent,l=i.radius/a,c=(n-l)/o,s=(n+1+l)/o,u={features:[]};return this._addTileFeatures(r.range((t-l)/o,c,(t+1+l)/o,s),r.points,t,n,o,u),0===t&&this._addTileFeatures(r.range(1-l/o,c,1,s),r.points,o,n,o,u),t===o-1&&this._addTileFeatures(r.range(0,c,l/o,s),r.points,-1,n,o,u),u.features.length?u:null}},{key:"getClusterExpansionZoom",value:function(e){for(var t=this._getOriginZoom(e)-1;t<=this.options.maxZoom;){var n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}},{key:"_appendLeaves",value:function(e,t,n,r,o){var i,a=$(this.getChildren(t));try{for(a.s();!(i=a.n()).done;){var l=i.value,c=l.properties;if(c&&c.cluster?o+c.point_count<=r?o+=c.point_count:o=this._appendLeaves(e,c.cluster_id,n,r,o):o<r?o++:e.push(l),e.length===n)break}}catch(s){a.e(s)}finally{a.f()}return o}},{key:"_addTileFeatures",value:function(e,t,n,r,o,i){var a,l=$(e);try{for(l.s();!(a=l.n()).done;){var c=t[a.value],s=c.numPoints,u=void 0,d=void 0,p=void 0;if(s)u=Kt(c),d=c.x,p=c.y;else{var f=this.points[c.index];u=f.properties,d=Qt(f.geometry.coordinates[0]),p=Xt(f.geometry.coordinates[1])}var h={type:1,geometry:[[Math.round(this.options.extent*(d*o-n)),Math.round(this.options.extent*(p*o-r))]],tags:u},v=void 0;s?v=c.id:this.options.generateId?v=c.index:this.points[c.index].id&&(v=this.points[c.index].id),void 0!==v&&(h.id=v),i.features.push(h)}}catch(m){l.e(m)}finally{l.f()}}},{key:"_limitZoom",value:function(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}},{key:"_cluster",value:function(e,t){for(var n=[],r=this.options,o=r.radius,i=r.extent,a=r.reduce,l=r.minPoints,c=o/(i*Math.pow(2,t)),s=0;s<e.length;s++){var u=e[s];if(!(u.zoom<=t)){u.zoom=t;var d,p=this.trees[t+1],f=p.within(u.x,u.y,c),h=u.numPoints||1,v=h,m=$(f);try{for(m.s();!(d=m.n()).done;){var g=d.value,y=p.points[g];y.zoom>t&&(v+=y.numPoints||1)}}catch(A){m.e(A)}finally{m.f()}if(v>h&&v>=l){var b,x=u.x*h,w=u.y*h,C=a&&h>1?this._map(u,!0):null,M=(s<<5)+(t+1)+this.points.length,S=$(f);try{for(S.s();!(b=S.n()).done;){var P=b.value,O=p.points[P];if(!(O.zoom<=t)){O.zoom=t;var k=O.numPoints||1;x+=O.x*k,w+=O.y*k,O.parentId=M,a&&(C||(C=this._map(u,!0)),a(C,this._map(O)))}}}catch(A){S.e(A)}finally{S.f()}u.parentId=M,n.push($t(x/v,w/v,M,v,C))}else if(n.push(u),v>1){var L,I=$(f);try{for(I.s();!(L=I.n()).done;){var E=L.value,j=p.points[E];j.zoom<=t||(j.zoom=t,n.push(j))}}catch(A){I.e(A)}finally{I.f()}}}}return n}},{key:"_getOriginId",value:function(e){return e-this.points.length>>5}},{key:"_getOriginZoom",value:function(e){return(e-this.points.length)%32}},{key:"_map",value:function(e,t){if(e.numPoints)return t?en({},e.properties):e.properties;var n=this.points[e.index].properties,r=this.options.map(n);return t&&r===n?en({},r):r}}]),e}();function $t(e,t,n,r,o){return{x:Ut(e),y:Ut(t),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:o}}function Yt(e,t){var n=Y(e.geometry.coordinates,2),r=n[0],o=n[1];return{x:Ut(Qt(r)),y:Ut(Xt(o)),zoom:1/0,index:t,parentId:-1}}function qt(e){return{type:"Feature",id:e.id,properties:Kt(e),geometry:{type:"Point",coordinates:[(t=e.x,360*(t-.5)),Jt(e.y)]}};var t}function Kt(e){var t=e.numPoints,n=t>=1e4?"".concat(Math.round(t/1e3),"k"):t>=1e3?"".concat(Math.round(t/100)/10,"k"):t;return en(en({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function Qt(e){return e/360+.5}function Xt(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Jt(e){var t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function en(e,t){for(var n in t)e[n]=t[n];return e}function tn(e){return e.x}function nn(e){return e.y}var rn=Object.prototype.hasOwnProperty;function on(e,t,n){var r,o=$(e.keys());try{for(o.s();!(r=o.n()).done;)if(an(n=r.value,t))return n}catch(i){o.e(i)}finally{o.f()}}function an(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&an(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;var i,a=$(e);try{for(a.s();!(i=a.n()).done;){if((o=r=i.value)&&"object"===W(o)&&!(o=on(t,o)))return!1;if(!t.has(o))return!1}}catch(s){a.e(s)}finally{a.f()}return!0}if(n===Map){if(e.size!==t.size)return!1;var l,c=$(e);try{for(c.s();!(l=c.n()).done;){if((o=(r=l.value)[0])&&"object"===W(o)&&!(o=on(t,o)))return!1;if(!an(r[1],t.get(o)))return!1}}catch(s){c.e(s)}finally{c.f()}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"===W(e)){for(n in r=0,e){if(rn.call(e,n)&&++r&&!rn.call(t,n))return!1;if(!(n in t)||!an(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function ln(e,t){return xe.exports.useEffect(e,(n=t,r=xe.exports.useRef(n),o=xe.exports.useRef(0),an(n,r.current)||(r.current=n,o.current+=1),xe.exports.useMemo((function(){return r.current}),[o.current])));var n,r,o}var cn=Ie(Ee.div)(e||(e=D(["\n border-radius: 50%;\n background: linear-gradient(\n to top,\n ",",\n ","\n );\n color: ",";\n height: ","px;\n width: ","px;\n display: flex;\n justify-content: center;\n align-items: center;\n line-height: 1;\n font-family: ",";\n font-size: ","px;\n border: 2px solid #fff;\n box-shadow: ",";\n cursor: default;\n"])),je["--ll-color-primary-variant1"],je["--ll-color-primary"],je["--ll-color-on-primary"],(function(e){return e.diameter}),(function(e){return e.diameter}),je["--ll-font-family"],(function(e){return e.diameter/2.5}),je["--ll-shadow-small"]),sn=Ie.ul(t||(t=D(["\n list-style: none;\n padding: 0;\n margin: 0;\n"]))),un=Ie.li(n||(n=D(["\n font-family: ",";\n padding: ",";\n background-color: ",";\n border-radius: ",";\n border: 1px solid ",";\n cursor: default;\n\n &:not(:last-child) {\n margin-bottom: ",";\n }\n\n &:hover {\n background-color: ",";\n }\n"])),je["--ll-font-family"],je["--ll-spacing-x-small"],je["--ll-color-background"],je["--ll-border-radius-small"],je["--ll-color-border"],je["--ll-spacing-xx-small"],je["--ll-color-surface"]),dn=function(e){var t=e.poi,n=e.poiType,r=e.rect,o=e.activePOI,i=e.hoveredPOI,a=e.isMapMoving,l=e.setActivePOI,c=e.isMobile,s=o===t,u=i===t;return Ce(ne,{latitude:t.lat,longitude:t.lng,style:{zIndex:s?1:0},children:Ae(_e.Root,{options:{type:n,poi:t,isOpen:!a&&s,isHovered:u,side:"top",size:["rapid_transit_stations"].includes(n)?"medium":"small",collisionPadding:c?{top:r.height+32,bottom:2*ze,left:2*ze,right:2*ze}:{left:r.width+32,right:2*ze,top:2*ze,bottom:2*ze}},onChange:function(e){"open-change"===e.type&&(e.data?setTimeout((function(){l(t)}),0):s&&l(void 0))},children:[Ce(_e.Marker,{}),Ce(_e.Content,{})]})})},pn={default:{scale:1},hovered:{scale:1.2}},fn=function(e){var t=e.cluster,n=e.supercluster,r=e.pointsCount,o=e.onClick,i=e.zoom,a=e.activePOI,l=e.hoveredPOI,c=e.setActivePOI,s=e.rect,u=e.isMobile,d=e.isMapMoving,p=Y(xe.exports.useState(!1),2),f=p[0],h=p[1],v=20+t.properties.point_count/r*25,m=xe.exports.useMemo((function(){return null==n?void 0:n.getChildren(t.id).map((function(e){return e.properties})).filter((function(e){return!!e}))}),[n,t]),g=null==m?void 0:m.find((function(e){return!!a&&e.poi===a}));return g?Ce(dn,{rect:s,poi:g.poi,poiType:g.type,isMobile:u,activePOI:a,hoveredPOI:l,isMapMoving:d,setActivePOI:c}):Ae(Te.Root,{open:!d&&f,onOpenChange:function(e){i<=17||h(e)},children:[Ce(Te.Trigger,{children:Ce(cn,{diameter:v,onClick:function(){i>17?h(!0):o&&o(t)},variants:pn,animate:f?"hovered":"default",whileHover:{scale:1.2},transition:we.transitions.default,children:t.properties.point_count})}),Ce(Te.Content,{side:"top",children:Ce(sn,{children:null==m?void 0:m.map((function(e,t){var n;return Ce(un,{onClick:function(){return c(e.poi)},children:null===(n=e.poi)||void 0===n?void 0:n.name},t)}))})})]})};var hn=be.memo((function(e){var t,n=e.rect,r=e.zoom,o=e.mapRef,i=e.points,a=e.isMobile,l=e.activePOI,c=e.hoveredPOI,s=e.isMapMoving,u=e.setActivePOI,d=null==o||null===(t=o.current)||void 0===t?void 0:t.getMap().getBounds().toArray().flat(),p=function(e){var t=e.points,n=e.bounds,r=e.zoom,o=e.options,i=xe.exports.useRef(),a=xe.exports.useRef(),l=xe.exports.useState([]),c=l[0],s=l[1],u=Math.round(r);return ln((function(){i.current&&an(a.current,t)&&an(i.current.options,o)||(i.current=new Wt(o),i.current.load(t)),n&&s(i.current.getClusters(n,u)),a.current=t}),[t,n,u,o]),{clusters:c,supercluster:i.current}}({points:i,bounds:d,zoom:r,options:{radius:50,maxZoom:30}}),f=p.clusters,h=p.supercluster;return Ce(Re,{children:f.map((function(e,t){var d=Y(e.geometry.coordinates,2),p=d[0],f=d[1];return function(e){return void 0!==e.properties.cluster}(e)?Ce(ne,{latitude:f,longitude:p,children:Ce(fn,{rect:n,zoom:r,cluster:e,supercluster:h,pointsCount:i.length,activePOI:l,setActivePOI:u,isMobile:a,isMapMoving:s,hoveredPOI:c,onClick:function(){var t,n=Math.min(h.getClusterExpansionZoom(e.id),20);null===(t=o.current)||void 0===t||t.flyTo({zoom:n,center:[p,f],duration:1e3,essential:!0})}})},"cluster-".concat(e.id)):Ce(dn,{rect:n,poi:e.properties.poi,poiType:e.properties.type,isMobile:a,activePOI:l,hoveredPOI:c,isMapMoving:s,setActivePOI:u},t)}))})}));hn.displayName="Markers";var vn=function(e){return xe.exports.createElement("svg",X({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),xe.exports.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z"}))},mn=function(e){return xe.exports.createElement("svg",X({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),xe.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}))};function gn(e){var t=Pe().client,n=Oe().sdkState,r=ke(n.options,250),o=X(X({},xe.exports.useMemo((function(){return!(null==r||!r.marker)?r.marker:{lat:null==r?void 0:r.lat,lng:null==r?void 0:r.lng}}),[r])),{},{geographyLevels:["20","30"],locationScoresRounding:!1,include:e});return Q(re.list(o),U(H().mark((function e(){return H().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getScores(o));case 1:case"end":return e.stop()}}),e)}))),{enabled:!!o})}var yn=Ie.div(r||(r=D(["\n padding: "," ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n overflow: hidden;\n flex: 1;\n"])),je["--ll-spacing-small"],je["--ll-spacing-medium"],je["--ll-color-surface"]),bn=Ie.div(o||(o=D(["\n display: grid;\n grid-template-columns: min-content 1fr;\n grid-gap: ",";\n margin-bottom: ",";\n"])),je["--ll-spacing-medium"],je["--ll-spacing-medium"]),xn=function(){var e,t,n=Oe().sdkState,r=et(),o=r.activeCategory,i=r.activeScore,a=gn(Me.find((function(e){return e.value===o})).scores),l=a.data,c=a.isLoading;return i&&null!=l&&l.location[i]?c?Ce("div",{children:"Loading"}):Ce(Ne.Root,{options:{score:i,scoresData:l},children:Ae(yn,{children:[Ae(bn,{children:[Ce(Ne.Badge,{}),Ce(Ne.BarChart,{options:{locationIcon:"pin"===(null===(e=n.options)||void 0===e||null===(t=e.marker)||void 0===t?void 0:t.icon)?vn:mn}})]}),Ce(Ne.Description,{})]})}):null},wn=Ie.div(i||(i=D(["\n display: flex;\n overflow-x: scroll;\n padding: "," ",";\n flex-shrink: 0;\n position: relative;\n"])),je["--ll-spacing-x-small"],je["--ll-spacing-medium"]),Cn=Ie.button(a||(a=D(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n background: none;\n border: none;\n min-width: 60px;\n padding: 0;\n margin: 0 8px;\n flex-shrink: 0;\n\n &:first-child {\n margin-left: 0;\n }\n\n &:last-child {\n margin-right: 0;\n }\n"]))),Mn=Ie.div(l||(l=D(["\n position: absolute;\n top: -6px;\n right: 4px;\n border: 2px solid ",";\n border-radius: 6px;\n"])),je["--ll-color-background"]),Sn=Ie.div(c||(c=D(["\n flex: 1;\n display: flex;\n align-items: center;\n"]))),Pn=Ie.div(s||(s=D(["\n margin: 0 2px;\n"]))),On=function(e){var t=e.category,n=gn(t.scores),r=n.data,o=n.isLoading,i=n.isFetching,a=et(),l=a.activeScore,c=a.setActiveScore,s=a.setActiveCategory;return Ce(wn,{children:t.scores.map((function(e){var n=e===l,a=n?"--ll-color-primary":"--ll-color-disabled";return o||i?Ce(Pn,{children:Ce(Ze,{height:"44px",width:"60px"})},e):Ce(Ne.Root,{options:{score:e,scoresData:r},children:Ae(Cn,{onClick:function(){s(t.value),c(e)},children:[Ce(Ne.Icon,{options:{color:a,height:28,width:28}}),Ce(Sn,{children:Ce(Ne.Title,{options:{variant:"caption1",color:a,noWrap:!0,noMargin:!0,weight:"--ll-font-weight-bold"}})}),Ce(Mn,{children:Ce(Ne.Badge,{options:{variant:"small",isPrimary:n}})})]})},e)}))})},kn=Ie.div(u||(u=D(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),je["--ll-spacing-x-small"],je["--ll-spacing-medium"],je["--ll-spacing-xx-small"],je["--ll-spacing-medium"]),Ln=Ie.div(d||(d=D(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n z-index: 3;\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),je["--ll-color-background"],je["--ll-color-border"]),In=be.forwardRef((function(e,t){var n=et(),r=n.activeCategory,o=n.setActiveCategory;return Ae(Ln,{ref:t,children:[Ce(kn,{children:Ae(De.Root,{value:r,onValueChange:function(e){return o(e)},children:[Ce(De.Trigger,{size:"large",children:Ce(Ge.Root,{options:{scoreCategory:r},children:Ce(Ge.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},r)}),Ce(De.Content,{children:Me.map((function(e){return Ce(Ge.Root,{options:{scoreCategory:e.value},children:Ce(De.Item,{value:e.value,children:Ce(Ge.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},e.value)}))})]})}),Ce(On,{category:Me.find((function(e){return e.value===r}))}),Ce(xn,{})]})}));In.displayName="MobileScores";var En=Ve({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),jn=Ve({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),An=Ie(oe)(p||(p=D(["\n margin: 0;\n z-index: 1;\n position: relative;\n margin: 0 calc(-1 * ",");\n padding: 0 ",";\n\n &:hover {\n background-color: ",";\n box-shadow: ",";\n }\n"])),je["--ll-spacing-medium"],je["--ll-spacing-medium"],je["--ll-color-surface"],je["--ll-shadow-small"]),_n=Ie(ie)(f||(f=D(["\n background: none;\n border: none;\n display: flex;\n align-items: center;\n width: 100%;\n padding: "," 0;\n"])),je["--ll-spacing-x-small"]),zn=Ie(ae)(h||(h=D(["\n background-color: ",";\n position: relative;\n overflow: hidden;\n margin-left: calc(-1 * ",");\n margin-right: calc(-1 * ",');\n\n [data-state="open"] & {\n animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n\n [data-state="closed"] & {\n animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n"])),je["--ll-color-surface"],je["--ll-spacing-medium"],je["--ll-spacing-medium"],En,jn),Tn=Ie.div(v||(v=D(["\n padding: ",";\n border-top: 1px solid ",";\n border-bottom: 1px solid ",";\n"])),je["--ll-spacing-medium"],je["--ll-color-border"],je["--ll-color-border"]),Rn=Ie.span(m||(m=D(["\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),_n);Ie.div(g||(g=D(["\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n"])));var Nn=Ie.div(y||(y=D(["\n margin: "," 0;\n"])),je["--ll-spacing-small"]),Zn=Ie.div(b||(b=D(["\n margin-top: ",";\n &:empty {\n margin: 0;\n }\n"])),je["--ll-spacing-large"]),Dn=function(e){var t=e.score,n=jt(),r=n.data,o=n.isLoading,i=et(),a=i.activePOI,l=i.setActivePOI,c=i.hoveredPOI,s=i.setHoveredPOI,u=_t(),d=u.mapRef,p=u.mapPadding;return o?Ce(Re,{children:Z(Array(10)).map((function(e,t){return Ce(Nn,{children:Ce(Ze,{height:"34px",width:"100%"})},t)}))}):r?Ce(Fe.Root,{options:{type:"school",data:null==r?void 0:r[t],activePOI:a,hoveredPOI:c},onChange:function(e){if("poi-click"===e.type){var t=e.data;l(t);var n,r=window.innerWidth-p.left,o=window.innerWidth/2,i=r/2+p.left-o;if(t)null===(n=d.current)||void 0===n||n.easeTo({zoom:18,center:[t.lng,t.lat],duration:1e3,offset:[i,0]})}"poi-hover"===e.type&&s(e.data)}}):null},Gn=be.memo((function(e){var t=e.result,n=e.poi,r=et(),o=r.activePOI,i=r.setActivePOI,a=r.hoveredPOI,l=r.setHoveredPOI,c=_t(),s=c.mapRef,u=c.mapPadding;return t.data&&t.data[n]?Ce(He.Content,{options:{value:n},children:Ce(Fe.Root,{options:{type:"poi",data:t.data[n],activePOI:o,hoveredPOI:a},onChange:function(e){if("poi-click"===e.type){var t=e.data;i(t);var n,r=window.innerWidth-u.left,o=window.innerWidth/2,a=r/2+u.left-o;if(t)null===(n=s.current)||void 0===n||n.flyTo({zoom:18,center:[t.lng,t.lat],duration:1e3,offset:[a,0],essential:!0})}"poi-hover"===e.type&&l(e.data)}})},n):null}));Gn.displayName="POI";var Vn=be.memo((function(e){var t=e.include,n=Et(),r=null==t?void 0:t.filter((function(e){var t;return((null==n||null===(t=n.data)||void 0===t?void 0:t[e])||[]).length>0}));return n.isLoading&&r.length?Ce(Re,{children:Z(Array(10)).map((function(e,t){return Ce(Nn,{children:Ce(Ze,{height:"34px",width:"100%"})},t)}))}):n.data?Ae(He.Root,{options:{include:r},children:[Ce(He.Tabs,{}),r.map((function(e){return Ce(Gn,{poi:e,result:n},e)}))]}):null}));Vn.displayName="POIs";var Fn=be.memo((function(e){var t,n,r=e.score,o=e.isLoading,i=e.scoresData,a=Oe().sdkState,l=r===et().activeScore;return o?Ce(Nn,{children:Ce(Ze,{height:"34px",width:"100%"},r)}):null!=i&&i.location[r]?Ce(le,{value:r,children:Ae(Ne.Root,{options:{score:r,scoresData:i},children:[Ce(An,{children:Ae(_n,{children:[Ce(Rn,{children:Ce(Be,{SVGElement:ce,fill:je["--ll-color-on-background-variant1"]})}),Ce(Ue,{spacing:"--ll-spacing-small"}),Ce(Ne.Icon,{}),Ce(Ue,{spacing:"--ll-spacing-small"}),Ce(Ne.Title,{}),Ce(Ue,{}),Ce(Ne.Badge,{options:{isPrimary:l}})]})}),Ce(zn,{children:Ae(Tn,{children:[Ce(Ne.Description,{}),Ce(Ue,{vertical:!0,spacing:"--ll-spacing-small"}),Ce(Ne.BarChart,{options:{locationIcon:"pin"===(null===(t=a.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.icon)?vn:mn}}),Ce(Zn,{children:"high_schools"===r||"primary_schools"===r?Ce(Dn,{score:r}):Ce(Vn,{include:Le[r]})})]})})]})},r):null}));Fn.displayName="Score";var Hn=Ie.div(x||(x=D(["\n padding: "," ",";\n"])),je["--ll-spacing-small"],je["--ll-spacing-medium"]),Bn=Ie.div(w||(w=D(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"]))),Un=be.memo((function(e){var t=e.tabContent,n=gn(t.scores),r=n.data,o=n.isLoading,i=n.isFetching,a=We().translations;return Ae(Hn,{children:[Ae(Bn,{children:[Ce($e.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),i&&!o&&Ce(Ye,{size:"small"})]}),Ce(Ue,{spacing:"--ll-spacing-small",vertical:!0}),!i&&!Object.keys((null==r?void 0:r.location)||{}).length&&Ce(qe,{color:"--ll-color-on-background-variant1",children:a.EMPTY_TEXT}),t.scores.map((function(e){return Ce(Fn,{score:e,isLoading:o,scoresData:r},e)}))]})}));Un.displayName="ScoreCategory";var Wn=be.memo((function(e){var t=e.tabContent,n=et(),r=n.activeScore,o=n.setActiveScore;return xe.exports.useEffect((function(){o(t.scores[0])}),[]),Ce(se,{value:r,onValueChange:function(e){o(e)},type:"single",collapsible:!0,children:Ce(Un,{tabContent:t})})}));Wn.displayName="ScoreCategoryAccordion";var $n=Ie.div(C||(C=D(["\n overflow-y: auto;\n"]))),Yn=Ie.div(M||(M=D(["\n position: absolute;\n top: ",";\n left: ",";\n width: 360px;\n max-height: calc(100% - 2 * ",");\n z-index: 1;\n border-radius: ",";\n box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;\n background-color: #fff;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n background-color: ",";\n border: 1px solid ",";\n"])),je["--ll-spacing-medium"],je["--ll-spacing-medium"],je["--ll-spacing-medium"],je["--ll-border-radius-medium"],je["--ll-color-background"],je["--ll-color-border"]);Ie.div(S||(S=D(["\n display: flex;\n justify-content: center;\n padding: ",";\n"])),je["--ll-spacing-small"]);var qn=Ie.div(P||(P=D(["\n padding: ",";\n border-bottom: 1px solid ",";\n"])),je["--ll-spacing-xx-small"],je["--ll-color-border"]),Kn=Ie.div(O||(O=D(["\n display: flex;\n justify-content: center;\n padding: ",";\n background-color: ",";\n"])),je["--ll-spacing-small"],je["--ll-color-background"]),Qn=function(){return Ce(Kn,{children:Ce(Ke.Root,{})})},Xn=be.forwardRef((function(e,t){var n=et(),r=n.activeCategory,o=n.setActiveCategory;return Ce($e.Root,{options:{currentTab:r},onChange:function(e){o(e.data)},children:Ae(Yn,{ref:t,children:[Ce(qn,{children:Ce($e.Tabs,{})}),Ce($n,{children:Me.map((function(e){return Ce($e.Content,{options:{value:e.value},children:Ce(Wn,{tabContent:e},e.value)},e.value)}))}),Ce(Qn,{})]})})}));Xn.displayName="DesktopScores";var Jn=Ie.div(k||(k=D(["\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100vh;\n"]))),er=function(e){return xe.exports.createElement("svg",X({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),xe.exports.createElement("path",{d:"M22.4275 10.5938L13.4175 1.58383C12.6675 0.833834 11.3475 0.823834 10.5875 1.58383L1.58745 10.5838C0.807453 11.3638 0.807453 12.6238 1.58745 13.4038L10.5875 22.4038C10.9775 22.7938 11.4875 22.9838 11.9975 22.9838C12.5075 22.9838 13.0175 22.7938 13.4075 22.4038L22.3975 13.4138C23.1875 12.6538 23.1975 11.3938 22.4275 10.5938ZM12.0075 20.9938L3.00745 11.9938L12.0075 2.99383L21.0075 11.9938L12.0075 20.9938ZM7.99745 11.0038V15.0038H9.99745V12.0038H13.9975V14.5038L17.4975 11.0038L13.9975 7.50383V10.0038H8.99745C8.44745 10.0038 7.99745 10.4538 7.99745 11.0038Z"}))},tr=function(e){return xe.exports.createElement("svg",X({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),xe.exports.createElement("path",{d:"M18.92 6.01C18.72 5.42 18.16 5 17.5 5H6.5C5.84 5 5.29 5.42 5.08 6.01L3 12V20C3 20.55 3.45 21 4 21H5C5.55 21 6 20.55 6 20V19H18V20C18 20.55 18.45 21 19 21H20C20.55 21 21 20.55 21 20V12L18.92 6.01ZM6.85 7H17.14L18.22 10.11H5.77L6.85 7ZM19 17H5V12H19V17Z"}),xe.exports.createElement("path",{d:"M7.5 16C8.32843 16 9 15.3284 9 14.5C9 13.6716 8.32843 13 7.5 13C6.67157 13 6 13.6716 6 14.5C6 15.3284 6.67157 16 7.5 16Z"}),xe.exports.createElement("path",{d:"M16.5 16C17.3284 16 18 15.3284 18 14.5C18 13.6716 17.3284 13 16.5 13C15.6716 13 15 13.6716 15 14.5C15 15.3284 15.6716 16 16.5 16Z"}))},nr=function(e){return xe.exports.createElement("svg",X({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),xe.exports.createElement("path",{d:"M13.5 5.5C14.6 5.5 15.5 4.6 15.5 3.5C15.5 2.4 14.6 1.5 13.5 1.5C12.4 1.5 11.5 2.4 11.5 3.5C11.5 4.6 12.4 5.5 13.5 5.5ZM9.8 8.9L7 23H9.1L10.9 15L13 17V23H15V15.5L12.9 13.5L13.5 10.5C14.8 12 16.8 13 19 13V11C17.1 11 15.5 10 14.7 8.6L13.7 7C13.14 6.11 12.02 5.75 11.05 6.16L6 8.3V13H8V9.6L9.8 8.9Z"}))},rr=function(e){return xe.exports.createElement("svg",X({viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),xe.exports.createElement("path",{d:"M12,2C6.47,2,2,6.47,2,12s4.47,10,10,10s10-4.47,10-10S17.53,2,12,2z M17,15.59L15.59,17L12,13.41L8.41,17L7,15.59 L10.59,12L7,8.41L8.41,7L12,10.59L15.59,7L17,8.41L13.41,12L17,15.59z"}))},or={all:function(){return["commute-calc"]},list:function(e){return[].concat(Z(or.all()),[e])}};var ir=function(e,t,n){return 1===t?e:null!=n?n:"".concat(e,"s")},ar=[62,-1,-1,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,63,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],lr="undefined"!=typeof BigInt?BigInt:Number;function cr(e){var t=lr(0),n=lr(0),r=[];if(e.split("").forEach((function(e){var o=lr(function(e){var t=e.charCodeAt(0);return ar[t-45]}(e));t|=(o&lr(31))<<n,(o&lr(32))===lr(0)?(r.push(t),t=lr(0),n=lr(0)):n+=lr(5)})),n>0)throw new Error("Invalid encoding");return r}function sr(e){var t=e;return t&lr(1)&&(t=~t),+(t>>=lr(1)).toString()}function ur(e){for(var t=cr(e),n=function(e,t){if(1!=+e.toString())throw new Error("Invalid format version");var n=+t.toString();return{precision:15&n,thirdDim:n>>4&7,thirdDimPrecision:n>>7&15}}(t[0],t[1]),r=Math.pow(10,n.precision),o=Math.pow(10,n.thirdDimPrecision),i=n.thirdDim,a=0,l=0,c=0,s=[],u=2;u<t.length;){if(a+=sr(t[u])/r,l+=sr(t[u+1])/r,i)c+=sr(t[u+2])/o,s.push([l,a,c]),u+=3;else s.push([l,a]),u+=2}if(u!==t.length)throw new Error("Invalid encoding. Premature ending reached");return{type:"FeatureCollection",features:[{id:"route",type:"Feature",geometry:{type:"LineString",coordinates:s}}]}}var dr=Ie.div(L||(L=D(["\n max-height: calc(100% - 2 * ",");\n border-radius: ",";\n box-shadow: ",";\n background-color: ",";\n border: 1px solid ",";\n padding: ",";\n"])),je["--ll-spacing-medium"],je["--ll-border-radius-medium"],je["--ll-shadow-small"],je["--ll-color-background"],je["--ll-color-border"],je["--ll-spacing-x-small"]),pr=Ie.div(I||(I=D(["\n display: flex;\n justify-content: space-between;\n align-items: end;\n\n "," {\n width: 229px;\n margin-right: ",";\n }\n"])),ue,je["--ll-spacing-x-small"]),fr=Ie.div(E||(E=D(["\n background-color: ",";\n padding: "," "," 0;\n border-radius: ",";\n"])),je["--ll-color-surface"],je["--ll-spacing-x-small"],je["--ll-spacing-small"],je["--ll-border-radius-medium"]),hr=Ie(Xe)(j||(j=D(["\n position: absolute;\n right: ",";\n top: ",";\n"])),je["--ll-spacing-xx-small"],je["--ll-spacing-xx-small"]),vr=function(e){var t,n,r,o,i=e.className,a=e.onClose,l=Oe().sdkState,c=et(),s=c.setCommuteGeojson,u=c.destination,d=c.setDestination,p=Y(xe.exports.useState("pedestrian"),2),f=p[0],h=p[1],v=It(),m=We().translations,g=function(e){var t=e.transportMode,n=e.origin,r=e.destination,o={return:"polyline,summary,typicalDuration",transportMode:t,origin:n,destination:"".concat(null==r?void 0:r.lat,",").concat(null==r?void 0:r.lng),apiKey:"KDL0aAzsbOcv7p53P2ovno2izfDOe93hyzZRrayktbE"};return Q(or.list(o),(function(){return fetch("https://router.hereapi.com/v8/routes?"+new URLSearchParams(o)).then((function(e){return e.json()})).then((function(e){return e.routes.length>0&&e.routes[0].sections.length>0?e.routes[0].sections[0]:[]})).catch((function(e){Qe(e)}))}),{enabled:!!o&&!!r&&!!n})}({destination:u,transportMode:f,origin:"".concat(null==l||null===(t=l.options)||void 0===t||null===(n=t.marker)||void 0===n?void 0:n.lat,",").concat(null==l||null===(r=l.options)||void 0===r||null===(o=r.marker)||void 0===o?void 0:o.lng)}),y=g.data,b=g.isFetching,x=g.isFetched;xe.exports.useEffect((function(){null!=y&&y.summary&&s(ur(y.polyline))}),[y]);var w={pedestrian:[m.WALKING,nr],car:[m.DRIVING,tr]},C=xe.exports.useMemo((function(){if(null==y||!y.summary)return null;var e=Math.floor(y.summary.typicalDuration/60/60),t=Math.floor(y.summary.typicalDuration/60%60);return 0===e?"".concat(t," ").concat(ir(m.MINUTE,t)):"".concat(e," ").concat(ir(m.HOUR,e)," ").concat(t," ").concat(ir(m.MINUTE,t))}),[y]),M=xe.exports.useMemo((function(){if(null==y||!y.summary)return null;var e=Math.floor(y.summary.length/1e3);return 0===e?"".concat(y.summary.length," m"):"".concat(e," km")}),[y]);return Ae(dr,{className:i,children:[Ce(hr,{size:"medium",color:"neutral",onClick:a,SVGElement:rr}),Ae(pr,{children:[Ce(de,{label:m.CALCULATE_COMMUTE,placeholder:m.SEARCH_MAP,renderListAbove:v,renderListAbovePosition:30,onSearch:function(e){d({lat:e.latitude,lng:e.longitude})}}),Ce(De.Root,{value:f,onValueChange:function(e){h(e)},children:Ae(De.Trigger,{children:[Ce(Be,{SVGElement:w[f][1],fill:je["--ll-color-on-background-variant1"],width:16}),w[f][0],Ae(De.Content,{children:[Ce(De.Item,{value:"car",children:m.DRIVING}),Ce(De.Item,{value:"pedestrian",children:m.WALKING})]})]})})]}),(x||b)&&Ae(Re,{children:[Ce(Ue,{vertical:!0,spacing:"--ll-spacing-x-small"}),Ce(pe,{open:!!y,children:b?Ce(Ze,{height:"70.4px",width:"100%"}):null!=y&&y.summary?Ae(fr,{children:[Ce(qe,{variant:"h5",children:C}),Ae(qe,{children:[M," – ",m.FAST_ROUTE]})]}):Ae(fr,{children:[Ce(qe,{variant:"h5",children:m.NO_ROUTE}),Ce(qe,{children:m.TRY_SUGGESTION})]})})]})]})},mr=Ie.div(A||(A=D(["\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 3;\n"]))),gr=Ie.div(_||(_=D(["\n position: absolute;\n top: ",";\n right: ",";\n z-index: 3;\n max-width: 356px;\n"])),je["--ll-spacing-medium"],je["--ll-spacing-medium"]),yr=Ie(Xe)(z||(z=D(["\n box-shadow: ",";\n position: absolute;\n bottom: ",";\n right: ",";\n"])),je["--ll-shadow-medium"],je["--ll-spacing-medium"],je["--ll-spacing-medium"]),br=Ie(vr)(T||(T=D([""]))),xr=Ie(vr)(R||(R=D(["\n border-radius: ","\n "," 0 0;\n border: 0;\n"])),je["--ll-border-radius-small"],je["--ll-border-radius-small"]),wr=Ie(Je)(N||(N=D(["\n box-shadow: ",";\n"])),je["--ll-shadow-small"]),Cr=function(){var e=et(),t=e.setCommuteGeojson,n=e.setDestination,r=Y(xe.exports.useState(!1),2),o=r[0],i=r[1],a=We().translations,l=function(){n(void 0),t(void 0),i(!1)},c=function(){i(!0)};return It()?Ce(Re,{children:o?Ce(mr,{children:Ce(xr,{onClose:l})}):Ce(yr,{size:"large",SVGElement:er,onClick:c})}):Ce(gr,{children:o?Ce(br,{onClose:l}):Ce(wr,{onClick:c,startAdornment:Ce(er,{}),children:a.CALCULATE_COMMUTE})})},Mr=function(){var e,t,n,r=Oe(),o=r.sdkState,i=r.setSdkState,a=et(),l=a.activeScore,c=a.activePOI,s=a.setActivePOI,u=a.hoveredPOI,d=a.commuteGeojson,p=a.destination,f=It(),h=Et(),v=jt(),m="night"===(null==o||null===(e=o.globalOptions)||void 0===e||null===(t=e.appearance)||void 0===t?void 0:t.theme)?"dd191599-2a92-49fc-9a33-e12391753ad5":"600d69cb-288d-445e-9839-3dfe4d76b31a",g=Y(xe.exports.useState(!1),2),y=g[0],b=g[1],x=xe.exports.useMemo((function(){var e,t;return"high_schools"!==l&&"primary_schools"!==l||v.isFetching?Le&&l&&Le[l]&&null!==(e=Le[l])&&void 0!==e&&e.length||h.isFetching?h.data:J({},l,[]):J({},l,(null==v||null===(t=v.data)||void 0===t?void 0:t[l])||[])}),[h.data,v.data,l]),w=xe.exports.useMemo((function(){return x?Object.entries(x).map((function(e){var t=Y(e,2),n=t[0];return t[1].map((function(e){return st([e.lng,e.lat],{poi:e,type:n})}))})).flat().filter((function(e,t,n){return n.findIndex((function(t){return["lat","lng","name"].every((function(n){return t.properties.poi[n]===e.properties.poi[n]}))}))===t})):[]}),[x]),C=xe.exports.useMemo((function(){var e,t,n,r=(null==o||null===(e=o.options)||void 0===e?void 0:e.marker)&&st([null==o||null===(t=o.options)||void 0===t?void 0:t.marker.lng,null==o||null===(n=o.options)||void 0===n?void 0:n.marker.lat]);return[].concat(Z(w),Z(r?[r]:[]),Z(p?[st([null==p?void 0:p.lng,null==p?void 0:p.lat])]:[]))}),[w,null==o||null===(n=o.options)||void 0===n?void 0:n.marker,p]),M=xe.exports.useRef(),S=Y(fe(),2),P=S[0],O=S[1],k=xe.exports.useMemo((function(){return{top:25+O.height,bottom:25,left:25,right:25}}),[O.height]),L=xe.exports.useMemo((function(){return{top:50,bottom:50,left:O.width+32+50,right:50}}),[O.width]),I=f?k:L;return xe.exports.useEffect((function(){var e,t;if(C.length&&null!==(e=o.options)&&void 0!==e&&e.marker){var n,r,i,a=Y(pt((n=C.map((function(e){var t=e.geometry;return[t.coordinates[1],t.coordinates[0]]})),void 0===i&&(i={}),ct({type:"MultiPoint",coordinates:n},r,i))),4),l=a[0],c=a[1],s=a[2],u=a[3];null==M||null===(t=M.current)||void 0===t||t.fitBounds([[c,l],[u,s]],{maxZoom:17,padding:I,duration:1e3})}}),[C,I]),o.options?Ce(zt,{mapRef:M,mapPadding:I,children:Ae(Jn,{children:[Ae(he,{ref:M,mapLib:ve,latitude:o.options.lat,longitude:o.options.lng,zoom:o.options.zoom,pitch:o.options.pitch,bearing:o.options.bearing,style:{flex:1,width:"100vw"},mapStyle:"https://api.maptiler.com/maps/".concat(m,"/style.json?key=","9jNGatuzs05Q1oNlctEs"),onMove:function(e){i(X(X({},o),{},{options:X(X({},o.options),{},{lat:e.viewState.latitude,lng:e.viewState.longitude,zoom:e.viewState.zoom,bearing:e.viewState.bearing,pitch:e.viewState.pitch})}))},cooperativeGestures:o.options.cooperativeGestures,onMoveStart:function(){return b(!0)},onMoveEnd:function(){return b(!1)},attributionControl:!1,children:[Ce(me,{compact:!0,position:f?"bottom-left":"bottom-right"}),Ce(ge,{position:f?"top-right":"bottom-right",showCompass:!0,style:{marginTop:f?16+O.height:16,marginRight:16}}),o.options.marker&&Ce(ye,{marker:o.options.marker}),Ce(hn,{rect:O,zoom:o.options.zoom,mapRef:M,points:w,isMobile:f,activePOI:c,hoveredPOI:u,isMapMoving:y,setActivePOI:s}),Ce(f?In:Xn,{ref:P}),Ce(Cr,{}),p&&Ce(ye,{marker:X({icon:"pin"},p)}),d&&Ce(it,{type:"geojson",data:d,children:Ce(lt,X({},{id:"point",type:"line",paint:{"line-width":6,"line-color":"#0056D3"}}))})]}),f&&Ce(Qn,{})]})}):Ce("div",{children:"No options provided."})};V("default",(function(){return Ce(nt,{children:Ce(Mr,{})})}))}}}))}();
@@ -1,242 +0,0 @@
1
- import{M as Ge,d as ee,u as se,p as Ct,s as bt,a as Ue,b as wt,$ as Mt,c as $t,e as St,f as Lt,S as kt,g as Et,h as Pt,i as It,A as At,j as Tt,k as _t,m as Rt,l as Ot,N as zt,P as Ie}from"./index.593fd8da.js";import{R as O,r as h,Z as xe,j as c,l as Q,c as J,d as Ce,u as N,a as be,$ as W,s as x,m as jt,y as p,b as k,H as le,C as H,o as ce,F as Y,k as P,e as q,n as z,f as X,U as Fe,N as We,z as me,q as Ke,T as V,g as we,h as te,O as Dt,i as F,M as Zt,p as Nt,Q as Qe,A as Ht}from"./index.a71b3d5e.js";const Ye=O.createContext({}),I=()=>h.exports.useContext(Ye),Vt=(t,e)=>{switch(e.type){case"CATEGORY":return{...t,activeCategory:e.value};case"SCORE":{const n=Q.find(o=>e.value===""?o.value===t.activeCategory:o.scores.includes(e.value)).value;return{activeCategory:n,activeScoreByCategory:{...t.activeScoreByCategory,[n]:e.value}}}}},Bt=({children:t})=>{const e=window.innerWidth<xe.screenSizes.tablet?{activeCategory:"commute",activeScoreByCategory:{commute:"transit_friendly",amenities:"groceries",character:"quiet",nature:"parks",education:"primary_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},[n,o]=h.exports.useReducer(Vt,e),[r,i]=h.exports.useState(),[s,l]=h.exports.useState(),[a,d]=h.exports.useState(),[u,f]=h.exports.useState(),{activeCategory:m}=n,g=n.activeScoreByCategory[m],y=C=>{o({type:"SCORE",value:C})},b=C=>{o({type:"CATEGORY",value:C})},v=h.exports.useMemo(()=>({activeScore:g,setActiveScore:y,activeCategory:m,setActiveCategory:b,activePOI:r,setActivePOI:i,hoveredPOI:s,setHoveredPOI:l,commuteGeojson:a,setCommuteGeojson:d,destination:u,setDestination:f}),[g,y,m,b,r,i,s,l,a,d,u,f]);return c(Ye.Provider,{value:v,children:t})};function re(t,e){if(!t)throw new Error(e)}let Gt=0;function Ut(t,e,n){if(t.style&&t.style._loaded){const o={...n};return delete o.id,delete o.children,t.addSource(e,o),t.getSource(e)}return null}function Ft(t,e,n){re(e.id===n.id,"source id changed"),re(e.type===n.type,"source type changed");let o="",r=0;for(const s in e)s!=="children"&&s!=="id"&&!ee(n[s],e[s])&&(o=s,r++);if(!r)return;const i=e.type;if(i==="geojson")t.setData(e.data);else if(i==="image")t.updateImage({url:e.url,coordinates:e.coordinates});else if((i==="canvas"||i==="video")&&r===1&&o==="coordinates")t.setCoordinates(e.coordinates);else if(i==="vector"&&"setUrl"in t)switch(o){case"url":t.setUrl(e.url);break;case"tiles":t.setTiles(e.tiles);break}else console.warn(`Unable to update <Source> prop: ${o}`)}function Wt(t){const e=h.exports.useContext(Ge).map.getMap(),n=h.exports.useRef(t),[,o]=h.exports.useState(0),r=h.exports.useMemo(()=>t.id||`jsx-source-${Gt++}`,[]);h.exports.useEffect(()=>{if(e){const s=()=>o(l=>l+1);return e.on("styledata",s),s(),()=>{var l;if(e.off("styledata",s),e.style&&e.style._loaded&&e.getSource(r)){const a=(l=e.getStyle())===null||l===void 0?void 0:l.layers;if(a)for(const d of a)d.source===r&&e.removeLayer(d.id);e.removeSource(r)}}}},[e]);let i=e&&e.style&&e.getSource(r);return i?Ft(i,t,n.current):i=Ut(e,r,t),n.current=t,i&&h.exports.Children.map(t.children,s=>s&&h.exports.cloneElement(s,{source:r}))||null}function Kt(t,e,n,o){if(re(n.id===o.id,"layer id changed"),re(n.type===o.type,"layer type changed"),n.type==="custom"||o.type==="custom")return;const{layout:r={},paint:i={},filter:s,minzoom:l,maxzoom:a,beforeId:d}=n;if(d!==o.beforeId&&t.moveLayer(e,d),r!==o.layout){const u=o.layout||{};for(const f in r)ee(r[f],u[f])||t.setLayoutProperty(e,f,r[f]);for(const f in u)r.hasOwnProperty(f)||t.setLayoutProperty(e,f,void 0)}if(i!==o.paint){const u=o.paint||{};for(const f in i)ee(i[f],u[f])||t.setPaintProperty(e,f,i[f]);for(const f in u)i.hasOwnProperty(f)||t.setPaintProperty(e,f,void 0)}ee(s,o.filter)||t.setFilter(e,s),(l!==o.minzoom||a!==o.maxzoom)&&t.setLayerZoomRange(e,l,a)}function Qt(t,e,n){if(t.style&&t.style._loaded&&(!("source"in n)||t.getSource(n.source))){const o={...n,id:e};delete o.beforeId,t.addLayer(o,n.beforeId)}}let Yt=0;function qt(t){const e=h.exports.useContext(Ge).map.getMap(),n=h.exports.useRef(t),[,o]=h.exports.useState(0),r=h.exports.useMemo(()=>t.id||`jsx-layer-${Yt++}`,[]);if(h.exports.useEffect(()=>{if(e){const s=()=>o(l=>l+1);return e.on("styledata",s),s(),()=>{e.off("styledata",s),e.style&&e.style._loaded&&e.getLayer(r)&&e.removeLayer(r)}}},[e]),e&&e.style&&e.getLayer(r))try{Kt(e,r,t,n.current)}catch(s){console.warn(s)}else Qt(e,r,t);return n.current=t,null}function qe(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 ue(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(!Ae(t[0])||!Ae(t[1]))throw new Error("coordinates must contain numbers");var o={type:"Point",coordinates:t};return qe(o,e,n)}function Jt(t,e,n){n===void 0&&(n={});var o={type:"MultiPoint",coordinates:t};return qe(o,e,n)}function Ae(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function Je(t,e,n){if(t!==null)for(var o,r,i,s,l,a,d,u=0,f=0,m,g=t.type,y=g==="FeatureCollection",b=g==="Feature",v=y?t.features.length:1,C=0;C<v;C++){d=y?t.features[C].geometry:b?t.geometry:t,m=d?d.type==="GeometryCollection":!1,l=m?d.geometries.length:1;for(var S=0;S<l;S++){var M=0,$=0;if(s=m?d.geometries[S]:d,s!==null){a=s.coordinates;var w=s.type;switch(u=n&&(w==="Polygon"||w==="MultiPolygon")?1:0,w){case null:break;case"Point":if(e(a,f,C,M,$)===!1)return!1;f++,M++;break;case"LineString":case"MultiPoint":for(o=0;o<a.length;o++){if(e(a[o],f,C,M,$)===!1)return!1;f++,w==="MultiPoint"&&M++}w==="LineString"&&M++;break;case"Polygon":case"MultiLineString":for(o=0;o<a.length;o++){for(r=0;r<a[o].length-u;r++){if(e(a[o][r],f,C,M,$)===!1)return!1;f++}w==="MultiLineString"&&M++,w==="Polygon"&&$++}w==="Polygon"&&M++;break;case"MultiPolygon":for(o=0;o<a.length;o++){for($=0,r=0;r<a[o].length;r++){for(i=0;i<a[o][r].length-u;i++){if(e(a[o][r][i],f,C,M,$)===!1)return!1;f++}$++}M++}break;case"GeometryCollection":for(o=0;o<s.geometries.length;o++)if(Je(s.geometries[o],e,n)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ge(t){var e=[1/0,1/0,-1/0,-1/0];return Je(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}ge.default=ge;var Xt="Expected a function",Te=0/0,en="[object Symbol]",tn=/^\s+|\s+$/g,nn=/^[-+]0x[0-9a-f]+$/i,on=/^0b[01]+$/i,rn=/^0o[0-7]+$/i,sn=parseInt,an=typeof J=="object"&&J&&J.Object===Object&&J,ln=typeof self=="object"&&self&&self.Object===Object&&self,cn=an||ln||Function("return this")(),un=Object.prototype,dn=un.toString,fn=Math.max,pn=Math.min,de=function(){return cn.Date.now()};function hn(t,e,n){var o,r,i,s,l,a,d=0,u=!1,f=!1,m=!0;if(typeof t!="function")throw new TypeError(Xt);e=_e(e)||0,ye(n)&&(u=!!n.leading,f="maxWait"in n,i=f?fn(_e(n.maxWait)||0,e):i,m="trailing"in n?!!n.trailing:m);function g(L){var A=o,D=r;return o=r=void 0,d=L,s=t.apply(D,A),s}function y(L){return d=L,l=setTimeout(C,e),u?g(L):s}function b(L){var A=L-a,D=L-d,B=e-A;return f?pn(B,i-D):B}function v(L){var A=L-a,D=L-d;return a===void 0||A>=e||A<0||f&&D>=i}function C(){var L=de();if(v(L))return S(L);l=setTimeout(C,b(L))}function S(L){return l=void 0,m&&o?g(L):(o=r=void 0,s)}function M(){l!==void 0&&clearTimeout(l),d=0,o=a=r=l=void 0}function $(){return l===void 0?s:S(de())}function w(){var L=de(),A=v(L);if(o=arguments,r=this,a=L,A){if(l===void 0)return y(a);if(f)return l=setTimeout(C,e),g(a)}return l===void 0&&(l=setTimeout(C,e)),s}return w.cancel=M,w.flush=$,w}function ye(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function mn(t){return!!t&&typeof t=="object"}function gn(t){return typeof t=="symbol"||mn(t)&&dn.call(t)==en}function _e(t){if(typeof t=="number")return t;if(gn(t))return Te;if(ye(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ye(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(tn,"");var n=on.test(t);return n||rn.test(t)?sn(t.slice(2),n?2:8):nn.test(t)?Te:+t}var yn=hn;const Me=()=>{const[t,e]=h.exports.useState(!1);return h.exports.useLayoutEffect(()=>{const n=()=>{e(window.innerWidth<xe.screenSizes.tablet)};return window.addEventListener("resize",yn(n,250)),n(),()=>window.removeEventListener("resize",n)},[]),t};function Xe(){var l;const{client:t}=Ce(),{sdkState:e}=N(),n=be(e.options,250),{activeScore:o}=I(),r=o?W[o]:void 0,s={...h.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:r};return se(Ct.list(s),async()=>t.getPois(s),{enabled:!!s&&!!((l=s.include)!=null&&l.length)&&!!s.lat&&!!s.lng})}function et(){const{client:t}=Ce(),{sdkState:e}=N(),n=be(e.options,250),{activeScore:o}=I(),r=o==="high_schools"||o==="primary_schools",s={...h.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 se(bt.list(s),async()=>t.getSchools(s),{enabled:!!s&&!!s.lat&&!!s.lng&&r})}const tt=O.createContext({}),nt=()=>h.exports.useContext(tt),vn=({children:t,mapRef:e,mapPadding:n})=>c(tt.Provider,{value:{mapRef:e,mapPadding:n},children:t});function ve(t,e,n,o,r,i){if(r-o<=n)return;const s=o+r>>1;ot(t,e,s,o,r,i%2),ve(t,e,n,o,s-1,i+1),ve(t,e,n,s+1,r,i+1)}function ot(t,e,n,o,r,i){for(;r>o;){if(r-o>600){const d=r-o+1,u=n-o+1,f=Math.log(d),m=.5*Math.exp(2*f/3),g=.5*Math.sqrt(f*m*(d-m)/d)*(u-d/2<0?-1:1),y=Math.max(o,Math.floor(n-u*m/d+g)),b=Math.min(r,Math.floor(n+(d-u)*m/d+g));ot(t,e,n,y,b,i)}const s=e[2*n+i];let l=o,a=r;for(U(t,e,o,n),e[2*r+i]>s&&U(t,e,o,r);l<a;){for(U(t,e,l,a),l++,a--;e[2*l+i]<s;)l++;for(;e[2*a+i]>s;)a--}e[2*o+i]===s?U(t,e,o,a):(a++,U(t,e,a,r)),a<=n&&(o=a+1),n<=a&&(r=a-1)}}function U(t,e,n,o){fe(t,n,o),fe(e,2*n,2*o),fe(e,2*n+1,2*o+1)}function fe(t,e,n){const o=t[e];t[e]=t[n],t[n]=o}function xn(t,e,n,o,r,i,s){const l=[0,t.length-1,0],a=[];let d,u;for(;l.length;){const f=l.pop(),m=l.pop(),g=l.pop();if(m-g<=s){for(let v=g;v<=m;v++)d=e[2*v],u=e[2*v+1],d>=n&&d<=r&&u>=o&&u<=i&&a.push(t[v]);continue}const y=Math.floor((g+m)/2);d=e[2*y],u=e[2*y+1],d>=n&&d<=r&&u>=o&&u<=i&&a.push(t[y]);const b=(f+1)%2;(f===0?n<=d:o<=u)&&(l.push(g),l.push(y-1),l.push(b)),(f===0?r>=d:i>=u)&&(l.push(y+1),l.push(m),l.push(b))}return a}function Cn(t,e,n,o,r,i){const s=[0,t.length-1,0],l=[],a=r*r;for(;s.length;){const d=s.pop(),u=s.pop(),f=s.pop();if(u-f<=i){for(let v=f;v<=u;v++)Re(e[2*v],e[2*v+1],n,o)<=a&&l.push(t[v]);continue}const m=Math.floor((f+u)/2),g=e[2*m],y=e[2*m+1];Re(g,y,n,o)<=a&&l.push(t[m]);const b=(d+1)%2;(d===0?n-r<=g:o-r<=y)&&(s.push(f),s.push(m-1),s.push(b)),(d===0?n+r>=g:o+r>=y)&&(s.push(m+1),s.push(u),s.push(b))}return l}function Re(t,e,n,o){const r=t-n,i=e-o;return r*r+i*i}const bn=t=>t[0],wn=t=>t[1];class Oe{constructor(e,n=bn,o=wn,r=64,i=Float64Array){this.nodeSize=r,this.points=e;const s=e.length<65536?Uint16Array:Uint32Array,l=this.ids=new s(e.length),a=this.coords=new i(e.length*2);for(let d=0;d<e.length;d++)l[d]=d,a[2*d]=n(e[d]),a[2*d+1]=o(e[d]);ve(l,a,r,0,l.length-1,0)}range(e,n,o,r){return xn(this.ids,this.coords,e,n,o,r,this.nodeSize)}within(e,n,o){return Cn(this.ids,this.coords,e,n,o,this.nodeSize)}}const Mn={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},ie=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1));class $n{constructor(e){this.options=K(Object.create(Mn),e),this.trees=new Array(this.options.maxZoom+1)}load(e){const{log:n,minZoom:o,maxZoom:r,nodeSize:i}=this.options;n&&console.time("total time");const s=`prepare ${e.length} points`;n&&console.time(s),this.points=e;let l=[];for(let a=0;a<e.length;a++)!e[a].geometry||l.push(Ln(e[a],a));this.trees[r+1]=new Oe(l,je,De,i,Float32Array),n&&console.timeEnd(s);for(let a=r;a>=o;a--){const d=+Date.now();l=this._cluster(l,a),this.trees[a]=new Oe(l,je,De,i,Float32Array),n&&console.log("z%d: %d clusters in %dms",a,l.length,+Date.now()-d)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let o=((e[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,e[1]));let i=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)o=-180,i=180;else if(o>i){const u=this.getClusters([o,r,180,s],n),f=this.getClusters([-180,r,i,s],n);return u.concat(f)}const l=this.trees[this._limitZoom(n)],a=l.range(ne(o),oe(s),ne(i),oe(r)),d=[];for(const u of a){const f=l.points[u];d.push(f.numPoints?ze(f):this.points[f.index])}return d}getChildren(e){const n=this._getOriginId(e),o=this._getOriginZoom(e),r="No cluster with the specified id.",i=this.trees[o];if(!i)throw new Error(r);const s=i.points[n];if(!s)throw new Error(r);const l=this.options.radius/(this.options.extent*Math.pow(2,o-1)),a=i.within(s.x,s.y,l),d=[];for(const u of a){const f=i.points[u];f.parentId===e&&d.push(f.numPoints?ze(f):this.points[f.index])}if(d.length===0)throw new Error(r);return d}getLeaves(e,n,o){n=n||10,o=o||0;const r=[];return this._appendLeaves(r,e,n,o,0),r}getTile(e,n,o){const r=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:s,radius:l}=this.options,a=l/s,d=(o-a)/i,u=(o+1+a)/i,f={features:[]};return this._addTileFeatures(r.range((n-a)/i,d,(n+1+a)/i,u),r.points,n,o,i,f),n===0&&this._addTileFeatures(r.range(1-a/i,d,1,u),r.points,i,o,i,f),n===i-1&&this._addTileFeatures(r.range(0,d,a/i,u),r.points,-1,o,i,f),f.features.length?f: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,r,i){const s=this.getChildren(n);for(const l of s){const a=l.properties;if(a&&a.cluster?i+a.point_count<=r?i+=a.point_count:i=this._appendLeaves(e,a.cluster_id,o,r,i):i<r?i++:e.push(l),e.length===o)break}return i}_addTileFeatures(e,n,o,r,i,s){for(const l of e){const a=n[l],d=a.numPoints;let u,f,m;if(d)u=rt(a),f=a.x,m=a.y;else{const b=this.points[a.index];u=b.properties,f=ne(b.geometry.coordinates[0]),m=oe(b.geometry.coordinates[1])}const g={type:1,geometry:[[Math.round(this.options.extent*(f*i-o)),Math.round(this.options.extent*(m*i-r))]],tags:u};let y;d?y=a.id:this.options.generateId?y=a.index:this.points[a.index].id&&(y=this.points[a.index].id),y!==void 0&&(g.id=y),s.features.push(g)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const o=[],{radius:r,extent:i,reduce:s,minPoints:l}=this.options,a=r/(i*Math.pow(2,n));for(let d=0;d<e.length;d++){const u=e[d];if(u.zoom<=n)continue;u.zoom=n;const f=this.trees[n+1],m=f.within(u.x,u.y,a),g=u.numPoints||1;let y=g;for(const b of m){const v=f.points[b];v.zoom>n&&(y+=v.numPoints||1)}if(y>g&&y>=l){let b=u.x*g,v=u.y*g,C=s&&g>1?this._map(u,!0):null;const S=(d<<5)+(n+1)+this.points.length;for(const M of m){const $=f.points[M];if($.zoom<=n)continue;$.zoom=n;const w=$.numPoints||1;b+=$.x*w,v+=$.y*w,$.parentId=S,s&&(C||(C=this._map(u,!0)),s(C,this._map($)))}u.parentId=S,o.push(Sn(b/y,v/y,S,y,C))}else if(o.push(u),y>1)for(const b of m){const v=f.points[b];v.zoom<=n||(v.zoom=n,o.push(v))}}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?K({},e.properties):e.properties;const o=this.points[e.index].properties,r=this.options.map(o);return n&&r===o?K({},r):r}}function Sn(t,e,n,o,r){return{x:ie(t),y:ie(e),zoom:1/0,id:n,parentId:-1,numPoints:o,properties:r}}function Ln(t,e){const[n,o]=t.geometry.coordinates;return{x:ie(ne(n)),y:ie(oe(o)),zoom:1/0,index:e,parentId:-1}}function ze(t){return{type:"Feature",id:t.id,properties:rt(t),geometry:{type:"Point",coordinates:[kn(t.x),En(t.y)]}}}function rt(t){const e=t.numPoints,n=e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?`${Math.round(e/100)/10}k`:e;return K(K({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function ne(t){return t/360+.5}function oe(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 kn(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 K(t,e){for(const n in e)t[n]=e[n];return t}function je(t){return t.x}function De(t){return t.y}var Ze=Object.prototype.hasOwnProperty;function Ne(t,e,n){for(n of t.keys())if(Z(n,e))return n}function Z(t,e){var n,o,r;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--&&Z(t[o],e[o]););return o===-1}if(n===Set){if(t.size!==e.size)return!1;for(o of t)if(r=o,r&&typeof r=="object"&&(r=Ne(e,r),!r)||!e.has(r))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(o of t)if(r=o[0],r&&typeof r=="object"&&(r=Ne(e,r),!r)||!Z(o[1],e.get(r)))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(Ze.call(t,n)&&++o&&!Ze.call(e,n)||!(n in e)||!Z(t[n],e[n]))return!1;return Object.keys(e).length===o}}return t!==t&&e!==e}function Pn(t){var e=h.exports.useRef(t),n=h.exports.useRef(0);return Z(t,e.current)||(e.current=t,n.current+=1),h.exports.useMemo(function(){return e.current},[n.current])}function In(t,e){return h.exports.useEffect(t,Pn(e))}var An=function(e){var n=e.points,o=e.bounds,r=e.zoom,i=e.options,s=h.exports.useRef(),l=h.exports.useRef(),a=h.exports.useState([]),d=a[0],u=a[1],f=Math.round(r);return In(function(){(!s.current||!Z(l.current,n)||!Z(s.current.options,i))&&(s.current=new $n(i),s.current.load(n)),o&&u(s.current.getClusters(o,f)),l.current=n},[n,o,f,i]),{clusters:d,supercluster:s.current}};const Tn=x(jt.div)`
2
- border-radius: 50%;
3
- background: linear-gradient(
4
- to top,
5
- ${p["--ll-color-primary-variant1"]},
6
- ${p["--ll-color-primary"]}
7
- );
8
- color: ${p["--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: ${p["--ll-font-family"]};
16
- font-size: ${({diameter:t})=>t/2.5}px;
17
- border: 2px solid #fff;
18
- box-shadow: ${p["--ll-shadow-small"]};
19
- cursor: default;
20
- `,_n=x.ul`
21
- list-style: none;
22
- padding: 0;
23
- margin: 0;
24
- `,Rn=x.li`
25
- font-family: ${p["--ll-font-family"]};
26
- padding: ${p["--ll-spacing-x-small"]};
27
- background-color: ${p["--ll-color-background"]};
28
- border-radius: ${p["--ll-border-radius-small"]};
29
- border: 1px solid ${p["--ll-color-border"]};
30
- cursor: default;
31
-
32
- &:not(:last-child) {
33
- margin-bottom: ${p["--ll-spacing-xx-small"]};
34
- }
35
-
36
- &:hover {
37
- background-color: ${p["--ll-color-surface"]};
38
- }
39
- `,it=({poi:t,poiType:e,rect:n,activePOI:o,hoveredPOI:r,isMapMoving:i,setActivePOI:s,isMobile:l})=>{const a=o===t,d=r===t,u=["rapid_transit_stations"];return c(Ue,{latitude:t.lat,longitude:t.lng,style:{zIndex:a?1:0},children:k(le.Root,{options:{type:e,poi:t,isOpen:i?!1:a,isHovered:d,side:"top",size:u.includes(e)?"medium":"small",collisionPadding:l?{top:n.height+32,bottom:H*2,left:H*2,right:H*2}:{left:n.width+32,right:H*2,top:H*2,bottom:H*2}},onChange:f=>{f.type==="open-change"&&(f.data?setTimeout(()=>{s(t)},0):a&&s(void 0))},children:[c(le.Marker,{}),c(le.Content,{})]})})},On={default:{scale:1},hovered:{scale:1.2}},He=17,zn=({cluster:t,supercluster:e,pointsCount:n,onClick:o,zoom:r,activePOI:i,hoveredPOI:s,setActivePOI:l,rect:a,isMobile:d,isMapMoving:u})=>{const[f,m]=h.exports.useState(!1),y=20+t.properties.point_count/n*25,b=()=>{if(r>He){m(!0);return}o&&o(t)},v=M=>{r<=He||m(M)},C=h.exports.useMemo(()=>e==null?void 0:e.getChildren(t.id).map(M=>M.properties).filter(M=>!!M),[e,t]),S=C==null?void 0:C.find(M=>!!i&&M.poi===i);return S?c(it,{rect:a,poi:S.poi,poiType:S.type,isMobile:d,activePOI:i,hoveredPOI:s,isMapMoving:u,setActivePOI:l}):k(ce.Root,{open:u?!1:f,onOpenChange:v,children:[c(ce.Trigger,{children:c(Tn,{diameter:y,onClick:b,variants:On,animate:f?"hovered":"default",whileHover:{scale:1.2},transition:xe.transitions.default,children:t.properties.point_count})}),c(ce.Content,{side:"top",children:c(_n,{children:C==null?void 0:C.map((M,$)=>{var w;return c(Rn,{onClick:()=>l(M.poi),children:(w=M.poi)==null?void 0:w.name},$)})})})]})};function jn(t){return t.properties.cluster!==void 0}const st=O.memo(({rect:t,zoom:e,mapRef:n,points:o,isMobile:r,activePOI:i,hoveredPOI:s,isMapMoving:l,setActivePOI:a})=>{var m;const d=(m=n==null?void 0:n.current)==null?void 0:m.getMap().getBounds().toArray().flat(),{clusters:u,supercluster:f}=An({points:o,bounds:d,zoom:e,options:{radius:50,maxZoom:30}});return c(Y,{children:u.map((g,y)=>{const[b,v]=g.geometry.coordinates;return jn(g)?c(Ue,{latitude:v,longitude:b,children:c(zn,{rect:t,zoom:e,cluster:g,supercluster:f,pointsCount:o.length,activePOI:i,setActivePOI:a,isMobile:r,isMapMoving:l,hoveredPOI:s,onClick:()=>{var S;const C=Math.min(f.getClusterExpansionZoom(g.id),20);(S=n.current)==null||S.flyTo({zoom:C,center:[b,v],duration:1e3,essential:!0})}})},`cluster-${g.id}`):c(it,{rect:t,poi:g.properties.poi,poiType:g.properties.type,isMobile:r,activePOI:i,hoveredPOI:s,isMapMoving:l,setActivePOI:a},y)})})});st.displayName="Markers";const at=t=>h.exports.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},h.exports.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z"})),lt=t=>h.exports.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},h.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}));function $e(t){const{client:e}=Ce(),{sdkState:n}=N(),o=be(n.options,250),i={...h.exports.useMemo(()=>o!=null&&o.marker?o.marker:{lat:o==null?void 0:o.lat,lng:o==null?void 0:o.lng},[o]),geographyLevels:["20","30"],locationScoresRounding:!1,include:t};return se(wt.list(i),async()=>e.getScores(i),{enabled:!!i})}const Dn=x.div`
40
- padding: ${p["--ll-spacing-small"]} ${p["--ll-spacing-medium"]};
41
- background-color: ${p["--ll-color-surface"]};
42
- display: flex;
43
- flex-direction: column;
44
- overflow: hidden;
45
- flex: 1;
46
- `,Zn=x.div`
47
- display: grid;
48
- grid-template-columns: min-content 1fr;
49
- grid-gap: ${p["--ll-spacing-medium"]};
50
- margin-bottom: ${p["--ll-spacing-medium"]};
51
- `,Nn=()=>{var s,l;const{sdkState:t}=N(),{activeCategory:e,activeScore:n}=I(),o=Q.find(a=>a.value===e),{data:r,isLoading:i}=$e(o.scores);return n&&(r==null?void 0:r.location[n])?i?c("div",{children:"Loading"}):c(P.Root,{options:{score:n,scoresData:r},children:k(Dn,{children:[k(Zn,{children:[c(P.Badge,{}),c(P.BarChart,{options:{locationIcon:((l=(s=t.options)==null?void 0:s.marker)==null?void 0:l.icon)==="pin"?at:lt}})]}),c(P.Description,{})]})}):null},Hn=x.div`
52
- display: flex;
53
- overflow-x: scroll;
54
- padding: ${p["--ll-spacing-x-small"]} ${p["--ll-spacing-medium"]};
55
- flex-shrink: 0;
56
- position: relative;
57
- `,Vn=x.button`
58
- position: relative;
59
- display: flex;
60
- flex-direction: column;
61
- align-items: center;
62
- background: none;
63
- border: none;
64
- min-width: 60px;
65
- padding: 0;
66
- margin: 0 8px;
67
- flex-shrink: 0;
68
-
69
- &:first-child {
70
- margin-left: 0;
71
- }
72
-
73
- &:last-child {
74
- margin-right: 0;
75
- }
76
- `,Bn=x.div`
77
- position: absolute;
78
- top: -6px;
79
- right: 4px;
80
- border: 2px solid ${p["--ll-color-background"]};
81
- border-radius: 6px;
82
- `,Gn=x.div`
83
- flex: 1;
84
- display: flex;
85
- align-items: center;
86
- `,Un=x.div`
87
- margin: 0 2px;
88
- `,Fn=({category:t})=>{const{data:e,isLoading:n,isFetching:o}=$e(t.scores),{activeScore:r,setActiveScore:i,setActiveCategory:s}=I();return c(Hn,{children:t.scores.map(l=>{const a=l===r,d=a?"--ll-color-primary":"--ll-color-disabled";return n||o?c(Un,{children:c(q,{height:"44px",width:"60px"})},l):c(P.Root,{options:{score:l,scoresData:e},children:k(Vn,{onClick:()=>{s(t.value),i(l)},children:[c(P.Icon,{options:{color:d,height:28,width:28}}),c(Gn,{children:c(P.Title,{options:{variant:"caption1",color:d,noWrap:!0,noMargin:!0,weight:"--ll-font-weight-bold"}})}),c(Bn,{children:c(P.Badge,{options:{variant:"small",isPrimary:a}})})]})},l)})})},Wn=x.div`
89
- display: flex;
90
- padding: ${p["--ll-spacing-x-small"]} ${p["--ll-spacing-medium"]}
91
- ${p["--ll-spacing-xx-small"]} ${p["--ll-spacing-medium"]};
92
- `,Kn=x.div`
93
- position: absolute;
94
- top: 0;
95
- left: 0;
96
- right: 0;
97
- z-index: 3;
98
- box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
99
- overflow: hidden;
100
- display: flex;
101
- flex-direction: column;
102
- background-color: ${p["--ll-color-background"]};
103
- border: 1px solid ${p["--ll-color-border"]};
104
- `,ct=O.forwardRef((t,e)=>{const{activeCategory:n,setActiveCategory:o}=I();return k(Kn,{ref:e,children:[c(Wn,{children:k(z.Root,{value:n,onValueChange:r=>o(r),children:[c(z.Trigger,{size:"large",children:c(X.Root,{options:{scoreCategory:n},children:c(X.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},n)}),c(z.Content,{children:Q.map(r=>c(X.Root,{options:{scoreCategory:r.value},children:c(z.Item,{value:r.value,children:c(X.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},r.value))})]})}),c(Fn,{category:Q.find(r=>r.value===n)}),c(Nn,{})]})});ct.displayName="MobileScores";const Qn=Fe({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),Yn=Fe({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),qn=x(Mt)`
105
- margin: 0;
106
- z-index: 1;
107
- position: relative;
108
- margin: 0 calc(-1 * ${p["--ll-spacing-medium"]});
109
- padding: 0 ${p["--ll-spacing-medium"]};
110
-
111
- &:hover {
112
- background-color: ${p["--ll-color-surface"]};
113
- box-shadow: ${p["--ll-shadow-small"]};
114
- }
115
- `,ut=x($t)`
116
- background: none;
117
- border: none;
118
- display: flex;
119
- align-items: center;
120
- width: 100%;
121
- padding: ${p["--ll-spacing-x-small"]} 0;
122
- `,Jn=x(St)`
123
- background-color: ${p["--ll-color-surface"]};
124
- position: relative;
125
- overflow: hidden;
126
- margin-left: calc(-1 * ${p["--ll-spacing-medium"]});
127
- margin-right: calc(-1 * ${p["--ll-spacing-medium"]});
128
-
129
- [data-state="open"] & {
130
- animation: ${Qn} 300ms cubic-bezier(0.87, 0, 0.13, 1);
131
- }
132
-
133
- [data-state="closed"] & {
134
- animation: ${Yn} 300ms cubic-bezier(0.87, 0, 0.13, 1);
135
- }
136
- `,Xn=x.div`
137
- padding: ${p["--ll-spacing-medium"]};
138
- border-top: 1px solid ${p["--ll-color-border"]};
139
- border-bottom: 1px solid ${p["--ll-color-border"]};
140
- `,eo=x.span`
141
- ${ut}[data-state=open] & {
142
- transform: rotate(90deg);
143
- } ;
144
- `;x.div`
145
- display: flex;
146
- align-items: flex-start;
147
- justify-content: space-between;
148
- `;const Se=x.div`
149
- margin: ${p["--ll-spacing-small"]} 0;
150
- `,to=x.div`
151
- margin-top: ${p["--ll-spacing-large"]};
152
- &:empty {
153
- margin: 0;
154
- }
155
- `,no=({score:t})=>{const{data:e,isLoading:n}=et(),{activePOI:o,setActivePOI:r,hoveredPOI:i,setHoveredPOI:s}=I(),{mapRef:l,mapPadding:a}=nt();return n?c(Y,{children:[...Array(10)].map((d,u)=>c(Se,{children:c(q,{height:"34px",width:"100%"})},u))}):e?c(We.Root,{options:{type:"school",data:e==null?void 0:e[t],activePOI:o,hoveredPOI:i},onChange:d=>{var u;if(d.type==="poi-click"){const f=d.data;r(f);const m=window.innerWidth-a.left,g=window.innerWidth/2,y=m/2+a.left-g;f&&((u=l.current)==null||u.easeTo({zoom:18,center:[f.lng,f.lat],duration:1e3,offset:[y,0]}))}d.type==="poi-hover"&&s(d.data)}}):null},dt=O.memo(({result:t,poi:e})=>{const{activePOI:n,setActivePOI:o,hoveredPOI:r,setHoveredPOI:i}=I(),{mapRef:s,mapPadding:l}=nt();return!t.data||!t.data[e]?null:c(me.Content,{options:{value:e},children:c(We.Root,{options:{type:"poi",data:t.data[e],activePOI:n,hoveredPOI:r},onChange:a=>{var d;if(a.type==="poi-click"){const u=a.data;o(u);const f=window.innerWidth-l.left,m=window.innerWidth/2,g=f/2+l.left-m;u&&((d=s.current)==null||d.flyTo({zoom:18,center:[u.lng,u.lat],duration:1e3,offset:[g,0],essential:!0}))}a.type==="poi-hover"&&i(a.data)}})},e)});dt.displayName="POI";const ft=O.memo(({include:t})=>{const e=Xe(),n=t==null?void 0:t.filter(o=>{var r;return(((r=e==null?void 0:e.data)==null?void 0:r[o])||[]).length>0});return e.isLoading&&n.length?c(Y,{children:[...Array(10)].map((o,r)=>c(Se,{children:c(q,{height:"34px",width:"100%"})},r))}):e.data?k(me.Root,{options:{include:n},children:[c(me.Tabs,{}),n.map(o=>c(dt,{poi:o,result:e},o))]}):null});ft.displayName="POIs";const pt=O.memo(({score:t,isLoading:e,scoresData:n})=>{var s,l;const{sdkState:o}=N(),{activeScore:r}=I(),i=t===r;return e?c(Se,{children:c(q,{height:"34px",width:"100%"},t)}):n!=null&&n.location[t]?c(Lt,{value:t,children:k(P.Root,{options:{score:t,scoresData:n},children:[c(qn,{children:k(ut,{children:[c(eo,{children:c(Ke,{SVGElement:kt,fill:p["--ll-color-on-background-variant1"]})}),c(V,{spacing:"--ll-spacing-small"}),c(P.Icon,{}),c(V,{spacing:"--ll-spacing-small"}),c(P.Title,{}),c(V,{}),c(P.Badge,{options:{isPrimary:i}})]})}),c(Jn,{children:k(Xn,{children:[c(P.Description,{}),c(V,{vertical:!0,spacing:"--ll-spacing-small"}),c(P.BarChart,{options:{locationIcon:((l=(s=o.options)==null?void 0:s.marker)==null?void 0:l.icon)==="pin"?at:lt}}),c(to,{children:t==="high_schools"||t==="primary_schools"?c(no,{score:t}):c(ft,{include:W[t]})})]})})]})},t):null});pt.displayName="Score";const oo=x.div`
156
- padding: ${p["--ll-spacing-small"]} ${p["--ll-spacing-medium"]};
157
- `,ro=x.div`
158
- display: flex;
159
- justify-content: space-between;
160
- align-items: center;
161
- `,ht=O.memo(({tabContent:t})=>{const{data:e,isLoading:n,isFetching:o}=$e(t.scores),{translations:r}=we();return k(oo,{children:[k(ro,{children:[c(te.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),o&&!n&&c(Dt,{size:"small"})]}),c(V,{spacing:"--ll-spacing-small",vertical:!0}),!o&&!Object.keys((e==null?void 0:e.location)||{}).length&&c(F,{color:"--ll-color-on-background-variant1",children:r.EMPTY_TEXT}),t.scores.map(i=>c(pt,{score:i,isLoading:n,scoresData:e},i))]})});ht.displayName="ScoreCategory";const mt=O.memo(({tabContent:t})=>{const{activeScore:e,setActiveScore:n}=I();return h.exports.useEffect(()=>{n(t.scores[0])},[]),c(Et,{value:e,onValueChange:o=>{n(o)},type:"single",collapsible:!0,children:c(ht,{tabContent:t})})});mt.displayName="ScoreCategoryAccordion";const io=x.div`
162
- overflow-y: auto;
163
- `,so=x.div`
164
- position: absolute;
165
- top: ${p["--ll-spacing-medium"]};
166
- left: ${p["--ll-spacing-medium"]};
167
- width: 360px;
168
- max-height: calc(100% - 2 * ${p["--ll-spacing-medium"]});
169
- z-index: 1;
170
- border-radius: ${p["--ll-border-radius-medium"]};
171
- box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
172
- background-color: #fff;
173
- overflow: hidden;
174
- display: flex;
175
- flex-direction: column;
176
- background-color: ${p["--ll-color-background"]};
177
- border: 1px solid ${p["--ll-color-border"]};
178
- `;x.div`
179
- display: flex;
180
- justify-content: center;
181
- padding: ${p["--ll-spacing-small"]};
182
- `;const ao=x.div`
183
- padding: ${p["--ll-spacing-xx-small"]};
184
- border-bottom: 1px solid ${p["--ll-color-border"]};
185
- `,lo=x.div`
186
- display: flex;
187
- justify-content: center;
188
- padding: ${p["--ll-spacing-small"]};
189
- background-color: ${p["--ll-color-background"]};
190
- `,gt=()=>c(lo,{children:c(Zt.Root,{})}),yt=O.forwardRef((t,e)=>{const{activeCategory:n,setActiveCategory:o}=I();return c(te.Root,{options:{currentTab:n},onChange:r=>{o(r.data)},children:k(so,{ref:e,children:[c(ao,{children:c(te.Tabs,{})}),c(io,{children:Q.map(r=>c(te.Content,{options:{value:r.value},children:c(mt,{tabContent:r},r.value)},r.value))}),c(gt,{})]})})});yt.displayName="DesktopScores";const co=x.div`
191
- position: relative;
192
- display: flex;
193
- flex-direction: column;
194
- height: 100vh;
195
- `,Ve=t=>h.exports.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},h.exports.createElement("path",{d:"M22.4275 10.5938L13.4175 1.58383C12.6675 0.833834 11.3475 0.823834 10.5875 1.58383L1.58745 10.5838C0.807453 11.3638 0.807453 12.6238 1.58745 13.4038L10.5875 22.4038C10.9775 22.7938 11.4875 22.9838 11.9975 22.9838C12.5075 22.9838 13.0175 22.7938 13.4075 22.4038L22.3975 13.4138C23.1875 12.6538 23.1975 11.3938 22.4275 10.5938ZM12.0075 20.9938L3.00745 11.9938L12.0075 2.99383L21.0075 11.9938L12.0075 20.9938ZM7.99745 11.0038V15.0038H9.99745V12.0038H13.9975V14.5038L17.4975 11.0038L13.9975 7.50383V10.0038H8.99745C8.44745 10.0038 7.99745 10.4538 7.99745 11.0038Z"})),uo=t=>h.exports.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},h.exports.createElement("path",{d:"M18.92 6.01C18.72 5.42 18.16 5 17.5 5H6.5C5.84 5 5.29 5.42 5.08 6.01L3 12V20C3 20.55 3.45 21 4 21H5C5.55 21 6 20.55 6 20V19H18V20C18 20.55 18.45 21 19 21H20C20.55 21 21 20.55 21 20V12L18.92 6.01ZM6.85 7H17.14L18.22 10.11H5.77L6.85 7ZM19 17H5V12H19V17Z"}),h.exports.createElement("path",{d:"M7.5 16C8.32843 16 9 15.3284 9 14.5C9 13.6716 8.32843 13 7.5 13C6.67157 13 6 13.6716 6 14.5C6 15.3284 6.67157 16 7.5 16Z"}),h.exports.createElement("path",{d:"M16.5 16C17.3284 16 18 15.3284 18 14.5C18 13.6716 17.3284 13 16.5 13C15.6716 13 15 13.6716 15 14.5C15 15.3284 15.6716 16 16.5 16Z"})),fo=t=>h.exports.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},h.exports.createElement("path",{d:"M13.5 5.5C14.6 5.5 15.5 4.6 15.5 3.5C15.5 2.4 14.6 1.5 13.5 1.5C12.4 1.5 11.5 2.4 11.5 3.5C11.5 4.6 12.4 5.5 13.5 5.5ZM9.8 8.9L7 23H9.1L10.9 15L13 17V23H15V15.5L12.9 13.5L13.5 10.5C14.8 12 16.8 13 19 13V11C17.1 11 15.5 10 14.7 8.6L13.7 7C13.14 6.11 12.02 5.75 11.05 6.16L6 8.3V13H8V9.6L9.8 8.9Z"})),po=t=>h.exports.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},h.exports.createElement("path",{d:"M12,2C6.47,2,2,6.47,2,12s4.47,10,10,10s10-4.47,10-10S17.53,2,12,2z M17,15.59L15.59,17L12,13.41L8.41,17L7,15.59 L10.59,12L7,8.41L8.41,7L12,10.59L15.59,7L17,8.41L13.41,12L17,15.59z"})),vt={all:()=>["commute-calc"],list:t=>[...vt.all(),t]},ho="https://router.hereapi.com/v8/routes?";function mo({transportMode:t,origin:e,destination:n}){const o={return:"polyline,summary,typicalDuration",transportMode:t,origin:e,destination:`${n==null?void 0:n.lat},${n==null?void 0:n.lng}`,apiKey:"KDL0aAzsbOcv7p53P2ovno2izfDOe93hyzZRrayktbE"},r=()=>fetch(ho+new URLSearchParams(o)).then(i=>i.json()).then(i=>i.routes.length>0&&i.routes[0].sections.length>0?i.routes[0].sections[0]:[]).catch(i=>{Nt(i)});return se(vt.list(o),r,{enabled:!!o&&!!n&&!!e})}const pe=(t,e,n)=>e===1?t:n!=null?n:`${t}s`,go=[62,-1,-1,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,63,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],yo=1,_=typeof BigInt<"u"?BigInt:Number;function vo(t){const e=t.charCodeAt(0);return go[e-45]}function xo(t){let e=_(0),n=_(0);const o=[];if(t.split("").forEach(r=>{const i=_(vo(r));e|=(i&_(31))<<n,(i&_(32))===_(0)?(o.push(e),e=_(0),n=_(0)):n+=_(5)}),n>0)throw new Error("Invalid encoding");return o}function Co(t,e){if(+t.toString()!==yo)throw new Error("Invalid format version");const n=+e.toString(),o=n&15,r=n>>4&7,i=n>>7&15;return{precision:o,thirdDim:r,thirdDimPrecision:i}}function he(t){let e=t;return e&_(1)&&(e=~e),e>>=_(1),+e.toString()}function bo(t){const e=xo(t),n=Co(e[0],e[1]),o=10**n.precision,r=10**n.thirdDimPrecision,{thirdDim:i}=n;let s=0,l=0,a=0;const d=[];let u=2;for(;u<e.length;){const m=he(e[u])/o,g=he(e[u+1])/o;if(s+=m,l+=g,i){const y=he(e[u+2])/r;a+=y,d.push([l,s,a]),u+=3}else d.push([l,s]),u+=2}if(u!==e.length)throw new Error("Invalid encoding. Premature ending reached");return{type:"FeatureCollection",features:[{id:"route",type:"Feature",geometry:{type:"LineString",coordinates:d}}]}}const wo=x.div`
196
- max-height: calc(100% - 2 * ${p["--ll-spacing-medium"]});
197
- border-radius: ${p["--ll-border-radius-medium"]};
198
- box-shadow: ${p["--ll-shadow-small"]};
199
- background-color: ${p["--ll-color-background"]};
200
- border: 1px solid ${p["--ll-color-border"]};
201
- padding: ${p["--ll-spacing-x-small"]};
202
- `,Mo=x.div`
203
- display: flex;
204
- justify-content: space-between;
205
- align-items: end;
206
-
207
- ${Pt} {
208
- width: 229px;
209
- margin-right: ${p["--ll-spacing-x-small"]};
210
- }
211
- `,Be=x.div`
212
- background-color: ${p["--ll-color-surface"]};
213
- padding: ${p["--ll-spacing-x-small"]} ${p["--ll-spacing-small"]} 0;
214
- border-radius: ${p["--ll-border-radius-medium"]};
215
- `,$o=x(Qe)`
216
- position: absolute;
217
- right: ${p["--ll-spacing-xx-small"]};
218
- top: ${p["--ll-spacing-xx-small"]};
219
- `,xt=({className:t,onClose:e})=>{var C,S,M,$;const{sdkState:n}=N(),{setCommuteGeojson:o,destination:r,setDestination:i}=I(),[s,l]=h.exports.useState("pedestrian"),a=Me(),{translations:d}=we(),{data:u,isFetching:f,isFetched:m}=mo({destination:r,transportMode:s,origin:`${(S=(C=n==null?void 0:n.options)==null?void 0:C.marker)==null?void 0:S.lat},${($=(M=n==null?void 0:n.options)==null?void 0:M.marker)==null?void 0:$.lng}`});h.exports.useEffect(()=>{!(u!=null&&u.summary)||o(bo(u.polyline))},[u]);const g={pedestrian:[d.WALKING,fo],car:[d.DRIVING,uo]},y=h.exports.useMemo(()=>{if(!(u!=null&&u.summary))return null;const w=Math.floor(u.summary.typicalDuration/60/60),L=Math.floor(u.summary.typicalDuration/60%60);return w===0?`${L} ${pe(d.MINUTE,L)}`:`${w} ${pe(d.HOUR,w)} ${L} ${pe(d.MINUTE,L)}`},[u]),b=h.exports.useMemo(()=>{if(!(u!=null&&u.summary))return null;const w=Math.floor(u.summary.length/1e3);return w===0?`${u.summary.length} m`:`${w} km`},[u]),v=()=>f?c(q,{height:"70.4px",width:"100%"}):u!=null&&u.summary?k(Be,{children:[c(F,{variant:"h5",children:y}),k(F,{children:[b," \u2013 ",d.FAST_ROUTE]})]}):k(Be,{children:[c(F,{variant:"h5",children:d.NO_ROUTE}),c(F,{children:d.TRY_SUGGESTION})]});return k(wo,{className:t,children:[c($o,{size:"medium",color:"neutral",onClick:e,SVGElement:po}),k(Mo,{children:[c(It,{label:d.CALCULATE_COMMUTE,placeholder:d.SEARCH_MAP,renderListAbove:a,renderListAbovePosition:30,onSearch:w=>{i({lat:w.latitude,lng:w.longitude})}}),c(z.Root,{value:s,onValueChange:w=>{l(w)},children:k(z.Trigger,{children:[c(Ke,{SVGElement:g[s][1],fill:p["--ll-color-on-background-variant1"],width:16}),g[s][0],k(z.Content,{children:[c(z.Item,{value:"car",children:d.DRIVING}),c(z.Item,{value:"pedestrian",children:d.WALKING})]})]})})]}),(m||f)&&k(Y,{children:[c(V,{vertical:!0,spacing:"--ll-spacing-x-small"}),c(At,{open:!!u,children:v()})]})]})},So=x.div`
220
- position: absolute;
221
- bottom: 0;
222
- right: 0;
223
- left: 0;
224
- z-index: 3;
225
- `,Lo=x.div`
226
- position: absolute;
227
- top: ${p["--ll-spacing-medium"]};
228
- right: ${p["--ll-spacing-medium"]};
229
- z-index: 3;
230
- max-width: 356px;
231
- `,ko=x(Qe)`
232
- box-shadow: ${p["--ll-shadow-medium"]};
233
- position: absolute;
234
- bottom: ${p["--ll-spacing-medium"]};
235
- right: ${p["--ll-spacing-medium"]};
236
- `,Eo=x(xt)``,Po=x(xt)`
237
- border-radius: ${p["--ll-border-radius-small"]}
238
- ${p["--ll-border-radius-small"]} 0 0;
239
- border: 0;
240
- `,Io=x(Ht)`
241
- box-shadow: ${p["--ll-shadow-small"]};
242
- `,Ao=()=>{const{setCommuteGeojson:t,setDestination:e}=I(),[n,o]=h.exports.useState(!1),{translations:r}=we(),i=Me(),s=()=>{e(void 0),t(void 0),o(!1)},l=()=>{o(!0)};return i?c(Y,{children:n?c(So,{children:c(Po,{onClose:s})}):c(ko,{size:"large",SVGElement:Ve,onClick:l})}):c(Lo,{children:n?c(Eo,{onClose:s}):c(Io,{onClick:l,startAdornment:c(Ve,{}),children:r.CALCULATE_COMMUTE})})},To=()=>{var B,Le,ke;const{sdkState:t,setSdkState:e}=N(),{activeScore:n,activePOI:o,setActivePOI:r,hoveredPOI:i,commuteGeojson:s,destination:l}=I(),a=Me(),d=Xe(),u=et(),f=((Le=(B=t==null?void 0:t.globalOptions)==null?void 0:B.appearance)==null?void 0:Le.theme)==="night"?"dd191599-2a92-49fc-9a33-e12391753ad5":"600d69cb-288d-445e-9839-3dfe4d76b31a",m={id:"point",type:"line",paint:{"line-width":6,"line-color":"#0056D3"}},[g,y]=h.exports.useState(!1),b=h.exports.useMemo(()=>{var E,T;return(n==="high_schools"||n==="primary_schools")&&!u.isFetching?{[n]:((E=u==null?void 0:u.data)==null?void 0:E[n])||[]}:!(W&&n&&W[n]&&((T=W[n])==null?void 0:T.length))&&!d.isFetching?{[n]:[]}:d.data},[d.data,u.data,n]),v=h.exports.useMemo(()=>b?Object.entries(b).map(([T,j])=>j.map(R=>ue([R.lng,R.lat],{poi:R,type:T}))).flat().filter((T,j,R)=>R.findIndex(ae=>["lat","lng","name"].every(G=>ae.properties.poi[G]===T.properties.poi[G]))===j):[],[b]),C=h.exports.useMemo(()=>{var T,j,R;const E=((T=t==null?void 0:t.options)==null?void 0:T.marker)&&ue([(j=t==null?void 0:t.options)==null?void 0:j.marker.lng,(R=t==null?void 0:t.options)==null?void 0:R.marker.lat]);return[...v,...E?[E]:[],...l?[ue([l==null?void 0:l.lng,l==null?void 0:l.lat])]:[]]},[v,(ke=t==null?void 0:t.options)==null?void 0:ke.marker,l]),S=h.exports.useRef(),[M,$]=Tt(),w=h.exports.useMemo(()=>({top:25+$.height,bottom:25,left:25,right:25}),[$.height]),L=h.exports.useMemo(()=>({top:50,bottom:50,left:$.width+32+50,right:50}),[$.width]),A=a?w:L,D=E=>{e({...t,options:{...t.options,lat:E.viewState.latitude,lng:E.viewState.longitude,zoom:E.viewState.zoom,bearing:E.viewState.bearing,pitch:E.viewState.pitch}})};return h.exports.useEffect(()=>{var G,Ee;if(!C.length||!((G=t.options)!=null&&G.marker))return;const E=Jt(C.map(({geometry:Pe})=>[Pe.coordinates[1],Pe.coordinates[0]])),[T,j,R,ae]=ge(E);(Ee=S==null?void 0:S.current)==null||Ee.fitBounds([[j,T],[ae,R]],{maxZoom:17,padding:A,duration:1e3})},[C,A]),t.options?c(vn,{mapRef:S,mapPadding:A,children:k(co,{children:[k(_t,{ref:S,mapLib:Rt,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/${f}/style.json?key=9jNGatuzs05Q1oNlctEs`,onMove:D,cooperativeGestures:t.options.cooperativeGestures,onMoveStart:()=>y(!0),onMoveEnd:()=>y(!1),attributionControl:!1,children:[c(Ot,{compact:!0,position:a?"bottom-left":"bottom-right"}),c(zt,{position:a?"top-right":"bottom-right",showCompass:!0,style:{marginTop:a?16+$.height:16,marginRight:16}}),t.options.marker&&c(Ie,{marker:t.options.marker}),c(st,{rect:$,zoom:t.options.zoom,mapRef:S,points:v,isMobile:a,activePOI:o,hoveredPOI:i,isMapMoving:g,setActivePOI:r}),a?c(ct,{ref:M}):c(yt,{ref:M}),c(Ao,{}),l&&c(Ie,{marker:{icon:"pin",...l}}),s&&c(Wt,{type:"geojson",data:s,children:c(qt,{...m})})]}),a&&c(gt,{})]})}):c("div",{children:"No options provided."})},Oo=()=>c(Bt,{children:c(To,{})});export{Oo as default};
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,23 +0,0 @@
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
@@ -1 +0,0 @@
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"}