@tracktor/map 1.8.6 → 1.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(`.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.mapboxgl-canvas{left:0;position:absolute;top:0}.mapboxgl-map:-webkit-full-screen{height:100%;width:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:grab;-webkit-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom,.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-left,.mapboxgl-ctrl-right,.mapboxgl-ctrl-top,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.mapboxgl-ctrl-top-left{left:0;top:0}.mapboxgl-ctrl-top{left:50%;top:0;transform:translate(-50%)}.mapboxgl-ctrl-top-right{right:0;top:0}.mapboxgl-ctrl-right{right:0;top:50%;transform:translateY(-50%)}.mapboxgl-ctrl-bottom-right{bottom:0;right:0}.mapboxgl-ctrl-bottom{bottom:0;left:50%;transform:translate(-50%)}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-left{left:0;top:50%;transform:translateY(-50%)}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{float:left;margin:10px 0 0 10px}.mapboxgl-ctrl-top .mapboxgl-ctrl{float:left;margin:10px 0}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{float:right;margin:10px 10px 0 0}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl,.mapboxgl-ctrl-right .mapboxgl-ctrl{float:right;margin:0 10px 10px 0}.mapboxgl-ctrl-bottom .mapboxgl-ctrl{float:left;margin:10px 0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl,.mapboxgl-ctrl-left .mapboxgl-ctrl{float:left;margin:0 0 10px 10px}.mapboxgl-ctrl-group{background:#fff;border-radius:4px}.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px #0000001a}@media(-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{background-color:initial;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;overflow:hidden;padding:0;width:29px}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media(-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:initial}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl-group button:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:only-child{border-radius:inherit}.mapboxgl-ctrl button:not(:disabled):hover{background-color:#0000000d}.mapboxgl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}@media(-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}@media(-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}@media(-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}@media(-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath id='south' d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}@media(-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath id='south' d='M10.5 16l4 8 4-8h-8z' fill='%23999'/%3E%3C/svg%3E")}}@media(-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23000' viewBox='0 0 29 29'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath id='south' d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-buildings-toggle .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg fill='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M3.3335 11.6666C3.3335 12.5871 4.07969 13.3333 5.00016 13.3333C5.92064 13.3333 6.66683 12.5871 6.66683 11.6666L6.66683 6.66659L11.6668 6.66659C12.5873 6.66659 13.3335 5.92039 13.3335 4.99992C13.3335 4.07944 12.5873 3.33325 11.6668 3.33325H3.3335V11.6666Z' fill='currentColor'/%3E%3Cpath d='M26.6668 11.6666C26.6668 12.5871 25.9206 13.3333 25.0002 13.3333C24.0797 13.3333 23.3335 12.5871 23.3335 11.6666L23.3335 6.66659L18.3335 6.66659C17.413 6.66659 16.6668 5.92039 16.6668 4.99992C16.6668 4.07944 17.413 3.33325 18.3335 3.33325H26.6668L26.6668 11.6666Z' fill='currentColor'/%3E%3Cpath d='M13.3335 24.9999C13.3335 25.9204 12.5873 26.6666 11.6668 26.6666H3.3335V18.3333C3.3335 17.4128 4.07969 16.6666 5.00016 16.6666C5.92064 16.6666 6.66683 17.4128 6.66683 18.3333V23.3333H11.6668C12.5873 23.3333 13.3335 24.0794 13.3335 24.9999Z' fill='currentColor'/%3E%3Cpath d='M18.3335 26.6666C17.413 26.6666 16.6668 25.9204 16.6668 24.9999C16.6668 24.0794 17.413 23.3333 18.3335 23.3333H23.3335V18.3333C23.3335 17.4128 24.0797 16.6666 25.0002 16.6666C25.9206 16.6666 26.6668 17.4128 26.6668 18.3333V26.6666H18.3335Z' fill='currentColor'/%3E%3C/svg%3E");background-size:26px 26px}.mapboxgl-ctrl button.mapboxgl-ctrl-buildings-toggle.mapboxgl-ctrl-level-button-selected .mapboxgl-ctrl-icon{filter:invert(1) brightness(1)}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' fill='%23f00'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2' display='none'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2' display='none'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{animation:mapboxgl-spin 2s linear infinite}@media(-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23999'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' fill='%23f00'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2' display='none'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2' display='none'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}}@media(-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23000'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' display='none'/%3E%3C/svg%3E")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23666'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle id='dot' cx='10' cy='10' r='2'/%3E%3Cpath id='stroke' d='M14 5l1 1-9 9-1-1 9-9z' fill='%23f00'/%3E%3C/svg%3E")}}@keyframes mapboxgl-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd' viewBox='0 0 88 23'%3E%3Cdefs%3E%3Cpath id='logo' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='text' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='clip'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='white'/%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/mask%3E%3Cg id='outline' opacity='0.3' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23clip)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23text' mask='url(%23clip)'/%3E%3C/g%3E%3Cg id='fill' opacity='0.9' fill='%23fff'%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media(-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:initial;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd' viewBox='0 0 88 23'%3E%3Cdefs%3E%3Cpath id='logo' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='text' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='clip'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='white'/%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/mask%3E%3Cg id='outline' opacity='1' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23clip)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23text' mask='url(%23clip)'/%3E%3C/g%3E%3Cg id='fill' opacity='1' fill='%23fff'%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/g%3E%3C/svg%3E")}}@media(-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd' viewBox='0 0 88 23'%3E%3Cdefs%3E%3Cpath id='logo' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='text' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='clip'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='white'/%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/mask%3E%3Cg id='outline' opacity='1' stroke='%23fff' stroke-width='3' fill='%23fff'%3E%3Ccircle mask='url(%23clip)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23text' mask='url(%23clip)'/%3E%3C/g%3E%3Cg id='fill' opacity='1' fill='%23000'%3E%3Cuse xlink:href='%23logo'/%3E%3Cuse xlink:href='%23text'/%3E%3C/g%3E%3C/svg%3E")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{background-color:#ffffff80;margin:0;padding:0 5px}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{background-color:#fff;border-radius:12px;box-sizing:initial;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{background-color:#ffffff80;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:#0000000d}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{right:0;top:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{left:0;top:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}.mapboxgl-ctrl-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' fill='%23fff'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.mapboxgl-ctrl-attrib a{color:#000000bf;text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:#ffffffbf;border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.mapboxgl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{border:10px solid #0000;height:0;width:0;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.mapboxgl-popup-close-button{background-color:initial;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.mapboxgl-popup-close-button:hover{background-color:#0000000d}.mapboxgl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px #0000001a;padding:10px 10px 15px;pointer-events:auto;position:relative}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{left:0;opacity:1;position:absolute;top:0;transition:opacity .2s;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.mapboxgl-user-location-dot:before{animation:mapboxgl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.mapboxgl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px #00000059;box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading{height:0;width:0}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after,.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-bottom:7.5px solid #4aa1eb;content:"";position:absolute}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:before{border-left:7.5px solid #0000;transform:translateY(-28px) skewY(-20deg)}.mapboxgl-user-location-show-heading .mapboxgl-user-location-heading:after{border-right:7.5px solid #0000;transform:translate(7.5px,-28px) skewY(20deg)}@keyframes mapboxgl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}@media print{.mapbox-improve-map{display:none}}.mapboxgl-scroll-zoom-blocker,.mapboxgl-touch-pan-blocker{align-items:center;background:#000000b3;color:#fff;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;height:100%;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;text-align:center;top:0;transition:opacity .75s ease-in-out;transition-delay:1s;width:100%}.mapboxgl-scroll-zoom-blocker-show,.mapboxgl-touch-pan-blocker-show{opacity:1;transition:opacity .1s ease-in-out}.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page,.mapboxgl-canvas-container.mapboxgl-touch-pan-blocker-override.mapboxgl-scrollable-page .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-ctrl-separator{background-color:#e0e0e0;height:1px}.mapboxgl-ctrl button.mapboxgl-ctrl-level-button{color:#333;font-size:18px;font-weight:700;height:50px;width:50px}.mapboxgl-ctrl button.mapboxgl-ctrl-level-button:first-child{border-top-left-radius:8px;border-top-right-radius:8px}.mapboxgl-ctrl button.mapboxgl-ctrl-level-button:last-child{border-bottom-left-radius:8px;border-bottom-right-radius:8px}.mapboxgl-ctrl button.mapboxgl-ctrl-level-button:hover{background-color:#f5f5f5}.mapboxgl-ctrl button.mapboxgl-ctrl-level-button-selected{background-color:#4a5568;color:#fff}.mapboxgl-ctrl button.mapboxgl-ctrl-level-button-selected:hover{background-color:#2d3748}`)),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import Le, { createContext as Ie, useEffect as
|
|
2
|
+
import Le, { createContext as Ie, useEffect as k, useMemo as M, useRef as ae, memo as le, useState as F } from "react";
|
|
3
3
|
import { LicenseInfo as $e } from "@mui/x-license";
|
|
4
4
|
import be from "mapbox-gl";
|
|
5
5
|
import { useTheme as xe, Box as H, GlobalStyles as Fe, Skeleton as Ne } from "@tracktor/design-system";
|
|
6
6
|
import De, { Marker as ve, Source as fe, Layer as pe, useMap as Ue, Popup as Ye } from "react-map-gl";
|
|
7
7
|
import { isArray as ce, isString as ie, isNumber as Q } from "@tracktor/react-utils";
|
|
8
|
-
const
|
|
9
|
-
var Z = { exports: {} },
|
|
8
|
+
const It = 2.333, $t = 46.8677;
|
|
9
|
+
var Z = { exports: {} }, B = {};
|
|
10
10
|
/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react-jsx-runtime.production.js
|
|
@@ -18,7 +18,7 @@ var Z = { exports: {} }, Y = {};
|
|
|
18
18
|
*/
|
|
19
19
|
var ge;
|
|
20
20
|
function Be() {
|
|
21
|
-
if (ge) return
|
|
21
|
+
if (ge) return B;
|
|
22
22
|
ge = 1;
|
|
23
23
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
24
24
|
function n(a, o, l) {
|
|
@@ -36,9 +36,9 @@ function Be() {
|
|
|
36
36
|
props: l
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
return
|
|
39
|
+
return B.Fragment = t, B.jsx = n, B.jsxs = n, B;
|
|
40
40
|
}
|
|
41
|
-
var
|
|
41
|
+
var V = {};
|
|
42
42
|
/**
|
|
43
43
|
* @license React
|
|
44
44
|
* react-jsx-runtime.development.js
|
|
@@ -54,18 +54,18 @@ function Ve() {
|
|
|
54
54
|
function e(r) {
|
|
55
55
|
if (r == null) return null;
|
|
56
56
|
if (typeof r == "function")
|
|
57
|
-
return r.$$typeof ===
|
|
57
|
+
return r.$$typeof === Y ? null : r.displayName || r.name || null;
|
|
58
58
|
if (typeof r == "string") return r;
|
|
59
59
|
switch (r) {
|
|
60
60
|
case C:
|
|
61
61
|
return "Fragment";
|
|
62
|
-
case
|
|
62
|
+
case N:
|
|
63
63
|
return "Profiler";
|
|
64
64
|
case W:
|
|
65
65
|
return "StrictMode";
|
|
66
|
-
case N:
|
|
67
|
-
return "Suspense";
|
|
68
66
|
case D:
|
|
67
|
+
return "Suspense";
|
|
68
|
+
case U:
|
|
69
69
|
return "SuspenseList";
|
|
70
70
|
case A:
|
|
71
71
|
return "Activity";
|
|
@@ -153,7 +153,7 @@ function Ve() {
|
|
|
153
153
|
}
|
|
154
154
|
function d() {
|
|
155
155
|
var r = e(this.type);
|
|
156
|
-
return
|
|
156
|
+
return q[r] || (q[r] = !0, console.error(
|
|
157
157
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
158
158
|
)), r = this.props.ref, r !== void 0 ? r : null;
|
|
159
159
|
}
|
|
@@ -205,8 +205,8 @@ function Ve() {
|
|
|
205
205
|
else _(h);
|
|
206
206
|
if (L.call(c, "key")) {
|
|
207
207
|
h = e(r);
|
|
208
|
-
var j = Object.keys(c).filter(function(
|
|
209
|
-
return
|
|
208
|
+
var j = Object.keys(c).filter(function(w) {
|
|
209
|
+
return w !== "key";
|
|
210
210
|
});
|
|
211
211
|
m = 0 < j.length ? "{key: someKey, " + j.join(": ..., ") + ": ...}" : "{key: someKey}", X[h + m] || (j = 0 < j.length ? "{" + j.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
212
212
|
`A props object containing a "key" prop is being spread into JSX:
|
|
@@ -244,7 +244,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
244
244
|
function b(r) {
|
|
245
245
|
return typeof r == "object" && r !== null && r.$$typeof === R;
|
|
246
246
|
}
|
|
247
|
-
var x = Le, R = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"),
|
|
247
|
+
var x = Le, R = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), te = Symbol.for("react.consumer"), re = Symbol.for("react.context"), ne = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), U = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), A = Symbol.for("react.activity"), Y = Symbol.for("react.client.reference"), P = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, I = Array.isArray, $ = console.createTask ? console.createTask : function() {
|
|
248
248
|
return null;
|
|
249
249
|
};
|
|
250
250
|
x = {
|
|
@@ -252,32 +252,32 @@ React keys must be passed directly to JSX without using spread:
|
|
|
252
252
|
return r();
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
|
-
var G,
|
|
255
|
+
var G, q = {}, z = x.react_stack_bottom_frame.bind(
|
|
256
256
|
x,
|
|
257
257
|
l
|
|
258
|
-
)(),
|
|
259
|
-
|
|
258
|
+
)(), J = $(a(l)), X = {};
|
|
259
|
+
V.Fragment = C, V.jsx = function(r, c, y) {
|
|
260
260
|
var m = 1e4 > P.recentlyCreatedOwnerStacks++;
|
|
261
261
|
return p(
|
|
262
262
|
r,
|
|
263
263
|
c,
|
|
264
264
|
y,
|
|
265
265
|
!1,
|
|
266
|
-
m ? Error("react-stack-top-frame") :
|
|
267
|
-
m ? $(a(r)) :
|
|
266
|
+
m ? Error("react-stack-top-frame") : z,
|
|
267
|
+
m ? $(a(r)) : J
|
|
268
268
|
);
|
|
269
|
-
},
|
|
269
|
+
}, V.jsxs = function(r, c, y) {
|
|
270
270
|
var m = 1e4 > P.recentlyCreatedOwnerStacks++;
|
|
271
271
|
return p(
|
|
272
272
|
r,
|
|
273
273
|
c,
|
|
274
274
|
y,
|
|
275
275
|
!0,
|
|
276
|
-
m ? Error("react-stack-top-frame") :
|
|
277
|
-
m ? $(a(r)) :
|
|
276
|
+
m ? Error("react-stack-top-frame") : z,
|
|
277
|
+
m ? $(a(r)) : J
|
|
278
278
|
);
|
|
279
279
|
};
|
|
280
|
-
})()),
|
|
280
|
+
})()), V;
|
|
281
281
|
}
|
|
282
282
|
var ye;
|
|
283
283
|
function We() {
|
|
@@ -287,8 +287,8 @@ var f = We();
|
|
|
287
287
|
const Ge = Ie({
|
|
288
288
|
licenceMapbox: "",
|
|
289
289
|
licenseMuiX: ""
|
|
290
|
-
}),
|
|
291
|
-
|
|
290
|
+
}), Ft = ({ children: e, licenseMuiX: t, licenceMapbox: n }) => {
|
|
291
|
+
k(() => {
|
|
292
292
|
t && $e.setLicenseKey(t);
|
|
293
293
|
}, [t]);
|
|
294
294
|
const a = M(
|
|
@@ -299,18 +299,18 @@ const Ge = Ie({
|
|
|
299
299
|
[t, n]
|
|
300
300
|
);
|
|
301
301
|
return n && (be.accessToken = n), /* @__PURE__ */ f.jsx(Ge.Provider, { value: a, children: e });
|
|
302
|
-
},
|
|
302
|
+
}, qe = (e) => e?.type === "LineString" || e?.type === "MultiLineString", ze = (e) => {
|
|
303
303
|
let t;
|
|
304
304
|
Array.isArray(e[0][0]) ? t = e.reduce((o, l) => l.length > o.length ? l : o) : t = e;
|
|
305
305
|
const n = Math.floor(t.length / 2);
|
|
306
306
|
return [t[n][0], t[n][1]];
|
|
307
|
-
},
|
|
307
|
+
}, Je = ({ route: e, children: t }) => {
|
|
308
308
|
if (!(e && t))
|
|
309
309
|
return null;
|
|
310
310
|
const n = e.geometry;
|
|
311
|
-
if (!
|
|
311
|
+
if (!qe(n))
|
|
312
312
|
return null;
|
|
313
|
-
const a = n.coordinates, [o, l] =
|
|
313
|
+
const a = n.coordinates, [o, l] = ze(a);
|
|
314
314
|
return /* @__PURE__ */ f.jsx(ve, { longitude: o, latitude: l, children: t });
|
|
315
315
|
}, Xe = (e) => ce(e) ? { features: e, type: "FeatureCollection" } : e.type === "FeatureCollection" ? e : { features: [e], type: "FeatureCollection" }, ee = ({ features: e, lineLabel: t, lineStyle: n }) => {
|
|
316
316
|
if (!e)
|
|
@@ -342,7 +342,7 @@ const Ge = Ie({
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
) }),
|
|
345
|
-
t && l.map((s, u) => /* @__PURE__ */ f.jsx(
|
|
345
|
+
t && l.map((s, u) => /* @__PURE__ */ f.jsx(Je, { route: s, children: t }, `label-${u}`))
|
|
346
346
|
] })
|
|
347
347
|
] });
|
|
348
348
|
}, Ze = "#000000", He = "#FFFFFF", se = {
|
|
@@ -411,7 +411,7 @@ const Ge = Ie({
|
|
|
411
411
|
}, Ee = (e) => {
|
|
412
412
|
const t = _e(e);
|
|
413
413
|
return t !== null && t >= -180 && t <= 180;
|
|
414
|
-
},
|
|
414
|
+
}, Nt = (e) => Array.isArray(e) && e.length === 2 && Re(e[0]) && Ee(e[1]), Se = (e) => {
|
|
415
415
|
if (typeof e != "object" || e === null)
|
|
416
416
|
return !1;
|
|
417
417
|
const t = e;
|
|
@@ -439,7 +439,7 @@ const Ge = Ie({
|
|
|
439
439
|
const x = [...p.map((R) => [R.lng, R.lat]), ..._];
|
|
440
440
|
return x.length === 0 ? null : x.reduce((R, [E, C]) => R.extend([E, C]), new be.LngLatBounds());
|
|
441
441
|
}, [p, _]);
|
|
442
|
-
return
|
|
442
|
+
return k(() => {
|
|
443
443
|
if (u) {
|
|
444
444
|
g.current = s !== void 0 ? he(s) : "__initial_skip__";
|
|
445
445
|
return;
|
|
@@ -549,8 +549,8 @@ const ke = async (e, t, n) => {
|
|
|
549
549
|
getIsochrone: ft,
|
|
550
550
|
getItinerary: pt
|
|
551
551
|
}, gt = ({ origin: e, profile: t = "driving", intervals: n = [5, 10, 15], onIsochroneLoaded: a }) => {
|
|
552
|
-
const [o, l] =
|
|
553
|
-
return
|
|
552
|
+
const [o, l] = F(null);
|
|
553
|
+
return k(() => {
|
|
554
554
|
let s = !1;
|
|
555
555
|
if (!e || e.length !== 2) {
|
|
556
556
|
l(null);
|
|
@@ -617,10 +617,10 @@ const ke = async (e, t, n) => {
|
|
|
617
617
|
findNearest: Rt,
|
|
618
618
|
getItinerary: Et
|
|
619
619
|
}, Oe = ({ from: e, to: t, profile: n, engine: a, itineraryLineStyle: o, initialRoute: l, onRouteComputed: s, itineraryLabel: u }) => {
|
|
620
|
-
const [d, g] =
|
|
621
|
-
return
|
|
620
|
+
const [d, g] = F(l ?? null);
|
|
621
|
+
return k(() => {
|
|
622
622
|
l && (g(l), s?.(l));
|
|
623
|
-
}, [l, s]),
|
|
623
|
+
}, [l, s]), k(() => {
|
|
624
624
|
!(e && t) || l || (async () => {
|
|
625
625
|
const _ = await (a === "OSRM" ? Ae : K).getItinerary(e, t, n);
|
|
626
626
|
g(_ ?? null), s?.(_ ?? null);
|
|
@@ -636,10 +636,10 @@ const ke = async (e, t, n) => {
|
|
|
636
636
|
profile: s = "driving",
|
|
637
637
|
engine: u = "OSRM"
|
|
638
638
|
}) => {
|
|
639
|
-
const [d, g] =
|
|
640
|
-
|
|
639
|
+
const [d, g] = F(o ?? []), p = ae(null);
|
|
640
|
+
k(() => {
|
|
641
641
|
o && g(o);
|
|
642
|
-
}, [o]),
|
|
642
|
+
}, [o]), k(() => {
|
|
643
643
|
const b = new AbortController();
|
|
644
644
|
if (o?.length) return;
|
|
645
645
|
if (!e || e.length !== 2 || !n?.length) {
|
|
@@ -652,13 +652,18 @@ const ke = async (e, t, n) => {
|
|
|
652
652
|
id: E.id
|
|
653
653
|
}));
|
|
654
654
|
return (u === "OSRM" ? Ae : K).findNearest(e, x, s, t).then((E) => g(E ?? [])).catch(() => g([])), () => b.abort();
|
|
655
|
-
}, [e, t, n, s, u, o?.length]),
|
|
655
|
+
}, [e, t, n, s, u, o?.length]), k(() => {
|
|
656
656
|
const b = p.current;
|
|
657
657
|
(!b || b.length !== d.length || b.some((R, E) => R.id !== d[E]?.id || R.distance !== d[E]?.distance)) && (a?.(d), p.current = d);
|
|
658
658
|
}, [d, a]);
|
|
659
659
|
const _ = d[0];
|
|
660
660
|
return _ ? _.routeFeature ? /* @__PURE__ */ f.jsx(ee, { features: _.routeFeature }) : /* @__PURE__ */ f.jsx(Oe, { from: e, to: _.point, profile: s, engine: u, itineraryLineStyle: l }) : null;
|
|
661
|
-
}, Tt = le(St),
|
|
661
|
+
}, Tt = le(St), jt = ({ children: e }) => {
|
|
662
|
+
const [t, n] = F(!1);
|
|
663
|
+
return k(() => {
|
|
664
|
+
queueMicrotask(() => n(!0));
|
|
665
|
+
}, []), t ? e : null;
|
|
666
|
+
}, oe = {
|
|
662
667
|
satellite: "mapbox://styles/mapbox/satellite-streets-v12",
|
|
663
668
|
street: {
|
|
664
669
|
dark: "mapbox://styles/mapbox/dark-v11",
|
|
@@ -672,7 +677,7 @@ const ke = async (e, t, n) => {
|
|
|
672
677
|
default:
|
|
673
678
|
return n ? oe.street.dark : oe.street.light;
|
|
674
679
|
}
|
|
675
|
-
},
|
|
680
|
+
}, kt = ({
|
|
676
681
|
mapStyle: e,
|
|
677
682
|
theme: t,
|
|
678
683
|
baseMapView: n,
|
|
@@ -683,7 +688,7 @@ const ke = async (e, t, n) => {
|
|
|
683
688
|
doubleClickZoom: a,
|
|
684
689
|
failIfMajorPerformanceCaveat: !1,
|
|
685
690
|
style: e ?? Me(n, t)
|
|
686
|
-
}),
|
|
691
|
+
}), wt = ({
|
|
687
692
|
containerStyle: e,
|
|
688
693
|
square: t,
|
|
689
694
|
loading: n,
|
|
@@ -702,38 +707,38 @@ const ke = async (e, t, n) => {
|
|
|
702
707
|
disableAnimation: E,
|
|
703
708
|
mapStyle: C,
|
|
704
709
|
onMapClick: W,
|
|
705
|
-
baseMapView:
|
|
710
|
+
baseMapView: N,
|
|
706
711
|
cooperativeGestures: te = !0,
|
|
707
712
|
doubleClickZoom: re = !0,
|
|
708
713
|
projection: ne,
|
|
709
|
-
theme:
|
|
710
|
-
features:
|
|
714
|
+
theme: D,
|
|
715
|
+
features: U,
|
|
711
716
|
itineraryParams: T,
|
|
712
717
|
findNearestMarker: S,
|
|
713
718
|
isochrone: A
|
|
714
719
|
}) => {
|
|
715
|
-
const
|
|
720
|
+
const Y = xe(), P = ae(null), [L, I] = F(d ?? null), [$, G] = F(!1), q = M(() => {
|
|
716
721
|
const [i = 2.3522, v = 48.8566] = ce(l) ? l : [];
|
|
717
722
|
return { latitude: v, longitude: i, zoom: s };
|
|
718
|
-
}, [l, s]),
|
|
719
|
-
() => C || Me(
|
|
720
|
-
[
|
|
723
|
+
}, [l, s]), z = M(
|
|
724
|
+
() => C || Me(N, D ?? Y.palette.mode),
|
|
725
|
+
[N, C, D, Y.palette.mode]
|
|
721
726
|
), {
|
|
722
|
-
style:
|
|
727
|
+
style: J,
|
|
723
728
|
cooperativeGestures: X,
|
|
724
729
|
doubleClickZoom: r
|
|
725
|
-
} =
|
|
726
|
-
baseMapView:
|
|
730
|
+
} = kt({
|
|
731
|
+
baseMapView: N,
|
|
727
732
|
cooperativeGestures: te,
|
|
728
733
|
doubleClickZoom: re,
|
|
729
|
-
mapStyle:
|
|
730
|
-
theme:
|
|
734
|
+
mapStyle: z,
|
|
735
|
+
theme: D ?? Y.palette.mode
|
|
731
736
|
}), c = (i, v) => {
|
|
732
737
|
!g && v && I(i);
|
|
733
738
|
}, y = (i, v) => {
|
|
734
739
|
g && I(v ? i : null);
|
|
735
740
|
};
|
|
736
|
-
|
|
741
|
+
k(() => {
|
|
737
742
|
I(d ?? null);
|
|
738
743
|
}, [d]);
|
|
739
744
|
const m = M(() => L ? p?.find((i) => i.id === L) ?? null : null, [L, p]);
|
|
@@ -741,7 +746,7 @@ const ke = async (e, t, n) => {
|
|
|
741
746
|
H,
|
|
742
747
|
{
|
|
743
748
|
"data-testid": "mapbox-container",
|
|
744
|
-
sx: { borderRadius: t ? 0 :
|
|
749
|
+
sx: { borderRadius: t ? 0 : 1, height: a, overflow: "hidden", position: "relative", width: o, ...e },
|
|
745
750
|
children: [
|
|
746
751
|
/* @__PURE__ */ f.jsx(Fe, { styles: et }),
|
|
747
752
|
n && /* @__PURE__ */ f.jsx(
|
|
@@ -764,18 +769,18 @@ const ke = async (e, t, n) => {
|
|
|
764
769
|
ref: P,
|
|
765
770
|
cooperativeGestures: X,
|
|
766
771
|
doubleClickZoom: r,
|
|
767
|
-
mapStyle:
|
|
772
|
+
mapStyle: J,
|
|
768
773
|
projection: ne,
|
|
769
774
|
onLoad: () => {
|
|
770
775
|
G(!0), P.current?.resize();
|
|
771
776
|
},
|
|
772
|
-
initialViewState:
|
|
777
|
+
initialViewState: q,
|
|
773
778
|
style: { height: "100%", width: "100%" },
|
|
774
779
|
mapboxAccessToken: void 0,
|
|
775
780
|
onClick: (i) => {
|
|
776
781
|
const v = p.find((h) => {
|
|
777
|
-
const { lng: j, lat: O } = i.lngLat,
|
|
778
|
-
return
|
|
782
|
+
const { lng: j, lat: O } = i.lngLat, w = Math.abs(Number(h.lng ?? 0) - j), Pe = Math.abs(Number(h.lat ?? 0) - O);
|
|
783
|
+
return w < 0.01 && Pe < 0.01;
|
|
779
784
|
});
|
|
780
785
|
W?.(i.lngLat.lng, i.lngLat.lat, v ?? null);
|
|
781
786
|
},
|
|
@@ -784,8 +789,8 @@ const ke = async (e, t, n) => {
|
|
|
784
789
|
const v = typeof i.size == "number" ? i.size : void 0, h = (() => {
|
|
785
790
|
if (!i.IconComponent)
|
|
786
791
|
return null;
|
|
787
|
-
const
|
|
788
|
-
return v && (
|
|
792
|
+
const w = { ...i.iconProps };
|
|
793
|
+
return v && (w.width = v, w.height = v), /* @__PURE__ */ f.jsx(i.IconComponent, { ...w });
|
|
789
794
|
})(), j = i.IconComponent ? null : /* @__PURE__ */ f.jsx(Ke, { color: i.color, variant: i.variant, size: v, type: i.type }), O = {
|
|
790
795
|
alignItems: "center",
|
|
791
796
|
cursor: i.Tooltip ? "pointer" : "default",
|
|
@@ -799,8 +804,8 @@ const ke = async (e, t, n) => {
|
|
|
799
804
|
longitude: i.lng,
|
|
800
805
|
latitude: i.lat,
|
|
801
806
|
anchor: "center",
|
|
802
|
-
onClick: (
|
|
803
|
-
|
|
807
|
+
onClick: (w) => {
|
|
808
|
+
w.originalEvent.stopPropagation(), i.id && c(i.id, !!i.Tooltip), W?.(i.lng, i.lat, i);
|
|
804
809
|
},
|
|
805
810
|
children: /* @__PURE__ */ f.jsx(
|
|
806
811
|
H,
|
|
@@ -826,7 +831,7 @@ const ke = async (e, t, n) => {
|
|
|
826
831
|
maxWidth: u,
|
|
827
832
|
closeOnClick: !0,
|
|
828
833
|
closeOnMove: !1,
|
|
829
|
-
children: /* @__PURE__ */ f.jsx(H, {
|
|
834
|
+
children: /* @__PURE__ */ f.jsx(H, { sx: { minHeight: 60, minWidth: 240 }, children: /* @__PURE__ */ f.jsx(jt, { children: m.Tooltip }) })
|
|
830
835
|
}
|
|
831
836
|
),
|
|
832
837
|
T && /* @__PURE__ */ f.jsx(
|
|
@@ -864,12 +869,12 @@ const ke = async (e, t, n) => {
|
|
|
864
869
|
intervals: A.intervals
|
|
865
870
|
}
|
|
866
871
|
),
|
|
867
|
-
|
|
872
|
+
U && /* @__PURE__ */ f.jsx(ee, { features: U }),
|
|
868
873
|
_ && /* @__PURE__ */ f.jsx(
|
|
869
874
|
rt,
|
|
870
875
|
{
|
|
871
876
|
markers: p,
|
|
872
|
-
features:
|
|
877
|
+
features: U,
|
|
873
878
|
padding: b,
|
|
874
879
|
duration: E ? 0 : x,
|
|
875
880
|
animationKey: R,
|
|
@@ -882,7 +887,7 @@ const ke = async (e, t, n) => {
|
|
|
882
887
|
]
|
|
883
888
|
}
|
|
884
889
|
);
|
|
885
|
-
},
|
|
890
|
+
}, Dt = le(wt), Ut = ["OSRM", "Mapbox"], Yt = ["driving", "walking", "cycling"], Bt = (e, t) => {
|
|
886
891
|
const n = "geometry" in t ? t.geometry : t, [a, o] = e, l = (s) => s.map(
|
|
887
892
|
(u) => u.reduce((d, [g, p], _, b) => {
|
|
888
893
|
const [x, R] = b[(_ - 1 + b.length) % b.length];
|
|
@@ -892,15 +897,15 @@ const ke = async (e, t, n) => {
|
|
|
892
897
|
return n.type === "Polygon" ? l(n.coordinates) : n.type === "MultiPolygon" ? n.coordinates.some((s) => l(s)) : !1;
|
|
893
898
|
};
|
|
894
899
|
export {
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
900
|
+
$t as DEFAULT_CENTER_LAT,
|
|
901
|
+
It as DEFAULT_CENTER_LNG,
|
|
902
|
+
Ft as MapProvider,
|
|
903
|
+
Dt as MapView,
|
|
904
|
+
Ut as engines,
|
|
905
|
+
Bt as isPointInGeoJSON,
|
|
906
|
+
Nt as isValidLatLngTuple,
|
|
902
907
|
Re as isValidLatitude,
|
|
903
908
|
Ee as isValidLongitude,
|
|
904
909
|
Se as isValidMarker,
|
|
905
|
-
|
|
910
|
+
Yt as profiles
|
|
906
911
|
};
|
package/dist/main.umd.cjs
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
<%s {...props} />
|
|
21
21
|
React keys must be passed directly to JSX without using spread:
|
|
22
22
|
let props = %s;
|
|
23
|
-
<%s key={someKey} {...props} />`,y,b,w,b),ee[b+y]=!0)}if(b=null,h!==void 0&&(r(h),b=""+h),s(c)&&(r(c.key),b=""+c.key),"key"in c){h={};for(var N in c)N!=="key"&&(h[N]=c[N])}else h=c;return b&&u(h,typeof n=="function"?n.displayName||n.name||"Unknown":n),m(n,b,h,o(),i,v)}function x(n){_(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===k&&(n._payload.status==="fulfilled"?_(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function _(n){return typeof n=="object"&&n!==null&&n.$$typeof===S}var R=d,S=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),I=R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,D=Array.isArray,U=console.createTask?console.createTask:function(){return null};R={react_stack_bottom_frame:function(n){return n()}};var Q,K={},$=R.react_stack_bottom_frame.bind(R,l)(),q=U(a(l)),ee={};B.Fragment=P,B.jsx=function(n,c,h){var y=1e4>I.recentlyCreatedOwnerStacks++;return g(n,c,h,!1,y?Error("react-stack-top-frame"):$,y?U(a(n)):q)},B.jsxs=function(n,c,h){var y=1e4>I.recentlyCreatedOwnerStacks++;return g(n,c,h,!0,y?Error("react-stack-top-frame"):$,y?U(a(n)):q)}})()),B}var ge;function Ae(){return ge||(ge=1,process.env.NODE_ENV==="production"?z.exports=ke():z.exports=je()),z.exports}var p=Ae();const we=d.createContext({licenceMapbox:"",licenseMuiX:""}),Ce=({children:e,licenseMuiX:t,licenceMapbox:r})=>{d.useEffect(()=>{t&&Te.LicenseInfo.setLicenseKey(t)},[t]);const a=d.useMemo(()=>({licenceMapbox:r,licenseMuiX:t}),[t,r]);return r&&(fe.accessToken=r),p.jsx(we.Provider,{value:a,children:e})},Le=e=>e?.type==="LineString"||e?.type==="MultiLineString",Oe=e=>{let t;Array.isArray(e[0][0])?t=e.reduce((o,l)=>l.length>o.length?l:o):t=e;const r=Math.floor(t.length/2);return[t[r][0],t[r][1]]},Pe=({route:e,children:t})=>{if(!(e&&t))return null;const r=e.geometry;if(!Le(r))return null;const a=r.coordinates,[o,l]=Oe(a);return p.jsx(C.Marker,{longitude:o,latitude:l,children:t})},Me=e=>A.isArray(e)?{features:e,type:"FeatureCollection"}:e.type==="FeatureCollection"?e:{features:[e],type:"FeatureCollection"},X=({features:e,lineLabel:t,lineStyle:r})=>{if(!e)return null;const a=Me(e),o=a.features.filter(s=>s.geometry.type==="Polygon"||s.geometry.type==="MultiPolygon"),l=a.features.filter(s=>s.geometry.type==="LineString"||s.geometry.type==="MultiLineString");return p.jsxs(p.Fragment,{children:[o.length>0&&p.jsx(C.Source,{id:"features-polygon",type:"geojson",data:{features:o,type:"FeatureCollection"},children:p.jsx(C.Layer,{id:"polygon-fill",type:"fill",paint:{"fill-color":["coalesce",["get","color"],"#4ADE80"],"fill-opacity":["coalesce",["get","opacity"],.4]}})}),l.length>0&&p.jsxs(p.Fragment,{children:[p.jsx(C.Source,{id:"features-line",type:"geojson",data:{features:l,type:"FeatureCollection"},children:p.jsx(C.Layer,{id:"line-stroke",type:"line",paint:{"line-color":r?.color??["coalesce",["get","color"],"#3B82F6"],"line-opacity":r?.opacity??["coalesce",["get","opacity"],.9],"line-width":r?.width??["coalesce",["get","width"],3]}})}),t&&l.map((s,u)=>p.jsx(Pe,{route:s,children:t},`label-${u}`))]})]})},Ne="#000000",Ie="#FFFFFF",te={default:"#009ba6",primary:"#3F83F8",secondary:"#9C27B0",success:"#4CAF50",warning:"#FF9800"},Fe=e=>e in te,De=({color:e,variant:t,type:r,size:a=28})=>{const o=O.useTheme(),l=o.palette.mode==="dark"?Ne:Ie,s=Math.max(3,Math.round(a*.25)),u=(()=>{if(r==="dropOff")return"#4e85e1";if(t&&Fe(t))return te[t];if(!e)return te.default;if(typeof e=="function")return e(o);if(A.isString(e)&&e.includes(".")){const[f,m]=e.split("."),g=o.palette[f];if(g&&typeof g=="object"&&m in g)return g[m]}return e})();return p.jsx(O.Box,{component:"div",style:{backgroundColor:l,border:`${s}px solid ${u}`,borderRadius:"50%",boxShadow:"0 0 4px rgba(0,0,0,0.3)",height:a,width:a}})},Ue=e=>({".mapboxgl-popup-close-button":{color:e.palette.mode==="dark"?"#fff !important":"#000 !important",fontSize:"20px !important"},".mapboxgl-popup-content":{backgroundColor:"transparent!important",borderRadius:"0px !important",boxShadow:"none!important",padding:"0px 0px!important",width:"fit-content!important"},".mapboxgl-popup-tip":{borderTopColor:`${e.palette.mode==="dark"?"#1e1e1e":"#ffffff"} !important`}}),me=e=>{if(A.isNumber(e))return e;if(A.isString(e)&&e.trim()!==""){const t=Number(e);return Number.isFinite(t)?t:null}return null},ne=e=>{const t=me(e);return t!==null&&t>=-90&&t<=90},re=e=>{const t=me(e);return t!==null&&t>=-180&&t<=180},Ye=e=>Array.isArray(e)&&e.length===2&&ne(e[0])&&re(e[1]),oe=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return(typeof t.id=="string"||typeof t.id=="number"||t.id===void 0)&&ne(t.lat)&&re(t.lng)},ye=e=>A.isString(e)||A.isNumber(e)?String(e):JSON.stringify(e),Be=e=>{if(!e)return[];const t=A.isArray(e)?e:e.type==="FeatureCollection"?e.features:[e],r=[];for(const a of t){const o=a.geometry;o.type==="Point"&&r.push(o.coordinates),o.type==="LineString"&&r.push(...o.coordinates),o.type==="Polygon"&&r.push(...o.coordinates[0])}return r},Ve=({markers:e=[],features:t,padding:r=50,duration:a=1e3,disableAnimation:o,fitBounds:l=!0,animationKey:s,openPopup:u})=>{const{current:f}=C.useMap(),m=d.useRef(""),g=d.useMemo(()=>e.filter(oe),[e]),x=d.useMemo(()=>Be(t),[t]),_=d.useMemo(()=>{const R=[...g.map(S=>[S.lng,S.lat]),...x];return R.length===0?null:R.reduce((S,[T,P])=>S.extend([T,P]),new fe.LngLatBounds)},[g,x]);return d.useEffect(()=>{if(u){m.current=s!==void 0?ye(s):"__initial_skip__";return}if(f&&l&&_){if(s!==void 0){const R=ye(s);if(m.current===R)return;m.current=R}else if(m.current==="__initial_skip__")return;if(!_.isEmpty()){if(g.length===1&&x.length===0){const R=g[0];f.flyTo({center:[R.lng,R.lat],duration:o?0:a,zoom:14});return}f.fitBounds([_.getSouthWest().toArray(),_.getNorthEast().toArray()],{duration:o?0:a,padding:r})}}},[f,_,r,a,o,s,l,g,x,u]),null},he=(e,t)=>{if(t<=0)throw new Error("chunkSize must be greater than 0");const r=[];for(let a=0;a<e.length;a+=t)r.push(e.slice(a,a+t));return r},Ge=(e,t)=>[e,...t.map(r=>r.coords)].map(r=>r.join(",")).join(";"),We=(e,t,r)=>{const a=t.map((s,u)=>{if(u===0||s==null)return null;const f=e[u-1];return f?{distance:s,id:f.id,point:f.coords}:null}).filter(s=>s!==null);if(a.length===0)return{all:[],nearest:null};const o=a.sort((s,u)=>s.distance-u.distance),l=o[0];return r&&l.distance>r?{all:o,nearest:null}:{all:o,nearest:l}};function be(e,t,r){return async(a,o,l,s)=>{const u=Ge(a,o),f=e(u,l),m=await t(f),g=m?r(m)?.[0]:void 0;return g?.length?We(o,g,s):{all:[],nearest:null}}}const Ee=async(e,t,r)=>{const a=Array.from({length:Math.ceil(e.length/t)},(l,s)=>e.slice(s*t,(s+1)*t));return(await Promise.all(a.map(async l=>Promise.all(l.map(r))))).flat()},Je="https://api.mapbox.com",se=(e,t,r,a,o={})=>{const l=new URLSearchParams({access_token:"",...o});return`${Je}/${e}/${t}/mapbox/${r}/${a}?${l.toString()}`},ae=async e=>{try{const t=await fetch(e);return t.ok?await t.json():(console.error(`Mapbox API error: ${t.status} ${t.statusText}`),null)}catch(t){return console.error("Mapbox network error:",t),null}},ze=25,Xe=5,Ze=be((e,t)=>se("directions-matrix","v1",t,e,{annotations:"distance",sources:"0"}),ae,e=>e.distances??void 0),Z={findNearest:async(e,t,r="driving",a)=>{if(!t.length)return[];const o=he(t,ze-1);return(await Ee(o,Xe,s=>Ze(e,s,r,a))).flatMap(s=>s.all).sort((s,u)=>s.distance-u.distance)},getIsochrone:async(e,t="driving",r=[5,10,15])=>{const a=`${e[0]},${e[1]}`,o=se("isochrone","v1",t,a,{contours_minutes:r.join(","),polygons:"true"});return await ae(o)},getItinerary:async(e,t,r="driving")=>{const a=`${e.join(",")};${t.join(",")}`,o=se("directions","v5",r,a,{geometries:"geojson",overview:"full"}),l=await ae(o);if(!l?.routes?.length)return null;const s=l.routes[0];return{geometry:s.geometry,properties:{distance:s.distance,duration:s.duration},type:"Feature"}}},He=({origin:e,profile:t="driving",intervals:r=[5,10,15],onIsochroneLoaded:a})=>{const[o,l]=d.useState(null);return d.useEffect(()=>{let s=!1;if(!e||e.length!==2){l(null);return}return(async()=>{if(!Z.getIsochrone){console.warn("⚠️ getIsochrone is not implemented for this provider.");return}const u=await Z.getIsochrone(e,t,r);s||(l(u),a?.(u??null))})(),()=>{s=!0}},[e,t,r,a]),o?p.jsx(X,{features:o}):null},Qe=d.memo(He),Ke={cycling:"routed-bike",driving:"routed-car",walking:"routed-foot"},$e="https://routing.openstreetmap.de",_e=(e,t,r,a)=>{const o=`${$e}/${Ke[t]}/${e}/v1/${t}/${r}`,l=a?`?${new URLSearchParams(a).toString()}`:"";return`${o}${l}`},Re=async e=>{try{const t=await fetch(e);return t.ok?await t.json():(console.error("OSRM API error:",t.status,t.statusText),null)}catch(t){return console.error("Error fetching OSRM API:",t),null}},qe=100,et=5,tt=be((e,t)=>_e("table",t,e,{annotations:"distance",sources:0}),Re,e=>e.distances??void 0),ve={findNearest:async(e,t,r="driving",a)=>{if(!t.length)return[];const o=he(t,qe-1);return(await Ee(o,et,s=>tt(e,s,r,a))).flatMap(s=>s.all).sort((s,u)=>s.distance-u.distance)},getItinerary:async(e,t,r="driving")=>{const a=`${e.join(",")};${t.join(",")}`,o=_e("route",r,a,{geometries:"geojson",overview:"full"}),l=await Re(o);if(!l?.routes?.length)return null;const s=l.routes[0];return{geometry:s.geometry,properties:{distance:s.distance,duration:s.duration},type:"Feature"}}},xe=({from:e,to:t,profile:r,engine:a,itineraryLineStyle:o,initialRoute:l,onRouteComputed:s,itineraryLabel:u})=>{const[f,m]=d.useState(l??null);return d.useEffect(()=>{l&&(m(l),s?.(l))},[l,s]),d.useEffect(()=>{!(e&&t)||l||(async()=>{const x=await(a==="OSRM"?ve:Z).getItinerary(e,t,r);m(x??null),s?.(x??null)})()},[e,t,r,a,l,s]),f?p.jsx(X,{features:f,lineStyle:o,lineLabel:u}):null},nt=({origin:e,maxDistanceMeters:t,destinations:r,onNearestFound:a,initialNearestResults:o,itineraryLineStyle:l,profile:s="driving",engine:u="OSRM"})=>{const[f,m]=d.useState(o??[]),g=d.useRef(null);d.useEffect(()=>{o&&m(o)},[o]),d.useEffect(()=>{const _=new AbortController;if(o?.length)return;if(!e||e.length!==2||!r?.length){m([]);return}m([]);const R=r.map(T=>({coords:[T.lng,T.lat],id:T.id}));return(u==="OSRM"?ve:Z).findNearest(e,R,s,t).then(T=>m(T??[])).catch(()=>m([])),()=>_.abort()},[e,t,r,s,u,o?.length]),d.useEffect(()=>{const _=g.current;(!_||_.length!==f.length||_.some((S,T)=>S.id!==f[T]?.id||S.distance!==f[T]?.distance))&&(a?.(f),g.current=f)},[f,a]);const x=f[0];return x?x.routeFeature?p.jsx(X,{features:x.routeFeature}):p.jsx(xe,{from:e,to:x.point,profile:s,engine:u,itineraryLineStyle:l}):null},rt=d.memo(nt),le={satellite:"mapbox://styles/mapbox/satellite-streets-v12",street:{dark:"mapbox://styles/mapbox/dark-v11",light:"mapbox://styles/mapbox/streets-v12"}},Se=(e,t)=>{const r=t==="dark";switch(e){case"satellite":return le.satellite;default:return r?le.street.dark:le.street.light}},ot=({mapStyle:e,theme:t,baseMapView:r,doubleClickZoom:a,cooperativeGestures:o})=>({cooperativeGestures:o,doubleClickZoom:a,failIfMajorPerformanceCaveat:!1,style:e??Se(r,t)}),st=({containerStyle:e,square:t,loading:r,height:a=300,width:o="100%",center:l=[2.3522,48.8566],zoom:s=5,popupMaxWidth:u,openPopup:f,openPopupOnHover:m,markers:g=[],fitBounds:x=!0,fitBoundsPadding:_,fitBoundDuration:R,fitBoundsAnimationKey:S,disableAnimation:T,mapStyle:P,onMapClick:H,baseMapView:V,cooperativeGestures:ce=!0,doubleClickZoom:ie=!0,projection:ue,theme:G,features:W,itineraryParams:j,findNearestMarker:k,isochrone:M})=>{const J=O.useTheme(),I=d.useRef(null),[F,D]=d.useState(f??null),[U,Q]=d.useState(!1),K=d.useMemo(()=>{const[i=2.3522,v=48.8566]=A.isArray(l)?l:[];return{latitude:v,longitude:i,zoom:s}},[l,s]),$=d.useMemo(()=>P||Se(V,G??J.palette.mode),[V,P,G,J.palette.mode]),{style:q,cooperativeGestures:ee,doubleClickZoom:n}=ot({baseMapView:V,cooperativeGestures:ce,doubleClickZoom:ie,mapStyle:$,theme:G??J.palette.mode}),c=(i,v)=>{!m&&v&&D(i)},h=(i,v)=>{m&&D(v?i:null)};d.useEffect(()=>{D(f??null)},[f]);const y=d.useMemo(()=>F?g?.find(i=>i.id===F)??null:null,[F,g]);return p.jsxs(O.Box,{"data-testid":"mapbox-container",sx:{borderRadius:t?0:6,height:a,overflow:"hidden",position:"relative",width:o,...e},children:[p.jsx(O.GlobalStyles,{styles:Ue}),r&&p.jsx(O.Skeleton,{"data-testid":"skeleton-loader",width:o,height:a,variant:t?"rectangular":"rounded",sx:{inset:0,position:"absolute",zIndex:2}}),!r&&p.jsxs(C,{ref:I,cooperativeGestures:ee,doubleClickZoom:n,mapStyle:q,projection:ue,onLoad:()=>{Q(!0),I.current?.resize()},initialViewState:K,style:{height:"100%",width:"100%"},mapboxAccessToken:void 0,onClick:i=>{const v=g.find(b=>{const{lng:w,lat:N}=i.lngLat,L=Math.abs(Number(b.lng??0)-w),ut=Math.abs(Number(b.lat??0)-N);return L<.01&&ut<.01});H?.(i.lngLat.lng,i.lngLat.lat,v??null)},children:[U&&g.filter(oe).map(i=>{const v=typeof i.size=="number"?i.size:void 0,b=(()=>{if(!i.IconComponent)return null;const L={...i.iconProps};return v&&(L.width=v,L.height=v),p.jsx(i.IconComponent,{...L})})(),w=i.IconComponent?null:p.jsx(De,{color:i.color,variant:i.variant,size:v,type:i.type}),N={alignItems:"center",cursor:i.Tooltip?"pointer":"default",display:"inline-flex",justifyContent:"center",...i.IconComponent&&!v?{}:v?{height:v,width:v}:{}};return p.jsx(C.Marker,{longitude:i.lng,latitude:i.lat,anchor:"center",onClick:L=>{L.originalEvent.stopPropagation(),i.id&&c(i.id,!!i.Tooltip),H?.(i.lng,i.lat,i)},children:p.jsx(O.Box,{component:"div",onMouseEnter:()=>i.id&&h(i.id,!!i.Tooltip),onMouseLeave:()=>h(null),style:N,children:b||w})},i.id)}),U&&y?.Tooltip&&p.jsx(C.Popup,{longitude:A.isNumber(y.lng)?y.lng:0,latitude:A.isNumber(y.lat)?y.lat:0,anchor:"top",onClose:()=>D(null),maxWidth:u,closeOnClick:!0,closeOnMove:!1,children:p.jsx(O.Box,{component:"div",sx:{minHeight:60,minWidth:240},children:y.Tooltip})}),j&&p.jsx(xe,{from:j.from,to:j.to,profile:j.profile,engine:j.engine,itineraryLineStyle:j.itineraryLineStyle,initialRoute:j.initialRoute,onRouteComputed:j.onRouteComputed,itineraryLabel:j.itineraryLabel}),k&&p.jsx(rt,{origin:k.origin,destinations:k.destinations,onNearestFound:k.onNearestFound,maxDistanceMeters:k.maxDistanceMeters,engine:k.engine,profile:k.profile,initialNearestResults:k.initialNearestResults,itineraryLineStyle:k.itineraryLineStyle}),M&&p.jsx(Qe,{origin:M.origin,profile:M.profile,onIsochroneLoaded:M.onIsochroneLoaded,intervals:M.intervals}),W&&p.jsx(X,{features:W}),x&&p.jsx(Ve,{markers:g,features:W,padding:_,duration:T?0:R,animationKey:S,openPopup:!!f})]})]})},at=d.memo(st),lt=["OSRM","Mapbox"],ct=["driving","walking","cycling"],it=(e,t)=>{const r="geometry"in t?t.geometry:t,[a,o]=e,l=s=>s.map(u=>u.reduce((f,[m,g],x,_)=>{const[R,S]=_[(x-1+_.length)%_.length];return g>o!=S>o&&a<(R-m)*(o-g)/(S-g)+m?!f:f},!1)).reduce((u,f,m)=>m===0?f:u&&!f,!1);return r.type==="Polygon"?l(r.coordinates):r.type==="MultiPolygon"?r.coordinates.some(s=>l(s)):!1};E.DEFAULT_CENTER_LAT=46.8677,E.DEFAULT_CENTER_LNG=2.333,E.MapProvider=Ce,E.MapView=at,E.engines=lt,E.isPointInGeoJSON=it,E.isValidLatLngTuple=Ye,E.isValidLatitude=ne,E.isValidLongitude=re,E.isValidMarker=oe,E.profiles=ct,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|
|
23
|
+
<%s key={someKey} {...props} />`,y,b,w,b),ee[b+y]=!0)}if(b=null,h!==void 0&&(r(h),b=""+h),s(c)&&(r(c.key),b=""+c.key),"key"in c){h={};for(var N in c)N!=="key"&&(h[N]=c[N])}else h=c;return b&&u(h,typeof n=="function"?n.displayName||n.name||"Unknown":n),m(n,b,h,o(),i,v)}function x(n){_(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===k&&(n._payload.status==="fulfilled"?_(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function _(n){return typeof n=="object"&&n!==null&&n.$$typeof===S}var R=d,S=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),I=R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,D=Array.isArray,U=console.createTask?console.createTask:function(){return null};R={react_stack_bottom_frame:function(n){return n()}};var Q,K={},$=R.react_stack_bottom_frame.bind(R,l)(),q=U(a(l)),ee={};B.Fragment=P,B.jsx=function(n,c,h){var y=1e4>I.recentlyCreatedOwnerStacks++;return g(n,c,h,!1,y?Error("react-stack-top-frame"):$,y?U(a(n)):q)},B.jsxs=function(n,c,h){var y=1e4>I.recentlyCreatedOwnerStacks++;return g(n,c,h,!0,y?Error("react-stack-top-frame"):$,y?U(a(n)):q)}})()),B}var ge;function Ae(){return ge||(ge=1,process.env.NODE_ENV==="production"?z.exports=ke():z.exports=je()),z.exports}var p=Ae();const we=d.createContext({licenceMapbox:"",licenseMuiX:""}),Ce=({children:e,licenseMuiX:t,licenceMapbox:r})=>{d.useEffect(()=>{t&&Te.LicenseInfo.setLicenseKey(t)},[t]);const a=d.useMemo(()=>({licenceMapbox:r,licenseMuiX:t}),[t,r]);return r&&(fe.accessToken=r),p.jsx(we.Provider,{value:a,children:e})},Le=e=>e?.type==="LineString"||e?.type==="MultiLineString",Oe=e=>{let t;Array.isArray(e[0][0])?t=e.reduce((o,l)=>l.length>o.length?l:o):t=e;const r=Math.floor(t.length/2);return[t[r][0],t[r][1]]},Pe=({route:e,children:t})=>{if(!(e&&t))return null;const r=e.geometry;if(!Le(r))return null;const a=r.coordinates,[o,l]=Oe(a);return p.jsx(C.Marker,{longitude:o,latitude:l,children:t})},Me=e=>A.isArray(e)?{features:e,type:"FeatureCollection"}:e.type==="FeatureCollection"?e:{features:[e],type:"FeatureCollection"},X=({features:e,lineLabel:t,lineStyle:r})=>{if(!e)return null;const a=Me(e),o=a.features.filter(s=>s.geometry.type==="Polygon"||s.geometry.type==="MultiPolygon"),l=a.features.filter(s=>s.geometry.type==="LineString"||s.geometry.type==="MultiLineString");return p.jsxs(p.Fragment,{children:[o.length>0&&p.jsx(C.Source,{id:"features-polygon",type:"geojson",data:{features:o,type:"FeatureCollection"},children:p.jsx(C.Layer,{id:"polygon-fill",type:"fill",paint:{"fill-color":["coalesce",["get","color"],"#4ADE80"],"fill-opacity":["coalesce",["get","opacity"],.4]}})}),l.length>0&&p.jsxs(p.Fragment,{children:[p.jsx(C.Source,{id:"features-line",type:"geojson",data:{features:l,type:"FeatureCollection"},children:p.jsx(C.Layer,{id:"line-stroke",type:"line",paint:{"line-color":r?.color??["coalesce",["get","color"],"#3B82F6"],"line-opacity":r?.opacity??["coalesce",["get","opacity"],.9],"line-width":r?.width??["coalesce",["get","width"],3]}})}),t&&l.map((s,u)=>p.jsx(Pe,{route:s,children:t},`label-${u}`))]})]})},Ne="#000000",Ie="#FFFFFF",te={default:"#009ba6",primary:"#3F83F8",secondary:"#9C27B0",success:"#4CAF50",warning:"#FF9800"},Fe=e=>e in te,De=({color:e,variant:t,type:r,size:a=28})=>{const o=O.useTheme(),l=o.palette.mode==="dark"?Ne:Ie,s=Math.max(3,Math.round(a*.25)),u=(()=>{if(r==="dropOff")return"#4e85e1";if(t&&Fe(t))return te[t];if(!e)return te.default;if(typeof e=="function")return e(o);if(A.isString(e)&&e.includes(".")){const[f,m]=e.split("."),g=o.palette[f];if(g&&typeof g=="object"&&m in g)return g[m]}return e})();return p.jsx(O.Box,{component:"div",style:{backgroundColor:l,border:`${s}px solid ${u}`,borderRadius:"50%",boxShadow:"0 0 4px rgba(0,0,0,0.3)",height:a,width:a}})},Ue=e=>({".mapboxgl-popup-close-button":{color:e.palette.mode==="dark"?"#fff !important":"#000 !important",fontSize:"20px !important"},".mapboxgl-popup-content":{backgroundColor:"transparent!important",borderRadius:"0px !important",boxShadow:"none!important",padding:"0px 0px!important",width:"fit-content!important"},".mapboxgl-popup-tip":{borderTopColor:`${e.palette.mode==="dark"?"#1e1e1e":"#ffffff"} !important`}}),me=e=>{if(A.isNumber(e))return e;if(A.isString(e)&&e.trim()!==""){const t=Number(e);return Number.isFinite(t)?t:null}return null},ne=e=>{const t=me(e);return t!==null&&t>=-90&&t<=90},re=e=>{const t=me(e);return t!==null&&t>=-180&&t<=180},Ye=e=>Array.isArray(e)&&e.length===2&&ne(e[0])&&re(e[1]),oe=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return(typeof t.id=="string"||typeof t.id=="number"||t.id===void 0)&&ne(t.lat)&&re(t.lng)},ye=e=>A.isString(e)||A.isNumber(e)?String(e):JSON.stringify(e),Be=e=>{if(!e)return[];const t=A.isArray(e)?e:e.type==="FeatureCollection"?e.features:[e],r=[];for(const a of t){const o=a.geometry;o.type==="Point"&&r.push(o.coordinates),o.type==="LineString"&&r.push(...o.coordinates),o.type==="Polygon"&&r.push(...o.coordinates[0])}return r},Ve=({markers:e=[],features:t,padding:r=50,duration:a=1e3,disableAnimation:o,fitBounds:l=!0,animationKey:s,openPopup:u})=>{const{current:f}=C.useMap(),m=d.useRef(""),g=d.useMemo(()=>e.filter(oe),[e]),x=d.useMemo(()=>Be(t),[t]),_=d.useMemo(()=>{const R=[...g.map(S=>[S.lng,S.lat]),...x];return R.length===0?null:R.reduce((S,[T,P])=>S.extend([T,P]),new fe.LngLatBounds)},[g,x]);return d.useEffect(()=>{if(u){m.current=s!==void 0?ye(s):"__initial_skip__";return}if(f&&l&&_){if(s!==void 0){const R=ye(s);if(m.current===R)return;m.current=R}else if(m.current==="__initial_skip__")return;if(!_.isEmpty()){if(g.length===1&&x.length===0){const R=g[0];f.flyTo({center:[R.lng,R.lat],duration:o?0:a,zoom:14});return}f.fitBounds([_.getSouthWest().toArray(),_.getNorthEast().toArray()],{duration:o?0:a,padding:r})}}},[f,_,r,a,o,s,l,g,x,u]),null},he=(e,t)=>{if(t<=0)throw new Error("chunkSize must be greater than 0");const r=[];for(let a=0;a<e.length;a+=t)r.push(e.slice(a,a+t));return r},Ge=(e,t)=>[e,...t.map(r=>r.coords)].map(r=>r.join(",")).join(";"),We=(e,t,r)=>{const a=t.map((s,u)=>{if(u===0||s==null)return null;const f=e[u-1];return f?{distance:s,id:f.id,point:f.coords}:null}).filter(s=>s!==null);if(a.length===0)return{all:[],nearest:null};const o=a.sort((s,u)=>s.distance-u.distance),l=o[0];return r&&l.distance>r?{all:o,nearest:null}:{all:o,nearest:l}};function be(e,t,r){return async(a,o,l,s)=>{const u=Ge(a,o),f=e(u,l),m=await t(f),g=m?r(m)?.[0]:void 0;return g?.length?We(o,g,s):{all:[],nearest:null}}}const Ee=async(e,t,r)=>{const a=Array.from({length:Math.ceil(e.length/t)},(l,s)=>e.slice(s*t,(s+1)*t));return(await Promise.all(a.map(async l=>Promise.all(l.map(r))))).flat()},Je="https://api.mapbox.com",se=(e,t,r,a,o={})=>{const l=new URLSearchParams({access_token:"",...o});return`${Je}/${e}/${t}/mapbox/${r}/${a}?${l.toString()}`},ae=async e=>{try{const t=await fetch(e);return t.ok?await t.json():(console.error(`Mapbox API error: ${t.status} ${t.statusText}`),null)}catch(t){return console.error("Mapbox network error:",t),null}},ze=25,Xe=5,Ze=be((e,t)=>se("directions-matrix","v1",t,e,{annotations:"distance",sources:"0"}),ae,e=>e.distances??void 0),Z={findNearest:async(e,t,r="driving",a)=>{if(!t.length)return[];const o=he(t,ze-1);return(await Ee(o,Xe,s=>Ze(e,s,r,a))).flatMap(s=>s.all).sort((s,u)=>s.distance-u.distance)},getIsochrone:async(e,t="driving",r=[5,10,15])=>{const a=`${e[0]},${e[1]}`,o=se("isochrone","v1",t,a,{contours_minutes:r.join(","),polygons:"true"});return await ae(o)},getItinerary:async(e,t,r="driving")=>{const a=`${e.join(",")};${t.join(",")}`,o=se("directions","v5",r,a,{geometries:"geojson",overview:"full"}),l=await ae(o);if(!l?.routes?.length)return null;const s=l.routes[0];return{geometry:s.geometry,properties:{distance:s.distance,duration:s.duration},type:"Feature"}}},He=({origin:e,profile:t="driving",intervals:r=[5,10,15],onIsochroneLoaded:a})=>{const[o,l]=d.useState(null);return d.useEffect(()=>{let s=!1;if(!e||e.length!==2){l(null);return}return(async()=>{if(!Z.getIsochrone){console.warn("⚠️ getIsochrone is not implemented for this provider.");return}const u=await Z.getIsochrone(e,t,r);s||(l(u),a?.(u??null))})(),()=>{s=!0}},[e,t,r,a]),o?p.jsx(X,{features:o}):null},Qe=d.memo(He),Ke={cycling:"routed-bike",driving:"routed-car",walking:"routed-foot"},$e="https://routing.openstreetmap.de",_e=(e,t,r,a)=>{const o=`${$e}/${Ke[t]}/${e}/v1/${t}/${r}`,l=a?`?${new URLSearchParams(a).toString()}`:"";return`${o}${l}`},Re=async e=>{try{const t=await fetch(e);return t.ok?await t.json():(console.error("OSRM API error:",t.status,t.statusText),null)}catch(t){return console.error("Error fetching OSRM API:",t),null}},qe=100,et=5,tt=be((e,t)=>_e("table",t,e,{annotations:"distance",sources:0}),Re,e=>e.distances??void 0),ve={findNearest:async(e,t,r="driving",a)=>{if(!t.length)return[];const o=he(t,qe-1);return(await Ee(o,et,s=>tt(e,s,r,a))).flatMap(s=>s.all).sort((s,u)=>s.distance-u.distance)},getItinerary:async(e,t,r="driving")=>{const a=`${e.join(",")};${t.join(",")}`,o=_e("route",r,a,{geometries:"geojson",overview:"full"}),l=await Re(o);if(!l?.routes?.length)return null;const s=l.routes[0];return{geometry:s.geometry,properties:{distance:s.distance,duration:s.duration},type:"Feature"}}},xe=({from:e,to:t,profile:r,engine:a,itineraryLineStyle:o,initialRoute:l,onRouteComputed:s,itineraryLabel:u})=>{const[f,m]=d.useState(l??null);return d.useEffect(()=>{l&&(m(l),s?.(l))},[l,s]),d.useEffect(()=>{!(e&&t)||l||(async()=>{const x=await(a==="OSRM"?ve:Z).getItinerary(e,t,r);m(x??null),s?.(x??null)})()},[e,t,r,a,l,s]),f?p.jsx(X,{features:f,lineStyle:o,lineLabel:u}):null},nt=({origin:e,maxDistanceMeters:t,destinations:r,onNearestFound:a,initialNearestResults:o,itineraryLineStyle:l,profile:s="driving",engine:u="OSRM"})=>{const[f,m]=d.useState(o??[]),g=d.useRef(null);d.useEffect(()=>{o&&m(o)},[o]),d.useEffect(()=>{const _=new AbortController;if(o?.length)return;if(!e||e.length!==2||!r?.length){m([]);return}m([]);const R=r.map(T=>({coords:[T.lng,T.lat],id:T.id}));return(u==="OSRM"?ve:Z).findNearest(e,R,s,t).then(T=>m(T??[])).catch(()=>m([])),()=>_.abort()},[e,t,r,s,u,o?.length]),d.useEffect(()=>{const _=g.current;(!_||_.length!==f.length||_.some((S,T)=>S.id!==f[T]?.id||S.distance!==f[T]?.distance))&&(a?.(f),g.current=f)},[f,a]);const x=f[0];return x?x.routeFeature?p.jsx(X,{features:x.routeFeature}):p.jsx(xe,{from:e,to:x.point,profile:s,engine:u,itineraryLineStyle:l}):null},rt=d.memo(nt),ot=({children:e})=>{const[t,r]=d.useState(!1);return d.useEffect(()=>{queueMicrotask(()=>r(!0))},[]),t?e:null},le={satellite:"mapbox://styles/mapbox/satellite-streets-v12",street:{dark:"mapbox://styles/mapbox/dark-v11",light:"mapbox://styles/mapbox/streets-v12"}},Se=(e,t)=>{const r=t==="dark";switch(e){case"satellite":return le.satellite;default:return r?le.street.dark:le.street.light}},st=({mapStyle:e,theme:t,baseMapView:r,doubleClickZoom:a,cooperativeGestures:o})=>({cooperativeGestures:o,doubleClickZoom:a,failIfMajorPerformanceCaveat:!1,style:e??Se(r,t)}),at=({containerStyle:e,square:t,loading:r,height:a=300,width:o="100%",center:l=[2.3522,48.8566],zoom:s=5,popupMaxWidth:u,openPopup:f,openPopupOnHover:m,markers:g=[],fitBounds:x=!0,fitBoundsPadding:_,fitBoundDuration:R,fitBoundsAnimationKey:S,disableAnimation:T,mapStyle:P,onMapClick:H,baseMapView:V,cooperativeGestures:ce=!0,doubleClickZoom:ie=!0,projection:ue,theme:G,features:W,itineraryParams:j,findNearestMarker:k,isochrone:M})=>{const J=O.useTheme(),I=d.useRef(null),[F,D]=d.useState(f??null),[U,Q]=d.useState(!1),K=d.useMemo(()=>{const[i=2.3522,v=48.8566]=A.isArray(l)?l:[];return{latitude:v,longitude:i,zoom:s}},[l,s]),$=d.useMemo(()=>P||Se(V,G??J.palette.mode),[V,P,G,J.palette.mode]),{style:q,cooperativeGestures:ee,doubleClickZoom:n}=st({baseMapView:V,cooperativeGestures:ce,doubleClickZoom:ie,mapStyle:$,theme:G??J.palette.mode}),c=(i,v)=>{!m&&v&&D(i)},h=(i,v)=>{m&&D(v?i:null)};d.useEffect(()=>{D(f??null)},[f]);const y=d.useMemo(()=>F?g?.find(i=>i.id===F)??null:null,[F,g]);return p.jsxs(O.Box,{"data-testid":"mapbox-container",sx:{borderRadius:t?0:1,height:a,overflow:"hidden",position:"relative",width:o,...e},children:[p.jsx(O.GlobalStyles,{styles:Ue}),r&&p.jsx(O.Skeleton,{"data-testid":"skeleton-loader",width:o,height:a,variant:t?"rectangular":"rounded",sx:{inset:0,position:"absolute",zIndex:2}}),!r&&p.jsxs(C,{ref:I,cooperativeGestures:ee,doubleClickZoom:n,mapStyle:q,projection:ue,onLoad:()=>{Q(!0),I.current?.resize()},initialViewState:K,style:{height:"100%",width:"100%"},mapboxAccessToken:void 0,onClick:i=>{const v=g.find(b=>{const{lng:w,lat:N}=i.lngLat,L=Math.abs(Number(b.lng??0)-w),ft=Math.abs(Number(b.lat??0)-N);return L<.01&&ft<.01});H?.(i.lngLat.lng,i.lngLat.lat,v??null)},children:[U&&g.filter(oe).map(i=>{const v=typeof i.size=="number"?i.size:void 0,b=(()=>{if(!i.IconComponent)return null;const L={...i.iconProps};return v&&(L.width=v,L.height=v),p.jsx(i.IconComponent,{...L})})(),w=i.IconComponent?null:p.jsx(De,{color:i.color,variant:i.variant,size:v,type:i.type}),N={alignItems:"center",cursor:i.Tooltip?"pointer":"default",display:"inline-flex",justifyContent:"center",...i.IconComponent&&!v?{}:v?{height:v,width:v}:{}};return p.jsx(C.Marker,{longitude:i.lng,latitude:i.lat,anchor:"center",onClick:L=>{L.originalEvent.stopPropagation(),i.id&&c(i.id,!!i.Tooltip),H?.(i.lng,i.lat,i)},children:p.jsx(O.Box,{component:"div",onMouseEnter:()=>i.id&&h(i.id,!!i.Tooltip),onMouseLeave:()=>h(null),style:N,children:b||w})},i.id)}),U&&y?.Tooltip&&p.jsx(C.Popup,{longitude:A.isNumber(y.lng)?y.lng:0,latitude:A.isNumber(y.lat)?y.lat:0,anchor:"top",onClose:()=>D(null),maxWidth:u,closeOnClick:!0,closeOnMove:!1,children:p.jsx(O.Box,{sx:{minHeight:60,minWidth:240},children:p.jsx(ot,{children:y.Tooltip})})}),j&&p.jsx(xe,{from:j.from,to:j.to,profile:j.profile,engine:j.engine,itineraryLineStyle:j.itineraryLineStyle,initialRoute:j.initialRoute,onRouteComputed:j.onRouteComputed,itineraryLabel:j.itineraryLabel}),k&&p.jsx(rt,{origin:k.origin,destinations:k.destinations,onNearestFound:k.onNearestFound,maxDistanceMeters:k.maxDistanceMeters,engine:k.engine,profile:k.profile,initialNearestResults:k.initialNearestResults,itineraryLineStyle:k.itineraryLineStyle}),M&&p.jsx(Qe,{origin:M.origin,profile:M.profile,onIsochroneLoaded:M.onIsochroneLoaded,intervals:M.intervals}),W&&p.jsx(X,{features:W}),x&&p.jsx(Ve,{markers:g,features:W,padding:_,duration:T?0:R,animationKey:S,openPopup:!!f})]})]})},lt=d.memo(at),ct=["OSRM","Mapbox"],it=["driving","walking","cycling"],ut=(e,t)=>{const r="geometry"in t?t.geometry:t,[a,o]=e,l=s=>s.map(u=>u.reduce((f,[m,g],x,_)=>{const[R,S]=_[(x-1+_.length)%_.length];return g>o!=S>o&&a<(R-m)*(o-g)/(S-g)+m?!f:f},!1)).reduce((u,f,m)=>m===0?f:u&&!f,!1);return r.type==="Polygon"?l(r.coordinates):r.type==="MultiPolygon"?r.coordinates.some(s=>l(s)):!1};E.DEFAULT_CENTER_LAT=46.8677,E.DEFAULT_CENTER_LNG=2.333,E.MapProvider=Ce,E.MapView=lt,E.engines=ct,E.isPointInGeoJSON=ut,E.isValidLatLngTuple=Ye,E.isValidLatitude=ne,E.isValidLongitude=re,E.isValidMarker=oe,E.profiles=it,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED