@mapsindoors/map-template 1.87.9 → 1.87.11
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/{GoogleMapsMap-33d3261a.mjs → GoogleMapsMap-de6d2a43.mjs} +3 -2
- package/dist/{MapboxMap-424a8535.mjs → MapboxMap-9897ca13.mjs} +2 -2
- package/dist/{combo-box-item.entry-4f5e4b96.mjs → combo-box-item.entry-c28f283f.mjs} +2 -2
- package/dist/mapsindoors-react.es.js +1 -1
- package/dist/mapsindoors-react.umd.js +4 -4
- package/dist/mapsindoors-webcomponent.es.js +10 -6
- package/dist/mapsindoors-webcomponent.umd.js +4 -4
- package/dist/{mi-card_2.entry-8e59bac3.mjs → mi-card_2.entry-59c62129.mjs} +2 -2
- package/dist/{mi-chip.entry-4c85308b.mjs → mi-chip.entry-e1609959.mjs} +2 -2
- package/dist/{mi-column.entry-66d1f58b.mjs → mi-column.entry-e9ca7d6f.mjs} +2 -2
- package/dist/{mi-combo-box.entry-7bc39e78.mjs → mi-combo-box.entry-5f49516b.mjs} +2 -2
- package/dist/{mi-data-table.entry-9c8901d7.mjs → mi-data-table.entry-496dd798.mjs} +2 -2
- package/dist/{mi-distance_2.entry-6d531e6e.mjs → mi-distance_2.entry-9423c9b7.mjs} +2 -2
- package/dist/{mi-dropdown-item.entry-75e5ca85.mjs → mi-dropdown-item.entry-15dbbd0c.mjs} +2 -2
- package/dist/{mi-dropdown.entry-c2cae281.mjs → mi-dropdown.entry-3dde104c.mjs} +2 -2
- package/dist/{mi-floor-selector.entry-8d3a67a9.mjs → mi-floor-selector.entry-23a4f234.mjs} +2 -2
- package/dist/{mi-keyboard.entry-11d4f6fa.mjs → mi-keyboard.entry-59acfa72.mjs} +2 -2
- package/dist/{mi-list-item-category.entry-90127767.mjs → mi-list-item-category.entry-78ea8167.mjs} +2 -2
- package/dist/{mi-list-item-location.entry-ef59f27c.mjs → mi-list-item-location.entry-7d0984e1.mjs} +2 -2
- package/dist/{mi-list.entry-ec613370.mjs → mi-list.entry-bbdfad8a.mjs} +2 -2
- package/dist/{mi-location-booking.entry-efd4293f.mjs → mi-location-booking.entry-17da27b2.mjs} +2 -2
- package/dist/{mi-location-info.entry-df2a6f90.mjs → mi-location-info.entry-f1812722.mjs} +2 -2
- package/dist/{mi-map-googlemaps.entry-8b1e9536.mjs → mi-map-googlemaps.entry-3eeb3de6.mjs} +2 -2
- package/dist/{mi-map-mapbox.entry-069b44b7.mjs → mi-map-mapbox.entry-86511920.mjs} +2 -2
- package/dist/{mi-metric-card.entry-5c637a2d.mjs → mi-metric-card.entry-fbe97aec.mjs} +2 -2
- package/dist/{mi-my-position.entry-080afc7e.mjs → mi-my-position.entry-857f12dd.mjs} +2 -2
- package/dist/{mi-notification.entry-20f58836.mjs → mi-notification.entry-9e0f2abb.mjs} +2 -2
- package/dist/{mi-route-instructions-heading.entry-b1253300.mjs → mi-route-instructions-heading.entry-b08f98ba.mjs} +2 -2
- package/dist/{mi-route-instructions-maneuver-legacy.entry-968d48e0.mjs → mi-route-instructions-maneuver-legacy.entry-ff096d78.mjs} +2 -2
- package/dist/{mi-route-instructions-maneuver.entry-eb4e617b.mjs → mi-route-instructions-maneuver.entry-3d8ea1b3.mjs} +2 -2
- package/dist/{mi-route-instructions-step-legacy.entry-80a1ceb2.mjs → mi-route-instructions-step-legacy.entry-b9bfc57c.mjs} +2 -2
- package/dist/{mi-route-instructions-step.entry-7791c7b8.mjs → mi-route-instructions-step.entry-a9255c2d.mjs} +10 -10
- package/dist/{mi-route-instructions.entry-f0ff8c0f.mjs → mi-route-instructions.entry-bf2e2a83.mjs} +4 -3
- package/dist/{mi-scroll-buttons.entry-79bf03f5.mjs → mi-scroll-buttons.entry-f7b1fdfd.mjs} +2 -2
- package/dist/{mi-search.entry-d5b1f921.mjs → mi-search.entry-847c1266.mjs} +2 -2
- package/dist/{mi-share-sms.entry-bda4d9cf.mjs → mi-share-sms.entry-a06a5341.mjs} +2 -2
- package/dist/{mi-step-switcher.entry-0e16a7f8.mjs → mi-step-switcher.entry-22e8af7d.mjs} +2 -2
- package/dist/{mi-tab-panel.entry-1e850a6c.mjs → mi-tab-panel.entry-8136c76d.mjs} +2 -2
- package/dist/{mi-tab.entry-cf25c6d2.mjs → mi-tab.entry-4e5e4732.mjs} +2 -2
- package/dist/{mi-tabs.entry-2e8b8901.mjs → mi-tabs.entry-8ddda9f5.mjs} +2 -2
- package/dist/{mi-time.entry-6deb25cc.mjs → mi-time.entry-d1b2fdd8.mjs} +2 -2
- package/dist/{reactcomponent-7da8ab64.mjs → reactcomponent-ce833545.mjs} +7 -5
- package/package.json +1 -1
|
@@ -57,7 +57,7 @@ object-assign
|
|
|
57
57
|
(c) Sindre Sorhus
|
|
58
58
|
@license MIT
|
|
59
59
|
*/var hv,D4;function oj(){if(D4)return hv;D4=1;var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;function f(w){if(w==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(w)}function y(){try{if(!Object.assign)return!1;var w=new String("abc");if(w[5]="de",Object.getOwnPropertyNames(w)[0]==="5")return!1;for(var D={},o=0;o<10;o++)D["_"+String.fromCharCode(o)]=o;var j=Object.getOwnPropertyNames(D).map(function($){return D[$]});if(j.join("")!=="0123456789")return!1;var F={};return"abcdefghijklmnopqrst".split("").forEach(function($){F[$]=$}),Object.keys(Object.assign({},F)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return hv=y()?Object.assign:function(w,D){for(var o,j=f(w),F,$=1;$<arguments.length;$++){o=Object(arguments[$]);for(var oe in o)a.call(o,oe)&&(j[oe]=o[oe]);if(r){F=r(o);for(var te=0;te<F.length;te++)c.call(o,F[te])&&(j[F[te]]=o[F[te]])}}return j},hv}var dv,A4;function fv(){if(A4)return dv;A4=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return dv=r,dv}var pv,E4;function S4(){return E4||(E4=1,pv=Function.call.bind(Object.prototype.hasOwnProperty)),pv}var gv,C4;function sj(){if(C4)return gv;C4=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var a=fv(),c={},f=S4();r=function(w){var D="Warning: "+w;typeof console<"u"&&console.error(D);try{throw new Error(D)}catch{}}}function y(w,D,o,j,F){if(process.env.NODE_ENV!=="production"){for(var $ in w)if(f(w,$)){var oe;try{if(typeof w[$]!="function"){var te=Error((j||"React class")+": "+o+" type `"+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[$]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw te.name="Invariant Violation",te}oe=w[$](D,$,j,o,null,a)}catch(xe){oe=xe}if(oe&&!(oe instanceof Error)&&r((j||"React class")+": type specification of "+o+" `"+$+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof oe+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),oe instanceof Error&&!(oe.message in c)){c[oe.message]=!0;var ge=F?F():"";r("Failed "+o+" type: "+oe.message+(ge??""))}}}}return y.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(c={})},gv=y,gv}var mv,N4;function aj(){if(N4)return mv;N4=1;var r=T4(),a=oj(),c=fv(),f=S4(),y=sj(),w=function(){};process.env.NODE_ENV!=="production"&&(w=function(o){var j="Warning: "+o;typeof console<"u"&&console.error(j);try{throw new Error(j)}catch{}});function D(){return null}return mv=function(o,j){var F=typeof Symbol=="function"&&Symbol.iterator,$="@@iterator";function oe(Q){var J=Q&&(F&&Q[F]||Q[$]);if(typeof J=="function")return J}var te="<<anonymous>>",ge={array:We("array"),bigint:We("bigint"),bool:We("boolean"),func:We("function"),number:We("number"),object:We("object"),string:We("string"),symbol:We("symbol"),any:me(),arrayOf:ce,element:pe(),elementType:ve(),instanceOf:De,node:jt(),objectOf:St,oneOf:ct,oneOfType:Je,shape:Pt,exact:Dt};function xe(Q,J){return Q===J?Q!==0||1/Q===1/J:Q!==Q&&J!==J}function Ae(Q,J){this.message=Q,this.data=J&&typeof J=="object"?J:{},this.stack=""}Ae.prototype=Error.prototype;function it(Q){if(process.env.NODE_ENV!=="production")var J={},M=0;function z(U,Y,ee,ne,ie,de,Qe){if(ne=ne||te,de=de||ee,Qe!==c){if(j){var Re=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Re.name="Invariant Violation",Re}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var He=ne+":"+ee;!J[He]&&M<3&&(w("You are manually calling a React.PropTypes validation function for the `"+de+"` prop on `"+ne+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),J[He]=!0,M++)}}return Y[ee]==null?U?Y[ee]===null?new Ae("The "+ie+" `"+de+"` is marked as required "+("in `"+ne+"`, but its value is `null`.")):new Ae("The "+ie+" `"+de+"` is marked as required in "+("`"+ne+"`, but its value is `undefined`.")):null:Q(Y,ee,ne,ie,de)}var B=z.bind(null,!1);return B.isRequired=z.bind(null,!0),B}function We(Q){function J(M,z,B,U,Y,ee){var ne=M[z],ie=wt(ne);if(ie!==Q){var de=$t(ne);return new Ae("Invalid "+U+" `"+Y+"` of type "+("`"+de+"` supplied to `"+B+"`, expected ")+("`"+Q+"`."),{expectedType:Q})}return null}return it(J)}function me(){return it(D)}function ce(Q){function J(M,z,B,U,Y){if(typeof Q!="function")return new Ae("Property `"+Y+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var ee=M[z];if(!Array.isArray(ee)){var ne=wt(ee);return new Ae("Invalid "+U+" `"+Y+"` of type "+("`"+ne+"` supplied to `"+B+"`, expected an array."))}for(var ie=0;ie<ee.length;ie++){var de=Q(ee,ie,B,U,Y+"["+ie+"]",c);if(de instanceof Error)return de}return null}return it(J)}function pe(){function Q(J,M,z,B,U){var Y=J[M];if(!o(Y)){var ee=wt(Y);return new Ae("Invalid "+B+" `"+U+"` of type "+("`"+ee+"` supplied to `"+z+"`, expected a single ReactElement."))}return null}return it(Q)}function ve(){function Q(J,M,z,B,U){var Y=J[M];if(!r.isValidElementType(Y)){var ee=wt(Y);return new Ae("Invalid "+B+" `"+U+"` of type "+("`"+ee+"` supplied to `"+z+"`, expected a single ReactElement type."))}return null}return it(Q)}function De(Q){function J(M,z,B,U,Y){if(!(M[z]instanceof Q)){var ee=Q.name||te,ne=mi(M[z]);return new Ae("Invalid "+U+" `"+Y+"` of type "+("`"+ne+"` supplied to `"+B+"`, expected ")+("instance of `"+ee+"`."))}return null}return it(J)}function ct(Q){if(!Array.isArray(Q))return process.env.NODE_ENV!=="production"&&(arguments.length>1?w("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):w("Invalid argument supplied to oneOf, expected an array.")),D;function J(M,z,B,U,Y){for(var ee=M[z],ne=0;ne<Q.length;ne++)if(xe(ee,Q[ne]))return null;var ie=JSON.stringify(Q,function(Qe,Re){var He=$t(Re);return He==="symbol"?String(Re):Re});return new Ae("Invalid "+U+" `"+Y+"` of value `"+String(ee)+"` "+("supplied to `"+B+"`, expected one of "+ie+"."))}return it(J)}function St(Q){function J(M,z,B,U,Y){if(typeof Q!="function")return new Ae("Property `"+Y+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var ee=M[z],ne=wt(ee);if(ne!=="object")return new Ae("Invalid "+U+" `"+Y+"` of type "+("`"+ne+"` supplied to `"+B+"`, expected an object."));for(var ie in ee)if(f(ee,ie)){var de=Q(ee,ie,B,U,Y+"."+ie,c);if(de instanceof Error)return de}return null}return it(J)}function Je(Q){if(!Array.isArray(Q))return process.env.NODE_ENV!=="production"&&w("Invalid argument supplied to oneOfType, expected an instance of array."),D;for(var J=0;J<Q.length;J++){var M=Q[J];if(typeof M!="function")return w("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+gi(M)+" at index "+J+"."),D}function z(B,U,Y,ee,ne){for(var ie=[],de=0;de<Q.length;de++){var Qe=Q[de],Re=Qe(B,U,Y,ee,ne,c);if(Re==null)return null;Re.data&&f(Re.data,"expectedType")&&ie.push(Re.data.expectedType)}var He=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new Ae("Invalid "+ee+" `"+ne+"` supplied to "+("`"+Y+"`"+He+"."))}return it(z)}function jt(){function Q(J,M,z,B,U){return Ht(J[M])?null:new Ae("Invalid "+B+" `"+U+"` supplied to "+("`"+z+"`, expected a ReactNode."))}return it(Q)}function pt(Q,J,M,z,B){return new Ae((Q||"React class")+": "+J+" type `"+M+"."+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function Pt(Q){function J(M,z,B,U,Y){var ee=M[z],ne=wt(ee);if(ne!=="object")return new Ae("Invalid "+U+" `"+Y+"` of type `"+ne+"` "+("supplied to `"+B+"`, expected `object`."));for(var ie in Q){var de=Q[ie];if(typeof de!="function")return pt(B,U,Y,ie,$t(de));var Qe=de(ee,ie,B,U,Y+"."+ie,c);if(Qe)return Qe}return null}return it(J)}function Dt(Q){function J(M,z,B,U,Y){var ee=M[z],ne=wt(ee);if(ne!=="object")return new Ae("Invalid "+U+" `"+Y+"` of type `"+ne+"` "+("supplied to `"+B+"`, expected `object`."));var ie=a({},M[z],Q);for(var de in ie){var Qe=Q[de];if(f(Q,de)&&typeof Qe!="function")return pt(B,U,Y,de,$t(Qe));if(!Qe)return new Ae("Invalid "+U+" `"+Y+"` key `"+de+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(M[z],null," ")+`
|
|
60
|
-
Valid keys: `+JSON.stringify(Object.keys(Q),null," "));var Re=Qe(ee,de,B,U,Y+"."+de,c);if(Re)return Re}return null}return it(J)}function Ht(Q){switch(typeof Q){case"number":case"string":case"undefined":return!0;case"boolean":return!Q;case"object":if(Array.isArray(Q))return Q.every(Ht);if(Q===null||o(Q))return!0;var J=oe(Q);if(J){var M=J.call(Q),z;if(J!==Q.entries){for(;!(z=M.next()).done;)if(!Ht(z.value))return!1}else for(;!(z=M.next()).done;){var B=z.value;if(B&&!Ht(B[1]))return!1}}else return!1;return!0;default:return!1}}function It(Q,J){return Q==="symbol"?!0:J?J["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&J instanceof Symbol:!1}function wt(Q){var J=typeof Q;return Array.isArray(Q)?"array":Q instanceof RegExp?"object":It(J,Q)?"symbol":J}function $t(Q){if(typeof Q>"u"||Q===null)return""+Q;var J=wt(Q);if(J==="object"){if(Q instanceof Date)return"date";if(Q instanceof RegExp)return"regexp"}return J}function gi(Q){var J=$t(Q);switch(J){case"array":case"object":return"an "+J;case"boolean":case"date":case"regexp":return"a "+J;default:return J}}function mi(Q){return!Q.constructor||!Q.constructor.name?te:Q.constructor.name}return ge.checkPropTypes=y,ge.resetWarningCache=y.resetWarningCache,ge.PropTypes=ge,ge},mv}var yv,L4;function lj(){if(L4)return yv;L4=1;var r=fv();function a(){}function c(){}return c.resetWarningCache=a,yv=function(){function f(D,o,j,F,$,oe){if(oe!==r){var te=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw te.name="Invariant Violation",te}}f.isRequired=f;function y(){return f}var w={array:f,bigint:f,bool:f,func:f,number:f,object:f,string:f,symbol:f,any:f,arrayOf:y,element:f,elementType:f,instanceOf:y,node:f,objectOf:y,oneOf:y,oneOfType:y,shape:y,exact:y,checkPropTypes:c,resetWarningCache:a};return w.PropTypes=w,w},yv}if(process.env.NODE_ENV!=="production"){var cj=T4(),uj=!0;uv.exports=aj()(cj.isElement,uj)}else uv.exports=lj()();var hj=uv.exports;const et=m_(hj),jW="",dj=r=>{const[a,c]=Ce.useState(!1);return Ce.useEffect(()=>{const f=window.matchMedia(r);f.matches!==a&&c(f.matches);const y=()=>c(f.matches);return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[a,r]),a},_v=()=>dj("(min-width: 992px)");class fj{constructor(a={}){this._currentPosition=null,this._listeners=new Map;const{maxAccuracy:c=100}=a;this._maxAccuracy=c}get currentPosition(){return this._currentPosition}hasValidPosition(){const a=this._maxAccuracy;return this._currentPosition!==null&&this._currentPosition.coords&&this._currentPosition.coords.accuracy>=0&&this._currentPosition.coords.accuracy<=a}on(a,c){this._listeners.has(a)||this._listeners.set(a,[]),this._listeners.get(a).push(c)}off(a,c){const f=this._listeners.get(a);f&&this._listeners.set(a,f.filter(y=>y!==c))}setPosition(a){let c;if(a.coords&&a.timestamp)c={coords:{latitude:a.coords.latitude,longitude:a.coords.longitude,accuracy:a.coords.accuracy,altitude:a.coords.altitude??null,altitudeAccuracy:a.coords.altitudeAccuracy??null,heading:a.coords.heading??null,speed:a.coords.speed??null},timestamp:a.timestamp,floorIndex:a.floorIndex??null};else{const y={message:"[CustomPositionProvider] Invalid position object received. The object must be at minimum: { coords: { latitude: number, longitude: number, accuracy: number }, timestamp: number }.",received:a};return this.emitError(y),!1}return c.coords.accuracy>this._maxAccuracy?(console.warn(`[CustomPositionProvider] Position accuracy (${c.coords.accuracy}m) exceeds maxAccuracy (${this._maxAccuracy}m). Position dropped, keeping previous position.`),!1):(this._currentPosition=c,(this._listeners.get("position_received")||[]).forEach(y=>{y.call(null,{position:c})}),!0)}emitError(a){this._currentPosition=null,console.warn("[CustomPositionProvider] position_error:",a),(this._listeners.get("position_error")||[]).forEach(f=>{f.call(null,a)})}}const Sm={venueSelector:{key:"venue-selector",className:"venue-selector-portal"},viewSelector:{key:"view-selector",className:"view-selector-portal"},languageSelector:{key:"language-selector",className:"language-selector-portal"},viewModeSwitch:{key:"viewmode-switch",className:"viewmode-switch-portal"},myPosition:{key:"my-position",className:"my-position-element-portal"},floorSelector:{key:"floor-selector",className:"floor-selector-portal"},resetView:{key:"reset-view",className:"reset-view-portal"}};z4.propTypes={mapType:et.oneOf(["google","mapbox"]).isRequired,mapsIndoorsInstance:et.object.isRequired,mapInstance:et.object.isRequired,onPositionControl:et.func,brandingColor:et.string,devicePosition:et.object,excludedElements:et.string};function z4({mapType:r,mapsIndoorsInstance:a,mapInstance:c,onPositionControl:f,brandingColor:y,devicePosition:w,excludedElements:D=""}){const o=_v(),j=Ce.useRef(null),F=Ce.useRef(null),$=Ce.useCallback(ge=>!D||typeof D!="string"?!0:!D.split(",").map(Ae=>Ae.trim()).includes(ge),[D]),oe=Ce.useMemo(()=>{const ge={};for(const[xe,Ae]of Object.entries(Sm))ge[xe]=Be.jsx("div",{className:Ae.className},Ae.key);return ge},[]),te=ge=>{F.current.customPositionProvider.setPosition(ge)&&F.current.watchPosition()};return Ce.useEffect(()=>{if(!(!a||!c)){if(!j.current){const ge=document.createElement("mi-floor-selector");j.current=ge}if(!F.current){const ge=document.createElement("mi-my-position");F.current=ge}j.current.mapsindoors=a,F.current.mapsindoors=a,y&&(j.current.primaryColor=y),f&&F.current&&f(F.current)}},[r,a,c,f,y]),Ce.useEffect(()=>{if(F.current){if(F.current.stopListeningForPosition&&typeof F.current.stopListeningForPosition=="function"&&F.current.stopListeningForPosition(),w&&typeof w=="object"){if(F.current.customPositionProvider||(F.current.customPositionProvider=new fj),Object.keys(w).length===0)return;te(w)}return()=>{F.current&&F.current.stopListeningForPosition&&typeof F.current.stopListeningForPosition=="function"&&F.current.stopListeningForPosition()}}},[w]),Ce.useEffect(()=>{if(!j.current||!F.current)return;const ge=(xe,Ae)=>{const it=document.querySelector(`.${Ae}`);it&&!it.contains(xe)&&(xe.remove(),it.appendChild(xe))};$("floorSelector")&&ge(j.current,Sm.floorSelector.className),$("myPosition")&&ge(F.current,Sm.myPosition.className)},[o,$]),Ce.useEffect(()=>{Object.entries(Sm).forEach(([ge,xe])=>{const Ae=document.querySelector(`.${xe.className}`);Ae&&($(ge)?Ae.style.display="":Ae.style.display="none")})},[D,$,o]),o?Be.jsxs(Be.Fragment,{children:[Be.jsxs("div",{className:"map-controls-container desktop top-right",children:[oe.venueSelector,oe.viewSelector,oe.languageSelector,oe.viewModeSwitch,oe.myPosition,oe.floorSelector]}),Be.jsx("div",{className:"map-controls-container desktop bottom-right",children:oe.resetView})]}):Be.jsxs(Be.Fragment,{children:[Be.jsxs("div",{className:"map-controls-left-column mobile-column",children:[oe.venueSelector,oe.viewModeSwitch,oe.viewSelector,oe.languageSelector]}),Be.jsxs("div",{className:"map-controls-right-column mobile-column",children:[oe.myPosition,oe.floorSelector]})]})}const pj=Ce.memo(z4),kW="",gj=Ce.lazy(()=>Promise.resolve().then(()=>H$)),mj=Ce.lazy(()=>Promise.resolve().then(()=>W$)),nh={Google:"google",Mapbox:"mapbox"};O4.propTypes={apiKey:et.string.isRequired,gmApiKey:et.string,mapboxAccessToken:et.string,center:et.object,zoom:et.number,bounds:et.object,bearing:et.number,pitch:et.number,resetUICounter:et.number,mapOptions:et.object,onInitialized:et.func,gmMapId:et.string,devicePosition:et.object};function O4({apiKey:r,gmApiKey:a,mapboxAccessToken:c,center:f,zoom:y,bounds:w,bearing:D,pitch:o,resetUICounter:j,mapOptions:F,onInitialized:$,gmMapId:oe,devicePosition:te}){var Dt;const[ge,xe]=Ce.useState(),[Ae,it]=Ce.useState(),[We,me]=Ce.useState(),[ce,pe]=Ce.useState(),[ve,De]=Ce.useState(),[ct,St]=Ce.useState(),[Je,jt]=Ce.useState(),pt=Ce.useMemo(()=>{var Ht;return((Ht=ct==null?void 0:ct.appSettings)==null?void 0:Ht.excludeFromUI)||""},[(Dt=ct==null?void 0:ct.appSettings)==null?void 0:Dt.excludeFromUI]);Ce.useEffect(()=>{window.customElements.get("mi-floor-selector")||n4()},[]),Ce.useEffect(()=>{r&&(window.mapsindoors.MapsIndoors.setMapsIndoorsApiKey(r),ge===nh.Mapbox&&(window.mapsindoors.services.SolutionsService.getSolution().then(Ht=>{De(Ht)}),window.mapsindoors.services.AppConfigService.getConfig().then(Ht=>{St(Ht)})))},[r,ge]);const Pt=Ht=>{jt(Ht);const It=new window.mapsindoors.MapsIndoors({mapView:Ht});It.once("building_changed",wt=>{const $t=It.getVenue();wt&&$t&&wt.venueId!==$t.id&&It.setVenue(wt.venueId)}),It.on("mouseenter",()=>{var $t;const wt=It.getHoveredLocation();(($t=wt==null?void 0:wt.properties.locationSettings)==null?void 0:$t.selectable)===!1&&It.unhoverLocation()}),It.setDisplayRule(["MI_BUILDING_OUTLINE"],{visible:!1}),it(It)};return Ce.useEffect(()=>{typeof $=="function"&&Ae&&We&&typeof ce=="boolean"&&$(Ae,We,ce)},[Ae,We,ce]),Ce.useEffect(()=>{ve&&ge===nh.Mapbox&&["mapbox","3dwalls","floorplan"].every(Ht=>ve.modules.map(It=>It.toLowerCase()).includes(Ht))?pe(!0):pe(!1)},[ve,ge]),Ce.useEffect(()=>{c?xe(nh.Mapbox):a&&xe(nh.Google)},[a,c]),Be.jsxs(Be.Fragment,{children:[ge===nh.Google&&Be.jsx(Ce.Suspense,{children:Be.jsx(mj,{mapsIndoorsInstance:Ae,apiKey:a,onInitialized:Pt,center:f,zoom:y,mapOptions:F,heading:D,tilt:o,bounds:w,gmMapId:oe})}),ge===nh.Mapbox&&Be.jsx(Ce.Suspense,{children:Be.jsx(gj,{mapsIndoorsInstance:Ae,accessToken:c,onInitialized:Pt,center:f,zoom:y,mapOptions:F,bearing:D,pitch:o,bounds:w,resetViewMode:j,viewModeSwitchVisible:ce,appConfig:ct})}),Ae&&Je&&ge&&Be.jsx(pj,{mapType:ge,mapsIndoorsInstance:Ae,mapInstance:Je,onPositionControl:me,brandingColor:F==null?void 0:F.brandingColor,devicePosition:te,excludedElements:pt})]})}const $o={Google:"google",Mapbox:"mapbox"},As=On({key:"mapsIndoorsInstance",default:null,dangerouslyAllowMutability:!0}),yj=r=>{const a=zi(As),c=Ce.useRef(),[f,y]=Ce.useState([]);Ce.useEffect(()=>{(async()=>{if(a&&r){for(const o of f)c.current.disableLiveData(o);c.current=new window.mapsindoors.LiveDataManager(a);const D=await c.current.LiveDataInfo.activeDomainTypes();for(const o of D)await c.current.enableLiveData(o);y(D)}})()},[r,a])},Cm=On({key:"userPosition",default:null}),vv=On({key:"directionsService",default:null}),Nm=On({key:"mapType",default:void 0}),xv=On({key:"apiKey",default:null}),bv=On({key:"gmApiKey",default:null}),Lm=On({key:"mapboxAccessToken",default:null}),zm=On({key:"filteredLocations",default:void 0}),Om=On({key:"filteredLocationsByExternalID",default:void 0}),j4=On({key:"tileStyle",default:null}),k4=On({key:"positionControl",default:null,dangerouslyAllowMutability:!0}),wv=On({key:"bearing",default:0}),jm=On({key:"pitch",default:null}),P4=On({key:"solution",default:null,dangerouslyAllowMutability:!0}),Mf=On({key:"notificationMessage",default:null});function If(){return new Promise(r=>{const a=document.querySelector(".modal--open"),c=document.querySelector(".mapsindoors-map");if(a)r(c.offsetHeight-(a==null?void 0:a.offsetTop));else{const f=new MutationObserver(()=>{const y=document.querySelector(".modal--open");y&&(f.disconnect(),r(c.offsetHeight-(y==null?void 0:y.offsetTop)))});f.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}const Tf=On({key:"categories",default:[]}),Mv=On({key:"kioskOriginLocationId",default:void 0}),km=On({key:"locationId",default:void 0}),R4=On({key:"startZoomLevel",default:null}),$l=On({key:"currentVenueName",default:null}),Df=On({key:"venues",default:[]}),Iv=On({key:"venueWasSelected",default:!1}),Pm=On({key:"isMapReady",default:!1});function rh(){return new Promise(r=>{const a=document.querySelector(".sheet--active"),c=document.querySelector(".mapsindoors-map");if(a)r(c.offsetHeight-a.offsetTop);else{const f=new MutationObserver(()=>{const y=document.querySelector(".sheet--active");y&&(f.disconnect(),r(c.offsetHeight-y.offsetTop))});f.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}function $c(){return new Promise(r=>{const a=document.querySelector(".modal--open");if(a)r((a==null?void 0:a.offsetWidth)+(a==null?void 0:a.offsetLeft)*2);else{const c=new MutationObserver(()=>{const f=document.querySelector(".modal--open");f&&(c.disconnect(),r((f==null?void 0:f.offsetWidth)+(f==null?void 0:f.offsetLeft)*2))});c.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}const B4=On({key:"timeout",default:void 0});function F4(){const[r,a]=Ce.useState(!1),c=zi(Pm),f=zi(B4);return Ce.useEffect(()=>{if(!c||!f)return;let y;const w=()=>{a(!1),window.clearTimeout(y),y=window.setTimeout(D,f*1e3)},D=()=>{a(!0)};return y=window.setTimeout(D,f*1e3),window.addEventListener("mousemove",w),window.addEventListener("mousedown",w),window.addEventListener("resize",w),window.addEventListener("keydown",w),window.addEventListener("touchstart",w),window.addEventListener("wheel",w),()=>{window.removeEventListener("mousemove",w),window.removeEventListener("mousedown",w),window.removeEventListener("resize",w),window.removeEventListener("keydown",w),window.removeEventListener("touchstart",w),window.removeEventListener("wheel",w),window.clearTimeout(y)}},[f,c]),r}const _j=r=>{const[a,c]=Ce.useState(window.matchMedia(r).matches);return Ce.useEffect(()=>{const f=window.matchMedia(r);f.matches!==a&&c(f.matches);const y=()=>c(f.matches);return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[a,r]),a},ra=()=>_j("(min-width: 992px)"),U4=On({key:"mapboxViewMode",default:null}),Tv=Object.freeze({initial3D:1,clicked3D:2,clicked2D:3}),vj=pm({key:"currentPitch",get:({get:r})=>{const a=r(jm),c=r(U4);let f;switch(c){case Tv.initial3D:f=a??45;break;case Tv.clicked3D:f=45;break;case Tv.clicked2D:f=0;break;default:f=a}return f}}),V4=On({key:"center",default:null});function Lr(r){return r==null}var Ko=63710088e-1,Dv={centimeters:Ko*100,centimetres:Ko*100,degrees:Ko/111325,feet:Ko*3.28084,inches:Ko*39.37,kilometers:Ko/1e3,kilometres:Ko/1e3,meters:Ko,metres:Ko,miles:Ko/1609.344,millimeters:Ko*1e3,millimetres:Ko*1e3,nauticalmiles:Ko/1852,radians:1,yards:Ko*1.0936},xj={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Ko,yards:1.0936133},Av={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Hs(r,a,c){c===void 0&&(c={});var f={type:"Feature"};return(c.id===0||c.id)&&(f.id=c.id),c.bbox&&(f.bbox=c.bbox),f.properties=a||{},f.geometry=r,f}function bj(r,a,c){switch(r){case"Point":return oa(a).geometry;case"LineString":return sa(a).geometry;case"Polygon":return Ev(a).geometry;case"MultiPoint":return Q4(a).geometry;case"MultiLineString":return Sv(a).geometry;case"MultiPolygon":return H4(a).geometry;default:throw new Error(r+" is invalid")}}function oa(r,a,c){if(c===void 0&&(c={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Rm(r[0])||!Rm(r[1]))throw new Error("coordinates must contain numbers");var f={type:"Point",coordinates:r};return Hs(f,a,c)}function wj(r,a,c){return c===void 0&&(c={}),Yl(r.map(function(f){return oa(f,a)}),c)}function Ev(r,a,c){c===void 0&&(c={});for(var f=0,y=r;f<y.length;f++){var w=y[f];if(w.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var D=0;D<w[w.length-1].length;D++)if(w[w.length-1][D]!==w[0][D])throw new Error("First and last Position are not equivalent.")}var o={type:"Polygon",coordinates:r};return Hs(o,a,c)}function Mj(r,a,c){return c===void 0&&(c={}),Yl(r.map(function(f){return Ev(f,a)}),c)}function sa(r,a,c){if(c===void 0&&(c={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var f={type:"LineString",coordinates:r};return Hs(f,a,c)}function Ij(r,a,c){return c===void 0&&(c={}),Yl(r.map(function(f){return sa(f,a)}),c)}function Yl(r,a){a===void 0&&(a={});var c={type:"FeatureCollection"};return a.id&&(c.id=a.id),a.bbox&&(c.bbox=a.bbox),c.features=r,c}function Sv(r,a,c){c===void 0&&(c={});var f={type:"MultiLineString",coordinates:r};return Hs(f,a,c)}function Q4(r,a,c){c===void 0&&(c={});var f={type:"MultiPoint",coordinates:r};return Hs(f,a,c)}function H4(r,a,c){c===void 0&&(c={});var f={type:"MultiPolygon",coordinates:r};return Hs(f,a,c)}function Tj(r,a,c){c===void 0&&(c={});var f={type:"GeometryCollection",geometries:r};return Hs(f,a,c)}function Dj(r,a){if(a===void 0&&(a=0),a&&!(a>=0))throw new Error("precision must be a positive number");var c=Math.pow(10,a||0);return Math.round(r*c)/c}function $4(r,a){a===void 0&&(a="kilometers");var c=Dv[a];if(!c)throw new Error(a+" units is invalid");return r*c}function Cv(r,a){a===void 0&&(a="kilometers");var c=Dv[a];if(!c)throw new Error(a+" units is invalid");return r/c}function Aj(r,a){return Y4(Cv(r,a))}function Ej(r){var a=r%360;return a<0&&(a+=360),a}function Y4(r){var a=r%(2*Math.PI);return a*180/Math.PI}function Sj(r){var a=r%360;return a*Math.PI/180}function Cj(r,a,c){if(a===void 0&&(a="kilometers"),c===void 0&&(c="kilometers"),!(r>=0))throw new Error("length must be a positive number");return $4(Cv(r,a),c)}function Nj(r,a,c){if(a===void 0&&(a="meters"),c===void 0&&(c="kilometers"),!(r>=0))throw new Error("area must be a positive number");var f=Av[a];if(!f)throw new Error("invalid original units");var y=Av[c];if(!y)throw new Error("invalid final units");return r/f*y}function Rm(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Nv(r){return!!r&&r.constructor===Object}function Lj(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(r.length!==4&&r.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach(function(a){if(!Rm(a))throw new Error("bbox must only contain numbers")})}function zj(r){if(!r)throw new Error("id is required");if(["string","number"].indexOf(typeof r)===-1)throw new Error("id must be a number or a string")}const Oj=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:Av,bearingToAzimuth:Ej,convertArea:Nj,convertLength:Cj,degreesToRadians:Sj,earthRadius:Ko,factors:Dv,feature:Hs,featureCollection:Yl,geometry:bj,geometryCollection:Tj,isNumber:Rm,isObject:Nv,lengthToDegrees:Aj,lengthToRadians:Cv,lineString:sa,lineStrings:Ij,multiLineString:Sv,multiPoint:Q4,multiPolygon:H4,point:oa,points:wj,polygon:Ev,polygons:Mj,radiansToDegrees:Y4,radiansToLength:$4,round:Dj,unitsFactors:xj,validateBBox:Lj,validateId:zj},Symbol.toStringTag,{value:"Module"}));function oh(r,a,c){if(r!==null)for(var f,y,w,D,o,j,F,$=0,oe=0,te,ge=r.type,xe=ge==="FeatureCollection",Ae=ge==="Feature",it=xe?r.features.length:1,We=0;We<it;We++){F=xe?r.features[We].geometry:Ae?r.geometry:r,te=F?F.type==="GeometryCollection":!1,o=te?F.geometries.length:1;for(var me=0;me<o;me++){var ce=0,pe=0;if(D=te?F.geometries[me]:F,D!==null){j=D.coordinates;var ve=D.type;switch($=c&&(ve==="Polygon"||ve==="MultiPolygon")?1:0,ve){case null:break;case"Point":if(a(j,oe,We,ce,pe)===!1)return!1;oe++,ce++;break;case"LineString":case"MultiPoint":for(f=0;f<j.length;f++){if(a(j[f],oe,We,ce,pe)===!1)return!1;oe++,ve==="MultiPoint"&&ce++}ve==="LineString"&&ce++;break;case"Polygon":case"MultiLineString":for(f=0;f<j.length;f++){for(y=0;y<j[f].length-$;y++){if(a(j[f][y],oe,We,ce,pe)===!1)return!1;oe++}ve==="MultiLineString"&&ce++,ve==="Polygon"&&pe++}ve==="Polygon"&&ce++;break;case"MultiPolygon":for(f=0;f<j.length;f++){for(pe=0,y=0;y<j[f].length;y++){for(w=0;w<j[f][y].length-$;w++){if(a(j[f][y][w],oe,We,ce,pe)===!1)return!1;oe++}pe++}ce++}break;case"GeometryCollection":for(f=0;f<D.geometries.length;f++)if(oh(D.geometries[f],a,c)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function jj(r,a,c,f){var y=c;return oh(r,function(w,D,o,j,F){D===0&&c===void 0?y=w:y=a(y,w,D,o,j,F)},f),y}function G4(r,a){var c;switch(r.type){case"FeatureCollection":for(c=0;c<r.features.length&&a(r.features[c].properties,c)!==!1;c++);break;case"Feature":a(r.properties,0);break}}function kj(r,a,c){var f=c;return G4(r,function(y,w){w===0&&c===void 0?f=y:f=a(f,y,w)}),f}function Bm(r,a){if(r.type==="Feature")a(r,0);else if(r.type==="FeatureCollection")for(var c=0;c<r.features.length&&a(r.features[c],c)!==!1;c++);}function Pj(r,a,c){var f=c;return Bm(r,function(y,w){w===0&&c===void 0?f=y:f=a(f,y,w)}),f}function Rj(r){var a=[];return oh(r,function(c){a.push(c)}),a}function Lv(r,a){var c,f,y,w,D,o,j,F,$,oe,te=0,ge=r.type==="FeatureCollection",xe=r.type==="Feature",Ae=ge?r.features.length:1;for(c=0;c<Ae;c++){for(o=ge?r.features[c].geometry:xe?r.geometry:r,F=ge?r.features[c].properties:xe?r.properties:{},$=ge?r.features[c].bbox:xe?r.bbox:void 0,oe=ge?r.features[c].id:xe?r.id:void 0,j=o?o.type==="GeometryCollection":!1,D=j?o.geometries.length:1,y=0;y<D;y++){if(w=j?o.geometries[y]:o,w===null){if(a(null,te,F,$,oe)===!1)return!1;continue}switch(w.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(a(w,te,F,$,oe)===!1)return!1;break}case"GeometryCollection":{for(f=0;f<w.geometries.length;f++)if(a(w.geometries[f],te,F,$,oe)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}te++}}function Bj(r,a,c){var f=c;return Lv(r,function(y,w,D,o,j){w===0&&c===void 0?f=y:f=a(f,y,w,D,o,j)}),f}function ll(r,a){Lv(r,function(c,f,y,w,D){var o=c===null?null:c.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return a(Hs(c,y,{bbox:w,id:D}),f,0)===!1?!1:void 0}var j;switch(o){case"MultiPoint":j="Point";break;case"MultiLineString":j="LineString";break;case"MultiPolygon":j="Polygon";break}for(var F=0;F<c.coordinates.length;F++){var $=c.coordinates[F],oe={type:j,coordinates:$};if(a(Hs(oe,y),f,F)===!1)return!1}})}function Fj(r,a,c){var f=c;return ll(r,function(y,w,D){w===0&&D===0&&c===void 0?f=y:f=a(f,y,w,D)}),f}function Z4(r,a){ll(r,function(c,f,y){var w=0;if(c.geometry){var D=c.geometry.type;if(!(D==="Point"||D==="MultiPoint")){var o,j=0,F=0,$=0;if(oh(c,function(oe,te,ge,xe,Ae){if(o===void 0||f>j||xe>F||Ae>$){o=oe,j=f,F=xe,$=Ae,w=0;return}var it=sa([o,oe],c.properties);if(a(it,f,y,Ae,w)===!1)return!1;w++,o=oe})===!1)return!1}}})}function Uj(r,a,c){var f=c,y=!1;return Z4(r,function(w,D,o,j,F){y===!1&&c===void 0?f=w:f=a(f,w,D,o,j,F),y=!0}),f}function W4(r,a){if(!r)throw new Error("geojson is required");ll(r,function(c,f,y){if(c.geometry!==null){var w=c.geometry.type,D=c.geometry.coordinates;switch(w){case"LineString":if(a(c,f,y,0,0)===!1)return!1;break;case"Polygon":for(var o=0;o<D.length;o++)if(a(sa(D[o],c.properties),f,y,o)===!1)return!1;break}}})}function Vj(r,a,c){var f=c;return W4(r,function(y,w,D,o){w===0&&c===void 0?f=y:f=a(f,y,w,D,o)}),f}function Qj(r,a){if(a=a||{},!Nv(a))throw new Error("options is invalid");var c=a.featureIndex||0,f=a.multiFeatureIndex||0,y=a.geometryIndex||0,w=a.segmentIndex||0,D=a.properties,o;switch(r.type){case"FeatureCollection":c<0&&(c=r.features.length+c),D=D||r.features[c].properties,o=r.features[c].geometry;break;case"Feature":D=D||r.properties,o=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":o=r;break;default:throw new Error("geojson is invalid")}if(o===null)return null;var j=o.coordinates;switch(o.type){case"Point":case"MultiPoint":return null;case"LineString":return w<0&&(w=j.length+w-1),sa([j[w],j[w+1]],D,a);case"Polygon":return y<0&&(y=j.length+y),w<0&&(w=j[y].length+w-1),sa([j[y][w],j[y][w+1]],D,a);case"MultiLineString":return f<0&&(f=j.length+f),w<0&&(w=j[f].length+w-1),sa([j[f][w],j[f][w+1]],D,a);case"MultiPolygon":return f<0&&(f=j.length+f),y<0&&(y=j[f].length+y),w<0&&(w=j[f][y].length-w-1),sa([j[f][y][w],j[f][y][w+1]],D,a)}throw new Error("geojson is invalid")}function Hj(r,a){if(a=a||{},!Nv(a))throw new Error("options is invalid");var c=a.featureIndex||0,f=a.multiFeatureIndex||0,y=a.geometryIndex||0,w=a.coordIndex||0,D=a.properties,o;switch(r.type){case"FeatureCollection":c<0&&(c=r.features.length+c),D=D||r.features[c].properties,o=r.features[c].geometry;break;case"Feature":D=D||r.properties,o=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":o=r;break;default:throw new Error("geojson is invalid")}if(o===null)return null;var j=o.coordinates;switch(o.type){case"Point":return oa(j,D,a);case"MultiPoint":return f<0&&(f=j.length+f),oa(j[f],D,a);case"LineString":return w<0&&(w=j.length+w),oa(j[w],D,a);case"Polygon":return y<0&&(y=j.length+y),w<0&&(w=j[y].length+w),oa(j[y][w],D,a);case"MultiLineString":return f<0&&(f=j.length+f),w<0&&(w=j[f].length+w),oa(j[f][w],D,a);case"MultiPolygon":return f<0&&(f=j.length+f),y<0&&(y=j[f].length+y),w<0&&(w=j[f][y].length-w),oa(j[f][y][w],D,a)}throw new Error("geojson is invalid")}const $j=Object.freeze(Object.defineProperty({__proto__:null,coordAll:Rj,coordEach:oh,coordReduce:jj,featureEach:Bm,featureReduce:Pj,findPoint:Hj,findSegment:Qj,flattenEach:ll,flattenReduce:Fj,geomEach:Lv,geomReduce:Bj,lineEach:W4,lineReduce:Vj,propEach:G4,propReduce:kj,segmentEach:Z4,segmentReduce:Uj},Symbol.toStringTag,{value:"Module"}));function Fm(r){var a=[1/0,1/0,-1/0,-1/0];return oh(r,function(c){a[0]>c[0]&&(a[0]=c[0]),a[1]>c[1]&&(a[1]=c[1]),a[2]<c[0]&&(a[2]=c[0]),a[3]<c[1]&&(a[3]=c[1])}),a}Fm.default=Fm;const Yj=Object.freeze(Object.defineProperty({__proto__:null,default:Fm},Symbol.toStringTag,{value:"Module"}));function Gj(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Af(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Um(r){return r.type==="Feature"?r.geometry:r}function Ef(r,a,c){if(c===void 0&&(c={}),!r)throw new Error("point is required");if(!a)throw new Error("polygon is required");var f=Gj(r),y=Um(a),w=y.type,D=a.bbox,o=y.coordinates;if(D&&Zj(f,D)===!1)return!1;w==="Polygon"&&(o=[o]);for(var j=!1,F=0;F<o.length&&!j;F++)if(q4(f,o[F][0],c.ignoreBoundary)){for(var $=!1,oe=1;oe<o[F].length&&!$;)q4(f,o[F][oe],!c.ignoreBoundary)&&($=!0),oe++;$||(j=!0)}return j}function q4(r,a,c){var f=!1;a[0][0]===a[a.length-1][0]&&a[0][1]===a[a.length-1][1]&&(a=a.slice(0,a.length-1));for(var y=0,w=a.length-1;y<a.length;w=y++){var D=a[y][0],o=a[y][1],j=a[w][0],F=a[w][1],$=r[1]*(D-j)+o*(j-r[0])+F*(r[0]-D)===0&&(D-r[0])*(j-r[0])<=0&&(o-r[1])*(F-r[1])<=0;if($)return!c;var oe=o>r[1]!=F>r[1]&&r[0]<(j-D)*(r[1]-o)/(F-o)+D;oe&&(f=!f)}return f}function Zj(r,a){return a[0]<=r[0]&&a[1]<=r[1]&&a[2]>=r[0]&&a[3]>=r[1]}function Wj(r,a){a===void 0&&(a={});var c=Fm(r),f=(c[0]+c[2])/2,y=(c[1]+c[3])/2;return oa([f,y],a.properties,a)}function K4(r){if(!r)throw new Error("geojson is required");var a=[];return ll(r,function(c){qj(c,a)}),Yl(a)}function qj(r,a){var c=[],f=r.geometry;if(f!==null){switch(f.type){case"Polygon":c=Af(f);break;case"LineString":c=[Af(f)]}c.forEach(function(y){var w=Kj(y,r.properties);w.forEach(function(D){D.id=a.length,a.push(D)})})}}function Kj(r,a){var c=[];return r.reduce(function(f,y){var w=sa([f,y],a);return w.bbox=Xj(f,y),c.push(w),y}),c}function Xj(r,a){var c=r[0],f=r[1],y=a[0],w=a[1],D=c<y?c:y,o=f<w?f:w,j=c>y?c:y,F=f>w?f:w;return[D,o,j,F]}var zv={exports:{}},X4={exports:{}};(function(r,a){(function(c,f){r.exports=f()})(Uw,function(){function c(me,ce,pe,ve,De){(function ct(St,Je,jt,pt,Pt){for(;pt>jt;){if(pt-jt>600){var Dt=pt-jt+1,Ht=Je-jt+1,It=Math.log(Dt),wt=.5*Math.exp(2*It/3),$t=.5*Math.sqrt(It*wt*(Dt-wt)/Dt)*(Ht-Dt/2<0?-1:1),gi=Math.max(jt,Math.floor(Je-Ht*wt/Dt+$t)),mi=Math.min(pt,Math.floor(Je+(Dt-Ht)*wt/Dt+$t));ct(St,Je,gi,mi,Pt)}var Q=St[Je],J=jt,M=pt;for(f(St,jt,Je),Pt(St[pt],Q)>0&&f(St,jt,pt);J<M;){for(f(St,J,M),J++,M--;Pt(St[J],Q)<0;)J++;for(;Pt(St[M],Q)>0;)M--}Pt(St[jt],Q)===0?f(St,jt,M):f(St,++M,pt),M<=Je&&(jt=M+1),Je<=M&&(pt=M-1)}})(me,ce,pe||0,ve||me.length-1,De||y)}function f(me,ce,pe){var ve=me[ce];me[ce]=me[pe],me[pe]=ve}function y(me,ce){return me<ce?-1:me>ce?1:0}var w=function(me){me===void 0&&(me=9),this._maxEntries=Math.max(4,me),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function D(me,ce,pe){if(!pe)return ce.indexOf(me);for(var ve=0;ve<ce.length;ve++)if(pe(me,ce[ve]))return ve;return-1}function o(me,ce){j(me,0,me.children.length,ce,me)}function j(me,ce,pe,ve,De){De||(De=it(null)),De.minX=1/0,De.minY=1/0,De.maxX=-1/0,De.maxY=-1/0;for(var ct=ce;ct<pe;ct++){var St=me.children[ct];F(De,me.leaf?ve(St):St)}return De}function F(me,ce){return me.minX=Math.min(me.minX,ce.minX),me.minY=Math.min(me.minY,ce.minY),me.maxX=Math.max(me.maxX,ce.maxX),me.maxY=Math.max(me.maxY,ce.maxY),me}function $(me,ce){return me.minX-ce.minX}function oe(me,ce){return me.minY-ce.minY}function te(me){return(me.maxX-me.minX)*(me.maxY-me.minY)}function ge(me){return me.maxX-me.minX+(me.maxY-me.minY)}function xe(me,ce){return me.minX<=ce.minX&&me.minY<=ce.minY&&ce.maxX<=me.maxX&&ce.maxY<=me.maxY}function Ae(me,ce){return ce.minX<=me.maxX&&ce.minY<=me.maxY&&ce.maxX>=me.minX&&ce.maxY>=me.minY}function it(me){return{children:me,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function We(me,ce,pe,ve,De){for(var ct=[ce,pe];ct.length;)if(!((pe=ct.pop())-(ce=ct.pop())<=ve)){var St=ce+Math.ceil((pe-ce)/ve/2)*ve;c(me,St,ce,pe,De),ct.push(ce,St,St,pe)}}return w.prototype.all=function(){return this._all(this.data,[])},w.prototype.search=function(me){var ce=this.data,pe=[];if(!Ae(me,ce))return pe;for(var ve=this.toBBox,De=[];ce;){for(var ct=0;ct<ce.children.length;ct++){var St=ce.children[ct],Je=ce.leaf?ve(St):St;Ae(me,Je)&&(ce.leaf?pe.push(St):xe(me,Je)?this._all(St,pe):De.push(St))}ce=De.pop()}return pe},w.prototype.collides=function(me){var ce=this.data;if(!Ae(me,ce))return!1;for(var pe=[];ce;){for(var ve=0;ve<ce.children.length;ve++){var De=ce.children[ve],ct=ce.leaf?this.toBBox(De):De;if(Ae(me,ct)){if(ce.leaf||xe(me,ct))return!0;pe.push(De)}}ce=pe.pop()}return!1},w.prototype.load=function(me){if(!me||!me.length)return this;if(me.length<this._minEntries){for(var ce=0;ce<me.length;ce++)this.insert(me[ce]);return this}var pe=this._build(me.slice(),0,me.length-1,0);if(this.data.children.length)if(this.data.height===pe.height)this._splitRoot(this.data,pe);else{if(this.data.height<pe.height){var ve=this.data;this.data=pe,pe=ve}this._insert(pe,this.data.height-pe.height-1,!0)}else this.data=pe;return this},w.prototype.insert=function(me){return me&&this._insert(me,this.data.height-1),this},w.prototype.clear=function(){return this.data=it([]),this},w.prototype.remove=function(me,ce){if(!me)return this;for(var pe,ve,De,ct=this.data,St=this.toBBox(me),Je=[],jt=[];ct||Je.length;){if(ct||(ct=Je.pop(),ve=Je[Je.length-1],pe=jt.pop(),De=!0),ct.leaf){var pt=D(me,ct.children,ce);if(pt!==-1)return ct.children.splice(pt,1),Je.push(ct),this._condense(Je),this}De||ct.leaf||!xe(ct,St)?ve?(pe++,ct=ve.children[pe],De=!1):ct=null:(Je.push(ct),jt.push(pe),pe=0,ve=ct,ct=ct.children[0])}return this},w.prototype.toBBox=function(me){return me},w.prototype.compareMinX=function(me,ce){return me.minX-ce.minX},w.prototype.compareMinY=function(me,ce){return me.minY-ce.minY},w.prototype.toJSON=function(){return this.data},w.prototype.fromJSON=function(me){return this.data=me,this},w.prototype._all=function(me,ce){for(var pe=[];me;)me.leaf?ce.push.apply(ce,me.children):pe.push.apply(pe,me.children),me=pe.pop();return ce},w.prototype._build=function(me,ce,pe,ve){var De,ct=pe-ce+1,St=this._maxEntries;if(ct<=St)return o(De=it(me.slice(ce,pe+1)),this.toBBox),De;ve||(ve=Math.ceil(Math.log(ct)/Math.log(St)),St=Math.ceil(ct/Math.pow(St,ve-1))),(De=it([])).leaf=!1,De.height=ve;var Je=Math.ceil(ct/St),jt=Je*Math.ceil(Math.sqrt(St));We(me,ce,pe,jt,this.compareMinX);for(var pt=ce;pt<=pe;pt+=jt){var Pt=Math.min(pt+jt-1,pe);We(me,pt,Pt,Je,this.compareMinY);for(var Dt=pt;Dt<=Pt;Dt+=Je){var Ht=Math.min(Dt+Je-1,Pt);De.children.push(this._build(me,Dt,Ht,ve-1))}}return o(De,this.toBBox),De},w.prototype._chooseSubtree=function(me,ce,pe,ve){for(;ve.push(ce),!ce.leaf&&ve.length-1!==pe;){for(var De=1/0,ct=1/0,St=void 0,Je=0;Je<ce.children.length;Je++){var jt=ce.children[Je],pt=te(jt),Pt=(Dt=me,Ht=jt,(Math.max(Ht.maxX,Dt.maxX)-Math.min(Ht.minX,Dt.minX))*(Math.max(Ht.maxY,Dt.maxY)-Math.min(Ht.minY,Dt.minY))-pt);Pt<ct?(ct=Pt,De=pt<De?pt:De,St=jt):Pt===ct&&pt<De&&(De=pt,St=jt)}ce=St||ce.children[0]}var Dt,Ht;return ce},w.prototype._insert=function(me,ce,pe){var ve=pe?me:this.toBBox(me),De=[],ct=this._chooseSubtree(ve,this.data,ce,De);for(ct.children.push(me),F(ct,ve);ce>=0&&De[ce].children.length>this._maxEntries;)this._split(De,ce),ce--;this._adjustParentBBoxes(ve,De,ce)},w.prototype._split=function(me,ce){var pe=me[ce],ve=pe.children.length,De=this._minEntries;this._chooseSplitAxis(pe,De,ve);var ct=this._chooseSplitIndex(pe,De,ve),St=it(pe.children.splice(ct,pe.children.length-ct));St.height=pe.height,St.leaf=pe.leaf,o(pe,this.toBBox),o(St,this.toBBox),ce?me[ce-1].children.push(St):this._splitRoot(pe,St)},w.prototype._splitRoot=function(me,ce){this.data=it([me,ce]),this.data.height=me.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},w.prototype._chooseSplitIndex=function(me,ce,pe){for(var ve,De,ct,St,Je,jt,pt,Pt=1/0,Dt=1/0,Ht=ce;Ht<=pe-ce;Ht++){var It=j(me,0,Ht,this.toBBox),wt=j(me,Ht,pe,this.toBBox),$t=(De=It,ct=wt,St=void 0,Je=void 0,jt=void 0,pt=void 0,St=Math.max(De.minX,ct.minX),Je=Math.max(De.minY,ct.minY),jt=Math.min(De.maxX,ct.maxX),pt=Math.min(De.maxY,ct.maxY),Math.max(0,jt-St)*Math.max(0,pt-Je)),gi=te(It)+te(wt);$t<Pt?(Pt=$t,ve=Ht,Dt=gi<Dt?gi:Dt):$t===Pt&&gi<Dt&&(Dt=gi,ve=Ht)}return ve||pe-ce},w.prototype._chooseSplitAxis=function(me,ce,pe){var ve=me.leaf?this.compareMinX:$,De=me.leaf?this.compareMinY:oe;this._allDistMargin(me,ce,pe,ve)<this._allDistMargin(me,ce,pe,De)&&me.children.sort(ve)},w.prototype._allDistMargin=function(me,ce,pe,ve){me.children.sort(ve);for(var De=this.toBBox,ct=j(me,0,ce,De),St=j(me,pe-ce,pe,De),Je=ge(ct)+ge(St),jt=ce;jt<pe-ce;jt++){var pt=me.children[jt];F(ct,me.leaf?De(pt):pt),Je+=ge(ct)}for(var Pt=pe-ce-1;Pt>=ce;Pt--){var Dt=me.children[Pt];F(St,me.leaf?De(Dt):Dt),Je+=ge(St)}return Je},w.prototype._adjustParentBBoxes=function(me,ce,pe){for(var ve=pe;ve>=0;ve--)F(ce[ve],me)},w.prototype._condense=function(me){for(var ce=me.length-1,pe=void 0;ce>=0;ce--)me[ce].children.length===0?ce>0?(pe=me[ce-1].children).splice(pe.indexOf(me[ce]),1):this.clear():o(me[ce],this.toBBox)},w})})(X4);var Jj=X4.exports;const ek=y_(Oj),tk=y_($j),ik=y_(Yj);var Da=Jj,J4=ek,e5=tk,sh=ik.default,nk=e5.featureEach;e5.coordEach,J4.polygon;var t5=J4.featureCollection;function i5(r){var a=new Da(r);return a.insert=function(c){if(c.type!=="Feature")throw new Error("invalid feature");return c.bbox=c.bbox?c.bbox:sh(c),Da.prototype.insert.call(this,c)},a.load=function(c){var f=[];return Array.isArray(c)?c.forEach(function(y){if(y.type!=="Feature")throw new Error("invalid features");y.bbox=y.bbox?y.bbox:sh(y),f.push(y)}):nk(c,function(y){if(y.type!=="Feature")throw new Error("invalid features");y.bbox=y.bbox?y.bbox:sh(y),f.push(y)}),Da.prototype.load.call(this,f)},a.remove=function(c,f){if(c.type!=="Feature")throw new Error("invalid feature");return c.bbox=c.bbox?c.bbox:sh(c),Da.prototype.remove.call(this,c,f)},a.clear=function(){return Da.prototype.clear.call(this)},a.search=function(c){var f=Da.prototype.search.call(this,this.toBBox(c));return t5(f)},a.collides=function(c){return Da.prototype.collides.call(this,this.toBBox(c))},a.all=function(){var c=Da.prototype.all.call(this);return t5(c)},a.toJSON=function(){return Da.prototype.toJSON.call(this)},a.fromJSON=function(c){return Da.prototype.fromJSON.call(this,c)},a.toBBox=function(c){var f;if(c.bbox)f=c.bbox;else if(Array.isArray(c)&&c.length===4)f=c;else if(Array.isArray(c)&&c.length===6)f=[c[0],c[1],c[3],c[4]];else if(c.type==="Feature")f=sh(c);else if(c.type==="FeatureCollection")f=sh(c);else throw new Error("invalid geojson");return{minX:f[0],minY:f[1],maxX:f[2],maxY:f[3]}},a}zv.exports=i5,zv.exports.default=i5;var rk=zv.exports;const ok=m_(rk);function Ov(r,a){var c={},f=[];if(r.type==="LineString"&&(r=Hs(r)),a.type==="LineString"&&(a=Hs(a)),r.type==="Feature"&&a.type==="Feature"&&r.geometry!==null&&a.geometry!==null&&r.geometry.type==="LineString"&&a.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&a.geometry.coordinates.length===2){var y=n5(r,a);return y&&f.push(y),Yl(f)}var w=ok();return w.load(K4(a)),Bm(K4(r),function(D){Bm(w.search(D),function(o){var j=n5(D,o);if(j){var F=Af(j).join(",");c[F]||(c[F]=!0,f.push(j))}})}),Yl(f)}function n5(r,a){var c=Af(r),f=Af(a);if(c.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(f.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var y=c[0][0],w=c[0][1],D=c[1][0],o=c[1][1],j=f[0][0],F=f[0][1],$=f[1][0],oe=f[1][1],te=(oe-F)*(D-y)-($-j)*(o-w),ge=($-j)*(w-F)-(oe-F)*(y-j),xe=(D-y)*(w-F)-(o-w)*(y-j);if(te===0)return null;var Ae=ge/te,it=xe/te;if(Ae>=0&&Ae<=1&&it>=0&&it<=1){var We=y+Ae*(D-y),me=w+Ae*(o-w);return oa([We,me])}return null}function jv(r,a){a===void 0&&(a={});var c=Um(r);switch(!a.properties&&r.type==="Feature"&&(a.properties=r.properties),c.type){case"Polygon":return sk(c,a);case"MultiPolygon":return ak(c,a);default:throw new Error("invalid poly")}}function sk(r,a){a===void 0&&(a={});var c=Um(r),f=c.coordinates,y=a.properties?a.properties:r.type==="Feature"?r.properties:{};return r5(f,y)}function ak(r,a){a===void 0&&(a={});var c=Um(r),f=c.coordinates,y=a.properties?a.properties:r.type==="Feature"?r.properties:{},w=[];return f.forEach(function(D){w.push(r5(D,y))}),Yl(w)}function r5(r,a){return r.length>1?Sv(r,a):sa(r[0],a)}function lk(r,a){var c=!0;return ll(r,function(f){ll(a,function(y){if(c===!1)return!1;c=ck(f.geometry,y.geometry)})}),c}function ck(r,a){switch(r.type){case"Point":switch(a.type){case"Point":return!fk(r.coordinates,a.coordinates);case"LineString":return!o5(a,r);case"Polygon":return!Ef(r,a)}break;case"LineString":switch(a.type){case"Point":return!o5(r,a);case"LineString":return!uk(r,a);case"Polygon":return!s5(a,r)}break;case"Polygon":switch(a.type){case"Point":return!Ef(a,r);case"LineString":return!s5(r,a);case"Polygon":return!hk(a,r)}}return!1}function o5(r,a){for(var c=0;c<r.coordinates.length-1;c++)if(dk(r.coordinates[c],r.coordinates[c+1],a.coordinates))return!0;return!1}function uk(r,a){var c=Ov(r,a);return c.features.length>0}function s5(r,a){for(var c=0,f=a.coordinates;c<f.length;c++){var y=f[c];if(Ef(y,r))return!0}var w=Ov(a,jv(r));return w.features.length>0}function hk(r,a){for(var c=0,f=r.coordinates[0];c<f.length;c++){var y=f[c];if(Ef(y,a))return!0}for(var w=0,D=a.coordinates[0];w<D.length;w++){var o=D[w];if(Ef(o,r))return!0}var j=Ov(jv(r),jv(a));return j.features.length>0}function dk(r,a,c){var f=c[0]-r[0],y=c[1]-r[1],w=a[0]-r[0],D=a[1]-r[1],o=f*D-y*w;return o!==0?!1:Math.abs(w)>=Math.abs(D)?w>0?r[0]<=c[0]&&c[0]<=a[0]:a[0]<=c[0]&&c[0]<=r[0]:D>0?r[1]<=c[1]&&c[1]<=a[1]:a[1]<=c[1]&&c[1]<=r[1]}function fk(r,a){return r[0]===a[0]&&r[1]===a[1]}function pk(r,a){var c=!1;return ll(r,function(f){ll(a,function(y){if(c===!0)return!0;c=!lk(f.geometry,y.geometry)})}),c}const gk=()=>{const[r,a]=Ce.useState(!1),[c,f]=Ce.useState(!1),y=ra(),w=F4(),D=zi(wv),o=zi(Tf),j=zi(Mv),F=zi(km),$=zi(As),oe=zi(jm),te=zi(R4),ge=zi(Df),xe=zi(vj),Ae=zi(Iv),[it,We]=Ce.useState(!1),[me,ce]=ln($l),pe=ln(Pm),[ve]=ln(V4),[De,ct]=Ce.useState({id:null,originalRule:null});Ce.useEffect(()=>{w&&St()},[w]),Ce.useEffect(()=>{St()},[$,me,F,j,oe,D,te,o,ve]);function St(){const Pt=ge.find(Dt=>Dt.name.toLowerCase()===me.toLowerCase());if(!j&&De.id&&$&&it&&(window.mapsindoors.services.LocationsService.getLocation(De.id).then(Dt=>{Dt&&($.setDisplayRule(Dt.id,De.originalRule||null),We(!1))}),ct({id:null,originalRule:null})),$&&Pt){if(a(!0),j&&y)ct(Dt=>({...Dt,id:j})),Lr(ve)?window.mapsindoors.services.LocationsService.getLocation(j).then(Dt=>{if(Dt){const Ht=Dt.properties.floor;$.setFloor(Ht);const It=$.getDisplayRule(Dt);ct(wt=>({...wt,originalRule:{...It}})),Je(Dt),If().then(wt=>{f(Dt.geometry),Es(Dt.geometry,$,wt,0,te?pt(te):void 0,xe,D)})}}):If().then(Dt=>{f(jt().geometry),Es(jt().geometry,$,Dt,0,pt(te),xe,D)});else if(F&&!Ae)Lr(ve)?window.mapsindoors.services.LocationsService.getLocation(F).then(Dt=>{if(Dt){const Ht=Dt.properties.floor;$.setFloor(Ht),y?$c().then(It=>{f(Dt.geometry),Es(Dt.geometry,$,0,It,te?pt(te):void 0,xe,D)}):rh().then(It=>{f(Dt.geometry),Es(Dt.geometry,$,It,0,te?pt(te):void 0,xe,D)})}}):y?$c().then(Dt=>{f(jt().geometry),Es(jt().geometry,$,0,Dt,pt(te),xe,D)}):rh().then(Dt=>{f(jt().geometry),Es(jt().geometry,$,Dt,0,pt(te),xe,D)});else if(Pt)if(Ae)y?(f(Pt.geometry),Es(Pt.geometry,$,0,0,pt(te),xe,D)):rh().then(Dt=>{f(Pt.geometry),Es(Pt.geometry,$,Dt,0,pt(te),xe,D)});else{const Dt=ge.find(Ht=>pk(Ht.geometry,jt().geometry));Lr(ve)?(f(Pt.geometry),Es(Pt.geometry,$,0,0,pt(te),xe,D)):Lr(Dt)?y?$c().then(Ht=>{f(jt().geometry),Es(jt().geometry,$,0,Ht,pt(te),xe,D)}):rh().then(Ht=>{f(jt().geometry),Es(jt().geometry,$,Ht,0,pt(te),xe,D)}):(y?$c().then(Ht=>{f(jt().geometry),Es(jt().geometry,$,0,Ht,pt(te),xe,D)}):rh().then(Ht=>{f(jt().geometry),Es(jt().geometry,$,Ht,0,pt(te),xe,D)}),pe&&ce(Dt.name))}}}function Je(Pt){if(it)return;const Dt=$.getDisplayRule(Pt);Dt.visible=!0,Dt.iconSize={width:Dt.iconSize.width*2,height:Dt.iconSize.height*2},Dt.iconVisible=!0,Dt.zoomFrom=0,Dt.zoomTo=999,Dt.clickable=!1,$.setDisplayRule(Pt.id,Dt),We(!0)}function jt(){const[Pt,Dt]=ve?ve.split(",").map(Number):[void 0,void 0];return{geometry:{type:"Point",coordinates:[Pt,Dt]}}}function pt(Pt){return Lr(Pt)?18:Pt}return[r,c]};function Es(r,a,c,f,y,w,D){const o=Number(w),j=Number(D),F=y!==void 0?Number(y):void 0;if(F===void 0)a.getMapView().tilt(o||0),a.getMapView().rotate(j||0),a.goTo({type:"Feature",geometry:r,properties:{}},{maxZoom:F??22,padding:{top:0,right:0,bottom:c,left:f}});else{const $=Wj(r);a.getMapView().setCenter({lat:$.geometry.coordinates[1],lng:$.geometry.coordinates[0]}),a.getMapView().tilt(o||0),a.getMapView().rotate(j||0),a.setZoom(F)}}const a5=On({key:"hideNonMatches",default:!1}),mk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 3H9V5H5V9H3V3ZM15 3H21V9H19V5H15V3ZM5 15V19H9V21H3V15H5ZM21 15V21H15V19H19V15H21Z",fill:"#666666",style:{fill:"#666666",fill:"color(display-p3 0.4000 0.4000 0.4000)",fillOpacity:1}}),en.createElement("rect",{x:9,y:9,width:6,height:6,fill:"#666666",style:{fill:"#666666",fill:"color(display-p3 0.4000 0.4000 0.4000)",fillOpacity:1}})),Sf=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M6 6L18 18",stroke:"#636971",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),en.createElement("path",{d:"M18 6L6 18",stroke:"#636971",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),PW="";l5.propTypes={isViewSelectorDisabled:et.bool,isViewSelectorVisible:et.bool};function l5({isViewSelectorDisabled:r,isViewSelectorVisible:a}){const{t:c}=Ho(),[f,y]=Ce.useState(!1),[w,D]=Ce.useState([]),[o,j]=Ce.useState(null),F=ra(),$=zi(As),oe=zi($l),te=".view-selector-portal",[ge,xe]=Ce.useState(null),Ae=Ce.useRef(null),it=Ce.useRef(null),We=6,me=60;Ce.useEffect(()=>{let St=document.querySelector(te);if(St){xe(St);return}const Je=new MutationObserver(()=>{St=document.querySelector(te),St&&(xe(St),Je.disconnect())}),jt=document.body,pt={childList:!0,subtree:!0};return Je.observe(jt,pt),()=>{Je==null||Je.disconnect()}},[]),Ce.useEffect(()=>{const St=()=>{const jt=document.querySelector(te);jt&&xe(jt)},Je=new ResizeObserver(()=>{St()});return Je.observe(document.body),()=>{Je==null||Je.disconnect()}},[F]),Ce.useEffect(()=>{var St;if($&&oe){const Je=(St=$.getVenue())==null?void 0:St.id;Je&&j(Je)}},[$,oe]),Ce.useEffect(()=>{$&&oe&&window.mapsindoors.services.VenuesService.getVenues().then(St=>{const Je=St.find(jt=>jt.name.toLowerCase()===oe.toLowerCase());Je!=null&&Je.id&&j(Je.id)})},[$,oe]),Ce.useEffect(()=>{o&&window.mapsindoors.services.VenuesService.getBuildings(o).then(St=>{D(St)})},[o]);const ce=Ce.useMemo(()=>w.map(St=>({id:St.id,name:St.buildingInfo.name})),[w]),pe=Ce.useCallback(St=>{$.fitBuilding(St),y(!1)},[$]);if(Ce.useEffect(()=>{if(!(f&&F))return;function St(Je){Ae.current&&!Ae.current.contains(Je.target)&&it.current&&!it.current.contains(Je.target)&&y(!1)}return document.addEventListener("mousedown",St),()=>{document.removeEventListener("mousedown",St)}},[f,F]),ce.length<=1||a===!1)return null;const ve=()=>Be.jsx("button",{ref:it,className:"view-selector__toggle-button",onClick:()=>y(!f),disabled:r,children:Be.jsx(mk,{})}),De=()=>{const St=Ce.useMemo(()=>F&&ce.length>We?{height:`${We*me}px`}:{},[F,ce.length]);return Be.jsx("div",{className:"building-list",style:St,children:ce.map(Je=>Be.jsx("button",{className:"building-list__item",onClick:()=>pe(Je.id),children:Be.jsx("span",{children:Je.name})},Je.id))})},ct=Be.jsxs("div",{className:"view-selector",children:[!F&&f&&Be.jsxs("div",{className:"mobile-overlay",children:[Be.jsx("div",{className:"mobile-overlay__backdrop",onClick:()=>y(!1)}),Be.jsxs("div",{className:"view-selector__container view-selector__container--mobile",children:[Be.jsxs("div",{className:"mobile-overlay__header",children:[Be.jsx("button",{className:"mobile-overlay__exit-button",onClick:()=>y(!1),"aria-label":c("Close view selector"),children:Be.jsx(Sf,{})}),Be.jsx("span",{children:c("Go to view")})]}),Be.jsx(De,{})]})]}),F?Be.jsxs("div",{className:"view-selector__button-container view-selector__button-container--desktop",children:[f&&Be.jsx("div",{ref:Ae,className:"view-selector__container view-selector__container--desktop",children:Be.jsx(De,{})}),Be.jsx(ve,{})]}):Be.jsx(ve,{})]});return ge?os.createPortal(ct,ge):null}const yk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.00177 3V5H13.0018V7H11.3742C11.0618 8.91166 10.4455 10.5244 9.43896 11.8188C10.1899 12.3437 11.1128 12.7471 12.2443 13.0299L13.2145 13.2725L12.7294 15.2128L11.7593 14.9702C10.2984 14.605 9.04252 14.0424 8.00171 13.245C6.96091 14.0424 5.70503 14.6049 4.24428 14.9701L3.27413 15.2127L2.78906 13.2724L3.75921 13.0299C4.89067 12.747 5.81358 12.3436 6.56448 11.8188C5.55798 10.5244 4.94173 8.91163 4.62931 7H3.00177V5H7.00177V3H9.00177ZM6.65973 7C6.92571 8.41424 7.37545 9.52718 8.00174 10.4013C8.62805 9.52718 9.0778 8.41425 9.34379 7H6.65973ZM16.1161 10H17.8874L22.3317 19.481L20.5207 20.3299L19.4286 18H14.5749L13.4828 20.3299L11.6719 19.481L16.1161 10ZM15.5124 16H18.4911L17.0018 12.8227L15.5124 16Z",fill:"#666666",style:{fill:"#666666",fill:"color(display-p3 0.4000 0.4000 0.4000)",fillOpacity:1}})),RW="";function c5({toggleButtonRef:r,isExpanded:a,setIsExpanded:c}){return Be.jsx("button",{ref:r,className:"language-selector__toggle-button",onClick:()=>c(f=>!f),"aria-haspopup":"listbox","aria-expanded":a,"aria-label":"Select language",children:Be.jsx(yk,{})})}function u5({supportedLanguages:r,currentLanguage:a,setLanguage:c,setIsExpanded:f}){return Be.jsx("div",{className:"language-selector__list",children:r.map(y=>Be.jsx("button",{className:`language-selector__item${a===y.code?" language-selector__item--selected":""}`,onClick:()=>{c(y.code),f(!1)},children:y.label},y.code))})}function h5({currentLanguage:r,setLanguage:a,isVisible:c}){const{t:f}=Ho(),[y,w]=Ce.useState(!1),D=Ce.useRef(null),o=Ce.useRef(null),[j,F]=Ce.useState(null),$=ra(),oe=".language-selector-portal";return Ce.useEffect(()=>{let te=document.querySelector(oe);if(te){F(te);return}const ge=new MutationObserver(()=>{te=document.querySelector(oe),te&&(F(te),ge.disconnect())});return ge.observe(document.body,{childList:!0,subtree:!0}),()=>ge.disconnect()},[]),Ce.useEffect(()=>{if(!(y&&$))return;function te(ge){D.current&&!D.current.contains(ge.target)&&o.current&&!o.current.contains(ge.target)&&w(!1)}return document.addEventListener("mousedown",te),()=>document.removeEventListener("mousedown",te)},[y,$]),!c||!j?null:os.createPortal($?Be.jsxs("div",{className:"language-selector__button-container",children:[y&&Be.jsx("div",{ref:D,className:"language-selector__container",children:Be.jsx(u5,{supportedLanguages:b4,currentLanguage:r,setLanguage:a,setIsExpanded:w})}),Be.jsx(c5,{toggleButtonRef:o,isExpanded:y,setIsExpanded:w})]}):Be.jsxs(Be.Fragment,{children:[Be.jsx(c5,{toggleButtonRef:o,isExpanded:y,setIsExpanded:w}),y&&Be.jsxs("div",{className:"language-selector-overlay",children:[Be.jsx("div",{className:"language-selector-overlay__backdrop",onClick:()=>w(!1)}),Be.jsxs("div",{className:"language-selector__container",children:[Be.jsxs("div",{className:"language-selector-overlay__header",children:[Be.jsx("button",{className:"language-selector-overlay__exit-button",onClick:()=>w(!1),"aria-label":"Close language selector",children:"×"}),Be.jsx("span",{children:f("Select language")})]}),Be.jsx(u5,{supportedLanguages:b4,currentLanguage:r,setLanguage:a,setIsExpanded:w})]})]})]}),j)}h5.propTypes={currentLanguage:et.string,setLanguage:et.func.isRequired,isVisible:et.bool};const ah=On({key:"appConfig",default:void 0}),_k=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M14.4978 10C14.4978 11.3807 13.3785 12.5 11.9978 12.5C10.6171 12.5 9.4978 11.3807 9.4978 10C9.4978 8.61929 10.6171 7.5 11.9978 7.5C13.3785 7.5 14.4978 8.61929 14.4978 10Z",stroke:"#78716C",strokeWidth:2,strokeLinejoin:"round"}),en.createElement("path",{d:"M19 10C19 14.8354 14.2437 19.1734 12.5723 20.5484C12.2352 20.8258 11.7648 20.8258 11.4277 20.5484C9.75634 19.1734 5 14.8354 5 10C5 6.13401 8.13401 3 12 3C15.866 3 19 6.13401 19 10Z",stroke:"#78716C",strokeWidth:2,strokeLinejoin:"round"})),BW="",Aa=On({key:"kioskLocation",default:null}),Yc=()=>{const r=zi(Aa),a=ra();return!(!r||r&&!a)};function d5(){const[r,a]=Ce.useState(null),c=".reset-view-portal",f=Yc(),y=zi(Mv),w=zi(As),D=zi($l),o=zi(Aa),j=ra();function F(){window.mapsindoors.services.LocationsService.getLocation(y).then(ge=>{$([ge])}).catch(ge=>{console.error("Error resetting map position:",ge)})}function $(ge){if(!w.goTo)return;const xe=w.getFloor(),Ae={type:"FeatureCollection",features:ge.filter(it=>parseInt(it.properties.floor,10)===parseInt(xe,10)).filter(it=>D&&it.properties.venueId.toLowerCase()===D.toLowerCase()).map(it=>({type:"Feature",geometry:it.geometry,properties:it.properties}))};Ae.features.length>0&&Promise.all([oe(),te()]).then(([it,We])=>{w.goTo(Ae,{maxZoom:22,padding:{bottom:it,left:We,top:0,right:0}})})}function oe(){return new Promise(ge=>{j?o?If().then(xe=>ge(xe)):ge(0):ge(200)})}function te(){return new Promise(ge=>{j?o?ge(0):$c().then(xe=>ge(xe)):ge(0)})}return Ce.useEffect(()=>{let ge=document.querySelector(c);if(ge){a(ge);return}const xe=new MutationObserver(()=>{ge=document.querySelector(c),ge&&(a(ge),xe.disconnect())});return xe.observe(document.body,{childList:!0,subtree:!0}),()=>xe.disconnect()},[]),!f||!r?null:os.createPortal(Be.jsx("button",{className:"reset-kiosk-view-button",onClick:F,title:"Reset to initial kiosk view","aria-label":"Reset to initial kiosk view",children:Be.jsx(_k,{})}),r)}d5.propTypes={onReset:et.func,isVisible:et.bool},f5.propTypes={onLocationClick:et.func,onMapPositionKnown:et.func.isRequired,useMapProviderModule:et.bool.isRequired,onMapPositionInvestigating:et.func.isRequired,onViewModeSwitchKnown:et.func.isRequired,resetCount:et.number.isRequired,mapOptions:et.object,gmMapId:et.string,isWayfindingOrDirections:et.bool,currentLanguage:et.string,setLanguage:et.func,devicePosition:et.object};let kv;function f5({onLocationClick:r,onMapPositionKnown:a,useMapProviderModule:c,onMapPositionInvestigating:f,onViewModeSwitchKnown:y,resetCount:w,mapOptions:D,gmMapId:o,isWayfindingOrDirections:j,currentLanguage:F,setLanguage:$,devicePosition:oe}){const te=zi(xv),ge=zi(bv),xe=zi(Lm),[Ae,it]=ln(Nm),[We,me]=ln(As),[,ce]=ln(Cm),[,pe]=ln(vv),ve=zi(zm),De=zi(Om),ct=zi(j4),St=zi(wv),Je=zi(jm),[,jt]=ln(k4),pt=zi(P4),[,Pt]=ln(Mf),Dt=zi(a5),Ht=zi(ah),[It,wt]=Ce.useState(!1),[$t,gi]=Ce.useState(!1);yj(te);const[mi,Q]=gk();Ce.useEffect(()=>{if(!pt||ge===null&&xe===null)return;let B;const U=pt.modules.map(Y=>Y.toLowerCase()).includes("mapbox");c?U?xe&&(B=$o.Mapbox):ge&&(B=$o.Google):xe?B=$o.Mapbox:B=$o.Google,B?it(B):(Pt({text:"Please provide a Mapbox Access Token or Google Maps API key to show a map.",type:"error"}),it(void 0))},[ge,xe,pt]),Ce.useEffect(()=>{mi&&f()},[mi]),Ce.useEffect(()=>{Q&&a()},[Q]),Ce.useEffect(()=>{if(!We)return;const B=ve||De;if(!B)return;const U=B.map(Y=>Y.id);Dt||!We.highlight?We.filter(U):We.highlight(U)},[ve,De,We,Dt]),Ce.useEffect(()=>{We&&(isNaN(parseInt(Je))||We.getMapView().tilt(parseInt(Je)),isNaN(parseInt(St))||We.getMapView().rotate(parseInt(St)))},[St,Je,We]);const J=B=>{M(B)},M=B=>{if(B&&kv){let U=B.getTileURL();if(U){U=B.getTileURL().replace("default",kv);const Y=U==null?void 0:U.replace("{floor}",B.getFloor());B.getMapView().setMapsIndoorsTileURL(Y)}}},z=(B,U,Y)=>{B.on("mouseenter",()=>{var Qe;const de=B.getHoveredLocation();((Qe=de==null?void 0:de.properties.locationSettings)==null?void 0:Qe.selectable)===!1&&B.unhoverLocation()}),B.setDisplayRule(["MI_BUILDING_OUTLINE"],{visible:!1}),B.on("click",de=>r(de)),B.once("building_changed",()=>J(B)),B.on("floor_changed",()=>M(B)),me(B),window.mapsIndoorsInstance=B;const ee=new CustomEvent("mapsIndoorsInstanceAvailable");window.dispatchEvent(ee);let ne;Ae===$o.Google?ne=new window.mapsindoors.directions.GoogleMapsProvider:Ae===$o.Mapbox&&(ne=new window.mapsindoors.directions.MapboxProvider(xe));const ie=new window.mapsindoors.services.DirectionsService(ne);pe(ie),me(B),U.nodeName==="MI-MY-POSITION"?U.addEventListener("position_received",de=>{de.detail.accurate===!0&&ce(de.detail.position)}):U.on("position_received",de=>{de.accurate===!0&&ce(de.position)}),jt(U),y(Y)};return Ce.useEffect(()=>{kv=ct||"default",M(We)},[ct]),Ce.useEffect(()=>{var B,U,Y,ee;Ht&&(Lr((B=Ht==null?void 0:Ht.appSettings)==null?void 0:B.viewSelector)?wt(!1):wt(((U=Ht==null?void 0:Ht.appSettings)==null?void 0:U.viewSelector.trim().toLowerCase())==="true"),Lr((Y=Ht==null?void 0:Ht.appSettings)==null?void 0:Y.languageSelector)?gi(!1):gi(((ee=Ht==null?void 0:Ht.appSettings)==null?void 0:ee.languageSelector.trim().toLowerCase())==="true"))},[Ht]),Be.jsxs(Be.Fragment,{children:[te&&Be.jsx(O4,{apiKey:te,mapboxAccessToken:Ae===$o.Mapbox?xe:void 0,gmApiKey:Ae===$o.Google?ge:void 0,onInitialized:z,resetUICounter:w,mapOptions:D,gmMapId:o,devicePosition:oe}),te&&Be.jsxs(Be.Fragment,{children:[Be.jsx(l5,{isViewSelectorVisible:It,isViewSelectorDisabled:j}),Be.jsx(h5,{currentLanguage:F,setLanguage:$,isVisible:$t}),Be.jsx(d5,{})]})]})}const Ea=On({key:"primaryColor",default:"#005655"}),FW="",Pv=On({key:"logo",default:void 0});function vk(){const r=zi(Ea),a=zi(Pv);return Be.jsx("div",{className:"splash-screen",children:Be.jsxs("div",{className:"splash-screen__container",children:[Be.jsx("img",{className:"splash-screen__logo "+(a?"splash-screen__logo--visible":""),src:a,alt:""}),Be.jsx("div",{className:"splash-screen__loader",style:{border:`8px solid ${r}33`,borderLeft:`8px solid ${r}`}})]})})}function p5(r,a){if(r==null)return{};var c={};for(var f in r)if({}.hasOwnProperty.call(r,f)){if(a.indexOf(f)!==-1)continue;c[f]=r[f]}return c}function Rv(r,a){return Rv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,f){return c.__proto__=f,c},Rv(r,a)}function g5(r,a){r.prototype=Object.create(a.prototype),r.prototype.constructor=r,Rv(r,a)}function xk(r,a){return r.classList?!!a&&r.classList.contains(a):(" "+(r.className.baseVal||r.className)+" ").indexOf(" "+a+" ")!==-1}function bk(r,a){r.classList?r.classList.add(a):xk(r,a)||(typeof r.className=="string"?r.className=r.className+" "+a:r.setAttribute("class",(r.className&&r.className.baseVal||"")+" "+a))}function m5(r,a){return r.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function wk(r,a){r.classList?r.classList.remove(a):typeof r.className=="string"?r.className=m5(r.className,a):r.setAttribute("class",m5(r.className&&r.className.baseVal||"",a))}const y5={disabled:!1};var Mk=process.env.NODE_ENV!=="production"?et.oneOfType([et.number,et.shape({enter:et.number,exit:et.number,appear:et.number}).isRequired]):null,Ik=process.env.NODE_ENV!=="production"?et.oneOfType([et.string,et.shape({enter:et.string,exit:et.string,active:et.string}),et.shape({enter:et.string,enterDone:et.string,enterActive:et.string,exit:et.string,exitDone:et.string,exitActive:et.string})]):null;const _5=Ce.createContext(null);var v5=function(a){return a.scrollTop},Cf="unmounted",Gc="exited",Zc="entering",lh="entered",Bv="exiting",cl=function(r){g5(a,r);function a(f,y){var w;w=r.call(this,f,y)||this;var D=y,o=D&&!D.isMounting?f.enter:f.appear,j;return w.appearStatus=null,f.in?o?(j=Gc,w.appearStatus=Zc):j=lh:f.unmountOnExit||f.mountOnEnter?j=Cf:j=Gc,w.state={status:j},w.nextCallback=null,w}a.getDerivedStateFromProps=function(y,w){var D=y.in;return D&&w.status===Cf?{status:Gc}:null};var c=a.prototype;return c.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},c.componentDidUpdate=function(y){var w=null;if(y!==this.props){var D=this.state.status;this.props.in?D!==Zc&&D!==lh&&(w=Zc):(D===Zc||D===lh)&&(w=Bv)}this.updateStatus(!1,w)},c.componentWillUnmount=function(){this.cancelNextCallback()},c.getTimeouts=function(){var y=this.props.timeout,w,D,o;return w=D=o=y,y!=null&&typeof y!="number"&&(w=y.exit,D=y.enter,o=y.appear!==void 0?y.appear:D),{exit:w,enter:D,appear:o}},c.updateStatus=function(y,w){if(y===void 0&&(y=!1),w!==null)if(this.cancelNextCallback(),w===Zc){if(this.props.unmountOnExit||this.props.mountOnEnter){var D=this.props.nodeRef?this.props.nodeRef.current:os.findDOMNode(this);D&&v5(D)}this.performEnter(y)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Gc&&this.setState({status:Cf})},c.performEnter=function(y){var w=this,D=this.props.enter,o=this.context?this.context.isMounting:y,j=this.props.nodeRef?[o]:[os.findDOMNode(this),o],F=j[0],$=j[1],oe=this.getTimeouts(),te=o?oe.appear:oe.enter;if(!y&&!D||y5.disabled){this.safeSetState({status:lh},function(){w.props.onEntered(F)});return}this.props.onEnter(F,$),this.safeSetState({status:Zc},function(){w.props.onEntering(F,$),w.onTransitionEnd(te,function(){w.safeSetState({status:lh},function(){w.props.onEntered(F,$)})})})},c.performExit=function(){var y=this,w=this.props.exit,D=this.getTimeouts(),o=this.props.nodeRef?void 0:os.findDOMNode(this);if(!w||y5.disabled){this.safeSetState({status:Gc},function(){y.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:Bv},function(){y.props.onExiting(o),y.onTransitionEnd(D.exit,function(){y.safeSetState({status:Gc},function(){y.props.onExited(o)})})})},c.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},c.safeSetState=function(y,w){w=this.setNextCallback(w),this.setState(y,w)},c.setNextCallback=function(y){var w=this,D=!0;return this.nextCallback=function(o){D&&(D=!1,w.nextCallback=null,y(o))},this.nextCallback.cancel=function(){D=!1},this.nextCallback},c.onTransitionEnd=function(y,w){this.setNextCallback(w);var D=this.props.nodeRef?this.props.nodeRef.current:os.findDOMNode(this),o=y==null&&!this.props.addEndListener;if(!D||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var j=this.props.nodeRef?[this.nextCallback]:[D,this.nextCallback],F=j[0],$=j[1];this.props.addEndListener(F,$)}y!=null&&setTimeout(this.nextCallback,y)},c.render=function(){var y=this.state.status;if(y===Cf)return null;var w=this.props,D=w.children;w.in,w.mountOnEnter,w.unmountOnExit,w.appear,w.enter,w.exit,w.timeout,w.addEndListener,w.onEnter,w.onEntering,w.onEntered,w.onExit,w.onExiting,w.onExited,w.nodeRef;var o=p5(w,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ce.createElement(_5.Provider,{value:null},typeof D=="function"?D(y,o):Ce.cloneElement(Ce.Children.only(D),o))},a}(Ce.Component);cl.contextType=_5,cl.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:et.shape({current:typeof Element>"u"?et.any:function(r,a,c,f,y,w){var D=r[a];return et.instanceOf(D&&"ownerDocument"in D?D.ownerDocument.defaultView.Element:Element)(r,a,c,f,y,w)}}),children:et.oneOfType([et.func.isRequired,et.element.isRequired]).isRequired,in:et.bool,mountOnEnter:et.bool,unmountOnExit:et.bool,appear:et.bool,enter:et.bool,exit:et.bool,timeout:function(a){var c=Mk;a.addEndListener||(c=c.isRequired);for(var f=arguments.length,y=new Array(f>1?f-1:0),w=1;w<f;w++)y[w-1]=arguments[w];return c.apply(void 0,[a].concat(y))},addEndListener:et.func,onEnter:et.func,onEntering:et.func,onEntered:et.func,onExit:et.func,onExiting:et.func,onExited:et.func}:{};function ch(){}cl.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ch,onEntering:ch,onEntered:ch,onExit:ch,onExiting:ch,onExited:ch},cl.UNMOUNTED=Cf,cl.EXITED=Gc,cl.ENTERING=Zc,cl.ENTERED=lh,cl.EXITING=Bv;const x5=cl;var Tk=function(a,c){return a&&c&&c.split(" ").forEach(function(f){return bk(a,f)})},Fv=function(a,c){return a&&c&&c.split(" ").forEach(function(f){return wk(a,f)})},Uv=function(r){g5(a,r);function a(){for(var f,y=arguments.length,w=new Array(y),D=0;D<y;D++)w[D]=arguments[D];return f=r.call.apply(r,[this].concat(w))||this,f.appliedClasses={appear:{},enter:{},exit:{}},f.onEnter=function(o,j){var F=f.resolveArguments(o,j),$=F[0],oe=F[1];f.removeClasses($,"exit"),f.addClass($,oe?"appear":"enter","base"),f.props.onEnter&&f.props.onEnter(o,j)},f.onEntering=function(o,j){var F=f.resolveArguments(o,j),$=F[0],oe=F[1],te=oe?"appear":"enter";f.addClass($,te,"active"),f.props.onEntering&&f.props.onEntering(o,j)},f.onEntered=function(o,j){var F=f.resolveArguments(o,j),$=F[0],oe=F[1],te=oe?"appear":"enter";f.removeClasses($,te),f.addClass($,te,"done"),f.props.onEntered&&f.props.onEntered(o,j)},f.onExit=function(o){var j=f.resolveArguments(o),F=j[0];f.removeClasses(F,"appear"),f.removeClasses(F,"enter"),f.addClass(F,"exit","base"),f.props.onExit&&f.props.onExit(o)},f.onExiting=function(o){var j=f.resolveArguments(o),F=j[0];f.addClass(F,"exit","active"),f.props.onExiting&&f.props.onExiting(o)},f.onExited=function(o){var j=f.resolveArguments(o),F=j[0];f.removeClasses(F,"exit"),f.addClass(F,"exit","done"),f.props.onExited&&f.props.onExited(o)},f.resolveArguments=function(o,j){return f.props.nodeRef?[f.props.nodeRef.current,o]:[o,j]},f.getClassNames=function(o){var j=f.props.classNames,F=typeof j=="string",$=F&&j?j+"-":"",oe=F?""+$+o:j[o],te=F?oe+"-active":j[o+"Active"],ge=F?oe+"-done":j[o+"Done"];return{baseClassName:oe,activeClassName:te,doneClassName:ge}},f}var c=a.prototype;return c.addClass=function(y,w,D){var o=this.getClassNames(w)[D+"ClassName"],j=this.getClassNames("enter"),F=j.doneClassName;w==="appear"&&D==="done"&&F&&(o+=" "+F),D==="active"&&y&&v5(y),o&&(this.appliedClasses[w][D]=o,Tk(y,o))},c.removeClasses=function(y,w){var D=this.appliedClasses[w],o=D.base,j=D.active,F=D.done;this.appliedClasses[w]={},o&&Fv(y,o),j&&Fv(y,j),F&&Fv(y,F)},c.render=function(){var y=this.props;y.classNames;var w=p5(y,["classNames"]);return Ce.createElement(x5,Am({},w,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},a}(Ce.Component);Uv.defaultProps={classNames:""},Uv.propTypes=process.env.NODE_ENV!=="production"?Am({},x5.propTypes,{classNames:Ik,onEnter:et.func,onEntering:et.func,onEntered:et.func,onExit:et.func,onExiting:et.func,onExited:et.func}):{};const Dk=Uv,UW="",Ak=r=>en.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 1.66667C0 0.746192 0.746193 0 1.66667 0H11.6667C12.5872 0 13.3333 0.746193 13.3333 1.66667V20H8.33333V17.5C8.33333 16.5795 7.58714 15.8333 6.66667 15.8333C5.74619 15.8333 5 16.5795 5 17.5V20H0V1.66667ZM14.5833 8.33333H18.3333C19.2538 8.33333 20 9.0795 20 10V20H14.5833V8.33333ZM3.33333 2.5C2.8731 2.5 2.5 2.8731 2.5 3.33333V5.41667C2.5 5.8769 2.8731 6.25 3.33333 6.25H4.58333C5.04357 6.25 5.41667 5.8769 5.41667 5.41667V3.33333C5.41667 2.8731 5.04357 2.5 4.58333 2.5H3.33333ZM7.91667 3.33333C7.91667 2.8731 8.28977 2.5 8.75 2.5H10C10.4602 2.5 10.8333 2.8731 10.8333 3.33333V5.41667C10.8333 5.8769 10.4602 6.25 10 6.25H8.75C8.28976 6.25 7.91667 5.8769 7.91667 5.41667V3.33333ZM3.33333 9.58333C2.8731 9.58333 2.5 9.95642 2.5 10.4167V12.5C2.5 12.9602 2.8731 13.3333 3.33333 13.3333H4.58333C5.04357 13.3333 5.41667 12.9602 5.41667 12.5V10.4167C5.41667 9.95642 5.04357 9.58333 4.58333 9.58333H3.33333ZM7.91667 10.4167C7.91667 9.95642 8.28977 9.58333 8.75 9.58333H10C10.4602 9.58333 10.8333 9.95642 10.8333 10.4167V12.5C10.8333 12.9602 10.4602 13.3333 10 13.3333H8.75C8.28976 13.3333 7.91667 12.9602 7.91667 12.5V10.4167Z",fill:"#707070"})),VW="";b5.propTypes={venue:et.object.isRequired,isCurrent:et.bool,onVenueClicked:et.func.isRequired};function b5({venue:r,isCurrent:a,onVenueClicked:c}){const{t:f}=Ho(),[y,w]=Ce.useState({});return Ce.useEffect(()=>()=>{w({})},[]),Ce.useEffect(()=>{const D={};r.image&&(D.backgroundImage=`url('${r.image}')`),w(D)},[r]),Be.jsxs("button",{className:"venue",onClick:()=>c(),children:[Be.jsx("div",{className:"venue__image",style:y}),Be.jsxs("div",{className:"venue__content",children:[Be.jsx("div",{children:r.venueInfo.name}),a&&Be.jsx("div",{className:"venue__current",children:f("Current")})]})]})}const Vm=On({key:"isLocationClicked",default:!1});w5.propTypes={onOpen:et.func,onClose:et.func,active:et.bool};function w5({onOpen:r,onClose:a,active:c}){const{t:f}=Ho(),y=Ce.useRef(null),w=zi(Df),[,D]=ln(Iv),[o,j]=ln($l),[,F]=ln(Vm),$=document.querySelector(".venue-selector-portal"),oe=xe=>{D(!0),j(xe.name),te()},te=()=>{c?a():r()};function ge(xe){oe(xe),F(!1)}return Be.jsxs(Be.Fragment,{children:[!c&&$&&os.createPortal(Be.jsx("button",{className:"venue-selector__button",onClick:()=>r(),"aria-label":f("Venues"),children:Be.jsx(Ak,{})}),$),Be.jsx(Dk,{in:c,nodeRef:y,timeout:400,classNames:"venue-selector__content",unmountOnExit:!0,children:Be.jsxs("div",{className:"venue-selector__content",ref:y,children:[Be.jsxs("div",{className:"venue-selector__header",children:[Be.jsx("h1",{children:f("Select venue")}),Be.jsx("button",{className:"venue-selector__button",onClick:()=>a(),"aria-label":f("Close"),children:Be.jsx(Sf,{})})]}),Be.jsx("div",{className:"venue-selector__list",children:w.map(xe=>Be.jsx(b5,{isCurrent:(o==null?void 0:o.toLowerCase())===xe.name.toLowerCase(),venue:xe,onVenueClicked:()=>ge(xe)},xe.id))})]})})]})}const M5=Ce.createContext(),ul=On({key:"currentLocation",default:null}),Ek="Left",Sk="Right",Ck="Up",Nk="Down",uh={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Vv={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},I5="mousemove",T5="mouseup",Lk="touchend",zk="touchmove",Ok="touchstart";function jk(r,a,c,f){return r>a?c>0?Sk:Ek:f>0?Nk:Ck}function D5(r,a){if(a===0)return r;const c=Math.PI/180*a,f=r[0]*Math.cos(c)+r[1]*Math.sin(c),y=r[1]*Math.cos(c)-r[0]*Math.sin(c);return[f,y]}function kk(r,a){const c=$=>{const oe="touches"in $;oe&&$.touches.length>1||r((te,ge)=>{ge.trackMouse&&!oe&&(document.addEventListener(I5,f),document.addEventListener(T5,D));const{clientX:xe,clientY:Ae}=oe?$.touches[0]:$,it=D5([xe,Ae],ge.rotationAngle);return ge.onTouchStartOrOnMouseDown&&ge.onTouchStartOrOnMouseDown({event:$}),Object.assign(Object.assign(Object.assign({},te),Vv),{initial:it.slice(),xy:it,start:$.timeStamp||0})})},f=$=>{r((oe,te)=>{const ge="touches"in $;if(ge&&$.touches.length>1)return oe;if($.timeStamp-oe.start>te.swipeDuration)return oe.swiping?Object.assign(Object.assign({},oe),{swiping:!1}):oe;const{clientX:xe,clientY:Ae}=ge?$.touches[0]:$,[it,We]=D5([xe,Ae],te.rotationAngle),me=it-oe.xy[0],ce=We-oe.xy[1],pe=Math.abs(me),ve=Math.abs(ce),De=($.timeStamp||0)-oe.start,ct=Math.sqrt(pe*pe+ve*ve)/(De||1),St=[me/(De||1),ce/(De||1)],Je=jk(pe,ve,me,ce),jt=typeof te.delta=="number"?te.delta:te.delta[Je.toLowerCase()]||uh.delta;if(pe<jt&&ve<jt&&!oe.swiping)return oe;const pt={absX:pe,absY:ve,deltaX:me,deltaY:ce,dir:Je,event:$,first:oe.first,initial:oe.initial,velocity:ct,vxvy:St};pt.first&&te.onSwipeStart&&te.onSwipeStart(pt),te.onSwiping&&te.onSwiping(pt);let Pt=!1;return(te.onSwiping||te.onSwiped||te[`onSwiped${Je}`])&&(Pt=!0),Pt&&te.preventScrollOnSwipe&&te.trackTouch&&$.cancelable&&$.preventDefault(),Object.assign(Object.assign({},oe),{first:!1,eventData:pt,swiping:!0})})},y=$=>{r((oe,te)=>{let ge;if(oe.swiping&&oe.eventData){if($.timeStamp-oe.start<te.swipeDuration){ge=Object.assign(Object.assign({},oe.eventData),{event:$}),te.onSwiped&&te.onSwiped(ge);const xe=te[`onSwiped${ge.dir}`];xe&&xe(ge)}}else te.onTap&&te.onTap({event:$});return te.onTouchEndOrOnMouseUp&&te.onTouchEndOrOnMouseUp({event:$}),Object.assign(Object.assign(Object.assign({},oe),Vv),{eventData:ge})})},w=()=>{document.removeEventListener(I5,f),document.removeEventListener(T5,D)},D=$=>{w(),y($)},o=($,oe)=>{let te=()=>{};if($&&$.addEventListener){const ge=Object.assign(Object.assign({},uh.touchEventOptions),oe.touchEventOptions),xe=[[Ok,c,ge],[zk,f,Object.assign(Object.assign({},ge),oe.preventScrollOnSwipe?{passive:!1}:{})],[Lk,y,ge]];xe.forEach(([Ae,it,We])=>$.addEventListener(Ae,it,We)),te=()=>xe.forEach(([Ae,it])=>$.removeEventListener(Ae,it))}return te},F={ref:$=>{$!==null&&r((oe,te)=>{if(oe.el===$)return oe;const ge={};return oe.el&&oe.el!==$&&oe.cleanUpTouch&&(oe.cleanUpTouch(),ge.cleanUpTouch=void 0),te.trackTouch&&$&&(ge.cleanUpTouch=o($,te)),Object.assign(Object.assign(Object.assign({},oe),{el:$}),ge)})}};return a.trackMouse&&(F.onMouseDown=c),[F,o]}function Pk(r,a,c,f){return!a.trackTouch||!r.el?(r.cleanUpTouch&&r.cleanUpTouch(),Object.assign(Object.assign({},r),{cleanUpTouch:void 0})):r.cleanUpTouch?a.preventScrollOnSwipe!==c.preventScrollOnSwipe||a.touchEventOptions.passive!==c.touchEventOptions.passive?(r.cleanUpTouch(),Object.assign(Object.assign({},r),{cleanUpTouch:f(r.el,a)})):r:Object.assign(Object.assign({},r),{cleanUpTouch:f(r.el,a)})}function A5(r){const{trackMouse:a}=r,c=en.useRef(Object.assign({},Vv)),f=en.useRef(Object.assign({},uh)),y=en.useRef(Object.assign({},f.current));y.current=Object.assign({},f.current),f.current=Object.assign(Object.assign({},uh),r);let w;for(w in uh)f.current[w]===void 0&&(f.current[w]=uh[w]);const[D,o]=en.useMemo(()=>kk(j=>c.current=j(c.current,f.current),{trackMouse:a}),[a]);return c.current=Pk(c.current,f.current,y.current,o),D}const Wn={MIN:"MIN",FIT:"FIT",MAX:"MAX"},QW="",hh=Ce.forwardRef(function({children:a,isOpen:c,initialSnapPoint:f,minimizedHeight:y},w){const D=Ce.useRef(),o=Ce.useRef(),j=Ce.useRef(),F=Ce.useRef(),$=Ce.useRef(),[oe,te]=Ce.useState({}),[ge,xe]=Ce.useState(!1),[Ae,it]=Ce.useState(null),We=Ce.useContext(M5),me=Ce.useRef();Ce.useImperativeHandle(w,()=>({setSnapPoint(Je){ce(Je)}}));function ce(Je){requestAnimationFrame(()=>{switch(Je){case Wn.MAX:te({height:`${We.current.clientHeight}px`}),j.current=We.current.clientHeight;break;case Wn.FIT:{const jt=o.current.children.item(0).clientHeight;jt<y?(te({height:`${y}px`}),j.current=y,Je=Wn.MIN):(te({height:`${jt}px`}),j.current=jt);break}case Wn.MIN:te({height:`${y}px`}),j.current=y;break}}),$.current=Je}Ce.useEffect(()=>(c&&$.current===Wn.FIT?pe():ve(),()=>{ve()}),[c,$.current]);function pe(){me.current&&me.current.disconnect(),me.current=new MutationObserver(()=>{ce(Wn.FIT)}),me.current.observe(o.current,{childList:!0,subtree:!0})}function ve(){me.current&&me.current.disconnect()}const De=A5({onSwipeStart:()=>{xe(!0),it(null),F.current=D.current.clientHeight},onSwiping:Je=>{const jt=Math.max(F.current-Je.deltaY,y);te({height:`${jt}px`})},onSwiped:Je=>{xe(!1);const jt=Rk(Je.dir,Je.deltaY,$.current,y,We.current.clientHeight,o.current.children.item(0));jt&&(ce(jt),it(jt))},trackMouse:!0,preventScrollOnSwipe:!0});Ce.useEffect(()=>{c&&($.current=f,ce(f))},[y,f,c]);const ct=Je=>{De.ref(Je),D.current=Je},St=Ce.Children.map(a,Je=>Ce.cloneElement(Je,{snapPointSwipedByUser:Ae}));return Be.jsx("div",{...De,ref:ct,className:`sheet ${c?"sheet--active":""} ${ge?"sheet--dragging":""} ${$.current===Wn.MAX?"sheet--max":""}`,style:oe,children:Be.jsx("div",{ref:o,className:`sheet__content ${$.current===Wn.MIN?"sheet__content--no-scroll":""}`,style:oe,children:St})})});hh.propTypes={children:et.node.isRequired,isOpen:et.bool.isRequired,initialSnapPoint:et.string.isRequired,minimizedHeight:et.number.isRequired};function Rk(r,a,c,f,y,w){if(Math.abs(a)<60)return c;let o;return r.toUpperCase()==="DOWN"?c===Wn.MAX?Bk(w)?o=Wn.MIN:w.clientHeight<=y&&w.clientHeight>f?o=Wn.FIT:o=Wn.MIN:c===Wn.FIT&&(o=Wn.MIN):r.toUpperCase()==="UP"&&(c===Wn.MIN?w.clientHeight<=f||w.clientHeight>y?o=Wn.MAX:o=Wn.FIT:c===Wn.FIT&&(o=Wn.MAX)),o}function Bk(r){if(!r)return!1;if(r.scrollHeight>r.clientHeight)return!0;for(const a of r.children)if(a.scrollHeight>a.clientHeight)return!0;return!1}const HW="",$W="",Fk=(r,a)=>{const[c,f]=Ce.useState(void 0),[y,w]=Ce.useState(void 0);return Ce.useEffect(()=>{const D=(o=!1)=>{var F,$;const j=((F=a.current)==null?void 0:F.scrollHeight)>(($=a.current)==null?void 0:$.clientHeight);f(j),o===!0&&w(j)};D(!0),a.current&&new ResizeObserver(D).observe(a.current)},[r,a]),[c,y]},dh=()=>A5({onSwiping:({event:r})=>r.stopPropagation()});function E5(r){const a=r.geometry.type==="Point"?r.geometry.coordinates:r.properties.anchor.coordinates;return{lat:a[1],lng:a[0],floor:r.properties.floor}}const Nf=On({key:"directionsResponse",default:null}),Qm=On({key:"hasFoundRoute",default:!0}),S5=On({key:"shuttleBusOn",default:!1}),C5=(r,a,c,f,y)=>{const[w,D]=Ce.useState(),[o,j]=Ce.useState(),[F,$]=ln(Qm),[,oe]=ln(Nf),[te,ge]=Ce.useState(),xe=zi(S5);return Ce.useEffect(()=>{ge(!1);let Ae=!0;return r!=null&&r.geometry&&(a!=null&&a.geometry)&&c.getRoute({origin:E5(r),destination:E5(a),travelMode:f,avoidStairs:y,excludeHighwayTypes:xe?[]:["busway"]}).then(it=>{if(Ae)if(it&&it.legs){const We=it.legs.reduce((ce,pe)=>ce+pe.distance.value,0),me=it.legs.reduce((ce,pe)=>ce+pe.duration.value,0);D(We),j(me),oe({originLocation:r,destinationLocation:a,totalDistance:We,totalTime:me,directionsResult:it}),$(!0),ge(!0)}else $(!1)},()=>{Ae&&$(!1)}),()=>{Ae=!1}},[r,a,c,y,f,xe]),[w,o,F,te]},Wc={WALKING:"WALKING",DRIVING:"DRIVING",BICYCLING:"BICYCLING"},Lf=On({key:"travelMode",default:Wc.WALKING}),zf=On({key:"accessibilityOn",default:!1}),Hm=On({key:"showExternalIDs",default:!1});function N5(r,a){const c=zi(Nm),[f,y]=Ce.useState(!1),w=r.getMap();Ce.useEffect(()=>{a&&y(!1)},[a]);function D(j,F,$,oe){const te=ge=>{if(!$)return;F.getMap().queryRenderedFeatures(ge.point).length?oe(!1):oe(!0)};return j.on("click",te),()=>{j.off("click",te)}}function o(j,F,$,oe){const te=()=>{$&&oe(!1)},ge=()=>{$&&oe(!0)};F.addListener("click",te);const xe=j.addListener("click",ge);return()=>{F.removeListener("click",te),xe.remove()}}return Ce.useEffect(()=>{let j;return c===$o.Mapbox&&(j=D(w,r,a,y)),c===$o.Google&&(j=o(w,r,a,y)),()=>j==null?void 0:j()},[r,a]),f}const YW="",Uk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M12 7.75V12L14.75 14.75M21.25 12C21.25 17.1086 17.1086 21.25 12 21.25C6.89137 21.25 2.75 17.1086 2.75 12C2.75 6.89137 6.89137 2.75 12 2.75C17.1086 2.75 21.25 6.89137 21.25 12Z",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Vk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M8 10L11.6464 13.6464C11.8417 13.8417 12.1583 13.8417 12.3536 13.6464L16 10",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Qk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M16 14L12.3536 10.3536C12.1583 10.1583 11.8417 10.1583 11.6464 10.3536L8 14",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),qc=On({key:"language",default:void 0});L5.propTypes={openingHours:et.object,isMondayFirstDayOfTheWeek:et.bool,onExpand:et.func};function L5({openingHours:r,isMondayFirstDayOfTheWeek:a=!0,onExpand:c}){const{t:f}=Ho(),[y,w]=Ce.useState(!1),o=zi(qc)??navigator.language,j=Ce.useMemo(()=>new Date(2020,0,1,13).toLocaleTimeString(o).match(/AM|PM/)!==null,[o]),F=new Date().getDay(),$=Ce.useMemo(()=>{const pe=[];for(let ve=0;ve<7;ve++)pe.push(new Date(2024,0,ve+1));if(!a){const ve=pe.pop();pe.unshift(ve)}return pe},[a]),oe=Ce.useMemo(()=>a?F===0?6:F-1:F,[F,a]),{standardOpeningHours:te}=r||{},ge=pe=>{const[ve,De]=pe.split(":");return new Date(0,0,0,ve,De).toLocaleTimeString(o,{hour:"2-digit",minute:"2-digit",hour12:j})},xe=pe=>{const ve=pe.toLocaleString("en-US",{weekday:"long"}).toLowerCase(),De=te==null?void 0:te[ve];return!(De!=null&&De.startTime)||!(De!=null&&De.endTime)||De.closedAllDay?{text:f("Closed"),isClosed:!0}:{text:`${ge(De.startTime)} - ${ge(De.endTime)}`,isClosed:!1}},Ae=Ce.useCallback(pe=>{if(!pe||pe.closedAllDay||!pe.startHours)return!1;const ve=new Date,De=ve.getHours()*60+ve.getMinutes(),[ct,St]=pe.startTime.split(":"),[Je,jt]=pe.endTime.split(":"),pt=parseInt(ct)*60+parseInt(St),Pt=parseInt(Je)*60+parseInt(jt);return De>=pt&&De<=Pt},[]),We=Ce.useCallback(()=>{const pe=$[oe].toLocaleString("en-US",{weekday:"long"}).toLowerCase();return Ae(te==null?void 0:te[pe])?"Open":"Closed"},[te,$,oe,Ae,f])(),me=pe=>pe.charAt(0).toUpperCase()+pe.slice(1),ce=()=>{w(pe=>!pe)};return Ce.useEffect(()=>{y&&typeof c=="function"&&c()},[y,c]),Be.jsxs("div",{className:"opening-hours",children:[Be.jsxs("button",{className:"contact-action-button contact-action-button--opening-hours",onClick:ce,children:[Be.jsx("div",{className:"contact-action-button__icon-wrapper",children:Be.jsx(Uk,{})}),Be.jsx("div",{className:"contact-action-button__text",children:xe($[oe]).text}),Be.jsx("span",{className:`contact-action-button--opening-hours__status contact-action-button--opening-hours__status--${We.toLowerCase()}`,children:f(We)}),y?Be.jsx(Qk,{}):Be.jsx(Vk,{})]}),y&&Be.jsx("ul",{className:"opening-hours__list",children:$.map(pe=>{const ve=xe(pe);return Be.jsxs("li",{className:"opening-hours__list-item",children:[Be.jsx("span",{className:"opening-hours__day",children:me(pe.toLocaleString(o,{weekday:"long"}))}),Be.jsx("span",{className:`opening-hours__hours ${ve.isClosed?"opening-hours__hours--closed":""}`,children:ve.text})]},pe)})})]})}const Hk=Ce.memo(L5);function Qv(r,a,c){return(a=function(f){var y=function(w,D){if(typeof w!="object"||!w)return w;var o=w[Symbol.toPrimitive];if(o!==void 0){var j=o.call(w,D||"default");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(w)}(f,"string");return typeof y=="symbol"?y:y+""}(a))in r?Object.defineProperty(r,a,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[a]=c,r}var Hv={click:"onClick",focusin:"onFocus",focusout:"onFocus",mousedown:"onMouseDown",mouseup:"onMouseUp",touchstart:"onTouchStart",touchend:"onTouchEnd"},z5=function(r){var a=r.children,c=r.onClickAway,f=r.focusEvent,y=f===void 0?"focusin":f,w=r.mouseEvent,D=w===void 0?"click":w,o=r.touchEvent,j=o===void 0?"touchend":o,F=Ce.useRef(null),$=Ce.useRef(null),oe=Ce.useRef(!1);Ce.useEffect(function(){return setTimeout(function(){oe.current=!0},0),function(){oe.current=!1}},[]);var te=function(it){return function(We){$.current=We.target;var me=a==null?void 0:a.props[it];me&&me(We)}};Ce.useEffect(function(){var it,We,me=(it=(We=F.current)===null||We===void 0?void 0:We.ownerDocument)!==null&&it!==void 0?it:document,ce=function(pe){oe.current&&(F.current&&F.current.contains(pe.target)||$.current===pe.target||!me.contains(pe.target)||c(pe))};return me.addEventListener(D,ce),me.addEventListener(j,ce),me.addEventListener(y,ce),function(){me.removeEventListener(D,ce),me.removeEventListener(j,ce),me.removeEventListener(y,ce)}},[y,D,c,j]);var ge=Hv[D],xe=Hv[j],Ae=Hv[y];return Ce.Children.only(Ce.cloneElement(a,Qv(Qv(Qv({ref:function(it){F.current=it;var We=a.ref;typeof We=="function"?We(it):We&&(We.current=it)}},Ae,te(Ae)),ge,te(ge)),xe,te(xe))))};z5.displayName="ClickAwayListener";const $m=On({key:"searchAllVenues",default:!1}),$v=On({key:"searchExternalLocations",default:!0}),O5=pm({key:"baseLink",get:({get:r})=>{const a=r(bv),c=r(Lm),f=r(xv),y=r(Ea),w=r(qc),D=r($m),o=r($v),j=r(Pv),F=window.location.origin+window.location.pathname.replace(/\/$/,""),$=new URLSearchParams(window.location.search),oe=new URLSearchParams;return[["gmApiKey",a],["mapboxAccessToken",c],["apiKey",f],["primaryColor",y],["language",w],["searchAllVenues",D],["searchExternalLocations",o],["logo",j]].forEach(([te,ge])=>{if($.has(te)){const xe=$.get(te);oe.append(te,xe)}else ge&&(ge===y?oe.append(te,y.replace("#","")):oe.append(te,ge))}),`${F}?${oe.toString()}`}}),GW="",$k=r=>en.createElement("svg",{width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.8484 4.66738C13.3129 3.20291 15.6872 3.20291 17.1517 4.66737L19.909 7.42474C21.3735 8.8892 21.3735 11.2636 19.909 12.7281L18.2804 14.3568C17.9875 14.6497 17.5126 14.6497 17.2197 14.3568C16.9268 14.0639 16.9268 13.589 17.2197 13.2961L18.8484 11.6674C19.7271 10.7887 19.7271 9.36407 18.8484 8.4854L16.091 5.72803C15.2123 4.84936 13.7877 4.84936 12.909 5.72804L11.2804 7.35672C10.9875 7.64961 10.5126 7.64961 10.2197 7.35672C9.92681 7.06382 9.92681 6.58895 10.2197 6.29606L11.8484 4.66738ZM15.5304 9.04606C15.8233 9.33895 15.8233 9.81382 15.5304 10.1067L9.53036 16.1068C9.23747 16.3997 8.7626 16.3997 8.4697 16.1068C8.17681 15.8139 8.17681 15.339 8.4697 15.0461L14.4697 9.04606C14.7626 8.75316 15.2375 8.75316 15.5304 9.04606ZM6.78036 10.7961C7.07326 11.089 7.07326 11.5639 6.78036 11.8568L5.15169 13.4854C4.27301 14.3641 4.27301 15.7887 5.15169 16.6674L7.90905 19.4248C8.78773 20.3035 10.2123 20.3035 11.091 19.4248L12.7197 17.7961C13.0126 17.5032 13.4875 17.5032 13.7804 17.7961C14.0733 18.089 14.0733 18.5639 13.7804 18.8568L12.1517 20.4854C10.6872 21.9499 8.31285 21.9499 6.84839 20.4854L4.09102 17.7281C2.62656 16.2636 2.62656 13.8893 4.09103 12.4248L5.7197 10.7961C6.0126 10.5032 6.48747 10.5032 6.78036 10.7961Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}})),j5=r=>en.createElement("svg",{width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7.32635C3 5.25529 4.67893 3.57635 6.75 3.57635H7.25C9.32107 3.57635 11 5.25529 11 7.32635V7.82635C11 9.89742 9.32107 11.5764 7.25 11.5764H6.75C4.67893 11.5764 3 9.89742 3 7.82635V7.32635ZM6.75 5.07635C5.50736 5.07635 4.5 6.08371 4.5 7.32635V7.82635C4.5 9.06899 5.50736 10.0764 6.75 10.0764H7.25C8.49264 10.0764 9.5 9.06899 9.5 7.82635V7.32635C9.5 6.08371 8.49264 5.07635 7.25 5.07635H6.75ZM13 7.32635C13 5.25529 14.6789 3.57635 16.75 3.57635H17.25C19.3211 3.57635 21 5.25529 21 7.32635V7.82635C21 9.89742 19.3211 11.5764 17.25 11.5764H16.75C14.6789 11.5764 13 9.89742 13 7.82635V7.32635ZM16.75 5.07635C15.5074 5.07635 14.5 6.08371 14.5 7.32635V7.82635C14.5 9.06899 15.5074 10.0764 16.75 10.0764H17.25C18.4926 10.0764 19.5 9.06899 19.5 7.82635V7.32635C19.5 6.08371 18.4926 5.07635 17.25 5.07635H16.75ZM3 17.3264C3 15.2553 4.67893 13.5764 6.75 13.5764H7.25C9.32107 13.5764 11 15.2553 11 17.3264V17.8264C11 19.8975 9.32107 21.5764 7.25 21.5764H6.75C4.67893 21.5764 3 19.8975 3 17.8264V17.3264ZM6.75 15.0764C5.50736 15.0764 4.5 16.0838 4.5 17.3264V17.8264C4.5 19.069 5.50736 20.0764 6.75 20.0764H7.25C8.49264 20.0764 9.5 19.069 9.5 17.8264V17.3264C9.5 16.0838 8.49264 15.0764 7.25 15.0764H6.75Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.75 13.5764C14.1642 13.5764 14.5 13.9122 14.5 14.3264V16.0764H16.25C16.6642 16.0764 17 16.4122 17 16.8264C17 17.2406 16.6642 17.5764 16.25 17.5764H13.75C13.3358 17.5764 13 17.2406 13 16.8264V14.3264C13 13.9122 13.3358 13.5764 13.75 13.5764ZM17 14.3264C17 13.9122 17.3358 13.5764 17.75 13.5764H20.25C20.6642 13.5764 21 13.9122 21 14.3264C21 14.7406 20.6642 15.0764 20.25 15.0764H17.75C17.3358 15.0764 17 14.7406 17 14.3264ZM17 18.3264C17 17.9122 17.3358 17.5764 17.75 17.5764H20.25C20.6642 17.5764 21 17.9122 21 18.3264C21 18.7406 20.6642 19.0764 20.25 19.0764H18.5V20.8264C18.5 21.2406 18.1642 21.5764 17.75 21.5764C17.3358 21.5764 17 21.2406 17 20.8264V18.3264Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),en.createElement("path",{d:"M13 20.5764C13 20.0241 13.4477 19.5764 14 19.5764C14.5523 19.5764 15 20.0241 15 20.5764C15 21.1287 14.5523 21.5764 14 21.5764C13.4477 21.5764 13 21.1287 13 20.5764Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),en.createElement("path",{d:"M5.5 17.0764C5.5 16.5241 5.94772 16.0764 6.5 16.0764H7.5C8.05228 16.0764 8.5 16.5241 8.5 17.0764V18.0764C8.5 18.6287 8.05228 19.0764 7.5 19.0764H6.5C5.94772 19.0764 5.5 18.6287 5.5 18.0764V17.0764Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),en.createElement("path",{d:"M5.5 7.07635C5.5 6.52407 5.94772 6.07635 6.5 6.07635H7.5C8.05228 6.07635 8.5 6.52407 8.5 7.07635V8.07635C8.5 8.62863 8.05228 9.07635 7.5 9.07635H6.5C5.94772 9.07635 5.5 8.62863 5.5 8.07635V7.07635Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),en.createElement("path",{d:"M15.5 7.07635C15.5 6.52407 15.9477 6.07635 16.5 6.07635H17.5C18.0523 6.07635 18.5 6.52407 18.5 7.07635V8.07635C18.5 8.62863 18.0523 9.07635 17.5 9.07635H16.5C15.9477 9.07635 15.5 8.62863 15.5 8.07635V7.07635Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}})),Yk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M8 6L12 2L16 6",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),en.createElement("path",{d:"M12 3V13",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),en.createElement("path",{d:"M17 10C18.1046 10 19 10.8954 19 12V18C19 19.1046 18.1046 20 17 20H7C5.89543 20 5 19.1046 5 18V12C5 10.8954 5.89543 10 7 10",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Ym=On({key:"qrCodeLink",default:null}),k5=On({key:"supportsUrlParameters",default:!1});P5.propTypes={location:et.object.isRequired,buttonClassName:et.string};function P5({location:r,buttonClassName:a}){const{t:c}=Ho(),[f,y]=Ce.useState(!1),w=zi(O5),[D,o]=Ce.useState(),j=zi(k5),[F,$]=Ce.useState(!1),[oe,te]=Ce.useState(!1),ge=zi(Aa),[,xe]=ln(Ym),Ae=ra();Ce.useEffect(()=>{w&&r&&o(w+"&locationId="+r.id)},[w,r]),Ce.useEffect(()=>{var ce;$(!ge&&j&&Ae);const me=typeof((ce=navigator.clipboard)==null?void 0:ce.writeText)=="function";te(!ge&&j&&me)},[j,ge,Ae]);const it=()=>{navigator.clipboard.writeText(D),y(!1)},We=()=>{xe(D),y(!1)};return(F||oe)&&Be.jsxs("div",{className:"share-location-link",children:[Be.jsx("button",{className:a,onClick:()=>y(me=>!me),title:c("Share"),"aria-label":c("Share"),children:Be.jsx(Yk,{})}),f&&Be.jsx(z5,{onClickAway:()=>y(!1),children:Be.jsxs("ul",{children:[oe&&Be.jsx("li",{children:Be.jsxs("button",{className:a,onClick:()=>it(),children:[Be.jsx($k,{}),c("Copy link")]})}),F&&Be.jsx("li",{children:Be.jsxs("button",{className:a,onClick:()=>We(),children:[Be.jsx(j5,{}),c("QR Code")]})})]})})]})}const ZW="",R5={email:"email",phone:"phone"};B5.propTypes={detailType:et.string,active:et.bool,displayText:et.string,value:et.string,icon:et.string};function B5({detailType:r,active:a,displayText:c,value:f,icon:y}){if(!a||r.toLowerCase()==="openinghours")return null;const w=c!=null&&c.trim()?c:f,D=(o,j)=>{switch(o.toLowerCase()){case R5.email:return`mailto:${j}`;case R5.phone:return`tel:${j}`;default:try{return new URL(j),j}catch{return"#"}}};return Be.jsxs("a",{className:"contact-action-button",href:D(r,f),target:r.toLowerCase()==="email"||r.toLowerCase()==="phone"?"_self":"_blank",rel:"noopener noreferrer",children:[Be.jsx("div",{className:"contact-action-button__icon-wrapper",children:Be.jsx("img",{alt:"",src:y,className:"contact-action-button__icon"})}),Be.jsx("span",{className:"contact-action-button__text",children:w})]})}Yv.propTypes={onBack:et.func,onStartWayfinding:et.func,onSetSize:et.func,snapPointSwiped:et.number,onStartDirections:et.func,isOpen:et.bool,snapPointSwipedByUser:et.string};function Yv({onBack:r,onStartWayfinding:a,onSetSize:c,onStartDirections:f,isOpen:y,snapPointSwipedByUser:w}){var qe,Ue;const{t:D}=Ho(),o=Ce.useRef(null),j=Ce.useRef(null),F=Ce.useRef(null),$=Ce.useRef(null),oe=Ce.useRef(null),[te,ge]=Ce.useState(!1),[xe,Ae]=Ce.useState(!1),[it,We]=Ce.useState(!1),me=Ce.useRef(!1),[ce,pe]=Ce.useState(null),ve=zi(As),De=zi(ul),ct=(qe=De==null?void 0:De.properties)==null?void 0:qe.additionalDetails,St=(Ue=ct==null?void 0:ct.find(ot=>ot.key.toLowerCase().includes("openinghours")&&ot.active===!0))==null?void 0:Ue.openingHours,[Je,jt]=Fk(De,F),pt=dh(),Pt=zi(Ea),Dt=zi(Aa),Ht=zi(vv),[It,wt]=Ce.useState(),[$t,gi]=Ce.useState(),mi=ra(),Q=zi(Lf),J=zi(zf),[,,M]=C5($t,It,Ht,Q,J),z=zi(Hm),B=N5(ve,y);Ce.useEffect(()=>()=>{pe(null),wt(),gi()},[]);const U=Ce.useCallback(()=>{ge(!1),Ae(!1),We(!1),Y(Wn.FIT),r()});function Y(ot){typeof c=="function"&&c(ot)}function ee(){te===!1?(ne(),Y(Wn.MAX)):(ie(),Y(Wn.FIT))}function ne(){requestAnimationFrame(()=>{ge(!0),de(),me.current=!0})}function ie(){ge(!1),Qe(),me.current=!1}function de(){const ot=requestAnimationFrame(()=>{j.current&&(Ae(j.current.scrollTop>0),We(j.current.scrollTop<j.current.scrollHeight-j.current.offsetHeight-1))});return()=>cancelAnimationFrame(ot)}function Qe(){Ae(!1),We(!1)}function Re(){ge(!1),Ae(!1),We(!1),Y(Wn.FIT),a()}function He(){ge(!1),Ae(!1),We(!1),Y(Wn.FIT),f()}return Ce.useEffect(()=>{B&&r()},[B]),Ce.useEffect(()=>()=>{pe(null),wt(),gi()},[]),Ce.useEffect(()=>{ge(!1),Ae(!1),We(!1),pe(null),De&&(o.current.location=De,pe(ve.getDisplayRule(De)),wt(De)),Dt&&gi(Dt)},[De,ve,Dt]),Ce.useEffect(()=>{const ot=(ct==null?void 0:ct.length)>0;Y(De&&y&&ot?Wn.FIT:Wn.MIN)},[De,y,ct]),Ce.useEffect(()=>{if(!w){me.current=!1;return}ge(w===Wn.MAX),w===Wn.MAX?ne():ie()},[w]),Ce.useLayoutEffect(()=>{const ot=document.querySelector(".modal.modal--open");if(!ot||!($!=null&&$.current)||!(j!=null&&j.current))return;const ht=()=>{const Tt=ot.offsetHeight,Ct=j.current.offsetHeight;Tt>0&&Ct>0&&(Ct/Tt>.9?(ot.style.height="100%",de()):ot.style.height="auto")};return oe.current?oe.current.complete?ht():(oe.current.onload=ht,oe.current.onerror=ht):ht(),()=>{ot.style.height="",oe.current&&(oe.current.onload=null,oe.current.onerror=null)}},[De,te,y,ct]),Be.jsx("div",{className:`location-details ${me.current===!0?"location-details--max-height":""} ${xe?"location-details--content-above":""} ${it?"location-details--content-below":""}`,children:De&&Be.jsxs(Be.Fragment,{children:[Be.jsxs("div",{className:"location-details__header",children:[Be.jsxs("div",{className:"location-info",children:[Be.jsx("div",{className:"location-info__icon",children:ce&&Be.jsx("img",{alt:"",src:ce.icon.src?ce.icon.src:ce.icon})}),Be.jsxs("div",{className:"location-info__content",children:[Be.jsx("div",{className:"location-info__name",children:De.properties.name}),Be.jsx("mi-location-info",{level:D("Level"),ref:o,"show-external-id":z})]}),Be.jsxs("div",{className:"location-info__actions",children:[Be.jsx(P5,{buttonClassName:"location-info__button",location:De}),Be.jsx("button",{className:"location-info__button",onClick:()=>U(),children:Be.jsx(Sf,{})})]})]}),Dt&&mi?Be.jsx("button",{disabled:!M,onClick:()=>He(),className:`location-details__wayfinding ${M?"":"location-details--no-route"}`,style:{background:Pt},children:D(M?"Start directions":"Directions not available")}):Be.jsx("button",{onClick:()=>Re(),style:{background:Pt},className:"location-details__wayfinding",children:D("Start wayfinding")})]}),Be.jsx("div",{className:"location-details__details prevent-scroll",...pt,ref:$,children:Be.jsxs("div",{ref:j,onScroll:ot=>de(),className:"location-details__details-content",children:[De.properties.imageURL&&Be.jsx("img",{ref:oe,alt:"",src:De.properties.imageURL,className:"location-details__image"}),Object.keys(De.properties.categories).length>0&&Be.jsx("p",{className:"location-details__categories",children:Object.values(De.properties.categories).map((ot,ht,Tt)=>Be.jsxs(Ce.Fragment,{children:[ot,ht<Tt.length-1&&Be.jsx(Be.Fragment,{children:"・"})]},ot))}),De.properties.description&&Be.jsxs("section",{className:`location-details__description ${te?"location-details__description--full":""}`,children:[Be.jsx("div",{ref:F,children:De.properties.description}),(Je||jt||te)&&Be.jsx("button",{onClick:()=>ee(),children:D(te?"Close":"Read full description")})]}),ct&&Be.jsxs("div",{className:"contact-action-buttons-container",children:[ct.map(ot=>Be.jsx(B5,{detailType:ot.detailType,active:ot.active,displayText:ot.displayText,value:ot.value,icon:ot.icon},ot.key)),St&&Be.jsx(Hk,{openingHours:St,onExpand:()=>de()})]})]})})]})})}const WW="",Gk=r=>en.createElement("svg",{width:16,height:17,viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("g",{clipPath:"url(#clip0_1663_3931)"},en.createElement("path",{d:"M8 0.5C6.41775 0.5 4.87104 0.969192 3.55544 1.84824C2.23985 2.72729 1.21447 3.97672 0.608967 5.43853C0.00346629 6.90034 -0.15496 8.50887 0.153721 10.0607C0.462403 11.6126 1.22433 13.038 2.34315 14.1569C3.46197 15.2757 4.88743 16.0376 6.43928 16.3463C7.99113 16.655 9.59966 16.4965 11.0615 15.891C12.5233 15.2855 13.7727 14.2602 14.6518 12.9446C15.5308 11.629 16 10.0823 16 8.5C16 6.37827 15.1571 4.34344 13.6569 2.84315C12.1566 1.34285 10.1217 0.5 8 0.5ZM11.4667 11.98C11.4074 12.0452 11.3358 12.098 11.2559 12.1353C11.1761 12.1726 11.0897 12.1937 11.0017 12.1974C10.9136 12.2012 10.8258 12.1874 10.7431 12.1569C10.6604 12.1265 10.5846 12.0799 10.52 12.02L7.18667 8.99333C7.12364 8.92813 7.07457 8.85074 7.04247 8.76591C7.01038 8.68109 6.99592 8.5906 7 8.5V4.83333C7 4.65652 7.07024 4.48695 7.19527 4.36193C7.32029 4.23691 7.48986 4.16667 7.66667 4.16667C7.84348 4.16667 8.01305 4.23691 8.13807 4.36193C8.2631 4.48695 8.33334 4.65652 8.33334 4.83333V8.20667L11.42 11.04C11.5506 11.1586 11.6288 11.3242 11.6375 11.5004C11.6463 11.6765 11.5848 11.849 11.4667 11.98Z",fill:"#707070"})),en.createElement("defs",null,en.createElement("clipPath",{id:"clip0_1663_3931"},en.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0 0.5)"})))),F5=r=>en.createElement("svg",{width:13,height:20,viewBox:"0 0 13 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M9.61194 2.82846C9.61194 3.93033 8.7187 4.82357 7.61683 4.82357C6.51495 4.82357 5.62171 3.93033 5.62171 2.82846C5.62171 1.72659 6.51495 0.833344 7.61683 0.833344C8.7187 0.833344 9.61194 1.72659 9.61194 2.82846Z",fill:"#4B5563"}),en.createElement("path",{d:"M3.85618 7.89573L2.70342 8.26942C2.51461 8.33063 2.38005 8.49797 2.36081 8.69552L2.15675 10.7898C2.10483 11.3227 1.64157 11.7195 1.10705 11.6891C0.529883 11.6562 0.101401 11.1412 0.174055 10.5677L0.562276 7.5031C0.609594 7.12957 0.863193 6.8145 1.21798 6.68846L5.43314 5.19101C5.91287 4.94642 6.49458 4.90944 7.02868 5.14168C7.58278 5.38261 7.96247 5.86074 8.09808 6.40693C8.10564 6.42543 8.11266 6.44417 8.11911 6.46314L8.13434 6.50792C8.1531 6.56308 8.17666 6.6165 8.20475 6.66755L9.12944 8.34823C9.24374 8.55597 9.4283 8.71621 9.65003 8.80021L11.6264 9.54897C12.2431 9.78262 12.4674 10.5397 12.0776 11.0716C11.8078 11.4397 11.3226 11.5778 10.8994 11.4069L8.27831 10.3486C8.07383 10.266 7.90247 10.118 7.79102 9.92774L7.36282 9.1966L6.28886 11.8906C6.2887 11.8929 6.2885 11.8952 6.28824 11.8974C6.28503 11.9259 6.28989 11.9548 6.30227 11.9807L6.30571 11.9879L9.7205 18.1483C10.0544 18.7506 9.83675 19.5096 9.23443 19.8434C8.6321 20.1773 7.87316 19.9597 7.53929 19.3574L4.94329 14.6741L2.97868 19.1924C2.70407 19.8239 1.96948 20.1133 1.33793 19.8387C0.706382 19.5641 0.417021 18.8295 0.691627 18.1979L3.26686 12.2753L3.30923 12.1729C3.31648 12.1479 3.31685 12.1215 3.3104 12.0965C2.88761 11.4405 2.77915 10.5975 3.08907 9.82005L3.85618 7.89573Z",fill:"#4B5563"})),Zk=r=>en.createElement("svg",{width:20,height:24,viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M4.48045 5.12001C4.0861 5.12526 3.70969 5.28562 3.4327 5.56636C3.15571 5.84709 3.00042 6.22562 3.00045 6.62001V16.73C3.00045 16.7963 2.97411 16.8599 2.92723 16.9068C2.88035 16.9537 2.81676 16.98 2.75045 16.98H1.48045C1.30245 16.979 1.1274 17.0255 0.973367 17.1147C0.819338 17.2039 0.691916 17.3326 0.60426 17.4876C0.516604 17.6425 0.471891 17.818 0.474737 17.996C0.477584 18.174 0.527887 18.348 0.620453 18.5L3.62045 23.5C3.709 23.6492 3.83484 23.7728 3.98563 23.8587C4.13641 23.9446 4.30694 23.9897 4.48045 23.9897C4.65397 23.9897 4.8245 23.9446 4.97528 23.8587C5.12606 23.7728 5.25191 23.6492 5.34045 23.5L8.34045 18.5C8.42797 18.3484 8.47417 18.1765 8.47444 18.0015C8.4747 17.8265 8.42903 17.6544 8.34197 17.5026C8.25491 17.3508 8.12953 17.2244 7.97834 17.1362C7.82716 17.048 7.65548 17.0011 7.48045 17H6.23045C6.19758 16.9975 6.16554 16.9885 6.13616 16.9735C6.10679 16.9586 6.08066 16.938 6.05928 16.9129C6.03791 16.8878 6.0217 16.8587 6.01161 16.8273C6.00151 16.7959 5.99772 16.7629 6.00045 16.73V6.62001C6.00047 6.42133 5.96102 6.22463 5.88439 6.04132C5.80776 5.85802 5.69548 5.69176 5.55407 5.55221C5.41265 5.41266 5.24493 5.30259 5.06062 5.2284C4.87632 5.1542 4.67911 5.11736 4.48045 5.12001Z",fill:"#707070"}),en.createElement("path",{d:"M15.5203 18.84C15.9182 18.84 16.2997 18.6819 16.581 18.4006C16.8623 18.1193 17.0203 17.7378 17.0203 17.34V7.22995C17.0254 7.16717 17.0539 7.10861 17.1003 7.06597C17.1466 7.02332 17.2074 6.99975 17.2703 6.99995H18.5203C18.6968 6.99992 18.8702 6.95317 19.0228 6.86446C19.1754 6.77574 19.3018 6.64822 19.3891 6.49485C19.4765 6.34148 19.5217 6.16771 19.5201 5.99122C19.5186 5.81472 19.4704 5.64177 19.3803 5.48995L16.3803 0.48995C16.2918 0.340728 16.1659 0.217112 16.0152 0.131252C15.8644 0.0453926 15.6938 0.000244141 15.5203 0.000244141C15.3468 0.000244141 15.1763 0.0453926 15.0255 0.131252C14.8747 0.217112 14.7489 0.340728 14.6603 0.48995L11.6603 5.48995C11.5703 5.64177 11.5221 5.81472 11.5205 5.99122C11.519 6.16771 11.5642 6.34148 11.6516 6.49485C11.7389 6.64822 11.8653 6.77574 12.0179 6.86446C12.1705 6.95317 12.3438 6.99992 12.5203 6.99995H13.7703C13.8366 6.99995 13.9002 7.02629 13.9471 7.07317C13.994 7.12006 14.0203 7.18365 14.0203 7.24995V17.34C14.0203 17.7378 14.1784 18.1193 14.4597 18.4006C14.741 18.6819 15.1225 18.84 15.5203 18.84Z",fill:"#707070"})),qW="";Gm.propTypes={location:et.object,locationClicked:et.func,icon:et.string,isHovered:et.bool};function Gm({location:r,locationClicked:a,icon:c,isHovered:f}){const{t:y}=Ho(),w=Ce.useRef(),D=zi(As),o=zi(Hm);return Ce.useEffect(()=>{var te;const j=ge=>a(ge.detail),F=()=>{var ge;((ge=r.properties.locationSettings)==null?void 0:ge.selectable)!==!1&&D.hoverLocation(r)},$=()=>{var ge;(ge=r.properties.locationSettings)!=null&&ge.selectable||D.unhoverLocation(r)};((te=r.properties.locationSettings)==null?void 0:te.selectable)===!1&&w.current.classList.add("non-selectable");const{current:oe}=w;return oe.location=r,oe.icon=c||D.getDisplayRule(r).icon,oe.addEventListener("locationClicked",j),oe.addEventListener("mouseover",F),oe.addEventListener("mouseout",$),f?w.current.classList.add("hovered"):w.current.classList.remove("hovered"),()=>{oe.removeEventListener("locationClicked",j),oe.removeEventListener("mouseover",F),oe.removeEventListener("mouseout",$)}},[r,a,f]),Be.jsx("mi-list-item-location",{level:y("Level"),ref:w,"show-external-id":o})}const Wk=()=>{const[r,a]=Ce.useState(),c=zi(As),f=zi(Pm);return Ce.useEffect(()=>{function y(){const w=c.getMapView().getCenter();a(w.lat+","+w.lng)}return c&&f?(c.getMapView().addListener("idle",y),y()):c&&c.getMapView().removeListener("idle",y),()=>{c&&c.getMapView().removeListener("idle",y)}},[c,f]),r},Gv=On({key:"searchInput",default:void 0}),Zm=Ce.forwardRef(function(a,c){const{placeholder:f,mapsindoors:y,results:w,clicked:D,cleared:o,changed:j,category:F,google:$,mapbox:oe,disabled:te=!1}=a,ge=Ce.useRef(),xe=zi(Cm),Ae=zi(qc),[,it]=ln(Gv),We=sessionStorage.getItem("mapboxPlacesSessionToken"),me={longitude:xe==null?void 0:xe.coords.longitude,latitude:xe==null?void 0:xe.coords.latitude},ce=Wk(),pe=zi($l),ve=zi($m);return Ce.useImperativeHandle(c,()=>({triggerSearch(){ge.current.triggerSearch()},getValue(){return ge.current.value},setDisplayText(De){ge.current.setDisplayText(De)},focusInput(){ge.current.focusInput()},clear(){ge.current.clear()},getInputField(){return ge.current.getInputField().then(De=>it(De))}})),Ce.useEffect(()=>{const{current:De}=ge;De.value&&window.mapsindoors.services.LocationsService.once("update_completed",()=>{De.triggerSearch()})},[Ae]),Ce.useEffect(()=>{const De=Je=>w(Je.detail),ct=()=>o(),{current:St}=ge;return y===!0&&(St.mapsindoors="true"),St.addEventListener("results",De),St.addEventListener("click",D),St.addEventListener("cleared",ct),St.addEventListener("changed",j),()=>{St.removeEventListener("results",De),St.removeEventListener("click",D),St.removeEventListener("cleared",ct),St.removeEventListener("changed",j)}},[f,y,w,D,o,$,oe,j]),Be.jsx("mi-search",{ref:ge,"id-attribute":"search",placeholder:f,"session-token":We,"user-position":me.latitude!==void 0&&me.longitude!==void 0?Object.values(me).join(","):null,"mi-near":ce,"mi-categories":F,disabled:te,mapbox:oe,google:$,"mi-venue":ve?void 0:pe,language:Ae})});Zm.propTypes={placeholder:et.string,mapsindoors:et.bool,results:et.func,clicked:et.func,cleared:et.func,changed:et.func,category:et.string,preventFocus:et.bool,google:et.bool,mapbox:et.bool,disabled:et.bool};function Zv(r){const a={type:"Point",coordinates:[r.coords.longitude,r.coords.latitude]};return{id:"USER_POSITION",geometry:a,properties:{name:g4("My position"),anchor:a},type:"Feature"}}let Wv;function qk(r){return new Promise((a,c)=>{Wv||(Wv=new window.google.maps.Geocoder),Wv.geocode({placeId:r.properties.placeId},f=>{f.length>0?(r.geometry={type:"Point",coordinates:[f[0].geometry.location.lng(),f[0].geometry.location.lat()]},a(r)):c()})})}const Kk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASAAAAAkCAYAAAApZeciAAARjUlEQVR4Ae2dBXTb2vL1x6GmzJehzBjbKb/YcsrMfJkZyvDS1HbgMTMzM7d9zMzMGCjaTrnxt+e7zvqPpwLLdUpLe62fnFqSZak5W3PmzFHI0/UoT7Nf2t49XJeaY8RT24xY6jXhWPJt+Pn1+Hl3KNa2dE7N8X6Ariwe19XJeHhE6k5OM6KpD4eiidMwnLQVWH/eiCc/F44mDUBXBo/r4iQ8PIxY262Icj7J5uIW7PdZ3h+QBwCBD65YW/GB5ec78H9wxf2ACg0vrmk8PCLRZHUonjri1ngUrdXRxExAHgkKfGjVusCHVqY7qPjQqgcAFRpeXLN4eOBuvdyIJs5e3MVKHcbrq7F+caTuxIjqxrZbquqOD4vUpeYh4mkMxRL/0fuE46kdgMIengHlhwc0ETRmmEvu9ZzYv4SuYnHEEoonzqjczmlONC+qSXcDZMXqmnSZEUs+g/3bXuiGpfYCYjw8A7LFwzOgqppjfWAe/84yn3iqOVzf5geUK5H9yfFIRj8NKIMH8AzIBg/PgHhoXZoPRr4SbCaAPC4dz4A8LPAMiPM5Ou+D3M7dgDwKg2dAHhZ4BoQk6Z6s6CeW+DGl0z5AHoXBMyAPCzwDQu7nJ9kGlLoH0OXmb1VV5S2RyoXNkWBtsxF8c0sk8Ea8bm8OB6ana6gIkCu+RuXnvlK88NyB0tpzB4vfjNc3nj1Ysv3soZK8Pm/qy9u7GvG2ZRj1i4fiyTcit1OH6GaR/83pUkDTG1t7ci4NgOYegDK4NqB/R4L9cd6bWyLBl/J1aDGCdU1GcPk/p07tCsgKyxVQEbgRDAIDgI/cqxzcBAaDG0ERXX0qATeDweAWUEr5qQj0Bj2AL8fj3ZxnIy8S1/UmdV07y4DKwe1gEOhzJadYwIAuZHe/TvQHdLlIrx5T1hwJ7GwO+4+gwaXNaAr7/9hiVK5OE/kA2fIRKjt7oGTnmYOlR84dLE2bU/zH84fKViM48QGyY/VH0sWojXrOqjYqFE3+xYgnZiFy/LnIoX0dUIacDejwvMpeON/XNoeDZ0yvhRFsAQ9YXQdesB7OcCMoBwvBPtAo2A2qc2ygI8BDoF59Ri1YCfoBrfHie0wlawXFdrPJWuPEdn6g1QesBjH1HevAZnALmSugrlcZmAdqxGdsBlr9wFqT48XBRnBjjoY+Xx2L2QcWZtZPKJQBCaO7x+T/8lkwycRsbxXXZzU5SF3PWeQg3MUnZDeoxN8BOTEnevJ2HrZ3AzdkQJL/VPkHtBiB71kZjwZRwNvTVVUlgEz5Gg2AwXwPpHOj+O3YpwSQGRzJoAbqK86Fl4lTMKgTl2JAR6v9d7DR5nYtAm+UJqQNqDHDeLANNNrwvM0dsBisBo0OxMAEIDVArH+arPWUanjFZK7NYrvbTAxyv8N3rLcwwtlim5HgGZN9teGNBlGH49WZ7Kevz3aHz9gKggUyoBgYA+IOx9yg/g+K1Pe8hazlA1v1/5ODAYWzu1/J7wNygosMeXs3cOEioA64O9EUCf7kosYVDqYQAfywJeL/eVPEf06vbzb8bwGkaf8udUWX6yfaZBAJpfD6w3MHin9+5iul50xM6C2ANGyYiGq+bGo20dQv8POf9bp8Dah1+vSeuBa/1+eK6/APXI8DuBa/1uvAHkASXkgDerFofBvBDDAdrAV1YrttoNzkl2k9aBQ8AkJgClgIdot1DWA0kHpWrO9lEUU0KkaaGaEwmJ3qLn2balTPAAMEM69PqM8fa2VAwgwbMvvdAx5TUeIgUKf2CYEgiChDbbA4n+5ghzLw1WAqmA42iAilpkAGVCdMcw9YCCpBFXhYXaM1QGqmWLeSrDVUbPcYILcGhNzGDwA5kJcBherapgDqAF2Jl2Q3KP8p5H+e5FwQIIYjJLz3Kt34YExLAUlgJi+RxgKzOYWu2JOcCwKUYQByQa+6yIQOlC0FJOHCyuxrkzgTrkttkUWZ1ftPDFcmlZcBId/zcnUtmvC6SEY5hw1/Jc7zX6Jbev6wUTkGUAe8kAbE7AQ3A63+YIvYbjmQmqQayDigVQpWie1qQFeLxl0JtF4EGhWrHH6xF8u7s+pizAdFJkY6VWyzB5Tq7yjYYtN9KlYRZTXw6eOp89phEtWtUV2fvkDrZrALNBbCgAQbQRnQmqCMdYzqKu4XvwvlZK6NYv8JgNx2wcLxxD8BOePegMLRE9MBMf+dN2kg7uyn/68xBS80VQcjgMxorg7uUFHSL2XjbP8CDUSkc1pEPRcQDUUAmQFj2qGioF/KfBAnnDPTTzKGkmgPxVILAWmqatIlbEL5GtCxqol9YDgnhbkm8DoCkISNGWb8Snkd8O8PAOqAFyS7HQ4hcz+Rw6gDPUUjkuY02SHsvl9sa8hGJN6/G2g9Lu6WjwsT0w12oficwTLPJN6/zyFZvMrkfLQBRR0SspPFtpscjrdBdYU71Bc0iBya3fFuAQ0FNKCn9LVVmia2fQJILRbrZgCtHsLAdoHiPJPQIHkjIDs4muFowA41ugYSYwAxyOU8ohrSmwBZwaNW3CXLjoIqxgNiMLr1SJahfKX0TYCs4M/jLpmKmMYDAhz9rFbf/d2ArJgdPTWYr2M+BtQaCW5UEd5eaTz/q5oyCDmfxpaw/7BJd/V0c9WYHoAYXpDqzztpsUmUcqPq0jiNmN1qke/xiYghqkZh+oh9XqSihuFA6nnQCPaCIos77hCy151i2/UWBrSc7HW32PZWstdwi6hulorYnLSxgAY0OofRuJ1iexmZ9RNmuMXkdyIk9guRC3HdT/bjNNoeAnSpwKi+JyMINjtAgBvWe7LNJDgNkB3opmyR+7Qa/ocBAY5o3iPNBP+eBsiWQyVb5D4wsYcBMboyHOZSBcgORIXfyseAdFTDxsoGiffn4Zw/i3Nvv3hUMHicu6atc/yjAHXwwkInT50biu7fB1z+0vtEPqhBGc188VkjLPIK/VQ+aIXYTr8vtV0lfeM21ElTlQbk4nrtcXs8HU2ovNogclagQAZUn2OJwEoduQndJdYNVf//20UXrRu5EBrMLtV9+JUesXILPyGRH1ImZsb/FlAHLYb/oGxQGAHqDcgOjJbNz05GB6KAGHS5DkozSR+g3oDsQLdrvtwHRAExMM9PZSXQaxIDANmBfd6clwGFgx9S0WAtXv8E0hpO2qMc4f7/zZ7QHZCGeOEiKtCjVfeY3M0qKTc9JvbpLd6/Xby/RLz/qEnE9LRInhepboE2MBLdR7fskgbkIm/RkOfxtoEOPSTe70POGlogA9qdqx+I400HUkNUF7RDI9RNzJVmxVI3XzQLPpZ4DFC+IILYria2vhJQhqvfgGLJT7utjUKB4psKYEAm+E+1hAPv4iS0Qx1UZqG6Mg66Uf9SqW7CNNJyHk7vKe+OIpm6Hfgy6xtMckYRE/O812aIfr/IpQRcMMHCgMaTverEdwm4QH7u/Sryc9LIAhnQi8lZ+npMMYl0nxYRVS+TEokbgWuxQeihZiPWVgnILTwyxJNZs7p19amJgDqAmbw7y0xm+2cAssWo3JbVBYsEHgLEoNv07qzu1JdLZgCyA/tsy+62lT4EiOHnXavrMQuQPalvuDUgPQKm+FOrEXyeq6IB5QIvpAHNJGdNMBlhmuAiL6KHyWMm+YEl4vMGgmnq3x26Qby/DJSKIfa1No2rAXQh93JrQNtE4yuj/LRS5WScNKuAOaDu5KxNKuLU8qtRwJ6iZOABylPVDUd78wiYGrk6hgrgEKCcwcPKjGjyb/oRrYAkbB7Z3Y7A2wBZkV69urg54v+N3Od/4eBYQAybR3YSuvhtgKxAtXQxXn+TlYQ+VDoWEBOOJzeoc3gbIAtw/U7ewV3OvAzI8K9SEc//msOVcyynixD5rKZk8EIa0OPA5yKxOgaweoj39jpUS+vRqPuB1mCZcBbdkOeA1vNiuHyUqt/RWiHWB8heXUD5JRrQGqeRQaHyDFoVLgYJfODJAhrQDLJXN1ErVGfx/UvAXtGtm60NNV9Vxdqm6ofP88gOktQvzcxxImvSJZy8ltXAGZLh6PGhgCR8V88eeg62c9IVkAW12VMS/D/LGoY/QP0xenVSjGi1Y5RrHiBzSmvVMPzP5DB8pgL6uEyi818FAaTJDMN/Pt9heM7n4PyPyfNjAwJkRiYS/DNyQbMASXih64CCZK0xNvUx94p1S4WRORXVTQJaReKX9hnR/ZoDtOaaFAbGQKnDyNZu0IOstQREwXLQOx8DUvmYnQ4RxXIQBctAL2WEtTrKsFBlgeuAamzyTj5lsBtJy7yrXC/yXD66RIXr2pZkP5pDGEks8S4kWjdF6tqCHOlE6lOT+RGubFAwrn+Y/aUMrF8MyAyYSlxV/Z7hkS6ZYG2ZW3EzVz5fPPzsXwBIAlOJqwroMzzS1f5l6g7o//NFupkrn3l9FoeKFwCS6DwWmzMXJ8pCRDZXmPQXLrUQ0aTOqY3nfPE8OUAA12PaDTxPLMu0jeArpBHrHBBTD0KgRBnCNDVSM1XXoKj1q00a3CBVev+kSB5bRisOZf23mGy3KccIbpvJyFKZGomLgp55GpCuedoC7tDHU3VL+0EPmwLMGAiq61YCQqChEwoRd4Ahyiy6g3VqPttAslYPkykdM6hA4m4XGk0LN6R84UezspkBsiAz+z34fbOkK/g5aoV+ZzYEDV4HSMMVzzCh72tz4YroF2p+in/HkZFej31eB0jDkQ1G7L52sbkkTiLn8zOs+2OhpmKk/f5SFCB+w+Rckxhy/yl3P7lY02k6hp6K8ZiaOPoAuB/UmMz/8eVwB64Hj4F7lfEwexySqiPU9tv1MfWQrkNUJRvPNpM5VHeDh0DU4bOUATmqp4r4mC0Wx2sAEy0iwnvUZ+wF94H71cThxwpkQPuUGW0F94BH1I2GCZCzVqnfrS5UQFW9JHUT/z2wvAwIdUXh/cmxgJw4Pmdqv6ZI4JuqUVljBN7A+SBAZrR/ifqh0PCb0mAceAPngwCZwbkxUxMyMSXZZctzMmpvRIFfc7wGYrhej4rpCGgUWA4aLWgASxweqzFezCmz4jHQ1ylRrRrWQlLSlc8qF+FkCg84fMdabQZ5GhCrF3jY6XgOw/olKiFtxipwZ4EMaBfooyfbKqIOZi81Sg9edIaQFwqEo6n3hqLJlLP5JL8D1rmtIeLZ7Yh4ngVNNkPRv241AosBOcGz21Fo+CyinSZL4/lK8a/PHSxbDMgJjoRwftvAMYtz/zNPM+EJqqLu6Wt5/FWMzLUIPgdaba7Fz2Ha1YA0xAuTBjUIrAPbwT6wBawAt7p4DtBM8ADYAWrBNrABjHbR9x8vqp77k7X6i+0mU27ygRFgLdgKajPG+SgwbPI1d4CZGQYAcnG8kWCdyfHCLorx7gRrwHZQC3aA9aIMoae4FoPIvSrATFApbgSV4EGwF+wDT4O5oCflrnXiJtaPOllohOVcDcwPnIchvYwfyMVD9+FYaifngdT0jbzgbgjPB0OUs4u7WU1G4NX4+ZkWo6JC3+lz4sdUyvPBMNy+i7tZMJ5X4+dnkBuqkAnnXOFKbowUrkAeqB68BdTLB5LBeH5vMfIHA1oexB8nfFMH/o+sngnIij/OG9aF655ADT+cja8H58cwehjU18LpcRyePBVafUXy+W7qXHlKp338Z4cAWTHv1e1d1Aji6wFdbnjR2QbkydNiPSXDU+HFj1hFdPcIulC/5LlhgKzgyCirbqgudS+gyw0WnWZAnjzpWqFngY86RV7Ug5zOH7LqgOLJNYA0s2uSN+D1r2Lbs/weoMsNLzrTgDx5MlSNWSfJE/Jb95kk2t/MU1R4cipPOUHk86j+g46Z/BBdCbDoNAPy5KlUFJTWgFLqVHlREBdfuitDSPxdTVy9rPCiswzIk6cpqiSgc+UpM8Uk9bpczIe7bBwVAbpSYNFpBuTJU28wMEMZebpsCkeTBgoKD+qnRzI8+ZbLEcQUjSsGLwgKZRhInjx5um40s/54X340B08zwZSV6qr6U4Oupr8i+/8Adnj5PFwBRDQAAAAASUVORK5CYII=",U5=r=>en.createElement("svg",{width:20,height:18,viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M18.5329 7.19049C18.5118 7.16682 18.4958 7.13909 18.4857 7.109C18.4757 7.07891 18.4719 7.04709 18.4746 7.01549C18.481 6.98424 18.4939 6.9547 18.5126 6.92884C18.5313 6.90298 18.5553 6.88139 18.5829 6.86549L19.2496 6.47383C19.4034 6.39827 19.54 6.29191 19.6509 6.16135C19.7619 6.03079 19.8448 5.87881 19.8945 5.71485C19.9443 5.5509 19.9598 5.37846 19.9401 5.20826C19.9204 5.03806 19.8659 4.87372 19.7801 4.72545C19.6942 4.57719 19.5788 4.44816 19.4409 4.34637C19.3031 4.24459 19.1458 4.17223 18.9789 4.13379C18.8119 4.09534 18.6388 4.09163 18.4703 4.12289C18.3019 4.15415 18.1416 4.21971 17.9996 4.31549L17.1079 4.82383C17.0788 4.84065 17.0457 4.8495 17.0121 4.8495C16.9784 4.8495 16.9454 4.84065 16.9163 4.82383C16.8885 4.81108 16.8638 4.79261 16.8437 4.76963C16.8236 4.74665 16.8085 4.71968 16.7996 4.69049L16.4663 2.69883C16.3686 2.10879 16.0627 1.5733 15.604 1.18953C15.1453 0.805757 14.5643 0.599136 13.9663 0.607159H5.99125C5.39796 0.609722 4.82491 0.823205 4.37454 1.20945C3.92418 1.59569 3.62587 2.12951 3.53292 2.71549L3.19959 4.69049C3.19282 4.72272 3.17879 4.75297 3.15858 4.77896C3.13836 4.80496 3.11249 4.826 3.08292 4.84049C3.05378 4.85731 3.02073 4.86617 2.98709 4.86617C2.95344 4.86617 2.92039 4.85731 2.89125 4.84049L1.99959 4.34049C1.85752 4.24471 1.69729 4.17915 1.52882 4.14789C1.36036 4.11663 1.18727 4.12034 1.0203 4.15879C0.853336 4.19723 0.696054 4.26959 0.558225 4.37137C0.420396 4.47316 0.304963 4.60219 0.219094 4.75045C0.133225 4.89872 0.078754 5.06306 0.0590634 5.23326C0.0393727 5.40346 0.0548829 5.5759 0.104631 5.73985C0.154378 5.90381 0.237302 6.05579 0.348251 6.18635C0.4592 6.31691 0.595806 6.42327 0.749587 6.49883L1.41625 6.89049C1.44391 6.90639 1.46788 6.92798 1.48655 6.95384C1.50523 6.9797 1.51819 7.00924 1.52459 7.04049C1.52727 7.07209 1.52348 7.10391 1.51345 7.134C1.50342 7.16409 1.48736 7.19182 1.46625 7.21549C0.79248 7.90316 0.415458 8.82776 0.416253 9.79049V11.4572C0.416532 11.8754 0.543199 12.2838 0.779646 12.6288C1.01609 12.9738 1.35128 13.2393 1.74125 13.3905C1.78008 13.4055 1.81353 13.4317 1.83729 13.4659C1.86106 13.5001 1.87405 13.5405 1.87459 13.5822V15.2072C1.87459 15.7044 2.07213 16.1814 2.42376 16.533C2.77539 16.8846 3.25231 17.0822 3.74959 17.0822C4.24687 17.0822 4.72378 16.8846 5.07541 16.533C5.42704 16.1814 5.62459 15.7044 5.62459 15.2072V13.7572C5.62455 13.7011 5.64622 13.6472 5.68507 13.6068C5.72392 13.5664 5.77691 13.5426 5.83292 13.5405H14.1663C14.2223 13.5426 14.2753 13.5664 14.3141 13.6068C14.3529 13.6472 14.3746 13.7011 14.3746 13.7572V15.2072C14.3746 15.7044 14.5721 16.1814 14.9238 16.533C15.2754 16.8846 15.7523 17.0822 16.2496 17.0822C16.7469 17.0822 17.2238 16.8846 17.5754 16.533C17.927 16.1814 18.1246 15.7044 18.1246 15.2072V13.5822C18.1251 13.5405 18.1381 13.5001 18.1619 13.4659C18.1856 13.4317 18.2191 13.4055 18.2579 13.3905C18.6479 13.2393 18.9831 12.9738 19.2195 12.6288C19.456 12.2838 19.5826 11.8754 19.5829 11.4572V9.79049C19.5903 8.81911 19.2128 7.88433 18.5329 7.19049ZM6.03292 2.26549H14.0496C14.2493 2.26292 14.4433 2.33219 14.5963 2.46067C14.7493 2.58915 14.851 2.7683 14.8829 2.96549L15.2829 5.35716C15.2878 5.38821 15.2858 5.41994 15.2772 5.45016C15.2686 5.48038 15.2534 5.50836 15.2329 5.53216C15.2131 5.55434 15.1887 5.57183 15.1613 5.58336C15.1339 5.59489 15.1043 5.60017 15.0746 5.59883H4.99959C4.9654 5.60054 4.93125 5.59471 4.89957 5.58175C4.86788 5.56878 4.83944 5.54901 4.81625 5.52383C4.79517 5.4674 4.79517 5.40525 4.81625 5.34883L5.17459 3.02383C5.19879 2.82341 5.29493 2.63859 5.44514 2.50372C5.59534 2.36884 5.7894 2.29307 5.99125 2.29049L6.03292 2.26549ZM16.2913 11.4322C16.044 11.4322 15.8024 11.3588 15.5968 11.2215C15.3912 11.0841 15.231 10.8889 15.1364 10.6605C15.0418 10.4321 15.017 10.1808 15.0653 9.9383C15.1135 9.69582 15.2326 9.47309 15.4074 9.29827C15.5822 9.12346 15.8049 9.00441 16.0474 8.95618C16.2899 8.90795 16.5412 8.9327 16.7696 9.02731C16.998 9.12192 17.1932 9.28213 17.3306 9.4877C17.4679 9.69326 17.5413 9.93493 17.5413 10.1822C17.5447 10.352 17.5136 10.5207 17.4497 10.6781C17.3858 10.8355 17.2905 10.9781 17.1696 11.0975C17.0488 11.2168 16.9048 11.3102 16.7467 11.3721C16.5885 11.4339 16.4193 11.4629 16.2496 11.4572L16.2913 11.4322ZM2.49959 10.2072C2.49959 9.95993 2.5729 9.71826 2.71025 9.5127C2.8476 9.30713 3.04282 9.14692 3.27123 9.05231C3.49964 8.9577 3.75097 8.93295 3.99345 8.98118C4.23593 9.02941 4.45865 9.14846 4.63347 9.32327C4.80829 9.49809 4.92734 9.72082 4.97557 9.9633C5.0238 10.2058 4.99905 10.4571 4.90444 10.6855C4.80983 10.9139 4.64961 11.1091 4.44405 11.2465C4.23849 11.3838 3.99681 11.4572 3.74959 11.4572C3.41807 11.4572 3.10012 11.3255 2.8657 11.091C2.63128 10.8566 2.49959 10.5387 2.49959 10.2072Z",fill:"#4B5563"})),V5=r=>en.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("g",{clipPath:"url(#clip0_1697_57490)"},en.createElement("path",{d:"M12.0829 5.05834C13.1783 5.05834 14.0663 4.17037 14.0663 3.07501C14.0663 1.97964 13.1783 1.09167 12.0829 1.09167C10.9876 1.09167 10.0996 1.97964 10.0996 3.07501C10.0996 4.17037 10.9876 5.05834 12.0829 5.05834Z",fill:"#4B5563"}),en.createElement("path",{d:"M3.75 11.4083C3.00832 11.4083 2.2833 11.6283 1.66661 12.0403C1.04993 12.4524 0.569282 13.038 0.285453 13.7233C0.00162482 14.4085 -0.0726377 15.1625 0.0720569 15.8899C0.216751 16.6173 0.573904 17.2855 1.09835 17.81C1.6228 18.3344 2.29098 18.6916 3.01841 18.8363C3.74584 18.981 4.49984 18.9067 5.18506 18.6229C5.87029 18.339 6.45596 17.8584 6.86801 17.2417C7.28007 16.625 7.5 15.9 7.5 15.1583C7.4978 14.1644 7.10201 13.2119 6.39922 12.5091C5.69644 11.8063 4.74389 11.4105 3.75 11.4083ZM3.75 17.2417C3.33796 17.2417 2.93517 17.1195 2.59256 16.8906C2.24996 16.6616 1.98294 16.3363 1.82525 15.9556C1.66757 15.5749 1.62631 15.156 1.7067 14.7519C1.78708 14.3478 1.9855 13.9765 2.27686 13.6852C2.56822 13.3938 2.93944 13.1954 3.34356 13.115C3.74769 13.0346 4.16658 13.0759 4.54726 13.2336C4.92794 13.3913 5.25331 13.6583 5.48223 14.0009C5.71115 14.3435 5.83333 14.7463 5.83333 15.1583C5.83333 15.4319 5.77945 15.7028 5.67475 15.9556C5.57005 16.2083 5.4166 16.438 5.22314 16.6315C5.02969 16.8249 4.80002 16.9784 4.54726 17.0831C4.2945 17.1878 4.02359 17.2417 3.75 17.2417Z",fill:"#4B5563"}),en.createElement("path",{d:"M16.25 11.4083C15.5083 11.4083 14.7833 11.6283 14.1666 12.0403C13.5499 12.4524 13.0693 13.038 12.7855 13.7233C12.5016 14.4085 12.4274 15.1625 12.5721 15.8899C12.7168 16.6173 13.0739 17.2855 13.5984 17.81C14.1228 18.3344 14.791 18.6916 15.5184 18.8363C16.2458 18.981 16.9998 18.9067 17.6851 18.6229C18.3703 18.339 18.956 17.8584 19.368 17.2417C19.7801 16.625 20 15.9 20 15.1583C19.9978 14.1644 19.602 13.2119 18.8992 12.5091C18.1964 11.8063 17.2439 11.4105 16.25 11.4083ZM16.25 17.2417C15.838 17.2417 15.4352 17.1195 15.0926 16.8906C14.75 16.6616 14.4829 16.3363 14.3253 15.9556C14.1676 15.5749 14.1263 15.156 14.2067 14.7519C14.2871 14.3478 14.4855 13.9765 14.7769 13.6852C15.0682 13.3938 15.4394 13.1954 15.8436 13.115C16.2477 13.0346 16.6666 13.0759 17.0473 13.2336C17.4279 13.3913 17.7533 13.6583 17.9822 14.0009C18.2112 14.3435 18.3333 14.7463 18.3333 15.1583C18.3333 15.4319 18.2794 15.7028 18.1748 15.9556C18.0701 16.2083 17.9166 16.438 17.7231 16.6315C17.5297 16.8249 17.3 16.9784 17.0473 17.0831C16.7945 17.1878 16.5236 17.2417 16.25 17.2417Z",fill:"#4B5563"}),en.createElement("path",{d:"M8.93421 9.52501L10.1425 8.14168C11.2897 8.9152 12.6423 9.32736 14.0259 9.32501H14.5842C14.9157 9.32501 15.2337 9.19331 15.4681 8.95889C15.7025 8.72447 15.8342 8.40653 15.8342 8.07501C15.8342 7.74349 15.7025 7.42555 15.4681 7.19113C15.2337 6.95671 14.9157 6.82501 14.5842 6.82501H14.0259C12.8486 6.82097 11.7201 6.35403 10.8842 5.52501C10.7716 5.40452 10.6345 5.30949 10.4821 5.24625C10.3298 5.18302 10.1657 5.15305 10.0009 5.15834C9.82975 5.16377 9.66156 5.2043 9.50675 5.2774C9.35193 5.35051 9.21378 5.45464 9.10087 5.58334L6.18421 8.91668C6.05958 9.04818 5.96401 9.20443 5.90372 9.37528C5.84342 9.54613 5.81973 9.72775 5.83421 9.90834C5.8651 10.0771 5.92973 10.2379 6.02424 10.3811C6.11874 10.5243 6.24118 10.6469 6.38421 10.7417L6.93421 11.1083C7.66321 11.5976 8.22851 12.2944 8.55687 13.1086C8.88523 13.9229 8.96153 14.8169 8.77587 15.675C8.72593 15.8397 8.71053 16.0129 8.73063 16.1838C8.75074 16.3547 8.80592 16.5196 8.89272 16.6682C8.97951 16.8168 9.09606 16.9459 9.23505 17.0474C9.37404 17.1489 9.53249 17.2205 9.70047 17.2579C9.86845 17.2953 10.0423 17.2976 10.2112 17.2647C10.3802 17.2318 10.5404 17.1643 10.6821 17.0666C10.8237 16.9688 10.9436 16.8429 11.0343 16.6966C11.125 16.5504 11.1846 16.387 11.2092 16.2167C11.4704 14.9998 11.3968 13.7349 10.9961 12.5566C10.5955 11.3782 9.88295 10.3305 8.93421 9.52501Z",fill:"#4B5563"})),en.createElement("defs",null,en.createElement("clipPath",{id:"clip0_1697_57490"},en.createElement("rect",{width:20,height:20,fill:"white"})))),Xk=r=>en.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("g",{clipPath:"url(#clip0_3407_1703)"},en.createElement("path",{d:"M11.3752 20.0001H11.2169C10.9704 19.965 10.7399 19.8576 10.5545 19.6915C10.369 19.5254 10.2371 19.308 10.1752 19.0668L8.33357 11.6668L0.941907 9.82512C0.699196 9.76473 0.479985 9.63338 0.312261 9.44785C0.144536 9.26231 0.0359065 9.031 0.000240204 8.78345C-0.034478 8.53494 0.0136427 8.28191 0.137161 8.06349C0.26068 7.84508 0.452715 7.67344 0.683574 7.57512L18.3336 0.0917817C18.5568 0.00128909 18.802 -0.0208838 19.0378 0.0280732C19.2737 0.0770302 19.4898 0.194913 19.6586 0.366782C19.8232 0.535068 19.9346 0.74804 19.9791 0.979189C20.0235 1.21034 19.999 1.44946 19.9086 1.66678L12.4086 19.2834C12.3263 19.4916 12.1843 19.6707 12.0004 19.7982C11.8165 19.9258 11.599 19.996 11.3752 20.0001Z",fill:"#525252"})),en.createElement("defs",null,en.createElement("clipPath",{id:"clip0_3407_1703"},en.createElement("rect",{width:20,height:20,fill:"white"}))));Q5.propTypes={selectionChanged:et.func,children:et.node};function Q5({selectionChanged:r,children:a}){const c=Ce.useRef();return Ce.useEffect(()=>{const f=w=>r(w.detail),{current:y}=c;return y.addEventListener("change",f),()=>y.removeEventListener("change",f)},[r]),Be.jsx("mi-dropdown",{ref:c,children:a})}function Jk(r,a){const c=sessionStorage.getItem("mapboxPlacesSessionToken");return new Promise((f,y)=>{const w=`https://api.mapbox.com/search/searchbox/v1/retrieve/${r.id}?session_token=${c}&access_token=${a}`;fetch(w).then(D=>D.status!==200?y():D.json()).then(D=>{r.geometry={type:"Point",coordinates:[D.features[0].geometry.coordinates[0],D.features[0].geometry.coordinates[1]]},f(r)}).catch(()=>{y()})})}const eP=pm({key:"unitSystem",get:({get:r})=>r(qc)==="en-US"?"imperial":"metric"}),KW="";qv.propTypes={onAccessibilityChanged:et.func};function qv({onAccessibilityChanged:r}){const a=zi(Ea),[c,f]=ln(zf);function y(w){f(w.target.checked),r&&r()}return Be.jsxs("div",{className:"accessibility",children:[Be.jsx("input",{className:"mi-toggle",type:"checkbox",checked:c,onChange:w=>y(w),style:{backgroundColor:c?a:""}}),Be.jsx("div",{children:g4("Avoid stairs and escalators")})]})}const XW="";function tP(){var w;const r=zi(Ea),a=zi(ah),[c,f]=ln(S5);function y(D){f(D.target.checked)}return Be.jsxs("div",{className:"shuttle-bus",children:[Be.jsx("input",{className:"mi-toggle",type:"checkbox",checked:c,onChange:D=>y(D),style:{backgroundColor:c?r:""}}),Be.jsx("div",{children:((w=a==null?void 0:a.appSettings)==null?void 0:w.includeTransitSelectionDescription)||"Include bus transportation"})]})}const H5=On({key:"wayfindingLocation",default:null}),yo={TO:"TO",FROM:"FROM"},iP="data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 14 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 0C3.13 0 0 3.13 0 7C0 12.25 7 20 7 20C7 20 14 12.25 14 7C14 3.13 10.87 0 7 0ZM7 9.5C5.62 9.5 4.5 8.38 4.5 7C4.5 5.62 5.62 4.5 7 4.5C8.38 4.5 9.5 5.62 9.5 7C9.5 8.38 8.38 9.5 7 9.5Z' fill='black' fill-opacity='0.88'/%3E%3C/svg%3E%0A";Kv.propTypes={onStartDirections:et.func.isRequired,onBack:et.func.isRequired,directionsToLocation:et.object,directionsFromLocation:et.object,onSetSize:et.func,isActive:et.bool};function Kv({onStartDirections:r,onBack:a,directionsToLocation:c,directionsFromLocation:f,onSetSize:y,isActive:w}){var Li,Ii;const{t:D}=Ho(),o=Ce.useRef(),j=Ce.useRef(),F=Ce.useRef(),$=Ce.useRef(),oe=zi(vv),te=zi(Cm),ge=zi(ul),xe=zi(Nm),Ae=zi(Ea),[it,We]=ln(H5),[me,ce]=Ce.useState(),[,pe]=ln(Qm),[ve,De]=Ce.useState(!0),[ct,St]=Ce.useState(!1),[Je,jt]=Ce.useState([]),[pt,Pt]=Ce.useState(),[Dt,Ht]=Ce.useState(),It=zi(zf),wt=dh(),[$t,gi]=Ce.useState(!1),[mi,Q]=ln(Lf),[J,M]=Ce.useState(!1),z=zi(Lm),B=zi(eP),[U,Y,ee,ne]=C5(Dt,pt,oe,mi,It),ie=zi($v),de=zi(ah);function Qe(Qt){return xe===$o.Google&&Qt.properties.type==="google_places"?qk(Qt):xe===$o.Mapbox&&Qt.properties.type==="mapbox_places"?Jk(Qt,z):Promise.resolve(Qt)}function Re(Qt){me===yo.TO?Qe(Qt).then(li=>{Pt(li),F.current.setDisplayText(li.properties.name)},()=>pe(!1)):me===yo.FROM&&Qe(Qt).then(li=>{Ht(li),$.current.setDisplayText(li.properties.name)},()=>pe(!1)),gi(!1),St(!1),jt([]),M(!1)}function He(Qt,li){if(ce(li),pe(!0),Qt.length===0)De(!1),gi(!1),jt([]);else{De(!0),jt(Qt);const wi=Qt.filter(Ni=>Ni.properties.type==="google_places").length>0;gi(wi),qe(Wn.MAX)}}function qe(Qt){typeof y=="function"&&y(Qt)}function Ue(){const Qt=Zv(te);me===yo.TO?(F.current.setDisplayText(Qt.properties.name),Pt(Qt)):me===yo.FROM&&($.current.setDisplayText(Qt.properties.name),Ht(Qt)),jt([]),pe(!0),De(!0),gi(!1),St(!1),M(!1)}function ot(Qt){(Dt==null?void 0:Dt.id)==="USER_POSITION"&&Qt===yo.TO||(pt==null?void 0:pt.id)==="USER_POSITION"&&Qt===yo.FROM?M(!1):M(!0)}function ht(Qt){ot(Qt)}function Tt(Qt){ce(Qt),ei(Qt),pe(!0),gi(!1),ot(Qt)}function Ct(Qt){M(!0),ce(Qt),ui(Qt),jt([]),pe(!0),gi(!1),De(!0)}function ui(Qt){Qt===yo.TO?Pt():Qt===yo.FROM&&Ht()}function ei(Qt){Qt===yo.TO?(jt([]),F.current.getValue()&&(St(!0),F.current.triggerSearch())):Qt===yo.FROM&&(jt([]),$.current.getValue()&&(St(!0),$.current.triggerSearch()))}function Ti(){(pt||Dt)&&(Dt?F.current.setDisplayText(Dt.properties.name):F.current.clear(),pt?$.current.setDisplayText(pt.properties.name):$.current.clear(),Pt(Dt),Ht(pt))}function si(){Ht(),$.current.setDisplayText(""),a()}function bi(){jt([]),St(!1),gi(!1),M(!1)}return Ce.useEffect(()=>()=>{jt([]),Pt(),Ht()},[]),Ce.useEffect(()=>{if(it){if(me===yo.FROM)$.current.setDisplayText(it.properties.name),Ht(it);else if(me===yo.TO)F.current.setDisplayText(it.properties.name),Pt(it);else return;bi(),We(null)}},[it]),Ce.useEffect(()=>{var li;qe(Wn.FIT);let Qt=!1;if((f==null?void 0:f.id)==="USER_POSITION"&&(c==null?void 0:c.id)==="USER_POSITION"&&(c=void 0),c!=null&&c.properties&&!ge&&(F.current.setDisplayText(c.properties.name),Pt(c)),f!=null&&f.properties?Dt||($.current.setDisplayText(f.properties.name),Ht(f),Qt=!0):ce(yo.FROM),w&&!((li=$.current)!=null&&li.getValue())&&te&&!Dt&&(c==null?void 0:c.id)!=="USER_POSITION"&&!Qt){const wi=Zv(te);$.current.setDisplayText(wi.properties.name),Ht(wi),pe(!0),De(!0),jt([])}},[w,c,f]),Ce.useEffect(()=>{xe===$o.Mapbox&&(gi(!1),jt(Je.filter(Qt=>Qt.properties.type!=="google_places")))},[xe]),Ce.useEffect(()=>{ge&&(Pt(ge),F.current.setDisplayText(ge.properties.name))},[ge]),Be.jsxs("div",{className:"wayfinding",ref:o,children:[Be.jsxs("div",{className:"wayfinding__directions",children:[Be.jsx("div",{className:"wayfinding__title",children:D("Directions")}),Be.jsx("button",{className:"wayfinding__close",onClick:()=>si(),"aria-label":"Close",children:Be.jsx(Sf,{})}),Be.jsxs("div",{className:"wayfinding__locations",children:[Be.jsxs("label",{className:"wayfinding__label",children:[Be.jsx("span",{children:D("Choose departure")}),Be.jsx(Zm,{ref:$,mapsindoors:!0,google:xe===$o.Google&&ie,mapbox:xe===$o.Mapbox&&ie,placeholder:D("Choose departure"),results:Qt=>He(Qt,yo.FROM),clicked:()=>Tt(yo.FROM),cleared:()=>Ct(yo.FROM),changed:()=>ht(yo.FROM)})]}),Be.jsx("button",{onClick:()=>Ti(),"aria-label":D("Switch"),className:"wayfinding__switch",children:Be.jsx(Zk,{})}),Be.jsxs("label",{className:"wayfinding__label",children:[Be.jsx("span",{children:D("Choose destination")}),Be.jsx(Zm,{ref:F,mapsindoors:!0,google:xe===$o.Google&&ie,mapbox:xe===$o.Mapbox&&ie,placeholder:D("Choose destination"),results:Qt=>He(Qt,yo.TO),clicked:()=>Tt(yo.TO),cleared:()=>Ct(yo.TO),changed:()=>ht(yo.TO)})]})]})]}),!ee&&Be.jsx("p",{className:"wayfinding__error",children:D("No route found")}),!ve&&!J&&Be.jsx("p",{className:"wayfinding__error",children:D("Nothing was found")}),te&&J&&Be.jsxs("button",{type:"button",className:"wayfinding__use-current-position",onClick:()=>Ue(),children:[Be.jsx(Xk,{}),D("My position")]}),Je.length>0&&Be.jsx("div",{className:"wayfinding__scrollable",...wt,children:Be.jsxs("div",{className:"wayfinding__results",children:[Je.map(Qt=>Be.jsx(Gm,{icon:Qt.properties.type==="google_places"||Qt.properties.type==="mapbox_places"?iP:void 0,location:Qt,locationClicked:li=>Re(li)},Qt.id)),$t&&Be.jsx("img",{className:"wayfinding__google",alt:"Powered by Google",src:Kk})]})}),!ct&&!J&&ee&&!$t&&Dt&&pt&&Be.jsxs("div",{className:"wayfinding__details",ref:j,children:[Be.jsxs("div",{className:"wayfinding__settings",children:[Be.jsxs("div",{className:"wayfinding__toggles",children:[Be.jsx(qv,{}),((Li=de==null?void 0:de.appSettings)==null?void 0:Li.includeTransitSelection)==="true"&&Be.jsx(tP,{})]}),Be.jsx("div",{className:"wayfinding__travel",children:((Ii=de==null?void 0:de.appSettings)==null?void 0:Ii.includeTravelModeSelection)!=="false"&&Be.jsxs(Q5,{selectionChanged:Qt=>Q(Qt[0].value),children:[Be.jsxs("mi-dropdown-item",{selected:!0,value:Wc.WALKING,children:[Be.jsx(F5,{}),D("Walk")]}),Be.jsxs("mi-dropdown-item",{value:Wc.DRIVING,children:[Be.jsx(U5,{}),D("Drive")]}),Be.jsxs("mi-dropdown-item",{value:Wc.BICYCLING,children:[Be.jsx(V5,{}),D("Bike")]})]})})]}),Be.jsx("hr",{}),Be.jsxs("div",{className:"wayfinding__info",children:[Be.jsxs("div",{className:"wayfinding__distance",children:[mi===Wc.WALKING&&Be.jsx(F5,{}),mi===Wc.DRIVING&&Be.jsx(U5,{}),mi===Wc.BICYCLING&&Be.jsx(V5,{}),Be.jsxs("div",{children:[D("Distance"),":"]}),Be.jsx("div",{className:"wayfinding__meters",children:U&&ne&&Be.jsx("mi-distance",{unit:B,meters:U})})]}),Be.jsxs("div",{className:"wayfinding__time",children:[Be.jsx(Gk,{}),Be.jsxs("div",{children:[D("Estimated time"),":"]}),Be.jsx("div",{className:"wayfinding__minutes",children:Y&&ne&&Be.jsx("mi-time",{translations:JSON.stringify({days:D("d"),hours:D("h"),minutes:D("min")}),seconds:Y})})]})]}),Be.jsx("button",{className:"wayfinding__button",style:{background:Ae},onClick:()=>r(),disabled:!ne,children:D("Go!")})]})]})}const JW="",eq="",nP=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M4 12H20M20 12L14 6M20 12L14 18",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),rP=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M20 12H4M4 12L10 6M4 12L10 18",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Wm=On({key:"activeStep",default:0}),qm=On({key:"substepsToggled",default:!1}),oP=On({key:"triggerSubsteps",default:!1}),$5=Ce.forwardRef(function(a,c){var Ae;const{totalSteps:f,activeStep:y,previous:w,originLocation:D,directions:o}=a,j=Ce.useRef(),{t:F}=Ho(),[$,oe]=ln(qm),[,te]=ln(oP),ge=Yc();Ce.useImperativeHandle(c,()=>({openSubsteps(){j.current.openSubsteps()},closeSubsteps(){j.current.closeSubsteps()}}));const xe={walk:F("Walk"),bike:F("Bike"),transit:F("Transit"),drive:F("Drive"),destination:F("You have arrived"),leave:F("Leave"),from:F("From"),park:F("Park"),at:F("at"),building:F("Building"),venue:F("Venue"),takeStaircaseToLevel:F("Take staircase to level"),takeLadderToLevel:F("Take the ladder to level"),takeElevatorToLevel:F("Take elevator to level"),takeEscalatorToLevel:F("Take escalator to level"),takeWheelchairLiftToLevel:F("Take wheelchair lift to level"),takeWheelchairRampToLevel:F("Take wheelchair ramp to level"),exit:F("Exit"),enter:F("Enter"),stops:F("stops"),andContinue:F("and continue"),continueStraightAhead:F("Continue straight ahead"),goLeft:F("Go left"),goSharpLeft:F("Go sharp left"),goSlightLeft:F("Go slight left"),goRight:F("Go right"),goSharpRight:F("Go sharp right"),goSlightRight:F("Go slight right"),turnAround:F("Turn around"),days:F("d"),hours:F("h"),minutes:F("min")};return Ce.useEffect(()=>{const{current:it}=j;function We(){te(!0),oe(!$)}return it.addEventListener("substepsToggled",We),()=>{it.removeEventListener("substepsToggled",We)}},[$]),Be.jsx("mi-route-instructions-step",{ref:j,"show-toggle-button":!ge,step:JSON.stringify(f[y]),translations:JSON.stringify(xe),"destination-location":o==null?void 0:o.destinationLocation.properties.name,"from-travel-mode":(w==null?void 0:w.travel_mode)??"","from-route-context":(w==null?void 0:w.route_context)??((Ae=D==null?void 0:D.properties)==null?void 0:Ae.name)??""})});$5.propTypes={totalSteps:et.array,activeStep:et.number,previous:et.object,originLocation:et.object,directions:et.object};const Y5=On({key:"isDestinationStep",default:!1});G5.propTypes={steps:et.array,onNextStep:et.func,onPreviousStep:et.func,originLocation:et.object,isOpen:et.bool};function G5({steps:r,onNextStep:a,onPreviousStep:c,originLocation:f,isOpen:y}){const{t:w}=Ho(),D=dh(),o=Ce.useRef(),[j,F]=Ce.useState(),[$,oe]=ln(Wm),[te,ge]=Ce.useState(),xe=zi(Nf),Ae=zi(qm),[,it]=ln(Y5),We=Yc();Ce.useEffect(()=>{ge(r)},[r]),Ce.useEffect(()=>{var pe,ve;y&&($===(te==null?void 0:te.length)-1&&(xe!=null&&xe.destinationLocation)?it(!0):it(!1),Ae===!1?(pe=o.current)==null||pe.closeSubsteps():Ae===!0&&((ve=o.current)==null||ve.openSubsteps()))},[y,$,te,Ae]);function me(){F(te[$]),oe($+1),a()}function ce(){F(te[$-2]),oe($-1),c()}return Be.jsx("div",{className:"route-instructions prevent-scroll",...D,children:te&&Be.jsxs(Be.Fragment,{children:[Be.jsx($5,{totalSteps:te,activeStep:$,previous:j,directions:xe,originLocation:f,ref:o}),Be.jsx("div",{className:`route-instructions__footer ${We?"route-instructions__footer--kiosk":""}`,children:Be.jsxs("div",{className:"route-instructions__actions",children:[Be.jsx("button",{className:`route-instructions__button ${We?"route-instructions__button--kiosk":""}`,onClick:()=>ce(),"aria-label":w("Previous"),disabled:$===0,children:Be.jsx(rP,{})}),Be.jsx("div",{className:"route-instructions__overview",children:w("StepYofX",{activeStep:$+1,totalSteps:te.length})}),Be.jsx("button",{className:`route-instructions__button ${We?"route-instructions__button--kiosk":""}`,onClick:()=>me(),"aria-label":w("Next"),disabled:$===te.length-1,children:Be.jsx(nP,{})})]})})]})})}const Z5=Object.freeze({minZoom:10});let Xo;Xv.propTypes={isOpen:et.bool,onBack:et.func,onSetSize:et.func,onRouteFinished:et.func,snapPointSwipedByUser:et.string};function Xv({isOpen:r,onBack:a,onSetSize:c,onRouteFinished:f,snapPointSwipedByUser:y}){const{t:w}=Ho(),D=Ce.useRef(),[o,j]=Ce.useState(null),F=Ce.useRef(null),[$,oe]=Ce.useState(),te=zi(As),ge=zi(Lf),xe=zi(Nf),[,Ae]=ln(Wm),[it,We]=ln(qm),me=zi(Aa),ce=ra(),[,pe]=ln(Ym),ve=zi(Y5),De=zi(Ea),ct=Yc(),St=zi(Hm),Je=zi(O5),jt=zi(ul),pt=zi(Nm);Ce.useEffect(()=>()=>{j(null)},[]),Ce.useEffect(()=>{if(j(null),r&&xe){oe(xe.totalTime);const z=Math.min(window.innerHeight,window.innerWidth)*.06;Xo==null||Xo.setRoute(null),Xo=null,Promise.all([Pt(z),Dt(z)]).then(([B,U])=>{Xo=new window.mapsindoors.directions.DirectionsRenderer({mapsIndoors:te,fitBounds:ct?!1:{top:z,bottom:B,left:U,right:z}}),Xo.setRoute(xe.directionsResult).then(()=>{Xo.setStepIndex(0)}),F.current.location=xe.destinationLocation,xe.destinationLocation.id==="USER_POSITION"?j(null):j(te.getDisplayRule(xe.destinationLocation)),mi(null)})}},[r,xe,te,ge]);function Pt(z){return new Promise(B=>{if(ce)me?If().then(U=>B(U)):B(z);else return rh().then(U=>B(U))})}function Dt(z){return new Promise(B=>{ce?me?B(z):$c().then(U=>B(U)):B(z)})}Ce.useEffect(()=>{!r&&Xo&&($t(),mi(Z5.minZoom))},[r]);function Ht(){return xe?xe.directionsResult.legs.reduce((z,B)=>{for(const U in B.steps){const Y=B.steps[U];z.push(Y)}return z},[]):[]}function It(){Xo&&Xo.nextStep()}function wt(){Xo&&Xo.previousStep()}function $t(){Xo==null||Xo.setRoute(null),Xo=null}function gi(){Ae(0),We(!1),J(Wn.FIT)}function mi(z){pt==="mapbox"?te.getMapView().getMap().setMinZoom(z):pt==="google"&&te.getMapView().getMap().setOptions({minZoom:z})}function Q(){gi(),$t(),a()}function J(z){typeof c=="function"&&c(z)}function M(){const z=`${Je}&directionsFrom=${me.id}&directionsTo=${jt.id}`;pe(z)}return Ce.useEffect(()=>(D.current=requestAnimationFrame(()=>{J(it?Wn.MAX:Wn.FIT)}),()=>{D.current&&cancelAnimationFrame(D.current)}),[it]),Ce.useEffect(()=>{r&&y&&We(y===Wn.MAX)},[r,y]),Be.jsxs("div",{className:"directions",style:{display:ct?"block":"grid"},children:[Be.jsxs("div",{className:"directions__steps",children:[Be.jsx("div",{className:"directions__minutes",children:$&&Be.jsx("mi-time",{translations:JSON.stringify({days:w("d"),hours:w("h"),minutes:w("min")}),seconds:$})}),Be.jsx(G5,{steps:Ht(),originLocation:xe==null?void 0:xe.originLocation,onNextStep:()=>It(),isOpen:r,onPreviousStep:()=>wt()})]}),ct&&Be.jsxs(Be.Fragment,{children:[Be.jsx("hr",{}),Be.jsxs("div",{className:"directions__kiosk",children:[Be.jsx(qv,{onAccessibilityChanged:()=>gi()}),Be.jsxs("button",{className:"directions__qr-code",onClick:()=>M(),children:[Be.jsx(j5,{}),w("Scan QR code")]})]})]}),Be.jsxs("div",{className:"directions__actions",children:[Be.jsx("div",{className:"directions__details",children:(xe==null?void 0:xe.destinationLocation)&&Be.jsxs("div",{className:"directions__info",children:[o&&xe.destinationLocation.id!=="USER_POSITION"&&Be.jsx("div",{className:"directions__icon",children:Be.jsx("img",{alt:"",src:o.icon.src?o.icon.src:o.icon})}),Be.jsxs("div",{className:"directions__content",children:[Be.jsx("div",{className:"directions__name",children:xe==null?void 0:xe.destinationLocation.properties.name}),Be.jsx("mi-location-info",{ref:F,"show-external-id":St})]})]})}),ve?Be.jsx("button",{className:"directions__finish",onClick:()=>f(),style:{background:De},children:w("Finish route")}):Be.jsx("button",{className:"directions__cancel",onClick:()=>Q(),children:w("Cancel route")})]})]})}const tq="",W5=On({key:"useKeyboard",default:!1}),q5=Ce.forwardRef(function(a,c){const{searchInputElement:f}=a,y=Ce.useRef(),w=zi(qc);return Ce.useImperativeHandle(c,()=>({clearInputField(){y.current.clearInputField()}})),Ce.useEffect(()=>{const{current:D}=y;f&&(D.inputElement=f)},[f]),Be.jsx("mi-keyboard",{language:w,ref:y})});q5.propTypes={searchInputElement:et.instanceOf(HTMLInputElement)};const Km=On({key:"searchResults",default:[]}),Jv=On({key:"selectedCategory",default:void 0}),iq="";function sP(){return new Promise(r=>{const a=document.querySelector(".chip--active");if(a)r(a);else{const c=new MutationObserver(()=>{const f=document.querySelector(".chip--active");f&&(c.disconnect(),r(f))});c.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}const aP=On({key:"isBottomSheetLoaded",default:!1}),K5=On({key:"category",default:void 0}),X5=r=>en.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M17.5 20.9999L10.5 13.9999L17.5 6.99994",stroke:"#1F2937",strokeWidth:2.33333,strokeLinecap:"round",strokeLinejoin:"round"})),lP=r=>en.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M10.5 7.00006L17.5 14.0001L10.5 21.0001",stroke:"#1F2937",strokeWidth:2.33333,strokeLinecap:"round",strokeLinejoin:"round"}));ex.propTypes={onSetSize:et.func,getFilteredLocations:et.func,searchFieldRef:et.object,isOpen:et.bool,topLevelCategory:et.bool,handleBack:et.func,selectedCategoriesArray:et.object,categoryOrientation:et.oneOf(["horizontal","vertical"])};function ex({onSetSize:r,getFilteredLocations:a,searchFieldRef:c,isOpen:f,topLevelCategory:y,handleBack:w,selectedCategoriesArray:D,categoryOrientation:o}){const j=zi(Tf),F=ra(),[$,oe]=ln(Jv),[,te]=ln(Km),[,ge]=ln(zm),xe=dh(),[Ae,it]=Ce.useState(),We=zi(aP),me=zi(K5),ce=zi(As),pe=N5(ce,f),[ve,De]=Ce.useState([]),[ct,St]=Ce.useState([]),{t:Je}=Ho(),jt=Yc(),pt=Ce.useRef(null),[Pt,Dt]=Ce.useState(!1),[Ht,It]=Ce.useState(!1),wt=z=>{mi&&pt.current&&pt.current.scrollBy({left:z==="left"?-200:200,behavior:"smooth"})},$t=()=>{if(pt.current){const{scrollLeft:z,scrollWidth:B,clientWidth:U}=pt.current,Y=z<=0,ee=z>=B-U-1;Dt(!Y),It(!ee)}},gi=!y&&ve.length===0,mi=jt&&o==="horizontal"&&!gi;Ce.useEffect(()=>{if(!mi)return;const z=pt.current;if(z)return $t(),z.addEventListener("scroll",$t),()=>{z.removeEventListener("scroll",$t)}},[mi,ve.length]);const Q=`categories prevent-scroll${jt?` categories--kiosk-${o||"vertical"}`:""}`;function J(z){typeof r=="function"&&r(z)}function M(z){oe(z),$===z?(te([]),oe(null),ge([]),c.current.getValue()&&c.current.triggerSearch()):c.current.getValue()?c.current.triggerSearch():a(z)}return Ce.useEffect(()=>{var z;pe&&$&&(oe(null),te([]),ge([]),(z=c.current)!=null&&z.getValue()&&c.current.clear())},[pe]),Ce.useEffect(()=>{$&&(sP().then(z=>it(z)),J(Wn.MAX))},[$]),Ce.useEffect(()=>{Ae&&me!==void 0&&(F||!F&&We)&&Ae.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[Ae,me,We]),Ce.useEffect(()=>{var U,Y,ee;let z=[];if(y){const ne=j.flatMap(([,ie])=>ie.childKeys||[]);z=j.filter(([ie])=>!ne.includes(ie))}else if($){const ne=(U=j.find(([de])=>de===$))==null?void 0:U[1],ie=(ne==null?void 0:ne.childKeys)||[];z=j.filter(([de])=>ie.includes(de))}De(z);const B=(ee=(Y=j.find(([ne])=>ne===$))==null?void 0:Y[1])==null?void 0:ee.displayName;St(B)},[j]),Be.jsx("div",{className:Q,...xe,children:j.length>0&&Be.jsxs(Be.Fragment,{children:[!y&&Be.jsxs("div",{className:"categories__nav",children:[Be.jsx("button",{"aria-label":Je("Back"),type:"button",className:"categories__nav-button",onClick:w,children:Be.jsx(X5,{})}),Be.jsx("div",{children:ct})]}),Be.jsxs("div",{className:"categories__row",children:[mi&&Be.jsx("div",{className:"categories__chevron categories__chevron--left",children:Be.jsx("button",{"aria-label":Je("Previous categories"),type:"button",disabled:!Pt,onClick:()=>wt("left"),children:Be.jsx(X5,{})})}),Be.jsx("div",{className:"categories__list",ref:jt?pt:void 0,children:ve.map(([z,B])=>!y&&D.current.length!==1?null:Be.jsx("div",{className:"categories__category",children:Be.jsxs("button",{onClick:()=>y?M(z):a(z),children:[Be.jsx("img",{src:B.iconUrl,alt:""}),B.displayName]})},z))}),mi&&Be.jsx("div",{className:"categories__chevron categories__chevron--right",children:Be.jsx("button",{"aria-label":Je("Next categories"),type:"button",disabled:!Ht,onClick:()=>wt("right"),children:Be.jsx(lP,{})})})]})]})})}const cP=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{opacity:.12,d:"M3 7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H16.2C17.8802 3 18.7202 3 19.362 3.32698C19.9265 3.6146 20.3854 4.07354 20.673 4.63803C21 5.27976 21 6.11984 21 7.8V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8Z",fill:"#111827",style:{fill:"#111827",fill:"color(display-p3 0.0667 0.0941 0.1529)",fillOpacity:1}}),en.createElement("path",{d:"M12 16V12M12 8H12.01M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z",stroke:"#111827",style:{stroke:"#111827",stroke:"color(display-p3 0.0667 0.0941 0.1529)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Xm=On({key:"isLegendDialogVisible",default:!1}),J5=pm({key:"legendFields",get:({get:r})=>{const a=r(Aa);if(!(a!=null&&a.properties.fields))return;const c=[];for(const y of Object.keys(a.properties.fields)){const w=parseInt(y.charAt(0));if(!Number.isInteger(w))continue;const D=c.find(F=>F.index===w),o=y.toLowerCase().includes("legendheading"),j=y.toLowerCase().includes("legendcontent");if(D)o?D.heading=a.properties.fields[y].value:j&&(D.content=a.properties.fields[y].value);else{const F={index:w,heading:o?a.properties.fields[y].value:null,content:j?a.properties.fields[y].value:null};c.push(F)}}return c.sort((y,w)=>y.index-w.index)}}),tx=On({key:"initialVenueName",default:null});ix.propTypes={categories:et.array,onSetSize:et.func,isOpen:et.bool};function ix({onSetSize:r,isOpen:a}){const c=zi(ah),{t:f}=Ho(),y=Ce.useRef(),w=Ce.useRef(),D=Ce.useRef(),o=Ce.useRef(),j=Ce.useRef(),F=100,[$,oe]=Ce.useState(!0),[te,ge]=ln(Km),xe=zi(Tf),Ae=zi(W5),[it,We]=Ce.useState(!1),[me,ce]=ln(Jv),pe=dh(),[ve,De]=Ce.useState(),ct=zi(As),[,St]=ln(zm),[,Je]=ln(ul),[,jt]=ln(Vm),[pt,Pt]=ln($l),Dt=zi(qc),Ht=ra(),It=zi(Aa),[wt,$t]=Ce.useState(!1),gi=zi(Gv),mi=Yc(),[,Q]=ln(Xm),[J,M]=Ce.useState(!1),z=zi(J5),B=zi($m),U=zi(Df),Y=zi(tx),[ee,ne]=Ce.useState(!1),ie=Ce.useRef([]),[de,Qe]=Ce.useState([]),[Re,He]=Ce.useState(!1);function qe(){var li,wi,Ni;ie.current.length===1?(ce(null),ge([]),St([]),ot(Wn.FIT),ne(!0),((wi=(li=o.current)==null?void 0:li.getValue())==null?void 0:wi.trim())?o.current.triggerSearch():(Ni=o.current)==null||Ni.clear(),ie.current.pop()):(ie.current.pop(),ce(ie.current[0]))}function Ue(li){var wi;ie.current.includes(li)||ie.current.push(li),me&&(ce([]),ge([]),St([])),ce(li),window.mapsindoors.services.LocationsService.getLocations({categories:li,venue:B||(wi=U.find(Ni=>Ni.name.toLowerCase()===pt.toLowerCase()))==null?void 0:wi.name}).then(Ni=>Tt(Ni,!0))}function ot(li){typeof r=="function"&&r(li)}function ht(li){return me?[...li].sort((wi,Ni)=>{var qi,tn;return(((qi=wi.properties)==null?void 0:qi.name)||"").localeCompare(((tn=Ni.properties)==null?void 0:tn.name)||"")}):li}function Tt(li,wi=!1){var qi;const Ni=li.slice(0,F);ot(Wn.MAX),ge(Ni),St(Ni),We(Ni.length===0),li&&wi&&Ct(li),mi&&((qi=y.current)==null||qi.addEventListener("transitionend",()=>{var tn;(tn=w==null?void 0:w.current)==null||tn.updateScrollButtons()},{once:!0}))}function Ct(li){if(!ct.goTo)return;const wi=ct.getFloor(),Ni={type:"FeatureCollection",features:li.filter(qi=>parseInt(qi.properties.floor,10)===parseInt(wi,10)).filter(qi=>qi.properties.venueId.toLowerCase()===pt.toLowerCase()).map(qi=>({type:"Feature",geometry:qi.geometry,properties:qi.properties}))};Ni.features.length>0&&Promise.all([bi(),Li()]).then(([qi,tn])=>{ct.goTo(Ni,{maxZoom:22,padding:{bottom:qi,left:tn,top:0,right:0}})})}function ui(){ge([]),We(!1),me&&Ue(me),St([]),Lr(j.current)||j.current.clearInputField()}function ei(){oe(!1),o.current.getInputField();const li=y.current.closest(".sheet");li?li.addEventListener("transitionend",()=>{o.current.focusInput(),ne(!0)},{once:!0}):(o.current.focusInput(),ne(!0))}function Ti(li){De(li)}function si(li){Je(li),li.properties.venueId.toLowerCase()!==pt.toLowerCase()&&(Pt(li.properties.venueId),jt(!0));const wi=ct.getFloor(),Ni=li.properties.floor;Ni!==wi&&ct.setFloor(Ni),Promise.all([bi(),Li()]).then(([qi,tn])=>{ct.goTo(li,{maxZoom:22,padding:{bottom:qi,left:tn,top:0,right:0}})})}function bi(){return new Promise(li=>{Ht?It?If().then(wi=>li(wi)):li(0):li(200)})}function Li(){return new Promise(li=>{Ht?It?li(0):$c().then(wi=>li(wi)):li(0)})}function Ii(){if(te.length>0){let li;return Ht?li=document.querySelector(".mapsindoors-map").clientHeight*.6+"px":li="100%",{display:"flex",flexDirection:"column",maxHeight:li,overflow:"hidden"}}}function Qt(){return mi&&Re}return Ce.useEffect(()=>{const li=[".search__info",".search__back-button",".categories",".sheet__content"],wi=[".mi-floor-selector",".view-mode-switch",".mi-my-position",".view-selector__toggle-button",".building-list",".mapboxgl-ctrl-bottom-right",".gmnoprint",".language-selector-portal"],Ni=qi=>{const tn=li.some(yt=>qi.target.closest(yt)),rn=wi.some(yt=>qi.target.closest(yt)),Cn=qi.target.closest(".search__results");tn?(ot(Wn.MAX),D.current=requestAnimationFrame(()=>{ne(!0)})):!Cn&&!rn&&(ne(!1),ot(Wn.MIN),ce(null),ge([]),St([]),ie.current=[])};return a?D.current=requestAnimationFrame(()=>{document.addEventListener("click",Ni)}):document.removeEventListener("click",Ni),()=>{document.removeEventListener("click",Ni),D.current&&cancelAnimationFrame(D.current)}},[a]),Ce.useEffect(()=>()=>{De()},[]),Ce.useEffect(()=>{me&&pt!==Y&&(ge([]),ce(null))},[pt]),Ce.useEffect(()=>{me&&window.mapsindoors.services.LocationsService.once("update_completed",()=>{o.current.triggerSearch()})},[Dt]),Ce.useEffect(()=>(ct==null||ct.on("mouseenter",Ti),()=>{ct==null||ct.off("mouseenter",Ti)}),[ct]),Ce.useEffect(()=>{if(a&&mi&&te.length>0){const li=document.querySelector(".mapsindoors-map .search__results");w.current.scrollContainerElementRef=li}},[te,a]),Ce.useEffect(()=>{if(Ae){const li=wi=>{wi.target.closest("mi-keyboard")||wi.target.tagName.toUpperCase()==="MI-SEARCH"||wi.target.tagName.toUpperCase()==="INPUT"?$t(!0):$t(!1)};return window.addEventListener("click",li,!1),()=>{window.removeEventListener("click",li,!1)}}},[Ae]),Ce.useEffect(()=>{me&&Ue(me)},[me]),Ce.useEffect(()=>{It&&M(z.length>0)},[It]),Ce.useEffect(()=>{var wi,Ni;const li=((Ni=(wi=xe.find(([qi])=>qi===me))==null?void 0:wi[1])==null?void 0:Ni.childKeys)||[];Qe(li)},[xe,me]),Ce.useEffect(()=>{var li,wi;He(((li=c==null?void 0:c.appSettings)==null?void 0:li.areHorizontalCategoriesEnabled)===!0||((wi=c==null?void 0:c.appSettings)==null?void 0:wi.areHorizontalCategoriesEnabled)==="true")},[c]),Be.jsxs("div",{className:"search",ref:y,style:Ii(),children:[Be.jsxs("div",{className:"search__info",style:{gridTemplateColumns:mi&&J?"min-content 1fr":"auto"},children:[mi&&J&&Be.jsx("button",{className:"search__legend",onClick:()=>Q(!0),children:Be.jsx(cP,{})}),Be.jsxs("label",{className:"search__label",children:[Be.jsx("span",{children:f("Search by name, category, building...")}),Be.jsx(Zm,{ref:o,mapsindoors:!0,placeholder:f("Search by name, category, building..."),results:li=>Tt(li),clicked:()=>ei(),cleared:()=>ui(),category:me,disabled:$})]})]}),(Qt()||ee)&&!it&&xe.length>0&&te.length===0&&Be.jsx(ex,{onSetSize:r,searchFieldRef:o,getFilteredLocations:li=>Ue(li),isOpen:!!me,topLevelCategory:!0,categoryOrientation:Re?"horizontal":"vertical"}),it&&Be.jsxs("p",{className:"search__error",children:[" ",f("Nothing was found")]}),te.length>0&&Be.jsxs("div",{className:"search__results prevent-scroll",...pe,children:[me&&Be.jsx(ex,{handleBack:qe,getFilteredLocations:li=>Ue(li),onLocationClicked:si,childKeys:de,topLevelCategory:!1,selectedCategoriesArray:ie,categoryOrientation:Re?"horizontal":"vertical"}),ht(te).map(li=>Be.jsx(Gm,{location:li,locationClicked:()=>si(li),isHovered:(li==null?void 0:li.id)===(ve==null?void 0:ve.id)},li.id))]}),wt&&Ht&&Be.jsx(q5,{ref:j,searchInputElement:gi}),a&&mi&&te.length>0&&os.createPortal(Be.jsx("div",{className:"search__scroll-buttons",children:Be.jsx("mi-scroll-buttons",{ref:w})}),document.querySelector(".mapsindoors-map"))]})}const nq="";nx.propTypes={onLocationClick:et.func.isRequired,onBack:et.func.isRequired,locations:et.arrayOf(et.object),onSetSize:et.func};function nx({onBack:r,onLocationClick:a,locations:c,onSetSize:f}){const{t:y}=Ho(),w=dh();function D(o){typeof f=="function"&&f(o)}return Ce.useEffect(()=>{D(Wn.FIT)},[]),Be.jsxs("div",{className:"locations-list",children:[Be.jsxs("div",{className:"locations-list__header",children:[Be.jsxs("div",{className:"locations-list__title",children:[c==null?void 0:c.length," ",y("Locations")]}),Be.jsx("button",{className:"locations-list__close",onClick:()=>r(),"aria-label":y("Close"),children:Be.jsx(Sf,{})})]}),Be.jsx("div",{className:"locations-list__scrollable prevent-scroll",...w,children:Be.jsx("div",{className:"locations-list__list",children:c==null?void 0:c.map(o=>Be.jsx(Gm,{location:o,locationClicked:j=>a(j)},o.id))})})]})}eI.propTypes={directionsFromLocation:et.string,directionsToLocation:et.string,pushAppView:et.func.isRequired,currentAppView:et.string,appViews:et.object,onRouteFinished:et.func.isRequired};function eI({directionsFromLocation:r,directionsToLocation:a,pushAppView:c,currentAppView:f,appViews:y,onRouteFinished:w}){const D=Ce.useRef(),o=Ce.useRef(),j=Ce.useRef(),F=Ce.useRef(),$=Ce.useRef(),oe=Ce.useRef(),[te,ge]=ln(ul),[xe,Ae]=Ce.useState(!1),[it,We]=ln(Om),[,me]=ln(km);Ce.useEffect(()=>{r&&a&&f===y.DIRECTIONS||(r&&a||r?c(y.WAYFINDING):te?c(y.LOCATION_DETAILS,te):(it==null?void 0:it.length)>1?c(y.EXTERNALIDS):(it==null?void 0:it.length)===1?(ge(it[0]),me(it[0].id)):c(y.SEARCH))},[te,r,a,it]),Ce.useEffect(()=>{if(te){const De=te.properties.imageURL||te.properties.description||te.properties.additionalDetails||Object.keys(te.properties.categories).length>0;Ae(De)}},[te]);function ce(){(it==null?void 0:it.length)>1?(c(y.EXTERNALIDS),ge()):(it==null?void 0:it.length)===1?(c(y.SEARCH),ge(),We([]),o.current.setSnapPoint(Wn.MIN)):(c(y.SEARCH),ge(),o.current.setSnapPoint(Wn.MIN))}function pe(){c(y.SEARCH),ge(),We([])}const ve=[Be.jsx(hh,{minimizedHeight:80,initialSnapPoint:Wn.MIN,isOpen:f===y.SEARCH,ref:o,children:Be.jsx(ix,{isOpen:f===y.SEARCH,onSetSize:De=>o.current.setSnapPoint(De)})},"SEARCH"),Be.jsx(hh,{minimizedHeight:200,isOpen:f===y.EXTERNALIDS,initialSnapPoint:Wn.MIN,ref:j,children:Be.jsx(nx,{onSetSize:De=>j.current.setSnapPoint(De),onBack:()=>pe(),locations:it,onLocationClick:De=>ge(De)})},"EXTERNALIDS"),Be.jsx(hh,{minimizedHeight:xe?180:136,initialSnapPoint:Wn.MIN,isOpen:f===y.LOCATION_DETAILS,ref:F,children:Be.jsx(Yv,{onSetSize:De=>F.current.setSnapPoint(De),onStartWayfinding:()=>c(y.WAYFINDING),onBack:()=>ce(),onStartDirections:()=>c(y.DIRECTIONS),isOpen:f===y.LOCATION_DETAILS})},"LOCATION_DETAILS"),Be.jsx(hh,{minimizedHeight:190,initialSnapPoint:Wn.FIT,isOpen:f===y.WAYFINDING,ref:$,children:Be.jsx(Kv,{onSetSize:De=>$.current.setSnapPoint(De),onStartDirections:()=>c(y.DIRECTIONS),directionsToLocation:a,directionsFromLocation:r,onBack:()=>c(te?y.LOCATION_DETAILS:y.SEARCH),isActive:f===y.WAYFINDING})},"WAYFINDING"),Be.jsx(hh,{minimizedHeight:273,isOpen:f===y.DIRECTIONS,initialSnapPoint:Wn.FIT,ref:oe,children:Be.jsx(Xv,{onSetSize:De=>oe.current.setSnapPoint(De),isOpen:f===y.DIRECTIONS,onBack:()=>c(y.WAYFINDING),onRouteFinished:()=>w()})},"DIRECTIONS")];return Be.jsx("div",{ref:D,className:"bottom-sheets",children:Be.jsx(M5.Provider,{value:D,children:ve})})}const uP={SEARCH:void 0,EXTERNALIDS:"EXTERNALIDS",VENUE_SELECTOR:"VENUE_SELECTOR",LOCATION_DETAILS:"LOCATION_DETAILS",WAYFINDING:"WAYFINDING",DIRECTIONS:"DIRECTIONS"},hP=()=>{const[r,a]=Ce.useState(void 0),[c,f]=Ce.useState(),[y,w]=Ce.useState(null);Ce.useEffect(()=>{function F($){var oe,te;a((oe=$.state)==null?void 0:oe.value),f((te=$.state)==null?void 0:te.payload)}return window.addEventListener("popstate",F),()=>{window.removeEventListener("popstate",F)}},[]);const D=(F,$)=>{window.history.pushState({value:F,payload:$},""),a(F),y===null&&w({value:F,payload:$})};return[D,()=>{window.history.back()},r,c,uP,()=>{D(y.value,y.payload)}]},dP=On({key:"showQRCodeDialog",default:!1});function fP(){const r=zi(tx),[,a]=ln($l),c=ho(Wm),f=ho(ul),y=ho(Nf),w=ho(Qm),D=ho(Vm),o=ho(Mf),j=ho(dP),F=ho(qm),$=ho(Lf),oe=ho(Km),te=ho(zf),ge=ho(Xm),xe=ho(U4),Ae=ho(Iv);return()=>{c(),f(),y(),w(),D(),o(),j(),F(),$(),oe(),te(),ge(),xe(),Ae(),r&&a(r)}}const rq="";fh.propTypes={children:et.node,isOpen:et.bool};function fh({children:r,isOpen:a}){const[c,f]=Ce.useState(!1),y=zi(Aa),w=Ce.useRef(),D=Ce.useRef();return Ce.useEffect(()=>{if(!D)return;const o=new MutationObserver(()=>{var $;const j=D.current.clientHeight,F=($=w.current)==null?void 0:$.clientHeight;f(j>F)});return o.observe(D.current,{childList:!0,subtree:!0}),()=>{o.disconnect()}},[D]),Be.jsx("div",{ref:w,className:`modal ${a?"modal--open":""} ${c?"modal--full":""} ${y?"modal--kiosk":""}`,children:Be.jsx("div",{ref:D,className:"modal__content",children:r})})}tI.propTypes={directionsFromLocation:et.string,directionsToLocation:et.string,pushAppView:et.func,currentAppView:et.string,appViews:et.object,filteredLocationsByExternalIDs:et.array,onRouteFinished:et.func};function tI({directionsFromLocation:r,directionsToLocation:a,pushAppView:c,currentAppView:f,appViews:y,onRouteFinished:w}){const[D,o]=ln(ul),[j,F]=ln(Om),[,$]=ln(km),oe=zi(Aa);Ce.useEffect(()=>{r&&a&&f===y.DIRECTIONS||(r&&a||r?c(y.WAYFINDING):D?c(y.LOCATION_DETAILS,D):(j==null?void 0:j.length)>1?c(y.EXTERNALIDS):(j==null?void 0:j.length)===1?(o(j[0]),$(j[0].id)):c(y.SEARCH))},[D,r,a,j]);function te(){(j==null?void 0:j.length)>1?(c(y.EXTERNALIDS),o()):(j==null?void 0:j.length)===1?(c(y.SEARCH),o(),F([])):(c(y.SEARCH),o())}function ge(){c(y.SEARCH),o(),F([])}function xe(){c(oe?y.LOCATION_DETAILS:y.WAYFINDING)}const Ae=[Be.jsx(fh,{isOpen:f===y.SEARCH,children:Be.jsx(ix,{isOpen:f===y.SEARCH})},"SEARCH"),Be.jsx(fh,{isOpen:f===y.EXTERNALIDS,children:Be.jsx(nx,{onBack:()=>ge(),locations:j,onLocationClick:it=>o(it)})},"EXTERNALIDS"),Be.jsx(fh,{isOpen:f===y.LOCATION_DETAILS,children:Be.jsx(Yv,{onStartWayfinding:()=>c(y.WAYFINDING),onBack:()=>te(),onStartDirections:()=>c(y.DIRECTIONS),isOpen:f===y.LOCATION_DETAILS})},"LOCATION_DETAILS"),Be.jsx(fh,{isOpen:f===y.WAYFINDING,children:Be.jsx(Kv,{onStartDirections:()=>c(y.DIRECTIONS),directionsToLocation:a,directionsFromLocation:r,onBack:()=>c(D?y.LOCATION_DETAILS:y.SEARCH),isActive:f===y.WAYFINDING})},"WAYFINDING"),Be.jsx(fh,{isOpen:f===y.DIRECTIONS,children:Be.jsx(Xv,{isOpen:f===y.DIRECTIONS,onBack:()=>xe(),onRouteFinished:()=>w()})},"DIRECTIONS")];return Be.jsx("div",{children:Ae})}const iI=r=>{const[a,c]=Ce.useState(),f=zi(Cm),y=zi(k4);return Ce.useEffect(()=>{y&&r&&(r==="USER_POSITION"&&!f?(c("USER_POSITION_PENDING"),y.watchPosition()):r!=="USER_POSITION"&&window.mapsindoors.services.LocationsService.getLocation(r).then(w=>c(w)),f&&r==="USER_POSITION"&&c(Zv(f)))},[r,f,y]),a},pP=On({key:"gmMapId",default:null}),oq="";function gP(){const r=zi(Mf),a=Ce.useRef();return Ce.useEffect(()=>{var c;(c=a.current)==null||c.classList.add("notification"),r?a.current.push(r.text,r.type,!0):a.current.clearAll()},[r]),Be.jsx("mi-notification",{ref:a,position:"top-center"})}const sq="";var Of={},mP=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},nI={},Ss={};let rx;const yP=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Ss.getSymbolSize=function(a){if(!a)throw new Error('"version" cannot be null or undefined');if(a<1||a>40)throw new Error('"version" should be in range from 1 to 40');return a*4+17},Ss.getSymbolTotalCodewords=function(a){return yP[a]},Ss.getBCHDigit=function(r){let a=0;for(;r!==0;)a++,r>>>=1;return a},Ss.setToSJISFunction=function(a){if(typeof a!="function")throw new Error('"toSJISFunc" is not a valid function.');rx=a},Ss.isKanjiModeEnabled=function(){return typeof rx<"u"},Ss.toSJIS=function(a){return rx(a)};var Jm={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function a(c){if(typeof c!="string")throw new Error("Param is not a string");switch(c.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+c)}}r.isValid=function(f){return f&&typeof f.bit<"u"&&f.bit>=0&&f.bit<4},r.from=function(f,y){if(r.isValid(f))return f;try{return a(f)}catch{return y}}})(Jm);function rI(){this.buffer=[],this.length=0}rI.prototype={get:function(r){const a=Math.floor(r/8);return(this.buffer[a]>>>7-r%8&1)===1},put:function(r,a){for(let c=0;c<a;c++)this.putBit((r>>>a-c-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const a=Math.floor(this.length/8);this.buffer.length<=a&&this.buffer.push(0),r&&(this.buffer[a]|=128>>>this.length%8),this.length++}};var _P=rI;function jf(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}jf.prototype.set=function(r,a,c,f){const y=r*this.size+a;this.data[y]=c,f&&(this.reservedBit[y]=!0)},jf.prototype.get=function(r,a){return this.data[r*this.size+a]},jf.prototype.xor=function(r,a,c){this.data[r*this.size+a]^=c},jf.prototype.isReserved=function(r,a){return this.reservedBit[r*this.size+a]};var vP=jf,oI={};(function(r){const a=Ss.getSymbolSize;r.getRowColCoords=function(f){if(f===1)return[];const y=Math.floor(f/7)+2,w=a(f),D=w===145?26:Math.ceil((w-13)/(2*y-2))*2,o=[w-7];for(let j=1;j<y-1;j++)o[j]=o[j-1]-D;return o.push(6),o.reverse()},r.getPositions=function(f){const y=[],w=r.getRowColCoords(f),D=w.length;for(let o=0;o<D;o++)for(let j=0;j<D;j++)o===0&&j===0||o===0&&j===D-1||o===D-1&&j===0||y.push([w[o],w[j]]);return y}})(oI);var sI={};const xP=Ss.getSymbolSize,aI=7;sI.getPositions=function(a){const c=xP(a);return[[0,0],[c-aI,0],[0,c-aI]]};var lI={};(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const a={N1:3,N2:3,N3:40,N4:10};r.isValid=function(y){return y!=null&&y!==""&&!isNaN(y)&&y>=0&&y<=7},r.from=function(y){return r.isValid(y)?parseInt(y,10):void 0},r.getPenaltyN1=function(y){const w=y.size;let D=0,o=0,j=0,F=null,$=null;for(let oe=0;oe<w;oe++){o=j=0,F=$=null;for(let te=0;te<w;te++){let ge=y.get(oe,te);ge===F?o++:(o>=5&&(D+=a.N1+(o-5)),F=ge,o=1),ge=y.get(te,oe),ge===$?j++:(j>=5&&(D+=a.N1+(j-5)),$=ge,j=1)}o>=5&&(D+=a.N1+(o-5)),j>=5&&(D+=a.N1+(j-5))}return D},r.getPenaltyN2=function(y){const w=y.size;let D=0;for(let o=0;o<w-1;o++)for(let j=0;j<w-1;j++){const F=y.get(o,j)+y.get(o,j+1)+y.get(o+1,j)+y.get(o+1,j+1);(F===4||F===0)&&D++}return D*a.N2},r.getPenaltyN3=function(y){const w=y.size;let D=0,o=0,j=0;for(let F=0;F<w;F++){o=j=0;for(let $=0;$<w;$++)o=o<<1&2047|y.get(F,$),$>=10&&(o===1488||o===93)&&D++,j=j<<1&2047|y.get($,F),$>=10&&(j===1488||j===93)&&D++}return D*a.N3},r.getPenaltyN4=function(y){let w=0;const D=y.data.length;for(let j=0;j<D;j++)w+=y.data[j];return Math.abs(Math.ceil(w*100/D/5)-10)*a.N4};function c(f,y,w){switch(f){case r.Patterns.PATTERN000:return(y+w)%2===0;case r.Patterns.PATTERN001:return y%2===0;case r.Patterns.PATTERN010:return w%3===0;case r.Patterns.PATTERN011:return(y+w)%3===0;case r.Patterns.PATTERN100:return(Math.floor(y/2)+Math.floor(w/3))%2===0;case r.Patterns.PATTERN101:return y*w%2+y*w%3===0;case r.Patterns.PATTERN110:return(y*w%2+y*w%3)%2===0;case r.Patterns.PATTERN111:return(y*w%3+(y+w)%2)%2===0;default:throw new Error("bad maskPattern:"+f)}}r.applyMask=function(y,w){const D=w.size;for(let o=0;o<D;o++)for(let j=0;j<D;j++)w.isReserved(j,o)||w.xor(j,o,c(y,j,o))},r.getBestMask=function(y,w){const D=Object.keys(r.Patterns).length;let o=0,j=1/0;for(let F=0;F<D;F++){w(F),r.applyMask(F,y);const $=r.getPenaltyN1(y)+r.getPenaltyN2(y)+r.getPenaltyN3(y)+r.getPenaltyN4(y);r.applyMask(F,y),$<j&&(j=$,o=F)}return o}})(lI);var e0={};const Gl=Jm,t0=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i0=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e0.getBlocksCount=function(a,c){switch(c){case Gl.L:return t0[(a-1)*4+0];case Gl.M:return t0[(a-1)*4+1];case Gl.Q:return t0[(a-1)*4+2];case Gl.H:return t0[(a-1)*4+3];default:return}},e0.getTotalCodewordsCount=function(a,c){switch(c){case Gl.L:return i0[(a-1)*4+0];case Gl.M:return i0[(a-1)*4+1];case Gl.Q:return i0[(a-1)*4+2];case Gl.H:return i0[(a-1)*4+3];default:return}};var cI={},n0={};const kf=new Uint8Array(512),r0=new Uint8Array(256);(function(){let a=1;for(let c=0;c<255;c++)kf[c]=a,r0[a]=c,a<<=1,a&256&&(a^=285);for(let c=255;c<512;c++)kf[c]=kf[c-255]})(),n0.log=function(a){if(a<1)throw new Error("log("+a+")");return r0[a]},n0.exp=function(a){return kf[a]},n0.mul=function(a,c){return a===0||c===0?0:kf[r0[a]+r0[c]]},function(r){const a=n0;r.mul=function(f,y){const w=new Uint8Array(f.length+y.length-1);for(let D=0;D<f.length;D++)for(let o=0;o<y.length;o++)w[D+o]^=a.mul(f[D],y[o]);return w},r.mod=function(f,y){let w=new Uint8Array(f);for(;w.length-y.length>=0;){const D=w[0];for(let j=0;j<y.length;j++)w[j]^=a.mul(y[j],D);let o=0;for(;o<w.length&&w[o]===0;)o++;w=w.slice(o)}return w},r.generateECPolynomial=function(f){let y=new Uint8Array([1]);for(let w=0;w<f;w++)y=r.mul(y,new Uint8Array([1,a.exp(w)]));return y}}(cI);const uI=cI;function ox(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}ox.prototype.initialize=function(a){this.degree=a,this.genPoly=uI.generateECPolynomial(this.degree)},ox.prototype.encode=function(a){if(!this.genPoly)throw new Error("Encoder not initialized");const c=new Uint8Array(a.length+this.degree);c.set(a);const f=uI.mod(c,this.genPoly),y=this.degree-f.length;if(y>0){const w=new Uint8Array(this.degree);return w.set(f,y),w}return f};var bP=ox,hI={},Zl={},sx={};sx.isValid=function(a){return!isNaN(a)&&a>=1&&a<=40};var Sa={};const dI="[0-9]+",wP="[A-Z $%*+\\-./:]+";let Pf="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Pf=Pf.replace(/u/g,"\\u");const MP="(?:(?![A-Z0-9 $%*+\\-./:]|"+Pf+`)(?:.|[\r
|
|
60
|
+
Valid keys: `+JSON.stringify(Object.keys(Q),null," "));var Re=Qe(ee,de,B,U,Y+"."+de,c);if(Re)return Re}return null}return it(J)}function Ht(Q){switch(typeof Q){case"number":case"string":case"undefined":return!0;case"boolean":return!Q;case"object":if(Array.isArray(Q))return Q.every(Ht);if(Q===null||o(Q))return!0;var J=oe(Q);if(J){var M=J.call(Q),z;if(J!==Q.entries){for(;!(z=M.next()).done;)if(!Ht(z.value))return!1}else for(;!(z=M.next()).done;){var B=z.value;if(B&&!Ht(B[1]))return!1}}else return!1;return!0;default:return!1}}function It(Q,J){return Q==="symbol"?!0:J?J["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&J instanceof Symbol:!1}function wt(Q){var J=typeof Q;return Array.isArray(Q)?"array":Q instanceof RegExp?"object":It(J,Q)?"symbol":J}function $t(Q){if(typeof Q>"u"||Q===null)return""+Q;var J=wt(Q);if(J==="object"){if(Q instanceof Date)return"date";if(Q instanceof RegExp)return"regexp"}return J}function gi(Q){var J=$t(Q);switch(J){case"array":case"object":return"an "+J;case"boolean":case"date":case"regexp":return"a "+J;default:return J}}function mi(Q){return!Q.constructor||!Q.constructor.name?te:Q.constructor.name}return ge.checkPropTypes=y,ge.resetWarningCache=y.resetWarningCache,ge.PropTypes=ge,ge},mv}var yv,L4;function lj(){if(L4)return yv;L4=1;var r=fv();function a(){}function c(){}return c.resetWarningCache=a,yv=function(){function f(D,o,j,F,$,oe){if(oe!==r){var te=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw te.name="Invariant Violation",te}}f.isRequired=f;function y(){return f}var w={array:f,bigint:f,bool:f,func:f,number:f,object:f,string:f,symbol:f,any:f,arrayOf:y,element:f,elementType:f,instanceOf:y,node:f,objectOf:y,oneOf:y,oneOfType:y,shape:y,exact:y,checkPropTypes:c,resetWarningCache:a};return w.PropTypes=w,w},yv}if(process.env.NODE_ENV!=="production"){var cj=T4(),uj=!0;uv.exports=aj()(cj.isElement,uj)}else uv.exports=lj()();var hj=uv.exports;const et=m_(hj),jW="",dj=r=>{const[a,c]=Ce.useState(!1);return Ce.useEffect(()=>{const f=window.matchMedia(r);f.matches!==a&&c(f.matches);const y=()=>c(f.matches);return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[a,r]),a},_v=()=>dj("(min-width: 992px)");class fj{constructor(a={}){this._currentPosition=null,this._listeners=new Map;const{maxAccuracy:c=100}=a;this._maxAccuracy=c}get currentPosition(){return this._currentPosition}hasValidPosition(){const a=this._maxAccuracy;return this._currentPosition!==null&&this._currentPosition.coords&&this._currentPosition.coords.accuracy>=0&&this._currentPosition.coords.accuracy<=a}on(a,c){this._listeners.has(a)||this._listeners.set(a,[]),this._listeners.get(a).push(c)}off(a,c){const f=this._listeners.get(a);f&&this._listeners.set(a,f.filter(y=>y!==c))}setPosition(a){let c;if(a.coords&&a.timestamp)c={coords:{latitude:a.coords.latitude,longitude:a.coords.longitude,accuracy:a.coords.accuracy,altitude:a.coords.altitude??null,altitudeAccuracy:a.coords.altitudeAccuracy??null,heading:a.coords.heading??null,speed:a.coords.speed??null},timestamp:a.timestamp,floorIndex:a.floorIndex??null};else{const y={message:"[CustomPositionProvider] Invalid position object received. The object must be at minimum: { coords: { latitude: number, longitude: number, accuracy: number }, timestamp: number }.",received:a};return this.emitError(y),!1}return c.coords.accuracy>this._maxAccuracy?(console.warn(`[CustomPositionProvider] Position accuracy (${c.coords.accuracy}m) exceeds maxAccuracy (${this._maxAccuracy}m). Position dropped, keeping previous position.`),!1):(this._currentPosition=c,(this._listeners.get("position_received")||[]).forEach(y=>{y.call(null,{position:c})}),!0)}emitError(a){this._currentPosition=null,console.warn("[CustomPositionProvider] position_error:",a),(this._listeners.get("position_error")||[]).forEach(f=>{f.call(null,a)})}}const Sm={venueSelector:{key:"venue-selector",className:"venue-selector-portal"},viewSelector:{key:"view-selector",className:"view-selector-portal"},languageSelector:{key:"language-selector",className:"language-selector-portal"},viewModeSwitch:{key:"viewmode-switch",className:"viewmode-switch-portal"},myPosition:{key:"my-position",className:"my-position-element-portal"},floorSelector:{key:"floor-selector",className:"floor-selector-portal"},resetView:{key:"reset-view",className:"reset-view-portal"}};z4.propTypes={mapType:et.oneOf(["google","mapbox"]).isRequired,mapsIndoorsInstance:et.object.isRequired,mapInstance:et.object.isRequired,onPositionControl:et.func,brandingColor:et.string,devicePosition:et.object,excludedElements:et.string};function z4({mapType:r,mapsIndoorsInstance:a,mapInstance:c,onPositionControl:f,brandingColor:y,devicePosition:w,excludedElements:D=""}){const o=_v(),j=Ce.useRef(null),F=Ce.useRef(null),$=Ce.useCallback(ge=>!D||typeof D!="string"?!0:!D.split(",").map(Ae=>Ae.trim()).includes(ge),[D]),oe=Ce.useMemo(()=>{const ge={};for(const[xe,Ae]of Object.entries(Sm))ge[xe]=Be.jsx("div",{className:Ae.className},Ae.key);return ge},[]),te=ge=>{F.current.customPositionProvider.setPosition(ge)&&F.current.watchPosition()};return Ce.useEffect(()=>{if(!(!a||!c)){if(!j.current){const ge=document.createElement("mi-floor-selector");j.current=ge}if(!F.current){const ge=document.createElement("mi-my-position");F.current=ge}j.current.mapsindoors=a,F.current.mapsindoors=a,y&&(j.current.primaryColor=y),f&&F.current&&f(F.current)}},[r,a,c,f,y]),Ce.useEffect(()=>{if(F.current){if(F.current.stopListeningForPosition&&typeof F.current.stopListeningForPosition=="function"&&F.current.stopListeningForPosition(),w&&typeof w=="object"){if(F.current.customPositionProvider||(F.current.customPositionProvider=new fj),Object.keys(w).length===0)return;te(w)}return()=>{F.current&&F.current.stopListeningForPosition&&typeof F.current.stopListeningForPosition=="function"&&F.current.stopListeningForPosition()}}},[w]),Ce.useEffect(()=>{if(!j.current||!F.current)return;const ge=(xe,Ae)=>{const it=document.querySelector(`.${Ae}`);it&&!it.contains(xe)&&(xe.remove(),it.appendChild(xe))};$("floorSelector")&&ge(j.current,Sm.floorSelector.className),$("myPosition")&&ge(F.current,Sm.myPosition.className)},[o,$]),Ce.useEffect(()=>{Object.entries(Sm).forEach(([ge,xe])=>{const Ae=document.querySelector(`.${xe.className}`);Ae&&($(ge)?Ae.style.display="":Ae.style.display="none")})},[D,$,o]),o?Be.jsxs(Be.Fragment,{children:[Be.jsxs("div",{className:"map-controls-container desktop top-right",children:[oe.venueSelector,oe.viewSelector,oe.languageSelector,oe.viewModeSwitch,oe.myPosition,oe.floorSelector]}),Be.jsx("div",{className:"map-controls-container desktop bottom-right",children:oe.resetView})]}):Be.jsxs(Be.Fragment,{children:[Be.jsxs("div",{className:"map-controls-left-column mobile-column",children:[oe.venueSelector,oe.viewModeSwitch,oe.viewSelector,oe.languageSelector]}),Be.jsxs("div",{className:"map-controls-right-column mobile-column",children:[oe.myPosition,oe.floorSelector]})]})}const pj=Ce.memo(z4),kW="",gj=Ce.lazy(()=>Promise.resolve().then(()=>H$)),mj=Ce.lazy(()=>Promise.resolve().then(()=>W$)),nh={Google:"google",Mapbox:"mapbox"};O4.propTypes={apiKey:et.string.isRequired,gmApiKey:et.string,mapboxAccessToken:et.string,center:et.object,zoom:et.number,bounds:et.object,bearing:et.number,pitch:et.number,resetUICounter:et.number,mapOptions:et.object,onInitialized:et.func,gmMapId:et.string,devicePosition:et.object};function O4({apiKey:r,gmApiKey:a,mapboxAccessToken:c,center:f,zoom:y,bounds:w,bearing:D,pitch:o,resetUICounter:j,mapOptions:F,onInitialized:$,gmMapId:oe,devicePosition:te}){var Dt;const[ge,xe]=Ce.useState(),[Ae,it]=Ce.useState(),[We,me]=Ce.useState(),[ce,pe]=Ce.useState(),[ve,De]=Ce.useState(),[ct,St]=Ce.useState(),[Je,jt]=Ce.useState(),pt=Ce.useMemo(()=>{var Ht;return((Ht=ct==null?void 0:ct.appSettings)==null?void 0:Ht.excludeFromUI)||""},[(Dt=ct==null?void 0:ct.appSettings)==null?void 0:Dt.excludeFromUI]);Ce.useEffect(()=>{window.customElements.get("mi-floor-selector")||n4()},[]),Ce.useEffect(()=>{r&&(window.mapsindoors.MapsIndoors.setMapsIndoorsApiKey(r),ge===nh.Mapbox&&(window.mapsindoors.services.SolutionsService.getSolution().then(Ht=>{De(Ht)}),window.mapsindoors.services.AppConfigService.getConfig().then(Ht=>{St(Ht)})))},[r,ge]);const Pt=Ht=>{jt(Ht);const It=new window.mapsindoors.MapsIndoors({mapView:Ht});It.once("building_changed",wt=>{const $t=It.getVenue();wt&&$t&&wt.venueId!==$t.id&&It.setVenue(wt.venueId)}),It.on("mouseenter",()=>{var $t;const wt=It.getHoveredLocation();(($t=wt==null?void 0:wt.properties.locationSettings)==null?void 0:$t.selectable)===!1&&It.unhoverLocation()}),It.setDisplayRule(["MI_BUILDING_OUTLINE"],{visible:!1}),it(It)};return Ce.useEffect(()=>{typeof $=="function"&&Ae&&We&&typeof ce=="boolean"&&$(Ae,We,ce)},[Ae,We,ce]),Ce.useEffect(()=>{ve&&ge===nh.Mapbox&&["mapbox","3dwalls","floorplan"].every(Ht=>ve.modules.map(It=>It.toLowerCase()).includes(Ht))?pe(!0):pe(!1)},[ve,ge]),Ce.useEffect(()=>{c?xe(nh.Mapbox):a&&xe(nh.Google)},[a,c]),Be.jsxs(Be.Fragment,{children:[ge===nh.Google&&Be.jsx(Ce.Suspense,{children:Be.jsx(mj,{mapsIndoorsInstance:Ae,apiKey:a,onInitialized:Pt,center:f,zoom:y,mapOptions:F,heading:D,tilt:o,bounds:w,gmMapId:oe})}),ge===nh.Mapbox&&Be.jsx(Ce.Suspense,{children:Be.jsx(gj,{mapsIndoorsInstance:Ae,accessToken:c,onInitialized:Pt,center:f,zoom:y,mapOptions:F,bearing:D,pitch:o,bounds:w,resetViewMode:j,viewModeSwitchVisible:ce,appConfig:ct})}),Ae&&Je&&ge&&Be.jsx(pj,{mapType:ge,mapsIndoorsInstance:Ae,mapInstance:Je,onPositionControl:me,brandingColor:F==null?void 0:F.brandingColor,devicePosition:te,excludedElements:pt})]})}const $o={Google:"google",Mapbox:"mapbox"},As=On({key:"mapsIndoorsInstance",default:null,dangerouslyAllowMutability:!0}),yj=r=>{const a=zi(As),c=Ce.useRef(),[f,y]=Ce.useState([]);Ce.useEffect(()=>{(async()=>{if(a&&r){for(const o of f)c.current.disableLiveData(o);c.current=new window.mapsindoors.LiveDataManager(a);const D=await c.current.LiveDataInfo.activeDomainTypes();for(const o of D)await c.current.enableLiveData(o);y(D)}})()},[r,a])},Cm=On({key:"userPosition",default:null}),vv=On({key:"directionsService",default:null}),Nm=On({key:"mapType",default:void 0}),xv=On({key:"apiKey",default:null}),bv=On({key:"gmApiKey",default:null}),Lm=On({key:"mapboxAccessToken",default:null}),zm=On({key:"filteredLocations",default:void 0}),Om=On({key:"filteredLocationsByExternalID",default:void 0}),j4=On({key:"tileStyle",default:null}),k4=On({key:"positionControl",default:null,dangerouslyAllowMutability:!0}),wv=On({key:"bearing",default:0}),jm=On({key:"pitch",default:null}),P4=On({key:"solution",default:null,dangerouslyAllowMutability:!0}),Mf=On({key:"notificationMessage",default:null});function If(){return new Promise(r=>{const a=document.querySelector(".modal--open"),c=document.querySelector(".mapsindoors-map");if(a)r(c.offsetHeight-(a==null?void 0:a.offsetTop));else{const f=new MutationObserver(()=>{const y=document.querySelector(".modal--open");y&&(f.disconnect(),r(c.offsetHeight-(y==null?void 0:y.offsetTop)))});f.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}const Tf=On({key:"categories",default:[]}),Mv=On({key:"kioskOriginLocationId",default:void 0}),km=On({key:"locationId",default:void 0}),R4=On({key:"startZoomLevel",default:null}),$l=On({key:"currentVenueName",default:null}),Df=On({key:"venues",default:[]}),Iv=On({key:"venueWasSelected",default:!1}),Pm=On({key:"isMapReady",default:!1});function rh(){return new Promise(r=>{const a=document.querySelector(".sheet--active"),c=document.querySelector(".mapsindoors-map");if(a)r(c.offsetHeight-a.offsetTop);else{const f=new MutationObserver(()=>{const y=document.querySelector(".sheet--active");y&&(f.disconnect(),r(c.offsetHeight-y.offsetTop))});f.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}function $c(){return new Promise(r=>{const a=document.querySelector(".modal--open");if(a)r((a==null?void 0:a.offsetWidth)+(a==null?void 0:a.offsetLeft)*2);else{const c=new MutationObserver(()=>{const f=document.querySelector(".modal--open");f&&(c.disconnect(),r((f==null?void 0:f.offsetWidth)+(f==null?void 0:f.offsetLeft)*2))});c.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}const B4=On({key:"timeout",default:void 0});function F4(){const[r,a]=Ce.useState(!1),c=zi(Pm),f=zi(B4);return Ce.useEffect(()=>{if(!c||!f)return;let y;const w=()=>{a(!1),window.clearTimeout(y),y=window.setTimeout(D,f*1e3)},D=()=>{a(!0)};return y=window.setTimeout(D,f*1e3),window.addEventListener("mousemove",w),window.addEventListener("mousedown",w),window.addEventListener("resize",w),window.addEventListener("keydown",w),window.addEventListener("touchstart",w),window.addEventListener("wheel",w),()=>{window.removeEventListener("mousemove",w),window.removeEventListener("mousedown",w),window.removeEventListener("resize",w),window.removeEventListener("keydown",w),window.removeEventListener("touchstart",w),window.removeEventListener("wheel",w),window.clearTimeout(y)}},[f,c]),r}const _j=r=>{const[a,c]=Ce.useState(window.matchMedia(r).matches);return Ce.useEffect(()=>{const f=window.matchMedia(r);f.matches!==a&&c(f.matches);const y=()=>c(f.matches);return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[a,r]),a},ra=()=>_j("(min-width: 992px)"),U4=On({key:"mapboxViewMode",default:null}),Tv=Object.freeze({initial3D:1,clicked3D:2,clicked2D:3}),vj=pm({key:"currentPitch",get:({get:r})=>{const a=r(jm),c=r(U4);let f;switch(c){case Tv.initial3D:f=a??45;break;case Tv.clicked3D:f=45;break;case Tv.clicked2D:f=0;break;default:f=a}return f}}),V4=On({key:"center",default:null});function Lr(r){return r==null}var Ko=63710088e-1,Dv={centimeters:Ko*100,centimetres:Ko*100,degrees:Ko/111325,feet:Ko*3.28084,inches:Ko*39.37,kilometers:Ko/1e3,kilometres:Ko/1e3,meters:Ko,metres:Ko,miles:Ko/1609.344,millimeters:Ko*1e3,millimetres:Ko*1e3,nauticalmiles:Ko/1852,radians:1,yards:Ko*1.0936},xj={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Ko,yards:1.0936133},Av={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Hs(r,a,c){c===void 0&&(c={});var f={type:"Feature"};return(c.id===0||c.id)&&(f.id=c.id),c.bbox&&(f.bbox=c.bbox),f.properties=a||{},f.geometry=r,f}function bj(r,a,c){switch(r){case"Point":return oa(a).geometry;case"LineString":return sa(a).geometry;case"Polygon":return Ev(a).geometry;case"MultiPoint":return Q4(a).geometry;case"MultiLineString":return Sv(a).geometry;case"MultiPolygon":return H4(a).geometry;default:throw new Error(r+" is invalid")}}function oa(r,a,c){if(c===void 0&&(c={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Rm(r[0])||!Rm(r[1]))throw new Error("coordinates must contain numbers");var f={type:"Point",coordinates:r};return Hs(f,a,c)}function wj(r,a,c){return c===void 0&&(c={}),Yl(r.map(function(f){return oa(f,a)}),c)}function Ev(r,a,c){c===void 0&&(c={});for(var f=0,y=r;f<y.length;f++){var w=y[f];if(w.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var D=0;D<w[w.length-1].length;D++)if(w[w.length-1][D]!==w[0][D])throw new Error("First and last Position are not equivalent.")}var o={type:"Polygon",coordinates:r};return Hs(o,a,c)}function Mj(r,a,c){return c===void 0&&(c={}),Yl(r.map(function(f){return Ev(f,a)}),c)}function sa(r,a,c){if(c===void 0&&(c={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var f={type:"LineString",coordinates:r};return Hs(f,a,c)}function Ij(r,a,c){return c===void 0&&(c={}),Yl(r.map(function(f){return sa(f,a)}),c)}function Yl(r,a){a===void 0&&(a={});var c={type:"FeatureCollection"};return a.id&&(c.id=a.id),a.bbox&&(c.bbox=a.bbox),c.features=r,c}function Sv(r,a,c){c===void 0&&(c={});var f={type:"MultiLineString",coordinates:r};return Hs(f,a,c)}function Q4(r,a,c){c===void 0&&(c={});var f={type:"MultiPoint",coordinates:r};return Hs(f,a,c)}function H4(r,a,c){c===void 0&&(c={});var f={type:"MultiPolygon",coordinates:r};return Hs(f,a,c)}function Tj(r,a,c){c===void 0&&(c={});var f={type:"GeometryCollection",geometries:r};return Hs(f,a,c)}function Dj(r,a){if(a===void 0&&(a=0),a&&!(a>=0))throw new Error("precision must be a positive number");var c=Math.pow(10,a||0);return Math.round(r*c)/c}function $4(r,a){a===void 0&&(a="kilometers");var c=Dv[a];if(!c)throw new Error(a+" units is invalid");return r*c}function Cv(r,a){a===void 0&&(a="kilometers");var c=Dv[a];if(!c)throw new Error(a+" units is invalid");return r/c}function Aj(r,a){return Y4(Cv(r,a))}function Ej(r){var a=r%360;return a<0&&(a+=360),a}function Y4(r){var a=r%(2*Math.PI);return a*180/Math.PI}function Sj(r){var a=r%360;return a*Math.PI/180}function Cj(r,a,c){if(a===void 0&&(a="kilometers"),c===void 0&&(c="kilometers"),!(r>=0))throw new Error("length must be a positive number");return $4(Cv(r,a),c)}function Nj(r,a,c){if(a===void 0&&(a="meters"),c===void 0&&(c="kilometers"),!(r>=0))throw new Error("area must be a positive number");var f=Av[a];if(!f)throw new Error("invalid original units");var y=Av[c];if(!y)throw new Error("invalid final units");return r/f*y}function Rm(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Nv(r){return!!r&&r.constructor===Object}function Lj(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(r.length!==4&&r.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach(function(a){if(!Rm(a))throw new Error("bbox must only contain numbers")})}function zj(r){if(!r)throw new Error("id is required");if(["string","number"].indexOf(typeof r)===-1)throw new Error("id must be a number or a string")}const Oj=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:Av,bearingToAzimuth:Ej,convertArea:Nj,convertLength:Cj,degreesToRadians:Sj,earthRadius:Ko,factors:Dv,feature:Hs,featureCollection:Yl,geometry:bj,geometryCollection:Tj,isNumber:Rm,isObject:Nv,lengthToDegrees:Aj,lengthToRadians:Cv,lineString:sa,lineStrings:Ij,multiLineString:Sv,multiPoint:Q4,multiPolygon:H4,point:oa,points:wj,polygon:Ev,polygons:Mj,radiansToDegrees:Y4,radiansToLength:$4,round:Dj,unitsFactors:xj,validateBBox:Lj,validateId:zj},Symbol.toStringTag,{value:"Module"}));function oh(r,a,c){if(r!==null)for(var f,y,w,D,o,j,F,$=0,oe=0,te,ge=r.type,xe=ge==="FeatureCollection",Ae=ge==="Feature",it=xe?r.features.length:1,We=0;We<it;We++){F=xe?r.features[We].geometry:Ae?r.geometry:r,te=F?F.type==="GeometryCollection":!1,o=te?F.geometries.length:1;for(var me=0;me<o;me++){var ce=0,pe=0;if(D=te?F.geometries[me]:F,D!==null){j=D.coordinates;var ve=D.type;switch($=c&&(ve==="Polygon"||ve==="MultiPolygon")?1:0,ve){case null:break;case"Point":if(a(j,oe,We,ce,pe)===!1)return!1;oe++,ce++;break;case"LineString":case"MultiPoint":for(f=0;f<j.length;f++){if(a(j[f],oe,We,ce,pe)===!1)return!1;oe++,ve==="MultiPoint"&&ce++}ve==="LineString"&&ce++;break;case"Polygon":case"MultiLineString":for(f=0;f<j.length;f++){for(y=0;y<j[f].length-$;y++){if(a(j[f][y],oe,We,ce,pe)===!1)return!1;oe++}ve==="MultiLineString"&&ce++,ve==="Polygon"&&pe++}ve==="Polygon"&&ce++;break;case"MultiPolygon":for(f=0;f<j.length;f++){for(pe=0,y=0;y<j[f].length;y++){for(w=0;w<j[f][y].length-$;w++){if(a(j[f][y][w],oe,We,ce,pe)===!1)return!1;oe++}pe++}ce++}break;case"GeometryCollection":for(f=0;f<D.geometries.length;f++)if(oh(D.geometries[f],a,c)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function jj(r,a,c,f){var y=c;return oh(r,function(w,D,o,j,F){D===0&&c===void 0?y=w:y=a(y,w,D,o,j,F)},f),y}function G4(r,a){var c;switch(r.type){case"FeatureCollection":for(c=0;c<r.features.length&&a(r.features[c].properties,c)!==!1;c++);break;case"Feature":a(r.properties,0);break}}function kj(r,a,c){var f=c;return G4(r,function(y,w){w===0&&c===void 0?f=y:f=a(f,y,w)}),f}function Bm(r,a){if(r.type==="Feature")a(r,0);else if(r.type==="FeatureCollection")for(var c=0;c<r.features.length&&a(r.features[c],c)!==!1;c++);}function Pj(r,a,c){var f=c;return Bm(r,function(y,w){w===0&&c===void 0?f=y:f=a(f,y,w)}),f}function Rj(r){var a=[];return oh(r,function(c){a.push(c)}),a}function Lv(r,a){var c,f,y,w,D,o,j,F,$,oe,te=0,ge=r.type==="FeatureCollection",xe=r.type==="Feature",Ae=ge?r.features.length:1;for(c=0;c<Ae;c++){for(o=ge?r.features[c].geometry:xe?r.geometry:r,F=ge?r.features[c].properties:xe?r.properties:{},$=ge?r.features[c].bbox:xe?r.bbox:void 0,oe=ge?r.features[c].id:xe?r.id:void 0,j=o?o.type==="GeometryCollection":!1,D=j?o.geometries.length:1,y=0;y<D;y++){if(w=j?o.geometries[y]:o,w===null){if(a(null,te,F,$,oe)===!1)return!1;continue}switch(w.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(a(w,te,F,$,oe)===!1)return!1;break}case"GeometryCollection":{for(f=0;f<w.geometries.length;f++)if(a(w.geometries[f],te,F,$,oe)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}te++}}function Bj(r,a,c){var f=c;return Lv(r,function(y,w,D,o,j){w===0&&c===void 0?f=y:f=a(f,y,w,D,o,j)}),f}function ll(r,a){Lv(r,function(c,f,y,w,D){var o=c===null?null:c.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return a(Hs(c,y,{bbox:w,id:D}),f,0)===!1?!1:void 0}var j;switch(o){case"MultiPoint":j="Point";break;case"MultiLineString":j="LineString";break;case"MultiPolygon":j="Polygon";break}for(var F=0;F<c.coordinates.length;F++){var $=c.coordinates[F],oe={type:j,coordinates:$};if(a(Hs(oe,y),f,F)===!1)return!1}})}function Fj(r,a,c){var f=c;return ll(r,function(y,w,D){w===0&&D===0&&c===void 0?f=y:f=a(f,y,w,D)}),f}function Z4(r,a){ll(r,function(c,f,y){var w=0;if(c.geometry){var D=c.geometry.type;if(!(D==="Point"||D==="MultiPoint")){var o,j=0,F=0,$=0;if(oh(c,function(oe,te,ge,xe,Ae){if(o===void 0||f>j||xe>F||Ae>$){o=oe,j=f,F=xe,$=Ae,w=0;return}var it=sa([o,oe],c.properties);if(a(it,f,y,Ae,w)===!1)return!1;w++,o=oe})===!1)return!1}}})}function Uj(r,a,c){var f=c,y=!1;return Z4(r,function(w,D,o,j,F){y===!1&&c===void 0?f=w:f=a(f,w,D,o,j,F),y=!0}),f}function W4(r,a){if(!r)throw new Error("geojson is required");ll(r,function(c,f,y){if(c.geometry!==null){var w=c.geometry.type,D=c.geometry.coordinates;switch(w){case"LineString":if(a(c,f,y,0,0)===!1)return!1;break;case"Polygon":for(var o=0;o<D.length;o++)if(a(sa(D[o],c.properties),f,y,o)===!1)return!1;break}}})}function Vj(r,a,c){var f=c;return W4(r,function(y,w,D,o){w===0&&c===void 0?f=y:f=a(f,y,w,D,o)}),f}function Qj(r,a){if(a=a||{},!Nv(a))throw new Error("options is invalid");var c=a.featureIndex||0,f=a.multiFeatureIndex||0,y=a.geometryIndex||0,w=a.segmentIndex||0,D=a.properties,o;switch(r.type){case"FeatureCollection":c<0&&(c=r.features.length+c),D=D||r.features[c].properties,o=r.features[c].geometry;break;case"Feature":D=D||r.properties,o=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":o=r;break;default:throw new Error("geojson is invalid")}if(o===null)return null;var j=o.coordinates;switch(o.type){case"Point":case"MultiPoint":return null;case"LineString":return w<0&&(w=j.length+w-1),sa([j[w],j[w+1]],D,a);case"Polygon":return y<0&&(y=j.length+y),w<0&&(w=j[y].length+w-1),sa([j[y][w],j[y][w+1]],D,a);case"MultiLineString":return f<0&&(f=j.length+f),w<0&&(w=j[f].length+w-1),sa([j[f][w],j[f][w+1]],D,a);case"MultiPolygon":return f<0&&(f=j.length+f),y<0&&(y=j[f].length+y),w<0&&(w=j[f][y].length-w-1),sa([j[f][y][w],j[f][y][w+1]],D,a)}throw new Error("geojson is invalid")}function Hj(r,a){if(a=a||{},!Nv(a))throw new Error("options is invalid");var c=a.featureIndex||0,f=a.multiFeatureIndex||0,y=a.geometryIndex||0,w=a.coordIndex||0,D=a.properties,o;switch(r.type){case"FeatureCollection":c<0&&(c=r.features.length+c),D=D||r.features[c].properties,o=r.features[c].geometry;break;case"Feature":D=D||r.properties,o=r.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":o=r;break;default:throw new Error("geojson is invalid")}if(o===null)return null;var j=o.coordinates;switch(o.type){case"Point":return oa(j,D,a);case"MultiPoint":return f<0&&(f=j.length+f),oa(j[f],D,a);case"LineString":return w<0&&(w=j.length+w),oa(j[w],D,a);case"Polygon":return y<0&&(y=j.length+y),w<0&&(w=j[y].length+w),oa(j[y][w],D,a);case"MultiLineString":return f<0&&(f=j.length+f),w<0&&(w=j[f].length+w),oa(j[f][w],D,a);case"MultiPolygon":return f<0&&(f=j.length+f),y<0&&(y=j[f].length+y),w<0&&(w=j[f][y].length-w),oa(j[f][y][w],D,a)}throw new Error("geojson is invalid")}const $j=Object.freeze(Object.defineProperty({__proto__:null,coordAll:Rj,coordEach:oh,coordReduce:jj,featureEach:Bm,featureReduce:Pj,findPoint:Hj,findSegment:Qj,flattenEach:ll,flattenReduce:Fj,geomEach:Lv,geomReduce:Bj,lineEach:W4,lineReduce:Vj,propEach:G4,propReduce:kj,segmentEach:Z4,segmentReduce:Uj},Symbol.toStringTag,{value:"Module"}));function Fm(r){var a=[1/0,1/0,-1/0,-1/0];return oh(r,function(c){a[0]>c[0]&&(a[0]=c[0]),a[1]>c[1]&&(a[1]=c[1]),a[2]<c[0]&&(a[2]=c[0]),a[3]<c[1]&&(a[3]=c[1])}),a}Fm.default=Fm;const Yj=Object.freeze(Object.defineProperty({__proto__:null,default:Fm},Symbol.toStringTag,{value:"Module"}));function Gj(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Af(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Um(r){return r.type==="Feature"?r.geometry:r}function Ef(r,a,c){if(c===void 0&&(c={}),!r)throw new Error("point is required");if(!a)throw new Error("polygon is required");var f=Gj(r),y=Um(a),w=y.type,D=a.bbox,o=y.coordinates;if(D&&Zj(f,D)===!1)return!1;w==="Polygon"&&(o=[o]);for(var j=!1,F=0;F<o.length&&!j;F++)if(q4(f,o[F][0],c.ignoreBoundary)){for(var $=!1,oe=1;oe<o[F].length&&!$;)q4(f,o[F][oe],!c.ignoreBoundary)&&($=!0),oe++;$||(j=!0)}return j}function q4(r,a,c){var f=!1;a[0][0]===a[a.length-1][0]&&a[0][1]===a[a.length-1][1]&&(a=a.slice(0,a.length-1));for(var y=0,w=a.length-1;y<a.length;w=y++){var D=a[y][0],o=a[y][1],j=a[w][0],F=a[w][1],$=r[1]*(D-j)+o*(j-r[0])+F*(r[0]-D)===0&&(D-r[0])*(j-r[0])<=0&&(o-r[1])*(F-r[1])<=0;if($)return!c;var oe=o>r[1]!=F>r[1]&&r[0]<(j-D)*(r[1]-o)/(F-o)+D;oe&&(f=!f)}return f}function Zj(r,a){return a[0]<=r[0]&&a[1]<=r[1]&&a[2]>=r[0]&&a[3]>=r[1]}function Wj(r,a){a===void 0&&(a={});var c=Fm(r),f=(c[0]+c[2])/2,y=(c[1]+c[3])/2;return oa([f,y],a.properties,a)}function K4(r){if(!r)throw new Error("geojson is required");var a=[];return ll(r,function(c){qj(c,a)}),Yl(a)}function qj(r,a){var c=[],f=r.geometry;if(f!==null){switch(f.type){case"Polygon":c=Af(f);break;case"LineString":c=[Af(f)]}c.forEach(function(y){var w=Kj(y,r.properties);w.forEach(function(D){D.id=a.length,a.push(D)})})}}function Kj(r,a){var c=[];return r.reduce(function(f,y){var w=sa([f,y],a);return w.bbox=Xj(f,y),c.push(w),y}),c}function Xj(r,a){var c=r[0],f=r[1],y=a[0],w=a[1],D=c<y?c:y,o=f<w?f:w,j=c>y?c:y,F=f>w?f:w;return[D,o,j,F]}var zv={exports:{}},X4={exports:{}};(function(r,a){(function(c,f){r.exports=f()})(Uw,function(){function c(me,ce,pe,ve,De){(function ct(St,Je,jt,pt,Pt){for(;pt>jt;){if(pt-jt>600){var Dt=pt-jt+1,Ht=Je-jt+1,It=Math.log(Dt),wt=.5*Math.exp(2*It/3),$t=.5*Math.sqrt(It*wt*(Dt-wt)/Dt)*(Ht-Dt/2<0?-1:1),gi=Math.max(jt,Math.floor(Je-Ht*wt/Dt+$t)),mi=Math.min(pt,Math.floor(Je+(Dt-Ht)*wt/Dt+$t));ct(St,Je,gi,mi,Pt)}var Q=St[Je],J=jt,M=pt;for(f(St,jt,Je),Pt(St[pt],Q)>0&&f(St,jt,pt);J<M;){for(f(St,J,M),J++,M--;Pt(St[J],Q)<0;)J++;for(;Pt(St[M],Q)>0;)M--}Pt(St[jt],Q)===0?f(St,jt,M):f(St,++M,pt),M<=Je&&(jt=M+1),Je<=M&&(pt=M-1)}})(me,ce,pe||0,ve||me.length-1,De||y)}function f(me,ce,pe){var ve=me[ce];me[ce]=me[pe],me[pe]=ve}function y(me,ce){return me<ce?-1:me>ce?1:0}var w=function(me){me===void 0&&(me=9),this._maxEntries=Math.max(4,me),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function D(me,ce,pe){if(!pe)return ce.indexOf(me);for(var ve=0;ve<ce.length;ve++)if(pe(me,ce[ve]))return ve;return-1}function o(me,ce){j(me,0,me.children.length,ce,me)}function j(me,ce,pe,ve,De){De||(De=it(null)),De.minX=1/0,De.minY=1/0,De.maxX=-1/0,De.maxY=-1/0;for(var ct=ce;ct<pe;ct++){var St=me.children[ct];F(De,me.leaf?ve(St):St)}return De}function F(me,ce){return me.minX=Math.min(me.minX,ce.minX),me.minY=Math.min(me.minY,ce.minY),me.maxX=Math.max(me.maxX,ce.maxX),me.maxY=Math.max(me.maxY,ce.maxY),me}function $(me,ce){return me.minX-ce.minX}function oe(me,ce){return me.minY-ce.minY}function te(me){return(me.maxX-me.minX)*(me.maxY-me.minY)}function ge(me){return me.maxX-me.minX+(me.maxY-me.minY)}function xe(me,ce){return me.minX<=ce.minX&&me.minY<=ce.minY&&ce.maxX<=me.maxX&&ce.maxY<=me.maxY}function Ae(me,ce){return ce.minX<=me.maxX&&ce.minY<=me.maxY&&ce.maxX>=me.minX&&ce.maxY>=me.minY}function it(me){return{children:me,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function We(me,ce,pe,ve,De){for(var ct=[ce,pe];ct.length;)if(!((pe=ct.pop())-(ce=ct.pop())<=ve)){var St=ce+Math.ceil((pe-ce)/ve/2)*ve;c(me,St,ce,pe,De),ct.push(ce,St,St,pe)}}return w.prototype.all=function(){return this._all(this.data,[])},w.prototype.search=function(me){var ce=this.data,pe=[];if(!Ae(me,ce))return pe;for(var ve=this.toBBox,De=[];ce;){for(var ct=0;ct<ce.children.length;ct++){var St=ce.children[ct],Je=ce.leaf?ve(St):St;Ae(me,Je)&&(ce.leaf?pe.push(St):xe(me,Je)?this._all(St,pe):De.push(St))}ce=De.pop()}return pe},w.prototype.collides=function(me){var ce=this.data;if(!Ae(me,ce))return!1;for(var pe=[];ce;){for(var ve=0;ve<ce.children.length;ve++){var De=ce.children[ve],ct=ce.leaf?this.toBBox(De):De;if(Ae(me,ct)){if(ce.leaf||xe(me,ct))return!0;pe.push(De)}}ce=pe.pop()}return!1},w.prototype.load=function(me){if(!me||!me.length)return this;if(me.length<this._minEntries){for(var ce=0;ce<me.length;ce++)this.insert(me[ce]);return this}var pe=this._build(me.slice(),0,me.length-1,0);if(this.data.children.length)if(this.data.height===pe.height)this._splitRoot(this.data,pe);else{if(this.data.height<pe.height){var ve=this.data;this.data=pe,pe=ve}this._insert(pe,this.data.height-pe.height-1,!0)}else this.data=pe;return this},w.prototype.insert=function(me){return me&&this._insert(me,this.data.height-1),this},w.prototype.clear=function(){return this.data=it([]),this},w.prototype.remove=function(me,ce){if(!me)return this;for(var pe,ve,De,ct=this.data,St=this.toBBox(me),Je=[],jt=[];ct||Je.length;){if(ct||(ct=Je.pop(),ve=Je[Je.length-1],pe=jt.pop(),De=!0),ct.leaf){var pt=D(me,ct.children,ce);if(pt!==-1)return ct.children.splice(pt,1),Je.push(ct),this._condense(Je),this}De||ct.leaf||!xe(ct,St)?ve?(pe++,ct=ve.children[pe],De=!1):ct=null:(Je.push(ct),jt.push(pe),pe=0,ve=ct,ct=ct.children[0])}return this},w.prototype.toBBox=function(me){return me},w.prototype.compareMinX=function(me,ce){return me.minX-ce.minX},w.prototype.compareMinY=function(me,ce){return me.minY-ce.minY},w.prototype.toJSON=function(){return this.data},w.prototype.fromJSON=function(me){return this.data=me,this},w.prototype._all=function(me,ce){for(var pe=[];me;)me.leaf?ce.push.apply(ce,me.children):pe.push.apply(pe,me.children),me=pe.pop();return ce},w.prototype._build=function(me,ce,pe,ve){var De,ct=pe-ce+1,St=this._maxEntries;if(ct<=St)return o(De=it(me.slice(ce,pe+1)),this.toBBox),De;ve||(ve=Math.ceil(Math.log(ct)/Math.log(St)),St=Math.ceil(ct/Math.pow(St,ve-1))),(De=it([])).leaf=!1,De.height=ve;var Je=Math.ceil(ct/St),jt=Je*Math.ceil(Math.sqrt(St));We(me,ce,pe,jt,this.compareMinX);for(var pt=ce;pt<=pe;pt+=jt){var Pt=Math.min(pt+jt-1,pe);We(me,pt,Pt,Je,this.compareMinY);for(var Dt=pt;Dt<=Pt;Dt+=Je){var Ht=Math.min(Dt+Je-1,Pt);De.children.push(this._build(me,Dt,Ht,ve-1))}}return o(De,this.toBBox),De},w.prototype._chooseSubtree=function(me,ce,pe,ve){for(;ve.push(ce),!ce.leaf&&ve.length-1!==pe;){for(var De=1/0,ct=1/0,St=void 0,Je=0;Je<ce.children.length;Je++){var jt=ce.children[Je],pt=te(jt),Pt=(Dt=me,Ht=jt,(Math.max(Ht.maxX,Dt.maxX)-Math.min(Ht.minX,Dt.minX))*(Math.max(Ht.maxY,Dt.maxY)-Math.min(Ht.minY,Dt.minY))-pt);Pt<ct?(ct=Pt,De=pt<De?pt:De,St=jt):Pt===ct&&pt<De&&(De=pt,St=jt)}ce=St||ce.children[0]}var Dt,Ht;return ce},w.prototype._insert=function(me,ce,pe){var ve=pe?me:this.toBBox(me),De=[],ct=this._chooseSubtree(ve,this.data,ce,De);for(ct.children.push(me),F(ct,ve);ce>=0&&De[ce].children.length>this._maxEntries;)this._split(De,ce),ce--;this._adjustParentBBoxes(ve,De,ce)},w.prototype._split=function(me,ce){var pe=me[ce],ve=pe.children.length,De=this._minEntries;this._chooseSplitAxis(pe,De,ve);var ct=this._chooseSplitIndex(pe,De,ve),St=it(pe.children.splice(ct,pe.children.length-ct));St.height=pe.height,St.leaf=pe.leaf,o(pe,this.toBBox),o(St,this.toBBox),ce?me[ce-1].children.push(St):this._splitRoot(pe,St)},w.prototype._splitRoot=function(me,ce){this.data=it([me,ce]),this.data.height=me.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},w.prototype._chooseSplitIndex=function(me,ce,pe){for(var ve,De,ct,St,Je,jt,pt,Pt=1/0,Dt=1/0,Ht=ce;Ht<=pe-ce;Ht++){var It=j(me,0,Ht,this.toBBox),wt=j(me,Ht,pe,this.toBBox),$t=(De=It,ct=wt,St=void 0,Je=void 0,jt=void 0,pt=void 0,St=Math.max(De.minX,ct.minX),Je=Math.max(De.minY,ct.minY),jt=Math.min(De.maxX,ct.maxX),pt=Math.min(De.maxY,ct.maxY),Math.max(0,jt-St)*Math.max(0,pt-Je)),gi=te(It)+te(wt);$t<Pt?(Pt=$t,ve=Ht,Dt=gi<Dt?gi:Dt):$t===Pt&&gi<Dt&&(Dt=gi,ve=Ht)}return ve||pe-ce},w.prototype._chooseSplitAxis=function(me,ce,pe){var ve=me.leaf?this.compareMinX:$,De=me.leaf?this.compareMinY:oe;this._allDistMargin(me,ce,pe,ve)<this._allDistMargin(me,ce,pe,De)&&me.children.sort(ve)},w.prototype._allDistMargin=function(me,ce,pe,ve){me.children.sort(ve);for(var De=this.toBBox,ct=j(me,0,ce,De),St=j(me,pe-ce,pe,De),Je=ge(ct)+ge(St),jt=ce;jt<pe-ce;jt++){var pt=me.children[jt];F(ct,me.leaf?De(pt):pt),Je+=ge(ct)}for(var Pt=pe-ce-1;Pt>=ce;Pt--){var Dt=me.children[Pt];F(St,me.leaf?De(Dt):Dt),Je+=ge(St)}return Je},w.prototype._adjustParentBBoxes=function(me,ce,pe){for(var ve=pe;ve>=0;ve--)F(ce[ve],me)},w.prototype._condense=function(me){for(var ce=me.length-1,pe=void 0;ce>=0;ce--)me[ce].children.length===0?ce>0?(pe=me[ce-1].children).splice(pe.indexOf(me[ce]),1):this.clear():o(me[ce],this.toBBox)},w})})(X4);var Jj=X4.exports;const ek=y_(Oj),tk=y_($j),ik=y_(Yj);var Da=Jj,J4=ek,e5=tk,sh=ik.default,nk=e5.featureEach;e5.coordEach,J4.polygon;var t5=J4.featureCollection;function i5(r){var a=new Da(r);return a.insert=function(c){if(c.type!=="Feature")throw new Error("invalid feature");return c.bbox=c.bbox?c.bbox:sh(c),Da.prototype.insert.call(this,c)},a.load=function(c){var f=[];return Array.isArray(c)?c.forEach(function(y){if(y.type!=="Feature")throw new Error("invalid features");y.bbox=y.bbox?y.bbox:sh(y),f.push(y)}):nk(c,function(y){if(y.type!=="Feature")throw new Error("invalid features");y.bbox=y.bbox?y.bbox:sh(y),f.push(y)}),Da.prototype.load.call(this,f)},a.remove=function(c,f){if(c.type!=="Feature")throw new Error("invalid feature");return c.bbox=c.bbox?c.bbox:sh(c),Da.prototype.remove.call(this,c,f)},a.clear=function(){return Da.prototype.clear.call(this)},a.search=function(c){var f=Da.prototype.search.call(this,this.toBBox(c));return t5(f)},a.collides=function(c){return Da.prototype.collides.call(this,this.toBBox(c))},a.all=function(){var c=Da.prototype.all.call(this);return t5(c)},a.toJSON=function(){return Da.prototype.toJSON.call(this)},a.fromJSON=function(c){return Da.prototype.fromJSON.call(this,c)},a.toBBox=function(c){var f;if(c.bbox)f=c.bbox;else if(Array.isArray(c)&&c.length===4)f=c;else if(Array.isArray(c)&&c.length===6)f=[c[0],c[1],c[3],c[4]];else if(c.type==="Feature")f=sh(c);else if(c.type==="FeatureCollection")f=sh(c);else throw new Error("invalid geojson");return{minX:f[0],minY:f[1],maxX:f[2],maxY:f[3]}},a}zv.exports=i5,zv.exports.default=i5;var rk=zv.exports;const ok=m_(rk);function Ov(r,a){var c={},f=[];if(r.type==="LineString"&&(r=Hs(r)),a.type==="LineString"&&(a=Hs(a)),r.type==="Feature"&&a.type==="Feature"&&r.geometry!==null&&a.geometry!==null&&r.geometry.type==="LineString"&&a.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&a.geometry.coordinates.length===2){var y=n5(r,a);return y&&f.push(y),Yl(f)}var w=ok();return w.load(K4(a)),Bm(K4(r),function(D){Bm(w.search(D),function(o){var j=n5(D,o);if(j){var F=Af(j).join(",");c[F]||(c[F]=!0,f.push(j))}})}),Yl(f)}function n5(r,a){var c=Af(r),f=Af(a);if(c.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(f.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var y=c[0][0],w=c[0][1],D=c[1][0],o=c[1][1],j=f[0][0],F=f[0][1],$=f[1][0],oe=f[1][1],te=(oe-F)*(D-y)-($-j)*(o-w),ge=($-j)*(w-F)-(oe-F)*(y-j),xe=(D-y)*(w-F)-(o-w)*(y-j);if(te===0)return null;var Ae=ge/te,it=xe/te;if(Ae>=0&&Ae<=1&&it>=0&&it<=1){var We=y+Ae*(D-y),me=w+Ae*(o-w);return oa([We,me])}return null}function jv(r,a){a===void 0&&(a={});var c=Um(r);switch(!a.properties&&r.type==="Feature"&&(a.properties=r.properties),c.type){case"Polygon":return sk(c,a);case"MultiPolygon":return ak(c,a);default:throw new Error("invalid poly")}}function sk(r,a){a===void 0&&(a={});var c=Um(r),f=c.coordinates,y=a.properties?a.properties:r.type==="Feature"?r.properties:{};return r5(f,y)}function ak(r,a){a===void 0&&(a={});var c=Um(r),f=c.coordinates,y=a.properties?a.properties:r.type==="Feature"?r.properties:{},w=[];return f.forEach(function(D){w.push(r5(D,y))}),Yl(w)}function r5(r,a){return r.length>1?Sv(r,a):sa(r[0],a)}function lk(r,a){var c=!0;return ll(r,function(f){ll(a,function(y){if(c===!1)return!1;c=ck(f.geometry,y.geometry)})}),c}function ck(r,a){switch(r.type){case"Point":switch(a.type){case"Point":return!fk(r.coordinates,a.coordinates);case"LineString":return!o5(a,r);case"Polygon":return!Ef(r,a)}break;case"LineString":switch(a.type){case"Point":return!o5(r,a);case"LineString":return!uk(r,a);case"Polygon":return!s5(a,r)}break;case"Polygon":switch(a.type){case"Point":return!Ef(a,r);case"LineString":return!s5(r,a);case"Polygon":return!hk(a,r)}}return!1}function o5(r,a){for(var c=0;c<r.coordinates.length-1;c++)if(dk(r.coordinates[c],r.coordinates[c+1],a.coordinates))return!0;return!1}function uk(r,a){var c=Ov(r,a);return c.features.length>0}function s5(r,a){for(var c=0,f=a.coordinates;c<f.length;c++){var y=f[c];if(Ef(y,r))return!0}var w=Ov(a,jv(r));return w.features.length>0}function hk(r,a){for(var c=0,f=r.coordinates[0];c<f.length;c++){var y=f[c];if(Ef(y,a))return!0}for(var w=0,D=a.coordinates[0];w<D.length;w++){var o=D[w];if(Ef(o,r))return!0}var j=Ov(jv(r),jv(a));return j.features.length>0}function dk(r,a,c){var f=c[0]-r[0],y=c[1]-r[1],w=a[0]-r[0],D=a[1]-r[1],o=f*D-y*w;return o!==0?!1:Math.abs(w)>=Math.abs(D)?w>0?r[0]<=c[0]&&c[0]<=a[0]:a[0]<=c[0]&&c[0]<=r[0]:D>0?r[1]<=c[1]&&c[1]<=a[1]:a[1]<=c[1]&&c[1]<=r[1]}function fk(r,a){return r[0]===a[0]&&r[1]===a[1]}function pk(r,a){var c=!1;return ll(r,function(f){ll(a,function(y){if(c===!0)return!0;c=!lk(f.geometry,y.geometry)})}),c}const gk=()=>{const[r,a]=Ce.useState(!1),[c,f]=Ce.useState(!1),y=ra(),w=F4(),D=zi(wv),o=zi(Tf),j=zi(Mv),F=zi(km),$=zi(As),oe=zi(jm),te=zi(R4),ge=zi(Df),xe=zi(vj),Ae=zi(Iv),[it,We]=Ce.useState(!1),[me,ce]=ln($l),pe=ln(Pm),[ve]=ln(V4),[De,ct]=Ce.useState({id:null,originalRule:null});Ce.useEffect(()=>{w&&St()},[w]),Ce.useEffect(()=>{St()},[$,me,F,j,oe,D,te,o,ve]);function St(){const Pt=ge.find(Dt=>Dt.name.toLowerCase()===me.toLowerCase());if(!j&&De.id&&$&&it&&(window.mapsindoors.services.LocationsService.getLocation(De.id).then(Dt=>{Dt&&($.setDisplayRule(Dt.id,De.originalRule||null),We(!1))}),ct({id:null,originalRule:null})),$&&Pt){if(a(!0),j&&y)ct(Dt=>({...Dt,id:j})),Lr(ve)?window.mapsindoors.services.LocationsService.getLocation(j).then(Dt=>{if(Dt){const Ht=Dt.properties.floor;$.setFloor(Ht);const It=$.getDisplayRule(Dt);ct(wt=>({...wt,originalRule:{...It}})),Je(Dt),If().then(wt=>{f(Dt.geometry),Es(Dt.geometry,$,wt,0,te?pt(te):void 0,xe,D)})}}):If().then(Dt=>{f(jt().geometry),Es(jt().geometry,$,Dt,0,pt(te),xe,D)});else if(F&&!Ae)Lr(ve)?window.mapsindoors.services.LocationsService.getLocation(F).then(Dt=>{if(Dt){const Ht=Dt.properties.floor;$.setFloor(Ht),y?$c().then(It=>{f(Dt.geometry),Es(Dt.geometry,$,0,It,te?pt(te):void 0,xe,D)}):rh().then(It=>{f(Dt.geometry),Es(Dt.geometry,$,It,0,te?pt(te):void 0,xe,D)})}}):y?$c().then(Dt=>{f(jt().geometry),Es(jt().geometry,$,0,Dt,pt(te),xe,D)}):rh().then(Dt=>{f(jt().geometry),Es(jt().geometry,$,Dt,0,pt(te),xe,D)});else if(Pt)if(Ae)y?(f(Pt.geometry),Es(Pt.geometry,$,0,0,pt(te),xe,D)):rh().then(Dt=>{f(Pt.geometry),Es(Pt.geometry,$,Dt,0,pt(te),xe,D)});else{const Dt=ge.find(Ht=>pk(Ht.geometry,jt().geometry));Lr(ve)?(f(Pt.geometry),Es(Pt.geometry,$,0,0,pt(te),xe,D)):Lr(Dt)?y?$c().then(Ht=>{f(jt().geometry),Es(jt().geometry,$,0,Ht,pt(te),xe,D)}):rh().then(Ht=>{f(jt().geometry),Es(jt().geometry,$,Ht,0,pt(te),xe,D)}):(y?$c().then(Ht=>{f(jt().geometry),Es(jt().geometry,$,0,Ht,pt(te),xe,D)}):rh().then(Ht=>{f(jt().geometry),Es(jt().geometry,$,Ht,0,pt(te),xe,D)}),pe&&ce(Dt.name))}}}function Je(Pt){if(it)return;const Dt=$.getDisplayRule(Pt);Dt.visible=!0,Dt.iconSize={width:Dt.iconSize.width*2,height:Dt.iconSize.height*2},Dt.iconVisible=!0,Dt.zoomFrom=0,Dt.zoomTo=999,Dt.clickable=!1,$.setDisplayRule(Pt.id,Dt),We(!0)}function jt(){const[Pt,Dt]=ve?ve.split(",").map(Number):[void 0,void 0];return{geometry:{type:"Point",coordinates:[Pt,Dt]}}}function pt(Pt){return Lr(Pt)?18:Pt}return[r,c]};function Es(r,a,c,f,y,w,D){const o=Number(w),j=Number(D),F=y!==void 0?Number(y):void 0;if(F===void 0)a.getMapView().tilt(o||0),a.getMapView().rotate(j||0),a.goTo({type:"Feature",geometry:r,properties:{}},{maxZoom:F??22,padding:{top:0,right:0,bottom:c,left:f}});else{const $=Wj(r);a.getMapView().setCenter({lat:$.geometry.coordinates[1],lng:$.geometry.coordinates[0]}),a.getMapView().tilt(o||0),a.getMapView().rotate(j||0),a.setZoom(F)}}const a5=On({key:"hideNonMatches",default:!1}),mk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 3H9V5H5V9H3V3ZM15 3H21V9H19V5H15V3ZM5 15V19H9V21H3V15H5ZM21 15V21H15V19H19V15H21Z",fill:"#666666",style:{fill:"#666666",fill:"color(display-p3 0.4000 0.4000 0.4000)",fillOpacity:1}}),en.createElement("rect",{x:9,y:9,width:6,height:6,fill:"#666666",style:{fill:"#666666",fill:"color(display-p3 0.4000 0.4000 0.4000)",fillOpacity:1}})),Sf=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M6 6L18 18",stroke:"#636971",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),en.createElement("path",{d:"M18 6L6 18",stroke:"#636971",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),PW="";l5.propTypes={isViewSelectorDisabled:et.bool,isViewSelectorVisible:et.bool};function l5({isViewSelectorDisabled:r,isViewSelectorVisible:a}){const{t:c}=Ho(),[f,y]=Ce.useState(!1),[w,D]=Ce.useState([]),[o,j]=Ce.useState(null),F=ra(),$=zi(As),oe=zi($l),te=".view-selector-portal",[ge,xe]=Ce.useState(null),Ae=Ce.useRef(null),it=Ce.useRef(null),We=6,me=60;Ce.useEffect(()=>{let St=document.querySelector(te);if(St){xe(St);return}const Je=new MutationObserver(()=>{St=document.querySelector(te),St&&(xe(St),Je.disconnect())}),jt=document.body,pt={childList:!0,subtree:!0};return Je.observe(jt,pt),()=>{Je==null||Je.disconnect()}},[]),Ce.useEffect(()=>{const St=()=>{const jt=document.querySelector(te);jt&&xe(jt)},Je=new ResizeObserver(()=>{St()});return Je.observe(document.body),()=>{Je==null||Je.disconnect()}},[F]),Ce.useEffect(()=>{var St;if($&&oe){const Je=(St=$.getVenue())==null?void 0:St.id;Je&&j(Je)}},[$,oe]),Ce.useEffect(()=>{$&&oe&&window.mapsindoors.services.VenuesService.getVenues().then(St=>{const Je=St.find(jt=>jt.name.toLowerCase()===oe.toLowerCase());Je!=null&&Je.id&&j(Je.id)})},[$,oe]),Ce.useEffect(()=>{o&&window.mapsindoors.services.VenuesService.getBuildings(o).then(St=>{D(St)})},[o]);const ce=Ce.useMemo(()=>w.map(St=>({id:St.id,name:St.buildingInfo.name})),[w]),pe=Ce.useCallback(St=>{$.fitBuilding(St),y(!1)},[$]);if(Ce.useEffect(()=>{if(!(f&&F))return;function St(Je){Ae.current&&!Ae.current.contains(Je.target)&&it.current&&!it.current.contains(Je.target)&&y(!1)}return document.addEventListener("mousedown",St),()=>{document.removeEventListener("mousedown",St)}},[f,F]),ce.length<=1||a===!1)return null;const ve=()=>Be.jsx("button",{ref:it,className:"view-selector__toggle-button",onClick:()=>y(!f),disabled:r,children:Be.jsx(mk,{})}),De=()=>{const St=Ce.useMemo(()=>F&&ce.length>We?{height:`${We*me}px`}:{},[F,ce.length]);return Be.jsx("div",{className:"building-list",style:St,children:ce.map(Je=>Be.jsx("button",{className:"building-list__item",onClick:()=>pe(Je.id),children:Be.jsx("span",{children:Je.name})},Je.id))})},ct=Be.jsxs("div",{className:"view-selector",children:[!F&&f&&Be.jsxs("div",{className:"mobile-overlay",children:[Be.jsx("div",{className:"mobile-overlay__backdrop",onClick:()=>y(!1)}),Be.jsxs("div",{className:"view-selector__container view-selector__container--mobile",children:[Be.jsxs("div",{className:"mobile-overlay__header",children:[Be.jsx("button",{className:"mobile-overlay__exit-button",onClick:()=>y(!1),"aria-label":c("Close view selector"),children:Be.jsx(Sf,{})}),Be.jsx("span",{children:c("Go to view")})]}),Be.jsx(De,{})]})]}),F?Be.jsxs("div",{className:"view-selector__button-container view-selector__button-container--desktop",children:[f&&Be.jsx("div",{ref:Ae,className:"view-selector__container view-selector__container--desktop",children:Be.jsx(De,{})}),Be.jsx(ve,{})]}):Be.jsx(ve,{})]});return ge?os.createPortal(ct,ge):null}const yk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.00177 3V5H13.0018V7H11.3742C11.0618 8.91166 10.4455 10.5244 9.43896 11.8188C10.1899 12.3437 11.1128 12.7471 12.2443 13.0299L13.2145 13.2725L12.7294 15.2128L11.7593 14.9702C10.2984 14.605 9.04252 14.0424 8.00171 13.245C6.96091 14.0424 5.70503 14.6049 4.24428 14.9701L3.27413 15.2127L2.78906 13.2724L3.75921 13.0299C4.89067 12.747 5.81358 12.3436 6.56448 11.8188C5.55798 10.5244 4.94173 8.91163 4.62931 7H3.00177V5H7.00177V3H9.00177ZM6.65973 7C6.92571 8.41424 7.37545 9.52718 8.00174 10.4013C8.62805 9.52718 9.0778 8.41425 9.34379 7H6.65973ZM16.1161 10H17.8874L22.3317 19.481L20.5207 20.3299L19.4286 18H14.5749L13.4828 20.3299L11.6719 19.481L16.1161 10ZM15.5124 16H18.4911L17.0018 12.8227L15.5124 16Z",fill:"#666666",style:{fill:"#666666",fill:"color(display-p3 0.4000 0.4000 0.4000)",fillOpacity:1}})),RW="";function c5({toggleButtonRef:r,isExpanded:a,setIsExpanded:c}){return Be.jsx("button",{ref:r,className:"language-selector__toggle-button",onClick:()=>c(f=>!f),"aria-haspopup":"listbox","aria-expanded":a,"aria-label":"Select language",children:Be.jsx(yk,{})})}function u5({supportedLanguages:r,currentLanguage:a,setLanguage:c,setIsExpanded:f}){return Be.jsx("div",{className:"language-selector__list",children:r.map(y=>Be.jsx("button",{className:`language-selector__item${a===y.code?" language-selector__item--selected":""}`,onClick:()=>{c(y.code),f(!1)},children:y.label},y.code))})}function h5({currentLanguage:r,setLanguage:a,isVisible:c}){const{t:f}=Ho(),[y,w]=Ce.useState(!1),D=Ce.useRef(null),o=Ce.useRef(null),[j,F]=Ce.useState(null),$=ra(),oe=".language-selector-portal";return Ce.useEffect(()=>{let te=document.querySelector(oe);if(te){F(te);return}const ge=new MutationObserver(()=>{te=document.querySelector(oe),te&&(F(te),ge.disconnect())});return ge.observe(document.body,{childList:!0,subtree:!0}),()=>ge.disconnect()},[]),Ce.useEffect(()=>{if(!(y&&$))return;function te(ge){D.current&&!D.current.contains(ge.target)&&o.current&&!o.current.contains(ge.target)&&w(!1)}return document.addEventListener("mousedown",te),()=>document.removeEventListener("mousedown",te)},[y,$]),!c||!j?null:os.createPortal($?Be.jsxs("div",{className:"language-selector__button-container",children:[y&&Be.jsx("div",{ref:D,className:"language-selector__container",children:Be.jsx(u5,{supportedLanguages:b4,currentLanguage:r,setLanguage:a,setIsExpanded:w})}),Be.jsx(c5,{toggleButtonRef:o,isExpanded:y,setIsExpanded:w})]}):Be.jsxs(Be.Fragment,{children:[Be.jsx(c5,{toggleButtonRef:o,isExpanded:y,setIsExpanded:w}),y&&Be.jsxs("div",{className:"language-selector-overlay",children:[Be.jsx("div",{className:"language-selector-overlay__backdrop",onClick:()=>w(!1)}),Be.jsxs("div",{className:"language-selector__container",children:[Be.jsxs("div",{className:"language-selector-overlay__header",children:[Be.jsx("button",{className:"language-selector-overlay__exit-button",onClick:()=>w(!1),"aria-label":"Close language selector",children:"×"}),Be.jsx("span",{children:f("Select language")})]}),Be.jsx(u5,{supportedLanguages:b4,currentLanguage:r,setLanguage:a,setIsExpanded:w})]})]})]}),j)}h5.propTypes={currentLanguage:et.string,setLanguage:et.func.isRequired,isVisible:et.bool};const ah=On({key:"appConfig",default:void 0}),_k=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M14.4978 10C14.4978 11.3807 13.3785 12.5 11.9978 12.5C10.6171 12.5 9.4978 11.3807 9.4978 10C9.4978 8.61929 10.6171 7.5 11.9978 7.5C13.3785 7.5 14.4978 8.61929 14.4978 10Z",stroke:"#78716C",strokeWidth:2,strokeLinejoin:"round"}),en.createElement("path",{d:"M19 10C19 14.8354 14.2437 19.1734 12.5723 20.5484C12.2352 20.8258 11.7648 20.8258 11.4277 20.5484C9.75634 19.1734 5 14.8354 5 10C5 6.13401 8.13401 3 12 3C15.866 3 19 6.13401 19 10Z",stroke:"#78716C",strokeWidth:2,strokeLinejoin:"round"})),BW="",Aa=On({key:"kioskLocation",default:null}),Yc=()=>{const r=zi(Aa),a=ra();return!(!r||r&&!a)};function d5(){const[r,a]=Ce.useState(null),c=".reset-view-portal",f=Yc(),y=zi(Mv),w=zi(As),D=zi($l),o=zi(Aa),j=ra();function F(){window.mapsindoors.services.LocationsService.getLocation(y).then(ge=>{$([ge])}).catch(ge=>{console.error("Error resetting map position:",ge)})}function $(ge){if(!w.goTo)return;const xe=w.getFloor(),Ae={type:"FeatureCollection",features:ge.filter(it=>parseInt(it.properties.floor,10)===parseInt(xe,10)).filter(it=>D&&it.properties.venueId.toLowerCase()===D.toLowerCase()).map(it=>({type:"Feature",geometry:it.geometry,properties:it.properties}))};Ae.features.length>0&&Promise.all([oe(),te()]).then(([it,We])=>{w.goTo(Ae,{maxZoom:22,padding:{bottom:it,left:We,top:0,right:0}})})}function oe(){return new Promise(ge=>{j?o?If().then(xe=>ge(xe)):ge(0):ge(200)})}function te(){return new Promise(ge=>{j?o?ge(0):$c().then(xe=>ge(xe)):ge(0)})}return Ce.useEffect(()=>{let ge=document.querySelector(c);if(ge){a(ge);return}const xe=new MutationObserver(()=>{ge=document.querySelector(c),ge&&(a(ge),xe.disconnect())});return xe.observe(document.body,{childList:!0,subtree:!0}),()=>xe.disconnect()},[]),!f||!r?null:os.createPortal(Be.jsx("button",{className:"reset-kiosk-view-button",onClick:F,title:"Reset to initial kiosk view","aria-label":"Reset to initial kiosk view",children:Be.jsx(_k,{})}),r)}d5.propTypes={onReset:et.func,isVisible:et.bool},f5.propTypes={onLocationClick:et.func,onMapPositionKnown:et.func.isRequired,useMapProviderModule:et.bool.isRequired,onMapPositionInvestigating:et.func.isRequired,onViewModeSwitchKnown:et.func.isRequired,resetCount:et.number.isRequired,mapOptions:et.object,gmMapId:et.string,isWayfindingOrDirections:et.bool,currentLanguage:et.string,setLanguage:et.func,devicePosition:et.object};let kv;function f5({onLocationClick:r,onMapPositionKnown:a,useMapProviderModule:c,onMapPositionInvestigating:f,onViewModeSwitchKnown:y,resetCount:w,mapOptions:D,gmMapId:o,isWayfindingOrDirections:j,currentLanguage:F,setLanguage:$,devicePosition:oe}){const te=zi(xv),ge=zi(bv),xe=zi(Lm),[Ae,it]=ln(Nm),[We,me]=ln(As),[,ce]=ln(Cm),[,pe]=ln(vv),ve=zi(zm),De=zi(Om),ct=zi(j4),St=zi(wv),Je=zi(jm),[,jt]=ln(k4),pt=zi(P4),[,Pt]=ln(Mf),Dt=zi(a5),Ht=zi(ah),[It,wt]=Ce.useState(!1),[$t,gi]=Ce.useState(!1);yj(te);const[mi,Q]=gk();Ce.useEffect(()=>{if(!pt||ge===null&&xe===null)return;let B;const U=pt.modules.map(Y=>Y.toLowerCase()).includes("mapbox");c?U?xe&&(B=$o.Mapbox):ge&&(B=$o.Google):xe?B=$o.Mapbox:B=$o.Google,B?it(B):(Pt({text:"Please provide a Mapbox Access Token or Google Maps API key to show a map.",type:"error"}),it(void 0))},[ge,xe,pt]),Ce.useEffect(()=>{mi&&f()},[mi]),Ce.useEffect(()=>{Q&&a()},[Q]),Ce.useEffect(()=>{if(!We)return;const B=ve||De;if(!B)return;const U=B.map(Y=>Y.id);Dt||!We.highlight?We.filter(U):We.highlight(U)},[ve,De,We,Dt]),Ce.useEffect(()=>{We&&(isNaN(parseInt(Je))||We.getMapView().tilt(parseInt(Je)),isNaN(parseInt(St))||We.getMapView().rotate(parseInt(St)))},[St,Je,We]);const J=B=>{M(B)},M=B=>{if(B&&kv){let U=B.getTileURL();if(U){U=B.getTileURL().replace("default",kv);const Y=U==null?void 0:U.replace("{floor}",B.getFloor());B.getMapView().setMapsIndoorsTileURL(Y)}}},z=(B,U,Y)=>{B.on("mouseenter",()=>{var Qe;const de=B.getHoveredLocation();((Qe=de==null?void 0:de.properties.locationSettings)==null?void 0:Qe.selectable)===!1&&B.unhoverLocation()}),B.setDisplayRule(["MI_BUILDING_OUTLINE"],{visible:!1}),B.on("click",de=>r(de)),B.once("building_changed",()=>J(B)),B.on("floor_changed",()=>M(B)),me(B),window.mapsIndoorsInstance=B;const ee=new CustomEvent("mapsIndoorsInstanceAvailable");window.dispatchEvent(ee);let ne;Ae===$o.Google?ne=new window.mapsindoors.directions.GoogleMapsProvider:Ae===$o.Mapbox&&(ne=new window.mapsindoors.directions.MapboxProvider(xe));const ie=new window.mapsindoors.services.DirectionsService(ne);pe(ie),me(B),U.nodeName==="MI-MY-POSITION"?U.addEventListener("position_received",de=>{de.detail.accurate===!0&&ce(de.detail.position)}):U.on("position_received",de=>{de.accurate===!0&&ce(de.position)}),jt(U),y(Y)};return Ce.useEffect(()=>{kv=ct||"default",M(We)},[ct]),Ce.useEffect(()=>{var B,U,Y,ee;Ht&&(Lr((B=Ht==null?void 0:Ht.appSettings)==null?void 0:B.viewSelector)?wt(!1):wt(((U=Ht==null?void 0:Ht.appSettings)==null?void 0:U.viewSelector.trim().toLowerCase())==="true"),Lr((Y=Ht==null?void 0:Ht.appSettings)==null?void 0:Y.languageSelector)?gi(!1):gi(((ee=Ht==null?void 0:Ht.appSettings)==null?void 0:ee.languageSelector.trim().toLowerCase())==="true"))},[Ht]),Be.jsxs(Be.Fragment,{children:[te&&Be.jsx(O4,{apiKey:te,mapboxAccessToken:Ae===$o.Mapbox?xe:void 0,gmApiKey:Ae===$o.Google?ge:void 0,onInitialized:z,resetUICounter:w,mapOptions:D,gmMapId:o,devicePosition:oe}),te&&Be.jsxs(Be.Fragment,{children:[Be.jsx(l5,{isViewSelectorVisible:It,isViewSelectorDisabled:j}),Be.jsx(h5,{currentLanguage:F,setLanguage:$,isVisible:$t}),Be.jsx(d5,{})]})]})}const Ea=On({key:"primaryColor",default:"#005655"}),FW="",Pv=On({key:"logo",default:void 0});function vk(){const r=zi(Ea),a=zi(Pv);return Be.jsx("div",{className:"splash-screen",children:Be.jsxs("div",{className:"splash-screen__container",children:[Be.jsx("img",{className:"splash-screen__logo "+(a?"splash-screen__logo--visible":""),src:a,alt:""}),Be.jsx("div",{className:"splash-screen__loader",style:{border:`8px solid ${r}33`,borderLeft:`8px solid ${r}`}})]})})}function p5(r,a){if(r==null)return{};var c={};for(var f in r)if({}.hasOwnProperty.call(r,f)){if(a.indexOf(f)!==-1)continue;c[f]=r[f]}return c}function Rv(r,a){return Rv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,f){return c.__proto__=f,c},Rv(r,a)}function g5(r,a){r.prototype=Object.create(a.prototype),r.prototype.constructor=r,Rv(r,a)}function xk(r,a){return r.classList?!!a&&r.classList.contains(a):(" "+(r.className.baseVal||r.className)+" ").indexOf(" "+a+" ")!==-1}function bk(r,a){r.classList?r.classList.add(a):xk(r,a)||(typeof r.className=="string"?r.className=r.className+" "+a:r.setAttribute("class",(r.className&&r.className.baseVal||"")+" "+a))}function m5(r,a){return r.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function wk(r,a){r.classList?r.classList.remove(a):typeof r.className=="string"?r.className=m5(r.className,a):r.setAttribute("class",m5(r.className&&r.className.baseVal||"",a))}const y5={disabled:!1};var Mk=process.env.NODE_ENV!=="production"?et.oneOfType([et.number,et.shape({enter:et.number,exit:et.number,appear:et.number}).isRequired]):null,Ik=process.env.NODE_ENV!=="production"?et.oneOfType([et.string,et.shape({enter:et.string,exit:et.string,active:et.string}),et.shape({enter:et.string,enterDone:et.string,enterActive:et.string,exit:et.string,exitDone:et.string,exitActive:et.string})]):null;const _5=Ce.createContext(null);var v5=function(a){return a.scrollTop},Cf="unmounted",Gc="exited",Zc="entering",lh="entered",Bv="exiting",cl=function(r){g5(a,r);function a(f,y){var w;w=r.call(this,f,y)||this;var D=y,o=D&&!D.isMounting?f.enter:f.appear,j;return w.appearStatus=null,f.in?o?(j=Gc,w.appearStatus=Zc):j=lh:f.unmountOnExit||f.mountOnEnter?j=Cf:j=Gc,w.state={status:j},w.nextCallback=null,w}a.getDerivedStateFromProps=function(y,w){var D=y.in;return D&&w.status===Cf?{status:Gc}:null};var c=a.prototype;return c.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},c.componentDidUpdate=function(y){var w=null;if(y!==this.props){var D=this.state.status;this.props.in?D!==Zc&&D!==lh&&(w=Zc):(D===Zc||D===lh)&&(w=Bv)}this.updateStatus(!1,w)},c.componentWillUnmount=function(){this.cancelNextCallback()},c.getTimeouts=function(){var y=this.props.timeout,w,D,o;return w=D=o=y,y!=null&&typeof y!="number"&&(w=y.exit,D=y.enter,o=y.appear!==void 0?y.appear:D),{exit:w,enter:D,appear:o}},c.updateStatus=function(y,w){if(y===void 0&&(y=!1),w!==null)if(this.cancelNextCallback(),w===Zc){if(this.props.unmountOnExit||this.props.mountOnEnter){var D=this.props.nodeRef?this.props.nodeRef.current:os.findDOMNode(this);D&&v5(D)}this.performEnter(y)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Gc&&this.setState({status:Cf})},c.performEnter=function(y){var w=this,D=this.props.enter,o=this.context?this.context.isMounting:y,j=this.props.nodeRef?[o]:[os.findDOMNode(this),o],F=j[0],$=j[1],oe=this.getTimeouts(),te=o?oe.appear:oe.enter;if(!y&&!D||y5.disabled){this.safeSetState({status:lh},function(){w.props.onEntered(F)});return}this.props.onEnter(F,$),this.safeSetState({status:Zc},function(){w.props.onEntering(F,$),w.onTransitionEnd(te,function(){w.safeSetState({status:lh},function(){w.props.onEntered(F,$)})})})},c.performExit=function(){var y=this,w=this.props.exit,D=this.getTimeouts(),o=this.props.nodeRef?void 0:os.findDOMNode(this);if(!w||y5.disabled){this.safeSetState({status:Gc},function(){y.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:Bv},function(){y.props.onExiting(o),y.onTransitionEnd(D.exit,function(){y.safeSetState({status:Gc},function(){y.props.onExited(o)})})})},c.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},c.safeSetState=function(y,w){w=this.setNextCallback(w),this.setState(y,w)},c.setNextCallback=function(y){var w=this,D=!0;return this.nextCallback=function(o){D&&(D=!1,w.nextCallback=null,y(o))},this.nextCallback.cancel=function(){D=!1},this.nextCallback},c.onTransitionEnd=function(y,w){this.setNextCallback(w);var D=this.props.nodeRef?this.props.nodeRef.current:os.findDOMNode(this),o=y==null&&!this.props.addEndListener;if(!D||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var j=this.props.nodeRef?[this.nextCallback]:[D,this.nextCallback],F=j[0],$=j[1];this.props.addEndListener(F,$)}y!=null&&setTimeout(this.nextCallback,y)},c.render=function(){var y=this.state.status;if(y===Cf)return null;var w=this.props,D=w.children;w.in,w.mountOnEnter,w.unmountOnExit,w.appear,w.enter,w.exit,w.timeout,w.addEndListener,w.onEnter,w.onEntering,w.onEntered,w.onExit,w.onExiting,w.onExited,w.nodeRef;var o=p5(w,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ce.createElement(_5.Provider,{value:null},typeof D=="function"?D(y,o):Ce.cloneElement(Ce.Children.only(D),o))},a}(Ce.Component);cl.contextType=_5,cl.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:et.shape({current:typeof Element>"u"?et.any:function(r,a,c,f,y,w){var D=r[a];return et.instanceOf(D&&"ownerDocument"in D?D.ownerDocument.defaultView.Element:Element)(r,a,c,f,y,w)}}),children:et.oneOfType([et.func.isRequired,et.element.isRequired]).isRequired,in:et.bool,mountOnEnter:et.bool,unmountOnExit:et.bool,appear:et.bool,enter:et.bool,exit:et.bool,timeout:function(a){var c=Mk;a.addEndListener||(c=c.isRequired);for(var f=arguments.length,y=new Array(f>1?f-1:0),w=1;w<f;w++)y[w-1]=arguments[w];return c.apply(void 0,[a].concat(y))},addEndListener:et.func,onEnter:et.func,onEntering:et.func,onEntered:et.func,onExit:et.func,onExiting:et.func,onExited:et.func}:{};function ch(){}cl.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ch,onEntering:ch,onEntered:ch,onExit:ch,onExiting:ch,onExited:ch},cl.UNMOUNTED=Cf,cl.EXITED=Gc,cl.ENTERING=Zc,cl.ENTERED=lh,cl.EXITING=Bv;const x5=cl;var Tk=function(a,c){return a&&c&&c.split(" ").forEach(function(f){return bk(a,f)})},Fv=function(a,c){return a&&c&&c.split(" ").forEach(function(f){return wk(a,f)})},Uv=function(r){g5(a,r);function a(){for(var f,y=arguments.length,w=new Array(y),D=0;D<y;D++)w[D]=arguments[D];return f=r.call.apply(r,[this].concat(w))||this,f.appliedClasses={appear:{},enter:{},exit:{}},f.onEnter=function(o,j){var F=f.resolveArguments(o,j),$=F[0],oe=F[1];f.removeClasses($,"exit"),f.addClass($,oe?"appear":"enter","base"),f.props.onEnter&&f.props.onEnter(o,j)},f.onEntering=function(o,j){var F=f.resolveArguments(o,j),$=F[0],oe=F[1],te=oe?"appear":"enter";f.addClass($,te,"active"),f.props.onEntering&&f.props.onEntering(o,j)},f.onEntered=function(o,j){var F=f.resolveArguments(o,j),$=F[0],oe=F[1],te=oe?"appear":"enter";f.removeClasses($,te),f.addClass($,te,"done"),f.props.onEntered&&f.props.onEntered(o,j)},f.onExit=function(o){var j=f.resolveArguments(o),F=j[0];f.removeClasses(F,"appear"),f.removeClasses(F,"enter"),f.addClass(F,"exit","base"),f.props.onExit&&f.props.onExit(o)},f.onExiting=function(o){var j=f.resolveArguments(o),F=j[0];f.addClass(F,"exit","active"),f.props.onExiting&&f.props.onExiting(o)},f.onExited=function(o){var j=f.resolveArguments(o),F=j[0];f.removeClasses(F,"exit"),f.addClass(F,"exit","done"),f.props.onExited&&f.props.onExited(o)},f.resolveArguments=function(o,j){return f.props.nodeRef?[f.props.nodeRef.current,o]:[o,j]},f.getClassNames=function(o){var j=f.props.classNames,F=typeof j=="string",$=F&&j?j+"-":"",oe=F?""+$+o:j[o],te=F?oe+"-active":j[o+"Active"],ge=F?oe+"-done":j[o+"Done"];return{baseClassName:oe,activeClassName:te,doneClassName:ge}},f}var c=a.prototype;return c.addClass=function(y,w,D){var o=this.getClassNames(w)[D+"ClassName"],j=this.getClassNames("enter"),F=j.doneClassName;w==="appear"&&D==="done"&&F&&(o+=" "+F),D==="active"&&y&&v5(y),o&&(this.appliedClasses[w][D]=o,Tk(y,o))},c.removeClasses=function(y,w){var D=this.appliedClasses[w],o=D.base,j=D.active,F=D.done;this.appliedClasses[w]={},o&&Fv(y,o),j&&Fv(y,j),F&&Fv(y,F)},c.render=function(){var y=this.props;y.classNames;var w=p5(y,["classNames"]);return Ce.createElement(x5,Am({},w,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},a}(Ce.Component);Uv.defaultProps={classNames:""},Uv.propTypes=process.env.NODE_ENV!=="production"?Am({},x5.propTypes,{classNames:Ik,onEnter:et.func,onEntering:et.func,onEntered:et.func,onExit:et.func,onExiting:et.func,onExited:et.func}):{};const Dk=Uv,UW="",Ak=r=>en.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 1.66667C0 0.746192 0.746193 0 1.66667 0H11.6667C12.5872 0 13.3333 0.746193 13.3333 1.66667V20H8.33333V17.5C8.33333 16.5795 7.58714 15.8333 6.66667 15.8333C5.74619 15.8333 5 16.5795 5 17.5V20H0V1.66667ZM14.5833 8.33333H18.3333C19.2538 8.33333 20 9.0795 20 10V20H14.5833V8.33333ZM3.33333 2.5C2.8731 2.5 2.5 2.8731 2.5 3.33333V5.41667C2.5 5.8769 2.8731 6.25 3.33333 6.25H4.58333C5.04357 6.25 5.41667 5.8769 5.41667 5.41667V3.33333C5.41667 2.8731 5.04357 2.5 4.58333 2.5H3.33333ZM7.91667 3.33333C7.91667 2.8731 8.28977 2.5 8.75 2.5H10C10.4602 2.5 10.8333 2.8731 10.8333 3.33333V5.41667C10.8333 5.8769 10.4602 6.25 10 6.25H8.75C8.28976 6.25 7.91667 5.8769 7.91667 5.41667V3.33333ZM3.33333 9.58333C2.8731 9.58333 2.5 9.95642 2.5 10.4167V12.5C2.5 12.9602 2.8731 13.3333 3.33333 13.3333H4.58333C5.04357 13.3333 5.41667 12.9602 5.41667 12.5V10.4167C5.41667 9.95642 5.04357 9.58333 4.58333 9.58333H3.33333ZM7.91667 10.4167C7.91667 9.95642 8.28977 9.58333 8.75 9.58333H10C10.4602 9.58333 10.8333 9.95642 10.8333 10.4167V12.5C10.8333 12.9602 10.4602 13.3333 10 13.3333H8.75C8.28976 13.3333 7.91667 12.9602 7.91667 12.5V10.4167Z",fill:"#707070"})),VW="";b5.propTypes={venue:et.object.isRequired,isCurrent:et.bool,onVenueClicked:et.func.isRequired};function b5({venue:r,isCurrent:a,onVenueClicked:c}){const{t:f}=Ho(),[y,w]=Ce.useState({});return Ce.useEffect(()=>()=>{w({})},[]),Ce.useEffect(()=>{const D={};r.image&&(D.backgroundImage=`url('${r.image}')`),w(D)},[r]),Be.jsxs("button",{className:"venue",onClick:()=>c(),children:[Be.jsx("div",{className:"venue__image",style:y}),Be.jsxs("div",{className:"venue__content",children:[Be.jsx("div",{children:r.venueInfo.name}),a&&Be.jsx("div",{className:"venue__current",children:f("Current")})]})]})}const Vm=On({key:"isLocationClicked",default:!1});w5.propTypes={onOpen:et.func,onClose:et.func,active:et.bool};function w5({onOpen:r,onClose:a,active:c}){const{t:f}=Ho(),y=Ce.useRef(null),w=zi(Df),[,D]=ln(Iv),[o,j]=ln($l),[,F]=ln(Vm),$=document.querySelector(".venue-selector-portal"),oe=xe=>{D(!0),j(xe.name),te()},te=()=>{c?a():r()};function ge(xe){oe(xe),F(!1)}return Be.jsxs(Be.Fragment,{children:[!c&&$&&os.createPortal(Be.jsx("button",{className:"venue-selector__button",onClick:()=>r(),"aria-label":f("Venues"),children:Be.jsx(Ak,{})}),$),Be.jsx(Dk,{in:c,nodeRef:y,timeout:400,classNames:"venue-selector__content",unmountOnExit:!0,children:Be.jsxs("div",{className:"venue-selector__content",ref:y,children:[Be.jsxs("div",{className:"venue-selector__header",children:[Be.jsx("h1",{children:f("Select venue")}),Be.jsx("button",{className:"venue-selector__button",onClick:()=>a(),"aria-label":f("Close"),children:Be.jsx(Sf,{})})]}),Be.jsx("div",{className:"venue-selector__list",children:w.map(xe=>Be.jsx(b5,{isCurrent:(o==null?void 0:o.toLowerCase())===xe.name.toLowerCase(),venue:xe,onVenueClicked:()=>ge(xe)},xe.id))})]})})]})}const M5=Ce.createContext(),ul=On({key:"currentLocation",default:null}),Ek="Left",Sk="Right",Ck="Up",Nk="Down",uh={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Vv={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},I5="mousemove",T5="mouseup",Lk="touchend",zk="touchmove",Ok="touchstart";function jk(r,a,c,f){return r>a?c>0?Sk:Ek:f>0?Nk:Ck}function D5(r,a){if(a===0)return r;const c=Math.PI/180*a,f=r[0]*Math.cos(c)+r[1]*Math.sin(c),y=r[1]*Math.cos(c)-r[0]*Math.sin(c);return[f,y]}function kk(r,a){const c=$=>{const oe="touches"in $;oe&&$.touches.length>1||r((te,ge)=>{ge.trackMouse&&!oe&&(document.addEventListener(I5,f),document.addEventListener(T5,D));const{clientX:xe,clientY:Ae}=oe?$.touches[0]:$,it=D5([xe,Ae],ge.rotationAngle);return ge.onTouchStartOrOnMouseDown&&ge.onTouchStartOrOnMouseDown({event:$}),Object.assign(Object.assign(Object.assign({},te),Vv),{initial:it.slice(),xy:it,start:$.timeStamp||0})})},f=$=>{r((oe,te)=>{const ge="touches"in $;if(ge&&$.touches.length>1)return oe;if($.timeStamp-oe.start>te.swipeDuration)return oe.swiping?Object.assign(Object.assign({},oe),{swiping:!1}):oe;const{clientX:xe,clientY:Ae}=ge?$.touches[0]:$,[it,We]=D5([xe,Ae],te.rotationAngle),me=it-oe.xy[0],ce=We-oe.xy[1],pe=Math.abs(me),ve=Math.abs(ce),De=($.timeStamp||0)-oe.start,ct=Math.sqrt(pe*pe+ve*ve)/(De||1),St=[me/(De||1),ce/(De||1)],Je=jk(pe,ve,me,ce),jt=typeof te.delta=="number"?te.delta:te.delta[Je.toLowerCase()]||uh.delta;if(pe<jt&&ve<jt&&!oe.swiping)return oe;const pt={absX:pe,absY:ve,deltaX:me,deltaY:ce,dir:Je,event:$,first:oe.first,initial:oe.initial,velocity:ct,vxvy:St};pt.first&&te.onSwipeStart&&te.onSwipeStart(pt),te.onSwiping&&te.onSwiping(pt);let Pt=!1;return(te.onSwiping||te.onSwiped||te[`onSwiped${Je}`])&&(Pt=!0),Pt&&te.preventScrollOnSwipe&&te.trackTouch&&$.cancelable&&$.preventDefault(),Object.assign(Object.assign({},oe),{first:!1,eventData:pt,swiping:!0})})},y=$=>{r((oe,te)=>{let ge;if(oe.swiping&&oe.eventData){if($.timeStamp-oe.start<te.swipeDuration){ge=Object.assign(Object.assign({},oe.eventData),{event:$}),te.onSwiped&&te.onSwiped(ge);const xe=te[`onSwiped${ge.dir}`];xe&&xe(ge)}}else te.onTap&&te.onTap({event:$});return te.onTouchEndOrOnMouseUp&&te.onTouchEndOrOnMouseUp({event:$}),Object.assign(Object.assign(Object.assign({},oe),Vv),{eventData:ge})})},w=()=>{document.removeEventListener(I5,f),document.removeEventListener(T5,D)},D=$=>{w(),y($)},o=($,oe)=>{let te=()=>{};if($&&$.addEventListener){const ge=Object.assign(Object.assign({},uh.touchEventOptions),oe.touchEventOptions),xe=[[Ok,c,ge],[zk,f,Object.assign(Object.assign({},ge),oe.preventScrollOnSwipe?{passive:!1}:{})],[Lk,y,ge]];xe.forEach(([Ae,it,We])=>$.addEventListener(Ae,it,We)),te=()=>xe.forEach(([Ae,it])=>$.removeEventListener(Ae,it))}return te},F={ref:$=>{$!==null&&r((oe,te)=>{if(oe.el===$)return oe;const ge={};return oe.el&&oe.el!==$&&oe.cleanUpTouch&&(oe.cleanUpTouch(),ge.cleanUpTouch=void 0),te.trackTouch&&$&&(ge.cleanUpTouch=o($,te)),Object.assign(Object.assign(Object.assign({},oe),{el:$}),ge)})}};return a.trackMouse&&(F.onMouseDown=c),[F,o]}function Pk(r,a,c,f){return!a.trackTouch||!r.el?(r.cleanUpTouch&&r.cleanUpTouch(),Object.assign(Object.assign({},r),{cleanUpTouch:void 0})):r.cleanUpTouch?a.preventScrollOnSwipe!==c.preventScrollOnSwipe||a.touchEventOptions.passive!==c.touchEventOptions.passive?(r.cleanUpTouch(),Object.assign(Object.assign({},r),{cleanUpTouch:f(r.el,a)})):r:Object.assign(Object.assign({},r),{cleanUpTouch:f(r.el,a)})}function A5(r){const{trackMouse:a}=r,c=en.useRef(Object.assign({},Vv)),f=en.useRef(Object.assign({},uh)),y=en.useRef(Object.assign({},f.current));y.current=Object.assign({},f.current),f.current=Object.assign(Object.assign({},uh),r);let w;for(w in uh)f.current[w]===void 0&&(f.current[w]=uh[w]);const[D,o]=en.useMemo(()=>kk(j=>c.current=j(c.current,f.current),{trackMouse:a}),[a]);return c.current=Pk(c.current,f.current,y.current,o),D}const Wn={MIN:"MIN",FIT:"FIT",MAX:"MAX"},QW="",hh=Ce.forwardRef(function({children:a,isOpen:c,initialSnapPoint:f,minimizedHeight:y},w){const D=Ce.useRef(),o=Ce.useRef(),j=Ce.useRef(),F=Ce.useRef(),$=Ce.useRef(),[oe,te]=Ce.useState({}),[ge,xe]=Ce.useState(!1),[Ae,it]=Ce.useState(null),We=Ce.useContext(M5),me=Ce.useRef();Ce.useImperativeHandle(w,()=>({setSnapPoint(Je){ce(Je)}}));function ce(Je){requestAnimationFrame(()=>{switch(Je){case Wn.MAX:te({height:`${We.current.clientHeight}px`}),j.current=We.current.clientHeight;break;case Wn.FIT:{const jt=o.current.children.item(0).clientHeight;jt<y?(te({height:`${y}px`}),j.current=y,Je=Wn.MIN):(te({height:`${jt}px`}),j.current=jt);break}case Wn.MIN:te({height:`${y}px`}),j.current=y;break}}),$.current=Je}Ce.useEffect(()=>(c&&$.current===Wn.FIT?pe():ve(),()=>{ve()}),[c,$.current]);function pe(){me.current&&me.current.disconnect(),me.current=new MutationObserver(()=>{ce(Wn.FIT)}),me.current.observe(o.current,{childList:!0,subtree:!0})}function ve(){me.current&&me.current.disconnect()}const De=A5({onSwipeStart:()=>{xe(!0),it(null),F.current=D.current.clientHeight},onSwiping:Je=>{const jt=Math.max(F.current-Je.deltaY,y);te({height:`${jt}px`})},onSwiped:Je=>{xe(!1);const jt=Rk(Je.dir,Je.deltaY,$.current,y,We.current.clientHeight,o.current.children.item(0));jt&&(ce(jt),it(jt))},trackMouse:!0,preventScrollOnSwipe:!0});Ce.useEffect(()=>{c&&($.current=f,ce(f))},[y,f,c]);const ct=Je=>{De.ref(Je),D.current=Je},St=Ce.Children.map(a,Je=>Ce.cloneElement(Je,{snapPointSwipedByUser:Ae}));return Be.jsx("div",{...De,ref:ct,className:`sheet ${c?"sheet--active":""} ${ge?"sheet--dragging":""} ${$.current===Wn.MAX?"sheet--max":""}`,style:oe,children:Be.jsx("div",{ref:o,className:`sheet__content ${$.current===Wn.MIN?"sheet__content--no-scroll":""}`,style:oe,children:St})})});hh.propTypes={children:et.node.isRequired,isOpen:et.bool.isRequired,initialSnapPoint:et.string.isRequired,minimizedHeight:et.number.isRequired};function Rk(r,a,c,f,y,w){if(Math.abs(a)<60)return c;let o;return r.toUpperCase()==="DOWN"?c===Wn.MAX?Bk(w)?o=Wn.MIN:w.clientHeight<=y&&w.clientHeight>f?o=Wn.FIT:o=Wn.MIN:c===Wn.FIT&&(o=Wn.MIN):r.toUpperCase()==="UP"&&(c===Wn.MIN?w.clientHeight<=f||w.clientHeight>y?o=Wn.MAX:o=Wn.FIT:c===Wn.FIT&&(o=Wn.MAX)),o}function Bk(r){if(!r)return!1;if(r.scrollHeight>r.clientHeight)return!0;for(const a of r.children)if(a.scrollHeight>a.clientHeight)return!0;return!1}const HW="",$W="",Fk=(r,a)=>{const[c,f]=Ce.useState(void 0),[y,w]=Ce.useState(void 0);return Ce.useEffect(()=>{const D=(o=!1)=>{var F,$;const j=((F=a.current)==null?void 0:F.scrollHeight)>(($=a.current)==null?void 0:$.clientHeight);f(j),o===!0&&w(j)};D(!0),a.current&&new ResizeObserver(D).observe(a.current)},[r,a]),[c,y]},dh=()=>A5({onSwiping:({event:r})=>r.stopPropagation()});function E5(r){const a=r.geometry.type==="Point"?r.geometry.coordinates:r.properties.anchor.coordinates;return{lat:a[1],lng:a[0],floor:r.properties.floor}}const Nf=On({key:"directionsResponse",default:null}),Qm=On({key:"hasFoundRoute",default:!0}),S5=On({key:"shuttleBusOn",default:!1}),C5=(r,a,c,f,y)=>{const[w,D]=Ce.useState(),[o,j]=Ce.useState(),[F,$]=ln(Qm),[,oe]=ln(Nf),[te,ge]=Ce.useState(),xe=zi(S5);return Ce.useEffect(()=>{ge(!1);let Ae=!0;return r!=null&&r.geometry&&(a!=null&&a.geometry)&&c.getRoute({origin:E5(r),destination:E5(a),travelMode:f,avoidStairs:y,excludeHighwayTypes:xe?[]:["busway"]}).then(it=>{if(Ae)if(it&&it.legs){const We=it.legs.reduce((ce,pe)=>ce+pe.distance.value,0),me=it.legs.reduce((ce,pe)=>ce+pe.duration.value,0);D(We),j(me),oe({originLocation:r,destinationLocation:a,totalDistance:We,totalTime:me,directionsResult:it}),$(!0),ge(!0)}else $(!1)},()=>{Ae&&$(!1)}),()=>{Ae=!1}},[r,a,c,y,f,xe]),[w,o,F,te]},Wc={WALKING:"WALKING",DRIVING:"DRIVING",BICYCLING:"BICYCLING"},Lf=On({key:"travelMode",default:Wc.WALKING}),zf=On({key:"accessibilityOn",default:!1}),Hm=On({key:"showExternalIDs",default:!1});function N5(r,a){const c=zi(Nm),[f,y]=Ce.useState(!1),w=r.getMap();Ce.useEffect(()=>{a&&y(!1)},[a]);function D(j,F,$,oe){const te=ge=>{if(!$)return;F.getMap().queryRenderedFeatures(ge.point).length?oe(!1):oe(!0)};return j.on("click",te),()=>{j.off("click",te)}}function o(j,F,$,oe){const te=()=>{$&&oe(!1)},ge=()=>{$&&oe(!0)};F.addListener("click",te);const xe=j.addListener("click",ge);return()=>{F.removeListener("click",te),xe.remove()}}return Ce.useEffect(()=>{let j;return c===$o.Mapbox&&(j=D(w,r,a,y)),c===$o.Google&&(j=o(w,r,a,y)),()=>j==null?void 0:j()},[r,a]),f}const YW="",Uk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M12 7.75V12L14.75 14.75M21.25 12C21.25 17.1086 17.1086 21.25 12 21.25C6.89137 21.25 2.75 17.1086 2.75 12C2.75 6.89137 6.89137 2.75 12 2.75C17.1086 2.75 21.25 6.89137 21.25 12Z",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Vk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M8 10L11.6464 13.6464C11.8417 13.8417 12.1583 13.8417 12.3536 13.6464L16 10",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Qk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M16 14L12.3536 10.3536C12.1583 10.1583 11.8417 10.1583 11.6464 10.3536L8 14",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4500 0.4500 0.4500)",strokeOpacity:1},strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),qc=On({key:"language",default:void 0});L5.propTypes={openingHours:et.object,isMondayFirstDayOfTheWeek:et.bool,onExpand:et.func};function L5({openingHours:r,isMondayFirstDayOfTheWeek:a=!0,onExpand:c}){const{t:f}=Ho(),[y,w]=Ce.useState(!1),o=zi(qc)??navigator.language,j=Ce.useMemo(()=>new Date(2020,0,1,13).toLocaleTimeString(o).match(/AM|PM/)!==null,[o]),F=new Date().getDay(),$=Ce.useMemo(()=>{const pe=[];for(let ve=0;ve<7;ve++)pe.push(new Date(2024,0,ve+1));if(!a){const ve=pe.pop();pe.unshift(ve)}return pe},[a]),oe=Ce.useMemo(()=>a?F===0?6:F-1:F,[F,a]),{standardOpeningHours:te}=r||{},ge=pe=>{const[ve,De]=pe.split(":");return new Date(0,0,0,ve,De).toLocaleTimeString(o,{hour:"2-digit",minute:"2-digit",hour12:j})},xe=pe=>{const ve=pe.toLocaleString("en-US",{weekday:"long"}).toLowerCase(),De=te==null?void 0:te[ve];return!(De!=null&&De.startTime)||!(De!=null&&De.endTime)||De.closedAllDay?{text:f("Closed"),isClosed:!0}:{text:`${ge(De.startTime)} - ${ge(De.endTime)}`,isClosed:!1}},Ae=Ce.useCallback(pe=>{if(!pe||pe.closedAllDay||!pe.startHours)return!1;const ve=new Date,De=ve.getHours()*60+ve.getMinutes(),[ct,St]=pe.startTime.split(":"),[Je,jt]=pe.endTime.split(":"),pt=parseInt(ct)*60+parseInt(St),Pt=parseInt(Je)*60+parseInt(jt);return De>=pt&&De<=Pt},[]),We=Ce.useCallback(()=>{const pe=$[oe].toLocaleString("en-US",{weekday:"long"}).toLowerCase();return Ae(te==null?void 0:te[pe])?"Open":"Closed"},[te,$,oe,Ae,f])(),me=pe=>pe.charAt(0).toUpperCase()+pe.slice(1),ce=()=>{w(pe=>!pe)};return Ce.useEffect(()=>{y&&typeof c=="function"&&c()},[y,c]),Be.jsxs("div",{className:"opening-hours",children:[Be.jsxs("button",{className:"contact-action-button contact-action-button--opening-hours",onClick:ce,children:[Be.jsx("div",{className:"contact-action-button__icon-wrapper",children:Be.jsx(Uk,{})}),Be.jsx("div",{className:"contact-action-button__text",children:xe($[oe]).text}),Be.jsx("span",{className:`contact-action-button--opening-hours__status contact-action-button--opening-hours__status--${We.toLowerCase()}`,children:f(We)}),y?Be.jsx(Qk,{}):Be.jsx(Vk,{})]}),y&&Be.jsx("ul",{className:"opening-hours__list",children:$.map(pe=>{const ve=xe(pe);return Be.jsxs("li",{className:"opening-hours__list-item",children:[Be.jsx("span",{className:"opening-hours__day",children:me(pe.toLocaleString(o,{weekday:"long"}))}),Be.jsx("span",{className:`opening-hours__hours ${ve.isClosed?"opening-hours__hours--closed":""}`,children:ve.text})]},pe)})})]})}const Hk=Ce.memo(L5);function Qv(r,a,c){return(a=function(f){var y=function(w,D){if(typeof w!="object"||!w)return w;var o=w[Symbol.toPrimitive];if(o!==void 0){var j=o.call(w,D||"default");if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(w)}(f,"string");return typeof y=="symbol"?y:y+""}(a))in r?Object.defineProperty(r,a,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[a]=c,r}var Hv={click:"onClick",focusin:"onFocus",focusout:"onFocus",mousedown:"onMouseDown",mouseup:"onMouseUp",touchstart:"onTouchStart",touchend:"onTouchEnd"},z5=function(r){var a=r.children,c=r.onClickAway,f=r.focusEvent,y=f===void 0?"focusin":f,w=r.mouseEvent,D=w===void 0?"click":w,o=r.touchEvent,j=o===void 0?"touchend":o,F=Ce.useRef(null),$=Ce.useRef(null),oe=Ce.useRef(!1);Ce.useEffect(function(){return setTimeout(function(){oe.current=!0},0),function(){oe.current=!1}},[]);var te=function(it){return function(We){$.current=We.target;var me=a==null?void 0:a.props[it];me&&me(We)}};Ce.useEffect(function(){var it,We,me=(it=(We=F.current)===null||We===void 0?void 0:We.ownerDocument)!==null&&it!==void 0?it:document,ce=function(pe){oe.current&&(F.current&&F.current.contains(pe.target)||$.current===pe.target||!me.contains(pe.target)||c(pe))};return me.addEventListener(D,ce),me.addEventListener(j,ce),me.addEventListener(y,ce),function(){me.removeEventListener(D,ce),me.removeEventListener(j,ce),me.removeEventListener(y,ce)}},[y,D,c,j]);var ge=Hv[D],xe=Hv[j],Ae=Hv[y];return Ce.Children.only(Ce.cloneElement(a,Qv(Qv(Qv({ref:function(it){F.current=it;var We=a.ref;typeof We=="function"?We(it):We&&(We.current=it)}},Ae,te(Ae)),ge,te(ge)),xe,te(xe))))};z5.displayName="ClickAwayListener";const $m=On({key:"searchAllVenues",default:!1}),$v=On({key:"searchExternalLocations",default:!0}),O5=pm({key:"baseLink",get:({get:r})=>{const a=r(bv),c=r(Lm),f=r(xv),y=r(Ea),w=r(qc),D=r($m),o=r($v),j=r(Pv),F=window.location.origin+window.location.pathname.replace(/\/$/,""),$=new URLSearchParams(window.location.search),oe=new URLSearchParams;return[["gmApiKey",a],["mapboxAccessToken",c],["apiKey",f],["primaryColor",y],["language",w],["searchAllVenues",D],["searchExternalLocations",o],["logo",j]].forEach(([te,ge])=>{if($.has(te)){const xe=$.get(te);oe.append(te,xe)}else ge&&(ge===y?oe.append(te,y.replace("#","")):oe.append(te,ge))}),`${F}?${oe.toString()}`}}),GW="",$k=r=>en.createElement("svg",{width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.8484 4.66738C13.3129 3.20291 15.6872 3.20291 17.1517 4.66737L19.909 7.42474C21.3735 8.8892 21.3735 11.2636 19.909 12.7281L18.2804 14.3568C17.9875 14.6497 17.5126 14.6497 17.2197 14.3568C16.9268 14.0639 16.9268 13.589 17.2197 13.2961L18.8484 11.6674C19.7271 10.7887 19.7271 9.36407 18.8484 8.4854L16.091 5.72803C15.2123 4.84936 13.7877 4.84936 12.909 5.72804L11.2804 7.35672C10.9875 7.64961 10.5126 7.64961 10.2197 7.35672C9.92681 7.06382 9.92681 6.58895 10.2197 6.29606L11.8484 4.66738ZM15.5304 9.04606C15.8233 9.33895 15.8233 9.81382 15.5304 10.1067L9.53036 16.1068C9.23747 16.3997 8.7626 16.3997 8.4697 16.1068C8.17681 15.8139 8.17681 15.339 8.4697 15.0461L14.4697 9.04606C14.7626 8.75316 15.2375 8.75316 15.5304 9.04606ZM6.78036 10.7961C7.07326 11.089 7.07326 11.5639 6.78036 11.8568L5.15169 13.4854C4.27301 14.3641 4.27301 15.7887 5.15169 16.6674L7.90905 19.4248C8.78773 20.3035 10.2123 20.3035 11.091 19.4248L12.7197 17.7961C13.0126 17.5032 13.4875 17.5032 13.7804 17.7961C14.0733 18.089 14.0733 18.5639 13.7804 18.8568L12.1517 20.4854C10.6872 21.9499 8.31285 21.9499 6.84839 20.4854L4.09102 17.7281C2.62656 16.2636 2.62656 13.8893 4.09103 12.4248L5.7197 10.7961C6.0126 10.5032 6.48747 10.5032 6.78036 10.7961Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}})),j5=r=>en.createElement("svg",{width:24,height:25,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 7.32635C3 5.25529 4.67893 3.57635 6.75 3.57635H7.25C9.32107 3.57635 11 5.25529 11 7.32635V7.82635C11 9.89742 9.32107 11.5764 7.25 11.5764H6.75C4.67893 11.5764 3 9.89742 3 7.82635V7.32635ZM6.75 5.07635C5.50736 5.07635 4.5 6.08371 4.5 7.32635V7.82635C4.5 9.06899 5.50736 10.0764 6.75 10.0764H7.25C8.49264 10.0764 9.5 9.06899 9.5 7.82635V7.32635C9.5 6.08371 8.49264 5.07635 7.25 5.07635H6.75ZM13 7.32635C13 5.25529 14.6789 3.57635 16.75 3.57635H17.25C19.3211 3.57635 21 5.25529 21 7.32635V7.82635C21 9.89742 19.3211 11.5764 17.25 11.5764H16.75C14.6789 11.5764 13 9.89742 13 7.82635V7.32635ZM16.75 5.07635C15.5074 5.07635 14.5 6.08371 14.5 7.32635V7.82635C14.5 9.06899 15.5074 10.0764 16.75 10.0764H17.25C18.4926 10.0764 19.5 9.06899 19.5 7.82635V7.32635C19.5 6.08371 18.4926 5.07635 17.25 5.07635H16.75ZM3 17.3264C3 15.2553 4.67893 13.5764 6.75 13.5764H7.25C9.32107 13.5764 11 15.2553 11 17.3264V17.8264C11 19.8975 9.32107 21.5764 7.25 21.5764H6.75C4.67893 21.5764 3 19.8975 3 17.8264V17.3264ZM6.75 15.0764C5.50736 15.0764 4.5 16.0838 4.5 17.3264V17.8264C4.5 19.069 5.50736 20.0764 6.75 20.0764H7.25C8.49264 20.0764 9.5 19.069 9.5 17.8264V17.3264C9.5 16.0838 8.49264 15.0764 7.25 15.0764H6.75Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),en.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.75 13.5764C14.1642 13.5764 14.5 13.9122 14.5 14.3264V16.0764H16.25C16.6642 16.0764 17 16.4122 17 16.8264C17 17.2406 16.6642 17.5764 16.25 17.5764H13.75C13.3358 17.5764 13 17.2406 13 16.8264V14.3264C13 13.9122 13.3358 13.5764 13.75 13.5764ZM17 14.3264C17 13.9122 17.3358 13.5764 17.75 13.5764H20.25C20.6642 13.5764 21 13.9122 21 14.3264C21 14.7406 20.6642 15.0764 20.25 15.0764H17.75C17.3358 15.0764 17 14.7406 17 14.3264ZM17 18.3264C17 17.9122 17.3358 17.5764 17.75 17.5764H20.25C20.6642 17.5764 21 17.9122 21 18.3264C21 18.7406 20.6642 19.0764 20.25 19.0764H18.5V20.8264C18.5 21.2406 18.1642 21.5764 17.75 21.5764C17.3358 21.5764 17 21.2406 17 20.8264V18.3264Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),en.createElement("path",{d:"M13 20.5764C13 20.0241 13.4477 19.5764 14 19.5764C14.5523 19.5764 15 20.0241 15 20.5764C15 21.1287 14.5523 21.5764 14 21.5764C13.4477 21.5764 13 21.1287 13 20.5764Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),en.createElement("path",{d:"M5.5 17.0764C5.5 16.5241 5.94772 16.0764 6.5 16.0764H7.5C8.05228 16.0764 8.5 16.5241 8.5 17.0764V18.0764C8.5 18.6287 8.05228 19.0764 7.5 19.0764H6.5C5.94772 19.0764 5.5 18.6287 5.5 18.0764V17.0764Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),en.createElement("path",{d:"M5.5 7.07635C5.5 6.52407 5.94772 6.07635 6.5 6.07635H7.5C8.05228 6.07635 8.5 6.52407 8.5 7.07635V8.07635C8.5 8.62863 8.05228 9.07635 7.5 9.07635H6.5C5.94772 9.07635 5.5 8.62863 5.5 8.07635V7.07635Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}}),en.createElement("path",{d:"M15.5 7.07635C15.5 6.52407 15.9477 6.07635 16.5 6.07635H17.5C18.0523 6.07635 18.5 6.52407 18.5 7.07635V8.07635C18.5 8.62863 18.0523 9.07635 17.5 9.07635H16.5C15.9477 9.07635 15.5 8.62863 15.5 8.07635V7.07635Z",fill:"#646970",style:{fill:"#646970",fill:"color(display-p3 0.3922 0.4118 0.4392)",fillOpacity:1}})),Yk=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M8 6L12 2L16 6",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),en.createElement("path",{d:"M12 3V13",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),en.createElement("path",{d:"M17 10C18.1046 10 19 10.8954 19 12V18C19 19.1046 18.1046 20 17 20H7C5.89543 20 5 19.1046 5 18V12C5 10.8954 5.89543 10 7 10",stroke:"#737373",style:{stroke:"#737373",stroke:"color(display-p3 0.4510 0.4510 0.4510)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Ym=On({key:"qrCodeLink",default:null}),k5=On({key:"supportsUrlParameters",default:!1});P5.propTypes={location:et.object.isRequired,buttonClassName:et.string};function P5({location:r,buttonClassName:a}){const{t:c}=Ho(),[f,y]=Ce.useState(!1),w=zi(O5),[D,o]=Ce.useState(),j=zi(k5),[F,$]=Ce.useState(!1),[oe,te]=Ce.useState(!1),ge=zi(Aa),[,xe]=ln(Ym),Ae=ra();Ce.useEffect(()=>{w&&r&&o(w+"&locationId="+r.id)},[w,r]),Ce.useEffect(()=>{var ce;$(!ge&&j&&Ae);const me=typeof((ce=navigator.clipboard)==null?void 0:ce.writeText)=="function";te(!ge&&j&&me)},[j,ge,Ae]);const it=()=>{navigator.clipboard.writeText(D),y(!1)},We=()=>{xe(D),y(!1)};return(F||oe)&&Be.jsxs("div",{className:"share-location-link",children:[Be.jsx("button",{className:a,onClick:()=>y(me=>!me),title:c("Share"),"aria-label":c("Share"),children:Be.jsx(Yk,{})}),f&&Be.jsx(z5,{onClickAway:()=>y(!1),children:Be.jsxs("ul",{children:[oe&&Be.jsx("li",{children:Be.jsxs("button",{className:a,onClick:()=>it(),children:[Be.jsx($k,{}),c("Copy link")]})}),F&&Be.jsx("li",{children:Be.jsxs("button",{className:a,onClick:()=>We(),children:[Be.jsx(j5,{}),c("QR Code")]})})]})})]})}const ZW="",R5={email:"email",phone:"phone"};B5.propTypes={detailType:et.string,active:et.bool,displayText:et.string,value:et.string,icon:et.string};function B5({detailType:r,active:a,displayText:c,value:f,icon:y}){if(!a||r.toLowerCase()==="openinghours")return null;const w=c!=null&&c.trim()?c:f,D=(o,j)=>{switch(o.toLowerCase()){case R5.email:return`mailto:${j}`;case R5.phone:return`tel:${j}`;default:try{return new URL(j),j}catch{return"#"}}};return Be.jsxs("a",{className:"contact-action-button",href:D(r,f),target:r.toLowerCase()==="email"||r.toLowerCase()==="phone"?"_self":"_blank",rel:"noopener noreferrer",children:[Be.jsx("div",{className:"contact-action-button__icon-wrapper",children:Be.jsx("img",{alt:"",src:y,className:"contact-action-button__icon"})}),Be.jsx("span",{className:"contact-action-button__text",children:w})]})}Yv.propTypes={onBack:et.func,onStartWayfinding:et.func,onSetSize:et.func,snapPointSwiped:et.number,onStartDirections:et.func,isOpen:et.bool,snapPointSwipedByUser:et.string};function Yv({onBack:r,onStartWayfinding:a,onSetSize:c,onStartDirections:f,isOpen:y,snapPointSwipedByUser:w}){var qe,Ue;const{t:D}=Ho(),o=Ce.useRef(null),j=Ce.useRef(null),F=Ce.useRef(null),$=Ce.useRef(null),oe=Ce.useRef(null),[te,ge]=Ce.useState(!1),[xe,Ae]=Ce.useState(!1),[it,We]=Ce.useState(!1),me=Ce.useRef(!1),[ce,pe]=Ce.useState(null),ve=zi(As),De=zi(ul),ct=(qe=De==null?void 0:De.properties)==null?void 0:qe.additionalDetails,St=(Ue=ct==null?void 0:ct.find(ot=>ot.key.toLowerCase().includes("openinghours")&&ot.active===!0))==null?void 0:Ue.openingHours,[Je,jt]=Fk(De,F),pt=dh(),Pt=zi(Ea),Dt=zi(Aa),Ht=zi(vv),[It,wt]=Ce.useState(),[$t,gi]=Ce.useState(),mi=ra(),Q=zi(Lf),J=zi(zf),[,,M]=C5($t,It,Ht,Q,J),z=zi(Hm),B=N5(ve,y);Ce.useEffect(()=>()=>{pe(null),wt(),gi()},[]);const U=Ce.useCallback(()=>{ge(!1),Ae(!1),We(!1),Y(Wn.FIT),r()});function Y(ot){typeof c=="function"&&c(ot)}function ee(){te===!1?(ne(),Y(Wn.MAX)):(ie(),Y(Wn.FIT))}function ne(){requestAnimationFrame(()=>{ge(!0),de(),me.current=!0})}function ie(){ge(!1),Qe(),me.current=!1}function de(){const ot=requestAnimationFrame(()=>{j.current&&(Ae(j.current.scrollTop>0),We(j.current.scrollTop<j.current.scrollHeight-j.current.offsetHeight-1))});return()=>cancelAnimationFrame(ot)}function Qe(){Ae(!1),We(!1)}function Re(){ge(!1),Ae(!1),We(!1),Y(Wn.FIT),a()}function He(){ge(!1),Ae(!1),We(!1),Y(Wn.FIT),f()}return Ce.useEffect(()=>{B&&r()},[B]),Ce.useEffect(()=>()=>{pe(null),wt(),gi()},[]),Ce.useEffect(()=>{ge(!1),Ae(!1),We(!1),pe(null),De&&(o.current.location=De,pe(ve.getDisplayRule(De)),wt(De)),Dt&&gi(Dt)},[De,ve,Dt]),Ce.useEffect(()=>{const ot=(ct==null?void 0:ct.length)>0;Y(De&&y&&ot?Wn.FIT:Wn.MIN)},[De,y,ct]),Ce.useEffect(()=>{if(!w){me.current=!1;return}ge(w===Wn.MAX),w===Wn.MAX?ne():ie()},[w]),Ce.useLayoutEffect(()=>{const ot=document.querySelector(".modal.modal--open");if(!ot||!($!=null&&$.current)||!(j!=null&&j.current))return;const ht=()=>{const Tt=ot.offsetHeight,Ct=j.current.offsetHeight;Tt>0&&Ct>0&&(Ct/Tt>.9?(ot.style.height="100%",de()):ot.style.height="auto")};return oe.current?oe.current.complete?ht():(oe.current.onload=ht,oe.current.onerror=ht):ht(),()=>{ot.style.height="",oe.current&&(oe.current.onload=null,oe.current.onerror=null)}},[De,te,y,ct]),Be.jsx("div",{className:`location-details ${me.current===!0?"location-details--max-height":""} ${xe?"location-details--content-above":""} ${it?"location-details--content-below":""}`,children:De&&Be.jsxs(Be.Fragment,{children:[Be.jsxs("div",{className:"location-details__header",children:[Be.jsxs("div",{className:"location-info",children:[Be.jsx("div",{className:"location-info__icon",children:ce&&Be.jsx("img",{alt:"",src:ce.icon.src?ce.icon.src:ce.icon})}),Be.jsxs("div",{className:"location-info__content",children:[Be.jsx("div",{className:"location-info__name",children:De.properties.name}),Be.jsx("mi-location-info",{level:D("Level"),ref:o,"show-external-id":z})]}),Be.jsxs("div",{className:"location-info__actions",children:[Be.jsx(P5,{buttonClassName:"location-info__button",location:De}),Be.jsx("button",{className:"location-info__button",onClick:()=>U(),children:Be.jsx(Sf,{})})]})]}),Dt&&mi?Be.jsx("button",{disabled:!M,onClick:()=>He(),className:`location-details__wayfinding ${M?"":"location-details--no-route"}`,style:{background:Pt},children:D(M?"Start directions":"Directions not available")}):Be.jsx("button",{onClick:()=>Re(),style:{background:Pt},className:"location-details__wayfinding",children:D("Start wayfinding")})]}),Be.jsx("div",{className:"location-details__details prevent-scroll",...pt,ref:$,children:Be.jsxs("div",{ref:j,onScroll:ot=>de(),className:"location-details__details-content",children:[De.properties.imageURL&&Be.jsx("img",{ref:oe,alt:"",src:De.properties.imageURL,className:"location-details__image"}),Object.keys(De.properties.categories).length>0&&Be.jsx("p",{className:"location-details__categories",children:Object.values(De.properties.categories).map((ot,ht,Tt)=>Be.jsxs(Ce.Fragment,{children:[ot,ht<Tt.length-1&&Be.jsx(Be.Fragment,{children:"・"})]},ot))}),De.properties.description&&Be.jsxs("section",{className:`location-details__description ${te?"location-details__description--full":""}`,children:[Be.jsx("div",{ref:F,children:De.properties.description}),(Je||jt||te)&&Be.jsx("button",{onClick:()=>ee(),children:D(te?"Close":"Read full description")})]}),ct&&Be.jsxs("div",{className:"contact-action-buttons-container",children:[ct.map(ot=>Be.jsx(B5,{detailType:ot.detailType,active:ot.active,displayText:ot.displayText,value:ot.value,icon:ot.icon},ot.key)),St&&Be.jsx(Hk,{openingHours:St,onExpand:()=>de()})]})]})})]})})}const WW="",Gk=r=>en.createElement("svg",{width:16,height:17,viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("g",{clipPath:"url(#clip0_1663_3931)"},en.createElement("path",{d:"M8 0.5C6.41775 0.5 4.87104 0.969192 3.55544 1.84824C2.23985 2.72729 1.21447 3.97672 0.608967 5.43853C0.00346629 6.90034 -0.15496 8.50887 0.153721 10.0607C0.462403 11.6126 1.22433 13.038 2.34315 14.1569C3.46197 15.2757 4.88743 16.0376 6.43928 16.3463C7.99113 16.655 9.59966 16.4965 11.0615 15.891C12.5233 15.2855 13.7727 14.2602 14.6518 12.9446C15.5308 11.629 16 10.0823 16 8.5C16 6.37827 15.1571 4.34344 13.6569 2.84315C12.1566 1.34285 10.1217 0.5 8 0.5ZM11.4667 11.98C11.4074 12.0452 11.3358 12.098 11.2559 12.1353C11.1761 12.1726 11.0897 12.1937 11.0017 12.1974C10.9136 12.2012 10.8258 12.1874 10.7431 12.1569C10.6604 12.1265 10.5846 12.0799 10.52 12.02L7.18667 8.99333C7.12364 8.92813 7.07457 8.85074 7.04247 8.76591C7.01038 8.68109 6.99592 8.5906 7 8.5V4.83333C7 4.65652 7.07024 4.48695 7.19527 4.36193C7.32029 4.23691 7.48986 4.16667 7.66667 4.16667C7.84348 4.16667 8.01305 4.23691 8.13807 4.36193C8.2631 4.48695 8.33334 4.65652 8.33334 4.83333V8.20667L11.42 11.04C11.5506 11.1586 11.6288 11.3242 11.6375 11.5004C11.6463 11.6765 11.5848 11.849 11.4667 11.98Z",fill:"#707070"})),en.createElement("defs",null,en.createElement("clipPath",{id:"clip0_1663_3931"},en.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0 0.5)"})))),F5=r=>en.createElement("svg",{width:13,height:20,viewBox:"0 0 13 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M9.61194 2.82846C9.61194 3.93033 8.7187 4.82357 7.61683 4.82357C6.51495 4.82357 5.62171 3.93033 5.62171 2.82846C5.62171 1.72659 6.51495 0.833344 7.61683 0.833344C8.7187 0.833344 9.61194 1.72659 9.61194 2.82846Z",fill:"#4B5563"}),en.createElement("path",{d:"M3.85618 7.89573L2.70342 8.26942C2.51461 8.33063 2.38005 8.49797 2.36081 8.69552L2.15675 10.7898C2.10483 11.3227 1.64157 11.7195 1.10705 11.6891C0.529883 11.6562 0.101401 11.1412 0.174055 10.5677L0.562276 7.5031C0.609594 7.12957 0.863193 6.8145 1.21798 6.68846L5.43314 5.19101C5.91287 4.94642 6.49458 4.90944 7.02868 5.14168C7.58278 5.38261 7.96247 5.86074 8.09808 6.40693C8.10564 6.42543 8.11266 6.44417 8.11911 6.46314L8.13434 6.50792C8.1531 6.56308 8.17666 6.6165 8.20475 6.66755L9.12944 8.34823C9.24374 8.55597 9.4283 8.71621 9.65003 8.80021L11.6264 9.54897C12.2431 9.78262 12.4674 10.5397 12.0776 11.0716C11.8078 11.4397 11.3226 11.5778 10.8994 11.4069L8.27831 10.3486C8.07383 10.266 7.90247 10.118 7.79102 9.92774L7.36282 9.1966L6.28886 11.8906C6.2887 11.8929 6.2885 11.8952 6.28824 11.8974C6.28503 11.9259 6.28989 11.9548 6.30227 11.9807L6.30571 11.9879L9.7205 18.1483C10.0544 18.7506 9.83675 19.5096 9.23443 19.8434C8.6321 20.1773 7.87316 19.9597 7.53929 19.3574L4.94329 14.6741L2.97868 19.1924C2.70407 19.8239 1.96948 20.1133 1.33793 19.8387C0.706382 19.5641 0.417021 18.8295 0.691627 18.1979L3.26686 12.2753L3.30923 12.1729C3.31648 12.1479 3.31685 12.1215 3.3104 12.0965C2.88761 11.4405 2.77915 10.5975 3.08907 9.82005L3.85618 7.89573Z",fill:"#4B5563"})),Zk=r=>en.createElement("svg",{width:20,height:24,viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M4.48045 5.12001C4.0861 5.12526 3.70969 5.28562 3.4327 5.56636C3.15571 5.84709 3.00042 6.22562 3.00045 6.62001V16.73C3.00045 16.7963 2.97411 16.8599 2.92723 16.9068C2.88035 16.9537 2.81676 16.98 2.75045 16.98H1.48045C1.30245 16.979 1.1274 17.0255 0.973367 17.1147C0.819338 17.2039 0.691916 17.3326 0.60426 17.4876C0.516604 17.6425 0.471891 17.818 0.474737 17.996C0.477584 18.174 0.527887 18.348 0.620453 18.5L3.62045 23.5C3.709 23.6492 3.83484 23.7728 3.98563 23.8587C4.13641 23.9446 4.30694 23.9897 4.48045 23.9897C4.65397 23.9897 4.8245 23.9446 4.97528 23.8587C5.12606 23.7728 5.25191 23.6492 5.34045 23.5L8.34045 18.5C8.42797 18.3484 8.47417 18.1765 8.47444 18.0015C8.4747 17.8265 8.42903 17.6544 8.34197 17.5026C8.25491 17.3508 8.12953 17.2244 7.97834 17.1362C7.82716 17.048 7.65548 17.0011 7.48045 17H6.23045C6.19758 16.9975 6.16554 16.9885 6.13616 16.9735C6.10679 16.9586 6.08066 16.938 6.05928 16.9129C6.03791 16.8878 6.0217 16.8587 6.01161 16.8273C6.00151 16.7959 5.99772 16.7629 6.00045 16.73V6.62001C6.00047 6.42133 5.96102 6.22463 5.88439 6.04132C5.80776 5.85802 5.69548 5.69176 5.55407 5.55221C5.41265 5.41266 5.24493 5.30259 5.06062 5.2284C4.87632 5.1542 4.67911 5.11736 4.48045 5.12001Z",fill:"#707070"}),en.createElement("path",{d:"M15.5203 18.84C15.9182 18.84 16.2997 18.6819 16.581 18.4006C16.8623 18.1193 17.0203 17.7378 17.0203 17.34V7.22995C17.0254 7.16717 17.0539 7.10861 17.1003 7.06597C17.1466 7.02332 17.2074 6.99975 17.2703 6.99995H18.5203C18.6968 6.99992 18.8702 6.95317 19.0228 6.86446C19.1754 6.77574 19.3018 6.64822 19.3891 6.49485C19.4765 6.34148 19.5217 6.16771 19.5201 5.99122C19.5186 5.81472 19.4704 5.64177 19.3803 5.48995L16.3803 0.48995C16.2918 0.340728 16.1659 0.217112 16.0152 0.131252C15.8644 0.0453926 15.6938 0.000244141 15.5203 0.000244141C15.3468 0.000244141 15.1763 0.0453926 15.0255 0.131252C14.8747 0.217112 14.7489 0.340728 14.6603 0.48995L11.6603 5.48995C11.5703 5.64177 11.5221 5.81472 11.5205 5.99122C11.519 6.16771 11.5642 6.34148 11.6516 6.49485C11.7389 6.64822 11.8653 6.77574 12.0179 6.86446C12.1705 6.95317 12.3438 6.99992 12.5203 6.99995H13.7703C13.8366 6.99995 13.9002 7.02629 13.9471 7.07317C13.994 7.12006 14.0203 7.18365 14.0203 7.24995V17.34C14.0203 17.7378 14.1784 18.1193 14.4597 18.4006C14.741 18.6819 15.1225 18.84 15.5203 18.84Z",fill:"#707070"})),qW="";Gm.propTypes={location:et.object,locationClicked:et.func,icon:et.string,isHovered:et.bool};function Gm({location:r,locationClicked:a,icon:c,isHovered:f}){const{t:y}=Ho(),w=Ce.useRef(),D=zi(As),o=zi(Hm);return Ce.useEffect(()=>{var te;const j=ge=>a(ge.detail),F=()=>{var ge;((ge=r.properties.locationSettings)==null?void 0:ge.selectable)!==!1&&D.hoverLocation(r)},$=()=>{var ge;(ge=r.properties.locationSettings)!=null&&ge.selectable||D.unhoverLocation(r)};((te=r.properties.locationSettings)==null?void 0:te.selectable)===!1&&w.current.classList.add("non-selectable");const{current:oe}=w;return oe.location=r,oe.icon=c||D.getDisplayRule(r).icon,oe.addEventListener("locationClicked",j),oe.addEventListener("mouseover",F),oe.addEventListener("mouseout",$),f?w.current.classList.add("hovered"):w.current.classList.remove("hovered"),()=>{oe.removeEventListener("locationClicked",j),oe.removeEventListener("mouseover",F),oe.removeEventListener("mouseout",$)}},[r,a,f]),Be.jsx("mi-list-item-location",{level:y("Level"),ref:w,"show-external-id":o})}const Wk=()=>{const[r,a]=Ce.useState(),c=zi(As),f=zi(Pm);return Ce.useEffect(()=>{function y(){const w=c.getMapView().getCenter();a(w.lat+","+w.lng)}return c&&f?(c.getMapView().addListener("idle",y),y()):c&&c.getMapView().removeListener("idle",y),()=>{c&&c.getMapView().removeListener("idle",y)}},[c,f]),r},Gv=On({key:"searchInput",default:void 0}),Zm=Ce.forwardRef(function(a,c){const{placeholder:f,mapsindoors:y,results:w,clicked:D,cleared:o,changed:j,category:F,google:$,mapbox:oe,disabled:te=!1}=a,ge=Ce.useRef(),xe=zi(Cm),Ae=zi(qc),[,it]=ln(Gv),We=sessionStorage.getItem("mapboxPlacesSessionToken"),me={longitude:xe==null?void 0:xe.coords.longitude,latitude:xe==null?void 0:xe.coords.latitude},ce=Wk(),pe=zi($l),ve=zi($m);return Ce.useImperativeHandle(c,()=>({triggerSearch(){ge.current.triggerSearch()},getValue(){return ge.current.value},setDisplayText(De){ge.current.setDisplayText(De)},focusInput(){ge.current.focusInput()},clear(){ge.current.clear()},getInputField(){return ge.current.getInputField().then(De=>it(De))}})),Ce.useEffect(()=>{const{current:De}=ge;De.value&&window.mapsindoors.services.LocationsService.once("update_completed",()=>{De.triggerSearch()})},[Ae]),Ce.useEffect(()=>{const De=Je=>w(Je.detail),ct=()=>o(),{current:St}=ge;return y===!0&&(St.mapsindoors="true"),St.addEventListener("results",De),St.addEventListener("click",D),St.addEventListener("cleared",ct),St.addEventListener("changed",j),()=>{St.removeEventListener("results",De),St.removeEventListener("click",D),St.removeEventListener("cleared",ct),St.removeEventListener("changed",j)}},[f,y,w,D,o,$,oe,j]),Be.jsx("mi-search",{ref:ge,"id-attribute":"search",placeholder:f,"session-token":We,"user-position":me.latitude!==void 0&&me.longitude!==void 0?Object.values(me).join(","):null,"mi-near":ce,"mi-categories":F,disabled:te,mapbox:oe,google:$,"mi-venue":ve?void 0:pe,language:Ae})});Zm.propTypes={placeholder:et.string,mapsindoors:et.bool,results:et.func,clicked:et.func,cleared:et.func,changed:et.func,category:et.string,preventFocus:et.bool,google:et.bool,mapbox:et.bool,disabled:et.bool};function Zv(r){const a={type:"Point",coordinates:[r.coords.longitude,r.coords.latitude]};return{id:"USER_POSITION",geometry:a,properties:{name:g4("My position"),anchor:a},type:"Feature"}}let Wv;function qk(r){return new Promise((a,c)=>{Wv||(Wv=new window.google.maps.Geocoder),Wv.geocode({placeId:r.properties.placeId},f=>{f.length>0?(r.geometry={type:"Point",coordinates:[f[0].geometry.location.lng(),f[0].geometry.location.lat()]},a(r)):c()})})}const Kk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASAAAAAkCAYAAAApZeciAAARjUlEQVR4Ae2dBXTb2vL1x6GmzJehzBjbKb/YcsrMfJkZyvDS1HbgMTMzM7d9zMzMGCjaTrnxt+e7zvqPpwLLdUpLe62fnFqSZak5W3PmzFHI0/UoT7Nf2t49XJeaY8RT24xY6jXhWPJt+Pn1+Hl3KNa2dE7N8X6Ariwe19XJeHhE6k5OM6KpD4eiidMwnLQVWH/eiCc/F44mDUBXBo/r4iQ8PIxY262Icj7J5uIW7PdZ3h+QBwCBD65YW/GB5ec78H9wxf2ACg0vrmk8PCLRZHUonjri1ngUrdXRxExAHgkKfGjVusCHVqY7qPjQqgcAFRpeXLN4eOBuvdyIJs5e3MVKHcbrq7F+caTuxIjqxrZbquqOD4vUpeYh4mkMxRL/0fuE46kdgMIengHlhwc0ETRmmEvu9ZzYv4SuYnHEEoonzqjczmlONC+qSXcDZMXqmnSZEUs+g/3bXuiGpfYCYjw8A7LFwzOgqppjfWAe/84yn3iqOVzf5geUK5H9yfFIRj8NKIMH8AzIBg/PgHhoXZoPRr4SbCaAPC4dz4A8LPAMiPM5Ou+D3M7dgDwKg2dAHhZ4BoQk6Z6s6CeW+DGl0z5AHoXBMyAPCzwDQu7nJ9kGlLoH0OXmb1VV5S2RyoXNkWBtsxF8c0sk8Ea8bm8OB6ana6gIkCu+RuXnvlK88NyB0tpzB4vfjNc3nj1Ysv3soZK8Pm/qy9u7GvG2ZRj1i4fiyTcit1OH6GaR/83pUkDTG1t7ci4NgOYegDK4NqB/R4L9cd6bWyLBl/J1aDGCdU1GcPk/p07tCsgKyxVQEbgRDAIDgI/cqxzcBAaDG0ERXX0qATeDweAWUEr5qQj0Bj2AL8fj3ZxnIy8S1/UmdV07y4DKwe1gEOhzJadYwIAuZHe/TvQHdLlIrx5T1hwJ7GwO+4+gwaXNaAr7/9hiVK5OE/kA2fIRKjt7oGTnmYOlR84dLE2bU/zH84fKViM48QGyY/VH0sWojXrOqjYqFE3+xYgnZiFy/LnIoX0dUIacDejwvMpeON/XNoeDZ0yvhRFsAQ9YXQdesB7OcCMoBwvBPtAo2A2qc2ygI8BDoF59Ri1YCfoBrfHie0wlawXFdrPJWuPEdn6g1QesBjH1HevAZnALmSugrlcZmAdqxGdsBlr9wFqT48XBRnBjjoY+Xx2L2QcWZtZPKJQBCaO7x+T/8lkwycRsbxXXZzU5SF3PWeQg3MUnZDeoxN8BOTEnevJ2HrZ3AzdkQJL/VPkHtBiB71kZjwZRwNvTVVUlgEz5Gg2AwXwPpHOj+O3YpwSQGRzJoAbqK86Fl4lTMKgTl2JAR6v9d7DR5nYtAm+UJqQNqDHDeLANNNrwvM0dsBisBo0OxMAEIDVArH+arPWUanjFZK7NYrvbTAxyv8N3rLcwwtlim5HgGZN9teGNBlGH49WZ7Kevz3aHz9gKggUyoBgYA+IOx9yg/g+K1Pe8hazlA1v1/5ODAYWzu1/J7wNygosMeXs3cOEioA64O9EUCf7kosYVDqYQAfywJeL/eVPEf06vbzb8bwGkaf8udUWX6yfaZBAJpfD6w3MHin9+5iul50xM6C2ANGyYiGq+bGo20dQv8POf9bp8Dah1+vSeuBa/1+eK6/APXI8DuBa/1uvAHkASXkgDerFofBvBDDAdrAV1YrttoNzkl2k9aBQ8AkJgClgIdot1DWA0kHpWrO9lEUU0KkaaGaEwmJ3qLn2balTPAAMEM69PqM8fa2VAwgwbMvvdAx5TUeIgUKf2CYEgiChDbbA4n+5ghzLw1WAqmA42iAilpkAGVCdMcw9YCCpBFXhYXaM1QGqmWLeSrDVUbPcYILcGhNzGDwA5kJcBherapgDqAF2Jl2Q3KP8p5H+e5FwQIIYjJLz3Kt34YExLAUlgJi+RxgKzOYWu2JOcCwKUYQByQa+6yIQOlC0FJOHCyuxrkzgTrkttkUWZ1ftPDFcmlZcBId/zcnUtmvC6SEY5hw1/Jc7zX6Jbev6wUTkGUAe8kAbE7AQ3A63+YIvYbjmQmqQayDigVQpWie1qQFeLxl0JtF4EGhWrHH6xF8u7s+pizAdFJkY6VWyzB5Tq7yjYYtN9KlYRZTXw6eOp89phEtWtUV2fvkDrZrALNBbCgAQbQRnQmqCMdYzqKu4XvwvlZK6NYv8JgNx2wcLxxD8BOePegMLRE9MBMf+dN2kg7uyn/68xBS80VQcjgMxorg7uUFHSL2XjbP8CDUSkc1pEPRcQDUUAmQFj2qGioF/KfBAnnDPTTzKGkmgPxVILAWmqatIlbEL5GtCxqol9YDgnhbkm8DoCkISNGWb8Snkd8O8PAOqAFyS7HQ4hcz+Rw6gDPUUjkuY02SHsvl9sa8hGJN6/G2g9Lu6WjwsT0w12oficwTLPJN6/zyFZvMrkfLQBRR0SspPFtpscjrdBdYU71Bc0iBya3fFuAQ0FNKCn9LVVmia2fQJILRbrZgCtHsLAdoHiPJPQIHkjIDs4muFowA41ugYSYwAxyOU8ohrSmwBZwaNW3CXLjoIqxgNiMLr1SJahfKX0TYCs4M/jLpmKmMYDAhz9rFbf/d2ArJgdPTWYr2M+BtQaCW5UEd5eaTz/q5oyCDmfxpaw/7BJd/V0c9WYHoAYXpDqzztpsUmUcqPq0jiNmN1qke/xiYghqkZh+oh9XqSihuFA6nnQCPaCIos77hCy151i2/UWBrSc7HW32PZWstdwi6hulorYnLSxgAY0OofRuJ1iexmZ9RNmuMXkdyIk9guRC3HdT/bjNNoeAnSpwKi+JyMINjtAgBvWe7LNJDgNkB3opmyR+7Qa/ocBAY5o3iPNBP+eBsiWQyVb5D4wsYcBMboyHOZSBcgORIXfyseAdFTDxsoGiffn4Zw/i3Nvv3hUMHicu6atc/yjAHXwwkInT50biu7fB1z+0vtEPqhBGc188VkjLPIK/VQ+aIXYTr8vtV0lfeM21ElTlQbk4nrtcXs8HU2ovNogclagQAZUn2OJwEoduQndJdYNVf//20UXrRu5EBrMLtV9+JUesXILPyGRH1ImZsb/FlAHLYb/oGxQGAHqDcgOjJbNz05GB6KAGHS5DkozSR+g3oDsQLdrvtwHRAExMM9PZSXQaxIDANmBfd6clwGFgx9S0WAtXv8E0hpO2qMc4f7/zZ7QHZCGeOEiKtCjVfeY3M0qKTc9JvbpLd6/Xby/RLz/qEnE9LRInhepboE2MBLdR7fskgbkIm/RkOfxtoEOPSTe70POGlogA9qdqx+I400HUkNUF7RDI9RNzJVmxVI3XzQLPpZ4DFC+IILYria2vhJQhqvfgGLJT7utjUKB4psKYEAm+E+1hAPv4iS0Qx1UZqG6Mg66Uf9SqW7CNNJyHk7vKe+OIpm6Hfgy6xtMckYRE/O812aIfr/IpQRcMMHCgMaTverEdwm4QH7u/Sryc9LIAhnQi8lZ+npMMYl0nxYRVS+TEokbgWuxQeihZiPWVgnILTwyxJNZs7p19amJgDqAmbw7y0xm+2cAssWo3JbVBYsEHgLEoNv07qzu1JdLZgCyA/tsy+62lT4EiOHnXavrMQuQPalvuDUgPQKm+FOrEXyeq6IB5QIvpAHNJGdNMBlhmuAiL6KHyWMm+YEl4vMGgmnq3x26Qby/DJSKIfa1No2rAXQh93JrQNtE4yuj/LRS5WScNKuAOaDu5KxNKuLU8qtRwJ6iZOABylPVDUd78wiYGrk6hgrgEKCcwcPKjGjyb/oRrYAkbB7Z3Y7A2wBZkV69urg54v+N3Od/4eBYQAybR3YSuvhtgKxAtXQxXn+TlYQ+VDoWEBOOJzeoc3gbIAtw/U7ewV3OvAzI8K9SEc//msOVcyynixD5rKZk8EIa0OPA5yKxOgaweoj39jpUS+vRqPuB1mCZcBbdkOeA1vNiuHyUqt/RWiHWB8heXUD5JRrQGqeRQaHyDFoVLgYJfODJAhrQDLJXN1ErVGfx/UvAXtGtm60NNV9Vxdqm6ofP88gOktQvzcxxImvSJZy8ltXAGZLh6PGhgCR8V88eeg62c9IVkAW12VMS/D/LGoY/QP0xenVSjGi1Y5RrHiBzSmvVMPzP5DB8pgL6uEyi818FAaTJDMN/Pt9heM7n4PyPyfNjAwJkRiYS/DNyQbMASXih64CCZK0xNvUx94p1S4WRORXVTQJaReKX9hnR/ZoDtOaaFAbGQKnDyNZu0IOstQREwXLQOx8DUvmYnQ4RxXIQBctAL2WEtTrKsFBlgeuAamzyTj5lsBtJy7yrXC/yXD66RIXr2pZkP5pDGEks8S4kWjdF6tqCHOlE6lOT+RGubFAwrn+Y/aUMrF8MyAyYSlxV/Z7hkS6ZYG2ZW3EzVz5fPPzsXwBIAlOJqwroMzzS1f5l6g7o//NFupkrn3l9FoeKFwCS6DwWmzMXJ8pCRDZXmPQXLrUQ0aTOqY3nfPE8OUAA12PaDTxPLMu0jeArpBHrHBBTD0KgRBnCNDVSM1XXoKj1q00a3CBVev+kSB5bRisOZf23mGy3KccIbpvJyFKZGomLgp55GpCuedoC7tDHU3VL+0EPmwLMGAiq61YCQqChEwoRd4Ahyiy6g3VqPttAslYPkykdM6hA4m4XGk0LN6R84UezspkBsiAz+z34fbOkK/g5aoV+ZzYEDV4HSMMVzzCh72tz4YroF2p+in/HkZFej31eB0jDkQ1G7L52sbkkTiLn8zOs+2OhpmKk/f5SFCB+w+Rckxhy/yl3P7lY02k6hp6K8ZiaOPoAuB/UmMz/8eVwB64Hj4F7lfEwexySqiPU9tv1MfWQrkNUJRvPNpM5VHeDh0DU4bOUATmqp4r4mC0Wx2sAEy0iwnvUZ+wF94H71cThxwpkQPuUGW0F94BH1I2GCZCzVqnfrS5UQFW9JHUT/z2wvAwIdUXh/cmxgJw4Pmdqv6ZI4JuqUVljBN7A+SBAZrR/ifqh0PCb0mAceAPngwCZwbkxUxMyMSXZZctzMmpvRIFfc7wGYrhej4rpCGgUWA4aLWgASxweqzFezCmz4jHQ1ylRrRrWQlLSlc8qF+FkCg84fMdabQZ5GhCrF3jY6XgOw/olKiFtxipwZ4EMaBfooyfbKqIOZi81Sg9edIaQFwqEo6n3hqLJlLP5JL8D1rmtIeLZ7Yh4ngVNNkPRv241AosBOcGz21Fo+CyinSZL4/lK8a/PHSxbDMgJjoRwftvAMYtz/zNPM+EJqqLu6Wt5/FWMzLUIPgdaba7Fz2Ha1YA0xAuTBjUIrAPbwT6wBawAt7p4DtBM8ADYAWrBNrABjHbR9x8vqp77k7X6i+0mU27ygRFgLdgKajPG+SgwbPI1d4CZGQYAcnG8kWCdyfHCLorx7gRrwHZQC3aA9aIMoae4FoPIvSrATFApbgSV4EGwF+wDT4O5oCflrnXiJtaPOllohOVcDcwPnIchvYwfyMVD9+FYaifngdT0jbzgbgjPB0OUs4u7WU1G4NX4+ZkWo6JC3+lz4sdUyvPBMNy+i7tZMJ5X4+dnkBuqkAnnXOFKbowUrkAeqB68BdTLB5LBeH5vMfIHA1oexB8nfFMH/o+sngnIij/OG9aF655ADT+cja8H58cwehjU18LpcRyePBVafUXy+W7qXHlKp338Z4cAWTHv1e1d1Aji6wFdbnjR2QbkydNiPSXDU+HFj1hFdPcIulC/5LlhgKzgyCirbqgudS+gyw0WnWZAnjzpWqFngY86RV7Ug5zOH7LqgOLJNYA0s2uSN+D1r2Lbs/weoMsNLzrTgDx5MlSNWSfJE/Jb95kk2t/MU1R4cipPOUHk86j+g46Z/BBdCbDoNAPy5KlUFJTWgFLqVHlREBdfuitDSPxdTVy9rPCiswzIk6cpqiSgc+UpM8Uk9bpczIe7bBwVAbpSYNFpBuTJU28wMEMZebpsCkeTBgoKD+qnRzI8+ZbLEcQUjSsGLwgKZRhInjx5um40s/54X340B08zwZSV6qr6U4Oupr8i+/8Adnj5PFwBRDQAAAAASUVORK5CYII=",U5=r=>en.createElement("svg",{width:20,height:18,viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M18.5329 7.19049C18.5118 7.16682 18.4958 7.13909 18.4857 7.109C18.4757 7.07891 18.4719 7.04709 18.4746 7.01549C18.481 6.98424 18.4939 6.9547 18.5126 6.92884C18.5313 6.90298 18.5553 6.88139 18.5829 6.86549L19.2496 6.47383C19.4034 6.39827 19.54 6.29191 19.6509 6.16135C19.7619 6.03079 19.8448 5.87881 19.8945 5.71485C19.9443 5.5509 19.9598 5.37846 19.9401 5.20826C19.9204 5.03806 19.8659 4.87372 19.7801 4.72545C19.6942 4.57719 19.5788 4.44816 19.4409 4.34637C19.3031 4.24459 19.1458 4.17223 18.9789 4.13379C18.8119 4.09534 18.6388 4.09163 18.4703 4.12289C18.3019 4.15415 18.1416 4.21971 17.9996 4.31549L17.1079 4.82383C17.0788 4.84065 17.0457 4.8495 17.0121 4.8495C16.9784 4.8495 16.9454 4.84065 16.9163 4.82383C16.8885 4.81108 16.8638 4.79261 16.8437 4.76963C16.8236 4.74665 16.8085 4.71968 16.7996 4.69049L16.4663 2.69883C16.3686 2.10879 16.0627 1.5733 15.604 1.18953C15.1453 0.805757 14.5643 0.599136 13.9663 0.607159H5.99125C5.39796 0.609722 4.82491 0.823205 4.37454 1.20945C3.92418 1.59569 3.62587 2.12951 3.53292 2.71549L3.19959 4.69049C3.19282 4.72272 3.17879 4.75297 3.15858 4.77896C3.13836 4.80496 3.11249 4.826 3.08292 4.84049C3.05378 4.85731 3.02073 4.86617 2.98709 4.86617C2.95344 4.86617 2.92039 4.85731 2.89125 4.84049L1.99959 4.34049C1.85752 4.24471 1.69729 4.17915 1.52882 4.14789C1.36036 4.11663 1.18727 4.12034 1.0203 4.15879C0.853336 4.19723 0.696054 4.26959 0.558225 4.37137C0.420396 4.47316 0.304963 4.60219 0.219094 4.75045C0.133225 4.89872 0.078754 5.06306 0.0590634 5.23326C0.0393727 5.40346 0.0548829 5.5759 0.104631 5.73985C0.154378 5.90381 0.237302 6.05579 0.348251 6.18635C0.4592 6.31691 0.595806 6.42327 0.749587 6.49883L1.41625 6.89049C1.44391 6.90639 1.46788 6.92798 1.48655 6.95384C1.50523 6.9797 1.51819 7.00924 1.52459 7.04049C1.52727 7.07209 1.52348 7.10391 1.51345 7.134C1.50342 7.16409 1.48736 7.19182 1.46625 7.21549C0.79248 7.90316 0.415458 8.82776 0.416253 9.79049V11.4572C0.416532 11.8754 0.543199 12.2838 0.779646 12.6288C1.01609 12.9738 1.35128 13.2393 1.74125 13.3905C1.78008 13.4055 1.81353 13.4317 1.83729 13.4659C1.86106 13.5001 1.87405 13.5405 1.87459 13.5822V15.2072C1.87459 15.7044 2.07213 16.1814 2.42376 16.533C2.77539 16.8846 3.25231 17.0822 3.74959 17.0822C4.24687 17.0822 4.72378 16.8846 5.07541 16.533C5.42704 16.1814 5.62459 15.7044 5.62459 15.2072V13.7572C5.62455 13.7011 5.64622 13.6472 5.68507 13.6068C5.72392 13.5664 5.77691 13.5426 5.83292 13.5405H14.1663C14.2223 13.5426 14.2753 13.5664 14.3141 13.6068C14.3529 13.6472 14.3746 13.7011 14.3746 13.7572V15.2072C14.3746 15.7044 14.5721 16.1814 14.9238 16.533C15.2754 16.8846 15.7523 17.0822 16.2496 17.0822C16.7469 17.0822 17.2238 16.8846 17.5754 16.533C17.927 16.1814 18.1246 15.7044 18.1246 15.2072V13.5822C18.1251 13.5405 18.1381 13.5001 18.1619 13.4659C18.1856 13.4317 18.2191 13.4055 18.2579 13.3905C18.6479 13.2393 18.9831 12.9738 19.2195 12.6288C19.456 12.2838 19.5826 11.8754 19.5829 11.4572V9.79049C19.5903 8.81911 19.2128 7.88433 18.5329 7.19049ZM6.03292 2.26549H14.0496C14.2493 2.26292 14.4433 2.33219 14.5963 2.46067C14.7493 2.58915 14.851 2.7683 14.8829 2.96549L15.2829 5.35716C15.2878 5.38821 15.2858 5.41994 15.2772 5.45016C15.2686 5.48038 15.2534 5.50836 15.2329 5.53216C15.2131 5.55434 15.1887 5.57183 15.1613 5.58336C15.1339 5.59489 15.1043 5.60017 15.0746 5.59883H4.99959C4.9654 5.60054 4.93125 5.59471 4.89957 5.58175C4.86788 5.56878 4.83944 5.54901 4.81625 5.52383C4.79517 5.4674 4.79517 5.40525 4.81625 5.34883L5.17459 3.02383C5.19879 2.82341 5.29493 2.63859 5.44514 2.50372C5.59534 2.36884 5.7894 2.29307 5.99125 2.29049L6.03292 2.26549ZM16.2913 11.4322C16.044 11.4322 15.8024 11.3588 15.5968 11.2215C15.3912 11.0841 15.231 10.8889 15.1364 10.6605C15.0418 10.4321 15.017 10.1808 15.0653 9.9383C15.1135 9.69582 15.2326 9.47309 15.4074 9.29827C15.5822 9.12346 15.8049 9.00441 16.0474 8.95618C16.2899 8.90795 16.5412 8.9327 16.7696 9.02731C16.998 9.12192 17.1932 9.28213 17.3306 9.4877C17.4679 9.69326 17.5413 9.93493 17.5413 10.1822C17.5447 10.352 17.5136 10.5207 17.4497 10.6781C17.3858 10.8355 17.2905 10.9781 17.1696 11.0975C17.0488 11.2168 16.9048 11.3102 16.7467 11.3721C16.5885 11.4339 16.4193 11.4629 16.2496 11.4572L16.2913 11.4322ZM2.49959 10.2072C2.49959 9.95993 2.5729 9.71826 2.71025 9.5127C2.8476 9.30713 3.04282 9.14692 3.27123 9.05231C3.49964 8.9577 3.75097 8.93295 3.99345 8.98118C4.23593 9.02941 4.45865 9.14846 4.63347 9.32327C4.80829 9.49809 4.92734 9.72082 4.97557 9.9633C5.0238 10.2058 4.99905 10.4571 4.90444 10.6855C4.80983 10.9139 4.64961 11.1091 4.44405 11.2465C4.23849 11.3838 3.99681 11.4572 3.74959 11.4572C3.41807 11.4572 3.10012 11.3255 2.8657 11.091C2.63128 10.8566 2.49959 10.5387 2.49959 10.2072Z",fill:"#4B5563"})),V5=r=>en.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("g",{clipPath:"url(#clip0_1697_57490)"},en.createElement("path",{d:"M12.0829 5.05834C13.1783 5.05834 14.0663 4.17037 14.0663 3.07501C14.0663 1.97964 13.1783 1.09167 12.0829 1.09167C10.9876 1.09167 10.0996 1.97964 10.0996 3.07501C10.0996 4.17037 10.9876 5.05834 12.0829 5.05834Z",fill:"#4B5563"}),en.createElement("path",{d:"M3.75 11.4083C3.00832 11.4083 2.2833 11.6283 1.66661 12.0403C1.04993 12.4524 0.569282 13.038 0.285453 13.7233C0.00162482 14.4085 -0.0726377 15.1625 0.0720569 15.8899C0.216751 16.6173 0.573904 17.2855 1.09835 17.81C1.6228 18.3344 2.29098 18.6916 3.01841 18.8363C3.74584 18.981 4.49984 18.9067 5.18506 18.6229C5.87029 18.339 6.45596 17.8584 6.86801 17.2417C7.28007 16.625 7.5 15.9 7.5 15.1583C7.4978 14.1644 7.10201 13.2119 6.39922 12.5091C5.69644 11.8063 4.74389 11.4105 3.75 11.4083ZM3.75 17.2417C3.33796 17.2417 2.93517 17.1195 2.59256 16.8906C2.24996 16.6616 1.98294 16.3363 1.82525 15.9556C1.66757 15.5749 1.62631 15.156 1.7067 14.7519C1.78708 14.3478 1.9855 13.9765 2.27686 13.6852C2.56822 13.3938 2.93944 13.1954 3.34356 13.115C3.74769 13.0346 4.16658 13.0759 4.54726 13.2336C4.92794 13.3913 5.25331 13.6583 5.48223 14.0009C5.71115 14.3435 5.83333 14.7463 5.83333 15.1583C5.83333 15.4319 5.77945 15.7028 5.67475 15.9556C5.57005 16.2083 5.4166 16.438 5.22314 16.6315C5.02969 16.8249 4.80002 16.9784 4.54726 17.0831C4.2945 17.1878 4.02359 17.2417 3.75 17.2417Z",fill:"#4B5563"}),en.createElement("path",{d:"M16.25 11.4083C15.5083 11.4083 14.7833 11.6283 14.1666 12.0403C13.5499 12.4524 13.0693 13.038 12.7855 13.7233C12.5016 14.4085 12.4274 15.1625 12.5721 15.8899C12.7168 16.6173 13.0739 17.2855 13.5984 17.81C14.1228 18.3344 14.791 18.6916 15.5184 18.8363C16.2458 18.981 16.9998 18.9067 17.6851 18.6229C18.3703 18.339 18.956 17.8584 19.368 17.2417C19.7801 16.625 20 15.9 20 15.1583C19.9978 14.1644 19.602 13.2119 18.8992 12.5091C18.1964 11.8063 17.2439 11.4105 16.25 11.4083ZM16.25 17.2417C15.838 17.2417 15.4352 17.1195 15.0926 16.8906C14.75 16.6616 14.4829 16.3363 14.3253 15.9556C14.1676 15.5749 14.1263 15.156 14.2067 14.7519C14.2871 14.3478 14.4855 13.9765 14.7769 13.6852C15.0682 13.3938 15.4394 13.1954 15.8436 13.115C16.2477 13.0346 16.6666 13.0759 17.0473 13.2336C17.4279 13.3913 17.7533 13.6583 17.9822 14.0009C18.2112 14.3435 18.3333 14.7463 18.3333 15.1583C18.3333 15.4319 18.2794 15.7028 18.1748 15.9556C18.0701 16.2083 17.9166 16.438 17.7231 16.6315C17.5297 16.8249 17.3 16.9784 17.0473 17.0831C16.7945 17.1878 16.5236 17.2417 16.25 17.2417Z",fill:"#4B5563"}),en.createElement("path",{d:"M8.93421 9.52501L10.1425 8.14168C11.2897 8.9152 12.6423 9.32736 14.0259 9.32501H14.5842C14.9157 9.32501 15.2337 9.19331 15.4681 8.95889C15.7025 8.72447 15.8342 8.40653 15.8342 8.07501C15.8342 7.74349 15.7025 7.42555 15.4681 7.19113C15.2337 6.95671 14.9157 6.82501 14.5842 6.82501H14.0259C12.8486 6.82097 11.7201 6.35403 10.8842 5.52501C10.7716 5.40452 10.6345 5.30949 10.4821 5.24625C10.3298 5.18302 10.1657 5.15305 10.0009 5.15834C9.82975 5.16377 9.66156 5.2043 9.50675 5.2774C9.35193 5.35051 9.21378 5.45464 9.10087 5.58334L6.18421 8.91668C6.05958 9.04818 5.96401 9.20443 5.90372 9.37528C5.84342 9.54613 5.81973 9.72775 5.83421 9.90834C5.8651 10.0771 5.92973 10.2379 6.02424 10.3811C6.11874 10.5243 6.24118 10.6469 6.38421 10.7417L6.93421 11.1083C7.66321 11.5976 8.22851 12.2944 8.55687 13.1086C8.88523 13.9229 8.96153 14.8169 8.77587 15.675C8.72593 15.8397 8.71053 16.0129 8.73063 16.1838C8.75074 16.3547 8.80592 16.5196 8.89272 16.6682C8.97951 16.8168 9.09606 16.9459 9.23505 17.0474C9.37404 17.1489 9.53249 17.2205 9.70047 17.2579C9.86845 17.2953 10.0423 17.2976 10.2112 17.2647C10.3802 17.2318 10.5404 17.1643 10.6821 17.0666C10.8237 16.9688 10.9436 16.8429 11.0343 16.6966C11.125 16.5504 11.1846 16.387 11.2092 16.2167C11.4704 14.9998 11.3968 13.7349 10.9961 12.5566C10.5955 11.3782 9.88295 10.3305 8.93421 9.52501Z",fill:"#4B5563"})),en.createElement("defs",null,en.createElement("clipPath",{id:"clip0_1697_57490"},en.createElement("rect",{width:20,height:20,fill:"white"})))),Xk=r=>en.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("g",{clipPath:"url(#clip0_3407_1703)"},en.createElement("path",{d:"M11.3752 20.0001H11.2169C10.9704 19.965 10.7399 19.8576 10.5545 19.6915C10.369 19.5254 10.2371 19.308 10.1752 19.0668L8.33357 11.6668L0.941907 9.82512C0.699196 9.76473 0.479985 9.63338 0.312261 9.44785C0.144536 9.26231 0.0359065 9.031 0.000240204 8.78345C-0.034478 8.53494 0.0136427 8.28191 0.137161 8.06349C0.26068 7.84508 0.452715 7.67344 0.683574 7.57512L18.3336 0.0917817C18.5568 0.00128909 18.802 -0.0208838 19.0378 0.0280732C19.2737 0.0770302 19.4898 0.194913 19.6586 0.366782C19.8232 0.535068 19.9346 0.74804 19.9791 0.979189C20.0235 1.21034 19.999 1.44946 19.9086 1.66678L12.4086 19.2834C12.3263 19.4916 12.1843 19.6707 12.0004 19.7982C11.8165 19.9258 11.599 19.996 11.3752 20.0001Z",fill:"#525252"})),en.createElement("defs",null,en.createElement("clipPath",{id:"clip0_3407_1703"},en.createElement("rect",{width:20,height:20,fill:"white"}))));Q5.propTypes={selectionChanged:et.func,children:et.node};function Q5({selectionChanged:r,children:a}){const c=Ce.useRef();return Ce.useEffect(()=>{const f=w=>r(w.detail),{current:y}=c;return y.addEventListener("change",f),()=>y.removeEventListener("change",f)},[r]),Be.jsx("mi-dropdown",{ref:c,children:a})}function Jk(r,a){const c=sessionStorage.getItem("mapboxPlacesSessionToken");return new Promise((f,y)=>{const w=`https://api.mapbox.com/search/searchbox/v1/retrieve/${r.id}?session_token=${c}&access_token=${a}`;fetch(w).then(D=>D.status!==200?y():D.json()).then(D=>{r.geometry={type:"Point",coordinates:[D.features[0].geometry.coordinates[0],D.features[0].geometry.coordinates[1]]},f(r)}).catch(()=>{y()})})}const eP=pm({key:"unitSystem",get:({get:r})=>r(qc)==="en-US"?"imperial":"metric"}),KW="";qv.propTypes={onAccessibilityChanged:et.func};function qv({onAccessibilityChanged:r}){const a=zi(Ea),[c,f]=ln(zf);function y(w){f(w.target.checked),r&&r()}return Be.jsxs("div",{className:"accessibility",children:[Be.jsx("input",{className:"mi-toggle",type:"checkbox",checked:c,onChange:w=>y(w),style:{backgroundColor:c?a:""}}),Be.jsx("div",{children:g4("Avoid stairs and escalators")})]})}const XW="";function tP(){var w;const r=zi(Ea),a=zi(ah),[c,f]=ln(S5);function y(D){f(D.target.checked)}return Be.jsxs("div",{className:"shuttle-bus",children:[Be.jsx("input",{className:"mi-toggle",type:"checkbox",checked:c,onChange:D=>y(D),style:{backgroundColor:c?r:""}}),Be.jsx("div",{children:((w=a==null?void 0:a.appSettings)==null?void 0:w.includeTransitSelectionDescription)||"Include bus transportation"})]})}const H5=On({key:"wayfindingLocation",default:null}),yo={TO:"TO",FROM:"FROM"},iP="data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 14 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 0C3.13 0 0 3.13 0 7C0 12.25 7 20 7 20C7 20 14 12.25 14 7C14 3.13 10.87 0 7 0ZM7 9.5C5.62 9.5 4.5 8.38 4.5 7C4.5 5.62 5.62 4.5 7 4.5C8.38 4.5 9.5 5.62 9.5 7C9.5 8.38 8.38 9.5 7 9.5Z' fill='black' fill-opacity='0.88'/%3E%3C/svg%3E%0A";Kv.propTypes={onStartDirections:et.func.isRequired,onBack:et.func.isRequired,directionsToLocation:et.object,directionsFromLocation:et.object,onSetSize:et.func,isActive:et.bool};function Kv({onStartDirections:r,onBack:a,directionsToLocation:c,directionsFromLocation:f,onSetSize:y,isActive:w}){var Li,Ii;const{t:D}=Ho(),o=Ce.useRef(),j=Ce.useRef(),F=Ce.useRef(),$=Ce.useRef(),oe=zi(vv),te=zi(Cm),ge=zi(ul),xe=zi(Nm),Ae=zi(Ea),[it,We]=ln(H5),[me,ce]=Ce.useState(),[,pe]=ln(Qm),[ve,De]=Ce.useState(!0),[ct,St]=Ce.useState(!1),[Je,jt]=Ce.useState([]),[pt,Pt]=Ce.useState(),[Dt,Ht]=Ce.useState(),It=zi(zf),wt=dh(),[$t,gi]=Ce.useState(!1),[mi,Q]=ln(Lf),[J,M]=Ce.useState(!1),z=zi(Lm),B=zi(eP),[U,Y,ee,ne]=C5(Dt,pt,oe,mi,It),ie=zi($v),de=zi(ah);function Qe(Qt){return xe===$o.Google&&Qt.properties.type==="google_places"?qk(Qt):xe===$o.Mapbox&&Qt.properties.type==="mapbox_places"?Jk(Qt,z):Promise.resolve(Qt)}function Re(Qt){me===yo.TO?Qe(Qt).then(li=>{Pt(li),F.current.setDisplayText(li.properties.name)},()=>pe(!1)):me===yo.FROM&&Qe(Qt).then(li=>{Ht(li),$.current.setDisplayText(li.properties.name)},()=>pe(!1)),gi(!1),St(!1),jt([]),M(!1)}function He(Qt,li){if(ce(li),pe(!0),Qt.length===0)De(!1),gi(!1),jt([]);else{De(!0),jt(Qt);const wi=Qt.filter(Ni=>Ni.properties.type==="google_places").length>0;gi(wi),qe(Wn.MAX)}}function qe(Qt){typeof y=="function"&&y(Qt)}function Ue(){const Qt=Zv(te);me===yo.TO?(F.current.setDisplayText(Qt.properties.name),Pt(Qt)):me===yo.FROM&&($.current.setDisplayText(Qt.properties.name),Ht(Qt)),jt([]),pe(!0),De(!0),gi(!1),St(!1),M(!1)}function ot(Qt){(Dt==null?void 0:Dt.id)==="USER_POSITION"&&Qt===yo.TO||(pt==null?void 0:pt.id)==="USER_POSITION"&&Qt===yo.FROM?M(!1):M(!0)}function ht(Qt){ot(Qt)}function Tt(Qt){ce(Qt),ei(Qt),pe(!0),gi(!1),ot(Qt)}function Ct(Qt){M(!0),ce(Qt),ui(Qt),jt([]),pe(!0),gi(!1),De(!0)}function ui(Qt){Qt===yo.TO?Pt():Qt===yo.FROM&&Ht()}function ei(Qt){Qt===yo.TO?(jt([]),F.current.getValue()&&(St(!0),F.current.triggerSearch())):Qt===yo.FROM&&(jt([]),$.current.getValue()&&(St(!0),$.current.triggerSearch()))}function Ti(){(pt||Dt)&&(Dt?F.current.setDisplayText(Dt.properties.name):F.current.clear(),pt?$.current.setDisplayText(pt.properties.name):$.current.clear(),Pt(Dt),Ht(pt))}function si(){Ht(),$.current.setDisplayText(""),a()}function bi(){jt([]),St(!1),gi(!1),M(!1)}return Ce.useEffect(()=>()=>{jt([]),Pt(),Ht()},[]),Ce.useEffect(()=>{if(it){if(me===yo.FROM)$.current.setDisplayText(it.properties.name),Ht(it);else if(me===yo.TO)F.current.setDisplayText(it.properties.name),Pt(it);else return;bi(),We(null)}},[it]),Ce.useEffect(()=>{var li;qe(Wn.FIT);let Qt=!1;if((f==null?void 0:f.id)==="USER_POSITION"&&(c==null?void 0:c.id)==="USER_POSITION"&&(c=void 0),c!=null&&c.properties&&!ge&&(F.current.setDisplayText(c.properties.name),Pt(c)),f!=null&&f.properties?Dt||($.current.setDisplayText(f.properties.name),Ht(f),Qt=!0):ce(yo.FROM),w&&!((li=$.current)!=null&&li.getValue())&&te&&!Dt&&(c==null?void 0:c.id)!=="USER_POSITION"&&!Qt){const wi=Zv(te);$.current.setDisplayText(wi.properties.name),Ht(wi),pe(!0),De(!0),jt([])}},[w,c,f]),Ce.useEffect(()=>{xe===$o.Mapbox&&(gi(!1),jt(Je.filter(Qt=>Qt.properties.type!=="google_places")))},[xe]),Ce.useEffect(()=>{ge&&(Pt(ge),F.current.setDisplayText(ge.properties.name))},[ge]),Be.jsxs("div",{className:"wayfinding",ref:o,children:[Be.jsxs("div",{className:"wayfinding__directions",children:[Be.jsx("div",{className:"wayfinding__title",children:D("Directions")}),Be.jsx("button",{className:"wayfinding__close",onClick:()=>si(),"aria-label":"Close",children:Be.jsx(Sf,{})}),Be.jsxs("div",{className:"wayfinding__locations",children:[Be.jsxs("label",{className:"wayfinding__label",children:[Be.jsx("span",{children:D("Choose departure")}),Be.jsx(Zm,{ref:$,mapsindoors:!0,google:xe===$o.Google&&ie,mapbox:xe===$o.Mapbox&&ie,placeholder:D("Choose departure"),results:Qt=>He(Qt,yo.FROM),clicked:()=>Tt(yo.FROM),cleared:()=>Ct(yo.FROM),changed:()=>ht(yo.FROM)})]}),Be.jsx("button",{onClick:()=>Ti(),"aria-label":D("Switch"),className:"wayfinding__switch",children:Be.jsx(Zk,{})}),Be.jsxs("label",{className:"wayfinding__label",children:[Be.jsx("span",{children:D("Choose destination")}),Be.jsx(Zm,{ref:F,mapsindoors:!0,google:xe===$o.Google&&ie,mapbox:xe===$o.Mapbox&&ie,placeholder:D("Choose destination"),results:Qt=>He(Qt,yo.TO),clicked:()=>Tt(yo.TO),cleared:()=>Ct(yo.TO),changed:()=>ht(yo.TO)})]})]})]}),!ee&&Be.jsx("p",{className:"wayfinding__error",children:D("No route found")}),!ve&&!J&&Be.jsx("p",{className:"wayfinding__error",children:D("Nothing was found")}),te&&J&&Be.jsxs("button",{type:"button",className:"wayfinding__use-current-position",onClick:()=>Ue(),children:[Be.jsx(Xk,{}),D("My position")]}),Je.length>0&&Be.jsx("div",{className:"wayfinding__scrollable",...wt,children:Be.jsxs("div",{className:"wayfinding__results",children:[Je.map(Qt=>Be.jsx(Gm,{icon:Qt.properties.type==="google_places"||Qt.properties.type==="mapbox_places"?iP:void 0,location:Qt,locationClicked:li=>Re(li)},Qt.id)),$t&&Be.jsx("img",{className:"wayfinding__google",alt:"Powered by Google",src:Kk})]})}),!ct&&!J&&ee&&!$t&&Dt&&pt&&Be.jsxs("div",{className:"wayfinding__details",ref:j,children:[Be.jsxs("div",{className:"wayfinding__settings",children:[Be.jsxs("div",{className:"wayfinding__toggles",children:[Be.jsx(qv,{}),((Li=de==null?void 0:de.appSettings)==null?void 0:Li.includeTransitSelection)==="true"&&Be.jsx(tP,{})]}),Be.jsx("div",{className:"wayfinding__travel",children:((Ii=de==null?void 0:de.appSettings)==null?void 0:Ii.includeTravelModeSelection)!=="false"&&Be.jsxs(Q5,{selectionChanged:Qt=>Q(Qt[0].value),children:[Be.jsxs("mi-dropdown-item",{selected:!0,value:Wc.WALKING,children:[Be.jsx(F5,{}),D("Walk")]}),Be.jsxs("mi-dropdown-item",{value:Wc.DRIVING,children:[Be.jsx(U5,{}),D("Drive")]}),Be.jsxs("mi-dropdown-item",{value:Wc.BICYCLING,children:[Be.jsx(V5,{}),D("Bike")]})]})})]}),Be.jsx("hr",{}),Be.jsxs("div",{className:"wayfinding__info",children:[Be.jsxs("div",{className:"wayfinding__distance",children:[mi===Wc.WALKING&&Be.jsx(F5,{}),mi===Wc.DRIVING&&Be.jsx(U5,{}),mi===Wc.BICYCLING&&Be.jsx(V5,{}),Be.jsxs("div",{children:[D("Distance"),":"]}),Be.jsx("div",{className:"wayfinding__meters",children:U&&ne&&Be.jsx("mi-distance",{unit:B,meters:U})})]}),Be.jsxs("div",{className:"wayfinding__time",children:[Be.jsx(Gk,{}),Be.jsxs("div",{children:[D("Estimated time"),":"]}),Be.jsx("div",{className:"wayfinding__minutes",children:Y&&ne&&Be.jsx("mi-time",{translations:JSON.stringify({days:D("d"),hours:D("h"),minutes:D("min")}),seconds:Y})})]})]}),Be.jsx("button",{className:"wayfinding__button",style:{background:Ae},onClick:()=>r(),disabled:!ne,children:D("Go!")})]})]})}const JW="",eq="",nP=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M4 12H20M20 12L14 6M20 12L14 18",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),rP=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M20 12H4M4 12L10 6M4 12L10 18",stroke:"#111827",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Wm=On({key:"activeStep",default:0}),qm=On({key:"substepsToggled",default:!1}),oP=On({key:"triggerSubsteps",default:!1}),$5=Ce.forwardRef(function(a,c){var Ae;const{totalSteps:f,activeStep:y,previous:w,originLocation:D,directions:o}=a,j=Ce.useRef(),{t:F}=Ho(),[$,oe]=ln(qm),[,te]=ln(oP),ge=Yc();Ce.useImperativeHandle(c,()=>({openSubsteps(){j.current.openSubsteps()},closeSubsteps(){j.current.closeSubsteps()}}));const xe={walk:F("Walk"),bike:F("Bike"),transit:F("Transit"),drive:F("Drive"),destination:F("You have arrived"),leave:F("Leave"),from:F("From"),park:F("Park"),at:F("at"),building:F("Building"),venue:F("Venue"),takeStaircaseToLevel:F("Take staircase to level"),takeLadderToLevel:F("Take the ladder to level"),takeElevatorToLevel:F("Take elevator to level"),takeEscalatorToLevel:F("Take escalator to level"),takeWheelchairLiftToLevel:F("Take wheelchair lift to level"),takeWheelchairRampToLevel:F("Take wheelchair ramp to level"),exit:F("Exit"),enter:F("Enter"),stops:F("stops"),andContinue:F("and continue"),continueStraightAhead:F("Continue straight ahead"),goLeft:F("Go left"),goSharpLeft:F("Go sharp left"),goSlightLeft:F("Go slight left"),goRight:F("Go right"),goSharpRight:F("Go sharp right"),goSlightRight:F("Go slight right"),turnAround:F("Turn around"),days:F("d"),hours:F("h"),minutes:F("min"),rideTheBus:F("Ride the bus")};return Ce.useEffect(()=>{const{current:it}=j;function We(){te(!0),oe(!$)}return it.addEventListener("substepsToggled",We),()=>{it.removeEventListener("substepsToggled",We)}},[$]),Be.jsx("mi-route-instructions-step",{ref:j,"show-toggle-button":!ge,step:JSON.stringify(f[y]),translations:JSON.stringify(xe),"destination-location":o==null?void 0:o.destinationLocation.properties.name,"from-travel-mode":(w==null?void 0:w.travel_mode)??"","from-route-context":(w==null?void 0:w.route_context)??((Ae=D==null?void 0:D.properties)==null?void 0:Ae.name)??""})});$5.propTypes={totalSteps:et.array,activeStep:et.number,previous:et.object,originLocation:et.object,directions:et.object};const Y5=On({key:"isDestinationStep",default:!1});G5.propTypes={steps:et.array,onNextStep:et.func,onPreviousStep:et.func,originLocation:et.object,isOpen:et.bool};function G5({steps:r,onNextStep:a,onPreviousStep:c,originLocation:f,isOpen:y}){const{t:w}=Ho(),D=dh(),o=Ce.useRef(),[j,F]=Ce.useState(),[$,oe]=ln(Wm),[te,ge]=Ce.useState(),xe=zi(Nf),Ae=zi(qm),[,it]=ln(Y5),We=Yc();Ce.useEffect(()=>{ge(r)},[r]),Ce.useEffect(()=>{var pe,ve;y&&($===(te==null?void 0:te.length)-1&&(xe!=null&&xe.destinationLocation)?it(!0):it(!1),Ae===!1?(pe=o.current)==null||pe.closeSubsteps():Ae===!0&&((ve=o.current)==null||ve.openSubsteps()))},[y,$,te,Ae]);function me(){F(te[$]),oe($+1),a()}function ce(){F(te[$-2]),oe($-1),c()}return Be.jsx("div",{className:"route-instructions prevent-scroll",...D,children:te&&Be.jsxs(Be.Fragment,{children:[Be.jsx($5,{totalSteps:te,activeStep:$,previous:j,directions:xe,originLocation:f,ref:o}),Be.jsx("div",{className:`route-instructions__footer ${We?"route-instructions__footer--kiosk":""}`,children:Be.jsxs("div",{className:"route-instructions__actions",children:[Be.jsx("button",{className:`route-instructions__button ${We?"route-instructions__button--kiosk":""}`,onClick:()=>ce(),"aria-label":w("Previous"),disabled:$===0,children:Be.jsx(rP,{})}),Be.jsx("div",{className:"route-instructions__overview",children:w("StepYofX",{activeStep:$+1,totalSteps:te.length})}),Be.jsx("button",{className:`route-instructions__button ${We?"route-instructions__button--kiosk":""}`,onClick:()=>me(),"aria-label":w("Next"),disabled:$===te.length-1,children:Be.jsx(nP,{})})]})})]})})}const Z5=Object.freeze({minZoom:10});let Xo;Xv.propTypes={isOpen:et.bool,onBack:et.func,onSetSize:et.func,onRouteFinished:et.func,snapPointSwipedByUser:et.string};function Xv({isOpen:r,onBack:a,onSetSize:c,onRouteFinished:f,snapPointSwipedByUser:y}){const{t:w}=Ho(),D=Ce.useRef(),[o,j]=Ce.useState(null),F=Ce.useRef(null),[$,oe]=Ce.useState(),te=zi(As),ge=zi(Lf),xe=zi(Nf),[,Ae]=ln(Wm),[it,We]=ln(qm),me=zi(Aa),ce=ra(),[,pe]=ln(Ym),ve=zi(Y5),De=zi(Ea),ct=Yc(),St=zi(Hm),Je=zi(O5),jt=zi(ul),pt=zi(Nm);Ce.useEffect(()=>()=>{j(null)},[]),Ce.useEffect(()=>{if(j(null),r&&xe){oe(xe.totalTime);const z=Math.min(window.innerHeight,window.innerWidth)*.06;Xo==null||Xo.setRoute(null),Xo=null,Promise.all([Pt(z),Dt(z)]).then(([B,U])=>{Xo=new window.mapsindoors.directions.DirectionsRenderer({mapsIndoors:te,fitBounds:!ct,fitBoundsPadding:ct?void 0:{top:z,bottom:B,left:U,right:z}}),Xo.setRoute(xe.directionsResult).then(()=>{Xo.setStepIndex(0)}),F.current.location=xe.destinationLocation,xe.destinationLocation.id==="USER_POSITION"?j(null):j(te.getDisplayRule(xe.destinationLocation)),mi(null)})}},[r,xe,te,ge]);function Pt(z){return new Promise(B=>{if(ce)me?If().then(U=>B(U)):B(z);else return rh().then(U=>B(U))})}function Dt(z){return new Promise(B=>{ce?me?B(z):$c().then(U=>B(U)):B(z)})}Ce.useEffect(()=>{!r&&Xo&&($t(),mi(Z5.minZoom))},[r]);function Ht(){return xe?xe.directionsResult.legs.reduce((z,B)=>{for(const U in B.steps){const Y=B.steps[U];z.push(Y)}return z},[]):[]}function It(){Xo&&Xo.nextStep()}function wt(){Xo&&Xo.previousStep()}function $t(){Xo==null||Xo.setRoute(null),Xo=null}function gi(){Ae(0),We(!1),J(Wn.FIT)}function mi(z){pt==="mapbox"?te.getMapView().getMap().setMinZoom(z):pt==="google"&&te.getMapView().getMap().setOptions({minZoom:z})}function Q(){gi(),$t(),a()}function J(z){typeof c=="function"&&c(z)}function M(){const z=`${Je}&directionsFrom=${me.id}&directionsTo=${jt.id}`;pe(z)}return Ce.useEffect(()=>(D.current=requestAnimationFrame(()=>{J(it?Wn.MAX:Wn.FIT)}),()=>{D.current&&cancelAnimationFrame(D.current)}),[it]),Ce.useEffect(()=>{r&&y&&We(y===Wn.MAX)},[r,y]),Be.jsxs("div",{className:"directions",style:{display:ct?"block":"grid"},children:[Be.jsxs("div",{className:"directions__steps",children:[Be.jsx("div",{className:"directions__minutes",children:$&&Be.jsx("mi-time",{translations:JSON.stringify({days:w("d"),hours:w("h"),minutes:w("min")}),seconds:$})}),Be.jsx(G5,{steps:Ht(),originLocation:xe==null?void 0:xe.originLocation,onNextStep:()=>It(),isOpen:r,onPreviousStep:()=>wt()})]}),ct&&Be.jsxs(Be.Fragment,{children:[Be.jsx("hr",{}),Be.jsxs("div",{className:"directions__kiosk",children:[Be.jsx(qv,{onAccessibilityChanged:()=>gi()}),Be.jsxs("button",{className:"directions__qr-code",onClick:()=>M(),children:[Be.jsx(j5,{}),w("Scan QR code")]})]})]}),Be.jsxs("div",{className:"directions__actions",children:[Be.jsx("div",{className:"directions__details",children:(xe==null?void 0:xe.destinationLocation)&&Be.jsxs("div",{className:"directions__info",children:[o&&xe.destinationLocation.id!=="USER_POSITION"&&Be.jsx("div",{className:"directions__icon",children:Be.jsx("img",{alt:"",src:o.icon.src?o.icon.src:o.icon})}),Be.jsxs("div",{className:"directions__content",children:[Be.jsx("div",{className:"directions__name",children:xe==null?void 0:xe.destinationLocation.properties.name}),Be.jsx("mi-location-info",{ref:F,"show-external-id":St})]})]})}),ve?Be.jsx("button",{className:"directions__finish",onClick:()=>f(),style:{background:De},children:w("Finish route")}):Be.jsx("button",{className:"directions__cancel",onClick:()=>Q(),children:w("Cancel route")})]})]})}const tq="",W5=On({key:"useKeyboard",default:!1}),q5=Ce.forwardRef(function(a,c){const{searchInputElement:f}=a,y=Ce.useRef(),w=zi(qc);return Ce.useImperativeHandle(c,()=>({clearInputField(){y.current.clearInputField()}})),Ce.useEffect(()=>{const{current:D}=y;f&&(D.inputElement=f)},[f]),Be.jsx("mi-keyboard",{language:w,ref:y})});q5.propTypes={searchInputElement:et.instanceOf(HTMLInputElement)};const Km=On({key:"searchResults",default:[]}),Jv=On({key:"selectedCategory",default:void 0}),iq="";function sP(){return new Promise(r=>{const a=document.querySelector(".chip--active");if(a)r(a);else{const c=new MutationObserver(()=>{const f=document.querySelector(".chip--active");f&&(c.disconnect(),r(f))});c.observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}})}const aP=On({key:"isBottomSheetLoaded",default:!1}),K5=On({key:"category",default:void 0}),X5=r=>en.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M17.5 20.9999L10.5 13.9999L17.5 6.99994",stroke:"#1F2937",strokeWidth:2.33333,strokeLinecap:"round",strokeLinejoin:"round"})),lP=r=>en.createElement("svg",{width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{d:"M10.5 7.00006L17.5 14.0001L10.5 21.0001",stroke:"#1F2937",strokeWidth:2.33333,strokeLinecap:"round",strokeLinejoin:"round"}));ex.propTypes={onSetSize:et.func,getFilteredLocations:et.func,searchFieldRef:et.object,isOpen:et.bool,topLevelCategory:et.bool,handleBack:et.func,selectedCategoriesArray:et.object,categoryOrientation:et.oneOf(["horizontal","vertical"])};function ex({onSetSize:r,getFilteredLocations:a,searchFieldRef:c,isOpen:f,topLevelCategory:y,handleBack:w,selectedCategoriesArray:D,categoryOrientation:o}){const j=zi(Tf),F=ra(),[$,oe]=ln(Jv),[,te]=ln(Km),[,ge]=ln(zm),xe=dh(),[Ae,it]=Ce.useState(),We=zi(aP),me=zi(K5),ce=zi(As),pe=N5(ce,f),[ve,De]=Ce.useState([]),[ct,St]=Ce.useState([]),{t:Je}=Ho(),jt=Yc(),pt=Ce.useRef(null),[Pt,Dt]=Ce.useState(!1),[Ht,It]=Ce.useState(!1),wt=z=>{mi&&pt.current&&pt.current.scrollBy({left:z==="left"?-200:200,behavior:"smooth"})},$t=()=>{if(pt.current){const{scrollLeft:z,scrollWidth:B,clientWidth:U}=pt.current,Y=z<=0,ee=z>=B-U-1;Dt(!Y),It(!ee)}},gi=!y&&ve.length===0,mi=jt&&o==="horizontal"&&!gi;Ce.useEffect(()=>{if(!mi)return;const z=pt.current;if(z)return $t(),z.addEventListener("scroll",$t),()=>{z.removeEventListener("scroll",$t)}},[mi,ve.length]);const Q=`categories prevent-scroll${jt?` categories--kiosk-${o||"vertical"}`:""}`;function J(z){typeof r=="function"&&r(z)}function M(z){oe(z),$===z?(te([]),oe(null),ge([]),c.current.getValue()&&c.current.triggerSearch()):c.current.getValue()?c.current.triggerSearch():a(z)}return Ce.useEffect(()=>{var z;pe&&$&&(oe(null),te([]),ge([]),(z=c.current)!=null&&z.getValue()&&c.current.clear())},[pe]),Ce.useEffect(()=>{$&&(sP().then(z=>it(z)),J(Wn.MAX))},[$]),Ce.useEffect(()=>{Ae&&me!==void 0&&(F||!F&&We)&&Ae.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[Ae,me,We]),Ce.useEffect(()=>{var U,Y,ee;let z=[];if(y){const ne=j.flatMap(([,ie])=>ie.childKeys||[]);z=j.filter(([ie])=>!ne.includes(ie))}else if($){const ne=(U=j.find(([de])=>de===$))==null?void 0:U[1],ie=(ne==null?void 0:ne.childKeys)||[];z=j.filter(([de])=>ie.includes(de))}De(z);const B=(ee=(Y=j.find(([ne])=>ne===$))==null?void 0:Y[1])==null?void 0:ee.displayName;St(B)},[j]),Be.jsx("div",{className:Q,...xe,children:j.length>0&&Be.jsxs(Be.Fragment,{children:[!y&&Be.jsxs("div",{className:"categories__nav",children:[Be.jsx("button",{"aria-label":Je("Back"),type:"button",className:"categories__nav-button",onClick:w,children:Be.jsx(X5,{})}),Be.jsx("div",{children:ct})]}),Be.jsxs("div",{className:"categories__row",children:[mi&&Be.jsx("div",{className:"categories__chevron categories__chevron--left",children:Be.jsx("button",{"aria-label":Je("Previous categories"),type:"button",disabled:!Pt,onClick:()=>wt("left"),children:Be.jsx(X5,{})})}),Be.jsx("div",{className:"categories__list",ref:jt?pt:void 0,children:ve.map(([z,B])=>!y&&D.current.length!==1?null:Be.jsx("div",{className:"categories__category",children:Be.jsxs("button",{onClick:()=>y?M(z):a(z),children:[Be.jsx("img",{src:B.iconUrl,alt:""}),B.displayName]})},z))}),mi&&Be.jsx("div",{className:"categories__chevron categories__chevron--right",children:Be.jsx("button",{"aria-label":Je("Next categories"),type:"button",disabled:!Ht,onClick:()=>wt("right"),children:Be.jsx(lP,{})})})]})]})})}const cP=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{opacity:.12,d:"M3 7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H16.2C17.8802 3 18.7202 3 19.362 3.32698C19.9265 3.6146 20.3854 4.07354 20.673 4.63803C21 5.27976 21 6.11984 21 7.8V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8Z",fill:"#111827",style:{fill:"#111827",fill:"color(display-p3 0.0667 0.0941 0.1529)",fillOpacity:1}}),en.createElement("path",{d:"M12 16V12M12 8H12.01M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z",stroke:"#111827",style:{stroke:"#111827",stroke:"color(display-p3 0.0667 0.0941 0.1529)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Xm=On({key:"isLegendDialogVisible",default:!1}),J5=pm({key:"legendFields",get:({get:r})=>{const a=r(Aa);if(!(a!=null&&a.properties.fields))return;const c=[];for(const y of Object.keys(a.properties.fields)){const w=parseInt(y.charAt(0));if(!Number.isInteger(w))continue;const D=c.find(F=>F.index===w),o=y.toLowerCase().includes("legendheading"),j=y.toLowerCase().includes("legendcontent");if(D)o?D.heading=a.properties.fields[y].value:j&&(D.content=a.properties.fields[y].value);else{const F={index:w,heading:o?a.properties.fields[y].value:null,content:j?a.properties.fields[y].value:null};c.push(F)}}return c.sort((y,w)=>y.index-w.index)}}),tx=On({key:"initialVenueName",default:null});ix.propTypes={categories:et.array,onSetSize:et.func,isOpen:et.bool};function ix({onSetSize:r,isOpen:a}){const c=zi(ah),{t:f}=Ho(),y=Ce.useRef(),w=Ce.useRef(),D=Ce.useRef(),o=Ce.useRef(),j=Ce.useRef(),F=100,[$,oe]=Ce.useState(!0),[te,ge]=ln(Km),xe=zi(Tf),Ae=zi(W5),[it,We]=Ce.useState(!1),[me,ce]=ln(Jv),pe=dh(),[ve,De]=Ce.useState(),ct=zi(As),[,St]=ln(zm),[,Je]=ln(ul),[,jt]=ln(Vm),[pt,Pt]=ln($l),Dt=zi(qc),Ht=ra(),It=zi(Aa),[wt,$t]=Ce.useState(!1),gi=zi(Gv),mi=Yc(),[,Q]=ln(Xm),[J,M]=Ce.useState(!1),z=zi(J5),B=zi($m),U=zi(Df),Y=zi(tx),[ee,ne]=Ce.useState(!1),ie=Ce.useRef([]),[de,Qe]=Ce.useState([]),[Re,He]=Ce.useState(!1);function qe(){var li,wi,Ni;ie.current.length===1?(ce(null),ge([]),St([]),ot(Wn.FIT),ne(!0),((wi=(li=o.current)==null?void 0:li.getValue())==null?void 0:wi.trim())?o.current.triggerSearch():(Ni=o.current)==null||Ni.clear(),ie.current.pop()):(ie.current.pop(),ce(ie.current[0]))}function Ue(li){var wi;ie.current.includes(li)||ie.current.push(li),me&&(ce([]),ge([]),St([])),ce(li),window.mapsindoors.services.LocationsService.getLocations({categories:li,venue:B||(wi=U.find(Ni=>Ni.name.toLowerCase()===pt.toLowerCase()))==null?void 0:wi.name}).then(Ni=>Tt(Ni,!0))}function ot(li){typeof r=="function"&&r(li)}function ht(li){return me?[...li].sort((wi,Ni)=>{var qi,tn;return(((qi=wi.properties)==null?void 0:qi.name)||"").localeCompare(((tn=Ni.properties)==null?void 0:tn.name)||"")}):li}function Tt(li,wi=!1){var qi;const Ni=li.slice(0,F);ot(Wn.MAX),ge(Ni),St(Ni),We(Ni.length===0),li&&wi&&Ct(li),mi&&((qi=y.current)==null||qi.addEventListener("transitionend",()=>{var tn;(tn=w==null?void 0:w.current)==null||tn.updateScrollButtons()},{once:!0}))}function Ct(li){if(!ct.goTo)return;const wi=ct.getFloor(),Ni={type:"FeatureCollection",features:li.filter(qi=>parseInt(qi.properties.floor,10)===parseInt(wi,10)).filter(qi=>qi.properties.venueId.toLowerCase()===pt.toLowerCase()).map(qi=>({type:"Feature",geometry:qi.geometry,properties:qi.properties}))};Ni.features.length>0&&Promise.all([bi(),Li()]).then(([qi,tn])=>{ct.goTo(Ni,{maxZoom:22,padding:{bottom:qi,left:tn,top:0,right:0}})})}function ui(){ge([]),We(!1),me&&Ue(me),St([]),Lr(j.current)||j.current.clearInputField()}function ei(){oe(!1),o.current.getInputField();const li=y.current.closest(".sheet");li?li.addEventListener("transitionend",()=>{o.current.focusInput(),ne(!0)},{once:!0}):(o.current.focusInput(),ne(!0))}function Ti(li){De(li)}function si(li){Je(li),li.properties.venueId.toLowerCase()!==pt.toLowerCase()&&(Pt(li.properties.venueId),jt(!0));const wi=ct.getFloor(),Ni=li.properties.floor;Ni!==wi&&ct.setFloor(Ni),Promise.all([bi(),Li()]).then(([qi,tn])=>{ct.goTo(li,{maxZoom:22,padding:{bottom:qi,left:tn,top:0,right:0}})})}function bi(){return new Promise(li=>{Ht?It?If().then(wi=>li(wi)):li(0):li(200)})}function Li(){return new Promise(li=>{Ht?It?li(0):$c().then(wi=>li(wi)):li(0)})}function Ii(){if(te.length>0){let li;return Ht?li=document.querySelector(".mapsindoors-map").clientHeight*.6+"px":li="100%",{display:"flex",flexDirection:"column",maxHeight:li,overflow:"hidden"}}}function Qt(){return mi&&Re}return Ce.useEffect(()=>{const li=[".search__info",".search__back-button",".categories",".sheet__content"],wi=[".mi-floor-selector",".view-mode-switch",".mi-my-position",".view-selector__toggle-button",".building-list",".mapboxgl-ctrl-bottom-right",".gmnoprint",".language-selector-portal"],Ni=qi=>{const tn=li.some(yt=>qi.target.closest(yt)),rn=wi.some(yt=>qi.target.closest(yt)),Cn=qi.target.closest(".search__results");tn?(ot(Wn.MAX),D.current=requestAnimationFrame(()=>{ne(!0)})):!Cn&&!rn&&(ne(!1),ot(Wn.MIN),ce(null),ge([]),St([]),ie.current=[])};return a?D.current=requestAnimationFrame(()=>{document.addEventListener("click",Ni)}):document.removeEventListener("click",Ni),()=>{document.removeEventListener("click",Ni),D.current&&cancelAnimationFrame(D.current)}},[a]),Ce.useEffect(()=>()=>{De()},[]),Ce.useEffect(()=>{me&&pt!==Y&&(ge([]),ce(null))},[pt]),Ce.useEffect(()=>{me&&window.mapsindoors.services.LocationsService.once("update_completed",()=>{o.current.triggerSearch()})},[Dt]),Ce.useEffect(()=>(ct==null||ct.on("mouseenter",Ti),()=>{ct==null||ct.off("mouseenter",Ti)}),[ct]),Ce.useEffect(()=>{if(a&&mi&&te.length>0){const li=document.querySelector(".mapsindoors-map .search__results");w.current.scrollContainerElementRef=li}},[te,a]),Ce.useEffect(()=>{if(Ae){const li=wi=>{wi.target.closest("mi-keyboard")||wi.target.tagName.toUpperCase()==="MI-SEARCH"||wi.target.tagName.toUpperCase()==="INPUT"?$t(!0):$t(!1)};return window.addEventListener("click",li,!1),()=>{window.removeEventListener("click",li,!1)}}},[Ae]),Ce.useEffect(()=>{me&&Ue(me)},[me]),Ce.useEffect(()=>{It&&M(z.length>0)},[It]),Ce.useEffect(()=>{var wi,Ni;const li=((Ni=(wi=xe.find(([qi])=>qi===me))==null?void 0:wi[1])==null?void 0:Ni.childKeys)||[];Qe(li)},[xe,me]),Ce.useEffect(()=>{var li,wi;He(((li=c==null?void 0:c.appSettings)==null?void 0:li.areHorizontalCategoriesEnabled)===!0||((wi=c==null?void 0:c.appSettings)==null?void 0:wi.areHorizontalCategoriesEnabled)==="true")},[c]),Be.jsxs("div",{className:"search",ref:y,style:Ii(),children:[Be.jsxs("div",{className:"search__info",style:{gridTemplateColumns:mi&&J?"min-content 1fr":"auto"},children:[mi&&J&&Be.jsx("button",{className:"search__legend",onClick:()=>Q(!0),children:Be.jsx(cP,{})}),Be.jsxs("label",{className:"search__label",children:[Be.jsx("span",{children:f("Search by name, category, building...")}),Be.jsx(Zm,{ref:o,mapsindoors:!0,placeholder:f("Search by name, category, building..."),results:li=>Tt(li),clicked:()=>ei(),cleared:()=>ui(),category:me,disabled:$})]})]}),(Qt()||ee)&&!it&&xe.length>0&&te.length===0&&Be.jsx(ex,{onSetSize:r,searchFieldRef:o,getFilteredLocations:li=>Ue(li),isOpen:!!me,topLevelCategory:!0,categoryOrientation:Re?"horizontal":"vertical"}),it&&Be.jsxs("p",{className:"search__error",children:[" ",f("Nothing was found")]}),te.length>0&&Be.jsxs("div",{className:"search__results prevent-scroll",...pe,children:[me&&Be.jsx(ex,{handleBack:qe,getFilteredLocations:li=>Ue(li),onLocationClicked:si,childKeys:de,topLevelCategory:!1,selectedCategoriesArray:ie,categoryOrientation:Re?"horizontal":"vertical"}),ht(te).map(li=>Be.jsx(Gm,{location:li,locationClicked:()=>si(li),isHovered:(li==null?void 0:li.id)===(ve==null?void 0:ve.id)},li.id))]}),wt&&Ht&&Be.jsx(q5,{ref:j,searchInputElement:gi}),a&&mi&&te.length>0&&os.createPortal(Be.jsx("div",{className:"search__scroll-buttons",children:Be.jsx("mi-scroll-buttons",{ref:w})}),document.querySelector(".mapsindoors-map"))]})}const nq="";nx.propTypes={onLocationClick:et.func.isRequired,onBack:et.func.isRequired,locations:et.arrayOf(et.object),onSetSize:et.func};function nx({onBack:r,onLocationClick:a,locations:c,onSetSize:f}){const{t:y}=Ho(),w=dh();function D(o){typeof f=="function"&&f(o)}return Ce.useEffect(()=>{D(Wn.FIT)},[]),Be.jsxs("div",{className:"locations-list",children:[Be.jsxs("div",{className:"locations-list__header",children:[Be.jsxs("div",{className:"locations-list__title",children:[c==null?void 0:c.length," ",y("Locations")]}),Be.jsx("button",{className:"locations-list__close",onClick:()=>r(),"aria-label":y("Close"),children:Be.jsx(Sf,{})})]}),Be.jsx("div",{className:"locations-list__scrollable prevent-scroll",...w,children:Be.jsx("div",{className:"locations-list__list",children:c==null?void 0:c.map(o=>Be.jsx(Gm,{location:o,locationClicked:j=>a(j)},o.id))})})]})}eI.propTypes={directionsFromLocation:et.string,directionsToLocation:et.string,pushAppView:et.func.isRequired,currentAppView:et.string,appViews:et.object,onRouteFinished:et.func.isRequired};function eI({directionsFromLocation:r,directionsToLocation:a,pushAppView:c,currentAppView:f,appViews:y,onRouteFinished:w}){const D=Ce.useRef(),o=Ce.useRef(),j=Ce.useRef(),F=Ce.useRef(),$=Ce.useRef(),oe=Ce.useRef(),[te,ge]=ln(ul),[xe,Ae]=Ce.useState(!1),[it,We]=ln(Om),[,me]=ln(km);Ce.useEffect(()=>{r&&a&&f===y.DIRECTIONS||(r&&a||r?c(y.WAYFINDING):te?c(y.LOCATION_DETAILS,te):(it==null?void 0:it.length)>1?c(y.EXTERNALIDS):(it==null?void 0:it.length)===1?(ge(it[0]),me(it[0].id)):c(y.SEARCH))},[te,r,a,it]),Ce.useEffect(()=>{if(te){const De=te.properties.imageURL||te.properties.description||te.properties.additionalDetails||Object.keys(te.properties.categories).length>0;Ae(De)}},[te]);function ce(){(it==null?void 0:it.length)>1?(c(y.EXTERNALIDS),ge()):(it==null?void 0:it.length)===1?(c(y.SEARCH),ge(),We([]),o.current.setSnapPoint(Wn.MIN)):(c(y.SEARCH),ge(),o.current.setSnapPoint(Wn.MIN))}function pe(){c(y.SEARCH),ge(),We([])}const ve=[Be.jsx(hh,{minimizedHeight:80,initialSnapPoint:Wn.MIN,isOpen:f===y.SEARCH,ref:o,children:Be.jsx(ix,{isOpen:f===y.SEARCH,onSetSize:De=>o.current.setSnapPoint(De)})},"SEARCH"),Be.jsx(hh,{minimizedHeight:200,isOpen:f===y.EXTERNALIDS,initialSnapPoint:Wn.MIN,ref:j,children:Be.jsx(nx,{onSetSize:De=>j.current.setSnapPoint(De),onBack:()=>pe(),locations:it,onLocationClick:De=>ge(De)})},"EXTERNALIDS"),Be.jsx(hh,{minimizedHeight:xe?180:136,initialSnapPoint:Wn.MIN,isOpen:f===y.LOCATION_DETAILS,ref:F,children:Be.jsx(Yv,{onSetSize:De=>F.current.setSnapPoint(De),onStartWayfinding:()=>c(y.WAYFINDING),onBack:()=>ce(),onStartDirections:()=>c(y.DIRECTIONS),isOpen:f===y.LOCATION_DETAILS})},"LOCATION_DETAILS"),Be.jsx(hh,{minimizedHeight:190,initialSnapPoint:Wn.FIT,isOpen:f===y.WAYFINDING,ref:$,children:Be.jsx(Kv,{onSetSize:De=>$.current.setSnapPoint(De),onStartDirections:()=>c(y.DIRECTIONS),directionsToLocation:a,directionsFromLocation:r,onBack:()=>c(te?y.LOCATION_DETAILS:y.SEARCH),isActive:f===y.WAYFINDING})},"WAYFINDING"),Be.jsx(hh,{minimizedHeight:273,isOpen:f===y.DIRECTIONS,initialSnapPoint:Wn.FIT,ref:oe,children:Be.jsx(Xv,{onSetSize:De=>oe.current.setSnapPoint(De),isOpen:f===y.DIRECTIONS,onBack:()=>c(y.WAYFINDING),onRouteFinished:()=>w()})},"DIRECTIONS")];return Be.jsx("div",{ref:D,className:"bottom-sheets",children:Be.jsx(M5.Provider,{value:D,children:ve})})}const uP={SEARCH:void 0,EXTERNALIDS:"EXTERNALIDS",VENUE_SELECTOR:"VENUE_SELECTOR",LOCATION_DETAILS:"LOCATION_DETAILS",WAYFINDING:"WAYFINDING",DIRECTIONS:"DIRECTIONS"},hP=()=>{const[r,a]=Ce.useState(void 0),[c,f]=Ce.useState(),[y,w]=Ce.useState(null);Ce.useEffect(()=>{function F($){var oe,te;a((oe=$.state)==null?void 0:oe.value),f((te=$.state)==null?void 0:te.payload)}return window.addEventListener("popstate",F),()=>{window.removeEventListener("popstate",F)}},[]);const D=(F,$)=>{window.history.pushState({value:F,payload:$},""),a(F),y===null&&w({value:F,payload:$})};return[D,()=>{window.history.back()},r,c,uP,()=>{D(y.value,y.payload)}]},dP=On({key:"showQRCodeDialog",default:!1});function fP(){const r=zi(tx),[,a]=ln($l),c=ho(Wm),f=ho(ul),y=ho(Nf),w=ho(Qm),D=ho(Vm),o=ho(Mf),j=ho(dP),F=ho(qm),$=ho(Lf),oe=ho(Km),te=ho(zf),ge=ho(Xm),xe=ho(U4),Ae=ho(Iv);return()=>{c(),f(),y(),w(),D(),o(),j(),F(),$(),oe(),te(),ge(),xe(),Ae(),r&&a(r)}}const rq="";fh.propTypes={children:et.node,isOpen:et.bool};function fh({children:r,isOpen:a}){const[c,f]=Ce.useState(!1),y=zi(Aa),w=Ce.useRef(),D=Ce.useRef();return Ce.useEffect(()=>{if(!D)return;const o=new MutationObserver(()=>{var $;const j=D.current.clientHeight,F=($=w.current)==null?void 0:$.clientHeight;f(j>F)});return o.observe(D.current,{childList:!0,subtree:!0}),()=>{o.disconnect()}},[D]),Be.jsx("div",{ref:w,className:`modal ${a?"modal--open":""} ${c?"modal--full":""} ${y?"modal--kiosk":""}`,children:Be.jsx("div",{ref:D,className:"modal__content",children:r})})}tI.propTypes={directionsFromLocation:et.string,directionsToLocation:et.string,pushAppView:et.func,currentAppView:et.string,appViews:et.object,filteredLocationsByExternalIDs:et.array,onRouteFinished:et.func};function tI({directionsFromLocation:r,directionsToLocation:a,pushAppView:c,currentAppView:f,appViews:y,onRouteFinished:w}){const[D,o]=ln(ul),[j,F]=ln(Om),[,$]=ln(km),oe=zi(Aa);Ce.useEffect(()=>{r&&a&&f===y.DIRECTIONS||(r&&a||r?c(y.WAYFINDING):D?c(y.LOCATION_DETAILS,D):(j==null?void 0:j.length)>1?c(y.EXTERNALIDS):(j==null?void 0:j.length)===1?(o(j[0]),$(j[0].id)):c(y.SEARCH))},[D,r,a,j]);function te(){(j==null?void 0:j.length)>1?(c(y.EXTERNALIDS),o()):(j==null?void 0:j.length)===1?(c(y.SEARCH),o(),F([])):(c(y.SEARCH),o())}function ge(){c(y.SEARCH),o(),F([])}function xe(){c(oe?y.LOCATION_DETAILS:y.WAYFINDING)}const Ae=[Be.jsx(fh,{isOpen:f===y.SEARCH,children:Be.jsx(ix,{isOpen:f===y.SEARCH})},"SEARCH"),Be.jsx(fh,{isOpen:f===y.EXTERNALIDS,children:Be.jsx(nx,{onBack:()=>ge(),locations:j,onLocationClick:it=>o(it)})},"EXTERNALIDS"),Be.jsx(fh,{isOpen:f===y.LOCATION_DETAILS,children:Be.jsx(Yv,{onStartWayfinding:()=>c(y.WAYFINDING),onBack:()=>te(),onStartDirections:()=>c(y.DIRECTIONS),isOpen:f===y.LOCATION_DETAILS})},"LOCATION_DETAILS"),Be.jsx(fh,{isOpen:f===y.WAYFINDING,children:Be.jsx(Kv,{onStartDirections:()=>c(y.DIRECTIONS),directionsToLocation:a,directionsFromLocation:r,onBack:()=>c(D?y.LOCATION_DETAILS:y.SEARCH),isActive:f===y.WAYFINDING})},"WAYFINDING"),Be.jsx(fh,{isOpen:f===y.DIRECTIONS,children:Be.jsx(Xv,{isOpen:f===y.DIRECTIONS,onBack:()=>xe(),onRouteFinished:()=>w()})},"DIRECTIONS")];return Be.jsx("div",{children:Ae})}const iI=r=>{const[a,c]=Ce.useState(),f=zi(Cm),y=zi(k4);return Ce.useEffect(()=>{y&&r&&(r==="USER_POSITION"&&!f?(c("USER_POSITION_PENDING"),y.watchPosition()):r!=="USER_POSITION"&&window.mapsindoors.services.LocationsService.getLocation(r).then(w=>c(w)),f&&r==="USER_POSITION"&&c(Zv(f)))},[r,f,y]),a},pP=On({key:"gmMapId",default:null}),oq="";function gP(){const r=zi(Mf),a=Ce.useRef();return Ce.useEffect(()=>{var c;(c=a.current)==null||c.classList.add("notification"),r?a.current.push(r.text,r.type,!0):a.current.clearAll()},[r]),Be.jsx("mi-notification",{ref:a,position:"top-center"})}const sq="";var Of={},mP=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},nI={},Ss={};let rx;const yP=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Ss.getSymbolSize=function(a){if(!a)throw new Error('"version" cannot be null or undefined');if(a<1||a>40)throw new Error('"version" should be in range from 1 to 40');return a*4+17},Ss.getSymbolTotalCodewords=function(a){return yP[a]},Ss.getBCHDigit=function(r){let a=0;for(;r!==0;)a++,r>>>=1;return a},Ss.setToSJISFunction=function(a){if(typeof a!="function")throw new Error('"toSJISFunc" is not a valid function.');rx=a},Ss.isKanjiModeEnabled=function(){return typeof rx<"u"},Ss.toSJIS=function(a){return rx(a)};var Jm={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function a(c){if(typeof c!="string")throw new Error("Param is not a string");switch(c.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+c)}}r.isValid=function(f){return f&&typeof f.bit<"u"&&f.bit>=0&&f.bit<4},r.from=function(f,y){if(r.isValid(f))return f;try{return a(f)}catch{return y}}})(Jm);function rI(){this.buffer=[],this.length=0}rI.prototype={get:function(r){const a=Math.floor(r/8);return(this.buffer[a]>>>7-r%8&1)===1},put:function(r,a){for(let c=0;c<a;c++)this.putBit((r>>>a-c-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){const a=Math.floor(this.length/8);this.buffer.length<=a&&this.buffer.push(0),r&&(this.buffer[a]|=128>>>this.length%8),this.length++}};var _P=rI;function jf(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=new Uint8Array(r*r),this.reservedBit=new Uint8Array(r*r)}jf.prototype.set=function(r,a,c,f){const y=r*this.size+a;this.data[y]=c,f&&(this.reservedBit[y]=!0)},jf.prototype.get=function(r,a){return this.data[r*this.size+a]},jf.prototype.xor=function(r,a,c){this.data[r*this.size+a]^=c},jf.prototype.isReserved=function(r,a){return this.reservedBit[r*this.size+a]};var vP=jf,oI={};(function(r){const a=Ss.getSymbolSize;r.getRowColCoords=function(f){if(f===1)return[];const y=Math.floor(f/7)+2,w=a(f),D=w===145?26:Math.ceil((w-13)/(2*y-2))*2,o=[w-7];for(let j=1;j<y-1;j++)o[j]=o[j-1]-D;return o.push(6),o.reverse()},r.getPositions=function(f){const y=[],w=r.getRowColCoords(f),D=w.length;for(let o=0;o<D;o++)for(let j=0;j<D;j++)o===0&&j===0||o===0&&j===D-1||o===D-1&&j===0||y.push([w[o],w[j]]);return y}})(oI);var sI={};const xP=Ss.getSymbolSize,aI=7;sI.getPositions=function(a){const c=xP(a);return[[0,0],[c-aI,0],[0,c-aI]]};var lI={};(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const a={N1:3,N2:3,N3:40,N4:10};r.isValid=function(y){return y!=null&&y!==""&&!isNaN(y)&&y>=0&&y<=7},r.from=function(y){return r.isValid(y)?parseInt(y,10):void 0},r.getPenaltyN1=function(y){const w=y.size;let D=0,o=0,j=0,F=null,$=null;for(let oe=0;oe<w;oe++){o=j=0,F=$=null;for(let te=0;te<w;te++){let ge=y.get(oe,te);ge===F?o++:(o>=5&&(D+=a.N1+(o-5)),F=ge,o=1),ge=y.get(te,oe),ge===$?j++:(j>=5&&(D+=a.N1+(j-5)),$=ge,j=1)}o>=5&&(D+=a.N1+(o-5)),j>=5&&(D+=a.N1+(j-5))}return D},r.getPenaltyN2=function(y){const w=y.size;let D=0;for(let o=0;o<w-1;o++)for(let j=0;j<w-1;j++){const F=y.get(o,j)+y.get(o,j+1)+y.get(o+1,j)+y.get(o+1,j+1);(F===4||F===0)&&D++}return D*a.N2},r.getPenaltyN3=function(y){const w=y.size;let D=0,o=0,j=0;for(let F=0;F<w;F++){o=j=0;for(let $=0;$<w;$++)o=o<<1&2047|y.get(F,$),$>=10&&(o===1488||o===93)&&D++,j=j<<1&2047|y.get($,F),$>=10&&(j===1488||j===93)&&D++}return D*a.N3},r.getPenaltyN4=function(y){let w=0;const D=y.data.length;for(let j=0;j<D;j++)w+=y.data[j];return Math.abs(Math.ceil(w*100/D/5)-10)*a.N4};function c(f,y,w){switch(f){case r.Patterns.PATTERN000:return(y+w)%2===0;case r.Patterns.PATTERN001:return y%2===0;case r.Patterns.PATTERN010:return w%3===0;case r.Patterns.PATTERN011:return(y+w)%3===0;case r.Patterns.PATTERN100:return(Math.floor(y/2)+Math.floor(w/3))%2===0;case r.Patterns.PATTERN101:return y*w%2+y*w%3===0;case r.Patterns.PATTERN110:return(y*w%2+y*w%3)%2===0;case r.Patterns.PATTERN111:return(y*w%3+(y+w)%2)%2===0;default:throw new Error("bad maskPattern:"+f)}}r.applyMask=function(y,w){const D=w.size;for(let o=0;o<D;o++)for(let j=0;j<D;j++)w.isReserved(j,o)||w.xor(j,o,c(y,j,o))},r.getBestMask=function(y,w){const D=Object.keys(r.Patterns).length;let o=0,j=1/0;for(let F=0;F<D;F++){w(F),r.applyMask(F,y);const $=r.getPenaltyN1(y)+r.getPenaltyN2(y)+r.getPenaltyN3(y)+r.getPenaltyN4(y);r.applyMask(F,y),$<j&&(j=$,o=F)}return o}})(lI);var e0={};const Gl=Jm,t0=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i0=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e0.getBlocksCount=function(a,c){switch(c){case Gl.L:return t0[(a-1)*4+0];case Gl.M:return t0[(a-1)*4+1];case Gl.Q:return t0[(a-1)*4+2];case Gl.H:return t0[(a-1)*4+3];default:return}},e0.getTotalCodewordsCount=function(a,c){switch(c){case Gl.L:return i0[(a-1)*4+0];case Gl.M:return i0[(a-1)*4+1];case Gl.Q:return i0[(a-1)*4+2];case Gl.H:return i0[(a-1)*4+3];default:return}};var cI={},n0={};const kf=new Uint8Array(512),r0=new Uint8Array(256);(function(){let a=1;for(let c=0;c<255;c++)kf[c]=a,r0[a]=c,a<<=1,a&256&&(a^=285);for(let c=255;c<512;c++)kf[c]=kf[c-255]})(),n0.log=function(a){if(a<1)throw new Error("log("+a+")");return r0[a]},n0.exp=function(a){return kf[a]},n0.mul=function(a,c){return a===0||c===0?0:kf[r0[a]+r0[c]]},function(r){const a=n0;r.mul=function(f,y){const w=new Uint8Array(f.length+y.length-1);for(let D=0;D<f.length;D++)for(let o=0;o<y.length;o++)w[D+o]^=a.mul(f[D],y[o]);return w},r.mod=function(f,y){let w=new Uint8Array(f);for(;w.length-y.length>=0;){const D=w[0];for(let j=0;j<y.length;j++)w[j]^=a.mul(y[j],D);let o=0;for(;o<w.length&&w[o]===0;)o++;w=w.slice(o)}return w},r.generateECPolynomial=function(f){let y=new Uint8Array([1]);for(let w=0;w<f;w++)y=r.mul(y,new Uint8Array([1,a.exp(w)]));return y}}(cI);const uI=cI;function ox(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}ox.prototype.initialize=function(a){this.degree=a,this.genPoly=uI.generateECPolynomial(this.degree)},ox.prototype.encode=function(a){if(!this.genPoly)throw new Error("Encoder not initialized");const c=new Uint8Array(a.length+this.degree);c.set(a);const f=uI.mod(c,this.genPoly),y=this.degree-f.length;if(y>0){const w=new Uint8Array(this.degree);return w.set(f,y),w}return f};var bP=ox,hI={},Zl={},sx={};sx.isValid=function(a){return!isNaN(a)&&a>=1&&a<=40};var Sa={};const dI="[0-9]+",wP="[A-Z $%*+\\-./:]+";let Pf="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Pf=Pf.replace(/u/g,"\\u");const MP="(?:(?![A-Z0-9 $%*+\\-./:]|"+Pf+`)(?:.|[\r
|
|
61
61
|
]))+`;Sa.KANJI=new RegExp(Pf,"g"),Sa.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Sa.BYTE=new RegExp(MP,"g"),Sa.NUMERIC=new RegExp(dI,"g"),Sa.ALPHANUMERIC=new RegExp(wP,"g");const IP=new RegExp("^"+Pf+"$"),TP=new RegExp("^"+dI+"$"),DP=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Sa.testKanji=function(a){return IP.test(a)},Sa.testNumeric=function(a){return TP.test(a)},Sa.testAlphanumeric=function(a){return DP.test(a)},function(r){const a=sx,c=Sa;r.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(w,D){if(!w.ccBits)throw new Error("Invalid mode: "+w);if(!a.isValid(D))throw new Error("Invalid version: "+D);return D>=1&&D<10?w.ccBits[0]:D<27?w.ccBits[1]:w.ccBits[2]},r.getBestModeForData=function(w){return c.testNumeric(w)?r.NUMERIC:c.testAlphanumeric(w)?r.ALPHANUMERIC:c.testKanji(w)?r.KANJI:r.BYTE},r.toString=function(w){if(w&&w.id)return w.id;throw new Error("Invalid mode")},r.isValid=function(w){return w&&w.bit&&w.ccBits};function f(y){if(typeof y!="string")throw new Error("Param is not a string");switch(y.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+y)}}r.from=function(w,D){if(r.isValid(w))return w;try{return f(w)}catch{return D}}}(Zl),function(r){const a=Ss,c=e0,f=Jm,y=Zl,w=sx,D=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,o=a.getBCHDigit(D);function j(te,ge,xe){for(let Ae=1;Ae<=40;Ae++)if(ge<=r.getCapacity(Ae,xe,te))return Ae}function F(te,ge){return y.getCharCountIndicator(te,ge)+4}function $(te,ge){let xe=0;return te.forEach(function(Ae){const it=F(Ae.mode,ge);xe+=it+Ae.getBitsLength()}),xe}function oe(te,ge){for(let xe=1;xe<=40;xe++)if($(te,xe)<=r.getCapacity(xe,ge,y.MIXED))return xe}r.from=function(ge,xe){return w.isValid(ge)?parseInt(ge,10):xe},r.getCapacity=function(ge,xe,Ae){if(!w.isValid(ge))throw new Error("Invalid QR Code version");typeof Ae>"u"&&(Ae=y.BYTE);const it=a.getSymbolTotalCodewords(ge),We=c.getTotalCodewordsCount(ge,xe),me=(it-We)*8;if(Ae===y.MIXED)return me;const ce=me-F(Ae,ge);switch(Ae){case y.NUMERIC:return Math.floor(ce/10*3);case y.ALPHANUMERIC:return Math.floor(ce/11*2);case y.KANJI:return Math.floor(ce/13);case y.BYTE:default:return Math.floor(ce/8)}},r.getBestVersionForData=function(ge,xe){let Ae;const it=f.from(xe,f.M);if(Array.isArray(ge)){if(ge.length>1)return oe(ge,it);if(ge.length===0)return 1;Ae=ge[0]}else Ae=ge;return j(Ae.mode,Ae.getLength(),it)},r.getEncodedBits=function(ge){if(!w.isValid(ge)||ge<7)throw new Error("Invalid QR Code version");let xe=ge<<12;for(;a.getBCHDigit(xe)-o>=0;)xe^=D<<a.getBCHDigit(xe)-o;return ge<<12|xe}}(hI);var fI={};const ax=Ss,pI=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,AP=1<<14|1<<12|1<<10|1<<4|1<<1,gI=ax.getBCHDigit(pI);fI.getEncodedBits=function(a,c){const f=a.bit<<3|c;let y=f<<10;for(;ax.getBCHDigit(y)-gI>=0;)y^=pI<<ax.getBCHDigit(y)-gI;return(f<<10|y)^AP};var mI={};const EP=Zl;function ph(r){this.mode=EP.NUMERIC,this.data=r.toString()}ph.getBitsLength=function(a){return 10*Math.floor(a/3)+(a%3?a%3*3+1:0)},ph.prototype.getLength=function(){return this.data.length},ph.prototype.getBitsLength=function(){return ph.getBitsLength(this.data.length)},ph.prototype.write=function(a){let c,f,y;for(c=0;c+3<=this.data.length;c+=3)f=this.data.substr(c,3),y=parseInt(f,10),a.put(y,10);const w=this.data.length-c;w>0&&(f=this.data.substr(c),y=parseInt(f,10),a.put(y,w*3+1))};var SP=ph;const CP=Zl,lx=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function gh(r){this.mode=CP.ALPHANUMERIC,this.data=r}gh.getBitsLength=function(a){return 11*Math.floor(a/2)+6*(a%2)},gh.prototype.getLength=function(){return this.data.length},gh.prototype.getBitsLength=function(){return gh.getBitsLength(this.data.length)},gh.prototype.write=function(a){let c;for(c=0;c+2<=this.data.length;c+=2){let f=lx.indexOf(this.data[c])*45;f+=lx.indexOf(this.data[c+1]),a.put(f,11)}this.data.length%2&&a.put(lx.indexOf(this.data[c]),6)};var NP=gh,LP=function(a){for(var c=[],f=a.length,y=0;y<f;y++){var w=a.charCodeAt(y);if(w>=55296&&w<=56319&&f>y+1){var D=a.charCodeAt(y+1);D>=56320&&D<=57343&&(w=(w-55296)*1024+D-56320+65536,y+=1)}if(w<128){c.push(w);continue}if(w<2048){c.push(w>>6|192),c.push(w&63|128);continue}if(w<55296||w>=57344&&w<65536){c.push(w>>12|224),c.push(w>>6&63|128),c.push(w&63|128);continue}if(w>=65536&&w<=1114111){c.push(w>>18|240),c.push(w>>12&63|128),c.push(w>>6&63|128),c.push(w&63|128);continue}c.push(239,191,189)}return new Uint8Array(c).buffer};const zP=LP,OP=Zl;function mh(r){this.mode=OP.BYTE,typeof r=="string"&&(r=zP(r)),this.data=new Uint8Array(r)}mh.getBitsLength=function(a){return a*8},mh.prototype.getLength=function(){return this.data.length},mh.prototype.getBitsLength=function(){return mh.getBitsLength(this.data.length)},mh.prototype.write=function(r){for(let a=0,c=this.data.length;a<c;a++)r.put(this.data[a],8)};var jP=mh;const kP=Zl,PP=Ss;function yh(r){this.mode=kP.KANJI,this.data=r}yh.getBitsLength=function(a){return a*13},yh.prototype.getLength=function(){return this.data.length},yh.prototype.getBitsLength=function(){return yh.getBitsLength(this.data.length)},yh.prototype.write=function(r){let a;for(a=0;a<this.data.length;a++){let c=PP.toSJIS(this.data[a]);if(c>=33088&&c<=40956)c-=33088;else if(c>=57408&&c<=60351)c-=49472;else throw new Error("Invalid SJIS character: "+this.data[a]+`
|
|
62
62
|
Make sure your charset is UTF-8`);c=(c>>>8&255)*192+(c&255),r.put(c,13)}};var RP=yh,yI={exports:{}};(function(r){var a={single_source_shortest_paths:function(c,f,y){var w={},D={};D[f]=0;var o=a.PriorityQueue.make();o.push(f,0);for(var j,F,$,oe,te,ge,xe,Ae,it;!o.empty();){j=o.pop(),F=j.value,oe=j.cost,te=c[F]||{};for($ in te)te.hasOwnProperty($)&&(ge=te[$],xe=oe+ge,Ae=D[$],it=typeof D[$]>"u",(it||Ae>xe)&&(D[$]=xe,o.push($,xe),w[$]=F))}if(typeof y<"u"&&typeof D[y]>"u"){var We=["Could not find a path from ",f," to ",y,"."].join("");throw new Error(We)}return w},extract_shortest_path_from_predecessor_list:function(c,f){for(var y=[],w=f;w;)y.push(w),c[w],w=c[w];return y.reverse(),y},find_path:function(c,f,y){var w=a.single_source_shortest_paths(c,f,y);return a.extract_shortest_path_from_predecessor_list(w,y)},PriorityQueue:{make:function(c){var f=a.PriorityQueue,y={},w;c=c||{};for(w in f)f.hasOwnProperty(w)&&(y[w]=f[w]);return y.queue=[],y.sorter=c.sorter||f.default_sorter,y},default_sorter:function(c,f){return c.cost-f.cost},push:function(c,f){var y={value:c,cost:f};this.queue.push(y),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=a})(yI);var BP=yI.exports;(function(r){const a=Zl,c=SP,f=NP,y=jP,w=RP,D=Sa,o=Ss,j=BP;function F(We){return unescape(encodeURIComponent(We)).length}function $(We,me,ce){const pe=[];let ve;for(;(ve=We.exec(ce))!==null;)pe.push({data:ve[0],index:ve.index,mode:me,length:ve[0].length});return pe}function oe(We){const me=$(D.NUMERIC,a.NUMERIC,We),ce=$(D.ALPHANUMERIC,a.ALPHANUMERIC,We);let pe,ve;return o.isKanjiModeEnabled()?(pe=$(D.BYTE,a.BYTE,We),ve=$(D.KANJI,a.KANJI,We)):(pe=$(D.BYTE_KANJI,a.BYTE,We),ve=[]),me.concat(ce,pe,ve).sort(function(ct,St){return ct.index-St.index}).map(function(ct){return{data:ct.data,mode:ct.mode,length:ct.length}})}function te(We,me){switch(me){case a.NUMERIC:return c.getBitsLength(We);case a.ALPHANUMERIC:return f.getBitsLength(We);case a.KANJI:return w.getBitsLength(We);case a.BYTE:return y.getBitsLength(We)}}function ge(We){return We.reduce(function(me,ce){const pe=me.length-1>=0?me[me.length-1]:null;return pe&&pe.mode===ce.mode?(me[me.length-1].data+=ce.data,me):(me.push(ce),me)},[])}function xe(We){const me=[];for(let ce=0;ce<We.length;ce++){const pe=We[ce];switch(pe.mode){case a.NUMERIC:me.push([pe,{data:pe.data,mode:a.ALPHANUMERIC,length:pe.length},{data:pe.data,mode:a.BYTE,length:pe.length}]);break;case a.ALPHANUMERIC:me.push([pe,{data:pe.data,mode:a.BYTE,length:pe.length}]);break;case a.KANJI:me.push([pe,{data:pe.data,mode:a.BYTE,length:F(pe.data)}]);break;case a.BYTE:me.push([{data:pe.data,mode:a.BYTE,length:F(pe.data)}])}}return me}function Ae(We,me){const ce={},pe={start:{}};let ve=["start"];for(let De=0;De<We.length;De++){const ct=We[De],St=[];for(let Je=0;Je<ct.length;Je++){const jt=ct[Je],pt=""+De+Je;St.push(pt),ce[pt]={node:jt,lastCount:0},pe[pt]={};for(let Pt=0;Pt<ve.length;Pt++){const Dt=ve[Pt];ce[Dt]&&ce[Dt].node.mode===jt.mode?(pe[Dt][pt]=te(ce[Dt].lastCount+jt.length,jt.mode)-te(ce[Dt].lastCount,jt.mode),ce[Dt].lastCount+=jt.length):(ce[Dt]&&(ce[Dt].lastCount=jt.length),pe[Dt][pt]=te(jt.length,jt.mode)+4+a.getCharCountIndicator(jt.mode,me))}}ve=St}for(let De=0;De<ve.length;De++)pe[ve[De]].end=0;return{map:pe,table:ce}}function it(We,me){let ce;const pe=a.getBestModeForData(We);if(ce=a.from(me,pe),ce!==a.BYTE&&ce.bit<pe.bit)throw new Error('"'+We+'" cannot be encoded with mode '+a.toString(ce)+`.
|
|
63
63
|
Suggested mode is: `+a.toString(pe));switch(ce===a.KANJI&&!o.isKanjiModeEnabled()&&(ce=a.BYTE),ce){case a.NUMERIC:return new c(We);case a.ALPHANUMERIC:return new f(We);case a.KANJI:return new w(We);case a.BYTE:return new y(We)}}r.fromArray=function(me){return me.reduce(function(ce,pe){return typeof pe=="string"?ce.push(it(pe,null)):pe.data&&ce.push(it(pe.data,pe.mode)),ce},[])},r.fromString=function(me,ce){const pe=oe(me,o.isKanjiModeEnabled()),ve=xe(pe),De=Ae(ve,ce),ct=j.find_path(De.map,"start","end"),St=[];for(let Je=1;Je<ct.length-1;Je++)St.push(De.table[ct[Je]].node);return r.fromArray(ge(St))},r.rawSplit=function(me){return r.fromArray(oe(me,o.isKanjiModeEnabled()))}})(mI);const o0=Ss,cx=Jm,FP=_P,UP=vP,VP=oI,QP=sI,ux=lI,hx=e0,HP=bP,s0=hI,$P=fI,YP=Zl,dx=mI;function GP(r,a){const c=r.size,f=QP.getPositions(a);for(let y=0;y<f.length;y++){const w=f[y][0],D=f[y][1];for(let o=-1;o<=7;o++)if(!(w+o<=-1||c<=w+o))for(let j=-1;j<=7;j++)D+j<=-1||c<=D+j||(o>=0&&o<=6&&(j===0||j===6)||j>=0&&j<=6&&(o===0||o===6)||o>=2&&o<=4&&j>=2&&j<=4?r.set(w+o,D+j,!0,!0):r.set(w+o,D+j,!1,!0))}}function ZP(r){const a=r.size;for(let c=8;c<a-8;c++){const f=c%2===0;r.set(c,6,f,!0),r.set(6,c,f,!0)}}function WP(r,a){const c=VP.getPositions(a);for(let f=0;f<c.length;f++){const y=c[f][0],w=c[f][1];for(let D=-2;D<=2;D++)for(let o=-2;o<=2;o++)D===-2||D===2||o===-2||o===2||D===0&&o===0?r.set(y+D,w+o,!0,!0):r.set(y+D,w+o,!1,!0)}}function qP(r,a){const c=r.size,f=s0.getEncodedBits(a);let y,w,D;for(let o=0;o<18;o++)y=Math.floor(o/3),w=o%3+c-8-3,D=(f>>o&1)===1,r.set(y,w,D,!0),r.set(w,y,D,!0)}function fx(r,a,c){const f=r.size,y=$P.getEncodedBits(a,c);let w,D;for(w=0;w<15;w++)D=(y>>w&1)===1,w<6?r.set(w,8,D,!0):w<8?r.set(w+1,8,D,!0):r.set(f-15+w,8,D,!0),w<8?r.set(8,f-w-1,D,!0):w<9?r.set(8,15-w-1+1,D,!0):r.set(8,15-w-1,D,!0);r.set(f-8,8,1,!0)}function KP(r,a){const c=r.size;let f=-1,y=c-1,w=7,D=0;for(let o=c-1;o>0;o-=2)for(o===6&&o--;;){for(let j=0;j<2;j++)if(!r.isReserved(y,o-j)){let F=!1;D<a.length&&(F=(a[D]>>>w&1)===1),r.set(y,o-j,F),w--,w===-1&&(D++,w=7)}if(y+=f,y<0||c<=y){y-=f,f=-f;break}}}function XP(r,a,c){const f=new FP;c.forEach(function(j){f.put(j.mode.bit,4),f.put(j.getLength(),YP.getCharCountIndicator(j.mode,r)),j.write(f)});const y=o0.getSymbolTotalCodewords(r),w=hx.getTotalCodewordsCount(r,a),D=(y-w)*8;for(f.getLengthInBits()+4<=D&&f.put(0,4);f.getLengthInBits()%8!==0;)f.putBit(0);const o=(D-f.getLengthInBits())/8;for(let j=0;j<o;j++)f.put(j%2?17:236,8);return JP(f,r,a)}function JP(r,a,c){const f=o0.getSymbolTotalCodewords(a),y=hx.getTotalCodewordsCount(a,c),w=f-y,D=hx.getBlocksCount(a,c),o=f%D,j=D-o,F=Math.floor(f/D),$=Math.floor(w/D),oe=$+1,te=F-$,ge=new HP(te);let xe=0;const Ae=new Array(D),it=new Array(D);let We=0;const me=new Uint8Array(r.buffer);for(let ct=0;ct<D;ct++){const St=ct<j?$:oe;Ae[ct]=me.slice(xe,xe+St),it[ct]=ge.encode(Ae[ct]),xe+=St,We=Math.max(We,St)}const ce=new Uint8Array(f);let pe=0,ve,De;for(ve=0;ve<We;ve++)for(De=0;De<D;De++)ve<Ae[De].length&&(ce[pe++]=Ae[De][ve]);for(ve=0;ve<te;ve++)for(De=0;De<D;De++)ce[pe++]=it[De][ve];return ce}function eR(r,a,c,f){let y;if(Array.isArray(r))y=dx.fromArray(r);else if(typeof r=="string"){let F=a;if(!F){const $=dx.rawSplit(r);F=s0.getBestVersionForData($,c)}y=dx.fromString(r,F||40)}else throw new Error("Invalid data");const w=s0.getBestVersionForData(y,c);if(!w)throw new Error("The amount of data is too big to be stored in a QR Code");if(!a)a=w;else if(a<w)throw new Error(`
|
|
@@ -388,11 +388,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
388
388
|
maneuver-icon,
|
|
389
389
|
maneuver-description,
|
|
390
390
|
maneuver-description-distance,
|
|
391
|
-
maneuver-description-distance-border`}))):null}renderToggleButton(){return this.stepData.steps.length<=0||this.hideIndoorSubsteps===!0&&this.stepData.route_context.toLowerCase()==="insidebuilding"?null:tt("span",{class:`step__toggle ${this.substepsAreOpen?"step__toggle--open":""}`,onClick:()=>this.toggleSubsteps()},this.isInternetExplorer?"▼":tt("mi-icon",{part:"step-toggle","icon-name":"toggle"}))}renderTimeAndDistance(){return tt("span",{part:"step-info",class:"step__distance-duration"},tt("mi-time",{seconds:this.stepData.duration.value,translations:`{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}`})," · ",tt("mi-distance",{meters:this.stepData.distance.value,unit:this.unit}),tt("br",null))}renderDrivingStep(){return tt("div",{class:"step",onClick:r=>this.stepClickHandler(r)},this.isInternetExplorer?null:tt("span",{class:"step__action-icon step__action-icon--circled"},tt("mi-icon",{"icon-name":"car"})),tt("h3",{part:"step-heading",class:"step__heading"},this.getStepHeading()),this.renderTravelMode(),tt("div",{part:"step-description",class:"step__description"},this.translationsData.drive,tt("br",null),this.renderTimeAndDistance()),this.renderToggleButton(),this.renderSubsteps())}getStepHeading(){var r;const a={driving:this.translationsData.drive,walking:this.translationsData.walk,bicycling:this.translationsData.bike};return!((r=this.stepData.steps[0])===null||r===void 0)&&r.instructions?this.stepData.steps[0].instructions:a[this.stepData.travel_mode.toLowerCase()]}renderWalkingStep(){let r,a;return this.stepData.parking===!0?(r=`${this.translationsData.park} ${this.stepData.label?` ${this.translationsData.at} `+this.stepData.label:""}`,a="park"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="STEPS"?(r=`${this.translationsData.takeStaircaseToLevel} ${this.stepData.end_location.floor_name}`,a="stairs"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="LADDER"?(r=`${this.translationsData.takeLadderToLevel} ${this.stepData.end_location.floor_name}`,a="ladder"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="ESCALATOR"?(r=`${this.translationsData.takeEscalatorToLevel} ${this.stepData.end_location.floor_name}`,a="escalator"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRRAMP"?(r=`${this.translationsData.takeWheelchairRampToLevel} ${this.stepData.end_location.floor_name}`,a="wheelchair-ramp"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRLIFT"?(r=`${this.translationsData.takeWheelchairLiftToLevel} ${this.stepData.end_location.floor_name}`,a="wheelchair-lift"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="ELEVATOR"?(r=`${this.translationsData.takeElevatorToLevel} ${this.stepData.end_location.floor_name}`,a="elevator"):this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="Outside"?(r=this.addStepContextNameToHeading(this.translationsData.exit,this.stepData.start_context),a="exit"):this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="InsideBuilding"?(r=this.getStepHeading(),a="walk"):this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"&&this.fromTravelMode.toUpperCase()==="TRANSIT"?(r=this.fromTransitStop,a="transit-stop"):this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"?(r=this.getStepHeading(),a="walk"):this.fromRouteContext==="Outside"&&this.stepData.route_context==="InsideBuilding"?(r=this.addStepContextNameToHeading(this.translationsData.enter,this.stepData.end_context),a="enter"):(r=this.fromRouteContext,a="circle"),tt("div",{class:"step",onClick:c=>this.stepClickHandler(c)},this.isInternetExplorer?null:tt("span",{class:`step__action-icon ${a!=="circle"?"step__action-icon--circled":""}`},tt("mi-icon",{"icon-name":a})),tt("h3",{part:"step-heading",class:"step__heading"},r),this.renderTravelMode(),tt("div",{part:"step-description",class:"step__description"},this.translationsData.walk,tt("br",null),this.renderTimeAndDistance()),this.renderToggleButton(),this.renderSubsteps())}addStepContextNameToHeading(r,a){return a&&(a.building?r+=` ${a.building.buildingInfo.name} ${this.translationsData.building}`:a.venue&&(r+=` ${a.venue.venueInfo.name} ${this.translationsData.venue}`)),r}renderBicyclingStep(){return tt("div",{class:"step",onClick:r=>this.stepClickHandler(r)},this.isInternetExplorer?null:tt("span",{class:"step__action-icon step__action-icon--circled"},tt("mi-icon",{"icon-name":"bike"})),tt("h3",{part:"step-heading",class:"step__heading"},this.getStepHeading()),this.renderTravelMode(),tt("div",{part:"step-description",class:"step__description"},this.translationsData.bike,tt("br",null),this.renderTimeAndDistance()),this.renderToggleButton(),this.renderSubsteps())}renderTransitStep(){var r,a;return tt("div",{class:"step",onClick:c=>this.stepClickHandler(c)},this.isInternetExplorer?null:tt("span",{class:"step__action-icon step__action-icon--circled"},tt("mi-icon",{"icon-name":"transit-stop"})),tt("h3",{part:"step-heading",class:"step__heading"},this.stepData.instructions),this.renderTravelMode(),tt("div",{part:"step-description",class:"step__description"},this.stepData.transit_information.line.short_name?tt("span",{class:"step__short-name",style:{backgroundColor:!((r=this.stepData.transit_information.line)===null||r===void 0)&&r.color?this.stepData.transit_information.line.color:null,color:!((a=this.stepData.transit_information.line)===null||a===void 0)&&a.text_color?this.stepData.transit_information.line.text_color:null}},this.stepData.transit_information.line.short_name):null,this.stepData.transit_information.headsign?this.stepData.transit_information.headsign:null,tt("br",null),tt("span",{part:"step-info",class:"step__distance-duration"},tt("mi-time",{seconds:this.stepData.duration.value,translations:`{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}`})," · ",this.stepData.transit_information.num_stops?this.stepData.transit_information.num_stops:null," ",this.translationsData.stops?this.translationsData.stops:null)),this.renderToggleButton(),this.renderSubsteps())}static get watchers(){return{step:["parseStepProp"],translations:["parseTranslationsProp"]}}};TD.style=m$;const y$=Object.freeze(Object.defineProperty({__proto__:null,mi_route_instructions_step_legacy:TD},Symbol.toStringTag,{value:"Module"})),_$=':host{display:block;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.step{display:grid;gap:16px;justify-items:center}.step__info{display:grid;grid-auto-flow:column;align-items:center;justify-content:space-between;width:100%;position:sticky;top:50px;background:white;z-index:1000;padding-bottom:8px}.step__destination{display:grid;gap:8px;align-items:center;justify-content:center;grid-auto-flow:column}.step__heading{font-weight:500;font-size:1.25rem;margin:0}.step__heading>span{font-size:0.875rem;color:#6b7280}.step__travel-mode{display:flex;justify-content:center;align-items:center;position:relative;min-height:72px}.step__travel-mode::before{position:absolute;width:calc(50% - 2px);left:0;height:100%;content:""}.step__travel-mode--dotted::before{border-right:4px dotted #bfdbfe}.step__travel-mode--solid::before{border-right:4px solid #bfdbfe}.step__travel-mode-icon{position:absolute;left:50%;top:24px;transform:translateX(-50%);background-color:#fcfcfc;padding:3px;border-radius:4px}.step__travel-mode-icon mi-icon{width:16px;height:16px;background-color:#6b7280;display:block}.step__short-name{margin-right:4px;padding:2px 4px;font-size:0.875rem;color:#fcfcfc;background-color:#6b7280;border-radius:2px}.step__distance-duration{color:#6b7280;font-size:0.875rem}.step__toggle{display:grid;justify-content:center}.step__toggle mi-icon{width:24px;height:24px;display:block}.step__details{display:grid;gap:24px;width:100%}',DD=class{constructor(r){Mr(this,r),this.stepClicked=Vr(this,"stepClicked",7),this.substepsToggled=Vr(this,"substepsToggled",7),this.isInternetExplorer=l0(),this.step=void 0,this.stepData=void 0,this.hideIndoorSubsteps=!0,this.fromRouteContext="",this.fromTravelMode=void 0,this.fromTransitStop=void 0,this.unit=navigator.language==="en-US"?$s.Imperial:$s.Metric,this.showToggleButton=!0,this.translations=void 0,this.translationsData=void 0,this.substepsAreOpen=!1}parseStepProp(){this.step&&(this.stepData=JSON.parse(this.step))}parseTranslationsProp(){this.translations&&(this.translationsData=JSON.parse(this.translations))}openSubsteps(){this.substepsAreOpen=!0}closeSubsteps(){this.substepsAreOpen=!1}componentWillLoad(){this.parseStepProp(),this.parseTranslationsProp()}render(){return this.stepData&&this.translationsData?this.renderStep():null}stepClickHandler(r){if(Array.from(r.target.classList).includes("icon-toggle"))return;let a=null;r.target.dataset.maneuverIndex!==void 0&&(a=parseInt(r.target.dataset.maneuverIndex)),this.stepClicked.emit({maneuverIndex:a})}renderStep(){switch(this.stepData.travel_mode.toUpperCase()){case"DRIVING":return this.renderDrivingStep();case"WALKING":return this.renderWalkingStep();case"BICYCLING":return this.renderBicyclingStep();case"TRANSIT":return this.renderTransitStep();default:return tt("div",null,"Unknown travel mode: ",this.stepData.travel_mode)}}renderTravelMode(){if(this.isInternetExplorer)return null;let r;switch(this.stepData.travel_mode.toUpperCase()){case"DRIVING":r="car";break;case"WALKING":r="walk";break;case"BICYCLING":r="bike";break;case"TRANSIT":r=this.getTransitVehicleIconName();break}return tt("span",{part:"step-travel-mode",class:`step__travel-mode step__travel-mode--${this.stepData.travel_mode.toUpperCase()==="TRANSIT"?"solid":"dotted"}`},tt("span",{class:"step__travel-mode-icon"},tt("mi-icon",{part:"step-travel-mode-icon","icon-name":r})))}getTransitVehicleIconName(){var r,a;const c=(a=(r=this.stepData.transit_information)===null||r===void 0?void 0:r.line.vehicle)===null||a===void 0?void 0:a.type.toLowerCase();return c&&["boat","bus","railway","train","subway"].some(y=>y===c)?c:"transit"}toggleSubsteps(){this.substepsToggled.emit(),this.substepsAreOpen=!this.substepsAreOpen}renderSubsteps(){var r;return this.substepsAreOpen===!0?tt("div",{class:"step__substeps"},(r=this.stepData.steps)===null||r===void 0?void 0:r.map((a,c)=>tt("mi-route-instructions-maneuver",{"data-maneuver-index":c,maneuver:JSON.stringify(a),translations:this.translations,unit:this.unit,exportparts:`
|
|
391
|
+
maneuver-description-distance-border`}))):null}renderToggleButton(){return this.stepData.steps.length<=0||this.hideIndoorSubsteps===!0&&this.stepData.route_context.toLowerCase()==="insidebuilding"?null:tt("span",{class:`step__toggle ${this.substepsAreOpen?"step__toggle--open":""}`,onClick:()=>this.toggleSubsteps()},this.isInternetExplorer?"▼":tt("mi-icon",{part:"step-toggle","icon-name":"toggle"}))}renderTimeAndDistance(){return tt("span",{part:"step-info",class:"step__distance-duration"},tt("mi-time",{seconds:this.stepData.duration.value,translations:`{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}`})," · ",tt("mi-distance",{meters:this.stepData.distance.value,unit:this.unit}),tt("br",null))}renderDrivingStep(){return tt("div",{class:"step",onClick:r=>this.stepClickHandler(r)},this.isInternetExplorer?null:tt("span",{class:"step__action-icon step__action-icon--circled"},tt("mi-icon",{"icon-name":"car"})),tt("h3",{part:"step-heading",class:"step__heading"},this.getStepHeading()),this.renderTravelMode(),tt("div",{part:"step-description",class:"step__description"},this.translationsData.drive,tt("br",null),this.renderTimeAndDistance()),this.renderToggleButton(),this.renderSubsteps())}getStepHeading(){var r;const a={driving:this.translationsData.drive,walking:this.translationsData.walk,bicycling:this.translationsData.bike};return!((r=this.stepData.steps[0])===null||r===void 0)&&r.instructions?this.stepData.steps[0].instructions:a[this.stepData.travel_mode.toLowerCase()]}renderWalkingStep(){let r,a;return this.stepData.parking===!0?(r=`${this.translationsData.park} ${this.stepData.label?` ${this.translationsData.at} `+this.stepData.label:""}`,a="park"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="STEPS"?(r=`${this.translationsData.takeStaircaseToLevel} ${this.stepData.end_location.floor_name}`,a="stairs"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="LADDER"?(r=`${this.translationsData.takeLadderToLevel} ${this.stepData.end_location.floor_name}`,a="ladder"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="ESCALATOR"?(r=`${this.translationsData.takeEscalatorToLevel} ${this.stepData.end_location.floor_name}`,a="escalator"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRRAMP"?(r=`${this.translationsData.takeWheelchairRampToLevel} ${this.stepData.end_location.floor_name}`,a="wheelchair-ramp"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRLIFT"?(r=`${this.translationsData.takeWheelchairLiftToLevel} ${this.stepData.end_location.floor_name}`,a="wheelchair-lift"):this.stepData.highway&&this.stepData.highway.toUpperCase()==="ELEVATOR"?(r=`${this.translationsData.takeElevatorToLevel} ${this.stepData.end_location.floor_name}`,a="elevator"):this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="Outside"?(r=this.addStepContextNameToHeading(this.translationsData.exit,this.stepData.start_context),a="exit"):this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="InsideBuilding"?(r=this.getStepHeading(),a="walk"):this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"&&this.fromTravelMode.toUpperCase()==="TRANSIT"?(r=this.fromTransitStop,a="transit-stop"):this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"?(r=this.getStepHeading(),a="walk"):this.fromRouteContext==="Outside"&&this.stepData.route_context==="InsideBuilding"?(r=this.addStepContextNameToHeading(this.translationsData.enter,this.stepData.end_context),a="enter"):(r=this.fromRouteContext,a="circle"),tt("div",{class:"step",onClick:c=>this.stepClickHandler(c)},this.isInternetExplorer?null:tt("span",{class:`step__action-icon ${a!=="circle"?"step__action-icon--circled":""}`},tt("mi-icon",{"icon-name":a})),tt("h3",{part:"step-heading",class:"step__heading"},r),this.renderTravelMode(),tt("div",{part:"step-description",class:"step__description"},this.translationsData.walk,tt("br",null),this.renderTimeAndDistance()),this.renderToggleButton(),this.renderSubsteps())}addStepContextNameToHeading(r,a){return a&&(a.building?r+=` ${a.building.buildingInfo.name} ${this.translationsData.building}`:a.venue&&(r+=` ${a.venue.venueInfo.name} ${this.translationsData.venue}`)),r}renderBicyclingStep(){return tt("div",{class:"step",onClick:r=>this.stepClickHandler(r)},this.isInternetExplorer?null:tt("span",{class:"step__action-icon step__action-icon--circled"},tt("mi-icon",{"icon-name":"bike"})),tt("h3",{part:"step-heading",class:"step__heading"},this.getStepHeading()),this.renderTravelMode(),tt("div",{part:"step-description",class:"step__description"},this.translationsData.bike,tt("br",null),this.renderTimeAndDistance()),this.renderToggleButton(),this.renderSubsteps())}renderTransitStep(){var r,a;return tt("div",{class:"step",onClick:c=>this.stepClickHandler(c)},this.isInternetExplorer?null:tt("span",{class:"step__action-icon step__action-icon--circled"},tt("mi-icon",{"icon-name":"transit-stop"})),tt("h3",{part:"step-heading",class:"step__heading"},this.stepData.instructions),this.renderTravelMode(),tt("div",{part:"step-description",class:"step__description"},this.stepData.transit_information.line.short_name?tt("span",{class:"step__short-name",style:{backgroundColor:!((r=this.stepData.transit_information.line)===null||r===void 0)&&r.color?this.stepData.transit_information.line.color:null,color:!((a=this.stepData.transit_information.line)===null||a===void 0)&&a.text_color?this.stepData.transit_information.line.text_color:null}},this.stepData.transit_information.line.short_name):null,this.stepData.transit_information.headsign?this.stepData.transit_information.headsign:null,tt("br",null),tt("span",{part:"step-info",class:"step__distance-duration"},tt("mi-time",{seconds:this.stepData.duration.value,translations:`{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}`})," · ",this.stepData.transit_information.num_stops?this.stepData.transit_information.num_stops:null," ",this.translationsData.stops?this.translationsData.stops:null)),this.renderToggleButton(),this.renderSubsteps())}static get watchers(){return{step:["parseStepProp"],translations:["parseTranslationsProp"]}}};TD.style=m$;const y$=Object.freeze(Object.defineProperty({__proto__:null,mi_route_instructions_step_legacy:TD},Symbol.toStringTag,{value:"Module"})),_$=':host{display:block;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.step{display:grid;gap:16px;justify-items:center}.step__info{display:grid;grid-auto-flow:column;align-items:center;justify-content:space-between;width:100%;position:sticky;top:50px;background:white;z-index:1000;padding-bottom:8px}.step__destination{display:grid;gap:8px;align-items:center;justify-content:center;grid-auto-flow:column}.step__heading{font-weight:500;font-size:1.25rem;margin:0}.step__heading>span{font-size:0.875rem;color:#6b7280}.step__travel-mode{display:flex;justify-content:center;align-items:center;position:relative;min-height:72px}.step__travel-mode::before{position:absolute;width:calc(50% - 2px);left:0;height:100%;content:""}.step__travel-mode--dotted::before{border-right:4px dotted #bfdbfe}.step__travel-mode--solid::before{border-right:4px solid #bfdbfe}.step__travel-mode-icon{position:absolute;left:50%;top:24px;transform:translateX(-50%);background-color:#fcfcfc;padding:3px;border-radius:4px}.step__travel-mode-icon mi-icon{width:16px;height:16px;background-color:#6b7280;display:block}.step__short-name{margin-right:4px;padding:2px 4px;font-size:0.875rem;color:#fcfcfc;background-color:#6b7280;border-radius:2px}.step__distance-duration{color:#6b7280;font-size:0.875rem}.step__transit-action{font-weight:400;font-size:0.875rem;color:#6b7280}.step__toggle{display:grid;justify-content:center}.step__toggle mi-icon{width:24px;height:24px;display:block}.step__details{display:grid;gap:24px;width:100%}',DD=class{constructor(r){Mr(this,r),this.stepClicked=Vr(this,"stepClicked",7),this.substepsToggled=Vr(this,"substepsToggled",7),this.isInternetExplorer=l0(),this.step=void 0,this.stepData=void 0,this.hideIndoorSubsteps=!0,this.fromRouteContext="",this.fromTravelMode=void 0,this.fromTransitStop=void 0,this.unit=navigator.language==="en-US"?$s.Imperial:$s.Metric,this.showToggleButton=!0,this.translations=void 0,this.translationsData=void 0,this.substepsAreOpen=!1}parseStepProp(){this.step&&(this.stepData=JSON.parse(this.step))}parseTranslationsProp(){this.translations&&(this.translationsData=JSON.parse(this.translations))}openSubsteps(){this.substepsAreOpen=!0}closeSubsteps(){this.substepsAreOpen=!1}componentWillLoad(){this.parseStepProp(),this.parseTranslationsProp()}render(){return this.stepData&&this.translationsData?this.renderStep():null}stepClickHandler(r){if(Array.from(r.target.classList).includes("icon-toggle"))return;let a=null;r.target.dataset.maneuverIndex!==void 0&&(a=parseInt(r.target.dataset.maneuverIndex)),this.stepClicked.emit({maneuverIndex:a})}renderStep(){switch(this.stepData.travel_mode.toUpperCase()){case"DRIVING":return this.renderDrivingStep();case"WALKING":return this.renderWalkingStep();case"BICYCLING":return this.renderBicyclingStep();case"TRANSIT":return this.renderTransitStep();default:return tt("div",null,"Unknown travel mode: ",this.stepData.travel_mode)}}renderTravelMode(){if(this.isInternetExplorer)return null;let r;switch(this.stepData.travel_mode.toUpperCase()){case"DRIVING":r="car";break;case"WALKING":r="walk";break;case"BICYCLING":r="bike";break;case"TRANSIT":r=this.getTransitVehicleIconName();break}return tt("span",{part:"step-travel-mode",class:`step__travel-mode step__travel-mode--${this.stepData.travel_mode.toUpperCase()==="TRANSIT"?"solid":"dotted"}`},tt("span",{class:"step__travel-mode-icon"},tt("mi-icon",{part:"step-travel-mode-icon","icon-name":r})))}getTransitVehicleIconName(){var r,a;const c=(a=(r=this.stepData.transit_information)===null||r===void 0?void 0:r.line.vehicle)===null||a===void 0?void 0:a.type.toLowerCase();return c&&["boat","bus","railway","train","subway"].some(y=>y===c)?c:"transit"}toggleSubsteps(){this.substepsToggled.emit(),this.substepsAreOpen=!this.substepsAreOpen}renderSubsteps(){var r;return this.substepsAreOpen===!0?tt("div",{class:"step__substeps"},(r=this.stepData.steps)===null||r===void 0?void 0:r.map((a,c)=>tt("mi-route-instructions-maneuver",{"data-maneuver-index":c,maneuver:JSON.stringify(a),translations:this.translations,unit:this.unit,exportparts:`
|
|
392
392
|
maneuver-icon,
|
|
393
393
|
maneuver-description,
|
|
394
394
|
maneuver-description-distance,
|
|
395
|
-
maneuver-description-distance-border`}))):null}renderToggleButton(){var r;return((r=this.stepData.steps)===null||r===void 0?void 0:r.length)<=0||!this.showToggleButton?null:tt("span",{class:"step__toggle",onClick:()=>this.toggleSubsteps()},this.substepsAreOpen?tt("mi-icon",{part:"step-toggle","icon-name":"chevron-up"}):tt("mi-icon",{part:"step-toggle","icon-name":"chevron-down"}))}renderDistance(){return tt("span",{part:"step-info",class:"step__distance-duration"},tt("mi-distance",{meters:this.stepData.distance.value,unit:this.unit}),tt("br",null))}showSubsteps(){return tt("div",{class:"step__details"},this.renderSubsteps())}renderDrivingStep(){return tt("div",{class:"step",onClick:r=>this.stepClickHandler(r)},tt("div",{class:"step__info"},tt("div",{part:"step-heading",class:"step__heading"},this.getStepHeading()),this.renderToggleButton()),this.showSubsteps())}getStepHeading(){var r;const a={driving:this.translationsData.drive,walking:this.translationsData.walk,bicycling:this.translationsData.bike};return!((r=this.stepData.steps[0])===null||r===void 0)&&r.instructions?this.stepData.steps[0].instructions:a[this.stepData.travel_mode.toLowerCase()]}renderWalkingStep(){let r;return this.stepData.parking===!0?r=`${this.translationsData.park} ${this.stepData.label?` ${this.translationsData.at} `+this.stepData.label:""}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="STEPS"?r=`${this.translationsData.takeStaircaseToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="LADDER"?r=`${this.translationsData.takeLadderToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="ESCALATOR"?r=`${this.translationsData.takeEscalatorToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRRAMP"?r=`${this.translationsData.takeWheelchairRampToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRLIFT"?r=`${this.translationsData.takeWheelchairLiftToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="ELEVATOR"?r=`${this.translationsData.takeElevatorToLevel} ${this.stepData.end_location.floor_name}`:this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="Outside"?r=this.addStepContextNameToHeading(this.translationsData.exit,this.stepData.start_context):this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="InsideBuilding"?r=this.getStepHeading():this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"&&this.fromTravelMode.toUpperCase()==="TRANSIT"?r=this.fromTransitStop:this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"?r=this.getStepHeading():this.fromRouteContext==="Outside"&&this.stepData.route_context==="InsideBuilding"?r=this.addStepContextNameToHeading(this.translationsData.enter,this.stepData.end_context):r=this.fromRouteContext==="InsideBuilding"?"Inside Building":this.fromRouteContext,tt("div",{class:"step",onClick:a=>this.stepClickHandler(a)},tt("div",{class:"step__info"},tt("div",{part:"step-heading",class:"step__heading"},r),this.renderToggleButton()),this.showSubsteps())}addStepContextNameToHeading(r,a){return a&&(a.building?r+=` ${a.building.buildingInfo.name} ${this.translationsData.building}`:a.venue&&(r+=` ${a.venue.venueInfo.name} ${this.translationsData.venue}`)),r}renderBicyclingStep(){return tt("div",{class:"step",onClick:r=>this.stepClickHandler(r)},tt("div",{class:"step__info"},tt("div",{part:"step-heading",class:"step__heading"},this.getStepHeading()),this.renderToggleButton()),this.showSubsteps())}renderTransitStep(){var r,a,c,f,y,w,D,o,j,F,$,oe,te,ge,xe,Ae,it,We,me,ce,pe,ve,De,ct,St,Je,jt,pt,Pt;return tt("div",{class:"step",onClick:Dt=>this.stepClickHandler(Dt)},tt("div",{class:"step__info"},tt("h3",{part:"step-heading",class:"step__heading"},(r=this.stepData)===null||r===void 0?void 0:r.instructions),this.renderToggleButton()),this.renderTravelMode(),tt("div",{part:"step-description",class:"step__description"},!((f=(c=(a=this.stepData)===null||a===void 0?void 0:a.transit_information)===null||c===void 0?void 0:c.line)===null||f===void 0)&&f.short_name?tt("span",{class:"step__short-name",style:{backgroundColor:!((D=(w=(y=this.stepData)===null||y===void 0?void 0:y.transit_information)===null||w===void 0?void 0:w.line)===null||D===void 0)&&D.color?(F=(j=(o=this.stepData)===null||o===void 0?void 0:o.transit_information)===null||j===void 0?void 0:j.line)===null||F===void 0?void 0:F.color:null,color:!((te=(oe=($=this.stepData)===null||$===void 0?void 0:$.transit_information)===null||oe===void 0?void 0:oe.line)===null||te===void 0)&&te.text_color?(Ae=(xe=(ge=this.stepData)===null||ge===void 0?void 0:ge.transit_information)===null||xe===void 0?void 0:xe.line)===null||Ae===void 0?void 0:Ae.text_color:null}},(me=(We=(it=this.stepData)===null||it===void 0?void 0:it.transit_information)===null||We===void 0?void 0:We.line)===null||me===void 0?void 0:me.short_name):null,!((pe=(ce=this.stepData)===null||ce===void 0?void 0:ce.transit_information)===null||pe===void 0)&&pe.headsign?(De=(ve=this.stepData)===null||ve===void 0?void 0:ve.transit_information)===null||De===void 0?void 0:De.headsign:null,tt("br",null),tt("span",{part:"step-info",class:"step__distance-duration"},tt("mi-time",{seconds:(St=(ct=this.stepData)===null||ct===void 0?void 0:ct.duration)===null||St===void 0?void 0:St.value,translations:`{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}`})," · ",!((jt=(Je=this.stepData)===null||Je===void 0?void 0:Je.transit_information)===null||jt===void 0)&&jt.num_stops?(Pt=(pt=this.stepData)===null||pt===void 0?void 0:pt.transit_information)===null||Pt===void 0?void 0:Pt.num_stops:null," ",this.translationsData.stops?this.translationsData.stops:null)),this.showSubsteps())}static get watchers(){return{step:["parseStepProp"],translations:["parseTranslationsProp"]}}};DD.style=_$;const v$=Object.freeze(Object.defineProperty({__proto__:null,mi_route_instructions_step:DD},Symbol.toStringTag,{value:"Module"})),x$=':host{display:block;background-color:#fcfcfc;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}:host mi-route-instructions-step:hover{cursor:pointer;background-color:#f9fafb;transition:300ms ease}:host mi-route-instructions-step.active{background-color:#f3f4f6;transition:none;cursor:default}:host .instructions-destination{display:flex}:host .instructions-destination-icon{width:40px;display:flex;justify-content:center;align-items:center}:host .instructions-destination-icon mi-icon{width:24px;height:24px;background-color:#1c1917}:host .instructions-destination-details{flex:1;padding:12px}:host .instructions-destination-details mi-location-info{font-size:0.875rem}',AD=class{constructor(r){Mr(this,r),this.clicked=Vr(this,"clicked",7),this.miStepElements=[],this.lastStepRouteContext=null,this.lastStepTravelMode=null,this.lastStepTransitStop=null,this.activeStep={legIndex:0,stepIndex:0},this.unit=$s.Metric,this.route=void 0,this.hideIndoorSubsteps=!1,this.travelMode=Ys.Walking,this.originLocation=void 0,this.originName=void 0,this.destinationLocation=void 0,this.destinationName=void 0,this.translations={walk:"Walk",bike:"Bike",transit:"Transit",drive:"Drive",leave:"Leave",from:"From",park:"Park",at:"at",building:"Building",venue:"Venue",takeStaircaseToLevel:"Take staircase to level",takeLadderToLevel:"Take the ladder to level",takeElevatorToLevel:"Take elevator to level",takeEscalatorToLevel:"Take escalator to level",takeWheelchairLiftToLevel:"Take wheelchair lift to level",takeWheelchairRampToLevel:"Take wheelchair ramp to level",exit:"Exit",enter:"Enter",stops:"stops",andContinue:"and continue",continueStraightAhead:"Continue straight ahead",goLeft:"Go left",goSharpLeft:"Go sharp left",goSlightLeft:"Go slight left",goRight:"Go right",goSharpRight:"Go sharp right",goSlightRight:"Go slight right",turnAround:"Turn around",days:"d",hours:"h",minutes:"min"}}componentDidRender(){this.miStepElements.forEach(r=>{r.hideIndoorSubsteps=this.hideIndoorSubsteps})}getRouteSteps(){return this.route?this.route.legs.reduce((r,a,c)=>{for(const f in a.steps){const y=a.steps[f];y.originalLegIndex=c,y.originalStepIndex=parseInt(f),r.push(y)}return r},[]):[]}stepClickedHandler(r,a){const c=this.getRouteSteps()[a];this.activeStep={legIndex:c.originalLegIndex,stepIndex:c.originalStepIndex},this.clicked.emit({legIndex:c.originalLegIndex,stepIndex:c.originalStepIndex,maneuverIndex:r.detail.maneuverIndex})}isActiveStep(r){return this.activeStep?this.activeStep.legIndex===r.originalLegIndex&&this.activeStep.stepIndex===r.originalStepIndex:!1}render(){return this.route?this.renderInstructions():null}renderInstructions(){return tt(wo,null,this.getRouteSteps().map((r,a)=>{var c,f,y,w,D;const o=!((f=(c=this.originLocation)===null||c===void 0?void 0:c.properties)===null||f===void 0)&&f.name?this.originLocation.properties.name:this.originName||"",F=r.originalLegIndex===0&&r.originalStepIndex===0?o:this.lastStepRouteContext,$=this.lastStepTravelMode,oe=this.lastStepTransitStop;return this.lastStepRouteContext=r.route_context,this.lastStepTravelMode=r.travel_mode,this.lastStepTransitStop=!((w=(y=r.transit_information)===null||y===void 0?void 0:y.arrival_stop)===null||w===void 0)&&w.name?(D=r.transit_information)===null||D===void 0?void 0:D.arrival_stop.name:null,tt("mi-route-instructions-step-legacy",{ref:te=>this.miStepElements.push(te),"from-travel-mode":$,"from-route-context":F,"from-transit-stop":oe,step:JSON.stringify(r),translations:JSON.stringify(this.translations),unit:this.unit,onStepClicked:te=>this.stepClickedHandler(te,a),class:this.isActiveStep(r)?"active":"",part:this.isActiveStep(r)?"step active":"step",exportparts:`
|
|
395
|
+
maneuver-description-distance-border`}))):null}renderToggleButton(){var r;return((r=this.stepData.steps)===null||r===void 0?void 0:r.length)<=0||!this.showToggleButton?null:tt("span",{class:"step__toggle",onClick:()=>this.toggleSubsteps()},this.substepsAreOpen?tt("mi-icon",{part:"step-toggle","icon-name":"chevron-up"}):tt("mi-icon",{part:"step-toggle","icon-name":"chevron-down"}))}renderDistance(){return tt("span",{part:"step-info",class:"step__distance-duration"},tt("mi-distance",{meters:this.stepData.distance.value,unit:this.unit}),tt("br",null))}showSubsteps(){return tt("div",{class:"step__details"},this.renderSubsteps())}renderDrivingStep(){return tt("div",{class:"step",onClick:r=>this.stepClickHandler(r)},tt("div",{class:"step__info"},tt("div",{part:"step-heading",class:"step__heading"},this.getStepHeading()),this.renderToggleButton()),this.showSubsteps())}getStepHeading(){var r;const a={driving:this.translationsData.drive,walking:this.translationsData.walk,bicycling:this.translationsData.bike};return!((r=this.stepData.steps[0])===null||r===void 0)&&r.instructions?this.stepData.steps[0].instructions:a[this.stepData.travel_mode.toLowerCase()]}renderWalkingStep(){let r;return this.stepData.parking===!0?r=`${this.translationsData.park} ${this.stepData.label?` ${this.translationsData.at} `+this.stepData.label:""}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="STEPS"?r=`${this.translationsData.takeStaircaseToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="LADDER"?r=`${this.translationsData.takeLadderToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="ESCALATOR"?r=`${this.translationsData.takeEscalatorToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRRAMP"?r=`${this.translationsData.takeWheelchairRampToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="WHEELCHAIRLIFT"?r=`${this.translationsData.takeWheelchairLiftToLevel} ${this.stepData.end_location.floor_name}`:this.stepData.highway&&this.stepData.highway.toUpperCase()==="ELEVATOR"?r=`${this.translationsData.takeElevatorToLevel} ${this.stepData.end_location.floor_name}`:this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="Outside"?r=this.addStepContextNameToHeading(this.translationsData.exit,this.stepData.start_context):this.fromRouteContext==="InsideBuilding"&&this.stepData.route_context==="InsideBuilding"?r=this.getStepHeading():this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"&&this.fromTravelMode.toUpperCase()==="TRANSIT"?r=this.fromTransitStop:this.fromRouteContext==="Outside"&&this.stepData.route_context==="Outside"?r=this.getStepHeading():this.fromRouteContext==="Outside"&&this.stepData.route_context==="InsideBuilding"?r=this.addStepContextNameToHeading(this.translationsData.enter,this.stepData.end_context):r=this.fromRouteContext==="InsideBuilding"?"Inside Building":this.fromRouteContext,tt("div",{class:"step",onClick:a=>this.stepClickHandler(a)},tt("div",{class:"step__info"},tt("div",{part:"step-heading",class:"step__heading"},r),this.renderToggleButton()),this.showSubsteps())}addStepContextNameToHeading(r,a){return a&&(a.building?r+=` ${a.building.buildingInfo.name} ${this.translationsData.building}`:a.venue&&(r+=` ${a.venue.venueInfo.name} ${this.translationsData.venue}`)),r}renderBicyclingStep(){return tt("div",{class:"step",onClick:r=>this.stepClickHandler(r)},tt("div",{class:"step__info"},tt("div",{part:"step-heading",class:"step__heading"},this.getStepHeading()),this.renderToggleButton()),this.showSubsteps())}renderTransitStep(){var r,a,c,f,y,w,D,o,j,F,$,oe,te,ge,xe,Ae,it,We,me,ce,pe,ve,De,ct,St,Je,jt,pt,Pt;return tt("div",{class:"step",onClick:Dt=>this.stepClickHandler(Dt)},tt("div",{class:"step__info"},tt("h3",{part:"step-heading",class:"step__heading"},this.stepData.travel_mode==="TRANSIT"?`${this.translationsData.rideTheBus}`:(r=this.stepData)===null||r===void 0?void 0:r.instructions),this.renderToggleButton()),this.renderTravelMode(),tt("div",{part:"step-description",class:"step__description"},!((f=(c=(a=this.stepData)===null||a===void 0?void 0:a.transit_information)===null||c===void 0?void 0:c.line)===null||f===void 0)&&f.short_name?tt("span",{class:"step__short-name",style:{backgroundColor:!((D=(w=(y=this.stepData)===null||y===void 0?void 0:y.transit_information)===null||w===void 0?void 0:w.line)===null||D===void 0)&&D.color?(F=(j=(o=this.stepData)===null||o===void 0?void 0:o.transit_information)===null||j===void 0?void 0:j.line)===null||F===void 0?void 0:F.color:null,color:!((te=(oe=($=this.stepData)===null||$===void 0?void 0:$.transit_information)===null||oe===void 0?void 0:oe.line)===null||te===void 0)&&te.text_color?(Ae=(xe=(ge=this.stepData)===null||ge===void 0?void 0:ge.transit_information)===null||xe===void 0?void 0:xe.line)===null||Ae===void 0?void 0:Ae.text_color:null}},(me=(We=(it=this.stepData)===null||it===void 0?void 0:it.transit_information)===null||We===void 0?void 0:We.line)===null||me===void 0?void 0:me.short_name):null,!((pe=(ce=this.stepData)===null||ce===void 0?void 0:ce.transit_information)===null||pe===void 0)&&pe.headsign?(De=(ve=this.stepData)===null||ve===void 0?void 0:ve.transit_information)===null||De===void 0?void 0:De.headsign:null,tt("br",null),tt("span",{part:"step-info",class:"step__distance-duration"},tt("mi-time",{seconds:(St=(ct=this.stepData)===null||ct===void 0?void 0:ct.duration)===null||St===void 0?void 0:St.value,translations:`{"days":"${this.translationsData.days}","hours":"${this.translationsData.hours}","minutes":"${this.translationsData.minutes}"}`})," · ",!((jt=(Je=this.stepData)===null||Je===void 0?void 0:Je.transit_information)===null||jt===void 0)&&jt.num_stops?(Pt=(pt=this.stepData)===null||pt===void 0?void 0:pt.transit_information)===null||Pt===void 0?void 0:Pt.num_stops:null," ",this.translationsData.stops?this.translationsData.stops:null)),this.showSubsteps())}static get watchers(){return{step:["parseStepProp"],translations:["parseTranslationsProp"]}}};DD.style=_$;const v$=Object.freeze(Object.defineProperty({__proto__:null,mi_route_instructions_step:DD},Symbol.toStringTag,{value:"Module"})),x$=':host{display:block;background-color:#fcfcfc;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}:host mi-route-instructions-step:hover{cursor:pointer;background-color:#f9fafb;transition:300ms ease}:host mi-route-instructions-step.active{background-color:#f3f4f6;transition:none;cursor:default}:host .instructions-destination{display:flex}:host .instructions-destination-icon{width:40px;display:flex;justify-content:center;align-items:center}:host .instructions-destination-icon mi-icon{width:24px;height:24px;background-color:#1c1917}:host .instructions-destination-details{flex:1;padding:12px}:host .instructions-destination-details mi-location-info{font-size:0.875rem}',AD=class{constructor(r){Mr(this,r),this.clicked=Vr(this,"clicked",7),this.miStepElements=[],this.lastStepRouteContext=null,this.lastStepTravelMode=null,this.lastStepTransitStop=null,this.activeStep={legIndex:0,stepIndex:0},this.unit=$s.Metric,this.route=void 0,this.hideIndoorSubsteps=!1,this.travelMode=Ys.Walking,this.originLocation=void 0,this.originName=void 0,this.destinationLocation=void 0,this.destinationName=void 0,this.translations={walk:"Walk",bike:"Bike",transit:"Transit",drive:"Drive",leave:"Leave",from:"From",park:"Park",at:"at",building:"Building",venue:"Venue",takeStaircaseToLevel:"Take staircase to level",takeLadderToLevel:"Take the ladder to level",takeElevatorToLevel:"Take elevator to level",takeEscalatorToLevel:"Take escalator to level",takeWheelchairLiftToLevel:"Take wheelchair lift to level",takeWheelchairRampToLevel:"Take wheelchair ramp to level",exit:"Exit",enter:"Enter",stops:"stops",andContinue:"and continue",continueStraightAhead:"Continue straight ahead",goLeft:"Go left",goSharpLeft:"Go sharp left",goSlightLeft:"Go slight left",goRight:"Go right",goSharpRight:"Go sharp right",goSlightRight:"Go slight right",turnAround:"Turn around",days:"d",hours:"h",minutes:"min",rideTheBus:"Ride the bus"}}componentDidRender(){this.miStepElements.forEach(r=>{r.hideIndoorSubsteps=this.hideIndoorSubsteps})}getRouteSteps(){return this.route?this.route.legs.reduce((r,a,c)=>{for(const f in a.steps){const y=a.steps[f];y.originalLegIndex=c,y.originalStepIndex=parseInt(f),r.push(y)}return r},[]):[]}stepClickedHandler(r,a){const c=this.getRouteSteps()[a];this.activeStep={legIndex:c.originalLegIndex,stepIndex:c.originalStepIndex},this.clicked.emit({legIndex:c.originalLegIndex,stepIndex:c.originalStepIndex,maneuverIndex:r.detail.maneuverIndex})}isActiveStep(r){return this.activeStep?this.activeStep.legIndex===r.originalLegIndex&&this.activeStep.stepIndex===r.originalStepIndex:!1}render(){return this.route?this.renderInstructions():null}renderInstructions(){return tt(wo,null,this.getRouteSteps().map((r,a)=>{var c,f,y,w,D;const o=!((f=(c=this.originLocation)===null||c===void 0?void 0:c.properties)===null||f===void 0)&&f.name?this.originLocation.properties.name:this.originName||"",F=r.originalLegIndex===0&&r.originalStepIndex===0?o:this.lastStepRouteContext,$=this.lastStepTravelMode,oe=this.lastStepTransitStop;return this.lastStepRouteContext=r.route_context,this.lastStepTravelMode=r.travel_mode,this.lastStepTransitStop=!((w=(y=r.transit_information)===null||y===void 0?void 0:y.arrival_stop)===null||w===void 0)&&w.name?(D=r.transit_information)===null||D===void 0?void 0:D.arrival_stop.name:null,tt("mi-route-instructions-step-legacy",{ref:te=>this.miStepElements.push(te),"from-travel-mode":$,"from-route-context":F,"from-transit-stop":oe,step:JSON.stringify(r),translations:JSON.stringify(this.translations),unit:this.unit,onStepClicked:te=>this.stepClickedHandler(te,a),class:this.isActiveStep(r)?"active":"",part:this.isActiveStep(r)?"step active":"step",exportparts:`
|
|
396
396
|
step-toggle,
|
|
397
397
|
step-heading,
|
|
398
398
|
step-description,
|
|
@@ -3202,5 +3202,5 @@ ${h.vertexSource}`,this.forceManualRenderingForInstanceIDShaders&&(R=R.replaceAl
|
|
|
3202
3202
|
translate(${s.x}px,${s.y}px)
|
|
3203
3203
|
`}_calculateXYTransform(){const t=this._pos,s=this._map,h=this.getPitchAlignment();if(!s||!t||h!=="map")return"";if(!s._showingGlobe()){const A=s.getPitch();return A?`rotateX(${A}deg)`:""}const m=o.cW(o.eZ(s.transform,this._lngLat)),_=t.sub(o.e_(s.transform)),x=Math.abs(_.x)+Math.abs(_.y);if(x===0)return"";const I=m/x;return`rotateX(${-_.y*I}deg) rotateY(${_.x*I}deg)`}_calculateZTransform(){const t=this._pos,s=this._map;if(!s||!t)return"";let h=0;const m=this.getRotationAlignment();if(m==="map")if(s._showingGlobe()){const _=s.project(new o.aR(this._lngLat.lng,this._lngLat.lat+.001),this._altitude),x=s.project(new o.aR(this._lngLat.lng,this._lngLat.lat-.001),this._altitude).sub(_);h=o.cW(Math.atan2(x.y,x.x))-90}else h=-s.getBearing();else if(m==="horizon"){const _=o.ah(4,6,s.getZoom()),x=o.e_(s.transform);x.y+=_*s.transform.height;const I=t.sub(x),A=o.cW(Math.atan2(I.y,I.x));h=(A>90?A-270:A+90)*(1-_)}return h+=this._rotation,h?`rotateZ(${h}deg)`:""}_update(t){cancelAnimationFrame(this._updateFrameId);const s=this._map;s&&(s.transform.renderWorldCopies&&(this._lngLat=Od(this._lngLat,this._pos,s.transform)),this._pos=s.project(this._lngLat,this._altitude),t===!0?this._updateFrameId=requestAnimationFrame(()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())}):this._pos=this._pos.round(),s._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(s._showingGlobe()||s.getTerrain()||s.getFog())&&!this._fadeTimer&&(this._fadeTimer=window.setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(t){return this._offset=o.P.convert(t),this._update(),this}addClassName(t){return this._element.classList.add(t),this}removeClassName(t){return this._element.classList.remove(t),this}toggleClassName(t){return this._element.classList.toggle(t)}_onMove(t){const s=this._map;if(!s)return;const h=this._pointerdownPos,m=this._positionDelta;if(h&&m){if(!this._isDragging){const _=this._clickTolerance||s._clickTolerance;if(t.point.dist(h)<_)return;this._isDragging=!0}this._pos=t.point.sub(m),this._lngLat=s.unproject(this._pos,this._altitude),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new o.z("dragstart"))),this.fire(new o.z("drag"))}}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1;const t=this._map;t&&(t.off("mousemove",this._onMove),t.off("touchmove",this._onMove)),this._state==="active"&&this.fire(new o.z("dragend")),this._state="inactive"}_addDragHandler(t){const s=this._map,h=this._pos;s&&h&&this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(h),this._pointerdownPos=t.point,this._state="pending",s.on("mousemove",this._onMove),s.on("touchmove",this._onMove),s.once("mouseup",this._onUp),s.once("touchend",this._onUp))}setDraggable(t){this._draggable=!!t;const s=this._map;return s&&(t?(s.on("mousedown",this._addDragHandler),s.on("touchstart",this._addDragHandler)):(s.off("mousedown",this._addDragHandler),s.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(t){return this._rotation=t||ps.rotation,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||ps.rotationAlignment,this._update(),this}getRotationAlignment(){return this._rotationAlignment==="auto"||this._rotationAlignment==="horizon"&&this._map&&!this._map._showingGlobe()?"viewport":this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t||ps.pitchAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment==="auto"?this.getRotationAlignment():this._pitchAlignment}setOccludedOpacity(t){return this._occludedOpacity=t||ps.occludedOpacity,this._update(),this}getOccludedOpacity(){return this._occludedOpacity}}const Xa={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0,showUserHeading:!1},da={maxWidth:100,unit:"metric"},fa={kilometer:"km",meter:"m",mile:"mi",foot:"ft","nautical-mile":"nm"},Pl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",altitude:0},Bs=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function by(d=new o.P(0,0),t="bottom"){if(typeof d=="number"){const s=Math.round(Math.sqrt(.5*Math.pow(d,2)));switch(t){case"top":return new o.P(0,d);case"top-left":return new o.P(s,s);case"top-right":return new o.P(-s,s);case"bottom":return new o.P(0,-d);case"bottom-left":return new o.P(s,-s);case"bottom-right":return new o.P(-s,-s);case"left":return new o.P(d,0);case"right":return new o.P(-d,0)}return new o.P(0,0)}return d instanceof o.P||Array.isArray(d)?o.P.convert(d):o.P.convert(d[t]||[0,0])}return{version:j,supported:xe.supported,setRTLTextPlugin:o.f2,getRTLTextPluginStatus:o.f1,Map:class extends Jp{constructor(d){$.mark(F.create);const t=d;if((d=Object.assign({},ju,d)).minZoom!=null&&d.maxZoom!=null&&d.minZoom>d.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(d.minPitch!=null&&d.maxPitch!=null&&d.minPitch>d.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(d.minPitch!=null&&d.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(d.maxPitch!=null&&d.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(d.antialias&&o.eW(window)&&(d.antialias=!1,o.w("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Bo(d.minZoom,d.maxZoom,d.minPitch,d.maxPitch,d.renderWorldCopies,null,null),d),this._repaint=!!d.repaint,this._interactive=d.interactive,this._minTileCacheSize=d.minTileCacheSize,this._maxTileCacheSize=d.maxTileCacheSize,this._failIfMajorPerformanceCaveat=d.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=d.preserveDrawingBuffer,this._antialias=d.antialias,this._trackResize=d.trackResize,this._bearingSnap=d.bearingSnap,this._refreshExpiredTiles=d.refreshExpiredTiles,this._fadeDuration=d.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=d.crossSourceCollisions,this._collectResourceTiming=d.collectResourceTiming,this._language=this._parseLanguage(d.language),this._worldview=d.worldview,this._renderTaskQueue=new Qr,this._domRenderTaskQueue=new Qr,this._controls=[],this._markers=[],this._popups=[],this._mapId=o.b2(),this._locale=Object.assign({},zu,d.locale),this._clickTolerance=d.clickTolerance,this._cooperativeGestures=d.cooperativeGestures,this._performanceMetricsCollection=d.performanceMetricsCollection,this._tessellationStep=d.tessellationStep,this._containerWidth=0,this._containerHeight=0,this._showParseStatus=!0,this._precompilePrograms=d.precompilePrograms,this._scaleFactorChanged=!1,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new Js(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._frameId=0,this._scaleFactor=d.scaleFactor,this._requestManager=new Ht(d.transformRequest,d.accessToken,d.testMode),this._silenceAuthErrors=!!d.testMode,this._contextCreateOptions=d.contextCreateOptions?Object.assign({},d.contextCreateOptions):{},typeof d.container=="string"){const s=document.getElementById(d.container);if(!s)throw new Error(`Container '${d.container.toString()}' not found.`);this._container=s}else{if(!(d.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=d.container}if(this._container.childNodes.length>0&&o.w("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),d.maxBounds&&this.setMaxBounds(d.maxBounds),this._spriteFormat=d.spriteFormat,o.aY(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._tp||(this._tp=new _c),this._tp.registerParameter(this,["Debug"],"showOverdrawInspector"),this._tp.registerParameter(this,["Debug"],"showTileBoundaries"),this._tp.registerParameter(this,["Debug"],"showParseStatus"),this._tp.registerParameter(this,["Debug"],"repaint"),this._tp.registerParameter(this,["Debug"],"showTileAABBs"),this._tp.registerParameter(this,["Debug"],"showPadding"),this._tp.registerParameter(this,["Debug"],"showCollisionBoxes",{noSave:!0}),this._tp.registerParameter(this.transform,["Debug"],"freezeTileCoverage",{noSave:!0},()=>{this._update()}),this._tp.registerParameter(this,["Debug","Wireframe"],"showTerrainWireframe"),this._tp.registerParameter(this,["Debug","Wireframe"],"showLayers2DWireframe"),this._tp.registerParameter(this,["Debug","Wireframe"],"showLayers3DWireframe"),this._tp.registerParameter(this,["Scaling"],"_scaleFactor",{min:.1,max:10,step:.1},()=>{this.setScaleFactor(this._scaleFactor)}),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");if(this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this._fullscreenchangeEvent="onfullscreenchange"in document?"fullscreenchange":"webkitfullscreenchange",window.addEventListener("online",this._onWindowOnline,!1),window.addEventListener("resize",this._onWindowResize,!1),window.addEventListener("orientationchange",this._onWindowResize,!1),window.addEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.addEventListener("visibilitychange",this._onVisibilityChange,!1),this.handlers=new Cu(this,d),this._localFontFamily=d.localFontFamily,this._localIdeographFontFamily=d.localIdeographFontFamily,(d.style||!d.testMode)&&this.setStyle(d.style||o.e.DEFAULT_STYLE,{config:d.config,localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),d.projection&&this.setProjection(d.projection),this.indoor=new vl(this),d.hash&&(this._hash=new Vp(typeof d.hash=="string"&&d.hash||void 0).addTo(this)),!this._hash||!this._hash._onHashChange()){t.center==null&&t.zoom==null||(this.transform._unmodified=!1),this.jumpTo({center:d.center,zoom:d.zoom,bearing:d.bearing,pitch:d.pitch});const s=d.bounds;s&&(this.resize(),this.fitBounds(s,Object.assign({},d.fitBoundsOptions,{duration:0})))}this.resize(),d.attributionControl&&this.addControl(new Nu({customAttribution:d.customAttribution})),this._logoControl=new Xs,this.addControl(this._logoControl,d.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this._postStyleLoadEvent()}),this.on("data",s=>{this._update(s.dataType==="style"),this.fire(new o.z(`${s.dataType}data`,s))}),this.on("dataloading",s=>{this.fire(new o.z(`${s.dataType}dataloading`,s))}),this._interactions=new xy(this)}_getMapId(){return this._mapId}addControl(d,t){if(t===void 0&&(t=d.getDefaultPosition?d.getDefaultPosition():"top-right"),!d||!d.onAdd)return this.fire(new o.y(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const s=d.onAdd(this);this._controls.push(d);const h=this._controlPositions[t];return t.indexOf("bottom")!==-1?h.insertBefore(s,h.firstChild):h.appendChild(s),this}removeControl(d){if(!d||!d.onRemove)return this.fire(new o.y(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const t=this._controls.indexOf(d);return t>-1&&this._controls.splice(t,1),d.onRemove(this),this}hasControl(d){return this._controls.indexOf(d)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(d){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const t=!this._moving;return t&&this.fire(new o.z("movestart",d)).fire(new o.z("move",d)),this.fire(new o.z("resize",d)),t&&this.fire(new o.z("moveend",d)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(d){return this.transform.setMaxBounds(o.aI.convert(d)),this._update()}setMinZoom(d){if((d=d??-2)>=-2&&d<=this.transform.maxZoom)return this.transform.minZoom=d,this._update(),this.getZoom()<d?this.setZoom(d):this.fire(new o.z("zoomstart")).fire(new o.z("zoom")).fire(new o.z("zoomend")),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(d){if((d=d??22)>=this.transform.minZoom)return this.transform.maxZoom=d,this._update(),this.getZoom()>d?this.setZoom(d):this.fire(new o.z("zoomstart")).fire(new o.z("zoom")).fire(new o.z("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(d){if((d=d??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(d>=0&&d<=this.transform.maxPitch)return this.transform.minPitch=d,this._update(),this.getPitch()<d?this.setPitch(d):this.fire(new o.z("pitchstart")).fire(new o.z("pitch")).fire(new o.z("pitchend")),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(d){if((d=d??85)>85)throw new Error("maxPitch must be less than or equal to 85");if(d>=this.transform.minPitch)return this.transform.maxPitch=d,this._update(),this.getPitch()>d?this.setPitch(d):this.fire(new o.z("pitchstart")).fire(new o.z("pitch")).fire(new o.z("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getScaleFactor(){return this._scaleFactor}setScaleFactor(d){return this._scaleFactor=d,this.painter.scaleFactor=d,this._tp.refreshUI(),this._scaleFactorChanged=!0,this.style._updateFilteredLayers(t=>t.type==="symbol"),this._update(!0),this}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(d){return this.transform.renderWorldCopies=d,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(d){return d==="auto"?navigator.language:Array.isArray(d)?d.length===0?void 0:d.map(t=>t==="auto"?navigator.language:t):d}setLanguage(d){const t=this._parseLanguage(d);if(!this.style||t===this._language)return this;this._language=t,this.style.reloadSources();for(const s of this._controls)s._setLanguage&&s._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(d){return this.style&&d!==this._worldview?(this._worldview=d,this._styleDirty=!0,this.style.reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return this.transform.projection.name==="globe"}setProjection(d){return this._lazyInitEmptyStyle(),d?typeof d=="string"&&(d={name:d}):d=null,this._useExplicitProjection=!!d,this._prioritizeAndUpdateProjection(d,this.style.projection)}_updateProjectionTransition(){if(this.getProjection().name!=="globe")return;const d=this.transform,t=d.projection.name;let s;t==="globe"&&d.zoom>=o.cK?(d.setMercatorFromTransition(),s=!0):t==="mercator"&&d.zoom<o.cK&&(d.setProjection({name:"globe"}),s=!0),s&&(this.style.applyProjectionUpdate(),this.style._forceSymbolLayerUpdate(),this._update(!0))}_prioritizeAndUpdateProjection(d,t){return this._updateProjection(d||t||{name:"mercator"})}_updateProjection(d){let t;return t=d.name==="globe"&&this.transform.zoom>=o.cK?this.transform.setMercatorFromTransition():this.transform.setProjection(d),this.style.applyProjectionUpdate(),t&&(this.painter.clearBackgroundTiles(),this.style.clearSources(),this._update(!0),this._forceMarkerAndPopupUpdate(!0)),this}project(d,t){return this.transform.locationPoint3D(o.aR.convert(d),t)}unproject(d,t){return this.transform.pointLocation3D(o.P.convert(d),t)}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(d,t,s){const h=m=>{let _=[];if(Array.isArray(t)){const x=t.filter(I=>this.getLayer(I));_=x.length?this.queryRenderedFeatures(m,{layers:x}):[]}else _=this.queryRenderedFeatures(m,{target:t});return _};if(d==="mouseenter"||d==="mouseover"){let m=!1;return{listener:s,targets:t,delegates:{mousemove:x=>{const I=h(x.point);I.length?m||(m=!0,s.call(this,new Kr(d,this,x.originalEvent,{features:I}))):m=!1},mouseout:()=>{m=!1}}}}if(d==="mouseleave"||d==="mouseout"){let m=!1;return{listener:s,targets:t,delegates:{mousemove:I=>{h(I.point).length?m=!0:m&&(m=!1,s.call(this,new Kr(d,this,I.originalEvent)))},mouseout:I=>{m&&(m=!1,s.call(this,new Kr(d,this,I.originalEvent)))}}}}{const m=_=>{const x=h(_.point);x.length&&(_.features=x,s.call(this,_),delete _.features)};return{listener:s,targets:t,delegates:{[d]:m}}}}on(d,t,s){if(typeof t=="function"||s===void 0)return super.on(d,t);if(typeof t=="string"&&(t=[t]),!this._areTargetsValid(t))return this;const h=this._createDelegatedListener(d,t,s);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[d]=this._delegatedListeners[d]||[],this._delegatedListeners[d].push(h);for(const m in h.delegates)this.on(m,h.delegates[m]);return this}once(d,t,s){if(typeof t=="function"||s===void 0)return super.once(d,t);if(typeof t=="string"&&(t=[t]),!this._areTargetsValid(t))return this;const h=this._createDelegatedListener(d,t,s);for(const m in h.delegates)this.once(m,h.delegates[m]);return this}off(d,t,s){if(typeof t=="function"||s===void 0)return super.off(d,t);if(typeof t=="string"&&(t=[t]),!this._areTargetsValid(t))return this;const h=this._delegatedListeners?this._delegatedListeners[d]:void 0;return h&&(m=>{for(let _=0;_<m.length;_++){const x=m[_];if(x.listener===s&&wb(x.targets,t)){for(const I in x.delegates)this.off(I,x.delegates[I]);return m.splice(_,1),this}}})(h),this}queryRenderedFeatures(d,t){if(!this.style)return[];if(d===void 0||d instanceof o.P||Array.isArray(d)||t!==void 0||(t=d,d=void 0),d=d||[[0,0],[this.transform.width,this.transform.height]],!t){const _=this.style.queryRenderedFeatures(d,void 0,this.transform),x=this.style.queryRenderedFeatureset(d,void 0,this.transform);return _.concat(x)}let s=!0;if(t.target&&(s=this._isTargetValid(t.target),s&&!t.layers))return this.style.queryRenderedFeatureset(d,t,this.transform);let h=!0;if(t.layers&&Array.isArray(t.layers)){for(const _ of t.layers)if(!this._isValidId(_)){h=!1;break}if(h&&!t.target)return this.style.queryRenderedFeatures(d,t,this.transform)}let m=[];return h&&(m=m.concat(this.style.queryRenderedFeatures(d,t,this.transform))),s&&(m=m.concat(this.style.queryRenderedFeatureset(d,t,this.transform))),m}querySourceFeatures(d,t){return!d||typeof d=="string"&&!this._isValidId(d)?[]:this.style.querySourceFeatures(d,t)}queryRasterValue(d,t,s){return this._isValidId(d)?this.style.queryRasterValue(d,t,s):Promise.resolve(null)}isPointOnSurface(d){const{name:t}=this.transform.projection;return t!=="globe"&&t!=="mercator"&&o.w(`${t} projection does not support isPointOnSurface, this API may behave unexpectedly.`),this.transform.isPointOnSurface(o.P.convert(d))}addInteraction(d,t){return this._interactions.add(d,t),this}removeInteraction(d){return this._interactions.remove(d),this}getCooperativeGestures(){return this._cooperativeGestures}setCooperativeGestures(d){return this._cooperativeGestures=d,this}setStyle(d,t){return t=Object.assign({},{localIdeographFontFamily:this._localIdeographFontFamily,localFontFamily:this._localFontFamily},t),this.style&&d&&t.diff!==!1&&t.localFontFamily===this._localFontFamily&&t.localIdeographFontFamily===this._localIdeographFontFamily&&!t.config?(this.style._diffStyle(d,(s,h)=>{if(s){const m=typeof s=="string"?s:s instanceof Error?s.message:s.error;o.w(`Unable to perform style diff: ${m}. Rebuilding the style from scratch.`),this._updateStyle(d,t)}else h&&this._update(!0)},()=>this._postStyleLoadEvent()),this):(this._localIdeographFontFamily=t.localIdeographFontFamily,this._localFontFamily=t.localFontFamily,this._updateStyle(d,t))}_getUIString(d){const t=this._locale[d];if(t==null)throw new Error(`Missing UI string '${d}'`);return t}_updateStyle(d,t){if(this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),d){const s=Object.assign({},t);t&&t.config&&(s.initialConfig=t.config,delete s.config),this.style=new Ms(this,s).load(d),this.style.setEventedParent(this,{style:this.style})}return this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new Ms(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(o.w("There is no style added to the map."),!1)}_isValidId(d){return d==null?(this.fire(new o.y(new Error("IDs can't be empty."))),!1):!o.dm(d)||(this.fire(new o.y(new Error(`IDs can't contain special symbols: "${d}".`))),!1)}_isTargetValid(d){return"featuresetId"in d?this._isValidId("importId"in d?d.importId:d.featuresetId):"layerId"in d&&this._isValidId(d.layerId)}_areTargetsValid(d){if(Array.isArray(d)){for(const t of d)if(!this._isValidId(t))return!1;return!0}return this._isTargetValid(d)}addSource(d,t){return this._isValidId(d)?(this._lazyInitEmptyStyle(),this.style.addSource(d,t),this._update(!0)):this}isSourceLoaded(d){return!!this._isValidId(d)&&!!this.style&&this.style._isSourceCacheLoaded(d)}areTilesLoaded(){return this.style.areTilesLoaded()}addSourceType(d,t,s){this._lazyInitEmptyStyle(),this.style.addSourceType(d,t,s)}removeSource(d){return this._isValidId(d)?(this.style.removeSource(d),this._updateTerrain(),this._update(!0)):this}getSource(d){return this._isValidId(d)?this.style.getOwnSource(d):null}addImage(d,t,{pixelRatio:s=1,sdf:h=!1,stretchX:m,stretchY:_,content:x}={}){this._lazyInitEmptyStyle();const I=o.I.from(d);if(t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap){const{width:A,height:C,data:L}=o.o.getImageData(t);this.style.addImage(I,{data:new o.q({width:A,height:C},L),pixelRatio:s,stretchX:m,stretchY:_,content:x,sdf:h,version:0,usvg:!1})}else if(t.width===void 0||t.height===void 0)this.fire(new o.y(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:A,height:C}=t,L=t;this.style.addImage(I,{data:new o.q({width:A,height:C},new Uint8Array(L.data)),pixelRatio:s,stretchX:m,stretchY:_,content:x,sdf:h,usvg:!1,version:0,userImage:L}),L.onAdd&&L.onAdd(this,d)}}updateImage(d,t){this._lazyInitEmptyStyle();const s=o.I.from(d),h=this.style.getImage(s);if(!h)return void this.fire(new o.y(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const m=t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap?o.o.getImageData(t):t,{width:_,height:x,data:I}=m;if(_===void 0||x===void 0)return void this.fire(new o.y(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(_!==(h.usvg?h.icon.usvg_tree.width:h.data.width)||x!==(h.usvg?h.icon.usvg_tree.height:h.data.height))return void this.fire(new o.y(new Error(`The width and height of the updated image (${_}, ${x})
|
|
3204
3204
|
must be that same as the previous version of the image
|
|
3205
|
-
(${h.data.width}, ${h.data.height})`)));const A=!(t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap);let C=!1;h.usvg?(h.data=new o.q({width:_,height:x},new Uint8Array(I)),h.usvg=!1,h.icon=void 0,C=!0):h.data.replace(I,A),this.style.updateImage(s,h,C)}hasImage(d){return d?!!this.style&&!!this.style.getImage(o.I.from(d)):(this.fire(new o.y(new Error("Missing required image id"))),!1)}removeImage(d){this.style.removeImage(o.I.from(d))}loadImage(d,t){o.n(this._requestManager.transformRequest(d,o.R.Image),(s,h)=>{t(s,h instanceof HTMLImageElement?o.o.getImageData(h):h)})}listImages(){return this.style.listImages().map(d=>d.name)}addModel(d,t){this._lazyInitEmptyStyle(),this.style.addModel(d,t)}hasModel(d){return d?this.style.hasModel(d):(this.fire(new o.y(new Error("Missing required model id"))),!1)}removeModel(d){this.style.removeModel(d)}listModels(){return this.style.listModels()}addLayer(d,t){return this._isValidId(d.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(d,t),this._update(!0)):this}getSlot(d){const t=this.getLayer(d);return t&&t.slot||null}setSlot(d,t){return this.style.setSlot(d,t),this.style.mergeLayers(),this._update(!0)}addImport(d,t){return this.style.addImport(d,t).catch(s=>this.fire(new o.y(new Error("Failed to add import",s)))),this}updateImport(d,t){return typeof t!="string"&&t.id!==d?(this.removeImport(d),this.addImport(t)):(this.style.updateImport(d,t),this._update(!0))}removeImport(d){return this.style.removeImport(d),this}moveImport(d,t){return this.style.moveImport(d,t),this._update(!0)}moveLayer(d,t){return this._isValidId(d)?(this.style.moveLayer(d,t),this._update(!0)):this}removeLayer(d){return this._isValidId(d)?(this.style.removeLayer(d),this._update(!0)):this}getLayer(d){if(!this._isValidId(d))return null;const t=this.style.getOwnLayer(d);return t?t.type==="custom"?t.implementation:t.serialize():void 0}getSlots(){return this.style.getSlots()}setLayerZoomRange(d,t,s){return this._isValidId(d)?(this.style.setLayerZoomRange(d,t,s),this._update(!0)):this}setFilter(d,t,s={}){return this._isValidId(d)?(this.style.setFilter(d,t,s),this._update(!0)):this}getFilter(d){return this._isValidId(d)?this.style.getFilter(d):null}setPaintProperty(d,t,s,h={}){return this._isValidId(d)?(this.style.setPaintProperty(d,t,s,h),this._update(!0)):this}getPaintProperty(d,t){return this._isValidId(d)?this.style.getPaintProperty(d,t):null}setLayoutProperty(d,t,s,h={}){return this._isValidId(d)?(this.style.setLayoutProperty(d,t,s,h),this._update(!0)):this}getLayoutProperty(d,t){return this._isValidId(d)?this.style.getLayoutProperty(d,t):null}getGlyphsUrl(){return this.style.getGlyphsUrl()}setGlyphsUrl(d){return this.style.setGlyphsUrl(d),this._update(!0)}getSchema(d){return this.style.getSchema(d)}setSchema(d,t){return this.style.setSchema(d,t),this._update(!0)}getConfig(d){return this.style.getConfig(d)}setConfig(d,t){return this.style.setConfig(d,t),this._update(!0)}getConfigProperty(d,t){return this.style.getConfigProperty(d,t)}setConfigProperty(d,t,s){return this.style.setConfigProperty(d,t,s),this._update(!0)}getFeaturesetDescriptors(d){return this.style.getFeaturesetDescriptors(d)}setLights(d){if(this._lazyInitEmptyStyle(),d&&d.length===1&&d[0].type==="flat"){const t=d[0];t.properties?this.style.setFlatLight(t.properties,t.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(d),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){const d=this.style.getLights()||[];return d.length===0&&d.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),d}setLight(d,t={}){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:d}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(d){return this._lazyInitEmptyStyle(),!d&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(d),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(d){return this._lazyInitEmptyStyle(),this.style.setFog(d),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setSnow(d){return this._lazyInitEmptyStyle(),this.style.setSnow(d),this._update(!0)}getSnow(){return this.style?this.style.getSnow():null}setRain(d){return this._lazyInitEmptyStyle(),this.style.setRain(d),this._update(!0)}getRain(){return this.style?this.style.getRain():null}setColorTheme(d){return this._lazyInitEmptyStyle(),this.style.setColorTheme(d),this._update(!0)}setImportColorTheme(d,t){return this._lazyInitEmptyStyle(),this.style.setImportColorTheme(d,t),this._update(!0)}setCamera(d){return this.style.setCamera(d),this._triggerCameraUpdate(d)}_triggerCameraUpdate(d){return this._update(this.transform.setOrthographicProjectionAtLowPitch(d["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(d){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(o.aR.convert(d),this.transform):0}setFeatureState(d,t){return d.source&&!this._isValidId(d.source)?this:(this.style.setFeatureState(d,t),this._update())}removeFeatureState(d,t){return d.source&&!this._isValidId(d.source)?this:(this.style.removeFeatureState(d,t),this._update())}getFeatureState(d){return d.source&&!this._isValidId(d.source)?null:this.style.getFeatureState(d)}_selectIndoorFloor(d){this.indoor.selectFloor(d)}_addIndoorControl(){this._indoorControl||(this._indoorControl=new Lu),this.addControl(this._indoorControl,"right")}_removeIndoorControl(){this._indoorControl&&this.removeControl(this._indoorControl)}_updateContainerDimensions(){if(!this._container)return;const d=this._container.getBoundingClientRect().width||400,t=this._container.getBoundingClientRect().height||300;let s,h,m,_=this._container;for(;_&&(!h||!m);){const x=window.getComputedStyle(_).transform;x&&x!=="none"&&(s=x.match(/matrix.*\((.+)\)/)[1].split(", "),s[0]&&s[0]!=="0"&&s[0]!=="1"&&(h=s[0]),s[3]&&s[3]!=="0"&&s[3]!=="1"&&(m=s[3])),_=_.parentElement}this._containerWidth=h?Math.abs(d/h):d,this._containerHeight=m?Math.abs(t/m):t}_detectMissingCSS(){window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&o.w("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const d=this._container;d.classList.add("mapboxgl-map"),(this._missingCSSCanary=Ae("div","mapboxgl-canary",d)).style.visibility="hidden",this._detectMissingCSS();const t=this._canvasContainer=Ae("div","mapboxgl-canvas-container",d);this._canvas=Ae("canvas","mapboxgl-canvas",t),this._interactive&&(t.classList.add("mapboxgl-interactive"),this._canvas.setAttribute("tabindex","0")),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const s=this._controlContainer=Ae("div","mapboxgl-control-container",d),h=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach(m=>{h[m]=Ae("div",`mapboxgl-ctrl-${m}`,s)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(d,t){const s=o.o.devicePixelRatio||1;this._canvas.width=s*Math.ceil(d),this._canvas.height=s*Math.ceil(t),this._canvas.style.width=`${d}px`,this._canvas.style.height=`${t}px`}_addMarker(d){this._markers.push(d)}_removeMarker(d){const t=this._markers.indexOf(d);t!==-1&&this._markers.splice(t,1)}_addPopup(d){this._popups.push(d)}_removePopup(d){const t=this._popups.indexOf(d);t!==-1&&this._popups.splice(t,1)}_setupPainter(){const d=Object.assign({},xe.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),t=this._canvas.getContext("webgl2",d);t?(Re(t,!0),this.painter=new Up(t,this._contextCreateOptions,this.transform,this._scaleFactor,this._tp,this._worldview),this.on("data",s=>{s.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),o.k.testSupport(t)):this.fire(new o.y(new Error("Failed to initialize WebGL")))}_contextLost(d){d.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new o.z("webglcontextlost",{originalEvent:d}))}_contextRestored(d){this._setupPainter(),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight)),this._updateTerrain(),this.style&&(this.style.clearLayers(),this.style.imageManager.destroyAtlasTextures(),this.style.reloadModels(),this.style.clearSources()),this._update(),this.fire(new o.z("webglcontextrestored",{originalEvent:d}))}_onMapScroll(d){if(d.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}idle(){return!this.isMoving()&&this.loaded()}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}frameReady(){return this.loaded()&&!this._placementDirty}_update(d){return this.style?(this._styleDirty=this._styleDirty||d,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(d){return this._update(),this._renderTaskQueue.add(d)}_cancelRenderFrame(d){this._renderTaskQueue.remove(d)}_requestDomTask(d){!this.loaded()||this.loaded()&&!this.isMoving()?d():this._domRenderTaskQueue.add(d)}_render(d){let t;this.fire(new o.z("renderstart")),++this._frameId;const s=this.painter.context.extTimerQuery,h=o.o.now(),m=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(t=m.createQuery(),m.beginQuery(s.TIME_ELAPSED_EXT,t)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],performance.now())),this._renderTaskQueue.run(d),this._domRenderTaskQueue.run(d),this._removed)return;this._updateProjectionTransition();const _=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const C=this.transform.zoom,L=this.transform.pitch,R=o.o.now(),O=new o.ac(C,{now:R,fadeDuration:_,pitch:L,transition:this.style.transition,worldview:this._worldview});this.style.update(O)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let x=!1;this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),x=this._updateAverageElevation(h),this.style.updateSources(this.transform),this.style.updateImageProviders(),this.isMoving()||this._forceMarkerAndPopupUpdate()):x=this._updateAverageElevation(h);const I=this.style&&this.style._updatePlacement(this.painter,this.painter.transform,this.showCollisionBoxes,_,this._crossSourceCollisions,this.painter.replacementSource,this._scaleFactorChanged);if(this._scaleFactorChanged&&(this._scaleFactorChanged=!1),I&&(this._placementDirty=I.needsRerender),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showParseStatus:this.showParseStatus,wireframe:{terrain:this.showTerrainWireframe,layers2D:this.showLayers2DWireframe,layers3D:this.showLayers3DWireframe},showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:_,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new o.z("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,$.mark(F.load),this.fire(new o.z("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&(this.style.snow||this.style.rain)&&(this._styleDirty=!0),this.style&&this.style.imageManager.hasPatternsInFlight()&&(this._styleDirty=!0),this.style&&!this.style.modelManager.isLoaded()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),t){const C=o.o.now()-h;m.endQuery(s.TIME_ELAPSED_EXT),setTimeout(()=>{const L=m.getQueryParameter(t,m.QUERY_RESULT)/1e6;m.deleteQuery(t),this.fire(new o.z("gpu-timing-frame",{cpuTime:C,gpuTime:L}))},50)}if(this.listens("gpu-timing-layer")){const C=this.painter.collectGpuTimers();setTimeout(()=>{const L=this.painter.queryGpuTimers(C);this.fire(new o.z("gpu-timing-layer",{layerTimes:L}))},50)}if(this.listens("gpu-timing-deferred-render")){const C=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const L=this.painter.queryGpuTimeDeferredRender(C);this.fire(new o.z("gpu-timing-deferred-render",{gpuTime:L}))},50)}const A=this._sourcesDirty||this._styleDirty||this._placementDirty||x;if(A||this._repaint)this.triggerRepaint();else{const C=this.idle();if(C&&(x=this._updateAverageElevation(h,!0)),x)this.triggerRepaint();else if(this._triggerFrame(!1),C&&(this.fire(new o.z("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const L=this._calculateSpeedIndex();this.fire(new o.z("speedindexcompleted",{speedIndex:L})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||A||(this._fullyLoaded=!0,$.mark(F.fullLoad),this._performanceMetricsCollection&&ne(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(d){for(const t of this._markers)d&&!this.getRenderWorldCopies()&&(t._lngLat=t._lngLat.wrap()),t._update();for(const t of this._popups)!d||this.getRenderWorldCopies()||t._trackPointer||(t._lngLat=t._lngLat.wrap()),t._update()}_updateAverageElevation(d,t=!1){const s=m=>(this.transform.averageElevation=m,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&s(0);const h=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(h||(t||d-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(d)){const m=this.transform.averageElevation;let _=this.transform.sampleAverageElevation();this.transform.elevation!=null&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(_)?_=0:this._averageElevationLastSampledAt=d;const x=Math.abs(m-_);if(x>1){if(this._isInitialLoad||h)return this._averageElevation.jumpTo(_),s(_);this._averageElevation.easeTo(_,d,300)}else if(x>1e-4)return this._averageElevation.jumpTo(_),s(_)}return!!this._averageElevation.isEasing(d)&&s(this._averageElevation.getValue(d))}_authenticate(){de(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,d=>{if(d&&(d.message===Dt||d.status===401)){const t=this.painter.context.gl;Re(t,!1),this._logoControl instanceof Xs&&this._logoControl._updateLogo(),t&&t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT|t.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new o.y(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),B(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_postStyleLoadEvent(){this.style.globalId&&Y(this._requestManager._customAccessToken,{map:this,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_updateTerrain(){const d=this._isDragging();this.painter.updateTerrain(this.style,d)}_calculateSpeedIndex(){const d=this.painter.canvasCopy(),t=this.painter.getCanvasCopiesAndTimestamps();t.timeStamps.push(performance.now());const s=this.painter.context.gl,h=s.createFramebuffer();function m(_){s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,_,0);const x=new Uint8Array(s.drawingBufferWidth*s.drawingBufferHeight*4);return s.readPixels(0,0,s.drawingBufferWidth,s.drawingBufferHeight,s.RGBA,s.UNSIGNED_BYTE,x),x}return s.bindFramebuffer(s.FRAMEBUFFER,h),this._canvasPixelComparison(m(d),t.canvasCopies.map(m),t.timeStamps)}_canvasPixelComparison(d,t,s){let h=s[1]-s[0];const m=d.length/4;for(let _=0;_<t.length;_++){const x=t[_];let I=0;for(let A=0;A<x.length;A+=4)x[A]===d[A]&&x[A+1]===d[A+1]&&x[A+2]===d[A+2]&&x[A+3]===d[A+3]&&(I+=1);h+=(s[_+2]-s[_+1])*(1-I/m)}return h}remove(){this._hash&&this._hash.remove();for(const t of this._controls)t.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.indoor.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),window.removeEventListener("resize",this._onWindowResize,!1),window.removeEventListener("orientationchange",this._onWindowResize,!1),window.removeEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.removeEventListener("online",this._onWindowOnline,!1),window.removeEventListener("visibilitychange",this._onVisibilityChange,!1);const d=this.painter.context.gl.getExtension("WEBGL_lose_context");d&&d.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),Qe.delete(this.painter.context.gl),ie.remove(),z.remove(),this._removed=!0,this.fire(new o.z("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(d){this._renderNextFrame=this._renderNextFrame||d,this.style&&!this._frame&&(this._frame=o.o.frame(t=>{const s=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,s&&this._render(t)}))}_preloadTiles(d){const t=this.style?this.style.getSourceCaches():[];return o.bw(t,(s,h)=>s._preloadTiles(d,h),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(d){this._trackResize&&this.resize({originalEvent:d})._update()}_onVisibilityChange(){document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(d){this._showTileBoundaries!==d&&(this._showTileBoundaries=d,this._tp.refreshUI(),this._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(d){this._showParseStatus!==d&&(this._showParseStatus=d,this._tp.refreshUI(),this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(d){this._showTerrainWireframe!==d&&(this._showTerrainWireframe=d,this._tp.refreshUI(),this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(d){this._showLayers2DWireframe!==d&&(this._showLayers2DWireframe=d,this._tp.refreshUI(),this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(d){this._showLayers3DWireframe!==d&&(this._showLayers3DWireframe=d,this._tp.refreshUI(),this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(d){this._speedIndexTiming!==d&&(this._speedIndexTiming=d,this._update())}get showPadding(){return!!this._showPadding}set showPadding(d){this._showPadding!==d&&(this._showPadding=d,this._tp.refreshUI(),this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(d){this._showCollisionBoxes!==d&&(this._showCollisionBoxes=d,this._tp.refreshUI(),d?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(d){this._showOverdrawInspector!==d&&(this._showOverdrawInspector=d,this._tp.refreshUI(),this._update())}get repaint(){return!!this._repaint}set repaint(d){this._repaint!==d&&(this._repaint=d,this._tp.refreshUI(),this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(d){this._vertices=d,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(d){this._showTileAABBs!==d&&(this._showTileAABBs=d,this._tp.refreshUI(),d&&this._update())}_setCacheLimits(d,t){o.eX(d,t)}get version(){return j}},NavigationControl:class{constructor(d={}){this.options=Object.assign({},Mb,d),this._container=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(o.aY(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",t=>{this._map&&this._map.zoomIn({},{originalEvent:t})}),Ae("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",t=>{this._map&&this._map.zoomOut({},{originalEvent:t})}),Ae("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(o.aY(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",t=>{const s=this._map;s&&(this.options.visualizePitch?s.resetNorthPitch({},{originalEvent:t}):s.resetNorth({},{originalEvent:t}))}),this._compassIcon=Ae("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const d=this._map;if(!d)return;const t=d.getZoom(),s=t===d.getMaxZoom(),h=t===d.getMinZoom();this._zoomInButton.disabled=s,this._zoomOutButton.disabled=h,this._zoomInButton.setAttribute("aria-disabled",s.toString()),this._zoomOutButton.setAttribute("aria-disabled",h.toString())}_rotateCompassArrow(){const d=this._map;if(!d)return;const t=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(d.transform.pitch*(Math.PI/180)),.5)}) rotateX(${d.transform.pitch}deg) rotateZ(${d.transform.angle*(180/Math.PI)}deg)`:`rotate(${d.transform.angle*(180/Math.PI)}deg)`;d._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=t)})}onAdd(d){return this._map=d,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),d.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&d.on("pitch",this._rotateCompassArrow),d.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ib(d,this._compass,this.options.visualizePitch)),this._container}onRemove(){const d=this._map;d&&(this._container.remove(),this.options.showZoom&&d.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&d.off("pitch",this._rotateCompassArrow),d.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(d,t){const s=Ae("button",d,this._container);return s.type="button",s.addEventListener("click",t),s}_setButtonTitle(d,t){if(!this._map)return;const s=this._map._getUIString(`NavigationControl.${t}`);d.setAttribute("aria-label",s),d.firstElementChild&&d.firstElementChild.setAttribute("title",s)}},GeolocateControl:class extends o.E{constructor(d={}){super();const t=navigator.geolocation;this.options=Object.assign({geolocation:t},Xa,d),o.aY(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=Id(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(d){return this._map=d,this._container=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(d){const t=(s=!!this.options.geolocation)=>{this._supportsGeolocation=s,d(s)};this._supportsGeolocation!==void 0?d(this._supportsGeolocation):navigator.permissions!==void 0?navigator.permissions.query({name:"geolocation"}).then(s=>t(s.state!=="denied")).catch(()=>t()):t()}_isOutOfMapMaxBounds(d){const t=this._map.getMaxBounds(),s=d.coords;return!!t&&(s.longitude<t.getWest()||s.longitude>t.getEast()||s.latitude<t.getSouth()||s.latitude>t.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(d){if(this._map){if(this._isOutOfMapMaxBounds(d))return this._setErrorState(),this.fire(new o.z("outofmaxbounds",d)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=d,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(d),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(d),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new o.z("geolocate",d)),this._finish()}}_updateCamera(d){const t=new o.aR(d.coords.longitude,d.coords.latitude),s=d.coords.accuracy,h=this._map.getBearing(),m=Object.assign({bearing:h},this.options.fitBoundsOptions);this._map.fitBounds(t.toBounds(s),m,{geolocateSource:!0})}_updateMarker(d){if(d){const t=new o.aR(d.coords.longitude,d.coords.latitude);this._accuracyCircleMarker.setLngLat(t).addTo(this._map),this._userLocationDotMarker.setLngLat(t).addTo(this._map),this._accuracy=d.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const d=this._map.transform,t=o.ce(1,d._center.lat)*d.worldSize,s=Math.ceil(2*this._accuracy*t);this._circleElement.style.width=`${s}px`,this._circleElement.style.height=`${s}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(d){if(this._map){if(this.options.trackUserLocation)if(d.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(d.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new o.z("error",d)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(d){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",t=>t.preventDefault()),this._geolocateButton=Ae("button","mapboxgl-ctrl-geolocate",this._container),Ae("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",d===!1){o.w("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}else{const t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Ae("div","mapboxgl-user-location"),this._dotElement.appendChild(Ae("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(Ae("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new kl({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=Ae("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new kl({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",t=>{t.geolocateSource||this._watchState!=="ACTIVE_LOCK"||t.originalEvent&&t.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new o.z("trackuserlocationend")))})}}_onDeviceOrientation(d){this._userLocationDotMarker&&(d.webkitCompassHeading?this._heading=d.webkitCompassHeading:d.absolute===!0&&(this._heading=-1*d.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return o.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new o.z("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new o.z("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new o.z("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let d;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(d={maximumAge:6e5,timeout:0},this._noTimeout=!0):(d=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,d),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=window.setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const d=()=>{"ondeviceorientationabsolute"in window?window.addEventListener("deviceorientationabsolute",this._onDeviceOrientation):window.addEventListener("deviceorientation",this._onDeviceOrientation)};typeof DeviceMotionEvent<"u"&&typeof DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(t=>{t==="granted"&&d()}).catch(console.error):d()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),window.removeEventListener("deviceorientation",this._onDeviceOrientation),window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Nu,ScaleControl:class{constructor(d={}){this.options=Object.assign({},da,d),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}}(),o.aY(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const d=this.options.maxWidth||100,t=this._map,s=t._containerHeight/2,h=t._containerWidth/2-d/2,m=t.unproject([h,s]),_=t.unproject([h+d,s]),x=m.distanceTo(_);if(this.options.unit==="imperial"){const I=3.2808*x;I>5280?this._setScale(d,I/5280,"mile"):this._setScale(d,I,"foot")}else this.options.unit==="nautical"?this._setScale(d,x/1852,"nautical-mile"):x>=1e3?this._setScale(d,x/1e3,"kilometer"):this._setScale(d,x,"meter")}_setScale(d,t,s){this._map._requestDomTask(()=>{const h=function(_){const x=Math.pow(10,`${Math.floor(_)}`.length-1);let I=_/x;return I=I>=10?10:I>=5?5:I>=3?3:I>=2?2:I>=1?1:function(A){const C=Math.pow(10,Math.ceil(-Math.log(A)/Math.LN10));return Math.round(A*C)/C}(I),x*I}(t),m=h/t;this._container.innerHTML=this._isNumberFormatSupported&&s!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:s}).format(h):`${h} ${fa[s]}`,this._container.style.width=d*m+"px"})}onAdd(d){return this._map=d,this._language=d.getLanguage(),this._container=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-scale",d.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(d){this._language=d,this._update()}setUnit(d){this.options.unit=d,this._update()}},FullscreenControl:class{constructor(d={}){this._fullscreen=!1,d&&d.container&&(d.container instanceof HTMLElement?this._container=d.container:o.w("Full screen control 'container' must be a DOM element.")),o.aY(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(d){return this._map=d,this._container||(this._container=this._map.getContainer()),this._controlContainer=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",o.w("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}_setupUI(){const d=this._fullscreenButton=Ae("button","mapboxgl-ctrl-fullscreen",this._controlContainer);Ae("span","mapboxgl-ctrl-icon",d).setAttribute("aria-hidden","true"),d.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const d=this._getTitle();this._fullscreenButton.setAttribute("aria-label",d),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",d)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(document.fullscreenElement||document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},IndoorControl:Lu,Popup:class extends o.E{constructor(d){super(),this.options=Object.assign(Object.create(Pl),d),this._altitude=this.options.altitude,o.aY(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(d&&d.className?d.className.trim().split(/\s+/):[])}addTo(d){return this._map&&this.remove(),this._map=d,this.options.closeOnClick&&d.on("preclick",this._onClose),this.options.closeOnMove&&d.on("move",this._onClose),d.on("remove",this.remove),this._update(),d._addPopup(this),this._focusFirstElement(),this._trackPointer?(d.on("mousemove",this._onMouseEvent),d.on("mouseup",this._onMouseEvent),d._canvasContainer.classList.add("mapboxgl-track-pointer")):d.on("move",this._update),this.fire(new o.z("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const d=this._map;return d&&(d.off("move",this._update),d.off("move",this._onClose),d.off("preclick",this._onClose),d.off("click",this._onClose),d.off("remove",this.remove),d.off("mousemove",this._onMouseEvent),d.off("mouseup",this._onMouseEvent),d.off("drag",this._onMouseEvent),d._canvasContainer&&d._canvasContainer.classList.remove("mapboxgl-track-pointer"),d._removePopup(this),this._map=void 0),this.fire(new o.z("close")),this}getLngLat(){return this._lngLat}setLngLat(d){this._lngLat=o.aR.convert(d),this._pos=null,this._trackPointer=!1,this._update();const t=this._map;return t&&(t.on("move",this._update),t.off("mousemove",this._onMouseEvent),t._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}getAltitude(){return this._altitude}setAltitude(d){return this._altitude=d,this._update(),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const d=this._map;return d&&(d.off("move",this._update),d.on("mousemove",this._onMouseEvent),d.on("drag",this._onMouseEvent),d._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(d){return this.setDOMContent(document.createTextNode(d))}setHTML(d){const t=document.createDocumentFragment(),s=document.createElement("body");let h;for(s.innerHTML=d;h=s.firstChild,h;)t.appendChild(h);return this.setDOMContent(t)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(d){return this.options.maxWidth=d,this._update(),this}setDOMContent(d){let t=this._content;if(t)for(;t.hasChildNodes();)t.firstChild&&t.removeChild(t.firstChild);else t=this._content=Ae("div","mapboxgl-popup-content",this._container||void 0);if(t.appendChild(d),this.options.closeButton){const s=this._closeButton=Ae("button","mapboxgl-popup-close-button",t);s.type="button",s.setAttribute("aria-label","Close popup"),s.innerHTML='<span aria-hidden="true">×</span>',s.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(d){return this._classList.add(d),this._updateClassList(),this}removeClassName(d){return this._classList.delete(d),this._updateClassList(),this}setOffset(d){return this.options.offset=d,this._update(),this}toggleClassName(d){let t;return this._classList.delete(d)?t=!1:(this._classList.add(d),t=!0),this._updateClassList(),t}_onMouseEvent(d){this._update(d.point)}_getAnchor(d){if(this.options.anchor)return this.options.anchor;const t=this._map,s=this._container,h=this._pos;if(!t||!s||!h)return"bottom";const m=s.offsetWidth,_=s.offsetHeight,x=h.x<m/2,I=h.x>t.transform.width-m/2;if(h.y+d<_)return x?"top-left":I?"top-right":"top";if(h.y>t.transform.height-_){if(x)return"bottom-left";if(I)return"bottom-right"}return x?"left":I?"right":"bottom"}_updateClassList(){const d=this._container;if(!d)return;const t=[...this._classList];t.push("mapboxgl-popup"),this._anchor&&t.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&t.push("mapboxgl-popup-track-pointer"),d.className=t.join(" ")}_update(d){const t=this._map,s=this._content;if(!t||!this._lngLat&&!this._trackPointer||!s)return;let h=this._container;if(h||(h=this._container=Ae("div","mapboxgl-popup",t.getContainer()),this._tip=Ae("div","mapboxgl-popup-tip",h),h.appendChild(s)),this.options.maxWidth&&h.style.maxWidth!==this.options.maxWidth&&(h.style.maxWidth=this.options.maxWidth),t.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Od(this._lngLat,this._pos,t.transform)),!this._trackPointer||d){const m=this._pos=this._trackPointer&&d instanceof o.P?d:t.project(this._lngLat,this._altitude),_=by(this.options.offset),x=this._anchor=this._getAnchor(_.y),I=by(this.options.offset,x),A=m.add(I).round();t._requestDomTask(()=>{this._container&&x&&(this._container.style.transform=`${ku[x]} translate(${A.x}px,${A.y}px)`)})}if(!this._marker&&t._showingGlobe()){const m=o.eY(t.transform,this._lngLat)?0:1;this._setOpacity(m)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const d=this._container.querySelector(Bs);d&&d.focus()}_onClose(){this.remove()}_setOpacity(d){this._container&&(this._container.style.opacity=`${d}`),this._content&&(this._content.style.pointerEvents=d?"auto":"none")}},Marker:kl,Style:Ms,LngLat:o.aR,LngLatBounds:o.aI,Point:o.P,MercatorCoordinate:o.ae,FreeCameraOptions:ip,Evented:o.E,config:o.e,prewarm:o.f0,clearPrewarmedResources:o.e$,get accessToken(){return o.e.ACCESS_TOKEN},set accessToken(d){o.e.ACCESS_TOKEN=d},get baseApiUrl(){return o.e.API_URL},set baseApiUrl(d){o.e.API_URL=d},get workerCount(){return o.f9.workerCount},set workerCount(d){o.f9.workerCount=d},get maxParallelImageRequests(){return o.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(d){o.e.MAX_PARALLEL_IMAGE_REQUESTS=d},clearStorage(d){o.f8(d)},get workerUrl(){return o.f7.workerUrl},set workerUrl(d){o.f7.workerUrl=d},get workerClass(){return o.f7.workerClass},set workerClass(d){o.f7.workerClass=d},get workerParams(){return o.f7.workerParams},set workerParams(d){o.f7.workerParams=d},get dracoUrl(){return o.f6()},set dracoUrl(d){o.f5(d)},get meshoptUrl(){return o.f4()},set meshoptUrl(d){o.f3(d)},setNow:o.o.setNow,restoreNow:o.o.restoreNow}});var D=y;return D})})(OD);var B$=OD.exports;const jD=m_(B$),pq="",gq="",mq="",F$=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{opacity:.12,d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",fill:"white",style:{fill:"white",fillOpacity:1}}),en.createElement("path",{d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",stroke:"white",style:{stroke:"white",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),U$=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{opacity:.12,d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",fill:"#6B7280",style:{fill:"#6B7280",fill:"color(display-p3 0.4196 0.4471 0.5020)",fillOpacity:1}}),en.createElement("path",{d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",stroke:"#6B7280",style:{stroke:"#6B7280",stroke:"color(display-p3 0.4196 0.4471 0.5020)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),V$=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{opacity:.12,d:"M12 12L21 7V16.0586C21 16.4012 21 16.5725 20.9495 16.7253C20.9049 16.8605 20.8318 16.9846 20.7354 17.0893C20.6263 17.2076 20.4766 17.2908 20.177 17.4572L12.777 21.5683C12.4934 21.7259 12.3516 21.8047 12.2015 21.8355C12.0685 21.8629 11.9315 21.8629 11.7986 21.8355C11.6484 21.8047 11.5066 21.7259 11.223 21.5683L3.82297 17.4572C3.52345 17.2908 3.37369 17.2076 3.26463 17.0893C3.16816 16.9846 3.09515 16.8605 3.05048 16.7253C3 16.5725 3 16.4012 3 16.0586V7L12 12Z",fill:"white",style:{fill:"white",fillOpacity:1}}),en.createElement("path",{d:"M20.5 7.27783L12 12.0001M12 12.0001L3.49997 7.27783M12 12.0001V21.5001M21 16.0586V7.94153C21 7.59889 21 7.42757 20.9495 7.27477C20.9049 7.13959 20.8318 7.01551 20.7354 6.91082C20.6263 6.79248 20.4766 6.70928 20.177 6.54288L12.777 2.43177C12.4934 2.27421 12.3516 2.19543 12.2015 2.16454C12.0685 2.13721 11.9315 2.13721 11.7986 2.16454C11.6484 2.19543 11.5066 2.27421 11.223 2.43177L3.82297 6.54288C3.52345 6.70928 3.37369 6.79248 3.26463 6.91082C3.16816 7.01551 3.09515 7.13959 3.05048 7.27477C3 7.42757 3 7.59889 3 7.94153V16.0586C3 16.4013 3 16.5726 3.05048 16.7254C3.09515 16.8606 3.16816 16.9847 3.26463 17.0893C3.37369 17.2077 3.52345 17.2909 3.82297 17.4573L11.223 21.5684C11.5066 21.726 11.6484 21.8047 11.7986 21.8356C11.9315 21.863 12.0685 21.863 12.2015 21.8356C12.3516 21.8047 12.4934 21.726 12.777 21.5684L20.177 17.4573C20.4766 17.2909 20.6263 17.2077 20.7354 17.0893C20.8318 16.9847 20.9049 16.8606 20.9495 16.7254C21 16.5726 21 16.4013 21 16.0586Z",stroke:"white",style:{stroke:"white",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Q$=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{opacity:.12,d:"M12 12L21 7V16.0586C21 16.4012 21 16.5725 20.9495 16.7253C20.9049 16.8605 20.8318 16.9846 20.7354 17.0893C20.6263 17.2076 20.4766 17.2908 20.177 17.4572L12.777 21.5683C12.4934 21.7259 12.3516 21.8047 12.2015 21.8355C12.0685 21.8629 11.9315 21.8629 11.7986 21.8355C11.6484 21.8047 11.5066 21.7259 11.223 21.5683L3.82297 17.4572C3.52345 17.2908 3.37369 17.2076 3.26463 17.0893C3.16816 16.9846 3.09515 16.8605 3.05048 16.7253C3 16.5725 3 16.4012 3 16.0586V7L12 12Z",fill:"#6B7280",style:{fill:"#6B7280",fill:"color(display-p3 0.4196 0.4471 0.5020)",fillOpacity:1}}),en.createElement("path",{d:"M20.5 7.27783L12 12.0001M12 12.0001L3.49997 7.27783M12 12.0001V21.5001M21 16.0586V7.94153C21 7.59889 21 7.42757 20.9495 7.27477C20.9049 7.13959 20.8318 7.01551 20.7354 6.91082C20.6263 6.79248 20.4766 6.70928 20.177 6.54288L12.777 2.43177C12.4934 2.27421 12.3516 2.19543 12.2015 2.16454C12.0685 2.13721 11.9315 2.13721 11.7986 2.16454C11.6484 2.19543 11.5066 2.27421 11.223 2.43177L3.82297 6.54288C3.52345 6.70928 3.37369 6.79248 3.26463 6.91082C3.16816 7.01551 3.09515 7.13959 3.05048 7.27477C3 7.42757 3 7.59889 3 7.94153V16.0586C3 16.4013 3 16.5726 3.05048 16.7254C3.09515 16.8606 3.16816 16.9847 3.26463 17.0893C3.37369 17.2077 3.52345 17.2909 3.82297 17.4573L11.223 21.5684C11.5066 21.726 11.6484 21.8047 11.7986 21.8356C11.9315 21.863 12.0685 21.863 12.2015 21.8356C12.3516 21.8047 12.4934 21.726 12.777 21.5684L20.177 17.4573C20.4766 17.2909 20.6263 17.2077 20.7354 17.0893C20.8318 16.9847 20.9049 16.8606 20.9495 16.7254C21 16.5726 21 16.4013 21 16.0586Z",stroke:"#6B7280",style:{stroke:"#6B7280",stroke:"color(display-p3 0.4196 0.4471 0.5020)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Cs=Object.freeze({initial3D:"initial3D",clicked3D:"clicked3D",clicked2D:"clicked2D"});kD.propTypes={mapView:et.object,pitch:et.number,solution:et.object,reset:et.number,activeColor:et.string,show2DModelsIn3D:et.string};function kD({mapView:r,pitch:a,reset:c,activeColor:f="#005655",show2DModelsIn3D:y}){const[w,D]=Ce.useState(Cs.initial3D),o=document.querySelector(".viewmode-switch-portal"),j=()=>y==="true";return Ce.useEffect(()=>{c&&D(Cs.initial3D)},[c]),Ce.useEffect(()=>{r&&new Promise($=>{r.isReady?$():r.on("ready",()=>{$()})}).then(()=>{switch(w){case Cs.clicked2D:r.tilt(0,2e3),r.hideFeatures([r.FeatureType.MODEL3D,r.FeatureType.WALLS3D,r.FeatureType.EXTRUSION3D,r.FeatureType.EXTRUDEDBUILDINGS]);break;case Cs.initial3D:r.tilt(Lr(a)?45:a,2e3),r.hideFeatures([...j()?[]:[r.FeatureType.MODEL2D],r.FeatureType.WALLS2D]);break;case Cs.clicked3D:r.tilt(45,2e3),r.hideFeatures([...j()?[]:[r.FeatureType.MODEL2D],r.FeatureType.WALLS2D]);break}})},[w,r]),o?os.createPortal(Be.jsxs("div",{className:"view-mode-switch",children:[Be.jsx("button",{className:"view-mode-switch__button",onClick:()=>D(Cs.clicked2D),style:{backgroundColor:w===Cs.clicked2D?f:"white"},children:w===Cs.clicked2D?Be.jsx(F$,{}):Be.jsx(U$,{})}),Be.jsx("button",{className:"view-mode-switch__button",onClick:()=>D(Cs.clicked3D),style:{backgroundColor:[Cs.initial3D,Cs.clicked3D].includes(w)?f:"white"},children:[Cs.initial3D,Cs.clicked3D].includes(w)?Be.jsx(V$,{}):Be.jsx(Q$,{})})]}),o):null}PD.propTypes={accessToken:et.string.isRequired,onInitialized:et.func.isRequired,center:et.object,zoom:et.number,bounds:et.object,bearing:et.number,pitch:et.number,resetViewMode:et.number,mapsIndoorsInstance:et.object,viewModeSwitchVisible:et.bool,mapOptions:et.object,appConfig:et.object};function PD({accessToken:r,onInitialized:a,center:c,zoom:f,bounds:y,bearing:w,pitch:D,resetViewMode:o,mapsIndoorsInstance:j,viewModeSwitchVisible:F,mapOptions:$,appConfig:oe}){var We;const[te,ge]=Ce.useState(),[xe,Ae]=Ce.useState(!1),it=_v();return Ce.useEffect(()=>{te&&(Lr(y)?(Lr(c)||te.getMap().setCenter(c),Lr(f)||te.getMap().setZoom(f),Lr(w)||te.getMap().setBearing(w),Lr(D)||te.getMap().setPitch(D)):te.getMap().fitBounds([y.west,y.south,y.east,y.north],{pitch:D||0,bearing:w||0,animate:!1,padding:$==null?void 0:$.fitBoundsPadding}))},[te,c,f,w,D,y,$]),Ce.useEffect(()=>{j&&te&&!xe&&it&&(te.getMap().addControl(new jD.NavigationControl({showCompass:!1}),"bottom-right"),Ae(!0))},[j,te,xe]),Ce.useEffect(()=>{window.mapboxgl=jD;const me={accessToken:r,element:document.getElementById("map"),center:c??{lat:0,lng:0},zoom:f??15,bounds:y?[y.west,y.south,y.east,y.north]:void 0,bearing:w??0,pitch:D??0,useMapsIndoorsMapboxStyle:!($!=null&&$.mapboxMapStyle),...$};$!=null&&$.miTransitionLevel&&!isNaN(parseInt($==null?void 0:$.miTransitionLevel))&&(me.mapsIndoorsTransitionLevel=parseInt($.miTransitionLevel)),Lr($==null?void 0:$.showRoadNames)||(me.showRoadNameLabels=$.showRoadNames),Lr($==null?void 0:$.showMapMarkers)||(me.showMapMarkers=$.showMapMarkers);const ce=new window.mapsindoors.mapView.MapboxV3View(me);ge(ce),!Lr($==null?void 0:$.mapboxMapStyle)&&!me.useMapsIndoorsMapboxStyle&&ce.getMap().setStyle($.mapboxMapStyle),a(ce)},[]),Be.jsx("div",{className:"mapsindoors-map mapbox-map-container",id:"map",children:F&&Be.jsx(kD,{reset:o,mapView:te,pitch:D,activeColor:$==null?void 0:$.brandingColor,show2DModelsIn3D:(We=oe==null?void 0:oe.appSettings)==null?void 0:We.show2DModelsIn3D})})}const H$=Object.freeze(Object.defineProperty({__proto__:null,default:PD},Symbol.toStringTag,{value:"Module"}));function $$(r,a,c,f){function y(w){return w instanceof c?w:new c(function(D){D(w)})}return new(c||(c=Promise))(function(w,D){function o($){try{F(f.next($))}catch(oe){D(oe)}}function j($){try{F(f.throw($))}catch(oe){D(oe)}}function F($){$.done?w($.value):y($.value).then(o,j)}F((f=f.apply(r,a||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function Y$(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var G$=function r(a,c){if(a===c)return!0;if(a&&c&&typeof a=="object"&&typeof c=="object"){if(a.constructor!==c.constructor)return!1;var f,y,w;if(Array.isArray(a)){if(f=a.length,f!=c.length)return!1;for(y=f;y--!==0;)if(!r(a[y],c[y]))return!1;return!0}if(a.constructor===RegExp)return a.source===c.source&&a.flags===c.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===c.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===c.toString();if(w=Object.keys(a),f=w.length,f!==Object.keys(c).length)return!1;for(y=f;y--!==0;)if(!Object.prototype.hasOwnProperty.call(c,w[y]))return!1;for(y=f;y--!==0;){var D=w[y];if(!r(a[D],c[D]))return!1}return!0}return a!==a&&c!==c},Z$=Y$(G$);const RD="__googleMapsScriptId";var Ih;(function(r){r[r.INITIALIZED=0]="INITIALIZED",r[r.LOADING=1]="LOADING",r[r.SUCCESS=2]="SUCCESS",r[r.FAILURE=3]="FAILURE"})(Ih||(Ih={}));class Xc{constructor({apiKey:a,authReferrerPolicy:c,channel:f,client:y,id:w=RD,language:D,libraries:o=[],mapIds:j,nonce:F,region:$,retries:oe=3,url:te="https://maps.googleapis.com/maps/api/js",version:ge}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=a,this.authReferrerPolicy=c,this.channel=f,this.client=y,this.id=w||RD,this.language=D,this.libraries=o,this.mapIds=j,this.nonce=F,this.region=$,this.retries=oe,this.url=te,this.version=ge,Xc.instance){if(!Z$(this.options,Xc.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Xc.instance.options)}`);return Xc.instance}Xc.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Ih.FAILURE:this.done?Ih.SUCCESS:this.loading?Ih.LOADING:Ih.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let a=this.url;return a+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(a+=`&key=${this.apiKey}`),this.channel&&(a+=`&channel=${this.channel}`),this.client&&(a+=`&client=${this.client}`),this.libraries.length>0&&(a+=`&libraries=${this.libraries.join(",")}`),this.language&&(a+=`&language=${this.language}`),this.region&&(a+=`®ion=${this.region}`),this.version&&(a+=`&v=${this.version}`),this.mapIds&&(a+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(a+=`&auth_referrer_policy=${this.authReferrerPolicy}`),a}deleteScript(){const a=document.getElementById(this.id);a&&a.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((a,c)=>{this.loadCallback(f=>{f?c(f.error):a(window.google)})})}importLibrary(a){return this.execute(),google.maps.importLibrary(a)}loadCallback(a){this.callbacks.push(a),this.execute()}setScript(){var a,c;if(document.getElementById(this.id)){this.callback();return}const f={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(f).forEach(w=>!f[w]&&delete f[w]),!((c=(a=window==null?void 0:window.google)===null||a===void 0?void 0:a.maps)===null||c===void 0)&&c.importLibrary||(w=>{let D,o,j,F="The Google Maps JavaScript API",$="google",oe="importLibrary",te="__ib__",ge=document,xe=window;xe=xe[$]||(xe[$]={});const Ae=xe.maps||(xe.maps={}),it=new Set,We=new URLSearchParams,me=()=>D||(D=new Promise((ce,pe)=>$$(this,void 0,void 0,function*(){var ve;yield o=ge.createElement("script"),o.id=this.id,We.set("libraries",[...it]+"");for(j in w)We.set(j.replace(/[A-Z]/g,De=>"_"+De[0].toLowerCase()),w[j]);We.set("callback",$+".maps."+te),o.src=this.url+"?"+We,Ae[te]=ce,o.onerror=()=>D=pe(Error(F+" could not load.")),o.nonce=this.nonce||((ve=ge.querySelector("script[nonce]"))===null||ve===void 0?void 0:ve.nonce)||"",ge.head.append(o)})));Ae[oe]?console.warn(F+" only loads once. Ignoring:",w):Ae[oe]=(ce,...pe)=>it.add(ce)&&me().then(()=>Ae[oe](ce,...pe))})(f);const y=this.libraries.map(w=>this.importLibrary(w));y.length||y.push(this.importLibrary("core")),Promise.all(y).then(()=>this.callback(),w=>{const D=new ErrorEvent("error",{error:w});this.loadErrorCallback(D)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(a){if(this.errors.push(a),this.errors.length<=this.retries){const c=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${c} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},c)}else this.onerrorEvent=a,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(a=>{a(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading=!0,this.setScript()}}}const yq="";BD.propTypes={apiKey:et.string.isRequired,onInitialized:et.func.isRequired,center:et.object,zoom:et.number,bounds:et.object,heading:et.number,tilt:et.number,mapsIndoorsInstance:et.object,mapOptions:et.object,gmMapId:et.string};function BD({apiKey:r,onInitialized:a,center:c,zoom:f,bounds:y,heading:w,tilt:D,mapsIndoorsInstance:o,mapOptions:j,gmMapId:F}){const[$,oe]=Ce.useState(),[te,ge]=Ce.useState(),[xe,Ae]=Ce.useState(!1),it=_v();return Ce.useEffect(()=>{te&&(Lr(y)||o.getMapView().fitBounds(y,j==null?void 0:j.fitBoundsPadding),!Lr(c)&&Lr(y)&&te.getMap().setCenter(c),!Lr(f)&&Lr(y)&&te.getMap().setZoom(f),Lr(w)||te.getMap().setHeading(w),Lr(D)||te.getMap().setTilt(D))},[te,c,f,w,D,y,j]),Ce.useEffect(()=>{o&&te&&$&&!xe&&it&&(te.getMap().setOptions({zoomControl:!0,zoomControlOptions:{style:$.maps.ZoomControlStyle.DEFAULT,position:$.maps.ControlPosition.RIGHT_BOTTOM}}),Ae(!0))},[o,te,$]),Ce.useEffect(()=>{new Xc({apiKey:r,version:"quarterly",libraries:["geometry","places"]}).load().then(me=>{oe(me);const ce={element:document.getElementById("map"),disableDefaultUI:!0,center:c??{lat:0,lng:0},zoom:f??21,heading:w??0,tilt:D??0,mapId:F,...j};Lr(j==null?void 0:j.showMapMarkers)||(ce.showMapMarkers=j.showMapMarkers);const pe=new window.mapsindoors.mapView.GoogleMapsView(ce);ge(pe),a(pe)})},[]),Be.jsx("div",{className:"mapsindoors-map google-maps-map-container",id:"map"})}const W$=Object.freeze(Object.defineProperty({__proto__:null,default:BD},Symbol.toStringTag,{value:"Module"}));return MI});
|
|
3205
|
+
(${h.data.width}, ${h.data.height})`)));const A=!(t instanceof HTMLImageElement||ImageBitmap&&t instanceof ImageBitmap);let C=!1;h.usvg?(h.data=new o.q({width:_,height:x},new Uint8Array(I)),h.usvg=!1,h.icon=void 0,C=!0):h.data.replace(I,A),this.style.updateImage(s,h,C)}hasImage(d){return d?!!this.style&&!!this.style.getImage(o.I.from(d)):(this.fire(new o.y(new Error("Missing required image id"))),!1)}removeImage(d){this.style.removeImage(o.I.from(d))}loadImage(d,t){o.n(this._requestManager.transformRequest(d,o.R.Image),(s,h)=>{t(s,h instanceof HTMLImageElement?o.o.getImageData(h):h)})}listImages(){return this.style.listImages().map(d=>d.name)}addModel(d,t){this._lazyInitEmptyStyle(),this.style.addModel(d,t)}hasModel(d){return d?this.style.hasModel(d):(this.fire(new o.y(new Error("Missing required model id"))),!1)}removeModel(d){this.style.removeModel(d)}listModels(){return this.style.listModels()}addLayer(d,t){return this._isValidId(d.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(d,t),this._update(!0)):this}getSlot(d){const t=this.getLayer(d);return t&&t.slot||null}setSlot(d,t){return this.style.setSlot(d,t),this.style.mergeLayers(),this._update(!0)}addImport(d,t){return this.style.addImport(d,t).catch(s=>this.fire(new o.y(new Error("Failed to add import",s)))),this}updateImport(d,t){return typeof t!="string"&&t.id!==d?(this.removeImport(d),this.addImport(t)):(this.style.updateImport(d,t),this._update(!0))}removeImport(d){return this.style.removeImport(d),this}moveImport(d,t){return this.style.moveImport(d,t),this._update(!0)}moveLayer(d,t){return this._isValidId(d)?(this.style.moveLayer(d,t),this._update(!0)):this}removeLayer(d){return this._isValidId(d)?(this.style.removeLayer(d),this._update(!0)):this}getLayer(d){if(!this._isValidId(d))return null;const t=this.style.getOwnLayer(d);return t?t.type==="custom"?t.implementation:t.serialize():void 0}getSlots(){return this.style.getSlots()}setLayerZoomRange(d,t,s){return this._isValidId(d)?(this.style.setLayerZoomRange(d,t,s),this._update(!0)):this}setFilter(d,t,s={}){return this._isValidId(d)?(this.style.setFilter(d,t,s),this._update(!0)):this}getFilter(d){return this._isValidId(d)?this.style.getFilter(d):null}setPaintProperty(d,t,s,h={}){return this._isValidId(d)?(this.style.setPaintProperty(d,t,s,h),this._update(!0)):this}getPaintProperty(d,t){return this._isValidId(d)?this.style.getPaintProperty(d,t):null}setLayoutProperty(d,t,s,h={}){return this._isValidId(d)?(this.style.setLayoutProperty(d,t,s,h),this._update(!0)):this}getLayoutProperty(d,t){return this._isValidId(d)?this.style.getLayoutProperty(d,t):null}getGlyphsUrl(){return this.style.getGlyphsUrl()}setGlyphsUrl(d){return this.style.setGlyphsUrl(d),this._update(!0)}getSchema(d){return this.style.getSchema(d)}setSchema(d,t){return this.style.setSchema(d,t),this._update(!0)}getConfig(d){return this.style.getConfig(d)}setConfig(d,t){return this.style.setConfig(d,t),this._update(!0)}getConfigProperty(d,t){return this.style.getConfigProperty(d,t)}setConfigProperty(d,t,s){return this.style.setConfigProperty(d,t,s),this._update(!0)}getFeaturesetDescriptors(d){return this.style.getFeaturesetDescriptors(d)}setLights(d){if(this._lazyInitEmptyStyle(),d&&d.length===1&&d[0].type==="flat"){const t=d[0];t.properties?this.style.setFlatLight(t.properties,t.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(d),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){const d=this.style.getLights()||[];return d.length===0&&d.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),d}setLight(d,t={}){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:d}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(d){return this._lazyInitEmptyStyle(),!d&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(d),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(d){return this._lazyInitEmptyStyle(),this.style.setFog(d),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setSnow(d){return this._lazyInitEmptyStyle(),this.style.setSnow(d),this._update(!0)}getSnow(){return this.style?this.style.getSnow():null}setRain(d){return this._lazyInitEmptyStyle(),this.style.setRain(d),this._update(!0)}getRain(){return this.style?this.style.getRain():null}setColorTheme(d){return this._lazyInitEmptyStyle(),this.style.setColorTheme(d),this._update(!0)}setImportColorTheme(d,t){return this._lazyInitEmptyStyle(),this.style.setImportColorTheme(d,t),this._update(!0)}setCamera(d){return this.style.setCamera(d),this._triggerCameraUpdate(d)}_triggerCameraUpdate(d){return this._update(this.transform.setOrthographicProjectionAtLowPitch(d["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(d){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(o.aR.convert(d),this.transform):0}setFeatureState(d,t){return d.source&&!this._isValidId(d.source)?this:(this.style.setFeatureState(d,t),this._update())}removeFeatureState(d,t){return d.source&&!this._isValidId(d.source)?this:(this.style.removeFeatureState(d,t),this._update())}getFeatureState(d){return d.source&&!this._isValidId(d.source)?null:this.style.getFeatureState(d)}_selectIndoorFloor(d){this.indoor.selectFloor(d)}_addIndoorControl(){this._indoorControl||(this._indoorControl=new Lu),this.addControl(this._indoorControl,"right")}_removeIndoorControl(){this._indoorControl&&this.removeControl(this._indoorControl)}_updateContainerDimensions(){if(!this._container)return;const d=this._container.getBoundingClientRect().width||400,t=this._container.getBoundingClientRect().height||300;let s,h,m,_=this._container;for(;_&&(!h||!m);){const x=window.getComputedStyle(_).transform;x&&x!=="none"&&(s=x.match(/matrix.*\((.+)\)/)[1].split(", "),s[0]&&s[0]!=="0"&&s[0]!=="1"&&(h=s[0]),s[3]&&s[3]!=="0"&&s[3]!=="1"&&(m=s[3])),_=_.parentElement}this._containerWidth=h?Math.abs(d/h):d,this._containerHeight=m?Math.abs(t/m):t}_detectMissingCSS(){window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&o.w("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const d=this._container;d.classList.add("mapboxgl-map"),(this._missingCSSCanary=Ae("div","mapboxgl-canary",d)).style.visibility="hidden",this._detectMissingCSS();const t=this._canvasContainer=Ae("div","mapboxgl-canvas-container",d);this._canvas=Ae("canvas","mapboxgl-canvas",t),this._interactive&&(t.classList.add("mapboxgl-interactive"),this._canvas.setAttribute("tabindex","0")),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const s=this._controlContainer=Ae("div","mapboxgl-control-container",d),h=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach(m=>{h[m]=Ae("div",`mapboxgl-ctrl-${m}`,s)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(d,t){const s=o.o.devicePixelRatio||1;this._canvas.width=s*Math.ceil(d),this._canvas.height=s*Math.ceil(t),this._canvas.style.width=`${d}px`,this._canvas.style.height=`${t}px`}_addMarker(d){this._markers.push(d)}_removeMarker(d){const t=this._markers.indexOf(d);t!==-1&&this._markers.splice(t,1)}_addPopup(d){this._popups.push(d)}_removePopup(d){const t=this._popups.indexOf(d);t!==-1&&this._popups.splice(t,1)}_setupPainter(){const d=Object.assign({},xe.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),t=this._canvas.getContext("webgl2",d);t?(Re(t,!0),this.painter=new Up(t,this._contextCreateOptions,this.transform,this._scaleFactor,this._tp,this._worldview),this.on("data",s=>{s.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),o.k.testSupport(t)):this.fire(new o.y(new Error("Failed to initialize WebGL")))}_contextLost(d){d.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new o.z("webglcontextlost",{originalEvent:d}))}_contextRestored(d){this._setupPainter(),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight)),this._updateTerrain(),this.style&&(this.style.clearLayers(),this.style.imageManager.destroyAtlasTextures(),this.style.reloadModels(),this.style.clearSources()),this._update(),this.fire(new o.z("webglcontextrestored",{originalEvent:d}))}_onMapScroll(d){if(d.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}idle(){return!this.isMoving()&&this.loaded()}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}frameReady(){return this.loaded()&&!this._placementDirty}_update(d){return this.style?(this._styleDirty=this._styleDirty||d,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(d){return this._update(),this._renderTaskQueue.add(d)}_cancelRenderFrame(d){this._renderTaskQueue.remove(d)}_requestDomTask(d){!this.loaded()||this.loaded()&&!this.isMoving()?d():this._domRenderTaskQueue.add(d)}_render(d){let t;this.fire(new o.z("renderstart")),++this._frameId;const s=this.painter.context.extTimerQuery,h=o.o.now(),m=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(t=m.createQuery(),m.beginQuery(s.TIME_ELAPSED_EXT,t)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],performance.now())),this._renderTaskQueue.run(d),this._domRenderTaskQueue.run(d),this._removed)return;this._updateProjectionTransition();const _=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const C=this.transform.zoom,L=this.transform.pitch,R=o.o.now(),O=new o.ac(C,{now:R,fadeDuration:_,pitch:L,transition:this.style.transition,worldview:this._worldview});this.style.update(O)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let x=!1;this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),x=this._updateAverageElevation(h),this.style.updateSources(this.transform),this.style.updateImageProviders(),this.isMoving()||this._forceMarkerAndPopupUpdate()):x=this._updateAverageElevation(h);const I=this.style&&this.style._updatePlacement(this.painter,this.painter.transform,this.showCollisionBoxes,_,this._crossSourceCollisions,this.painter.replacementSource,this._scaleFactorChanged);if(this._scaleFactorChanged&&(this._scaleFactorChanged=!1),I&&(this._placementDirty=I.needsRerender),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showParseStatus:this.showParseStatus,wireframe:{terrain:this.showTerrainWireframe,layers2D:this.showLayers2DWireframe,layers3D:this.showLayers3DWireframe},showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:_,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new o.z("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,$.mark(F.load),this.fire(new o.z("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&(this.style.snow||this.style.rain)&&(this._styleDirty=!0),this.style&&this.style.imageManager.hasPatternsInFlight()&&(this._styleDirty=!0),this.style&&!this.style.modelManager.isLoaded()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),t){const C=o.o.now()-h;m.endQuery(s.TIME_ELAPSED_EXT),setTimeout(()=>{const L=m.getQueryParameter(t,m.QUERY_RESULT)/1e6;m.deleteQuery(t),this.fire(new o.z("gpu-timing-frame",{cpuTime:C,gpuTime:L}))},50)}if(this.listens("gpu-timing-layer")){const C=this.painter.collectGpuTimers();setTimeout(()=>{const L=this.painter.queryGpuTimers(C);this.fire(new o.z("gpu-timing-layer",{layerTimes:L}))},50)}if(this.listens("gpu-timing-deferred-render")){const C=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const L=this.painter.queryGpuTimeDeferredRender(C);this.fire(new o.z("gpu-timing-deferred-render",{gpuTime:L}))},50)}const A=this._sourcesDirty||this._styleDirty||this._placementDirty||x;if(A||this._repaint)this.triggerRepaint();else{const C=this.idle();if(C&&(x=this._updateAverageElevation(h,!0)),x)this.triggerRepaint();else if(this._triggerFrame(!1),C&&(this.fire(new o.z("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const L=this._calculateSpeedIndex();this.fire(new o.z("speedindexcompleted",{speedIndex:L})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||A||(this._fullyLoaded=!0,$.mark(F.fullLoad),this._performanceMetricsCollection&&ne(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(d){for(const t of this._markers)d&&!this.getRenderWorldCopies()&&(t._lngLat=t._lngLat.wrap()),t._update();for(const t of this._popups)!d||this.getRenderWorldCopies()||t._trackPointer||(t._lngLat=t._lngLat.wrap()),t._update()}_updateAverageElevation(d,t=!1){const s=m=>(this.transform.averageElevation=m,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&s(0);const h=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(h||(t||d-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(d)){const m=this.transform.averageElevation;let _=this.transform.sampleAverageElevation();this.transform.elevation!=null&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(_)?_=0:this._averageElevationLastSampledAt=d;const x=Math.abs(m-_);if(x>1){if(this._isInitialLoad||h)return this._averageElevation.jumpTo(_),s(_);this._averageElevation.easeTo(_,d,300)}else if(x>1e-4)return this._averageElevation.jumpTo(_),s(_)}return!!this._averageElevation.isEasing(d)&&s(this._averageElevation.getValue(d))}_authenticate(){de(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,d=>{if(d&&(d.message===Dt||d.status===401)){const t=this.painter.context.gl;Re(t,!1),this._logoControl instanceof Xs&&this._logoControl._updateLogo(),t&&t.clear(t.DEPTH_BUFFER_BIT|t.COLOR_BUFFER_BIT|t.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new o.y(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),B(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_postStyleLoadEvent(){this.style.globalId&&Y(this._requestManager._customAccessToken,{map:this,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_updateTerrain(){const d=this._isDragging();this.painter.updateTerrain(this.style,d)}_calculateSpeedIndex(){const d=this.painter.canvasCopy(),t=this.painter.getCanvasCopiesAndTimestamps();t.timeStamps.push(performance.now());const s=this.painter.context.gl,h=s.createFramebuffer();function m(_){s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,_,0);const x=new Uint8Array(s.drawingBufferWidth*s.drawingBufferHeight*4);return s.readPixels(0,0,s.drawingBufferWidth,s.drawingBufferHeight,s.RGBA,s.UNSIGNED_BYTE,x),x}return s.bindFramebuffer(s.FRAMEBUFFER,h),this._canvasPixelComparison(m(d),t.canvasCopies.map(m),t.timeStamps)}_canvasPixelComparison(d,t,s){let h=s[1]-s[0];const m=d.length/4;for(let _=0;_<t.length;_++){const x=t[_];let I=0;for(let A=0;A<x.length;A+=4)x[A]===d[A]&&x[A+1]===d[A+1]&&x[A+2]===d[A+2]&&x[A+3]===d[A+3]&&(I+=1);h+=(s[_+2]-s[_+1])*(1-I/m)}return h}remove(){this._hash&&this._hash.remove();for(const t of this._controls)t.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.indoor.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),window.removeEventListener("resize",this._onWindowResize,!1),window.removeEventListener("orientationchange",this._onWindowResize,!1),window.removeEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.removeEventListener("online",this._onWindowOnline,!1),window.removeEventListener("visibilitychange",this._onVisibilityChange,!1);const d=this.painter.context.gl.getExtension("WEBGL_lose_context");d&&d.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),Qe.delete(this.painter.context.gl),ie.remove(),z.remove(),this._removed=!0,this.fire(new o.z("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(d){this._renderNextFrame=this._renderNextFrame||d,this.style&&!this._frame&&(this._frame=o.o.frame(t=>{const s=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,s&&this._render(t)}))}_preloadTiles(d){const t=this.style?this.style.getSourceCaches():[];return o.bw(t,(s,h)=>s._preloadTiles(d,h),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(d){this._trackResize&&this.resize({originalEvent:d})._update()}_onVisibilityChange(){document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(d){this._showTileBoundaries!==d&&(this._showTileBoundaries=d,this._tp.refreshUI(),this._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(d){this._showParseStatus!==d&&(this._showParseStatus=d,this._tp.refreshUI(),this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(d){this._showTerrainWireframe!==d&&(this._showTerrainWireframe=d,this._tp.refreshUI(),this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(d){this._showLayers2DWireframe!==d&&(this._showLayers2DWireframe=d,this._tp.refreshUI(),this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(d){this._showLayers3DWireframe!==d&&(this._showLayers3DWireframe=d,this._tp.refreshUI(),this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(d){this._speedIndexTiming!==d&&(this._speedIndexTiming=d,this._update())}get showPadding(){return!!this._showPadding}set showPadding(d){this._showPadding!==d&&(this._showPadding=d,this._tp.refreshUI(),this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(d){this._showCollisionBoxes!==d&&(this._showCollisionBoxes=d,this._tp.refreshUI(),d?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(d){this._showOverdrawInspector!==d&&(this._showOverdrawInspector=d,this._tp.refreshUI(),this._update())}get repaint(){return!!this._repaint}set repaint(d){this._repaint!==d&&(this._repaint=d,this._tp.refreshUI(),this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(d){this._vertices=d,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(d){this._showTileAABBs!==d&&(this._showTileAABBs=d,this._tp.refreshUI(),d&&this._update())}_setCacheLimits(d,t){o.eX(d,t)}get version(){return j}},NavigationControl:class{constructor(d={}){this.options=Object.assign({},Mb,d),this._container=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(o.aY(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",t=>{this._map&&this._map.zoomIn({},{originalEvent:t})}),Ae("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",t=>{this._map&&this._map.zoomOut({},{originalEvent:t})}),Ae("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(o.aY(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",t=>{const s=this._map;s&&(this.options.visualizePitch?s.resetNorthPitch({},{originalEvent:t}):s.resetNorth({},{originalEvent:t}))}),this._compassIcon=Ae("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const d=this._map;if(!d)return;const t=d.getZoom(),s=t===d.getMaxZoom(),h=t===d.getMinZoom();this._zoomInButton.disabled=s,this._zoomOutButton.disabled=h,this._zoomInButton.setAttribute("aria-disabled",s.toString()),this._zoomOutButton.setAttribute("aria-disabled",h.toString())}_rotateCompassArrow(){const d=this._map;if(!d)return;const t=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(d.transform.pitch*(Math.PI/180)),.5)}) rotateX(${d.transform.pitch}deg) rotateZ(${d.transform.angle*(180/Math.PI)}deg)`:`rotate(${d.transform.angle*(180/Math.PI)}deg)`;d._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=t)})}onAdd(d){return this._map=d,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),d.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&d.on("pitch",this._rotateCompassArrow),d.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ib(d,this._compass,this.options.visualizePitch)),this._container}onRemove(){const d=this._map;d&&(this._container.remove(),this.options.showZoom&&d.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&d.off("pitch",this._rotateCompassArrow),d.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(d,t){const s=Ae("button",d,this._container);return s.type="button",s.addEventListener("click",t),s}_setButtonTitle(d,t){if(!this._map)return;const s=this._map._getUIString(`NavigationControl.${t}`);d.setAttribute("aria-label",s),d.firstElementChild&&d.firstElementChild.setAttribute("title",s)}},GeolocateControl:class extends o.E{constructor(d={}){super();const t=navigator.geolocation;this.options=Object.assign({geolocation:t},Xa,d),o.aY(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=Id(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(d){return this._map=d,this._container=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(d){const t=(s=!!this.options.geolocation)=>{this._supportsGeolocation=s,d(s)};this._supportsGeolocation!==void 0?d(this._supportsGeolocation):navigator.permissions!==void 0?navigator.permissions.query({name:"geolocation"}).then(s=>t(s.state!=="denied")).catch(()=>t()):t()}_isOutOfMapMaxBounds(d){const t=this._map.getMaxBounds(),s=d.coords;return!!t&&(s.longitude<t.getWest()||s.longitude>t.getEast()||s.latitude<t.getSouth()||s.latitude>t.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(d){if(this._map){if(this._isOutOfMapMaxBounds(d))return this._setErrorState(),this.fire(new o.z("outofmaxbounds",d)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=d,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(d),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(d),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new o.z("geolocate",d)),this._finish()}}_updateCamera(d){const t=new o.aR(d.coords.longitude,d.coords.latitude),s=d.coords.accuracy,h=this._map.getBearing(),m=Object.assign({bearing:h},this.options.fitBoundsOptions);this._map.fitBounds(t.toBounds(s),m,{geolocateSource:!0})}_updateMarker(d){if(d){const t=new o.aR(d.coords.longitude,d.coords.latitude);this._accuracyCircleMarker.setLngLat(t).addTo(this._map),this._userLocationDotMarker.setLngLat(t).addTo(this._map),this._accuracy=d.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const d=this._map.transform,t=o.ce(1,d._center.lat)*d.worldSize,s=Math.ceil(2*this._accuracy*t);this._circleElement.style.width=`${s}px`,this._circleElement.style.height=`${s}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(d){if(this._map){if(this.options.trackUserLocation)if(d.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(d.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new o.z("error",d)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(d){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",t=>t.preventDefault()),this._geolocateButton=Ae("button","mapboxgl-ctrl-geolocate",this._container),Ae("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",d===!1){o.w("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}else{const t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",t),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=Ae("div","mapboxgl-user-location"),this._dotElement.appendChild(Ae("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(Ae("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new kl({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=Ae("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new kl({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",t=>{t.geolocateSource||this._watchState!=="ACTIVE_LOCK"||t.originalEvent&&t.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new o.z("trackuserlocationend")))})}}_onDeviceOrientation(d){this._userLocationDotMarker&&(d.webkitCompassHeading?this._heading=d.webkitCompassHeading:d.absolute===!0&&(this._heading=-1*d.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return o.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new o.z("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new o.z("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new o.z("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let d;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(d={maximumAge:6e5,timeout:0},this._noTimeout=!0):(d=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,d),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=window.setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const d=()=>{"ondeviceorientationabsolute"in window?window.addEventListener("deviceorientationabsolute",this._onDeviceOrientation):window.addEventListener("deviceorientation",this._onDeviceOrientation)};typeof DeviceMotionEvent<"u"&&typeof DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(t=>{t==="granted"&&d()}).catch(console.error):d()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),window.removeEventListener("deviceorientation",this._onDeviceOrientation),window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Nu,ScaleControl:class{constructor(d={}){this.options=Object.assign({},da,d),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}}(),o.aY(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const d=this.options.maxWidth||100,t=this._map,s=t._containerHeight/2,h=t._containerWidth/2-d/2,m=t.unproject([h,s]),_=t.unproject([h+d,s]),x=m.distanceTo(_);if(this.options.unit==="imperial"){const I=3.2808*x;I>5280?this._setScale(d,I/5280,"mile"):this._setScale(d,I,"foot")}else this.options.unit==="nautical"?this._setScale(d,x/1852,"nautical-mile"):x>=1e3?this._setScale(d,x/1e3,"kilometer"):this._setScale(d,x,"meter")}_setScale(d,t,s){this._map._requestDomTask(()=>{const h=function(_){const x=Math.pow(10,`${Math.floor(_)}`.length-1);let I=_/x;return I=I>=10?10:I>=5?5:I>=3?3:I>=2?2:I>=1?1:function(A){const C=Math.pow(10,Math.ceil(-Math.log(A)/Math.LN10));return Math.round(A*C)/C}(I),x*I}(t),m=h/t;this._container.innerHTML=this._isNumberFormatSupported&&s!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:s}).format(h):`${h} ${fa[s]}`,this._container.style.width=d*m+"px"})}onAdd(d){return this._map=d,this._language=d.getLanguage(),this._container=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-scale",d.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(d){this._language=d,this._update()}setUnit(d){this.options.unit=d,this._update()}},FullscreenControl:class{constructor(d={}){this._fullscreen=!1,d&&d.container&&(d.container instanceof HTMLElement?this._container=d.container:o.w("Full screen control 'container' must be a DOM element.")),o.aY(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(d){return this._map=d,this._container||(this._container=this._map.getContainer()),this._controlContainer=Ae("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",o.w("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}_setupUI(){const d=this._fullscreenButton=Ae("button","mapboxgl-ctrl-fullscreen",this._controlContainer);Ae("span","mapboxgl-ctrl-icon",d).setAttribute("aria-hidden","true"),d.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const d=this._getTitle();this._fullscreenButton.setAttribute("aria-label",d),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",d)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(document.fullscreenElement||document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},IndoorControl:Lu,Popup:class extends o.E{constructor(d){super(),this.options=Object.assign(Object.create(Pl),d),this._altitude=this.options.altitude,o.aY(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(d&&d.className?d.className.trim().split(/\s+/):[])}addTo(d){return this._map&&this.remove(),this._map=d,this.options.closeOnClick&&d.on("preclick",this._onClose),this.options.closeOnMove&&d.on("move",this._onClose),d.on("remove",this.remove),this._update(),d._addPopup(this),this._focusFirstElement(),this._trackPointer?(d.on("mousemove",this._onMouseEvent),d.on("mouseup",this._onMouseEvent),d._canvasContainer.classList.add("mapboxgl-track-pointer")):d.on("move",this._update),this.fire(new o.z("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const d=this._map;return d&&(d.off("move",this._update),d.off("move",this._onClose),d.off("preclick",this._onClose),d.off("click",this._onClose),d.off("remove",this.remove),d.off("mousemove",this._onMouseEvent),d.off("mouseup",this._onMouseEvent),d.off("drag",this._onMouseEvent),d._canvasContainer&&d._canvasContainer.classList.remove("mapboxgl-track-pointer"),d._removePopup(this),this._map=void 0),this.fire(new o.z("close")),this}getLngLat(){return this._lngLat}setLngLat(d){this._lngLat=o.aR.convert(d),this._pos=null,this._trackPointer=!1,this._update();const t=this._map;return t&&(t.on("move",this._update),t.off("mousemove",this._onMouseEvent),t._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}getAltitude(){return this._altitude}setAltitude(d){return this._altitude=d,this._update(),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const d=this._map;return d&&(d.off("move",this._update),d.on("mousemove",this._onMouseEvent),d.on("drag",this._onMouseEvent),d._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(d){return this.setDOMContent(document.createTextNode(d))}setHTML(d){const t=document.createDocumentFragment(),s=document.createElement("body");let h;for(s.innerHTML=d;h=s.firstChild,h;)t.appendChild(h);return this.setDOMContent(t)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(d){return this.options.maxWidth=d,this._update(),this}setDOMContent(d){let t=this._content;if(t)for(;t.hasChildNodes();)t.firstChild&&t.removeChild(t.firstChild);else t=this._content=Ae("div","mapboxgl-popup-content",this._container||void 0);if(t.appendChild(d),this.options.closeButton){const s=this._closeButton=Ae("button","mapboxgl-popup-close-button",t);s.type="button",s.setAttribute("aria-label","Close popup"),s.innerHTML='<span aria-hidden="true">×</span>',s.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(d){return this._classList.add(d),this._updateClassList(),this}removeClassName(d){return this._classList.delete(d),this._updateClassList(),this}setOffset(d){return this.options.offset=d,this._update(),this}toggleClassName(d){let t;return this._classList.delete(d)?t=!1:(this._classList.add(d),t=!0),this._updateClassList(),t}_onMouseEvent(d){this._update(d.point)}_getAnchor(d){if(this.options.anchor)return this.options.anchor;const t=this._map,s=this._container,h=this._pos;if(!t||!s||!h)return"bottom";const m=s.offsetWidth,_=s.offsetHeight,x=h.x<m/2,I=h.x>t.transform.width-m/2;if(h.y+d<_)return x?"top-left":I?"top-right":"top";if(h.y>t.transform.height-_){if(x)return"bottom-left";if(I)return"bottom-right"}return x?"left":I?"right":"bottom"}_updateClassList(){const d=this._container;if(!d)return;const t=[...this._classList];t.push("mapboxgl-popup"),this._anchor&&t.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&t.push("mapboxgl-popup-track-pointer"),d.className=t.join(" ")}_update(d){const t=this._map,s=this._content;if(!t||!this._lngLat&&!this._trackPointer||!s)return;let h=this._container;if(h||(h=this._container=Ae("div","mapboxgl-popup",t.getContainer()),this._tip=Ae("div","mapboxgl-popup-tip",h),h.appendChild(s)),this.options.maxWidth&&h.style.maxWidth!==this.options.maxWidth&&(h.style.maxWidth=this.options.maxWidth),t.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Od(this._lngLat,this._pos,t.transform)),!this._trackPointer||d){const m=this._pos=this._trackPointer&&d instanceof o.P?d:t.project(this._lngLat,this._altitude),_=by(this.options.offset),x=this._anchor=this._getAnchor(_.y),I=by(this.options.offset,x),A=m.add(I).round();t._requestDomTask(()=>{this._container&&x&&(this._container.style.transform=`${ku[x]} translate(${A.x}px,${A.y}px)`)})}if(!this._marker&&t._showingGlobe()){const m=o.eY(t.transform,this._lngLat)?0:1;this._setOpacity(m)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const d=this._container.querySelector(Bs);d&&d.focus()}_onClose(){this.remove()}_setOpacity(d){this._container&&(this._container.style.opacity=`${d}`),this._content&&(this._content.style.pointerEvents=d?"auto":"none")}},Marker:kl,Style:Ms,LngLat:o.aR,LngLatBounds:o.aI,Point:o.P,MercatorCoordinate:o.ae,FreeCameraOptions:ip,Evented:o.E,config:o.e,prewarm:o.f0,clearPrewarmedResources:o.e$,get accessToken(){return o.e.ACCESS_TOKEN},set accessToken(d){o.e.ACCESS_TOKEN=d},get baseApiUrl(){return o.e.API_URL},set baseApiUrl(d){o.e.API_URL=d},get workerCount(){return o.f9.workerCount},set workerCount(d){o.f9.workerCount=d},get maxParallelImageRequests(){return o.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(d){o.e.MAX_PARALLEL_IMAGE_REQUESTS=d},clearStorage(d){o.f8(d)},get workerUrl(){return o.f7.workerUrl},set workerUrl(d){o.f7.workerUrl=d},get workerClass(){return o.f7.workerClass},set workerClass(d){o.f7.workerClass=d},get workerParams(){return o.f7.workerParams},set workerParams(d){o.f7.workerParams=d},get dracoUrl(){return o.f6()},set dracoUrl(d){o.f5(d)},get meshoptUrl(){return o.f4()},set meshoptUrl(d){o.f3(d)},setNow:o.o.setNow,restoreNow:o.o.restoreNow}});var D=y;return D})})(OD);var B$=OD.exports;const jD=m_(B$),pq="",gq="",mq="",F$=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{opacity:.12,d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",fill:"white",style:{fill:"white",fillOpacity:1}}),en.createElement("path",{d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",stroke:"white",style:{stroke:"white",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),U$=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{opacity:.12,d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",fill:"#6B7280",style:{fill:"#6B7280",fill:"color(display-p3 0.4196 0.4471 0.5020)",fillOpacity:1}}),en.createElement("path",{d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",stroke:"#6B7280",style:{stroke:"#6B7280",stroke:"color(display-p3 0.4196 0.4471 0.5020)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),V$=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{opacity:.12,d:"M12 12L21 7V16.0586C21 16.4012 21 16.5725 20.9495 16.7253C20.9049 16.8605 20.8318 16.9846 20.7354 17.0893C20.6263 17.2076 20.4766 17.2908 20.177 17.4572L12.777 21.5683C12.4934 21.7259 12.3516 21.8047 12.2015 21.8355C12.0685 21.8629 11.9315 21.8629 11.7986 21.8355C11.6484 21.8047 11.5066 21.7259 11.223 21.5683L3.82297 17.4572C3.52345 17.2908 3.37369 17.2076 3.26463 17.0893C3.16816 16.9846 3.09515 16.8605 3.05048 16.7253C3 16.5725 3 16.4012 3 16.0586V7L12 12Z",fill:"white",style:{fill:"white",fillOpacity:1}}),en.createElement("path",{d:"M20.5 7.27783L12 12.0001M12 12.0001L3.49997 7.27783M12 12.0001V21.5001M21 16.0586V7.94153C21 7.59889 21 7.42757 20.9495 7.27477C20.9049 7.13959 20.8318 7.01551 20.7354 6.91082C20.6263 6.79248 20.4766 6.70928 20.177 6.54288L12.777 2.43177C12.4934 2.27421 12.3516 2.19543 12.2015 2.16454C12.0685 2.13721 11.9315 2.13721 11.7986 2.16454C11.6484 2.19543 11.5066 2.27421 11.223 2.43177L3.82297 6.54288C3.52345 6.70928 3.37369 6.79248 3.26463 6.91082C3.16816 7.01551 3.09515 7.13959 3.05048 7.27477C3 7.42757 3 7.59889 3 7.94153V16.0586C3 16.4013 3 16.5726 3.05048 16.7254C3.09515 16.8606 3.16816 16.9847 3.26463 17.0893C3.37369 17.2077 3.52345 17.2909 3.82297 17.4573L11.223 21.5684C11.5066 21.726 11.6484 21.8047 11.7986 21.8356C11.9315 21.863 12.0685 21.863 12.2015 21.8356C12.3516 21.8047 12.4934 21.726 12.777 21.5684L20.177 17.4573C20.4766 17.2909 20.6263 17.2077 20.7354 17.0893C20.8318 16.9847 20.9049 16.8606 20.9495 16.7254C21 16.5726 21 16.4013 21 16.0586Z",stroke:"white",style:{stroke:"white",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Q$=r=>en.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},en.createElement("path",{opacity:.12,d:"M12 12L21 7V16.0586C21 16.4012 21 16.5725 20.9495 16.7253C20.9049 16.8605 20.8318 16.9846 20.7354 17.0893C20.6263 17.2076 20.4766 17.2908 20.177 17.4572L12.777 21.5683C12.4934 21.7259 12.3516 21.8047 12.2015 21.8355C12.0685 21.8629 11.9315 21.8629 11.7986 21.8355C11.6484 21.8047 11.5066 21.7259 11.223 21.5683L3.82297 17.4572C3.52345 17.2908 3.37369 17.2076 3.26463 17.0893C3.16816 16.9846 3.09515 16.8605 3.05048 16.7253C3 16.5725 3 16.4012 3 16.0586V7L12 12Z",fill:"#6B7280",style:{fill:"#6B7280",fill:"color(display-p3 0.4196 0.4471 0.5020)",fillOpacity:1}}),en.createElement("path",{d:"M20.5 7.27783L12 12.0001M12 12.0001L3.49997 7.27783M12 12.0001V21.5001M21 16.0586V7.94153C21 7.59889 21 7.42757 20.9495 7.27477C20.9049 7.13959 20.8318 7.01551 20.7354 6.91082C20.6263 6.79248 20.4766 6.70928 20.177 6.54288L12.777 2.43177C12.4934 2.27421 12.3516 2.19543 12.2015 2.16454C12.0685 2.13721 11.9315 2.13721 11.7986 2.16454C11.6484 2.19543 11.5066 2.27421 11.223 2.43177L3.82297 6.54288C3.52345 6.70928 3.37369 6.79248 3.26463 6.91082C3.16816 7.01551 3.09515 7.13959 3.05048 7.27477C3 7.42757 3 7.59889 3 7.94153V16.0586C3 16.4013 3 16.5726 3.05048 16.7254C3.09515 16.8606 3.16816 16.9847 3.26463 17.0893C3.37369 17.2077 3.52345 17.2909 3.82297 17.4573L11.223 21.5684C11.5066 21.726 11.6484 21.8047 11.7986 21.8356C11.9315 21.863 12.0685 21.863 12.2015 21.8356C12.3516 21.8047 12.4934 21.726 12.777 21.5684L20.177 17.4573C20.4766 17.2909 20.6263 17.2077 20.7354 17.0893C20.8318 16.9847 20.9049 16.8606 20.9495 16.7254C21 16.5726 21 16.4013 21 16.0586Z",stroke:"#6B7280",style:{stroke:"#6B7280",stroke:"color(display-p3 0.4196 0.4471 0.5020)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Cs=Object.freeze({initial3D:"initial3D",clicked3D:"clicked3D",clicked2D:"clicked2D"});kD.propTypes={mapView:et.object,pitch:et.number,solution:et.object,reset:et.number,activeColor:et.string,show2DModelsIn3D:et.string};function kD({mapView:r,pitch:a,reset:c,activeColor:f="#005655",show2DModelsIn3D:y}){const[w,D]=Ce.useState(Cs.initial3D),o=document.querySelector(".viewmode-switch-portal"),j=()=>y==="true";return Ce.useEffect(()=>{c&&D(Cs.initial3D)},[c]),Ce.useEffect(()=>{r&&new Promise($=>{r.isReady?$():r.on("ready",()=>{$()})}).then(()=>{switch(w){case Cs.clicked2D:r.tilt(0,2e3),r.hideFeatures([r.FeatureType.MODEL3D,r.FeatureType.WALLS3D,r.FeatureType.EXTRUSION3D,r.FeatureType.EXTRUDEDBUILDINGS]);break;case Cs.initial3D:r.tilt(Lr(a)?45:a,2e3),r.hideFeatures([...j()?[]:[r.FeatureType.MODEL2D],r.FeatureType.WALLS2D]);break;case Cs.clicked3D:r.tilt(45,2e3),r.hideFeatures([...j()?[]:[r.FeatureType.MODEL2D],r.FeatureType.WALLS2D]);break}})},[w,r]),o?os.createPortal(Be.jsxs("div",{className:"view-mode-switch",children:[Be.jsx("button",{className:"view-mode-switch__button",onClick:()=>D(Cs.clicked2D),style:{backgroundColor:w===Cs.clicked2D?f:"white"},children:w===Cs.clicked2D?Be.jsx(F$,{}):Be.jsx(U$,{})}),Be.jsx("button",{className:"view-mode-switch__button",onClick:()=>D(Cs.clicked3D),style:{backgroundColor:[Cs.initial3D,Cs.clicked3D].includes(w)?f:"white"},children:[Cs.initial3D,Cs.clicked3D].includes(w)?Be.jsx(V$,{}):Be.jsx(Q$,{})})]}),o):null}PD.propTypes={accessToken:et.string.isRequired,onInitialized:et.func.isRequired,center:et.object,zoom:et.number,bounds:et.object,bearing:et.number,pitch:et.number,resetViewMode:et.number,mapsIndoorsInstance:et.object,viewModeSwitchVisible:et.bool,mapOptions:et.object,appConfig:et.object};function PD({accessToken:r,onInitialized:a,center:c,zoom:f,bounds:y,bearing:w,pitch:D,resetViewMode:o,mapsIndoorsInstance:j,viewModeSwitchVisible:F,mapOptions:$,appConfig:oe}){var We;const[te,ge]=Ce.useState(),[xe,Ae]=Ce.useState(!1),it=_v();return Ce.useEffect(()=>{te&&(Lr(y)?(Lr(c)||te.getMap().setCenter(c),Lr(f)||te.getMap().setZoom(f),Lr(w)||te.getMap().setBearing(w),Lr(D)||te.getMap().setPitch(D)):te.getMap().fitBounds([y.west,y.south,y.east,y.north],{pitch:D||0,bearing:w||0,animate:!1,padding:$==null?void 0:$.fitBoundsPadding}))},[te,c,f,w,D,y,$]),Ce.useEffect(()=>{j&&te&&!xe&&it&&(te.getMap().addControl(new jD.NavigationControl({showCompass:!1}),"bottom-right"),Ae(!0))},[j,te,xe]),Ce.useEffect(()=>{window.mapboxgl=jD;const me={accessToken:r,element:document.getElementById("map"),center:c??{lat:0,lng:0},zoom:f??15,bounds:y?[y.west,y.south,y.east,y.north]:void 0,bearing:w??0,pitch:D??0,useMapsIndoorsMapboxStyle:!($!=null&&$.mapboxMapStyle),...$};$!=null&&$.miTransitionLevel&&!isNaN(parseInt($==null?void 0:$.miTransitionLevel))&&(me.mapsIndoorsTransitionLevel=parseInt($.miTransitionLevel)),Lr($==null?void 0:$.showRoadNames)||(me.showRoadNameLabels=$.showRoadNames),Lr($==null?void 0:$.showMapMarkers)||(me.showMapMarkers=$.showMapMarkers);const ce=new window.mapsindoors.mapView.MapboxV3View(me);ge(ce),!Lr($==null?void 0:$.mapboxMapStyle)&&!me.useMapsIndoorsMapboxStyle&&ce.getMap().setStyle($.mapboxMapStyle),a(ce)},[]),Be.jsx("div",{className:"mapsindoors-map mapbox-map-container",id:"map",children:F&&Be.jsx(kD,{reset:o,mapView:te,pitch:D,activeColor:$==null?void 0:$.brandingColor,show2DModelsIn3D:(We=oe==null?void 0:oe.appSettings)==null?void 0:We.show2DModelsIn3D})})}const H$=Object.freeze(Object.defineProperty({__proto__:null,default:PD},Symbol.toStringTag,{value:"Module"}));function $$(r,a,c,f){function y(w){return w instanceof c?w:new c(function(D){D(w)})}return new(c||(c=Promise))(function(w,D){function o($){try{F(f.next($))}catch(oe){D(oe)}}function j($){try{F(f.throw($))}catch(oe){D(oe)}}function F($){$.done?w($.value):y($.value).then(o,j)}F((f=f.apply(r,a||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function Y$(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var G$=function r(a,c){if(a===c)return!0;if(a&&c&&typeof a=="object"&&typeof c=="object"){if(a.constructor!==c.constructor)return!1;var f,y,w;if(Array.isArray(a)){if(f=a.length,f!=c.length)return!1;for(y=f;y--!==0;)if(!r(a[y],c[y]))return!1;return!0}if(a.constructor===RegExp)return a.source===c.source&&a.flags===c.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===c.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===c.toString();if(w=Object.keys(a),f=w.length,f!==Object.keys(c).length)return!1;for(y=f;y--!==0;)if(!Object.prototype.hasOwnProperty.call(c,w[y]))return!1;for(y=f;y--!==0;){var D=w[y];if(!r(a[D],c[D]))return!1}return!0}return a!==a&&c!==c},Z$=Y$(G$);const RD="__googleMapsScriptId";var Ih;(function(r){r[r.INITIALIZED=0]="INITIALIZED",r[r.LOADING=1]="LOADING",r[r.SUCCESS=2]="SUCCESS",r[r.FAILURE=3]="FAILURE"})(Ih||(Ih={}));class Xc{constructor({apiKey:a,authReferrerPolicy:c,channel:f,client:y,id:w=RD,language:D,libraries:o=[],mapIds:j,nonce:F,region:$,retries:oe=3,url:te="https://maps.googleapis.com/maps/api/js",version:ge}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=a,this.authReferrerPolicy=c,this.channel=f,this.client=y,this.id=w||RD,this.language=D,this.libraries=o,this.mapIds=j,this.nonce=F,this.region=$,this.retries=oe,this.url=te,this.version=ge,Xc.instance){if(!Z$(this.options,Xc.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Xc.instance.options)}`);return Xc.instance}Xc.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Ih.FAILURE:this.done?Ih.SUCCESS:this.loading?Ih.LOADING:Ih.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let a=this.url;return a+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(a+=`&key=${this.apiKey}`),this.channel&&(a+=`&channel=${this.channel}`),this.client&&(a+=`&client=${this.client}`),this.libraries.length>0&&(a+=`&libraries=${this.libraries.join(",")}`),this.language&&(a+=`&language=${this.language}`),this.region&&(a+=`®ion=${this.region}`),this.version&&(a+=`&v=${this.version}`),this.mapIds&&(a+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(a+=`&auth_referrer_policy=${this.authReferrerPolicy}`),a}deleteScript(){const a=document.getElementById(this.id);a&&a.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((a,c)=>{this.loadCallback(f=>{f?c(f.error):a(window.google)})})}importLibrary(a){return this.execute(),google.maps.importLibrary(a)}loadCallback(a){this.callbacks.push(a),this.execute()}setScript(){var a,c;if(document.getElementById(this.id)){this.callback();return}const f={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(f).forEach(w=>!f[w]&&delete f[w]),!((c=(a=window==null?void 0:window.google)===null||a===void 0?void 0:a.maps)===null||c===void 0)&&c.importLibrary||(w=>{let D,o,j,F="The Google Maps JavaScript API",$="google",oe="importLibrary",te="__ib__",ge=document,xe=window;xe=xe[$]||(xe[$]={});const Ae=xe.maps||(xe.maps={}),it=new Set,We=new URLSearchParams,me=()=>D||(D=new Promise((ce,pe)=>$$(this,void 0,void 0,function*(){var ve;yield o=ge.createElement("script"),o.id=this.id,We.set("libraries",[...it]+"");for(j in w)We.set(j.replace(/[A-Z]/g,De=>"_"+De[0].toLowerCase()),w[j]);We.set("callback",$+".maps."+te),o.src=this.url+"?"+We,Ae[te]=ce,o.onerror=()=>D=pe(Error(F+" could not load.")),o.nonce=this.nonce||((ve=ge.querySelector("script[nonce]"))===null||ve===void 0?void 0:ve.nonce)||"",ge.head.append(o)})));Ae[oe]?console.warn(F+" only loads once. Ignoring:",w):Ae[oe]=(ce,...pe)=>it.add(ce)&&me().then(()=>Ae[oe](ce,...pe))})(f);const y=this.libraries.map(w=>this.importLibrary(w));y.length||y.push(this.importLibrary("core")),Promise.all(y).then(()=>this.callback(),w=>{const D=new ErrorEvent("error",{error:w});this.loadErrorCallback(D)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(a){if(this.errors.push(a),this.errors.length<=this.retries){const c=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${c} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},c)}else this.onerrorEvent=a,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(a=>{a(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading=!0,this.setScript()}}}const yq="";BD.propTypes={apiKey:et.string.isRequired,onInitialized:et.func.isRequired,center:et.object,zoom:et.number,bounds:et.object,heading:et.number,tilt:et.number,mapsIndoorsInstance:et.object,mapOptions:et.object,gmMapId:et.string};function BD({apiKey:r,onInitialized:a,center:c,zoom:f,bounds:y,heading:w,tilt:D,mapsIndoorsInstance:o,mapOptions:j,gmMapId:F}){const[$,oe]=Ce.useState(),[te,ge]=Ce.useState(),[xe,Ae]=Ce.useState(!1),it=_v();return Ce.useEffect(()=>{te&&(Lr(y)||o.getMapView().fitBounds(y,j==null?void 0:j.fitBoundsPadding),!Lr(c)&&Lr(y)&&te.getMap().setCenter(c),!Lr(f)&&Lr(y)&&te.getMap().setZoom(f),Lr(w)||te.getMap().setHeading(w),Lr(D)||te.getMap().setTilt(D))},[te,c,f,w,D,y,j]),Ce.useEffect(()=>{o&&te&&$&&!xe&&it&&(te.getMap().setOptions({zoomControl:!0,zoomControlOptions:{style:$.maps.ZoomControlStyle.DEFAULT,position:$.maps.ControlPosition.RIGHT_BOTTOM}}),Ae(!0))},[o,te,$]),Ce.useEffect(()=>{new Xc({apiKey:r,version:"quarterly",libraries:["geometry","places"]}).load().then(me=>{oe(me);const ce={element:document.getElementById("map"),disableDefaultUI:!0,center:c??{lat:0,lng:0},zoom:f??21,heading:w??0,tilt:D??0,mapId:F,gestureHandling:"greedy",...j};Lr(j==null?void 0:j.showMapMarkers)||(ce.showMapMarkers=j.showMapMarkers);const pe=new window.mapsindoors.mapView.GoogleMapsView(ce);ge(pe),a(pe)})},[]),Be.jsx("div",{className:"mapsindoors-map google-maps-map-container",id:"map"})}const W$=Object.freeze(Object.defineProperty({__proto__:null,default:BD},Symbol.toStringTag,{value:"Module"}));return MI});
|
|
3206
3206
|
//# sourceMappingURL=mapsindoors-react.umd.js.map
|