@twinmatrix/spatialverse-sdk-rn 0.2.1 → 0.2.2

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/lib/cjs/index.js CHANGED
@@ -1,13 +1,13 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react-native-geolocation-service"),t=require("react-native"),r=require("react"),n=require("@maplibre/maplibre-react-native"),i=require("axios"),o=require("react-native-mmkv"),a=require("react-native-aes-crypto"),l=require("react-native-fs"),s=require("react-native-zip-archive"),u=require("@react-native-community/netinfo");function c(e){return e&&e.__esModule?e:{default:e}}var h=c(e),f=c(r),p=c(i),d=c(a),g=c(l),m=c(u),y=function(){return y=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},y.apply(this,arguments)};function v(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,l)}s((n=n.apply(e,t||[])).next())})}function w(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}function b(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function x(e,t,r){return t=A(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,z()?Reflect.construct(t,r||[],A(e).constructor):t.apply(e,r))}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,C(n.key),n)}}function j(e,t,r){return t&&P(e.prototype,t),r&&P(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e,t,r){return(t=C(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function E(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}function z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(z=function(){return!!e})()}function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}function L(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}"function"==typeof SuppressedError&&SuppressedError;var R=function(){function e(e,t,r){this.gpsEnabled=!1,this.gpsWatchId=null,this.currentGPSPosition=null,this.gpsCallbacks={},this.trackUserLocation=!0,this.outOfFocus=!1,this.cameraRef=e,this.getFocusTree=t,this.onGPSUpdate=r}return e.prototype.requestGPSPermission=function(){return v(this,void 0,void 0,function(){var e,r,n,i,o;return w(this,function(a){switch(a.label){case 0:return a.trys.push([0,9,,10]),"android"!==t.Platform.OS?[3,4]:(e=t.PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,r=t.PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION,[4,t.PermissionsAndroid.check(e)]);case 1:return n=a.sent(),[4,t.PermissionsAndroid.check(r)];case 2:return i=a.sent(),n||i?[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}]:[4,t.PermissionsAndroid.request(e)];case 3:return(o=a.sent())===t.PermissionsAndroid.RESULTS.GRANTED?[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}]:o===t.PermissionsAndroid.RESULTS.DENIED?[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}]:[2,{granted:!1,denied:!0,prompt:!1,state:"denied"}];case 4:if(!h.default.requestAuthorization)return[3,8];a.label=5;case 5:return a.trys.push([5,7,,8]),[4,h.default.requestAuthorization("whenInUse")];case 6:switch(o=a.sent()){case"granted":return[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}];case"denied":return[2,{granted:!1,denied:!0,prompt:!1,state:"denied"}];case"disabled":case"restricted":return[2,{granted:!1,denied:!0,prompt:!1,state:"blocked"}];default:return[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}]}return[3,8];case 7:return a.sent(),[2,{granted:!1,denied:!0,prompt:!1,state:"denied"}];case 8:return[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}];case 9:return a.sent(),[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}];case 10:return[2]}})})},e.prototype.isGPSPermissionGranted=function(){return v(this,void 0,void 0,function(){return w(this,function(e){switch(e.label){case 0:return[4,this.requestGPSPermission()];case 1:return[2,e.sent().granted]}})})},e.prototype.enableGPS=function(e){return void 0===e&&(e={}),v(this,void 0,void 0,function(){var t,r,n;return w(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.callbacks&&e.callbacks!==this.gpsCallbacks&&(this.gpsCallbacks=e.callbacks),[4,this.isGPSPermissionGranted()];case 1:if(!i.sent())throw{type:"permission_denied",message:"GPS permission is required to enable location services."};return[4,this.getGPSPosition(e)];case 2:return t=i.sent(),r=this.isPositionWithinCAGBounds(t.coordinates),this.startGPS(e),r?[2,{success:!0}]:[2,{success:!0,warning:{type:"outside_bounds",message:"You are currently outside of operational boundaries. GPS functionality may be limited.",position:t}}];case 3:return n=i.sent(),this.handleGPSError(n),[2,{success:!1,warning:{type:"unavailable",message:"Failed to enable GPS due to an unexpected error."}}];case 4:return[2]}})})},e.prototype.focusToGPS=function(e){return void 0===e&&(e={}),v(this,void 0,void 0,function(){var t,r,n,i,o,a,l;return w(this,function(s){if(t=e.zoom,r=void 0===t?18:t,n=e.duration,i=void 0===n?1e3:n,o=e.flyToLocation,a=void 0===o||o,this.outOfFocus=!1,!this.currentGPSPosition)throw{type:"unavailable",message:"Unable to determine current location. GPS may not be available."};return l=this.currentGPSPosition.coordinates,a&&this.cameraRef.current&&this.cameraRef.current.setStop({center:l,zoom:r,duration:i,easing:"ease"}),[2,{success:!0}]})})},e.prototype.disableGPS=function(){var e;if(null!==this.gpsWatchId){try{h.default.clearWatch(this.gpsWatchId)}catch(e){}this.gpsWatchId=null}this.gpsEnabled=!1,this.outOfFocus=!1,this.trackUserLocation=!0,this.currentGPSPosition=null,this.onGPSUpdate(null),(null===(e=this.gpsCallbacks)||void 0===e?void 0:e.onToggle)&&this.gpsCallbacks.onToggle(!1)},e.prototype.destroyGPS=function(){this.disableGPS(),this.gpsCallbacks={}},e.prototype.startGPS=function(e){var t=this;void 0===e&&(e={});var r=e.flyToLocation,n=void 0===r||r,i=e.zoom,o=void 0===i?18:i,a=e.enableHighAccuracy,l=void 0===a||a,s=e.timeout,u=void 0===s?1e4:s,c=e.maximumAge,f=void 0===c?0:c,p=e.trackUserLocation,d=void 0===p||p;if(!h.default||!h.default.watchPosition){var g=new Error("Geolocation is not supported by this runtime.");throw g.code=0,g}this.gpsEnabled=!0,this.trackUserLocation=d,this.outOfFocus=!1;var m={enableHighAccuracy:l,timeout:u,maximumAge:f,distanceFilter:0,interval:100,fastestInterval:10};this.gpsWatchId=h.default.watchPosition(function(e){t.handleGPSLocationUpdate(e,{flyToLocation:!!t.trackUserLocation&&(n&&!t.outOfFocus),zoom:o})},function(e){t.handleGPSError(e)},m)},e.prototype.stopGPS=function(){if(this.gpsEnabled=!1,null!==this.gpsWatchId){try{h.default.clearWatch(this.gpsWatchId)}catch(e){}this.gpsWatchId=null}},e.prototype.handleGPSLocationUpdate=function(e,t){var r,n;void 0===t&&(t={});var i=t.flyToLocation,o=void 0!==i&&i,a=t.zoom,l=void 0===a?16:a,s=[e.coords.longitude,e.coords.latitude];this.currentGPSPosition={coordinates:s,accuracy:e.coords.accuracy,timestamp:e.timestamp||Date.now(),heading:null!==(r=e.coords.heading)&&void 0!==r?r:void 0,speed:null!==(n=e.coords.speed)&&void 0!==n?n:void 0},this.onGPSUpdate(this.currentGPSPosition),o&&this.focusToGPS({zoom:l,flyToLocation:o}).catch(function(){}),this.gpsCallbacks.onLocationUpdate&&this.gpsCallbacks.onLocationUpdate(this.currentGPSPosition)},e.prototype.handleGPSError=function(e){var t="Unknown GPS error occurred.";if(e&&"number"==typeof e.code)switch(e.code){case 1:t="GPS permission denied by user.";break;case 2:t="GPS position unavailable.";break;case 3:t="GPS request timed out."}this.gpsCallbacks.onError&&this.gpsCallbacks.onError(e,t)},e.prototype.isPositionWithinCAGBounds=function(e){var t,r=this.getFocusTree();if(!r||"object"!==T(r))return!1;for(var n=e[0],i=e[1],o=0,a=Object.keys(r);o<a.length;o++){var l=r[a[o]],s=null==l?void 0:l.bounds;if(s&&Array.isArray(s))try{if(2===s.length&&Array.isArray(s[0])&&"number"==typeof s[0][0]&&Array.isArray(s[1])&&"number"==typeof s[1][0]&&!Array.isArray(s[0][0])){var u=s[0],c=s[1];if(n>=u[0]&&n<=c[0]&&i>=u[1]&&i<=c[1])return!0;continue}var h=Array.isArray(null===(t=s[0])||void 0===t?void 0:t[0])?s[0]:s;if(!Array.isArray(h)||h.length<3)continue;for(var f=1/0,p=1/0,d=-1/0,g=-1/0,m=0,y=h;m<y.length;m++){var v=y[m];Array.isArray(v)&&"number"==typeof v[0]&&(f=Math.min(f,v[0]),p=Math.min(p,v[1]),d=Math.max(d,v[0]),g=Math.max(g,v[1]))}if(Number.isFinite(f)&&n>=f&&n<=d&&i>=p&&i<=g)return!0}catch(e){continue}}return!1},e.prototype.getGPSPosition=function(e){var t=this;void 0===e&&(e={});var r=e.enableHighAccuracy,n=void 0===r||r,i=e.timeout,o=void 0===i?1e4:i,a=e.maximumAge,l=void 0===a?15e3:a;return new Promise(function(e,r){h.default&&h.default.getCurrentPosition?h.default.getCurrentPosition(function(r){var n,i,o={coordinates:[r.coords.longitude,r.coords.latitude],accuracy:r.coords.accuracy,timestamp:r.timestamp||Date.now(),heading:null!==(n=r.coords.heading)&&void 0!==n?n:void 0,speed:null!==(i=r.coords.speed)&&void 0!==i?i:void 0};t.onGPSUpdate(o),e(o)},function(e){return r(e)},{enableHighAccuracy:n,timeout:o,maximumAge:l}):r(new Error("Geolocation is not supported by this runtime."))})},e.prototype.isGPSEnabled=function(){return this.gpsEnabled},e.prototype.isGPSAutoFocusEnabled=function(){return this.gpsEnabled&&!this.outOfFocus},e.prototype.isOutOfFocus=function(){return this.outOfFocus},e.prototype.setOutOfFocus=function(e){var t;this.outOfFocus=e,(null===(t=this.gpsCallbacks)||void 0===t?void 0:t.onToggle)&&this.gpsCallbacks.onToggle(!e)},e.prototype.getCurrentGPSPosition=function(){return this.currentGPSPosition},e}(),B=function(e){var t=e.position,i=e.showAccuracy,o=void 0===i||i,a=e.pulse,l=void 0===a||a,s=r.useState(0),u=s[0],c=s[1],h=r.useRef(null);r.useEffect(function(){if(l){var e=Date.now(),t=function(){var r=(Date.now()-e)%2e3,n=.5*Math.sin(r/2e3*Math.PI*2)+.5;c(n),h.current=requestAnimationFrame(t)};return h.current=requestAnimationFrame(t),function(){h.current&&cancelAnimationFrame(h.current),h.current=null}}},[l]);var p=r.useMemo(function(){return t?{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:t.coordinates},properties:{radius:8,accuracy:t.accuracy}}]}:{type:"FeatureCollection",features:[]}},[t]);if(!t)return null;var d=l?8+9.6*u:8,g=l?function(e,t,r){return Math.max(t,Math.min(r,e))}(.9*(1-.7*u),.2,.9):.95;return f.default.createElement(f.default.Fragment,null,f.default.createElement(n.ShapeSource,{id:"gps-source",shape:p},o?f.default.createElement(n.CircleLayer,{id:"gps-accuracy",style:{circleColor:"#1E90FF",circleOpacity:.2,circleRadius:["*",["get","accuracy"],.6],circleStrokeColor:"#1E90FF",circleStrokeWidth:1}}):null,f.default.createElement(n.CircleLayer,{id:"gps-pulse",style:{circleColor:"#b7d8f7",circleOpacity:g,circleRadius:d,circleStrokeColor:"#b7d8f7",circleStrokeWidth:2}}),f.default.createElement(n.CircleLayer,{id:"gps-dot",style:{circleColor:"#1E90FF",circleOpacity:.95,circleRadius:6,circleStrokeColor:"#ffffff",circleStrokeWidth:2}})))},I=6371008.8,N={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:I,metres:I,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function D(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function U(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!V(e[0])||!V(e[1]))throw new Error("coordinates must contain numbers");return D({type:"Point",coordinates:e},t,r)}function G(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return D({type:"LineString",coordinates:e},t,r)}function W(e,t,r){return void 0===r&&(r={}),D({type:"MultiPoint",coordinates:e},t,r)}function q(e){return e%360*Math.PI/180}function V(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function $(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function J(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Y(e,t,r){void 0===r&&(r={});var n=$(e),i=$(t),o=q(i[1]-n[1]),a=q(i[0]-n[0]),l=q(n[1]),s=q(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(l)*Math.cos(s);return function(e,t){void 0===t&&(t="kilometers");var r=N[t];if(!r)throw new Error(t+" units is invalid");return e*r}(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),r.units)}function X(e,t,r){if(null!==e)for(var n,i,o,a,l,s,u,c,h=0,f=0,p=e.type,d="FeatureCollection"===p,g="Feature"===p,m=d?e.features.length:1,y=0;y<m;y++){l=(c=!!(u=d?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var v=0;v<l;v++){var w=0,b=0;if(null!==(a=c?u.geometries[v]:u)){s=a.coordinates;var _=a.type;switch(h=!r||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(s,f,y,w,b))return!1;f++,w++;break;case"LineString":case"MultiPoint":for(n=0;n<s.length;n++){if(!1===t(s[n],f,y,w,b))return!1;f++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(n=0;n<s.length;n++){for(i=0;i<s[n].length-h;i++){if(!1===t(s[n][i],f,y,w,b))return!1;f++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(n=0;n<s.length;n++){for(b=0,i=0;i<s[n].length;i++){for(o=0;o<s[n][i].length-h;o++){if(!1===t(s[n][i][o],f,y,w,b))return!1;f++}b++}w++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===X(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function H(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return K(e);case"FeatureCollection":return function(e){var t={type:"FeatureCollection"};return Object.keys(e).forEach(function(r){switch(r){case"type":case"features":return;default:t[r]=e[r]}}),t.features=e.features.map(function(e){return K(e)}),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return Q(e);default:throw new Error("unknown GeoJSON type")}}function K(e){var t={type:"Feature"};return Object.keys(e).forEach(function(r){switch(r){case"type":case"properties":case"geometry":return;default:t[r]=e[r]}}),t.properties=Z(e.properties),t.geometry=Q(e.geometry),t}function Z(e){var t={};return e?(Object.keys(e).forEach(function(r){var n=e[r];"object"==typeof n?null===n?t[r]=null:Array.isArray(n)?t[r]=n.map(function(e){return e}):t[r]=Z(n):t[r]=n}),t):t}function Q(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map(function(e){return Q(e)}),t):(t.coordinates=ee(e.coordinates),t)}function ee(e){var t=e;return"object"!=typeof t[0]?t.slice():t.map(function(e){return ee(e)})}var te=6371008.8,re={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:te,metres:te,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function ne(e){return e%360*Math.PI/180}function ie(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return function(e,t){void 0===t&&(t="kilometers");var r=re[t];if(!r)throw new Error(t+" units is invalid");return e*r}(function(e,t){void 0===t&&(t="kilometers");var r=re[t];if(!r)throw new Error(t+" units is invalid");return e/r}(e,t),r)}function oe(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function ae(e,t,r,n){void 0===n&&(n={});var i=t<0,o=ie(Math.abs(t),n.units,"meters");i&&(o=-Math.abs(o));var a=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),l=function(e,t,r,n){n=void 0===n?te:Number(n);var i=t/n,o=e[0]*Math.PI/180,a=ne(e[1]),l=ne(r),s=i*Math.cos(l),u=a+s;Math.abs(u)>Math.PI/2&&(u=u>0?Math.PI-u:-Math.PI-u);var c=Math.log(Math.tan(u/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(c)>1e-11?s/c:Math.cos(a),f=i*Math.sin(l)/h;return[(180*(o+f)/Math.PI+540)%360-180,180*u/Math.PI]}(a,o,r);return l[0]+=l[0]-a[0]>180?-360:a[0]-l[0]>180?360:0,function(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!oe(e[0])||!oe(e[1]))throw new Error("coordinates must contain numbers");return function(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}({type:"Point",coordinates:e},t,r)}(l,n.properties)}function le(e,t,r,n){if(!(i=n=n||{})||i.constructor!==Object)throw new Error("options is invalid");var i,o=n.units,a=n.zTranslation,l=n.mutate;if(!e)throw new Error("geojson is required");if(null==t||isNaN(t))throw new Error("distance is required");if(a&&"number"!=typeof a&&isNaN(a))throw new Error("zTranslation is not a number");if(a=void 0!==a?a:0,0===t&&0===a)return e;if(null==r||isNaN(r))throw new Error("direction is required");return t<0&&(t=-t,r+=180),!1!==l&&void 0!==l||(e=H(e)),X(e,function(e){var n=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(ae(e,t,r,{units:o}));e[0]=n[0],e[1]=n[1],a&&3===e.length&&(e[2]+=a)}),e}var se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ce=function(){this.__data__=[],this.size=0};var he=function(e,t){return e===t||e!=e&&t!=t},fe=he;var pe=function(e,t){for(var r=e.length;r--;)if(fe(e[r][0],t))return r;return-1},de=pe,ge=Array.prototype.splice;var me=pe;var ye=pe;var ve=pe;var we=ce,be=function(e){var t=this.__data__,r=de(t,e);return!(r<0)&&(r==t.length-1?t.pop():ge.call(t,r,1),--this.size,!0)},_e=function(e){var t=this.__data__,r=me(t,e);return r<0?void 0:t[r][1]},xe=function(e){return ye(this.__data__,e)>-1},Se=function(e,t){var r=this.__data__,n=ve(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Pe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Pe.prototype.clear=we,Pe.prototype.delete=be,Pe.prototype.get=_e,Pe.prototype.has=xe,Pe.prototype.set=Se;var je=Pe,ke=je;var Ae=function(){this.__data__=new ke,this.size=0};var Ee=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var ze=function(e){return this.__data__.get(e)};var Me=function(e){return this.__data__.has(e)},Oe="object"==typeof se&&se&&se.Object===Object&&se,Fe=Oe,Le="object"==typeof self&&self&&self.Object===Object&&self,Ce=Fe||Le||Function("return this")(),Te=Ce.Symbol,Re=Te,Be=Object.prototype,Ie=Be.hasOwnProperty,Ne=Be.toString,De=Re?Re.toStringTag:void 0;var Ue=function(e){var t=Ie.call(e,De),r=e[De];try{e[De]=void 0;var n=!0}catch(e){}var i=Ne.call(e);return n&&(t?e[De]=r:delete e[De]),i},Ge=Object.prototype.toString;var We=Ue,qe=function(e){return Ge.call(e)},Ve=Te?Te.toStringTag:void 0;var $e=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ve&&Ve in Object(e)?We(e):qe(e)};var Je=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Ye=$e,Xe=Je;var He,Ke=function(e){if(!Xe(e))return!1;var t=Ye(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Ze=Ce["__core-js_shared__"],Qe=(He=/[^.]+$/.exec(Ze&&Ze.keys&&Ze.keys.IE_PROTO||""))?"Symbol(src)_1."+He:"";var et=function(e){return!!Qe&&Qe in e},tt=Function.prototype.toString;var rt=function(e){if(null!=e){try{return tt.call(e)}catch(e){}try{return e+""}catch(e){}}return""},nt=Ke,it=et,ot=Je,at=rt,lt=/^\[object .+?Constructor\]$/,st=Function.prototype,ut=Object.prototype,ct=st.toString,ht=ut.hasOwnProperty,ft=RegExp("^"+ct.call(ht).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var pt=function(e){return!(!ot(e)||it(e))&&(nt(e)?ft:lt).test(at(e))},dt=function(e,t){return null==e?void 0:e[t]};var gt=function(e,t){var r=dt(e,t);return pt(r)?r:void 0},mt=gt(Ce,"Map"),yt=gt(Object,"create"),vt=yt;var wt=function(){this.__data__=vt?vt(null):{},this.size=0};var bt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},_t=yt,xt=Object.prototype.hasOwnProperty;var St=function(e){var t=this.__data__;if(_t){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return xt.call(t,e)?t[e]:void 0},Pt=yt,jt=Object.prototype.hasOwnProperty;var kt=yt;var At=wt,Et=bt,zt=St,Mt=function(e){var t=this.__data__;return Pt?void 0!==t[e]:jt.call(t,e)},Ot=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=kt&&void 0===t?"__lodash_hash_undefined__":t,this};function Ft(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ft.prototype.clear=At,Ft.prototype.delete=Et,Ft.prototype.get=zt,Ft.prototype.has=Mt,Ft.prototype.set=Ot;var Lt=Ft,Ct=je,Tt=mt;var Rt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Bt=function(e,t){var r=e.__data__;return Rt(t)?r["string"==typeof t?"string":"hash"]:r.map},It=Bt;var Nt=Bt;var Dt=Bt;var Ut=Bt;var Gt=function(){this.size=0,this.__data__={hash:new Lt,map:new(Tt||Ct),string:new Lt}},Wt=function(e){var t=It(this,e).delete(e);return this.size-=t?1:0,t},qt=function(e){return Nt(this,e).get(e)},Vt=function(e){return Dt(this,e).has(e)},$t=function(e,t){var r=Ut(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Jt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Jt.prototype.clear=Gt,Jt.prototype.delete=Wt,Jt.prototype.get=qt,Jt.prototype.has=Vt,Jt.prototype.set=$t;var Yt=je,Xt=mt,Ht=Jt;var Kt=je,Zt=Ae,Qt=Ee,er=ze,tr=Me,rr=function(e,t){var r=this.__data__;if(r instanceof Yt){var n=r.__data__;if(!Xt||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ht(n)}return r.set(e,t),this.size=r.size,this};function nr(e){var t=this.__data__=new Kt(e);this.size=t.size}nr.prototype.clear=Zt,nr.prototype.delete=Qt,nr.prototype.get=er,nr.prototype.has=tr,nr.prototype.set=rr;var ir=nr;var or=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},ar=gt,lr=function(){try{var e=ar(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var sr=function(e,t,r){"__proto__"==t&&lr?lr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},ur=sr,cr=he,hr=Object.prototype.hasOwnProperty;var fr=function(e,t,r){var n=e[t];hr.call(e,t)&&cr(n,r)&&(void 0!==r||t in e)||ur(e,t,r)},pr=fr,dr=sr;var gr=function(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var l=t[o],s=n?n(r[l],e[l],l,r,e):void 0;void 0===s&&(s=e[l]),i?dr(r,l,s):pr(r,l,s)}return r};var mr=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var yr=function(e){return null!=e&&"object"==typeof e},vr=$e,wr=yr;var br=function(e){return wr(e)&&"[object Arguments]"==vr(e)},_r=yr,xr=Object.prototype,Sr=xr.hasOwnProperty,Pr=xr.propertyIsEnumerable,jr=br(function(){return arguments}())?br:function(e){return _r(e)&&Sr.call(e,"callee")&&!Pr.call(e,"callee")},kr=Array.isArray,Ar={};var Er=function(){return!1};!function(e,t){var r=Ce,n=Er,i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||n;e.exports=l}({get exports(){return Ar},set exports(e){Ar=e}},Ar);var zr=/^(?:0|[1-9]\d*)$/;var Mr=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&zr.test(e))&&e>-1&&e%1==0&&e<t};var Or=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Fr=$e,Lr=Or,Cr=yr,Tr={};Tr["[object Float32Array]"]=Tr["[object Float64Array]"]=Tr["[object Int8Array]"]=Tr["[object Int16Array]"]=Tr["[object Int32Array]"]=Tr["[object Uint8Array]"]=Tr["[object Uint8ClampedArray]"]=Tr["[object Uint16Array]"]=Tr["[object Uint32Array]"]=!0,Tr["[object Arguments]"]=Tr["[object Array]"]=Tr["[object ArrayBuffer]"]=Tr["[object Boolean]"]=Tr["[object DataView]"]=Tr["[object Date]"]=Tr["[object Error]"]=Tr["[object Function]"]=Tr["[object Map]"]=Tr["[object Number]"]=Tr["[object Object]"]=Tr["[object RegExp]"]=Tr["[object Set]"]=Tr["[object String]"]=Tr["[object WeakMap]"]=!1;var Rr=function(e){return Cr(e)&&Lr(e.length)&&!!Tr[Fr(e)]};var Br=function(e){return function(t){return e(t)}},Ir={};!function(e,t){var r=Oe,n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,o=i&&i.exports===n&&r.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a}({get exports(){return Ir},set exports(e){Ir=e}},Ir);var Nr=Rr,Dr=Br,Ur=Ir&&Ir.isTypedArray,Gr=Ur?Dr(Ur):Nr,Wr=mr,qr=jr,Vr=kr,$r=Ar,Jr=Mr,Yr=Gr,Xr=Object.prototype.hasOwnProperty;var Hr=function(e,t){var r=Vr(e),n=!r&&qr(e),i=!r&&!n&&$r(e),o=!r&&!n&&!i&&Yr(e),a=r||n||i||o,l=a?Wr(e.length,String):[],s=l.length;for(var u in e)!t&&!Xr.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Jr(u,s))||l.push(u);return l},Kr=Object.prototype;var Zr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Kr)};var Qr=function(e,t){return function(r){return e(t(r))}},en=Qr(Object.keys,Object),tn=Zr,rn=en,nn=Object.prototype.hasOwnProperty;var on=Ke,an=Or;var ln=function(e){return null!=e&&an(e.length)&&!on(e)},sn=Hr,un=function(e){if(!tn(e))return rn(e);var t=[];for(var r in Object(e))nn.call(e,r)&&"constructor"!=r&&t.push(r);return t},cn=ln;var hn=function(e){return cn(e)?sn(e):un(e)},fn=gr,pn=hn;var dn=function(e,t){return e&&fn(t,pn(t),e)};var gn=Je,mn=Zr,yn=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},vn=Object.prototype.hasOwnProperty;var wn=Hr,bn=function(e){if(!gn(e))return yn(e);var t=mn(e),r=[];for(var n in e)("constructor"!=n||!t&&vn.call(e,n))&&r.push(n);return r},_n=ln;var xn=function(e){return _n(e)?wn(e,!0):bn(e)},Sn=gr,Pn=xn;var jn=function(e,t){return e&&Sn(t,Pn(t),e)},kn={};!function(e,t){var r=Ce,n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,o=i&&i.exports===n?r.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}}({get exports(){return kn},set exports(e){kn=e}},kn);var An=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var En=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o};var zn=function(){return[]},Mn=En,On=zn,Fn=Object.prototype.propertyIsEnumerable,Ln=Object.getOwnPropertySymbols,Cn=Ln?function(e){return null==e?[]:(e=Object(e),Mn(Ln(e),function(t){return Fn.call(e,t)}))}:On,Tn=gr,Rn=Cn;var Bn=function(e,t){return Tn(e,Rn(e),t)};var In=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e},Nn=Qr(Object.getPrototypeOf,Object),Dn=In,Un=Nn,Gn=Cn,Wn=zn,qn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Dn(t,Gn(e)),e=Un(e);return t}:Wn,Vn=gr,$n=qn;var Jn=function(e,t){return Vn(e,$n(e),t)},Yn=In,Xn=kr;var Hn=function(e,t,r){var n=t(e);return Xn(e)?n:Yn(n,r(e))},Kn=Hn,Zn=Cn,Qn=hn;var ei=function(e){return Kn(e,Qn,Zn)},ti=Hn,ri=qn,ni=xn;var ii=function(e){return ti(e,ni,ri)},oi=gt(Ce,"DataView"),ai=mt,li=gt(Ce,"Promise"),si=gt(Ce,"Set"),ui=gt(Ce,"WeakMap"),ci=$e,hi=rt,fi="[object Map]",pi="[object Promise]",di="[object Set]",gi="[object WeakMap]",mi="[object DataView]",yi=hi(oi),vi=hi(ai),wi=hi(li),bi=hi(si),_i=hi(ui),xi=ci;(oi&&xi(new oi(new ArrayBuffer(1)))!=mi||ai&&xi(new ai)!=fi||li&&xi(li.resolve())!=pi||si&&xi(new si)!=di||ui&&xi(new ui)!=gi)&&(xi=function(e){var t=ci(e),r="[object Object]"==t?e.constructor:void 0,n=r?hi(r):"";if(n)switch(n){case yi:return mi;case vi:return fi;case wi:return pi;case bi:return di;case _i:return gi}return t});var Si=xi,Pi=Object.prototype.hasOwnProperty;var ji=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Pi.call(e,"index")&&(r.index=e.index,r.input=e.input),r},ki=Ce.Uint8Array;var Ai=function(e){var t=new e.constructor(e.byteLength);return new ki(t).set(new ki(e)),t},Ei=Ai;var zi=function(e,t){var r=t?Ei(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},Mi=/\w*$/;var Oi=function(e){var t=new e.constructor(e.source,Mi.exec(e));return t.lastIndex=e.lastIndex,t},Fi=Te?Te.prototype:void 0,Li=Fi?Fi.valueOf:void 0;var Ci=Ai;var Ti=function(e,t){var r=t?Ci(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},Ri=Ai,Bi=zi,Ii=Oi,Ni=function(e){return Li?Object(Li.call(e)):{}},Di=Ti;var Ui=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Ri(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return Bi(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Di(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return Ii(e);case"[object Symbol]":return Ni(e)}},Gi=Je,Wi=Object.create,qi=function(){function e(){}return function(t){if(!Gi(t))return{};if(Wi)return Wi(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Vi=Nn,$i=Zr;var Ji=function(e){return"function"!=typeof e.constructor||$i(e)?{}:qi(Vi(e))},Yi=Si,Xi=yr;var Hi=function(e){return Xi(e)&&"[object Map]"==Yi(e)},Ki=Br,Zi=Ir&&Ir.isMap,Qi=Zi?Ki(Zi):Hi,eo=Si,to=yr;var ro=function(e){return to(e)&&"[object Set]"==eo(e)},no=Br,io=Ir&&Ir.isSet,oo=io?no(io):ro,ao=ir,lo=or,so=fr,uo=dn,co=jn,ho=kn,fo=An,po=Bn,go=Jn,mo=ei,yo=ii,vo=Si,wo=ji,bo=Ui,_o=Ji,xo=kr,So=Ar,Po=Qi,jo=Je,ko=oo,Ao=hn,Eo=xn,zo="[object Arguments]",Mo="[object Function]",Oo="[object Object]",Fo={};Fo[zo]=Fo["[object Array]"]=Fo["[object ArrayBuffer]"]=Fo["[object DataView]"]=Fo["[object Boolean]"]=Fo["[object Date]"]=Fo["[object Float32Array]"]=Fo["[object Float64Array]"]=Fo["[object Int8Array]"]=Fo["[object Int16Array]"]=Fo["[object Int32Array]"]=Fo["[object Map]"]=Fo["[object Number]"]=Fo[Oo]=Fo["[object RegExp]"]=Fo["[object Set]"]=Fo["[object String]"]=Fo["[object Symbol]"]=Fo["[object Uint8Array]"]=Fo["[object Uint8ClampedArray]"]=Fo["[object Uint16Array]"]=Fo["[object Uint32Array]"]=!0,Fo["[object Error]"]=Fo[Mo]=Fo["[object WeakMap]"]=!1;var Lo=function e(t,r,n,i,o,a){var l,s=1&r,u=2&r,c=4&r;if(n&&(l=o?n(t,i,o,a):n(t)),void 0!==l)return l;if(!jo(t))return t;var h=xo(t);if(h){if(l=wo(t),!s)return fo(t,l)}else{var f=vo(t),p=f==Mo||"[object GeneratorFunction]"==f;if(So(t))return ho(t,s);if(f==Oo||f==zo||p&&!o){if(l=u||p?{}:_o(t),!s)return u?go(t,co(l,t)):po(t,uo(l,t))}else{if(!Fo[f])return o?t:{};l=bo(t,f,s)}}a||(a=new ao);var d=a.get(t);if(d)return d;a.set(t,l),ko(t)?t.forEach(function(i){l.add(e(i,r,n,i,t,a))}):Po(t)&&t.forEach(function(i,o){l.set(o,e(i,r,n,o,t,a))});var g=h?void 0:(c?u?yo:mo:u?Eo:Ao)(t);return lo(g||t,function(i,o){g&&(i=t[o=i]),so(l,o,e(i,r,n,o,t,a))}),l},Co=Lo;var To=function(e){return Co(e,5)},Ro=Object.getPrototypeOf(t.Animated.ValueXY);__DEV__&&"AnimatedWithChildren"!==Ro.name&&console.error("AnimatedCoordinatesArray could not obtain AnimatedWithChildren base class");var Bo={useNativeDriver:!1},Io=function(){function e(){var t,r;return S(this,e),(r=x(this,e)).state=(t=r).onInitialState.apply(t,arguments),r}return E(e,Ro),j(e,[{key:"onInitialState",value:function(e){return{coords:e.map(function(e){return[e[0],e[1]]})}}},{key:"onGetValue",value:function(e){return e.coords}},{key:"onCalculate",value:function(e,t){var r=e.coords,n=e.targetCoords,i=t,o=1-i,a=Math.min(r.length,n.length),l=r.slice(0,a).map(function(e,t){return[e[0]*o+n[t][0]*i,e[1]*o+n[t][1]*i]});if(n.length>r.length){var s=r.length>0?r[r.length-1]:n[0],u=n.slice(a,n.length).map(function(e){return[s[0]*o+e[0]*i,s[1]*o+e[1]*i]});return{coords:[].concat(L(l),L(u)),targetCoords:n}}if(r.length>n.length){var c=n.length>0?n[n.length-1]:r[0],h=r.slice(a,r.length).map(function(e){return[e[0]*o+c[0]*i,e[1]*o+c[1]*i]});return{coords:[].concat(L(l),L(h)),targetCoords:n}}return{coords:l,targetCoords:n}}},{key:"onStart",value:function(e,t){var r=t.map(function(e){return[e[0],e[1]]});return O(O({},e),{},{targetCoords:r})}},{key:"animate",value:function(e,t,r){var n=this,i=r.toValue,o=t.start,a=t;return a.start=function(){var r;r=t,n.progressValue=e,n.progressValue.__addChild(n),n.animation=r,n.state=n.onStart(n.state,i),o.apply(void 0,arguments)},a}},{key:"timing",value:function(e){var r=new t.Animated.Value(1);return this.animate(r,t.Animated.loop(t.Animated.timing(r,O(O(O({},Bo),e),{},{toValue:0}))),e)}},{key:"spring",value:function(e){var r=new t.Animated.Value(0);return this.animate(r,t.Animated.spring(r,O(O(O({},Bo),e),{},{toValue:1})),e)}},{key:"decay",value:function(e){var r=new t.Animated.Value(0);return this.animate(r,t.Animated.decay(this.progressValue,O(O(O({},Bo),e),{},{toValue:1})),e)}},{key:"__getValue",value:function(){return this.progressValue?this.onGetValue(this.onCalculate(this.state,this.progressValue.__getValue())):this.onGetValue(this.state)}},{key:"destroy",value:function(){if(this.animation){var e=this.progressValue.__getValue();this.animation.stop(),this.state=this.onCalculate(this.state,e),this.progressValue.__removeChild(this),this.progressValue=null,this.animation=null}}}])}();function No(e){return e%360*Math.PI/180}function Do(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Uo(e,t,r){if(void 0===r&&(r={}),!0===r.final)return function(e,t){var r=Uo(t,e);return r=(r+180)%360}(e,t);var n=Do(e),i=Do(t),o=No(n[0]),a=No(i[0]),l=No(n[1]),s=No(i[1]),u=Math.sin(a-o)*Math.cos(s),c=Math.cos(l)*Math.sin(s)-Math.sin(l)*Math.cos(s)*Math.cos(a-o);return Math.atan2(u,c)%(2*Math.PI)*180/Math.PI}var Go=6371008.8,Wo={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:Go,metres:Go,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function qo(e){return 180*(e%(2*Math.PI))/Math.PI}function Vo(e){return e%360*Math.PI/180}function $o(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Jo(e,t,r,n){void 0===n&&(n={});var i=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),o=Vo(i[0]),a=Vo(i[1]),l=Vo(r),s=function(e,t){void 0===t&&(t="kilometers");var r=Wo[t];if(!r)throw new Error(t+" units is invalid");return e/r}(t,n.units),u=Math.asin(Math.sin(a)*Math.cos(s)+Math.cos(a)*Math.sin(s)*Math.cos(l));return function(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!$o(e[0])||!$o(e[1]))throw new Error("coordinates must contain numbers");return function(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}({type:"Point",coordinates:e},t,r)}([qo(o+Math.atan2(Math.sin(l)*Math.sin(s)*Math.cos(a),Math.cos(s)-Math.sin(a)*Math.sin(u))),qo(u)],n.properties)}function Yo(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function Xo(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function Ho(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Ko(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Zo(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function Qo(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function ea(e,t){!function(e,t){var r,n,i,o,a,l,s,u,c,h,f=0,p="FeatureCollection"===e.type,d="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(l=p?e.features[r].geometry:d?e.geometry:e,u=p?e.features[r].properties:d?e.properties:{},c=p?e.features[r].bbox:d?e.bbox:void 0,h=p?e.features[r].id:d?e.id:void 0,a=(s=!!l&&"GeometryCollection"===l.type)?l.geometries.length:1,i=0;i<a;i++)if(null!==(o=s?l.geometries[i]:l))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,f,u,c,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,u,c,h))return!1;f++}}(e,function(e,r,n,i,o){var a,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Zo(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var s=0;s<e.coordinates.length;s++){var u=e.coordinates[s];if(!1===t(Zo({type:a,coordinates:u},n),r,s))return!1}})}function ta(e){if(!e)throw new Error("geojson is required");var t=[];return ea(e,function(e){!function(e,t){var r=[],n=e.geometry;if(null!==n){switch(n.type){case"Polygon":r=Qo(n);break;case"LineString":r=[Qo(n)]}r.forEach(function(r){var n=function(e,t){var r=[];return e.reduce(function(e,n){var i,o,a,l,s,u,c=function(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Zo({type:"LineString",coordinates:e},t,r)}([e,n],t);return c.bbox=(o=n,a=(i=e)[0],l=i[1],s=o[0],u=o[1],[a<s?a:s,l<u?l:u,a>s?a:s,l>u?l:u]),r.push(c),n}),r}(r,e.properties);n.forEach(function(e){e.id=t.length,t.push(e)})})}}(e,t)}),function(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}(t)}function ra(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}var na={},ia={get exports(){return na},set exports(e){na=e}};function oa(e,t,r,n,i){aa(e,t,r||0,n||e.length-1,i||sa)}function aa(e,t,r,n,i){for(;n>r;){if(n-r>600){var o=n-r+1,a=t-r+1,l=Math.log(o),s=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*s*(o-s)/o)*(a-o/2<0?-1:1);aa(e,t,Math.max(r,Math.floor(t-a*s/o+u)),Math.min(n,Math.floor(t+(o-a)*s/o+u)),i)}var c=e[t],h=r,f=n;for(la(e,r,t),i(e[n],c)>0&&la(e,r,n);h<f;){for(la(e,h,f),h++,f--;i(e[h],c)<0;)h++;for(;i(e[f],c)>0;)f--}0===i(e[r],c)?la(e,r,f):la(e,++f,n),f<=t&&(r=f+1),t<=f&&(n=f-1)}}function la(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function sa(e,t){return e<t?-1:e>t?1:0}function ua(e,t,r){if(!r)return t.indexOf(e);for(let n=0;n<t.length;n++)if(r(e,t[n]))return n;return-1}function ca(e,t){ha(e,0,e.children.length,t,e)}function ha(e,t,r,n,i){i||(i=_a(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o=t;o<r;o++){const t=e.children[o];fa(i,e.leaf?n(t):t)}return i}function fa(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function pa(e,t){return e.minX-t.minX}function da(e,t){return e.minY-t.minY}function ga(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function ma(e){return e.maxX-e.minX+(e.maxY-e.minY)}function ya(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function va(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function wa(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function ba(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _a(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function xa(e,t,r,n,i){const o=[t,r];for(;o.length;){if((r=o.pop())-(t=o.pop())<=n)continue;const a=t+Math.ceil((r-t)/n/2)*n;oa(e,a,t,r,i),o.push(t,a,a,r)}}var Sa={};!function(e){function t(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function r(e,r,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(e[0])||!f(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},r,n)}function n(e,r,n){void 0===n&&(n={});for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var l=0;l<a[a.length-1].length;l++)if(a[a.length-1][l]!==a[0][l])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},r,n)}function i(e,r,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},r,n)}function o(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function a(e,r,n){return void 0===n&&(n={}),t({type:"MultiLineString",coordinates:e},r,n)}function l(e,r,n){return void 0===n&&(n={}),t({type:"MultiPoint",coordinates:e},r,n)}function s(e,r,n){return void 0===n&&(n={}),t({type:"MultiPolygon",coordinates:e},r,n)}function u(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t*n}function c(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t/n}function h(e){return 180*(e%(2*Math.PI))/Math.PI}function f(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={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},e.feature=t,e.geometry=function(e,t,o){switch(e){case"Point":return r(t).geometry;case"LineString":return i(t).geometry;case"Polygon":return n(t).geometry;case"MultiPoint":return l(t).geometry;case"MultiLineString":return a(t).geometry;case"MultiPolygon":return s(t).geometry;default:throw new Error(e+" is invalid")}},e.point=r,e.points=function(e,t,n){return void 0===n&&(n={}),o(e.map(function(e){return r(e,t)}),n)},e.polygon=n,e.polygons=function(e,t,r){return void 0===r&&(r={}),o(e.map(function(e){return n(e,t)}),r)},e.lineString=i,e.lineStrings=function(e,t,r){return void 0===r&&(r={}),o(e.map(function(e){return i(e,t)}),r)},e.featureCollection=o,e.multiLineString=a,e.multiPoint=l,e.multiPolygon=s,e.geometryCollection=function(e,r,n){return void 0===n&&(n={}),t({type:"GeometryCollection",geometries:e},r,n)},e.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},e.radiansToLength=u,e.lengthToRadians=c,e.lengthToDegrees=function(e,t){return h(c(e,t))},e.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},e.radiansToDegrees=h,e.degreesToRadians=function(e){return e%360*Math.PI/180},e.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(c(e,t),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var o=e.areaFactors[n];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=f,e.isObject=function(e){return!!e&&e.constructor===Object},e.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(e){if(!f(e))throw new Error("bbox must only contain numbers")})},e.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}}(Sa);var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});var ja=Sa;function ka(e,t,r){if(null!==e)for(var n,i,o,a,l,s,u,c,h=0,f=0,p=e.type,d="FeatureCollection"===p,g="Feature"===p,m=d?e.features.length:1,y=0;y<m;y++){l=(c=!!(u=d?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var v=0;v<l;v++){var w=0,b=0;if(null!==(a=c?u.geometries[v]:u)){s=a.coordinates;var _=a.type;switch(h=!r||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(s,f,y,w,b))return!1;f++,w++;break;case"LineString":case"MultiPoint":for(n=0;n<s.length;n++){if(!1===t(s[n],f,y,w,b))return!1;f++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(n=0;n<s.length;n++){for(i=0;i<s[n].length-h;i++){if(!1===t(s[n][i],f,y,w,b))return!1;f++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(n=0;n<s.length;n++){for(b=0,i=0;i<s[n].length;i++){for(o=0;o<s[n][i].length-h;o++){if(!1===t(s[n][i][o],f,y,w,b))return!1;f++}b++}w++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===ka(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Aa(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&!1!==t(e.features[r].properties,r);r++);break;case"Feature":t(e.properties,0)}}function Ea(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function za(e,t){var r,n,i,o,a,l,s,u,c,h,f=0,p="FeatureCollection"===e.type,d="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(l=p?e.features[r].geometry:d?e.geometry:e,u=p?e.features[r].properties:d?e.properties:{},c=p?e.features[r].bbox:d?e.bbox:void 0,h=p?e.features[r].id:d?e.id:void 0,a=(s=!!l&&"GeometryCollection"===l.type)?l.geometries.length:1,i=0;i<a;i++)if(null!==(o=s?l.geometries[i]:l))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,f,u,c,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,u,c,h))return!1;f++}}function Ma(e,t){za(e,function(e,r,n,i,o){var a,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(ja.feature(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var s=0;s<e.coordinates.length;s++){var u={type:a,coordinates:e.coordinates[s]};if(!1===t(ja.feature(u,n),r,s))return!1}})}function Oa(e,t){Ma(e,function(e,r,n){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,l=0,s=0,u=0;return!1!==ka(e,function(o,c,h,f,p){if(void 0===a||r>l||f>s||p>u)return a=o,l=r,s=f,u=p,void(i=0);var d=ja.lineString([a,o],e.properties);if(!1===t(d,r,n,p,i))return!1;i++,a=o})&&void 0}}})}function Fa(e,t){if(!e)throw new Error("geojson is required");Ma(e,function(e,r,n){if(null!==e.geometry){var i=e.geometry.type,o=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,r,n,0,0))return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(!1===t(ja.lineString(o[a],e.properties),r,n,a))return!1}}})}Pa.coordAll=function(e){var t=[];return ka(e,function(e){t.push(e)}),t},Pa.coordEach=ka,Pa.coordReduce=function(e,t,r,n){var i=r;return ka(e,function(e,n,o,a,l){i=0===n&&void 0===r?e:t(i,e,n,o,a,l)},n),i},Pa.featureEach=Ea,Pa.featureReduce=function(e,t,r){var n=r;return Ea(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n},Pa.findPoint=function(e,t){if(t=t||{},!ja.isObject(t))throw new Error("options is invalid");var r,n=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.coordIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":n<0&&(n=e.features.length+n),l=l||e.features[n].properties,r=e.features[n].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var s=r.coordinates;switch(r.type){case"Point":return ja.point(s,l,t);case"MultiPoint":return i<0&&(i=s.length+i),ja.point(s[i],l,t);case"LineString":return a<0&&(a=s.length+a),ja.point(s[a],l,t);case"Polygon":return o<0&&(o=s.length+o),a<0&&(a=s[o].length+a),ja.point(s[o][a],l,t);case"MultiLineString":return i<0&&(i=s.length+i),a<0&&(a=s[i].length+a),ja.point(s[i][a],l,t);case"MultiPolygon":return i<0&&(i=s.length+i),o<0&&(o=s[i].length+o),a<0&&(a=s[i][o].length-a),ja.point(s[i][o][a],l,t)}throw new Error("geojson is invalid")},Pa.findSegment=function(e,t){if(t=t||{},!ja.isObject(t))throw new Error("options is invalid");var r,n=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.segmentIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":n<0&&(n=e.features.length+n),l=l||e.features[n].properties,r=e.features[n].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var s=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=s.length+a-1),ja.lineString([s[a],s[a+1]],l,t);case"Polygon":return o<0&&(o=s.length+o),a<0&&(a=s[o].length+a-1),ja.lineString([s[o][a],s[o][a+1]],l,t);case"MultiLineString":return i<0&&(i=s.length+i),a<0&&(a=s[i].length+a-1),ja.lineString([s[i][a],s[i][a+1]],l,t);case"MultiPolygon":return i<0&&(i=s.length+i),o<0&&(o=s[i].length+o),a<0&&(a=s[i][o].length-a-1),ja.lineString([s[i][o][a],s[i][o][a+1]],l,t)}throw new Error("geojson is invalid")},Pa.flattenEach=Ma,Pa.flattenReduce=function(e,t,r){var n=r;return Ma(e,function(e,i,o){n=0===i&&0===o&&void 0===r?e:t(n,e,i,o)}),n},Pa.geomEach=za,Pa.geomReduce=function(e,t,r){var n=r;return za(e,function(e,i,o,a,l){n=0===i&&void 0===r?e:t(n,e,i,o,a,l)}),n},Pa.lineEach=Fa,Pa.lineReduce=function(e,t,r){var n=r;return Fa(e,function(e,i,o,a){n=0===i&&void 0===r?e:t(n,e,i,o,a)}),n},Pa.propEach=Aa,Pa.propReduce=function(e,t,r){var n=r;return Aa(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n},Pa.segmentEach=Oa,Pa.segmentReduce=function(e,t,r){var n=r,i=!1;return Oa(e,function(e,o,a,l,s){n=!1===i&&void 0===r?e:t(n,e,o,a,l,s),i=!0}),n};var La={},Ca={},Ta={};!function(e){function t(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function r(e,r,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(e[0])||!f(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},r,n)}function n(e,r,n){void 0===n&&(n={});for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var l=0;l<a[a.length-1].length;l++)if(a[a.length-1][l]!==a[0][l])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},r,n)}function i(e,r,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},r,n)}function o(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function a(e,r,n){return void 0===n&&(n={}),t({type:"MultiLineString",coordinates:e},r,n)}function l(e,r,n){return void 0===n&&(n={}),t({type:"MultiPoint",coordinates:e},r,n)}function s(e,r,n){return void 0===n&&(n={}),t({type:"MultiPolygon",coordinates:e},r,n)}function u(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t*n}function c(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t/n}function h(e){return 180*(e%(2*Math.PI))/Math.PI}function f(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={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},e.feature=t,e.geometry=function(e,t,o){switch(e){case"Point":return r(t).geometry;case"LineString":return i(t).geometry;case"Polygon":return n(t).geometry;case"MultiPoint":return l(t).geometry;case"MultiLineString":return a(t).geometry;case"MultiPolygon":return s(t).geometry;default:throw new Error(e+" is invalid")}},e.point=r,e.points=function(e,t,n){return void 0===n&&(n={}),o(e.map(function(e){return r(e,t)}),n)},e.polygon=n,e.polygons=function(e,t,r){return void 0===r&&(r={}),o(e.map(function(e){return n(e,t)}),r)},e.lineString=i,e.lineStrings=function(e,t,r){return void 0===r&&(r={}),o(e.map(function(e){return i(e,t)}),r)},e.featureCollection=o,e.multiLineString=a,e.multiPoint=l,e.multiPolygon=s,e.geometryCollection=function(e,r,n){return void 0===n&&(n={}),t({type:"GeometryCollection",geometries:e},r,n)},e.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},e.radiansToLength=u,e.lengthToRadians=c,e.lengthToDegrees=function(e,t){return h(c(e,t))},e.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},e.radiansToDegrees=h,e.degreesToRadians=function(e){return e%360*Math.PI/180},e.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(c(e,t),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var o=e.areaFactors[n];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=f,e.isObject=function(e){return!!e&&e.constructor===Object},e.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(e){if(!f(e))throw new Error("bbox must only contain numbers")})},e.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}}(Ta),Object.defineProperty(Ca,"__esModule",{value:!0});var Ra=Ta;function Ba(e,t,r){if(null!==e)for(var n,i,o,a,l,s,u,c,h=0,f=0,p=e.type,d="FeatureCollection"===p,g="Feature"===p,m=d?e.features.length:1,y=0;y<m;y++){l=(c=!!(u=d?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var v=0;v<l;v++){var w=0,b=0;if(null!==(a=c?u.geometries[v]:u)){s=a.coordinates;var _=a.type;switch(h=!r||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(s,f,y,w,b))return!1;f++,w++;break;case"LineString":case"MultiPoint":for(n=0;n<s.length;n++){if(!1===t(s[n],f,y,w,b))return!1;f++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(n=0;n<s.length;n++){for(i=0;i<s[n].length-h;i++){if(!1===t(s[n][i],f,y,w,b))return!1;f++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(n=0;n<s.length;n++){for(b=0,i=0;i<s[n].length;i++){for(o=0;o<s[n][i].length-h;o++){if(!1===t(s[n][i][o],f,y,w,b))return!1;f++}b++}w++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===Ba(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Ia(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&!1!==t(e.features[r].properties,r);r++);break;case"Feature":t(e.properties,0)}}function Na(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function Da(e,t){var r,n,i,o,a,l,s,u,c,h,f=0,p="FeatureCollection"===e.type,d="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(l=p?e.features[r].geometry:d?e.geometry:e,u=p?e.features[r].properties:d?e.properties:{},c=p?e.features[r].bbox:d?e.bbox:void 0,h=p?e.features[r].id:d?e.id:void 0,a=(s=!!l&&"GeometryCollection"===l.type)?l.geometries.length:1,i=0;i<a;i++)if(null!==(o=s?l.geometries[i]:l))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,f,u,c,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,u,c,h))return!1;f++}}function Ua(e,t){Da(e,function(e,r,n,i,o){var a,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Ra.feature(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var s=0;s<e.coordinates.length;s++){var u={type:a,coordinates:e.coordinates[s]};if(!1===t(Ra.feature(u,n),r,s))return!1}})}function Ga(e,t){Ua(e,function(e,r,n){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,l=0,s=0,u=0;return!1!==Ba(e,function(o,c,h,f,p){if(void 0===a||r>l||f>s||p>u)return a=o,l=r,s=f,u=p,void(i=0);var d=Ra.lineString([a,o],e.properties);if(!1===t(d,r,n,p,i))return!1;i++,a=o})&&void 0}}})}function Wa(e,t){if(!e)throw new Error("geojson is required");Ua(e,function(e,r,n){if(null!==e.geometry){var i=e.geometry.type,o=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,r,n,0,0))return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(!1===t(Ra.lineString(o[a],e.properties),r,n,a))return!1}}})}Ca.coordAll=function(e){var t=[];return Ba(e,function(e){t.push(e)}),t},Ca.coordEach=Ba,Ca.coordReduce=function(e,t,r,n){var i=r;return Ba(e,function(e,n,o,a,l){i=0===n&&void 0===r?e:t(i,e,n,o,a,l)},n),i},Ca.featureEach=Na,Ca.featureReduce=function(e,t,r){var n=r;return Na(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n},Ca.findPoint=function(e,t){if(t=t||{},!Ra.isObject(t))throw new Error("options is invalid");var r,n=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.coordIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":n<0&&(n=e.features.length+n),l=l||e.features[n].properties,r=e.features[n].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var s=r.coordinates;switch(r.type){case"Point":return Ra.point(s,l,t);case"MultiPoint":return i<0&&(i=s.length+i),Ra.point(s[i],l,t);case"LineString":return a<0&&(a=s.length+a),Ra.point(s[a],l,t);case"Polygon":return o<0&&(o=s.length+o),a<0&&(a=s[o].length+a),Ra.point(s[o][a],l,t);case"MultiLineString":return i<0&&(i=s.length+i),a<0&&(a=s[i].length+a),Ra.point(s[i][a],l,t);case"MultiPolygon":return i<0&&(i=s.length+i),o<0&&(o=s[i].length+o),a<0&&(a=s[i][o].length-a),Ra.point(s[i][o][a],l,t)}throw new Error("geojson is invalid")},Ca.findSegment=function(e,t){if(t=t||{},!Ra.isObject(t))throw new Error("options is invalid");var r,n=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.segmentIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":n<0&&(n=e.features.length+n),l=l||e.features[n].properties,r=e.features[n].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var s=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=s.length+a-1),Ra.lineString([s[a],s[a+1]],l,t);case"Polygon":return o<0&&(o=s.length+o),a<0&&(a=s[o].length+a-1),Ra.lineString([s[o][a],s[o][a+1]],l,t);case"MultiLineString":return i<0&&(i=s.length+i),a<0&&(a=s[i].length+a-1),Ra.lineString([s[i][a],s[i][a+1]],l,t);case"MultiPolygon":return i<0&&(i=s.length+i),o<0&&(o=s[i].length+o),a<0&&(a=s[i][o].length-a-1),Ra.lineString([s[i][o][a],s[i][o][a+1]],l,t)}throw new Error("geojson is invalid")},Ca.flattenEach=Ua,Ca.flattenReduce=function(e,t,r){var n=r;return Ua(e,function(e,i,o){n=0===i&&0===o&&void 0===r?e:t(n,e,i,o)}),n},Ca.geomEach=Da,Ca.geomReduce=function(e,t,r){var n=r;return Da(e,function(e,i,o,a,l){n=0===i&&void 0===r?e:t(n,e,i,o,a,l)}),n},Ca.lineEach=Wa,Ca.lineReduce=function(e,t,r){var n=r;return Wa(e,function(e,i,o,a){n=0===i&&void 0===r?e:t(n,e,i,o,a)}),n},Ca.propEach=Ia,Ca.propReduce=function(e,t,r){var n=r;return Ia(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n},Ca.segmentEach=Ga,Ca.segmentReduce=function(e,t,r){var n=r,i=!1;return Ga(e,function(e,o,a,l,s){n=!1===i&&void 0===r?e:t(n,e,o,a,l,s),i=!0}),n},Object.defineProperty(La,"__esModule",{value:!0});var qa=Ca;function Va(e){var t=[1/0,1/0,-1/0,-1/0];return qa.coordEach(e,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}Va.default=Va,La.default=Va;var $a=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const r=[];if(!ba(e,t))return r;const n=this.toBBox,i=[];for(;t;){for(let o=0;o<t.children.length;o++){const a=t.children[o],l=t.leaf?n(a):a;ba(e,l)&&(t.leaf?r.push(a):wa(e,l)?this._all(a,r):i.push(a))}t=i.pop()}return r}collides(e){let t=this.data;if(!ba(e,t))return!1;const r=[];for(;t;){for(let n=0;n<t.children.length;n++){const i=t.children[n],o=t.leaf?this.toBBox(i):i;if(ba(e,o)){if(t.leaf||wa(e,o))return!0;r.push(i)}}t=r.pop()}return!1}load(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(let t=0;t<e.length;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const e=this.data;this.data=t,t=e}this._insert(t,this.data.height-t.height-1,!0)}else this.data=t;return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=_a([]),this}remove(e,t){if(!e)return this;let r=this.data;const n=this.toBBox(e),i=[],o=[];let a,l,s;for(;r||i.length;){if(r||(r=i.pop(),l=i[i.length-1],a=o.pop(),s=!0),r.leaf){const n=ua(e,r.children,t);if(-1!==n)return r.children.splice(n,1),i.push(r),this._condense(i),this}s||r.leaf||!wa(r,n)?l?(a++,r=l.children[a],s=!1):r=null:(i.push(r),o.push(a),a=0,l=r,r=r.children[0])}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const r=[];for(;e;)e.leaf?t.push(...e.children):r.push(...e.children),e=r.pop();return t}_build(e,t,r,n){const i=r-t+1;let o,a=this._maxEntries;if(i<=a)return o=_a(e.slice(t,r+1)),ca(o,this.toBBox),o;n||(n=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,n-1))),o=_a([]),o.leaf=!1,o.height=n;const l=Math.ceil(i/a),s=l*Math.ceil(Math.sqrt(a));xa(e,t,r,s,this.compareMinX);for(let i=t;i<=r;i+=s){const t=Math.min(i+s-1,r);xa(e,i,t,l,this.compareMinY);for(let r=i;r<=t;r+=l){const i=Math.min(r+l-1,t);o.children.push(this._build(e,r,i,n-1))}}return ca(o,this.toBBox),o}_chooseSubtree(e,t,r,n){for(;n.push(t),!t.leaf&&n.length-1!==r;){let r,n=1/0,i=1/0;for(let o=0;o<t.children.length;o++){const a=t.children[o],l=ga(a),s=ya(e,a)-l;s<i?(i=s,n=l<n?l:n,r=a):s===i&&l<n&&(n=l,r=a)}t=r||t.children[0]}return t}_insert(e,t,r){const n=r?e:this.toBBox(e),i=[],o=this._chooseSubtree(n,this.data,t,i);for(o.children.push(e),fa(o,n);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(n,i,t)}_split(e,t){const r=e[t],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);const o=this._chooseSplitIndex(r,i,n),a=_a(r.children.splice(o,r.children.length-o));a.height=r.height,a.leaf=r.leaf,ca(r,this.toBBox),ca(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this.data=_a([e,t]),this.data.height=e.height+1,this.data.leaf=!1,ca(this.data,this.toBBox)}_chooseSplitIndex(e,t,r){let n,i=1/0,o=1/0;for(let a=t;a<=r-t;a++){const t=ha(e,0,a,this.toBBox),l=ha(e,a,r,this.toBBox),s=va(t,l),u=ga(t)+ga(l);s<i?(i=s,n=a,o=u<o?u:o):s===i&&u<o&&(o=u,n=a)}return n||r-t}_chooseSplitAxis(e,t,r){const n=e.leaf?this.compareMinX:pa,i=e.leaf?this.compareMinY:da;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,i)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const i=this.toBBox,o=ha(e,0,t,i),a=ha(e,r-t,r,i);let l=ma(o)+ma(a);for(let n=t;n<r-t;n++){const t=e.children[n];fa(o,e.leaf?i(t):t),l+=ma(o)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];fa(a,e.leaf?i(t):t),l+=ma(a)}return l}_adjustParentBBoxes(e,t,r){for(let n=r;n>=0;n--)fa(t[n],e)}_condense(e){for(let t,r=e.length-1;r>=0;r--)0===e[r].children.length?r>0?(t=e[r-1].children,t.splice(t.indexOf(e[r]),1)):this.clear():ca(e[r],this.toBBox)}},Ja=Sa,Ya=Pa,Xa=La.default,Ha=Ya.featureEach;Ya.coordEach;var Ka=Ja.featureCollection;function Za(e){var t=new $a(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:Xa(e),$a.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:Xa(e),t.push(e)}):Ha(e,function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:Xa(e),t.push(e)}),$a.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:Xa(e),$a.prototype.remove.call(this,e,t)},t.clear=function(){return $a.prototype.clear.call(this)},t.search=function(e){var t=$a.prototype.search.call(this,this.toBBox(e));return Ka(t)},t.collides=function(e){return $a.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=$a.prototype.all.call(this);return Ka(e)},t.toJSON=function(){return $a.prototype.toJSON.call(this)},t.fromJSON=function(e){return $a.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=Xa(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=Xa(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}function Qa(e,t){var r={},n=[];if("LineString"===e.type&&(e=Yo(e)),"LineString"===t.type&&(t=Yo(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var i=el(e,t);return i&&n.push(i),Xo(n)}var o=na();return o.load(ta(t)),ra(ta(e),function(e){ra(o.search(e),function(t){var i=el(e,t);if(i){var o=Ko(i).join(",");r[o]||(r[o]=!0,n.push(i))}})}),Xo(n)}function el(e,t){var r=Ko(e),n=Ko(t);if(2!==r.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==n.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=r[0][0],o=r[0][1],a=r[1][0],l=r[1][1],s=n[0][0],u=n[0][1],c=n[1][0],h=n[1][1],f=(h-u)*(a-i)-(c-s)*(l-o),p=(c-s)*(o-u)-(h-u)*(i-s),d=(a-i)*(o-u)-(l-o)*(i-s);if(0===f)return null;var g=p/f,m=d/f;return g>=0&&g<=1&&m>=0&&m<=1?function(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ho(e[0])||!Ho(e[1]))throw new Error("coordinates must contain numbers");return Yo({type:"Point",coordinates:e},t,r)}([i+g*(a-i),o+g*(l-o)]):null}function tl(e,t,r){if(null!==e)for(var n,i,o,a,l,s,u,c,h=0,f=0,p=e.type,d="FeatureCollection"===p,g="Feature"===p,m=d?e.features.length:1,y=0;y<m;y++){l=(c=!!(u=d?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var v=0;v<l;v++){var w=0,b=0;if(null!==(a=c?u.geometries[v]:u)){s=a.coordinates;var _=a.type;switch(h=!r||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(s,f,y,w,b))return!1;f++,w++;break;case"LineString":case"MultiPoint":for(n=0;n<s.length;n++){if(!1===t(s[n],f,y,w,b))return!1;f++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(n=0;n<s.length;n++){for(i=0;i<s[n].length-h;i++){if(!1===t(s[n][i],f,y,w,b))return!1;f++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(n=0;n<s.length;n++){for(b=0,i=0;i<s[n].length;i++){for(o=0;o<s[n][i].length-h;o++){if(!1===t(s[n][i][o],f,y,w,b))return!1;f++}b++}w++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===tl(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function rl(e,t){!function(e,t){var r,n,i,o,a,l,s,u,c,h,f=0,p="FeatureCollection"===e.type,d="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(l=p?e.features[r].geometry:d?e.geometry:e,u=p?e.features[r].properties:d?e.properties:{},c=p?e.features[r].bbox:d?e.bbox:void 0,h=p?e.features[r].id:d?e.id:void 0,a=(s=!!l&&"GeometryCollection"===l.type)?l.geometries.length:1,i=0;i<a;i++)if(null!==(o=s?l.geometries[i]:l))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,f,u,c,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,u,c,h))return!1;f++}}(e,function(e,r,n,i,o){var a,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(D(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var s=0;s<e.coordinates.length;s++){var u=e.coordinates[s];if(!1===t(D({type:a,coordinates:u},n),r,s))return!1}})}function nl(e,t,r){var n=r,i=!1;return function(e,t){rl(e,function(e,r,n){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,l=0,s=0,u=0;return!1!==tl(e,function(o,c,h,f,p){if(void 0===a||r>l||f>s||p>u)return a=o,l=r,s=f,u=p,void(i=0);var d=G([a,o],e.properties);if(!1===t(d,r,n,p,i))return!1;i++,a=o})&&void 0}}})}(e,function(e,o,a,l,s){n=!1===i&&void 0===r?e:t(n,e,o,a,l,s),i=!0}),n}function il(e,t,r){void 0===r&&(r={});var n=U([1/0,1/0],{dist:1/0}),i=0;return rl(e,function(e){for(var o=J(e),a=0;a<o.length-1;a++){var l=U(o[a]);l.properties.dist=Y(t,l,r);var s=U(o[a+1]);s.properties.dist=Y(t,s,r);var u=Y(l,s,r),c=Math.max(l.properties.dist,s.properties.dist),h=Uo(l,s),f=Jo(t,c,h+90,r),p=Jo(t,c,h-90,r),d=Qa(G([f.geometry.coordinates,p.geometry.coordinates]),G([l.geometry.coordinates,s.geometry.coordinates])),g=null;d.features.length>0&&((g=d.features[0]).properties.dist=Y(t,g,r),g.properties.location=i+Y(l,g,r)),l.properties.dist<n.properties.dist&&((n=l).properties.index=a,n.properties.location=i),s.properties.dist<n.properties.dist&&((n=s).properties.index=a+1,n.properties.location=i+u),g&&g.properties.dist<n.properties.dist&&((n=g).properties.index=a),i+=u}}),n}function ol(e,t){return void 0===t&&(t={}),nl(e,function(e,r){var n=r.geometry.coordinates;return e+Y(n[0],n[1],t)},0)}ia.exports=Za,na.default=Za;var al=function(){function e(){return S(this,e),x(this,e,arguments)}return E(e,Io),j(e,[{key:"onInitialState",value:function(e){return{fullRoute:e.map(function(e){return[e[0],e[1]]}),end:{from:0}}}},{key:"onGetValue",value:function(e){return e.actRoute||e.fullRoute}},{key:"onCalculate",value:function(e,t){var r,n=e.fullRoute,i=e.end;if(t>.5){var o=2*(t-.5);r=i.from*(1-o)+o*i.to}else{var a=2*t;r=i.from*(1-a)+a*i.to}for(var l=0,s=0,u=n.length-1;s<r&&u>0;)l=s,s+=Y(U(n[u]),U(n[u-1])),u-=1;if(t>.5){var c=(r-l)/(s-l),h=1-c,f=[].concat(L(n.slice(0,u+1)),[[n[u][0]*c+n[u+1][0]*h,n[u][1]*c+n[u+1][1]*h]]);return{fullRoute:n,end:O(O({},i),{},{current:r}),actRoute:f}}if(s<=r){var p=L(n.slice(n.length-2,n.length));return{fullRoute:n,end:O(O({},i),{},{current:r}),actRoute:p}}var d=(r-l)/(s-l),g=1-d,m=[[n[u][0]*d+n[u+1][0]*g,n[u][1]*d+n[u+1][1]*g]].concat(L(n.slice(u+1,n.length)));return{fullRoute:n,end:O(O({},i),{},{current:r}),actRoute:m}}},{key:"onStart",value:function(e,t){var r,n=e.fullRoute,i=e.end;if(t.end.point){var o=G(n),a=il(o,t.end.point);r=ol(o)-a.properties.location}else console.warn("RouteCoordinatesArray: toValue.end: should have either along or point");return{fullRoute:n,end:O(O({},i),{},{from:null!=i.current?i.current:i.from,to:r})}}},{key:"originalRoute",get:function(){return this.state.fullRoute}}])}(),ll={id:"43f36e14-e3f5-43c1-84c0-50a9c80dc5c7",name:"MapLibre",layers:[{id:"background",type:"background",paint:{"background-color":"rgb(242,243,240)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"#e0e0e0"}},{id:"aeroway-area",type:"fill",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-color":"rgba(222, 222, 228, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-color":"rgb(230, 233, 229)"}},{id:"landcover_park",type:"fill",source:"openmaptiles","source-layer":"landcover",filter:["all",["==","subclass","park"]],layout:{visibility:"visible"},paint:{"fill-color":"#c8facc","fill-antialias":!0}},{id:"landcover_grass",type:"fill",source:"openmaptiles","source-layer":"landcover",filter:["all",["==","$type","Polygon"],["==","class","grass"]],layout:{visibility:"visible"},paint:{"fill-color":"#d6dcd6","fill-opacity":1}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["==","$type","Polygon"],["!=","brunnel","tunnel"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"rgba(208, 214, 218, 1)","fill-outline-color":{base:1,stops:[[0,"hsla(180, 6%, 63%, 0.82)"],[22,"hsla(180, 6%, 63%, 0.18)"]]}}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["==","$type","Polygon"],["==","subclass","ice_shelf"]],layout:{visibility:"visible"},paint:{"fill-color":"hsl(0, 0%, 98%)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["==","$type","Polygon"],["==","subclass","glacier"]],layout:{visibility:"visible"},paint:{"fill-color":"hsl(0, 0%, 98%)","fill-opacity":{base:1,stops:[[0,1],[8,.5]]}}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["==","$type","Polygon"],["==","class","residential"]],layout:{visibility:"visible"},paint:{"fill-color":"rgb(234, 234, 230)","fill-opacity":{base:.6,stops:[[8,.8],[9,.6]]}}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["==","$type","Polygon"],["==","class","wood"]],layout:{visibility:"visible"},paint:{"fill-color":"rgb(220,224,220)","fill-opacity":{base:1,stops:[[8,0],[12,1]]}}},{id:"water_name",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"symbol-placement":"line","symbol-spacing":500,"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-rotation-alignment":"map","text-size":12},paint:{"text-color":"rgb(157,169,177)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"tunnel_motorway_casing",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"butt","line-join":"miter",visibility:"visible"},paint:{"line-color":"rgb(213, 213, 213)","line-opacity":1,"line-width":{base:1.4,stops:[[5.8,0],[6,3],[20,40]]}}},{id:"tunnel_motorway_inner",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgb(234,234,234)","line-width":{base:1.4,stops:[[4,2],[6,1.3],[20,30]]}}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(251, 251, 251, 1)","line-opacity":1,"line-width":{base:1.55,stops:[[13,5],[20,20]]}}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(0, 0%, 88%)","line-opacity":1,"line-width":{base:1.5,stops:[[11,6],[17,55]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-opacity":1,"line-width":{base:1.5,stops:[[11,4],[17,50]]}}},{id:"road_area_pier",type:"fill",metadata:{},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","Polygon"],["==","class","pier"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"rgb(242,243,240)"}},{id:"road_pier",type:"line",metadata:{},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["in","class","pier"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#F5f5f5","line-width":{base:1.2,stops:[[15,1],[17,4]]}}},{id:"highway_minor",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fdfdfd","line-opacity":.9,"line-width":{base:1.55,stops:[[13,1.8],[20,20]]}}},{id:"highway_major_casing",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==","$type","LineString"],["in","class","primary","secondary","tertiary","trunk"]],layout:{"line-cap":"butt","line-join":"miter",visibility:"visible"},paint:{"line-color":"rgb(213, 213, 213)","line-dasharray":[12,0],"line-width":{base:1.3,stops:[[10,3],[20,23]]}}},{id:"highway_major_inner",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==","$type","LineString"],["in","class","primary","secondary","tertiary","trunk"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fff","line-width":{base:1.3,stops:[[10,2],[20,20]]}}},{id:"highway_major_subtle",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==","$type","LineString"],["in","class","primary","secondary","tertiary","trunk"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 85%, 0.69)","line-width":2}},{id:"highway_motorway_casing",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"butt","line-join":"miter",visibility:"visible"},paint:{"line-color":"rgb(213, 213, 213)","line-dasharray":[2,0],"line-opacity":1,"line-width":{base:1.4,stops:[[5.8,0],[6,3],[20,40]]}}},{id:"highway_motorway_inner",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":{base:1,stops:[[5.8,"hsla(0, 0%, 85%, 0.53)"],[6,"#fff"]]},"line-width":{base:1.4,stops:[[4,2],[6,1.3],[20,30]]}}},{id:"highway_motorway_subtle",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==","$type","LineString"],["==","class","motorway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 85%, 0.53)","line-width":{base:1.4,stops:[[4,2],[6,1.3]]}}},{id:"railway_transit",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#dddddd","line-width":3}},{id:"railway_transit_dashline",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#fafafa","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#dddddd","line-width":3}},{id:"railway_service_dashline",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==","$type","LineString"],["==","class","rail"],["has","service"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#fafafa","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==","$type","LineString"],["all",["!has","service"],["==","class","rail"]]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#dddddd","line-width":{base:1.3,stops:[[16,3],[20,7]]}}},{id:"railway_dashline",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==","$type","LineString"],["all",["!has","service"],["==","class","rail"]]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#fafafa","line-dasharray":[3,3],"line-width":{base:1.3,stops:[[16,2],[20,6]]}}},{id:"highway_motorway_bridge_casing",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","motorway"]]],layout:{"line-cap":"butt","line-join":"miter",visibility:"visible"},paint:{"line-color":"rgb(213, 213, 213)","line-dasharray":[2,0],"line-opacity":1,"line-width":{base:1.4,stops:[[5.8,0],[6,5],[20,45]]}}},{id:"highway_motorway_bridge_inner",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":{base:1,stops:[[5.8,"hsla(0, 0%, 85%, 0.53)"],[6,"#fff"]]},"line-width":{base:1.4,stops:[[4,2],[6,1.3],[20,30]]}}},{id:"highway_name_other",type:"symbol",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation_name",filter:["all",["!=","class","motorway"],["==","$type","LineString"]],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":"{name:latin} {name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-max-angle":30,"text-pitch-alignment":"viewport","text-rotation-alignment":"map","text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"#bbb","text-halo-blur":1,"text-halo-color":"#fff","text-halo-width":2,"text-translate":[0,0]}},{id:"highway_name_motorway",type:"symbol",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation_name",filter:["all",["==","$type","LineString"],["==","class","motorway"]],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":"{ref}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-pitch-alignment":"viewport","text-rotation-alignment":"viewport","text-size":10,visibility:"visible"},paint:{"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-translate":[0,2]}},{id:"boundary_state",type:"line",metadata:{"mapbox:group":"a14c9607bc7954ba1df7205bf660433f"},source:"openmaptiles","source-layer":"boundary",filter:["==","admin_level",4],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-blur":.4,"line-color":"rgb(230, 204, 207)","line-dasharray":[2,2],"line-opacity":1,"line-width":{base:1.3,stops:[[3,1],[22,15]]}}},{id:"boundary_country_z0-4",type:"line",metadata:{"mapbox:group":"a14c9607bc7954ba1df7205bf660433f"},source:"openmaptiles","source-layer":"boundary",maxzoom:5,filter:["all",["==","admin_level",2],["!has","claimed_by"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-blur":{base:1,stops:[[0,.4],[22,4]]},"line-color":"rgb(230, 204, 207)","line-opacity":1,"line-width":{base:1.1,stops:[[3,1],[22,20]]}}},{id:"boundary_country_z5-",type:"line",metadata:{"mapbox:group":"a14c9607bc7954ba1df7205bf660433f"},source:"openmaptiles","source-layer":"boundary",minzoom:5,filter:["==","admin_level",2],layout:{"line-cap":"round","line-join":"round"},paint:{"line-blur":{base:1,stops:[[0,.4],[22,4]]},"line-color":"rgb(230, 204, 207)","line-opacity":1,"line-width":{base:1.1,stops:[[3,1],[22,20]]}}},{id:"place_other",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:14,filter:["all",["in","class","continent","hamlet","neighbourhood","isolated_dwelling"],["==","$type","Point"]],layout:{"text-anchor":"center","text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"center","text-offset":[.5,0],"text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_suburb",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:15,filter:["all",["==","$type","Point"],["==","class","suburb"]],layout:{"text-anchor":"center","text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"center","text-offset":[.5,0],"text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_village",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:14,filter:["all",["==","$type","Point"],["==","class","village"]],layout:{"icon-size":.4,"text-anchor":"left","text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"left","text-offset":[.5,.2],"text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"icon-opacity":.7,"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_town",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:15,filter:["all",["==","$type","Point"],["==","class","town"]],layout:{"text-anchor":{base:1,stops:[[0,"left"],[8,"center"]]},"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"left","text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"icon-opacity":.7,"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_city",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:14,filter:["all",["==","$type","Point"],["all",["!=","capital",2],["==","class","city"],[">","rank",3]]],layout:{"text-anchor":{base:1,stops:[[0,"left"],[8,"center"]]},"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"left","text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"icon-opacity":.7,"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_capital",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:12,filter:["all",["==","$type","Point"],["all",["==","capital",2],["==","class","city"]]],layout:{"text-anchor":{base:1,stops:[[0,"left"],[8,"center"]]},"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"left","text-size":14,"text-transform":"uppercase",visibility:"visible"},paint:{"icon-opacity":.7,"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_city_large",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:12,filter:["all",["==","$type","Point"],["all",["!=","capital",2],["<=","rank",3],["==","class","city"]]],layout:{"text-anchor":{base:1,stops:[[0,"left"],[8,"center"]]},"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"left","text-size":14,"text-transform":"uppercase",visibility:"visible"},paint:{"icon-opacity":.7,"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_state",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:12,filter:["all",["==","$type","Point"],["==","class","state"]],layout:{"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"rgb(113, 129, 144)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_country_other",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:8,filter:["all",["==","$type","Point"],["==","class","country"],["!has","iso_a2"]],layout:{"text-field":"{name:latin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-size":{base:1,stops:[[0,9],[6,11]]},"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":{base:1,stops:[[3,"rgb(157,169,177)"],[4,"rgb(153, 153, 153)"]]},"text-halo-color":"rgba(236,236,234,0.7)","text-halo-width":1.4}},{id:"place_country_minor",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:8,filter:["all",["==","$type","Point"],["==","class","country"],[">=","rank",2],["has","iso_a2"]],layout:{"text-field":"{name:latin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-size":{base:1,stops:[[0,10],[6,12]]},"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":{base:1,stops:[[3,"rgb(157,169,177)"],[4,"rgb(153, 153, 153)"]]},"text-halo-color":"rgba(236,236,234,0.7)","text-halo-width":1.4}},{id:"place_country_major",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:6,filter:["all",["==","$type","Point"],["<=","rank",1],["==","class","country"],["has","iso_a2"]],layout:{"text-anchor":"center","text-field":"{name:latin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-size":{base:1.4,stops:[[0,10],[3,12],[4,14]]},"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":{base:1,stops:[[3,"rgb(157,169,177)"],[4,"rgb(153, 153, 153)"]]},"text-halo-color":"rgba(236,236,234,0.7)","text-halo-width":1.4}}],sprite:"https://atoms-map-sprites.qa.cag.spatialverse.online/sprites/sprites",glyphs:"https://atoms-map-sprites.qa.cag.spatialverse.online/fonts/{fontstack}/{range}.pbf",sources:{openmaptiles:{type:"vector",url:"https://api.maptiler.com/tiles/v3/tiles.json?key=12H5hrITUbJ1sDrVPqkq"}},version:8},sl=[{id:"Building overlay base",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#97b5bc"],["where.changi.terminals.t1.l1","#92a7b8"],["where.changi.terminals.t2.l1","#d59d99"],["where.changi.terminals.t3.l1","#8ab8b5"],["where.changi.terminals.t4.l1","#a891aa"]],default:"#1a72B6"},"fill-opacity":1,"fill-antialias":!1},"source-layer":"geojson"},{id:"Aerobridge",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.aerobridge","what.infra.tunnel"]]]],paint:{"fill-color":"hsl(0, 0%, 68%)","fill-opacity":{base:1,stops:[[15,0],[15.5,.99]]},"fill-antialias":!1},"source-layer":"geojson"},{id:"Airplanes",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.plane"]],paint:{"fill-color":{base:1,stops:[[15,"hsl(0, 0%, 53%)"],[15.5,"hsl(0, 0%, 100%)"]]},"fill-outline-color":"hsl(0, 0%, 50%)","fill-opacity":{base:1,stops:[[15,0],[15.5,.99]]},"fill-antialias":!1},"source-layer":"geojson"},{id:"building_outline",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","subType"],"building_outline"]],paint:{"fill-color":"hsl(0, 0%, 82%)","fill-opacity":.2,"fill-outline-color":"hsl(0, 0%, 82%)"},"source-layer":"geojson"},{id:"Skytrain track outdoor",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["get","dimension_where"],"where.changi.terminals.t2.l2"],["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.skytrain"]],paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-outline-color":"hsl(0, 0%, 69%)"},"source-layer":"geojson"},{id:"Skytrain line outdoor",type:"line",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.skytrain"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":"hsl(13, 97%, 67%)","line-width":3},"source-layer":"geojson"},{id:"Floor",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.floor","what.floor"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Skytrain track",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.skytrain"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-outline-color":"hsl(0, 0%, 69%)"},"source-layer":"geojson"},{id:"Changi Airport Connector",type:"fill",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{visibility:"visible"},paint:{"fill-color":"#faefd6","fill-opacity":.99,"fill-outline-color":"#cd9d2d"},"source-layer":"geojson"},{id:"Changi Airport Connector Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{"symbol-placement":"line","symbol-spacing":300,"text-field":"{title}","text-font":["Lato Regular"],"text-max-angle":30,"text-pitch-alignment":"viewport","text-rotation-alignment":"map","text-size":12,"text-transform":"none"},paint:{"text-halo-color":"#cd9d2d","text-color":"#ffffff","text-halo-width":2},"source-layer":"geojson"},{id:"Changi Sheltered Walkway",type:"fill",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.walkway_sheltered"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible"},paint:{"fill-color":"#d6e2fa","fill-opacity":.99,"fill-outline-color":"#375692"},"source-layer":"geojson"},{id:"Carpark fill",metadata:{"source-type":"steerpath_floor_tiles"},minzoom:16,maxzoom:24,type:"fill",source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.carpark","what.infra.parking_bike","what.infra.parking_bike_locked"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{stops:[[18,"#dddddd"],[19.25,"#c0c0c0"]]},"fill-opacity":{stops:[[16,0],[16.5,.99]]}},"source-layer":"geojson"},{id:"Public",type:"fill",minzoom:15,maxzoom:17,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Public"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"fill-color":"hsl(43, 100%, 98%)","fill-opacity":.3,"fill-antialias":!1},"source-layer":"geojson"},{id:"Transit",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"fill-color":"hsl(0, 0%, 100%)","fill-antialias":!1,"fill-opacity":.99},"source-layer":"geojson"},{id:"Hole fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.hole"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(0, 0%, 90%)","fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Immigration",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.immigration"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Other service areas",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.baggage_claim","what.service.atm","what.service.baby_care","what.service.baggage_storage","what.service.clinic","what.service.tax_refund","what.service.free_singapore_tour","what.service.information","what.service.internet","what.service.laptop_access","what.service.meditation_room","what.service.money_exchange","what.service.phone","what.service.post","what.service.prayer_room","what.service.smoking_area","what.service.cloakroom","what.service.toilet","what.service.wifi","what.other","what.service.prayer_room","what.service.adult_diaper_change","what.service.changi_rewards","what.service.toilet_accessible","what.service.shower"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(263, 75%, 96%)","fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Retail",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.retail_anchor"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#CAACED"],[17.5,"#E0CCF8"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Lounge",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.airline_lounge","what.service.pay_per_use_lounge","what.service.lodging","what.service.airport_transfer","what.service.vip_counter","what.service.connect_changi","what.service.lounge_changi"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(224, 46%, 72%)"],[17.5,"hsl(215, 66%, 94%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Gate",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Gate screening",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.security"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible"},paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 54%, 85%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Travelator",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.travelator"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(0, 0%, 96%)","fill-opacity":{base:1,stops:[[17,0],[17.5,.99]]}},"source-layer":"geojson"},{id:"Checkin",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.checkin","what.service.checkin_early"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Entertainment",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.movie_theatre","what.service.tv_lounge","what.service.attraction_tour"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(1, 100%, 82%)"],[17.5,"hsl(0, 100%, 95%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Entertainment outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.movie_theatre","what.service.tv_lounge","what.service.attraction_tour"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(330, 100%, 82%)"],[17.5,"hsl(330, 100%, 68%)"]]},"line-width":1},"source-layer":"geojson"},{id:"Water fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.water"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(195, 87%, 63%)"],[17.5,"hsl(197, 71%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!0},"source-layer":"geojson"},{id:"Water outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.water"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(190, 91%, 53%)"],[17.5,"hsl(190, 100%, 41%)"]]},"line-width":1},"source-layer":"geojson"},{id:"Garden fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.garden"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(183, 64%, 56%)"],[17.5,"hsl(181, 49%, 89%)"]]},"fill-opacity":.99,"fill-antialias":!0},"source-layer":"geojson"},{id:"Garden outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.garden"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(159, 55%, 61%)"],[17.5,"hsl(164, 100%, 35%)"]]},"line-width":1},"source-layer":"geojson"},{id:"Pickup zone outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.transport.pickup","what.transport.pickup_car"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":"hsl(0, 0%, 78%)","line-width":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Pick-up Zone",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.transport.pickup","what.transport.pickup_car"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#bcbaba"],[17.5,"#ececec"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Restarea",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.rest_area"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(1, 100%, 82%)"],[17.5,"hsl(0, 100%, 95%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Food",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.food","what.shop.food","what.shop.food_anchor","what.shop.food_anchor"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#FFD3B3"],[17.5,"#FFE3CE"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Road marking fill",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:19,maxzoom:24,filter:["all",["in",["get","$type"],["literal",["Polygon"]]],["==",["get","dimension_what"],"what.road.marking_fill"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-opacity":{base:1,stops:[[19,0],[19.25,1]]},"fill-color":"#ffffff"},"source-layer":"geojson"},{id:"road marking line",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",source:"custom",minzoom:19,maxzoom:24,filter:["all",["==",["get","dimension_what"],"what.road.marking_line"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-opacity":{base:1,stops:[[19,0],[19.25,1]]},"line-color":"#ffffff","line-width":1.5},"source-layer":"geojson"},{id:"Kerb",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:18,maxzoom:24,filter:["all",["==",["get","dimension_what"],"what.road.kerb"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-opacity":{base:1,stops:[[18,0],[18.25,1]]},"line-color":"hsl(0, 0%, 63%)","line-width":1.5},"source-layer":"geojson"},{id:"Hole outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.hole"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-opacity":{base:1,stops:[[17,0],[17.5,1]]},"line-color":"hsl(0, 0%, 68%)","line-width":1},"source-layer":"geojson"},{id:"Travelator outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.travelator"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{},paint:{"line-color":"hsl(0, 0%, 81%)","line-width":3,"line-opacity":1},"source-layer":"geojson"},{id:"Airplanes outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.airplane"]],layout:{},paint:{"line-color":"hsl(0, 0%, 76%)","line-opacity":{base:1,stops:[[15,0],[15.5,1]]}},"source-layer":"geojson"},{id:"Immigration outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.immigration"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"line-color":"hsl(0, 0%, 85%)","line-width":2},"source-layer":"geojson"},{id:"Checkin outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.checkin","what.service.checkin_early"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-width":1,"line-color":"#89CBDF"},"source-layer":"geojson"},{id:"Other service outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.baggage_claim","what.service.atm","what.service.baby_care","what.service.baggage_storage","what.service.clinic","what.service.free_singapore_tour","what.service.information","what.service.internet","what.service.laptop_access","what.service.meditation_room","what.service.money_exchange","what.service.phone","what.service.post","what.service.prayer_room","what.service.smoking_area","what.service.tax_refund","what.service.cloakroom","what.service.toilet","what.service.wifi","what.other","what.service.prayer_room","what.service.adult_diaper_change","what.service.changi_rewards","what.service.toilet_accessible","what.service.shower"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":"hsl(0, 0%, 78%)","line-width":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Retail outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.retail_anchor"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"#CAACED"],[17.5,"#986FCA"]]},"line-width":1},"source-layer":"geojson"},{id:"Lounge outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.airline_lounge","what.service.pay_per_use_lounge","what.service.lodging","what.service.airport_transfer","what.service.vip_counter","what.service.connect_changi","what.service.lounge_changi"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(224, 46%, 72%)"],[17.5,"hsl(224, 43%, 58%)"]]},"line-width":1},"source-layer":"geojson"},{id:"Food outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.food","what.shop.food","what.shop.food_anchor","what.shop.food_anchor"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"#FFD3B3"],[17.5,"#FFB681"]]},"line-width":1},"source-layer":"geojson"},{id:"Gate and outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","$type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane","what.security"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 56%, 49%)"]]},"line-width":1},"source-layer":"geojson"},{id:"Restarea outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.rest_area"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(330, 100%, 82%)"],[17.5,"hsl(330, 100%, 68%)"]]},"line-width":1},"source-layer":"geojson"},{id:"highlight_custom_fill",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",minzoom:18,source:"custom",filter:["all",["all",["==",["geometry-type"],"Polygon"]],["any"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"fill-color":"#f6f6f6","fill-opacity":{stops:[[16,0],[16.5,.5]]}},"source-layer":"geojson"},{id:"highlight_custom_outline",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",minzoom:18,source:"custom",filter:["all",["all",["==",["geometry-type"],"Polygon"]],["any"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none","line-join":"round","line-cap":"round"},paint:{"line-color":"#5d5d5d","line-blur":10,"line-width":20,"line-opacity":{stops:[[16,0],[16.5,1]]}},"source-layer":"geojson"},{id:"Public outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","title"],"Public"],["==",["get","dimension_what"],"what.infra.wing"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"line-width":2,"line-color":"hsl(0, 0%, 46%)"},"source-layer":"geojson"},{id:"Transit border",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":"hsl(270, 41%, 46%)","line-width":2},"source-layer":"geojson"},{id:"Floor outline aka wall fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.wall","what.wall"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(0, 0%, 56%)"},"source-layer":"geojson"},{id:"Floor outline aka wall",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.infra.wall","what.wall"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-width":{base:1,stops:[[15.5,1],[22,3]]},"line-color":"hsl(0, 0%, 56%)"},"source-layer":"geojson"},{id:"T2 overlay outline copy",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","subType"],"building_outline"]],layout:{visibility:"none"},paint:{"line-color":"#ee3424","line-opacity":1,"line-width":3},"source-layer":"geojson"},{id:"High poi extrude",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill-extrusion",minzoom:16,maxzoom:20,source:"custom",layout:{visibility:"none"},filter:["all",["==",["geometry-type"],"Polygon"],["all",["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.retail_anchor","what.shop.food","what.shop.food","what.shop.food_anchor","what.shop.food_anchor","what.service.checkin","what.airplane_gate","what.security"]]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-extrusion-base":0,"fill-extrusion-color":{base:1,type:"categorical",property:"dimension_what",stops:[["category_retail","#E0CCF8"],["category_retail_anchor","#E0CCF8"],["category_restaurant","#FFE3CE"],["category_restaurant_anchor","#FFE3CE"],["category_food","#FFE3CE"],["category_food_anchor","#FFE3CE"],["service_checkin","hsl(194, 79%, 91%)"],["category_airplane_gate","hsl(194, 79%, 91%)"],["category_security","hsl(194, 54%, 85%)"]],default:"#ebe8e5"},"fill-extrusion-height":{stops:[[17,0],[17.5,3],[19,3],[19.5,0]]},"fill-extrusion-opacity":{stops:[[17,0],[17.5,.75],[19,.75],[19.5,0]]}},"source-layer":"geojson"},{id:"Medium poi extrude",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill-extrusion",minzoom:16,maxzoom:20,source:"custom",layout:{visibility:"none"},filter:["all",["==",["geometry-type"],"Polygon"],["all",["in",["get","dimension_what"],["literal",["what.service.baggage_claim","what.other"]]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-extrusion-base":0,"fill-extrusion-color":{base:1,type:"categorical",property:"dimension_what",stops:[["service_baggage_claim","hsl(263, 75%, 96%)"],["category_other","hsl(263, 75%, 96%)"]],default:"#ebe8e5"},"fill-extrusion-height":{stops:[[17,0],[17.5,1.5],[19,1.5],[19.5,0]]},"fill-extrusion-opacity":{stops:[[17,0],[17.5,.75],[19,.75],[19.5,0]]}},"source-layer":"geojson"},{id:"Low poi extrude",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill-extrusion",minzoom:16,maxzoom:20,source:"custom",layout:{visibility:"none"},filter:["all",["in",["get","dimension_what"],["literal",["what.infra.garden"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-extrusion-base":0,"fill-extrusion-color":{base:1,type:"categorical",property:"dimension_what",stops:[["other","#ebe8e5"],["infrastructure_garden","hsl(181, 49%, 89%)"]],default:"#ebe8e5"},"fill-extrusion-height":{stops:[[17,0],[17.5,.5],[19,.5],[19.5,0]]},"fill-extrusion-opacity":{stops:[[17,0],[17.5,.75],[19,.75],[19.5,0]]}},"source-layer":"geojson"},{id:"temporarily_disabled_highlight_custom_extrusion",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill-extrusion",source:"custom",minzoom:18,layout:{visibility:"none"},filter:["all",["all",["==",["get","buildingRef"],"67"]],["any"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-extrusion-base":0,"fill-extrusion-color":{type:"identity",property:"fillExtrusionColor",default:"#fff"},"fill-extrusion-height":{stops:[[16,0],[16.5,.1]]},"fill-extrusion-opacity":{stops:[[16,0],[16.5,.5]]}},"source-layer":"geojson"},{id:"Aerobridge gates",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.aerobridge"]],layout:{visibility:"none","text-field":"{cad_text}","text-font":["Lato Regular"],"text-padding":0,"text-size":15,"text-ignore-placement":!0},paint:{"text-opacity":{base:1,stops:[[15,0],[15.5,1],[17,1],[17.5,0]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(194, 64%, 49%)","text-halo-width":2},"source-layer":"geojson"},{id:"Gate names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-ignore-placement":!0,"text-size":18,"text-allow-overlap":!0},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(194, 79%, 91%)","text-color":"hsl(194, 64%, 49%)","text-halo-width":2},"source-layer":"geojson"},{id:"Lounge title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.service.airline_lounge","what.service.lodging","what.service.vip_counter","what.service.checkin_early","what.service.connect_changi","what.service.lounge_changi"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]],["has","title"],["!=",["get","title"],""]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"text-padding":2,"text-font":["Lato Regular"],"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"icon-image":"{dimension_what}","icon-offset":[0,-32],"text-anchor":"top","icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-padding":1},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-blur":0,"text-halo-color":"hsl(224, 43%, 58%)","text-halo-width":1.5,"text-color":"#ffffff","text-translate":[0,0],"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Pay Per Use Lounge title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.service.pay_per_use_lounge"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]],["has","title"],["!=",["get","title"],""]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"text-padding":2,"text-font":["Lato Regular"],"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"icon-image":"what.service.airline_lounge","icon-offset":[0,-32],"text-anchor":"top","icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-padding":1},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-blur":0,"text-halo-color":"hsl(224, 43%, 58%)","text-halo-width":1.5,"text-color":"#ffffff","text-translate":[0,0],"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Tenant title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.food"]]],["!=",["get","title"],""],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-20],"icon-image":"{dimension_what}","text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-color":"#ffffff","text-halo-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.shop.retail","hsl(267, 31%, 52%)"],["what.shop.food","hsl(25, 76%, 58%)"]],default:"hsl(267, 31%, 52%)"},"text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Anchor tenant title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.shop.retail_anchor","what.shop.food_anchor"]]],["!=",["get","title"],""],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-20],"icon-image":{base:1,type:"categorical",property:"dimension_what",stops:[["what.shop.retail_anchor","what.shop.retail"],["what.shop.food_anchor","what.shop.food"]],default:"what.shop.retail"},"text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-color":"#ffffff","text-halo-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.shop.retail_anchor","hsl(267, 31%, 52%)"],["what.shop.food_anchor","hsl(25, 76%, 58%)"]],default:"hsl(267, 31%, 52%)"},"text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Entrance texts",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.entrance"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]},"text-ignore-placement":!0,"text-max-width":5},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2},"source-layer":"geojson"},{id:"Exit texts",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.exit"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]},"text-ignore-placement":!0},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2},"source-layer":"geojson"},{id:"Changi Walkway Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-pitch-alignment":"viewport","text-size":12},paint:{"text-halo-color":"#cd9d2d","text-color":"#ffffff","text-halo-width":2,"text-opacity":0},"source-layer":"geojson"},{id:"Changi Sheltered Walkway Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.walkway_sheltered"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-pitch-alignment":"viewport","text-size":12},paint:{"text-halo-color":"#375692","text-color":"#ffffff","text-halo-width":2},"source-layer":"geojson"},{id:"Checkin row text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.checkin"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]}},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2},"source-layer":"geojson"},{id:"Belt text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.baggage_claim"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]}},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2},"source-layer":"geojson"},{id:"Infrastructure icons",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.ramp","what.infra.escalator"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[22,.7]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Attraction text and icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["has","title"],["!=",["get","title"],""],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.attraction_tour"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"icon-offset":[0,-30],"icon-image":"{dimension_what}","text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(330, 100%, 68%)","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"},"source-layer":"geojson"},{id:"Rest area text and icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.rest_area"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"icon-offset":[0,-30],"icon-image":"{dimension_what}","text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[24,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(330, 100%, 68%)","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"},"source-layer":"geojson"},{id:"Airport transfer icon and text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.airport_transfer"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-40],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"},"source-layer":"geojson"},{id:"Other Attraction icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["has","title"],["!=",["get","title"],""],["in",["get","dimension_what"],["literal",["what.service.movie_theatre"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"icon-offset":[0,-30],"icon-image":"{dimension_what}","text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(330, 100%, 68%)","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"},"source-layer":"geojson"},{id:"Other Service icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.lift","what.service.phone","what.service.baggage_storage","what.service.atm","what.service.money_exchange","what.service.internet","what.service.tv_lounge","what.service.toilet","what.service.baby_care","what.service.clinic","what.service.post","what.service.wifi","what.service.prayer_room","what.service.tax_refund","what.service.device_charging","what.service.meditation_room","what.service.smoking_area","what.service.information","what.service.cloakroom","what.service.prayer_room","what.service.adult_diaper_change","what.service.changi_rewards","what.service.toilet_accessible","what.service.shower"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[24,1]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"iShop Changi",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","title"],"iShop Changi"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-padding":1,"icon-size":{base:1,stops:[[17,.3],[22,1]]},"text-field":"{title}","text-font":["Lato Regular"],"text-max-width":4,"text-size":{base:1,stops:[[16,6],[20,18]]},"text-letter-spacing":-.05,"text-line-height":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 47%)","text-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Pickup Zone Text",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.transport.pickup","what.transport.pickup_car"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]}},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2},"source-layer":"geojson"},{id:"Gate screening icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.security"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.1],[19,1]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Immigration icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.immigration"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-allow-overlap":!0,"text-size":{base:1,stops:[[17,1],[20,18]]},"text-letter-spacing":-.05},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Parking icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.carpark","what.infra.parking_bike","what.infra.parking_bike_locked"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-40],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","text-offset":[0,0],"icon-size":{base:1,stops:[[17,.3],[22,1]]},"text-anchor":"top","text-field":"{title}","icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"#ec7033","text-halo-width":2,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Transport Taxi, Bus, Consierge and Train",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.transport.taxi_queue","what.transport.taxi","what.transport.type_bus","what.transport.bus","what.transport.train","what.service.ground_transport_concierge"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,0],"icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-allow-overlap":!0,visibility:"visible","text-offset":[0,1],"icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-translate":[0,0]},"source-layer":"geojson"},{id:"Construction area",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.construction"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(0, 0%, 100%)"],[17.5,"hsl(0, 0%, 70%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Construction outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.construction"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":"hsl(0, 0%, 70%)","line-opacity":1,"line-width":1},"source-layer":"geojson"},{id:"Construction text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.construction"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-letter-spacing":-.05,"icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-allow-overlap":!0,"text-size":{base:1,stops:[[17,1],[20,20]]},"text-max-width":5,"text-field":"{title}","text-font":["Lato Regular"]},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 39%)","text-halo-color":"hsl(0, 0%, 70%)","text-halo-width":4},"source-layer":"geojson"},{id:"highlight_custom_symbol",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:18,filter:["all",["all",["==",["geometry-type"],"Point"]],["any"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none","icon-image":"{dimension_what}","icon-size":1,"icon-optional":!0,"text-field":"{title}","text-max-width":4,"text-padding":2,"text-line-height":.8,"text-optional":!0,"text-font":["Lato Regular"],"icon-offset":[0,-16],"text-offset":[0,.2],"text-anchor":"top","text-size":{stops:[[16,10],[18,16]]}},paint:{"icon-opacity":{stops:[[16,0],[16.5,1]]},"text-color":"#fff","text-halo-width":2,"text-halo-color":"#373737","text-halo-blur":1,"text-opacity":{stops:[[18,0],[18.5,1]]}},"source-layer":"geojson"},{id:"Transit overlay",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(250, 75%, 33%)","fill-antialias":!1,"fill-opacity":{base:1,stops:[[16,.4],[16.5,0]]}},"source-layer":"geojson"},{id:"Public overlay",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Public"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(31, 100%, 43%)","fill-opacity":{base:1,stops:[[16,.4],[16.5,0]]},"fill-antialias":!1},"source-layer":"geojson"},{id:"Public overlay text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Public"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-offset":[0,-104],"icon-size":1,"text-field":"Public","text-size":25,"text-font":["Lato Regular"],"text-allow-overlap":!0},paint:{"icon-opacity":{base:1,stops:[[13,1],[13.5,0]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"hsl(22, 38%, 45%)","text-halo-width":2,"text-halo-blur":2,"text-opacity":{base:1,stops:[[15,0],[15.5,1],[16.25,1],[16.5,0]]}},"source-layer":"geojson"},{id:"Transit overlay text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-offset":[0,-104],"icon-size":1,"text-field":"Transit","text-font":["Lato Regular"],"text-size":25,"text-allow-overlap":!0},paint:{"icon-opacity":{base:1,stops:[[13,1],[13.5,0]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"hsl(254, 56%, 46%)","text-halo-width":2,"text-halo-blur":2,"text-opacity":{base:1,stops:[[15,0],[15.5,1],[16.25,1],[16.5,0]]}},"source-layer":"geojson"},{id:"Skytrain line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.skytrain"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"line-color":"hsl(13, 97%, 67%)","line-width":3},"source-layer":"geojson"},{id:"Skytrain icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.skytrain"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,0],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","text-offset":[0,1],"icon-size":.4,"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":2,"text-max-width":10},paint:{"icon-opacity":{base:1,stops:[[15,0],[15.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-translate":[0,0]},"source-layer":"geojson"},{id:"Building overlay",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:16,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#008FBA"],["where.changi.terminals.t1.l1","#1a72B6"],["where.changi.terminals.t2.l1","#ee3424"],["where.changi.terminals.t3.l1","#008880"],["where.changi.terminals.t4.l1","#6f2770"]],default:"#1a72B6"},"fill-opacity":{base:1,stops:[[15,.99],[15.5,0]]},"fill-antialias":!1},"source-layer":"geojson"},{id:"Building overlay outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:15.5,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#008FBA"],["where.changi.terminals.t1.l1","#1a72B6"],["where.changi.terminals.t2.l1","#ee3424"],["where.changi.terminals.t3.l1","#008880"],["where.changi.terminals.t4.l1","#6f2770"]],default:"#1a72B6"},"line-opacity":1,"line-width":2},"source-layer":"geojson"},{id:"Building icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-size":{base:1,stops:[[13,.21],[14,.3],[15,.6],[16,1]]},"text-font":["Lato Regular"],"text-size":50,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","building_Jewel"],["where.changi.terminals.t1.l1","building_T1"],["where.changi.terminals.t2.l1","building_T2"],["where.changi.terminals.t3.l1","building_T3"],["where.changi.terminals.t4.l1","building_T4"]],default:"building_T1"},"icon-offset":[0,0]},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2,"text-opacity":{base:1,stops:[[15.5,1],[15.6,0]]},"icon-opacity":{base:1,stops:[[15,1],[15.5,0]]}},"source-layer":"geojson"}],ul=[{id:"Smoke Zone Polygon",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.smoke_zone"]]]],paint:{"fill-color":"#7595ff","fill-opacity":.1}},{id:"Fire Zone Polygon",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],paint:{"fill-color":"#ff75df","fill-opacity":.1}},{id:"Smoke Zone Outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.smoke_zone"]]]],paint:{"line-color":"#1376bd","line-width":2,"line-dasharray":[4,2]}},{id:"Fire Zone Outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],paint:{"line-color":"#ff75df","line-width":2,"line-dasharray":[4,2]}},{id:"Fire Safety Icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.smoke_detector.general","what.fire_safety.smoke_detector.esc","what.fire_safety.beam_detector","what.fire_safety.flame_detector","what.fire_safety.manual_call_point","what.fire_safety.flow_switch"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,14]]},"icon-image":"{dimension_what}","text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"text-anchor":"top","text-offset":[0,.6],"icon-allow-overlap":["step",["zoom"],!1,20,!0],"text-allow-overlap":["step",["zoom"],!1,20,!0]},paint:{"text-color":"#ffffff","text-halo-color":"#ff75df","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Smoke Zone Title",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.smoke_zone"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,14],[20,24]]},"text-font":["Lato Regular"],"text-padding":1,"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"text-allow-overlap":!0},paint:{"text-color":"#ffffff","text-halo-color":"#1376bd","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2}},{id:"FA Zone Title",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,14],[20,24]]},"text-font":["Lato Regular"],"text-padding":1,"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"text-allow-overlap":!0},paint:{"text-color":"#ffffff","text-halo-color":"#ff75df","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2}}],cl=[{id:"airside turf fill",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.airside.turf"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.turf","#c5e0ca"]],default:"#c5e0ca"},"fill-opacity":1}},{id:"airside building fill",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.airside.building"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.building","#969ba3"]],default:"#969ba3"},"fill-opacity":1}},{id:"airside line base",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["in",["get","dimension_what"],["literal",["what.airside.taxiway","what.airside.lead_in_line","what.airside.push_back_line"]]],["==",["get","dimension_where"],"where.changi.airside"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#AAAAAA","line-opacity":1,"line-width":{base:1.4,stops:[[5.8,0],[6,3],[20,40]]}}},{id:"airside roadway edge",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["in",["geometry-type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airside.roadway_edge"]]],["==",["get","dimension_where"],"where.changi.airside"],["!=",["get","title"],"landside roadway"],["!=",["get","title"],"external layout"]],paint:{"line-color":"#8c98ab","line-opacity":1,"line-width":1},layout:{visibility:"visible"}},{id:"airside markings fill",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airside.markings.epa","what.airside.markings.era","what.airside.markings.esa","what.airside.markings.plb"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.markings.epa","blue"],["what.airside.markings.era","red"],["what.airside.markings.esa","green"],["what.airside.markings.plb","magenta"]],default:"black"},"fill-opacity":.1}},{id:"airside construction fill",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:14,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airside.construction"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.construction","#c9c9c9"]],default:"black"},"fill-opacity":.4}},{id:"airside kcz abl line",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.airside.markings.kcz","what.airside.markings.abl"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.markings.kcz","white"],["what.airside.markings.abl","#f29b9b"]],default:"black"},"line-width":1}},{id:"airside markings line",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.airside.markings.epa","what.airside.markings.era","what.airside.markings.esa","what.airside.markings.plb"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.markings.kcz","white"],["what.airside.markings.abl","#f29b9b"],["what.airside.markings.epa","#7dbaf0"],["what.airside.markings.era","#ff6b6b"],["what.airside.markings.esa","#8ed191"],["what.airside.markings.plb","#c893e6"]],default:"black"},"line-width":1}},{id:"airside construction line",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:14,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.airside.construction"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.construction","black"]],default:"black"},"line-width":1}},{id:"taxiway line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.taxiway"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"#fcd5a2","line-opacity":1,"line-width":1.5}},{id:"taxiway name",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.taxiway"],["==",["get","dimension_where"],"where.changi.airside"],["!=",["get","title"],"unknown"]],layout:{"symbol-placement":"line","symbol-spacing":150,"text-field":"{title}","text-font":["Lato Regular"],"text-max-angle":30,"text-pitch-alignment":"viewport","text-rotation-alignment":"map","text-size":9,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"#ffffff","text-halo-blur":1,"text-halo-color":"#807f7e","text-halo-width":2,"text-translate":[0,0]}},{id:"pushback line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.push_back_line"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"white","line-opacity":1,"line-width":1.5,"line-dasharray":[2,2]}},{id:"pushback fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.push_back_line"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":"white","fill-opacity":1}},{id:"leadin line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.lead_in_line"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"#f0d748","line-opacity":1,"line-width":1.5}},{id:"leadin fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.lead_in_line"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":"#f0d748","fill-opacity":1}},{id:"acft type marking line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.markings.acft_type"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"#e0d569","line-opacity":1,"line-width":1}},{id:"acft type marking names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airside.markings.acft_type"]]],["==",["get","dimension_where"],"where.changi.airside"]],layout:{visibility:"visible","text-field":"{text}","text-max-width":25,"text-font":["Lato Regular"],"text-padding":0,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-size":["interpolate",["exponential",2],["zoom"],13,["*",["get","height"],.1],15,["*",["get","height"],.5],17,["*",["get","height"],2],19,["*",["get","height"],5],22,["*",["get","height"],45]],"text-anchor":{type:"identity",property:"attachPt"},"text-justify":["match",["get","testJustify"],"left","left","right","right","center","center","auto"],"text-rotation-alignment":"map","text-rotate":["get","rotation"]},paint:{"text-color":"black"}},{id:"Compass Swing line dashed",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["in",["geometry-type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airside.markings.compass_swing"]]],["==",["get","dimension_where"],"where.changi.airside"],["==",["get","dxfDashed"],!0]],paint:{"line-color":"white","line-opacity":1,"line-width":2,"line-dasharray":[2,2]}},{id:"Compass Swing line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["in",["geometry-type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airside.markings.compass_swing"]]],["==",["get","dimension_where"],"where.changi.airside"],["!=",["get","dxfDashed"],!0]],paint:{"line-color":"white","line-opacity":1,"line-width":2}},{id:"EOT EOP line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["in",["geometry-type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airside.markings.eot","what.airside.markings.eop"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"white","line-opacity":1,"line-width":2}},{id:"EOT TOP Compass Swing names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airside.markings.eot","what.airside.markings.eop","what.airside.markings.compass_swing"]]],["==",["get","dimension_where"],"where.changi.airside"]],layout:{visibility:"visible","text-field":"{text}","text-max-width":25,"text-font":["Lato Regular"],"text-padding":0,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-size":["interpolate",["exponential",2],["zoom"],13,["*",["get","height"],.1],15,["*",["get","height"],.5],17,["*",["get","height"],2],19,["*",["get","height"],5],22,["*",["get","height"],45]],"text-anchor":{type:"identity",property:"attachPt"},"text-justify":["match",["get","testJustify"],"left","left","right","right","center","center","auto"],"text-rotation-alignment":"map","text-rotate":["get","rotation"]},paint:{"text-halo-color":"hsl(194, 0%, 60%)","text-color":"white","text-halo-width":1}},{id:"stand marking fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16.5,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airside.markings.stand"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{type:"identity",property:"dxfColour"},"fill-opacity":.7},layout:{"fill-sort-key":["coalesce",["-",1,["get","dxfArea"]],1]}},{id:"stand marking names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airside.markings.stand"]]],["==",["get","dimension_where"],"where.changi.airside"]],layout:{visibility:"visible","text-field":"{text}","text-max-width":25,"text-font":["Lato Regular"],"text-padding":0,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-size":["interpolate",["exponential",2],["zoom"],13,["*",["get","height"],.1],15,["*",["get","height"],.5],17,["*",["get","height"],2],19,["*",["get","height"],5],22,["*",["get","height"],45]],"text-anchor":{type:"identity",property:"attachPt"},"text-justify":["match",["get","testJustify"],"left","left","right","right","center","center","auto"],"text-rotation-alignment":"map","text-rotate":["-",["get","rotation"],-45]},paint:{"text-color":{type:"identity",property:"dxfColour"}}},{id:"mws marking fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16.5,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airside.markings.mws"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{type:"identity",property:"dxfColour"},"fill-opacity":.7},layout:{"fill-sort-key":["coalesce",["-",1,["get","dxfArea"]],1]}},{id:"taxiway holding psn line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.taxiway.holding_psn"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-opacity":1,"line-width":2.5,"line-dasharray":[4,2]}},{id:"runway holding psn line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.runway.holding_psn"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"#e0d569","line-opacity":1,"line-width":2.5}},{id:"runway fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.runway"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{type:"identity",property:"dxfColour"},"fill-opacity":.8},layout:{"fill-sort-key":["case",["==",["get","dxfColour"],"#ffffff"],2,["==",["get","dxfColour"],"#999999"],1,0]}},{id:"runway displ threshold fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.runway.displ_threshold"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{type:"identity",property:"dxfColour"},"fill-opacity":.8},layout:{"fill-sort-key":["case",["==",["get","dxfColour"],"#ffffff"],2,["==",["get","dxfColour"],"#999999"],1,0]}},{id:"runway stopway fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.runway.stopway"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{type:"identity",property:"dxfColour"},"fill-opacity":.8}},{id:"runway stopway line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.runway.stopway"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-opacity":.8}},{id:"runway clearway outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["get","dimension_what"],"what.airside.runway.clearway"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-width":1.5,"line-opacity":.8}},{id:"runway strip outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["get","dimension_what"],"what.airside.runway.strip"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-width":1.5,"line-dasharray":[8,4],"line-opacity":.8}},{id:"runway resa outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.runway.resa"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-width":1.5,"line-dasharray":[3,3],"line-opacity":1}},{id:"runway resa line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.runway.resa"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-width":1.5,"line-opacity":1}},{id:"airside building name",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.airside.building"],["==",["get","dimension_where"],"where.changi.airside"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-size":10,visibility:"visible"},paint:{"text-color":"#807f7e","text-halo-blur":1,"text-halo-color":"#ffffff","text-halo-width":1,"text-translate":[0,0]}},{id:"fence jet blast fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.fence.jet_blast"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":"#42566e","fill-opacity":.8}},{id:"fence jet blast name",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.fence.jet_blast"],["==",["get","dimension_where"],"where.changi.airside"]],layout:{"text-field":"Jet Blast Fence","text-font":["Lato Regular"],"text-size":10,visibility:"visible"},paint:{"text-color":"#807f7e","text-halo-blur":1,"text-halo-color":"#ffffff","text-halo-width":1,"text-translate":[0,0]}},{id:"fence perimeter line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.fence.perimeter"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"#f04f43","line-opacity":1,"line-width":1.5,"line-dasharray":[3,3]}},{id:"apron stand name",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.airside.apron.stand"],["==",["get","dimension_where"],"where.changi.airside"],["!=",["get","title"],"Unknown"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-size":12,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"#807f7e","text-halo-blur":1,"text-halo-color":"#ffffff","text-halo-width":1,"text-translate":[0,0]}},{id:"runway name",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.airside.runway"],["==",["get","dimension_where"],"where.changi.airside"],["!=",["get","title"],"Unknown"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-size":16,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"#807f7e","text-halo-blur":1,"text-halo-color":"#ffffff","text-halo-width":1,"text-translate":[0,0]}},{id:"Airside Construction Name",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airside.construction"]]],["==",["get","dimension_where"],"where.changi.airside"]],layout:{visibility:"visible","text-field":"{text}","text-max-width":25,"text-font":["Lato Regular"],"text-padding":0,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-size":["interpolate",["exponential",2],["zoom"],13,["*",["get","height"],.1],15,["*",["get","height"],.5],17,["*",["get","height"],2],19,["*",["get","height"],5],22,["*",["get","height"],45]],"text-anchor":{type:"identity",property:"attachPt"},"text-justify":["match",["get","testJustify"],"left","left","right","right","center","center","auto"],"text-rotation-alignment":"map","text-rotate":["%",["-",360,["+",["get","rotation"],0]],360]},paint:{"text-halo-color":"hsl(194, 0%, 60%)","text-color":{type:"identity",property:"dxfColour"},"text-halo-width":1}},{id:"Aerobridge",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.aerobridge","what.infra.tunnel"]]]],paint:{"fill-color":"hsl(0, 0%, 68%)","fill-opacity":{base:1,stops:[[15,0],[15.5,.99]]},"fill-antialias":!1}},{id:"Building overlay base",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel","where.changi.terminals.t1","where.changi.terminals.t2","where.changi.terminals.t3","where.changi.terminals.t4"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel","#97b5bc"],["where.changi.terminals.t1","#92a7b8"],["where.changi.terminals.t2","#d59d99"],["where.changi.terminals.t3","#8ab8b5"],["where.changi.terminals.t4","#a891aa"]],default:"#1a72B6"},"fill-opacity":.9,"fill-antialias":!1}},{id:"Building underlay icon",type:"symbol",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel","where.changi.terminals.t1","where.changi.terminals.t2","where.changi.terminals.t3","where.changi.terminals.t4"]]]],layout:{visibility:"visible","icon-size":{base:1,stops:[[13,.21],[14,.3],[15,.6],[16,1]]},"text-font":["Lato Regular"],"text-size":50,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel","building_Jewel"],["where.changi.terminals.t1","building_T1"],["where.changi.terminals.t2","building_T2"],["where.changi.terminals.t3","building_T3"],["where.changi.terminals.t4","building_T4"]],default:"building_T1"},"icon-offset":[0,0]},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2,"text-opacity":1,"icon-opacity":1}},{id:"Building overlay",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:16,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel","where.changi.terminals.t1","where.changi.terminals.t2","where.changi.terminals.t3","where.changi.terminals.t4"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel","#008FBA"],["where.changi.terminals.t1","#1a72B6"],["where.changi.terminals.t2","#ee3424"],["where.changi.terminals.t3","#008880"],["where.changi.terminals.t4","#6f2770"]],default:"#1a72B6"},"fill-opacity":{base:1,stops:[[15,.99],[15.5,0]]},"fill-antialias":!1}},{id:"Building overlay outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:15.5,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel","where.changi.terminals.t1","where.changi.terminals.t2","where.changi.terminals.t3","where.changi.terminals.t4"]]]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel","#008FBA"],["where.changi.terminals.t1","#1a72B6"],["where.changi.terminals.t2","#ee3424"],["where.changi.terminals.t3","#008880"],["where.changi.terminals.t4","#6f2770"]],default:"#1a72B6"},"line-opacity":1,"line-width":2}},{id:"Building icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel","where.changi.terminals.t1","where.changi.terminals.t2","where.changi.terminals.t3","where.changi.terminals.t4"]]]],layout:{visibility:"visible","icon-size":{base:1,stops:[[13,.21],[14,.3],[15,.6],[16,1]]},"text-font":["Lato Regular"],"text-size":50,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel","building_Jewel"],["where.changi.terminals.t1","building_T1"],["where.changi.terminals.t2","building_T2"],["where.changi.terminals.t3","building_T3"],["where.changi.terminals.t4","building_T4"]],default:"building_T1"},"icon-offset":[0,0]},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2,"text-opacity":{base:1,stops:[[15.5,1],[15.6,0]]},"icon-opacity":{base:1,stops:[[15,1],[15.5,0]]}}}];function hl(e,t,r){if(null!==e)for(var n,i,o,a,l,s,u,c,h=0,f=0,p=e.type,d="FeatureCollection"===p,g="Feature"===p,m=d?e.features.length:1,y=0;y<m;y++){l=(c=!!(u=d?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var v=0;v<l;v++){var w=0,b=0;if(null!==(a=c?u.geometries[v]:u)){s=a.coordinates;var _=a.type;switch(h=!r||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(s,f,y,w,b))return!1;f++,w++;break;case"LineString":case"MultiPoint":for(n=0;n<s.length;n++){if(!1===t(s[n],f,y,w,b))return!1;f++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(n=0;n<s.length;n++){for(i=0;i<s[n].length-h;i++){if(!1===t(s[n][i],f,y,w,b))return!1;f++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(n=0;n<s.length;n++){for(b=0,i=0;i<s[n].length;i++){for(o=0;o<s[n][i].length-h;o++){if(!1===t(s[n][i][o],f,y,w,b))return!1;f++}b++}w++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===hl(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function fl(e){var t=[1/0,1/0,-1/0,-1/0];return hl(e,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}function pl(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function dl(e,t){void 0===t&&(t={});var r=fl(e);return function(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!pl(e[0])||!pl(e[1]))throw new Error("coordinates must contain numbers");return function(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}({type:"Point",coordinates:e},t,r)}([(r[0]+r[2])/2,(r[1]+r[3])/2],t.properties,t)}fl.default=fl;var gl=6371008.8,ml={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:gl,metres:gl,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function yl(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return function(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}({type:"LineString",coordinates:e},t,r)}function vl(e){return e%360*Math.PI/180}function wl(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function bl(e,t,r){void 0===r&&(r={});var n=wl(e),i=wl(t),o=vl(i[1]-n[1]),a=vl(i[0]-n[0]),l=vl(n[1]),s=vl(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(l)*Math.cos(s);return function(e,t){void 0===t&&(t="kilometers");var r=ml[t];if(!r)throw new Error(t+" units is invalid");return e*r}(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),r.units)}function _l(e,t,r,n){if(!(i=n=n||{})||i.constructor!==Object)throw new Error("options is invalid");var i,o,a=[];if("Feature"===e.type)o=e.geometry.coordinates;else{if("LineString"!==e.type)throw new Error("input must be a LineString Feature or Geometry");o=e.coordinates}for(var l,s,u,c=o.length,h=0,f=0;f<o.length&&!(t>=h&&f===o.length-1);f++){if(h>t&&0===a.length){if(!(l=t-h))return a.push(o[f]),yl(a);s=Uo(o[f],o[f-1])-180,u=Jo(o[f],l,s,n),a.push(u.geometry.coordinates)}if(h>=r)return(l=r-h)?(s=Uo(o[f],o[f-1])-180,u=Jo(o[f],l,s,n),a.push(u.geometry.coordinates),yl(a)):(a.push(o[f]),yl(a));if(h>=t&&a.push(o[f]),f===o.length-1)return yl(a);h+=bl(o[f],o[f+1],n)}if(h<t&&o.length===c)throw new Error("Start position is beyond line");var p=o[o.length-1];return yl([p,p])}function xl(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n,i=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),o="Feature"===(n=t).type?n.geometry:n,a=o.type,l=t.bbox,s=o.coordinates;if(l&&!1===function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}(i,l))return!1;"Polygon"===a&&(s=[s]);for(var u=!1,c=0;c<s.length&&!u;c++)if(Sl(i,s[c][0],r.ignoreBoundary)){for(var h=!1,f=1;f<s[c].length&&!h;)Sl(i,s[c][f],!r.ignoreBoundary)&&(h=!0),f++;h||(u=!0)}return u}function Sl(e,t,r){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,o=t.length-1;i<t.length;o=i++){var a=t[i][0],l=t[i][1],s=t[o][0],u=t[o][1];if(e[1]*(a-s)+l*(s-e[0])+u*(e[0]-a)===0&&(a-e[0])*(s-e[0])<=0&&(l-e[1])*(u-e[1])<=0)return!r;l>e[1]!=u>e[1]&&e[0]<(s-a)*(e[1]-l)/(u-l)+a&&(n=!n)}return n}for(var Pl=function(){function e(){this.localStoarge=new o.MMKV}return e.prototype.contains=function(e){return this.localStoarge.contains(e)},e.prototype.getString=function(e){return this.localStoarge.getString(e)},e.prototype.set=function(e,t){this.localStoarge.set(e,t)},e.prototype.clearAll=function(){this.localStoarge.clearAll()},e}(),jl={},kl={byteLength:function(e){var t=Fl(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=Fl(e),i=n[0],o=n[1],a=new zl(function(e,t,r){return 3*(t+r)/4-r}(0,i,o)),l=0,s=o>0?i-4:i;for(r=0;r<s;r+=4)t=El[e.charCodeAt(r)]<<18|El[e.charCodeAt(r+1)]<<12|El[e.charCodeAt(r+2)]<<6|El[e.charCodeAt(r+3)],a[l++]=t>>16&255,a[l++]=t>>8&255,a[l++]=255&t;2===o&&(t=El[e.charCodeAt(r)]<<2|El[e.charCodeAt(r+1)]>>4,a[l++]=255&t);1===o&&(t=El[e.charCodeAt(r)]<<10|El[e.charCodeAt(r+1)]<<4|El[e.charCodeAt(r+2)]>>2,a[l++]=t>>8&255,a[l++]=255&t);return a},fromByteArray:function(e){for(var t,r=e.length,n=r%3,i=[],o=16383,a=0,l=r-n;a<l;a+=o)i.push(Cl(e,a,a+o>l?l:a+o));1===n?(t=e[r-1],i.push(Al[t>>2]+Al[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(Al[t>>10]+Al[t>>4&63]+Al[t<<2&63]+"="));return i.join("")}},Al=[],El=[],zl="undefined"!=typeof Uint8Array?Uint8Array:Array,Ml="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ol=0;Ol<64;++Ol)Al[Ol]=Ml[Ol],El[Ml.charCodeAt(Ol)]=Ol;function Fl(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function Ll(e){return Al[e>>18&63]+Al[e>>12&63]+Al[e>>6&63]+Al[63&e]}function Cl(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(Ll(n));return i.join("")}El["-".charCodeAt(0)]=62,El["_".charCodeAt(0)]=63;var Tl={
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react-native-geolocation-service"),t=require("react-native"),n=require("react-native-compass-heading"),r=require("react"),i=require("@maplibre/maplibre-react-native"),o=require("axios"),a=require("react-native-mmkv"),s=require("react-native-aes-crypto"),l=require("react-native-fs"),u=require("react-native-zip-archive"),c=require("@react-native-community/netinfo");function h(e){return e&&e.__esModule?e:{default:e}}var d=h(e),p=h(n),f=h(r),g=h(o),m=h(s),v=h(l),y=h(c),w=function(e,t){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},w(e,t)};function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)};function x(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function S(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function A(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t,n){return t=R(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,D()?Reflect.construct(t,n||[],R(e).constructor):t.apply(e,n))}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function T(e,t,n){return t&&k(e.prototype,t),n&&k(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function L(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(D=function(){return!!e})()}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach(function(t){E(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function N(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}"function"==typeof SuppressedError&&SuppressedError;var B=function(){function e(){this.gpsEnabled=!1,this.gpsWatchId=null,this.currentGPSPosition=null,this.gpsCallbacks={}}return e.prototype.requestGPSPermission=function(){return x(this,void 0,void 0,function(){var e,n,r,i,o;return S(this,function(a){switch(a.label){case 0:return a.trys.push([0,9,,10]),"android"!==t.Platform.OS?[3,4]:(e=t.PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,n=t.PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION,[4,t.PermissionsAndroid.check(e)]);case 1:return r=a.sent(),[4,t.PermissionsAndroid.check(n)];case 2:return i=a.sent(),r||i?[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}]:[4,t.PermissionsAndroid.request(e)];case 3:return(o=a.sent())===t.PermissionsAndroid.RESULTS.GRANTED?[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}]:o===t.PermissionsAndroid.RESULTS.DENIED?[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}]:[2,{granted:!1,denied:!0,prompt:!1,state:"denied"}];case 4:if(!d.default.requestAuthorization)return[3,8];a.label=5;case 5:return a.trys.push([5,7,,8]),[4,d.default.requestAuthorization("whenInUse")];case 6:switch(o=a.sent()){case"granted":return[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}];case"denied":return[2,{granted:!1,denied:!0,prompt:!1,state:"denied"}];case"disabled":case"restricted":return[2,{granted:!1,denied:!0,prompt:!1,state:"blocked"}];default:return[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}]}return[3,8];case 7:return a.sent(),[2,{granted:!1,denied:!0,prompt:!1,state:"denied"}];case 8:return[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}];case 9:return a.sent(),[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}];case 10:return[2]}})})},e.prototype.isGPSPermissionGranted=function(){return x(this,void 0,void 0,function(){return S(this,function(e){switch(e.label){case 0:return[4,this.requestGPSPermission()];case 1:return[2,e.sent().granted]}})})},e.prototype.enableGPS=function(e){return void 0===e&&(e={}),x(this,void 0,void 0,function(){var t;return S(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e.callbacks&&e.callbacks!==this.gpsCallbacks&&(this.gpsCallbacks=e.callbacks),[4,this.isGPSPermissionGranted()];case 1:if(!n.sent())throw{type:"permission_denied",message:"GPS permission is required to enable location services."};return this.startGPS(e),[2,{success:!0}];case 2:return t=n.sent(),this.handleGPSError(t),[2,{success:!1,warning:{type:"unavailable",message:"Failed to enable GPS due to an unexpected error."}}];case 3:return[2]}})})},e.prototype.disableGPS=function(){var e;this.stopGPS(),this.currentGPSPosition=null,(null===(e=this.gpsCallbacks)||void 0===e?void 0:e.onToggle)&&this.gpsCallbacks.onToggle(!1)},e.prototype.destroyGPS=function(){this.disableGPS(),this.gpsCallbacks={}},e.prototype.startGPS=function(e){var t=this;void 0===e&&(e={});var n=e.enableHighAccuracy,r=void 0===n||n,i=e.timeout,o=void 0===i?1e4:i,a=e.maximumAge,s=void 0===a?0:a;if(!d.default||!d.default.watchPosition){var l=new Error("Geolocation is not supported by this runtime.");throw l.code=0,l}this.gpsEnabled=!0;var u={enableHighAccuracy:r,timeout:o,maximumAge:s,distanceFilter:0,interval:100,fastestInterval:10};this.gpsWatchId=d.default.watchPosition(function(e){var n=t.mapNativePosition(e);t.currentGPSPosition=n,t.gpsCallbacks.onLocationUpdate&&t.gpsCallbacks.onLocationUpdate(n)},function(e){t.handleGPSError(e)},u)},e.prototype.stopGPS=function(){if(this.gpsEnabled=!1,null!==this.gpsWatchId){try{d.default.clearWatch(this.gpsWatchId)}catch(e){}this.gpsWatchId=null}},e.prototype.getGPSPosition=function(e){var t=this;void 0===e&&(e={});var n=e.enableHighAccuracy,r=void 0===n||n,i=e.timeout,o=void 0===i?1e4:i,a=e.maximumAge,s=void 0===a?15e3:a;return new Promise(function(e,n){d.default&&d.default.getCurrentPosition?d.default.getCurrentPosition(function(n){var r=t.mapNativePosition(n);t.currentGPSPosition=r,e(r)},function(e){return n(e)},{enableHighAccuracy:r,timeout:o,maximumAge:s}):n(new Error("Geolocation is not supported by this runtime."))})},e.prototype.isGPSEnabled=function(){return this.gpsEnabled},e.prototype.getCurrentGPSPosition=function(){return this.currentGPSPosition},e.prototype.handleGPSError=function(e){var t="Unknown GPS error occurred.",n=e&&"object"===z(e)&&"code"in e?Number(e.code):NaN;if(Number.isFinite(n))switch(n){case 1:t="GPS permission denied by user.";break;case 2:t="GPS position unavailable.";break;case 3:t="GPS request timed out."}this.gpsCallbacks.onError&&this.gpsCallbacks.onError(e,t)},e.prototype.mapNativePosition=function(e){var t,n,r,i;return{coordinates:[e.coords.longitude,e.coords.latitude],accuracy:e.coords.accuracy,timestamp:e.timestamp||Date.now(),heading:null!==(t=e.coords.heading)&&void 0!==t?t:void 0,speed:null!==(n=e.coords.speed)&&void 0!==n?n:void 0,altitude:null!==(r=e.coords.altitude)&&void 0!==r?r:void 0,altitudeAccuracy:null!==(i=e.coords.altitudeAccuracy)&&void 0!==i?i:void 0}},e}(),U=function(){function e(){this.compassEnabled=!1,this.currentCompassData=null,this.onUpdateCallbacks=new Set,this.onToggleCallbacks=new Set,this.onErrorCallbacks=new Set,this.degreeUpdateRate=3}return e.prototype.requestCompassPermission=function(){return x(this,void 0,void 0,function(){var e;return S(this,function(t){switch(t.label){case 0:console.log("🧭 Requesting compass permission..."),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.isCompassAvailable()];case 2:return t.sent()?(console.log("🧭 Compass permission granted (automatic)"),[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}]):(console.warn("🧭 Compass not available on this device"),[2,{granted:!1,denied:!0,prompt:!1,state:"unavailable"}]);case 3:return e=t.sent(),console.error("🧭 Error checking compass availability:",e),[2,{granted:!1,denied:!0,prompt:!1,state:"denied"}];case 4:return[2]}})})},e.prototype.isCompassAvailable=function(){return x(this,void 0,void 0,function(){return S(this,function(e){try{return[2,new Promise(function(e){var t=!1,n=setTimeout(function(){t||(t=!0,e(!1))},500);try{p.default.start(1,function(r){r.heading,r.accuracy;t||(t=!0,clearTimeout(n),p.default.stop(),e(!0))})}catch(r){clearTimeout(n),t||(t=!0,e(!1))}})]}catch(e){return[2,!1]}return[2]})})},e.prototype.enableCompass=function(e){return x(this,void 0,void 0,function(){var t,n;return S(this,function(r){switch(r.label){case 0:if(this.compassEnabled)return console.log("🧭 Compass already enabled"),[2,!0];r.label=1;case 1:return r.trys.push([1,3,,4]),e&&this.addCallback(e),[4,this.requestCompassPermission()];case 2:return t=r.sent(),console.log("🧭 Compass permission status:",t),t.denied||!t.granted?(console.warn("🧭 Compass permission denied or not granted"),this.handleCompassError({type:"permission_denied",message:"Compass permission denied. Please enable device sensor access in device settings."}),[2,!1]):(console.log("🧭 Compass permission granted, starting compass..."),this.compassEnabled=!0,this.startCompass(),this.onToggleCallbacks.forEach(function(e){try{e(!0)}catch(e){}}),[2,!0]);case 3:return n=r.sent(),console.error("Error enabling compass:",n),this.compassEnabled=!1,this.handleCompassError({type:"unavailable",message:"Failed to enable compass"}),[2,!1];case 4:return[2]}})})},e.prototype.disableCompass=function(){this.compassEnabled&&(this.compassEnabled=!1,this.stopCompass(),this.currentCompassData=null,this.onToggleCallbacks.forEach(function(e){try{e(!1)}catch(e){}}))},e.prototype.startCompass=function(){var e=this;console.log("🧭 Starting compass listeners...");try{p.default.start(this.degreeUpdateRate,function(t){var n=t.heading,r=t.accuracy;e.handleCompassUpdate(n,r)})}catch(e){console.error("🧭 Error starting compass:",e),this.handleCompassError({type:"unavailable",message:"Failed to start compass tracking"})}},e.prototype.stopCompass=function(){try{p.default.stop()}catch(e){console.error("🧭 Error stopping compass:",e)}},e.prototype.handleCompassUpdate=function(e,t){if(this.compassEnabled)try{var n=null!==e&&!isNaN(e),r={heading:e,accuracy:null!=t?t:null,timestamp:Date.now(),isCalibrated:n};this.currentCompassData=r,this.onUpdateCallbacks.forEach(function(e){try{e(r)}catch(e){}})}catch(e){console.error("Error processing compass update:",e),this.handleCompassError({type:"inaccurate",message:"Error processing compass data"})}},e.prototype.triggerCompassUpdate=function(e,t){void 0===t&&(t=null);var n=null!==e&&!isNaN(e),r={heading:e,accuracy:null!=t?t:null,timestamp:Date.now(),isCalibrated:n};this.currentCompassData=r,this.onUpdateCallbacks.forEach(function(e){try{e(r)}catch(e){}})},e.prototype.handleCompassError=function(e){this.onErrorCallbacks.forEach(function(t){try{t(e)}catch(e){}}),this.onToggleCallbacks.forEach(function(e){try{e(!1)}catch(e){}})},e.prototype.getCurrentCompassData=function(){return this.currentCompassData},e.prototype.isCompassEnabled=function(){return this.compassEnabled},e.prototype.getCompassHeading=function(){var e;return(null===(e=this.currentCompassData)||void 0===e?void 0:e.heading)||null},e.prototype.isCompassCalibrated=function(){var e;return(null===(e=this.currentCompassData)||void 0===e?void 0:e.isCalibrated)||!1},e.prototype.addCallback=function(e){e.onCompassUpdate&&this.onUpdateCallbacks.add(e.onCompassUpdate),e.onCompassToggle&&this.onToggleCallbacks.add(e.onCompassToggle),e.onCompassError&&this.onErrorCallbacks.add(e.onCompassError)},e.prototype.removeCallback=function(e){e.onCompassUpdate&&this.onUpdateCallbacks.delete(e.onCompassUpdate),e.onCompassToggle&&this.onToggleCallbacks.delete(e.onCompassToggle),e.onCompassError&&this.onErrorCallbacks.delete(e.onCompassError)},e.prototype.isCompassPermissionDenied=function(){return!1},e.prototype.destroy=function(){this.disableCompass(),this.onUpdateCallbacks.clear(),this.onToggleCallbacks.clear(),this.onErrorCallbacks.clear(),this.currentCompassData=null},e}();function H(e){var t=!1;return{getZoom:function(){return e.getZoom()},moveTo:function(n){var r,i=e.getCamera();if(i){var o=56===n.pitch,a=!o||!t;t=o;var s=a&&n.paddingFraction?function(e,t){var n,r,i,o;return{top:Math.round(t.height*(null!==(n=e.top)&&void 0!==n?n:0)),bottom:Math.round(t.height*(null!==(r=e.bottom)&&void 0!==r?r:0)),left:Math.round(t.width*(null!==(i=e.left)&&void 0!==i?i:0)),right:Math.round(t.width*(null!==(o=e.right)&&void 0!==o?o:0))}}(n.paddingFraction,e.getViewport()):void 0;i.setStop(_(_(_({center:n.center,bearing:n.bearing,pitch:n.pitch},a&&null!=n.zoom?{zoom:n.zoom}:{}),s?{padding:s}:{}),{duration:n.durationMs,easing:null!==(r=n.easing)&&void 0!==r?r:"linear"}))}},fitBounds:function(t,n){var r,i;null===(i=null===(r=e.getCamera())||void 0===r?void 0:r.fitBounds)||void 0===i||i.call(r,t,n)}}}function G(e){var t,n=e.position,o=e.showAccuracy,a=void 0===o||o,s=e.pulse,l=void 0===s||s,u=e.color,c=void 0===u?"#1E90FF":u,h=e.pulseColor,d=void 0===h?"#b7d8f7":h,p=e.showArrow,g=void 0===p||p,m=e.ref,v=r.useState(!0),y=v[0],w=v[1],b=r.useState(!0),x=b[0],S=b[1],A=r.useState(n),P=A[0],M=A[1],C=r.useState(0),k=C[0],T=C[1],E=r.useRef(null),R=r.useRef({});r.useEffect(function(){M(n)},[n]),r.useEffect(function(){if(l){var e=Date.now(),t=function(){var n=(Date.now()-e)%2e3,r=.5*Math.sin(n/2e3*Math.PI*2)+.5;T(r),E.current=requestAnimationFrame(t)};return E.current=requestAnimationFrame(t),function(){E.current&&cancelAnimationFrame(E.current),E.current=null}}},[l]),r.useImperativeHandle(m,function(){return Object.assign(R.current,{update:function(e,t,n){var r=null!=n&&Number.isFinite(n);M({coordinates:e,accuracy:t,timestamp:Date.now(),heading:r?n:void 0}),S(!r)},updateHeading:function(e){var t=null!=e&&Number.isFinite(e);M(function(n){return n?_(_({},n),{heading:t?e:void 0}):n}),S(!t)},show:function(){w(!0)},hide:function(){w(!1)},remove:function(){w(!1),M(null)}}),R.current});var L=r.useMemo(function(){var e;return P&&y?{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:P.coordinates},properties:{radius:8,accuracy:P.accuracy,heading:null!==(e=P.heading)&&void 0!==e?e:0}}]}:{type:"FeatureCollection",features:[]}},[P,y]);if(!P||!y)return null;var D=l?8+9.6*k:8,F=l?Math.max(Math.min(.9*(1-.7*k),.9),.2):.95;return f.default.createElement(f.default.Fragment,null,f.default.createElement(i.ShapeSource,{id:"gps-source",data:L},f.default.createElement(i.CircleLayer,{id:"gps-accuracy",style:{circleColor:c,circleOpacity:.2,circleRadius:["*",["get","accuracy"],.6],circleStrokeColor:c,circleStrokeWidth:1,visibility:a?"visible":"none"}}),f.default.createElement(i.CircleLayer,{id:"gps-pulse",style:{circleColor:d,circleOpacity:F,circleRadius:D,circleStrokeColor:d,circleStrokeWidth:2,visibility:x&&l?"visible":"none"}}),f.default.createElement(i.CircleLayer,{id:"gps-dot",style:{circleColor:c,circleOpacity:.95,circleRadius:6,circleStrokeColor:"#ffffff",circleStrokeWidth:2,visibility:x?"visible":"none"}}),f.default.createElement(i.SymbolLayer,{id:"gps-arrow",style:{iconImage:"arrow-marker",iconSize:.05,iconAllowOverlap:!0,iconRotate:null!==(t=P.heading)&&void 0!==t?t:0,iconRotationAlignment:"map",iconIgnorePlacement:!0,visibility:!x&&null!=P.heading&&Number.isFinite(P.heading)&&g?"visible":"none"}})))}function W(){var e;try{return null!==(e=require("expo-sensors").DeviceMotion)&&void 0!==e?e:null}catch(e){return null}}function V(e){var t,n,r;return e?{x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,z:null!==(r=e.z)&&void 0!==r?r:0}:null}function q(){var e=null;return{isSupported:function(){return null!=W()},requestPermission:function(){return x(this,void 0,void 0,function(){var e,t;return S(this,function(n){switch(n.label){case 0:if(!(e=W()))return[2,!1];n.label=1;case 1:return n.trys.push([1,6,,7]),"function"!=typeof e.isAvailableAsync?[3,3]:[4,e.isAvailableAsync()];case 2:if(!n.sent())return[2,!0];n.label=3;case 3:return"function"!=typeof e.requestPermissionsAsync?[3,5]:[4,e.requestPermissionsAsync()];case 4:return[2,"granted"===(null==(t=n.sent())?void 0:t.status)];case 5:return[2,!0];case 6:return n.sent(),[2,!1];case 7:return[2]}})})},start:function(t){var n,r=W();if(r){null==e||e(),null===(n=r.setUpdateInterval)||void 0===n||n.call(r,16);var i=r.addListener(function(e){t(function(e,t){var n,r,i;void 0===t&&(t=Date.now());var o=e.rotationRate;return{timestampMs:t,accelerationIncludingGravity:V(e.accelerationIncludingGravity),acceleration:V(e.acceleration),rotationRate:o?{alpha:null!==(n=o.alpha)&&void 0!==n?n:0,beta:null!==(r=o.beta)&&void 0!==r?r:0,gamma:null!==(i=o.gamma)&&void 0!==i?i:0}:null,interval:"number"==typeof e.interval&&e.interval>0?e.interval:16}}(e))});e=function(){return i.remove()}}},stop:function(){null==e||e(),e=null}}}function Z(){return globalThis.DeviceMotionEvent}var Y,$,K=(Y=q(),$=null,{isSupported:function(){return Y.isSupported()||!!Z()},requestPermission:function(){return x(this,void 0,void 0,function(){var e;return S(this,function(t){switch(t.label){case 0:if(Y.isSupported())return[2,Y.requestPermission()];if(!(null==(e=Z())?void 0:e.requestPermission))return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,e.requestPermission()];case 2:return[2,"granted"===t.sent()];case 3:return t.sent(),[2,!1];case 4:return[2,!!e]}})})},start:function(e){Y.isSupported()?Y.start(e):(null==$||$(),$=function(e){if("undefined"==typeof window||!Z())return null;var t=function(t){var n,r,i,o,a,s,l,u,c,h;e({timestampMs:Date.now(),accelerationIncludingGravity:t.accelerationIncludingGravity?{x:null!==(n=t.accelerationIncludingGravity.x)&&void 0!==n?n:0,y:null!==(r=t.accelerationIncludingGravity.y)&&void 0!==r?r:0,z:null!==(i=t.accelerationIncludingGravity.z)&&void 0!==i?i:0}:null,acceleration:t.acceleration?{x:null!==(o=t.acceleration.x)&&void 0!==o?o:0,y:null!==(a=t.acceleration.y)&&void 0!==a?a:0,z:null!==(s=t.acceleration.z)&&void 0!==s?s:0}:null,rotationRate:t.rotationRate?{alpha:null!==(l=t.rotationRate.alpha)&&void 0!==l?l:0,beta:null!==(u=t.rotationRate.beta)&&void 0!==u?u:0,gamma:null!==(c=t.rotationRate.gamma)&&void 0!==c?c:0}:null,interval:null!==(h=t.interval)&&void 0!==h?h:16})};return window.addEventListener("devicemotion",t),function(){return window.removeEventListener("devicemotion",t)}}(e))},stop:function(){Y.stop(),null==$||$(),$=null}}),J=function(){function e(e){void 0===e&&(e=K),this.handler=null,this.listening=!1,this.source=e}return e.prototype.requestPermission=function(){return x(this,void 0,void 0,function(){return S(this,function(e){return[2,this.source.requestPermission()]})})},e.prototype.isSupported=function(){return this.source.isSupported()},e.prototype.start=function(e){var t=this;this.handler=e,this.listening=!0,this.source.start(function(e){var n;t.listening&&(null===(n=t.handler)||void 0===n||n.call(t,e))})},e.prototype.stop=function(){this.listening=!1,this.handler=null,this.source.stop()},e}(),X=6371008.8,Q={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:X,metres:X,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function ee(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function te(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!oe(e[0])||!oe(e[1]))throw new Error("coordinates must contain numbers");return ee({type:"Point",coordinates:e},t,n)}function ne(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return ee({type:"LineString",coordinates:e},t,n)}function re(e,t,n){return void 0===n&&(n={}),ee({type:"MultiPoint",coordinates:e},t,n)}function ie(e){return e%360*Math.PI/180}function oe(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}var ae="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function se(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var le=function(){this.__data__=[],this.size=0};var ue=function(e,t){return e===t||e!=e&&t!=t},ce=ue;var he=function(e,t){for(var n=e.length;n--;)if(ce(e[n][0],t))return n;return-1},de=he,pe=Array.prototype.splice;var fe=he;var ge=he;var me=he;var ve=le,ye=function(e){var t=this.__data__,n=de(t,e);return!(n<0)&&(n==t.length-1?t.pop():pe.call(t,n,1),--this.size,!0)},we=function(e){var t=this.__data__,n=fe(t,e);return n<0?void 0:t[n][1]},be=function(e){return ge(this.__data__,e)>-1},_e=function(e,t){var n=this.__data__,r=me(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function xe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xe.prototype.clear=ve,xe.prototype.delete=ye,xe.prototype.get=we,xe.prototype.has=be,xe.prototype.set=_e;var Se=xe,Ae=Se;var Pe=function(){this.__data__=new Ae,this.size=0};var Me=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Ce=function(e){return this.__data__.get(e)};var ke=function(e){return this.__data__.has(e)},Te="object"==typeof ae&&ae&&ae.Object===Object&&ae,Ee=Te,Re="object"==typeof self&&self&&self.Object===Object&&self,Le=Ee||Re||Function("return this")(),De=Le.Symbol,Fe=De,Oe=Object.prototype,je=Oe.hasOwnProperty,Ne=Oe.toString,Ie=Fe?Fe.toStringTag:void 0;var ze=function(e){var t=je.call(e,Ie),n=e[Ie];try{e[Ie]=void 0;var r=!0}catch(e){}var i=Ne.call(e);return r&&(t?e[Ie]=n:delete e[Ie]),i},Be=Object.prototype.toString;var Ue=ze,He=function(e){return Be.call(e)},Ge=De?De.toStringTag:void 0;var We=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ge&&Ge in Object(e)?Ue(e):He(e)};var Ve=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},qe=We,Ze=Ve;var Ye,$e=function(e){if(!Ze(e))return!1;var t=qe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Ke=Le["__core-js_shared__"],Je=(Ye=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||""))?"Symbol(src)_1."+Ye:"";var Xe=function(e){return!!Je&&Je in e},Qe=Function.prototype.toString;var et=function(e){if(null!=e){try{return Qe.call(e)}catch(e){}try{return e+""}catch(e){}}return""},tt=$e,nt=Xe,rt=Ve,it=et,ot=/^\[object .+?Constructor\]$/,at=Function.prototype,st=Object.prototype,lt=at.toString,ut=st.hasOwnProperty,ct=RegExp("^"+lt.call(ut).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ht=function(e){return!(!rt(e)||nt(e))&&(tt(e)?ct:ot).test(it(e))},dt=function(e,t){return null==e?void 0:e[t]};var pt=function(e,t){var n=dt(e,t);return ht(n)?n:void 0},ft=pt(Le,"Map"),gt=pt(Object,"create"),mt=gt;var vt=function(){this.__data__=mt?mt(null):{},this.size=0};var yt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},wt=gt,bt=Object.prototype.hasOwnProperty;var _t=function(e){var t=this.__data__;if(wt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return bt.call(t,e)?t[e]:void 0},xt=gt,St=Object.prototype.hasOwnProperty;var At=gt;var Pt=vt,Mt=yt,Ct=_t,kt=function(e){var t=this.__data__;return xt?void 0!==t[e]:St.call(t,e)},Tt=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=At&&void 0===t?"__lodash_hash_undefined__":t,this};function Et(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Et.prototype.clear=Pt,Et.prototype.delete=Mt,Et.prototype.get=Ct,Et.prototype.has=kt,Et.prototype.set=Tt;var Rt=Et,Lt=Se,Dt=ft;var Ft=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Ot=function(e,t){var n=e.__data__;return Ft(t)?n["string"==typeof t?"string":"hash"]:n.map},jt=Ot;var Nt=Ot;var It=Ot;var zt=Ot;var Bt=function(){this.size=0,this.__data__={hash:new Rt,map:new(Dt||Lt),string:new Rt}},Ut=function(e){var t=jt(this,e).delete(e);return this.size-=t?1:0,t},Ht=function(e){return Nt(this,e).get(e)},Gt=function(e){return It(this,e).has(e)},Wt=function(e,t){var n=zt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Vt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vt.prototype.clear=Bt,Vt.prototype.delete=Ut,Vt.prototype.get=Ht,Vt.prototype.has=Gt,Vt.prototype.set=Wt;var qt=Se,Zt=ft,Yt=Vt;var $t=Se,Kt=Pe,Jt=Me,Xt=Ce,Qt=ke,en=function(e,t){var n=this.__data__;if(n instanceof qt){var r=n.__data__;if(!Zt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yt(r)}return n.set(e,t),this.size=n.size,this};function tn(e){var t=this.__data__=new $t(e);this.size=t.size}tn.prototype.clear=Kt,tn.prototype.delete=Jt,tn.prototype.get=Xt,tn.prototype.has=Qt,tn.prototype.set=en;var nn=tn;var rn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},on=pt,an=function(){try{var e=on(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var sn=function(e,t,n){"__proto__"==t&&an?an(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},ln=sn,un=ue,cn=Object.prototype.hasOwnProperty;var hn=function(e,t,n){var r=e[t];cn.call(e,t)&&un(r,n)&&(void 0!==n||t in e)||ln(e,t,n)},dn=hn,pn=sn;var fn=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),i?pn(n,s,l):dn(n,s,l)}return n};var gn=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var mn=function(e){return null!=e&&"object"==typeof e},vn=We,yn=mn;var wn=function(e){return yn(e)&&"[object Arguments]"==vn(e)},bn=mn,_n=Object.prototype,xn=_n.hasOwnProperty,Sn=_n.propertyIsEnumerable,An=wn(function(){return arguments}())?wn:function(e){return bn(e)&&xn.call(e,"callee")&&!Sn.call(e,"callee")},Pn=Array.isArray,Mn={};var Cn=function(){return!1};!function(e,t){var n=Le,r=Cn,i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}({get exports(){return Mn},set exports(e){Mn=e}},Mn);var kn=/^(?:0|[1-9]\d*)$/;var Tn=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&kn.test(e))&&e>-1&&e%1==0&&e<t};var En=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Rn=We,Ln=En,Dn=mn,Fn={};Fn["[object Float32Array]"]=Fn["[object Float64Array]"]=Fn["[object Int8Array]"]=Fn["[object Int16Array]"]=Fn["[object Int32Array]"]=Fn["[object Uint8Array]"]=Fn["[object Uint8ClampedArray]"]=Fn["[object Uint16Array]"]=Fn["[object Uint32Array]"]=!0,Fn["[object Arguments]"]=Fn["[object Array]"]=Fn["[object ArrayBuffer]"]=Fn["[object Boolean]"]=Fn["[object DataView]"]=Fn["[object Date]"]=Fn["[object Error]"]=Fn["[object Function]"]=Fn["[object Map]"]=Fn["[object Number]"]=Fn["[object Object]"]=Fn["[object RegExp]"]=Fn["[object Set]"]=Fn["[object String]"]=Fn["[object WeakMap]"]=!1;var On=function(e){return Dn(e)&&Ln(e.length)&&!!Fn[Rn(e)]};var jn=function(e){return function(t){return e(t)}},Nn={};!function(e,t){var n=Te,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,o=i&&i.exports===r&&n.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a}({get exports(){return Nn},set exports(e){Nn=e}},Nn);var In=On,zn=jn,Bn=Nn&&Nn.isTypedArray,Un=Bn?zn(Bn):In,Hn=gn,Gn=An,Wn=Pn,Vn=Mn,qn=Tn,Zn=Un,Yn=Object.prototype.hasOwnProperty;var $n=function(e,t){var n=Wn(e),r=!n&&Gn(e),i=!n&&!r&&Vn(e),o=!n&&!r&&!i&&Zn(e),a=n||r||i||o,s=a?Hn(e.length,String):[],l=s.length;for(var u in e)!t&&!Yn.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qn(u,l))||s.push(u);return s},Kn=Object.prototype;var Jn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Kn)};var Xn=function(e,t){return function(n){return e(t(n))}},Qn=Xn(Object.keys,Object),er=Jn,tr=Qn,nr=Object.prototype.hasOwnProperty;var rr=$e,ir=En;var or=function(e){return null!=e&&ir(e.length)&&!rr(e)},ar=$n,sr=function(e){if(!er(e))return tr(e);var t=[];for(var n in Object(e))nr.call(e,n)&&"constructor"!=n&&t.push(n);return t},lr=or;var ur=function(e){return lr(e)?ar(e):sr(e)},cr=fn,hr=ur;var dr=function(e,t){return e&&cr(t,hr(t),e)};var pr=Ve,fr=Jn,gr=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},mr=Object.prototype.hasOwnProperty;var vr=$n,yr=function(e){if(!pr(e))return gr(e);var t=fr(e),n=[];for(var r in e)("constructor"!=r||!t&&mr.call(e,r))&&n.push(r);return n},wr=or;var br=function(e){return wr(e)?vr(e,!0):yr(e)},_r=fn,xr=br;var Sr=function(e,t){return e&&_r(t,xr(t),e)},Ar={};!function(e,t){var n=Le,r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,o=i&&i.exports===r?n.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}}({get exports(){return Ar},set exports(e){Ar=e}},Ar);var Pr=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var Mr=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o};var Cr=function(){return[]},kr=Mr,Tr=Cr,Er=Object.prototype.propertyIsEnumerable,Rr=Object.getOwnPropertySymbols,Lr=Rr?function(e){return null==e?[]:(e=Object(e),kr(Rr(e),function(t){return Er.call(e,t)}))}:Tr,Dr=fn,Fr=Lr;var Or=function(e,t){return Dr(e,Fr(e),t)};var jr=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Nr=Xn(Object.getPrototypeOf,Object),Ir=jr,zr=Nr,Br=Lr,Ur=Cr,Hr=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ir(t,Br(e)),e=zr(e);return t}:Ur,Gr=fn,Wr=Hr;var Vr=function(e,t){return Gr(e,Wr(e),t)},qr=jr,Zr=Pn;var Yr=function(e,t,n){var r=t(e);return Zr(e)?r:qr(r,n(e))},$r=Yr,Kr=Lr,Jr=ur;var Xr=function(e){return $r(e,Jr,Kr)},Qr=Yr,ei=Hr,ti=br;var ni=function(e){return Qr(e,ti,ei)},ri=pt(Le,"DataView"),ii=ft,oi=pt(Le,"Promise"),ai=pt(Le,"Set"),si=pt(Le,"WeakMap"),li=We,ui=et,ci="[object Map]",hi="[object Promise]",di="[object Set]",pi="[object WeakMap]",fi="[object DataView]",gi=ui(ri),mi=ui(ii),vi=ui(oi),yi=ui(ai),wi=ui(si),bi=li;(ri&&bi(new ri(new ArrayBuffer(1)))!=fi||ii&&bi(new ii)!=ci||oi&&bi(oi.resolve())!=hi||ai&&bi(new ai)!=di||si&&bi(new si)!=pi)&&(bi=function(e){var t=li(e),n="[object Object]"==t?e.constructor:void 0,r=n?ui(n):"";if(r)switch(r){case gi:return fi;case mi:return ci;case vi:return hi;case yi:return di;case wi:return pi}return t});var _i=bi,xi=Object.prototype.hasOwnProperty;var Si=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&xi.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Ai=Le.Uint8Array;var Pi=function(e){var t=new e.constructor(e.byteLength);return new Ai(t).set(new Ai(e)),t},Mi=Pi;var Ci=function(e,t){var n=t?Mi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},ki=/\w*$/;var Ti=function(e){var t=new e.constructor(e.source,ki.exec(e));return t.lastIndex=e.lastIndex,t},Ei=De?De.prototype:void 0,Ri=Ei?Ei.valueOf:void 0;var Li=Pi;var Di=function(e,t){var n=t?Li(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},Fi=Pi,Oi=Ci,ji=Ti,Ni=function(e){return Ri?Object(Ri.call(e)):{}},Ii=Di;var zi=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Fi(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return Oi(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Ii(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return ji(e);case"[object Symbol]":return Ni(e)}},Bi=Ve,Ui=Object.create,Hi=function(){function e(){}return function(t){if(!Bi(t))return{};if(Ui)return Ui(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Gi=Nr,Wi=Jn;var Vi=function(e){return"function"!=typeof e.constructor||Wi(e)?{}:Hi(Gi(e))},qi=_i,Zi=mn;var Yi=function(e){return Zi(e)&&"[object Map]"==qi(e)},$i=jn,Ki=Nn&&Nn.isMap,Ji=Ki?$i(Ki):Yi,Xi=_i,Qi=mn;var eo=function(e){return Qi(e)&&"[object Set]"==Xi(e)},to=jn,no=Nn&&Nn.isSet,ro=no?to(no):eo,io=nn,oo=rn,ao=hn,so=dr,lo=Sr,uo=Ar,co=Pr,ho=Or,po=Vr,fo=Xr,go=ni,mo=_i,vo=Si,yo=zi,wo=Vi,bo=Pn,_o=Mn,xo=Ji,So=Ve,Ao=ro,Po=ur,Mo=br,Co="[object Arguments]",ko="[object Function]",To="[object Object]",Eo={};Eo[Co]=Eo["[object Array]"]=Eo["[object ArrayBuffer]"]=Eo["[object DataView]"]=Eo["[object Boolean]"]=Eo["[object Date]"]=Eo["[object Float32Array]"]=Eo["[object Float64Array]"]=Eo["[object Int8Array]"]=Eo["[object Int16Array]"]=Eo["[object Int32Array]"]=Eo["[object Map]"]=Eo["[object Number]"]=Eo[To]=Eo["[object RegExp]"]=Eo["[object Set]"]=Eo["[object String]"]=Eo["[object Symbol]"]=Eo["[object Uint8Array]"]=Eo["[object Uint8ClampedArray]"]=Eo["[object Uint16Array]"]=Eo["[object Uint32Array]"]=!0,Eo["[object Error]"]=Eo[ko]=Eo["[object WeakMap]"]=!1;var Ro=function e(t,n,r,i,o,a){var s,l=1&n,u=2&n,c=4&n;if(r&&(s=o?r(t,i,o,a):r(t)),void 0!==s)return s;if(!So(t))return t;var h=bo(t);if(h){if(s=vo(t),!l)return co(t,s)}else{var d=mo(t),p=d==ko||"[object GeneratorFunction]"==d;if(_o(t))return uo(t,l);if(d==To||d==Co||p&&!o){if(s=u||p?{}:wo(t),!l)return u?po(t,lo(s,t)):ho(t,so(s,t))}else{if(!Eo[d])return o?t:{};s=yo(t,d,l)}}a||(a=new io);var f=a.get(t);if(f)return f;a.set(t,s),Ao(t)?t.forEach(function(i){s.add(e(i,n,r,i,t,a))}):xo(t)&&t.forEach(function(i,o){s.set(o,e(i,n,r,o,t,a))});var g=h?void 0:(c?u?go:fo:u?Mo:Po)(t);return oo(g||t,function(i,o){g&&(i=t[o=i]),ao(s,o,e(i,n,r,o,t,a))}),s},Lo=Ro;var Do=function(e){return Lo(e,5)},Fo=Object.getPrototypeOf(t.Animated.ValueXY);__DEV__&&"AnimatedWithChildren"!==Fo.name&&console.error("AnimatedCoordinatesArray could not obtain AnimatedWithChildren base class");var Oo={useNativeDriver:!1},jo=function(){function e(){var t,n;return C(this,e),(n=M(this,e)).state=(t=n).onInitialState.apply(t,arguments),n}return L(e,Fo),T(e,[{key:"onInitialState",value:function(e){return{coords:e.map(function(e){return[e[0],e[1]]})}}},{key:"onGetValue",value:function(e){return e.coords}},{key:"onCalculate",value:function(e,t){var n=e.coords,r=e.targetCoords,i=t,o=1-i,a=Math.min(n.length,r.length),s=n.slice(0,a).map(function(e,t){return[e[0]*o+r[t][0]*i,e[1]*o+r[t][1]*i]});if(r.length>n.length){var l=n.length>0?n[n.length-1]:r[0],u=r.slice(a,r.length).map(function(e){return[l[0]*o+e[0]*i,l[1]*o+e[1]*i]});return{coords:[].concat(N(s),N(u)),targetCoords:r}}if(n.length>r.length){var c=r.length>0?r[r.length-1]:n[0],h=n.slice(a,n.length).map(function(e){return[e[0]*o+c[0]*i,e[1]*o+c[1]*i]});return{coords:[].concat(N(s),N(h)),targetCoords:r}}return{coords:s,targetCoords:r}}},{key:"onStart",value:function(e,t){var n=t.map(function(e){return[e[0],e[1]]});return O(O({},e),{},{targetCoords:n})}},{key:"animate",value:function(e,t,n){var r=this,i=n.toValue,o=t.start,a=t;return a.start=function(){var n;n=t,r.progressValue=e,r.progressValue.__addChild(r),r.animation=n,r.state=r.onStart(r.state,i),o.apply(void 0,arguments)},a}},{key:"timing",value:function(e){var n=new t.Animated.Value(1);return this.animate(n,t.Animated.loop(t.Animated.timing(n,O(O(O({},Oo),e),{},{toValue:0}))),e)}},{key:"spring",value:function(e){var n=new t.Animated.Value(0);return this.animate(n,t.Animated.spring(n,O(O(O({},Oo),e),{},{toValue:1})),e)}},{key:"decay",value:function(e){var n=new t.Animated.Value(0);return this.animate(n,t.Animated.decay(this.progressValue,O(O(O({},Oo),e),{},{toValue:1})),e)}},{key:"__getValue",value:function(){return this.progressValue?this.onGetValue(this.onCalculate(this.state,this.progressValue.__getValue())):this.onGetValue(this.state)}},{key:"destroy",value:function(){if(this.animation){var e=this.progressValue.__getValue();this.animation.stop(),this.state=this.onCalculate(this.state,e),this.progressValue.__removeChild(this),this.progressValue=null,this.animation=null}}}])}();function No(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Io(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function zo(e,t,n){void 0===n&&(n={});var r=No(e),i=No(t),o=ie(i[1]-r[1]),a=ie(i[0]-r[0]),s=ie(r[1]),l=ie(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return function(e,t){void 0===t&&(t="kilometers");var n=Q[t];if(!n)throw new Error(t+" units is invalid");return e*n}(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}function Bo(e){return e%360*Math.PI/180}function Uo(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ho(e,t,n){if(void 0===n&&(n={}),!0===n.final)return function(e,t){var n=Ho(t,e);return n=(n+180)%360}(e,t);var r=Uo(e),i=Uo(t),o=Bo(r[0]),a=Bo(i[0]),s=Bo(r[1]),l=Bo(i[1]),u=Math.sin(a-o)*Math.cos(l),c=Math.cos(s)*Math.sin(l)-Math.sin(s)*Math.cos(l)*Math.cos(a-o);return Math.atan2(u,c)%(2*Math.PI)*180/Math.PI}var Go=6371008.8,Wo={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:Go,metres:Go,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function Vo(e){return 180*(e%(2*Math.PI))/Math.PI}function qo(e){return e%360*Math.PI/180}function Zo(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Yo(e,t,n,r){void 0===r&&(r={});var i=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),o=qo(i[0]),a=qo(i[1]),s=qo(n),l=function(e,t){void 0===t&&(t="kilometers");var n=Wo[t];if(!n)throw new Error(t+" units is invalid");return e/n}(t,r.units),u=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(s));return function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Zo(e[0])||!Zo(e[1]))throw new Error("coordinates must contain numbers");return function(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}({type:"Point",coordinates:e},t,n)}([Vo(o+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(u))),Vo(u)],r.properties)}function $o(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function Ko(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function Jo(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Xo(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Qo(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function ea(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function ta(e,t){!function(e,t){var n,r,i,o,a,s,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(s=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}(e,function(e,n,r,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Qo(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Qo({type:a,coordinates:u},r),n,l))return!1}})}function na(e){if(!e)throw new Error("geojson is required");var t=[];return ta(e,function(e){!function(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=ea(r);break;case"LineString":n=[ea(r)]}n.forEach(function(n){var r=function(e,t){var n=[];return e.reduce(function(e,r){var i,o,a,s,l,u,c=function(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Qo({type:"LineString",coordinates:e},t,n)}([e,r],t);return c.bbox=(o=r,a=(i=e)[0],s=i[1],l=o[0],u=o[1],[a<l?a:l,s<u?s:u,a>l?a:l,s>u?s:u]),n.push(c),r}),n}(n,e.properties);r.forEach(function(e){e.id=t.length,t.push(e)})})}}(e,t)}),function(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}(t)}function ra(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}var ia={},oa={get exports(){return ia},set exports(e){ia=e}};function aa(e,t,n,r,i){sa(e,t,n||0,r||e.length-1,i||ua)}function sa(e,t,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);sa(e,t,Math.max(n,Math.floor(t-a*l/o+u)),Math.min(r,Math.floor(t+(o-a)*l/o+u)),i)}var c=e[t],h=n,d=r;for(la(e,n,t),i(e[r],c)>0&&la(e,n,r);h<d;){for(la(e,h,d),h++,d--;i(e[h],c)<0;)h++;for(;i(e[d],c)>0;)d--}0===i(e[n],c)?la(e,n,d):la(e,++d,r),d<=t&&(n=d+1),t<=d&&(r=d-1)}}function la(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function ua(e,t){return e<t?-1:e>t?1:0}function ca(e,t,n){if(!n)return t.indexOf(e);for(let r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function ha(e,t){da(e,0,e.children.length,t,e)}function da(e,t,n,r,i){i||(i=xa(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o=t;o<n;o++){const t=e.children[o];pa(i,e.leaf?r(t):t)}return i}function pa(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function fa(e,t){return e.minX-t.minX}function ga(e,t){return e.minY-t.minY}function ma(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function va(e){return e.maxX-e.minX+(e.maxY-e.minY)}function ya(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function wa(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function ba(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _a(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function xa(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Sa(e,t,n,r,i){const o=[t,n];for(;o.length;){if((n=o.pop())-(t=o.pop())<=r)continue;const a=t+Math.ceil((n-t)/r/2)*r;aa(e,a,t,n,i),o.push(t,a,a,n)}}var Aa={};!function(e){function t(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function n(e,n,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!d(e[0])||!d(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},n,r)}function r(e,n,r){void 0===r&&(r={});for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},n,r)}function i(e,n,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},n,r)}function o(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function a(e,n,r){return void 0===r&&(r={}),t({type:"MultiLineString",coordinates:e},n,r)}function s(e,n,r){return void 0===r&&(r={}),t({type:"MultiPoint",coordinates:e},n,r)}function l(e,n,r){return void 0===r&&(r={}),t({type:"MultiPolygon",coordinates:e},n,r)}function u(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function c(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function h(e){return 180*(e%(2*Math.PI))/Math.PI}function d(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={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},e.feature=t,e.geometry=function(e,t,o){switch(e){case"Point":return n(t).geometry;case"LineString":return i(t).geometry;case"Polygon":return r(t).geometry;case"MultiPoint":return s(t).geometry;case"MultiLineString":return a(t).geometry;case"MultiPolygon":return l(t).geometry;default:throw new Error(e+" is invalid")}},e.point=n,e.points=function(e,t,r){return void 0===r&&(r={}),o(e.map(function(e){return n(e,t)}),r)},e.polygon=r,e.polygons=function(e,t,n){return void 0===n&&(n={}),o(e.map(function(e){return r(e,t)}),n)},e.lineString=i,e.lineStrings=function(e,t,n){return void 0===n&&(n={}),o(e.map(function(e){return i(e,t)}),n)},e.featureCollection=o,e.multiLineString=a,e.multiPoint=s,e.multiPolygon=l,e.geometryCollection=function(e,n,r){return void 0===r&&(r={}),t({type:"GeometryCollection",geometries:e},n,r)},e.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},e.radiansToLength=u,e.lengthToRadians=c,e.lengthToDegrees=function(e,t){return h(c(e,t))},e.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},e.radiansToDegrees=h,e.degreesToRadians=function(e){return e%360*Math.PI/180},e.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(c(e,t),n)},e.convertArea=function(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=d,e.isObject=function(e){return!!e&&e.constructor===Object},e.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(e){if(!d(e))throw new Error("bbox must only contain numbers")})},e.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}}(Aa);var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});var Ma=Aa;function Ca(e,t,n){if(null!==e)for(var r,i,o,a,s,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,m=f?e.features.length:1,v=0;v<m;v++){s=(c=!!(u=f?e.features[v].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var y=0;y<s;y++){var w=0,b=0;if(null!==(a=c?u.geometries[y]:u)){l=a.coordinates;var _=a.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,v,w,b))return!1;d++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,v,w,b))return!1;d++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===t(l[r][i],d,v,w,b))return!1;d++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===t(l[r][i][o],d,v,w,b))return!1;d++}b++}w++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===Ca(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ka(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function Ta(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function Ea(e,t){var n,r,i,o,a,s,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(s=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function Ra(e,t){Ea(e,function(e,n,r,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Ma.feature(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u={type:a,coordinates:e.coordinates[l]};if(!1===t(Ma.feature(u,r),n,l))return!1}})}function La(e,t){Ra(e,function(e,n,r){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,l=0,u=0;return!1!==Ca(e,function(o,c,h,d,p){if(void 0===a||n>s||d>l||p>u)return a=o,s=n,l=d,u=p,void(i=0);var f=Ma.lineString([a,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,a=o})&&void 0}}})}function Da(e,t){if(!e)throw new Error("geojson is required");Ra(e,function(e,n,r){if(null!==e.geometry){var i=e.geometry.type,o=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,n,r,0,0))return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(!1===t(Ma.lineString(o[a],e.properties),n,r,a))return!1}}})}Pa.coordAll=function(e){var t=[];return Ca(e,function(e){t.push(e)}),t},Pa.coordEach=Ca,Pa.coordReduce=function(e,t,n,r){var i=n;return Ca(e,function(e,r,o,a,s){i=0===r&&void 0===n?e:t(i,e,r,o,a,s)},r),i},Pa.featureEach=Ta,Pa.featureReduce=function(e,t,n){var r=n;return Ta(e,function(e,i){r=0===i&&void 0===n?e:t(r,e,i)}),r},Pa.findPoint=function(e,t){if(t=t||{},!Ma.isObject(t))throw new Error("options is invalid");var n,r=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.coordIndex||0,s=t.properties;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),s=s||e.features[r].properties,n=e.features[r].geometry;break;case"Feature":s=s||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return Ma.point(l,s,t);case"MultiPoint":return i<0&&(i=l.length+i),Ma.point(l[i],s,t);case"LineString":return a<0&&(a=l.length+a),Ma.point(l[a],s,t);case"Polygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),Ma.point(l[o][a],s,t);case"MultiLineString":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),Ma.point(l[i][a],s,t);case"MultiPolygon":return i<0&&(i=l.length+i),o<0&&(o=l[i].length+o),a<0&&(a=l[i][o].length-a),Ma.point(l[i][o][a],s,t)}throw new Error("geojson is invalid")},Pa.findSegment=function(e,t){if(t=t||{},!Ma.isObject(t))throw new Error("options is invalid");var n,r=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.segmentIndex||0,s=t.properties;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),s=s||e.features[r].properties,n=e.features[r].geometry;break;case"Feature":s=s||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=l.length+a-1),Ma.lineString([l[a],l[a+1]],s,t);case"Polygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a-1),Ma.lineString([l[o][a],l[o][a+1]],s,t);case"MultiLineString":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a-1),Ma.lineString([l[i][a],l[i][a+1]],s,t);case"MultiPolygon":return i<0&&(i=l.length+i),o<0&&(o=l[i].length+o),a<0&&(a=l[i][o].length-a-1),Ma.lineString([l[i][o][a],l[i][o][a+1]],s,t)}throw new Error("geojson is invalid")},Pa.flattenEach=Ra,Pa.flattenReduce=function(e,t,n){var r=n;return Ra(e,function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)}),r},Pa.geomEach=Ea,Pa.geomReduce=function(e,t,n){var r=n;return Ea(e,function(e,i,o,a,s){r=0===i&&void 0===n?e:t(r,e,i,o,a,s)}),r},Pa.lineEach=Da,Pa.lineReduce=function(e,t,n){var r=n;return Da(e,function(e,i,o,a){r=0===i&&void 0===n?e:t(r,e,i,o,a)}),r},Pa.propEach=ka,Pa.propReduce=function(e,t,n){var r=n;return ka(e,function(e,i){r=0===i&&void 0===n?e:t(r,e,i)}),r},Pa.segmentEach=La,Pa.segmentReduce=function(e,t,n){var r=n,i=!1;return La(e,function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0}),r};var Fa={},Oa={},ja={};!function(e){function t(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function n(e,n,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!d(e[0])||!d(e[1]))throw new Error("coordinates must contain numbers");return t({type:"Point",coordinates:e},n,r)}function r(e,n,r){void 0===r&&(r={});for(var i=0,o=e;i<o.length;i++){var a=o[i];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}return t({type:"Polygon",coordinates:e},n,r)}function i(e,n,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return t({type:"LineString",coordinates:e},n,r)}function o(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function a(e,n,r){return void 0===r&&(r={}),t({type:"MultiLineString",coordinates:e},n,r)}function s(e,n,r){return void 0===r&&(r={}),t({type:"MultiPoint",coordinates:e},n,r)}function l(e,n,r){return void 0===r&&(r={}),t({type:"MultiPolygon",coordinates:e},n,r)}function u(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function c(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function h(e){return 180*(e%(2*Math.PI))/Math.PI}function d(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={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},e.feature=t,e.geometry=function(e,t,o){switch(e){case"Point":return n(t).geometry;case"LineString":return i(t).geometry;case"Polygon":return r(t).geometry;case"MultiPoint":return s(t).geometry;case"MultiLineString":return a(t).geometry;case"MultiPolygon":return l(t).geometry;default:throw new Error(e+" is invalid")}},e.point=n,e.points=function(e,t,r){return void 0===r&&(r={}),o(e.map(function(e){return n(e,t)}),r)},e.polygon=r,e.polygons=function(e,t,n){return void 0===n&&(n={}),o(e.map(function(e){return r(e,t)}),n)},e.lineString=i,e.lineStrings=function(e,t,n){return void 0===n&&(n={}),o(e.map(function(e){return i(e,t)}),n)},e.featureCollection=o,e.multiLineString=a,e.multiPoint=s,e.multiPolygon=l,e.geometryCollection=function(e,n,r){return void 0===r&&(r={}),t({type:"GeometryCollection",geometries:e},n,r)},e.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},e.radiansToLength=u,e.lengthToRadians=c,e.lengthToDegrees=function(e,t){return h(c(e,t))},e.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},e.radiansToDegrees=h,e.degreesToRadians=function(e){return e%360*Math.PI/180},e.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(c(e,t),n)},e.convertArea=function(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=d,e.isObject=function(e){return!!e&&e.constructor===Object},e.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(e){if(!d(e))throw new Error("bbox must only contain numbers")})},e.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}}(ja),Object.defineProperty(Oa,"__esModule",{value:!0});var Na=ja;function Ia(e,t,n){if(null!==e)for(var r,i,o,a,s,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,m=f?e.features.length:1,v=0;v<m;v++){s=(c=!!(u=f?e.features[v].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var y=0;y<s;y++){var w=0,b=0;if(null!==(a=c?u.geometries[y]:u)){l=a.coordinates;var _=a.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,v,w,b))return!1;d++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,v,w,b))return!1;d++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===t(l[r][i],d,v,w,b))return!1;d++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===t(l[r][i][o],d,v,w,b))return!1;d++}b++}w++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===Ia(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function za(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function Ba(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function Ua(e,t){var n,r,i,o,a,s,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(s=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}function Ha(e,t){Ua(e,function(e,n,r,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Na.feature(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u={type:a,coordinates:e.coordinates[l]};if(!1===t(Na.feature(u,r),n,l))return!1}})}function Ga(e,t){Ha(e,function(e,n,r){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,l=0,u=0;return!1!==Ia(e,function(o,c,h,d,p){if(void 0===a||n>s||d>l||p>u)return a=o,s=n,l=d,u=p,void(i=0);var f=Na.lineString([a,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,a=o})&&void 0}}})}function Wa(e,t){if(!e)throw new Error("geojson is required");Ha(e,function(e,n,r){if(null!==e.geometry){var i=e.geometry.type,o=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,n,r,0,0))return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(!1===t(Na.lineString(o[a],e.properties),n,r,a))return!1}}})}Oa.coordAll=function(e){var t=[];return Ia(e,function(e){t.push(e)}),t},Oa.coordEach=Ia,Oa.coordReduce=function(e,t,n,r){var i=n;return Ia(e,function(e,r,o,a,s){i=0===r&&void 0===n?e:t(i,e,r,o,a,s)},r),i},Oa.featureEach=Ba,Oa.featureReduce=function(e,t,n){var r=n;return Ba(e,function(e,i){r=0===i&&void 0===n?e:t(r,e,i)}),r},Oa.findPoint=function(e,t){if(t=t||{},!Na.isObject(t))throw new Error("options is invalid");var n,r=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.coordIndex||0,s=t.properties;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),s=s||e.features[r].properties,n=e.features[r].geometry;break;case"Feature":s=s||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return Na.point(l,s,t);case"MultiPoint":return i<0&&(i=l.length+i),Na.point(l[i],s,t);case"LineString":return a<0&&(a=l.length+a),Na.point(l[a],s,t);case"Polygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),Na.point(l[o][a],s,t);case"MultiLineString":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),Na.point(l[i][a],s,t);case"MultiPolygon":return i<0&&(i=l.length+i),o<0&&(o=l[i].length+o),a<0&&(a=l[i][o].length-a),Na.point(l[i][o][a],s,t)}throw new Error("geojson is invalid")},Oa.findSegment=function(e,t){if(t=t||{},!Na.isObject(t))throw new Error("options is invalid");var n,r=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,a=t.segmentIndex||0,s=t.properties;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),s=s||e.features[r].properties,n=e.features[r].geometry;break;case"Feature":s=s||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=l.length+a-1),Na.lineString([l[a],l[a+1]],s,t);case"Polygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a-1),Na.lineString([l[o][a],l[o][a+1]],s,t);case"MultiLineString":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a-1),Na.lineString([l[i][a],l[i][a+1]],s,t);case"MultiPolygon":return i<0&&(i=l.length+i),o<0&&(o=l[i].length+o),a<0&&(a=l[i][o].length-a-1),Na.lineString([l[i][o][a],l[i][o][a+1]],s,t)}throw new Error("geojson is invalid")},Oa.flattenEach=Ha,Oa.flattenReduce=function(e,t,n){var r=n;return Ha(e,function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)}),r},Oa.geomEach=Ua,Oa.geomReduce=function(e,t,n){var r=n;return Ua(e,function(e,i,o,a,s){r=0===i&&void 0===n?e:t(r,e,i,o,a,s)}),r},Oa.lineEach=Wa,Oa.lineReduce=function(e,t,n){var r=n;return Wa(e,function(e,i,o,a){r=0===i&&void 0===n?e:t(r,e,i,o,a)}),r},Oa.propEach=za,Oa.propReduce=function(e,t,n){var r=n;return za(e,function(e,i){r=0===i&&void 0===n?e:t(r,e,i)}),r},Oa.segmentEach=Ga,Oa.segmentReduce=function(e,t,n){var r=n,i=!1;return Ga(e,function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0}),r},Object.defineProperty(Fa,"__esModule",{value:!0});var Va=Oa;function qa(e){var t=[1/0,1/0,-1/0,-1/0];return Va.coordEach(e,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}qa.default=qa,Fa.default=qa;var Za=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const n=[];if(!_a(e,t))return n;const r=this.toBBox,i=[];for(;t;){for(let o=0;o<t.children.length;o++){const a=t.children[o],s=t.leaf?r(a):a;_a(e,s)&&(t.leaf?n.push(a):ba(e,s)?this._all(a,n):i.push(a))}t=i.pop()}return n}collides(e){let t=this.data;if(!_a(e,t))return!1;const n=[];for(;t;){for(let r=0;r<t.children.length;r++){const i=t.children[r],o=t.leaf?this.toBBox(i):i;if(_a(e,o)){if(t.leaf||ba(e,o))return!0;n.push(i)}}t=n.pop()}return!1}load(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(let t=0;t<e.length;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const e=this.data;this.data=t,t=e}this._insert(t,this.data.height-t.height-1,!0)}else this.data=t;return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=xa([]),this}remove(e,t){if(!e)return this;let n=this.data;const r=this.toBBox(e),i=[],o=[];let a,s,l;for(;n||i.length;){if(n||(n=i.pop(),s=i[i.length-1],a=o.pop(),l=!0),n.leaf){const r=ca(e,n.children,t);if(-1!==r)return n.children.splice(r,1),i.push(n),this._condense(i),this}l||n.leaf||!ba(n,r)?s?(a++,n=s.children[a],l=!1):n=null:(i.push(n),o.push(a),a=0,s=n,n=n.children[0])}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const n=[];for(;e;)e.leaf?t.push(...e.children):n.push(...e.children),e=n.pop();return t}_build(e,t,n,r){const i=n-t+1;let o,a=this._maxEntries;if(i<=a)return o=xa(e.slice(t,n+1)),ha(o,this.toBBox),o;r||(r=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,r-1))),o=xa([]),o.leaf=!1,o.height=r;const s=Math.ceil(i/a),l=s*Math.ceil(Math.sqrt(a));Sa(e,t,n,l,this.compareMinX);for(let i=t;i<=n;i+=l){const t=Math.min(i+l-1,n);Sa(e,i,t,s,this.compareMinY);for(let n=i;n<=t;n+=s){const i=Math.min(n+s-1,t);o.children.push(this._build(e,n,i,r-1))}}return ha(o,this.toBBox),o}_chooseSubtree(e,t,n,r){for(;r.push(t),!t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0;o<t.children.length;o++){const a=t.children[o],s=ma(a),l=ya(e,a)-s;l<i?(i=l,r=s<r?s:r,n=a):l===i&&s<r&&(r=s,n=a)}t=n||t.children[0]}return t}_insert(e,t,n){const r=n?e:this.toBBox(e),i=[],o=this._chooseSubtree(r,this.data,t,i);for(o.children.push(e),pa(o,r);t>=0&&i[t].children.length>this._maxEntries;)this._split(i,t),t--;this._adjustParentBBoxes(r,i,t)}_split(e,t){const n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r),a=xa(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,ha(n,this.toBBox),ha(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this.data=xa([e,t]),this.data.height=e.height+1,this.data.leaf=!1,ha(this.data,this.toBBox)}_chooseSplitIndex(e,t,n){let r,i=1/0,o=1/0;for(let a=t;a<=n-t;a++){const t=da(e,0,a,this.toBBox),s=da(e,a,n,this.toBBox),l=wa(t,s),u=ma(t)+ma(s);l<i?(i=l,r=a,o=u<o?u:o):l===i&&u<o&&(o=u,r=a)}return r||n-t}_chooseSplitAxis(e,t,n){const r=e.leaf?this.compareMinX:fa,i=e.leaf?this.compareMinY:ga;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this.toBBox,o=da(e,0,t,i),a=da(e,n-t,n,i);let s=va(o)+va(a);for(let r=t;r<n-t;r++){const t=e.children[r];pa(o,e.leaf?i(t):t),s+=va(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];pa(a,e.leaf?i(t):t),s+=va(a)}return s}_adjustParentBBoxes(e,t,n){for(let r=n;r>=0;r--)pa(t[r],e)}_condense(e){for(let t,n=e.length-1;n>=0;n--)0===e[n].children.length?n>0?(t=e[n-1].children,t.splice(t.indexOf(e[n]),1)):this.clear():ha(e[n],this.toBBox)}},Ya=Aa,$a=Pa,Ka=Fa.default,Ja=$a.featureEach;$a.coordEach;var Xa=Ya.featureCollection;function Qa(e){var t=new Za(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:Ka(e),Za.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:Ka(e),t.push(e)}):Ja(e,function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:Ka(e),t.push(e)}),Za.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:Ka(e),Za.prototype.remove.call(this,e,t)},t.clear=function(){return Za.prototype.clear.call(this)},t.search=function(e){var t=Za.prototype.search.call(this,this.toBBox(e));return Xa(t)},t.collides=function(e){return Za.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=Za.prototype.all.call(this);return Xa(e)},t.toJSON=function(){return Za.prototype.toJSON.call(this)},t.fromJSON=function(e){return Za.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=Ka(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=Ka(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}function es(e,t){var n={},r=[];if("LineString"===e.type&&(e=$o(e)),"LineString"===t.type&&(t=$o(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var i=ts(e,t);return i&&r.push(i),Ko(r)}var o=ia();return o.load(na(t)),ra(na(e),function(e){ra(o.search(e),function(t){var i=ts(e,t);if(i){var o=Xo(i).join(",");n[o]||(n[o]=!0,r.push(i))}})}),Ko(r)}function ts(e,t){var n=Xo(e),r=Xo(t);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],a=n[1][0],s=n[1][1],l=r[0][0],u=r[0][1],c=r[1][0],h=r[1][1],d=(h-u)*(a-i)-(c-l)*(s-o),p=(c-l)*(o-u)-(h-u)*(i-l),f=(a-i)*(o-u)-(s-o)*(i-l);if(0===d)return null;var g=p/d,m=f/d;return g>=0&&g<=1&&m>=0&&m<=1?function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Jo(e[0])||!Jo(e[1]))throw new Error("coordinates must contain numbers");return $o({type:"Point",coordinates:e},t,n)}([i+g*(a-i),o+g*(s-o)]):null}function ns(e,t,n){if(null!==e)for(var r,i,o,a,s,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,m=f?e.features.length:1,v=0;v<m;v++){s=(c=!!(u=f?e.features[v].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var y=0;y<s;y++){var w=0,b=0;if(null!==(a=c?u.geometries[y]:u)){l=a.coordinates;var _=a.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,v,w,b))return!1;d++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,v,w,b))return!1;d++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===t(l[r][i],d,v,w,b))return!1;d++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===t(l[r][i][o],d,v,w,b))return!1;d++}b++}w++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===ns(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function rs(e,t){!function(e,t){var n,r,i,o,a,s,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(s=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}(e,function(e,n,r,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(ee(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(ee({type:a,coordinates:u},r),n,l))return!1}})}function is(e,t,n){var r=n,i=!1;return function(e,t){rs(e,function(e,n,r){var i=0;if(e.geometry){var o=e.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var a,s=0,l=0,u=0;return!1!==ns(e,function(o,c,h,d,p){if(void 0===a||n>s||d>l||p>u)return a=o,s=n,l=d,u=p,void(i=0);var f=ne([a,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,a=o})&&void 0}}})}(e,function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0}),r}function os(e,t,n){void 0===n&&(n={});var r=te([1/0,1/0],{dist:1/0}),i=0;return rs(e,function(e){for(var o=Io(e),a=0;a<o.length-1;a++){var s=te(o[a]);s.properties.dist=zo(t,s,n);var l=te(o[a+1]);l.properties.dist=zo(t,l,n);var u=zo(s,l,n),c=Math.max(s.properties.dist,l.properties.dist),h=Ho(s,l),d=Yo(t,c,h+90,n),p=Yo(t,c,h-90,n),f=es(ne([d.geometry.coordinates,p.geometry.coordinates]),ne([s.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=zo(t,g,n),g.properties.location=i+zo(s,g,n)),s.properties.dist<r.properties.dist&&((r=s).properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=a+1,r.properties.location=i+u),g&&g.properties.dist<r.properties.dist&&((r=g).properties.index=a),i+=u}}),r}function as(e,t){return void 0===t&&(t={}),is(e,function(e,n){var r=n.geometry.coordinates;return e+zo(r[0],r[1],t)},0)}oa.exports=Qa,ia.default=Qa;var ss=function(){function e(){return C(this,e),M(this,e,arguments)}return L(e,jo),T(e,[{key:"onInitialState",value:function(e){return{fullRoute:e.map(function(e){return[e[0],e[1]]}),end:{from:0}}}},{key:"onGetValue",value:function(e){return e.actRoute||e.fullRoute}},{key:"onCalculate",value:function(e,t){var n,r=e.fullRoute,i=e.end;if(t>.5){var o=2*(t-.5);n=i.from*(1-o)+o*i.to}else{var a=2*t;n=i.from*(1-a)+a*i.to}for(var s=0,l=0,u=r.length-1;l<n&&u>0;)s=l,l+=zo(te(r[u]),te(r[u-1])),u-=1;if(t>.5){var c=(n-s)/(l-s),h=1-c,d=[].concat(N(r.slice(0,u+1)),[[r[u][0]*c+r[u+1][0]*h,r[u][1]*c+r[u+1][1]*h]]);return{fullRoute:r,end:O(O({},i),{},{current:n}),actRoute:d}}if(l<=n){var p=N(r.slice(r.length-2,r.length));return{fullRoute:r,end:O(O({},i),{},{current:n}),actRoute:p}}var f=(n-s)/(l-s),g=1-f,m=[[r[u][0]*f+r[u+1][0]*g,r[u][1]*f+r[u+1][1]*g]].concat(N(r.slice(u+1,r.length)));return{fullRoute:r,end:O(O({},i),{},{current:n}),actRoute:m}}},{key:"onStart",value:function(e,t){var n,r=e.fullRoute,i=e.end;if(t.end.point){var o=ne(r),a=os(o,t.end.point);n=as(o)-a.properties.location}else console.warn("RouteCoordinatesArray: toValue.end: should have either along or point");return{fullRoute:r,end:O(O({},i),{},{from:null!=i.current?i.current:i.from,to:n})}}},{key:"originalRoute",get:function(){return this.state.fullRoute}}])}(),ls=["match",["get","isNonHighlightedOverview"],"1","#A7A6BA","0",["match",["get","zone"],"transit","#4F7EF8","public","#CF9FFF","#CF9FFF"],["match",["get","zone"],"transit","#4F7EF8","public","#CF9FFF","#CF9FFF"]],us=["match",["get","isNonHighlightedOverview"],"1",.4,"0",1,1],cs=[{id:"route-line-outline-inactive",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!1]],paint:{"line-color":"#FFFFFF","line-gap-width":6},layout:{"line-cap":"round","line-join":"round"}},{id:"route-line-inactive",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!1]],style:{lineCap:"round",lineJoin:"round",lineColor:ls,lineWidth:5},paint:{"line-color":ls,"line-width":5,"line-opacity":us},layout:{"line-cap":"round","line-join":"round"},belowLayerID:"route-line-animate"},{id:"route-line-active",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!0]],style:{lineCap:"round",lineJoin:"round",lineColor:ls,lineWidth:6},paint:{"line-color":ls,"line-width":6,"line-opacity":us},layout:{"line-cap":"round","line-join":"round"},belowLayerID:"route-line-animate"},{id:"route-line-outline-active",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!0]],style:{lineCap:"round",lineJoin:"round",lineColor:"#FFFFFF",lineGapWidth:6},paint:{"line-color":"#FFFFFF","line-gap-width":6,"line-opacity":us},layout:{"line-cap":"round","line-join":"round"}},{id:"route-line-endpoint-active",type:"circle",filter:["all",["==",["geometry-type"],"Point"],["==",["get","highlight"],!0],["==",["get","isNode"],!0]],style:{circleRadius:2,circleOpacity:0,circleStrokeWidth:2,circleStrokeColor:"#FFFFFF",circleStrokeOpacity:.7},paint:{"circle-radius":2,"circle-opacity":0,"circle-stroke-width":2,"circle-stroke-color":"#FFFFFF","circle-stroke-opacity":.7}},{id:"route-line-endpoint-fill-active",type:"circle",filter:["all",["==",["geometry-type"],"Point"],["==",["get","highlight"],!0],["==",["get","isNode"],!0]],style:{circleRadius:2,circleColor:"#FFFFFF",circleOpacity:.7},paint:{"circle-color":"#FFFFFF","circle-radius":2,"circle-opacity":.7}}],hs=[{id:"route-line-animate",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!0]],style:{lineCap:"round",lineJoin:"round",lineColor:"#FFFFFF",lineOpacity:.7,lineWidth:4},paint:{"line-color":"#FFFFFF","line-width":4,"line-opacity":.7},layout:{"line-cap":"round","line-join":"round"},isAnimationLayer:!0}];var ds,ps={};function fs(e){var t=e.children,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["children"]);return _(_({},n),{name:e.name,taxonomyPath:e.taxonomyPath,children:(null!=t?t:[]).map(fs)})}function gs(e,t){if(e.taxonomyPath){var n=t.get(e.taxonomyPath);n&&(e.altMin=n.altMin,e.altMax=n.altMax,n.timestamp&&(e.altitudeTimestamp=n.timestamp))}for(var r=0,i=function(e){var t;return null!==(t=e.children)&&void 0!==t?t:[]}(e);r<i.length;r++){gs(i[r],t)}}function ms(e,t){if(!t||"object"!==z(t))return e;var n=function(e){for(var t=new Map,n=0,r=Object.keys(e);n<r.length;n++){var i=e[r[n]];if(i&&"object"===z(i))for(var o=0,a=Object.keys(i);o<a.length;o++){var s=i[a[o]];null!=(null==s?void 0:s.floorTaxonomyPath)&&"number"==typeof s.altMin&&"number"==typeof s.altMax&&t.set(s.floorTaxonomyPath,{altMin:s.altMin,altMax:s.altMax,timestamp:s.timestamp})}}return t}(t);if(0===n.size)return e;var r=JSON.parse(JSON.stringify(e));for(var i in r){var o=r[i];(null==o?void 0:o.taxonomyPath)&&gs(o,n)}return r}function vs(e,t){if(!e||"object"!==z(e)||0===Object.keys(e).length)return console.error("[focus-core] Focus tree data is missing or empty"),void(ps={});var n=function(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];(null==r?void 0:r.taxonomyPath)&&(t[n]=fs(r))}),t}(e);t&&(n=ms(n,t)),ps=n}function ys(){return ps}function ws(e){var t;return null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]}function bs(e){return 0===ws(e).length}function _s(e,t,n,r,i){if(void 0===r&&(r=0),void 0===i&&(i=null),n)return t(n,r,i),void ws(n).forEach(function(i){return _s(e,t,i,r+1,n)});for(var o in e){var a=e[o];(null==a?void 0:a.taxonomyPath)&&_s(e,t,a,0,null)}}function xs(){var e=ys(),t=[];for(var n in e){var r=e[n];(null==r?void 0:r.taxonomyPath)&&t.push(r)}return t}function Ss(e){if(!e)return null;var t=null;return _s(ys(),function(n){n.taxonomyPath===e&&(t=n)}),t}function As(e){if(!Ss(e))return[];for(var t=[],n=e;;){var r=Ps(n);if(!r)break;t.unshift(r),n=r.taxonomyPath}return t}function Ps(e){if(!e)return null;var t=null;return _s(ys(),function(n){ws(n).some(function(t){return t.taxonomyPath===e})&&(t=n)}),t}function Ms(e,t){if(t<0)return[];if(null===e||""===e)return 0===t?xs():xs().flatMap(function(e){return Ms(e.taxonomyPath,t)});var n=Ss(e);return n?0===t?[n]:1===t?ws(n):ws(n).flatMap(function(e){return Ms(e.taxonomyPath,t-1)}):[]}function Cs(e){var t=Ss(e);if(!t)return 0;var n=ws(t);return 0===n.length?0:1+Math.max.apply(Math,n.map(function(e){return Cs(e.taxonomyPath)}))}function ks(e){var t=ws(e);return 0===t.length?e.taxonomyPath?[e.taxonomyPath]:[]:t.flatMap(function(e){return ks(e)})}!function(e){e.Name="title",e.LocalRef="localRef",e.WhatTaxonomy="dimension_what"}(ds||(ds={}));var Ts=["Aerodrome","Aerodrome names","Aerobridge","Aerobridge gates","Airplanes","Airplanes outline","Building icon","Building overlay","Building overlay outline","Building underlay","Building underlay icon","Building underlay selected outline","building_outline","Changi Airport Connector","Changi Airport Connector Text","Changi Walkway Text","T2 overlay outline copy","Building overlay base","Skytrain track outdoor"];function Es(e){var t=[e],n=Ss(e);if(n){var r=ks(n);t=r.length>0&&!bs(n)?r:(bs(n),[n.taxonomyPath])}return t}function Rs(e,t){var n=e.filter;if("openmaptiles"!==e.source&&n){for(var r=!1,i=0;i<n.length;i+=1){var o=n[i];if(Array.isArray(o[1])&&"dimension_where"===o[1][1]){o[0]="in",o[2]=["literal",t],r=!0;break}}r||n.push(["in",["get","dimension_where"],["literal",t]])}}function Ls(e,t,n,r){function i(e,t){var n=t.filter(function(t){return!e.includes(t)});return e.push.apply(e,n),e}return function e(o){if(Array.isArray(o)&&"match"===o[0]){var a=A([],o,!0);return Array.isArray(a[1])&&a[1][1]===t?function(e,t){for(var o=3;o<t.length;o+=2){if(e[o]===r){var a=i(e[o-1],n);return void(e[o-1]=a)}o+2===t.length&&e.splice(o+1,0,n,r)}}(a,o):a[a.length-1]=e(a[a.length-1]),a}return["match",["get",t],n,r,o]}(e)}function Ds(e,t,n){return function e(r){if(Array.isArray(r)&&"match"===r[0]){var i=A([],r,!0);return Array.isArray(i[1])&&i[1][1]===t?n.length>0?function(e,t){for(var r=function(t){Array.isArray(e[t])&&n.forEach(function(n){var r=e[t].indexOf(n);r>-1&&(e[t].length>1?e[t].splice(r,1):e[t]=[""])})},i=2;i<t.length;i+=2)r(i)}(i,r):i=i[i.length-1]:i[i.length-1]=e(i[i.length-1]),i}}(e)}var Fs={lineColor:"line-color",lineWidth:"line-width",lineOpacity:"line-opacity",lineGapWidth:"line-gap-width"},Os=new Set(cs.filter(function(e){return"line"===e.type}).map(function(e){return e.id})),js=new Set(cs.filter(function(e){return"line"===e.type&&e.id.toLowerCase().includes("outline")}).map(function(e){return e.id})),Ns=function(e,t){var n,r,i=_({},null!==(n=e.style)&&void 0!==n?n:{}),o=_({},null!==(r=e.paint)&&void 0!==r?r:{});return Object.entries(t).forEach(function(e){var t=e[0],n=e[1];i[t]=n;var r=Fs[t];r&&(o[r]=n)}),_(_({},e),{style:i,paint:o})},Is={line:i.LineLayer,circle:i.CircleLayer,symbol:i.SymbolLayer,fill:i.FillLayer},zs={line:i.Animated.LineLayer,circle:i.Animated.CircleLayer,symbol:i.Animated.SymbolLayer,fill:i.Animated.FillLayer},Bs=function(e){var t=e.isAnimationLayer?zs[e.type]:Is[e.type];return t?f.default.createElement(t,{key:e.id,id:e.id,style:e.style,filter:e.filter}):(console.warn("Unsupported MapLibre layer type: ".concat(e.type)),null)};function Us(e){var n=e.metaAtlasCoreRef,o=e.triggerRender,a=r.useRef({}),s=r.useState(cs),l=s[0],u=s[1],c=r.useRef({type:"FeatureCollection",features:[]}),h=r.useRef(null),d=r.useRef(hs),p=r.useRef(new ss([])),g=function(e){p.current.destroy(),p.current=new ss(e)};r.useEffect(function(){!function(){if(p.current.__getValue().length>2){var e=te(p.current.originalRoute[0]);p.current.timing({toValue:{end:{point:e}},duration:2e3,easing:t.Easing.linear}).start()}}()},[p.current]),r.useImperativeHandle(e.ref,function(){return Object.assign(a.current,{setDisplayRoute:function(e){h.current=e},getDisplayRoute:function(){return h.current},setPatchFeatures:function(e){c.current=e,o()},setAnimatedCoordinates:function(e){g(e),o()},clear:function(){c.current={type:"FeatureCollection",features:[]},h.current=null,g([]),o()},filterRoutingLayersWhereDimension:function(e){var t=function(e,t){if(t){for(var n=[t],r=0;r<e.length;r+=1)Rs(e[r],n);return e}}(Do(l),e);u(t),o()},styleRouteLineLayer:function(e){var t=e.color,n=e.width,r=e.opacity,i=Math.max(n,0),a=Math.min(Math.max(r,0),1),s=l.map(function(e){return Os.has(e.id)?js.has(e.id)?Ns(e,{lineColor:"#FFFFFF",lineGapWidth:i>0?i+1:0,lineOpacity:a}):Ns(e,{lineColor:t,lineWidth:i,lineOpacity:a}):e});u(s),o()}}),a.current},[l,o,n]);var m=l.map(Bs).filter(Boolean);return f.default.createElement(f.default.Fragment,null,f.default.createElement(i.ShapeSource,{id:"mapPinsSource",data:c.current},m),p.current.__getValue().length>2?f.default.createElement(i.Animated.ShapeSource,{id:"route",data:new i.Animated.Shape({type:"LineString",coordinates:p.current})},f.default.createElement(i.Animated.LineLayer,{id:"lineroute",style:d.current[0].style})):null)}var Hs={id:"43f36e14-e3f5-43c1-84c0-50a9c80dc5c7",name:"MapLibre",layers:[{id:"background",type:"background",paint:{"background-color":"rgb(242,243,240)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"#e0e0e0"}},{id:"aeroway-area",type:"fill",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-color":"rgba(222, 222, 228, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-color":"rgb(230, 233, 229)"}},{id:"landcover_park",type:"fill",source:"openmaptiles","source-layer":"landcover",filter:["all",["==","subclass","park"]],layout:{visibility:"visible"},paint:{"fill-color":"#c8facc","fill-antialias":!0}},{id:"landcover_grass",type:"fill",source:"openmaptiles","source-layer":"landcover",filter:["all",["==","$type","Polygon"],["==","class","grass"]],layout:{visibility:"visible"},paint:{"fill-color":"#d6dcd6","fill-opacity":1}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["==","$type","Polygon"],["!=","brunnel","tunnel"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"rgba(208, 214, 218, 1)","fill-outline-color":{base:1,stops:[[0,"hsla(180, 6%, 63%, 0.82)"],[22,"hsla(180, 6%, 63%, 0.18)"]]}}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["==","$type","Polygon"],["==","subclass","ice_shelf"]],layout:{visibility:"visible"},paint:{"fill-color":"hsl(0, 0%, 98%)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["==","$type","Polygon"],["==","subclass","glacier"]],layout:{visibility:"visible"},paint:{"fill-color":"hsl(0, 0%, 98%)","fill-opacity":{base:1,stops:[[0,1],[8,.5]]}}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["==","$type","Polygon"],["==","class","residential"]],layout:{visibility:"visible"},paint:{"fill-color":"rgb(234, 234, 230)","fill-opacity":{base:.6,stops:[[8,.8],[9,.6]]}}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["==","$type","Polygon"],["==","class","wood"]],layout:{visibility:"visible"},paint:{"fill-color":"rgb(220,224,220)","fill-opacity":{base:1,stops:[[8,0],[12,1]]}}},{id:"water_name",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"symbol-placement":"line","symbol-spacing":500,"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-rotation-alignment":"map","text-size":12},paint:{"text-color":"rgb(157,169,177)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"tunnel_motorway_casing",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"butt","line-join":"miter",visibility:"visible"},paint:{"line-color":"rgb(213, 213, 213)","line-opacity":1,"line-width":{base:1.4,stops:[[5.8,0],[6,3],[20,40]]}}},{id:"tunnel_motorway_inner",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgb(234,234,234)","line-width":{base:1.4,stops:[[4,2],[6,1.3],[20,30]]}}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(251, 251, 251, 1)","line-opacity":1,"line-width":{base:1.55,stops:[[13,5],[20,20]]}}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsl(0, 0%, 88%)","line-opacity":1,"line-width":{base:1.5,stops:[[11,6],[17,55]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-opacity":1,"line-width":{base:1.5,stops:[[11,4],[17,50]]}}},{id:"road_area_pier",type:"fill",metadata:{},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","Polygon"],["==","class","pier"]],layout:{visibility:"visible"},paint:{"fill-antialias":!0,"fill-color":"rgb(242,243,240)"}},{id:"road_pier",type:"line",metadata:{},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["in","class","pier"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#F5f5f5","line-width":{base:1.2,stops:[[15,1],[17,4]]}}},{id:"highway_minor",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fdfdfd","line-opacity":.9,"line-width":{base:1.55,stops:[[13,1.8],[20,20]]}}},{id:"highway_major_casing",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==","$type","LineString"],["in","class","primary","secondary","tertiary","trunk"]],layout:{"line-cap":"butt","line-join":"miter",visibility:"visible"},paint:{"line-color":"rgb(213, 213, 213)","line-dasharray":[12,0],"line-width":{base:1.3,stops:[[10,3],[20,23]]}}},{id:"highway_major_inner",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==","$type","LineString"],["in","class","primary","secondary","tertiary","trunk"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fff","line-width":{base:1.3,stops:[[10,2],[20,20]]}}},{id:"highway_major_subtle",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==","$type","LineString"],["in","class","primary","secondary","tertiary","trunk"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 85%, 0.69)","line-width":2}},{id:"highway_motorway_casing",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"butt","line-join":"miter",visibility:"visible"},paint:{"line-color":"rgb(213, 213, 213)","line-dasharray":[2,0],"line-opacity":1,"line-width":{base:1.4,stops:[[5.8,0],[6,3],[20,40]]}}},{id:"highway_motorway_inner",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":{base:1,stops:[[5.8,"hsla(0, 0%, 85%, 0.53)"],[6,"#fff"]]},"line-width":{base:1.4,stops:[[4,2],[6,1.3],[20,30]]}}},{id:"highway_motorway_subtle",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==","$type","LineString"],["==","class","motorway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 85%, 0.53)","line-width":{base:1.4,stops:[[4,2],[6,1.3]]}}},{id:"railway_transit",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#dddddd","line-width":3}},{id:"railway_transit_dashline",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#fafafa","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#dddddd","line-width":3}},{id:"railway_service_dashline",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==","$type","LineString"],["==","class","rail"],["has","service"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#fafafa","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==","$type","LineString"],["all",["!has","service"],["==","class","rail"]]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#dddddd","line-width":{base:1.3,stops:[[16,3],[20,7]]}}},{id:"railway_dashline",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==","$type","LineString"],["all",["!has","service"],["==","class","rail"]]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#fafafa","line-dasharray":[3,3],"line-width":{base:1.3,stops:[[16,2],[20,6]]}}},{id:"highway_motorway_bridge_casing",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","motorway"]]],layout:{"line-cap":"butt","line-join":"miter",visibility:"visible"},paint:{"line-color":"rgb(213, 213, 213)","line-dasharray":[2,0],"line-opacity":1,"line-width":{base:1.4,stops:[[5.8,0],[6,5],[20,45]]}}},{id:"highway_motorway_bridge_inner",type:"line",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":{base:1,stops:[[5.8,"hsla(0, 0%, 85%, 0.53)"],[6,"#fff"]]},"line-width":{base:1.4,stops:[[4,2],[6,1.3],[20,30]]}}},{id:"highway_name_other",type:"symbol",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation_name",filter:["all",["!=","class","motorway"],["==","$type","LineString"]],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":"{name:latin} {name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-max-angle":30,"text-pitch-alignment":"viewport","text-rotation-alignment":"map","text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"#bbb","text-halo-blur":1,"text-halo-color":"#fff","text-halo-width":2,"text-translate":[0,0]}},{id:"highway_name_motorway",type:"symbol",metadata:{"mapbox:group":"b6371a3f2f5a9932464fa3867530a2e5"},source:"openmaptiles","source-layer":"transportation_name",filter:["all",["==","$type","LineString"],["==","class","motorway"]],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":"{ref}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-pitch-alignment":"viewport","text-rotation-alignment":"viewport","text-size":10,visibility:"visible"},paint:{"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-translate":[0,2]}},{id:"boundary_state",type:"line",metadata:{"mapbox:group":"a14c9607bc7954ba1df7205bf660433f"},source:"openmaptiles","source-layer":"boundary",filter:["==","admin_level",4],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-blur":.4,"line-color":"rgb(230, 204, 207)","line-dasharray":[2,2],"line-opacity":1,"line-width":{base:1.3,stops:[[3,1],[22,15]]}}},{id:"boundary_country_z0-4",type:"line",metadata:{"mapbox:group":"a14c9607bc7954ba1df7205bf660433f"},source:"openmaptiles","source-layer":"boundary",maxzoom:5,filter:["all",["==","admin_level",2],["!has","claimed_by"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-blur":{base:1,stops:[[0,.4],[22,4]]},"line-color":"rgb(230, 204, 207)","line-opacity":1,"line-width":{base:1.1,stops:[[3,1],[22,20]]}}},{id:"boundary_country_z5-",type:"line",metadata:{"mapbox:group":"a14c9607bc7954ba1df7205bf660433f"},source:"openmaptiles","source-layer":"boundary",minzoom:5,filter:["==","admin_level",2],layout:{"line-cap":"round","line-join":"round"},paint:{"line-blur":{base:1,stops:[[0,.4],[22,4]]},"line-color":"rgb(230, 204, 207)","line-opacity":1,"line-width":{base:1.1,stops:[[3,1],[22,20]]}}},{id:"place_other",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:14,filter:["all",["in","class","continent","hamlet","neighbourhood","isolated_dwelling"],["==","$type","Point"]],layout:{"text-anchor":"center","text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"center","text-offset":[.5,0],"text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_suburb",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:15,filter:["all",["==","$type","Point"],["==","class","suburb"]],layout:{"text-anchor":"center","text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"center","text-offset":[.5,0],"text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_village",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:14,filter:["all",["==","$type","Point"],["==","class","village"]],layout:{"icon-size":.4,"text-anchor":"left","text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"left","text-offset":[.5,.2],"text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"icon-opacity":.7,"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_town",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:15,filter:["all",["==","$type","Point"],["==","class","town"]],layout:{"text-anchor":{base:1,stops:[[0,"left"],[8,"center"]]},"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"left","text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"icon-opacity":.7,"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_city",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:14,filter:["all",["==","$type","Point"],["all",["!=","capital",2],["==","class","city"],[">","rank",3]]],layout:{"text-anchor":{base:1,stops:[[0,"left"],[8,"center"]]},"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"left","text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"icon-opacity":.7,"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_capital",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:12,filter:["all",["==","$type","Point"],["all",["==","capital",2],["==","class","city"]]],layout:{"text-anchor":{base:1,stops:[[0,"left"],[8,"center"]]},"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"left","text-size":14,"text-transform":"uppercase",visibility:"visible"},paint:{"icon-opacity":.7,"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_city_large",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:12,filter:["all",["==","$type","Point"],["all",["!=","capital",2],["<=","rank",3],["==","class","city"]]],layout:{"text-anchor":{base:1,stops:[[0,"left"],[8,"center"]]},"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-justify":"left","text-size":14,"text-transform":"uppercase",visibility:"visible"},paint:{"icon-opacity":.7,"text-color":"rgb(117, 129, 145)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_state",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:12,filter:["all",["==","$type","Point"],["==","class","state"]],layout:{"text-field":"{name:latin}\n{name:nonlatin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-size":10,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"rgb(113, 129, 144)","text-halo-blur":1,"text-halo-color":"rgb(242,243,240)","text-halo-width":1}},{id:"place_country_other",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:8,filter:["all",["==","$type","Point"],["==","class","country"],["!has","iso_a2"]],layout:{"text-field":"{name:latin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-size":{base:1,stops:[[0,9],[6,11]]},"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":{base:1,stops:[[3,"rgb(157,169,177)"],[4,"rgb(153, 153, 153)"]]},"text-halo-color":"rgba(236,236,234,0.7)","text-halo-width":1.4}},{id:"place_country_minor",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:8,filter:["all",["==","$type","Point"],["==","class","country"],[">=","rank",2],["has","iso_a2"]],layout:{"text-field":"{name:latin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-size":{base:1,stops:[[0,10],[6,12]]},"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":{base:1,stops:[[3,"rgb(157,169,177)"],[4,"rgb(153, 153, 153)"]]},"text-halo-color":"rgba(236,236,234,0.7)","text-halo-width":1.4}},{id:"place_country_major",type:"symbol",metadata:{"mapbox:group":"101da9f13b64a08fa4b6ac1168e89e5f"},source:"openmaptiles","source-layer":"place",maxzoom:6,filter:["all",["==","$type","Point"],["<=","rank",1],["==","class","country"],["has","iso_a2"]],layout:{"text-anchor":"center","text-field":"{name:latin}","text-font":["Source Sans Pro Black","Arial Unicode MS Regular"],"text-size":{base:1.4,stops:[[0,10],[3,12],[4,14]]},"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":{base:1,stops:[[3,"rgb(157,169,177)"],[4,"rgb(153, 153, 153)"]]},"text-halo-color":"rgba(236,236,234,0.7)","text-halo-width":1.4}}],sprite:"https://atoms-map-sprites.qa.cag.spatialverse.online/sprites/sprites",glyphs:"https://atoms-map-sprites.qa.cag.spatialverse.online/fonts/{fontstack}/{range}.pbf",sources:{openmaptiles:{type:"vector",url:"https://api.maptiler.com/tiles/v3/tiles.json?key=12H5hrITUbJ1sDrVPqkq"}},version:8},Gs=[{id:"Building overlay base",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#97b5bc"],["where.changi.terminals.t1.l1","#92a7b8"],["where.changi.terminals.t2.l1","#d59d99"],["where.changi.terminals.t3.l1","#8ab8b5"],["where.changi.terminals.t4.l1","#a891aa"]],default:"#1a72B6"},"fill-opacity":1,"fill-antialias":!1},"source-layer":"geojson"},{id:"Aerobridge",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.aerobridge","what.infra.tunnel"]]]],paint:{"fill-color":"hsl(0, 0%, 68%)","fill-opacity":{base:1,stops:[[15,0],[15.5,.99]]},"fill-antialias":!1},"source-layer":"geojson"},{id:"Airplanes",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.plane"]],paint:{"fill-color":{base:1,stops:[[15,"hsl(0, 0%, 53%)"],[15.5,"hsl(0, 0%, 100%)"]]},"fill-outline-color":"hsl(0, 0%, 50%)","fill-opacity":{base:1,stops:[[15,0],[15.5,.99]]},"fill-antialias":!1},"source-layer":"geojson"},{id:"building_outline",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","subType"],"building_outline"]],paint:{"fill-color":"hsl(0, 0%, 82%)","fill-opacity":.2,"fill-outline-color":"hsl(0, 0%, 82%)"},"source-layer":"geojson"},{id:"Skytrain track outdoor",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["get","dimension_where"],"where.changi.terminals.t2.l2"],["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.skytrain"]],paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-outline-color":"hsl(0, 0%, 69%)"},"source-layer":"geojson"},{id:"Skytrain line outdoor",type:"line",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.skytrain"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":"hsl(13, 97%, 67%)","line-width":3},"source-layer":"geojson"},{id:"Floor",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.floor","what.floor"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Skytrain track",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.skytrain"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"fill-color":"hsl(0, 0%, 100%)","fill-opacity":.99,"fill-outline-color":"hsl(0, 0%, 69%)"},"source-layer":"geojson"},{id:"Changi Airport Connector",type:"fill",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{visibility:"visible"},paint:{"fill-color":"#faefd6","fill-opacity":.99,"fill-outline-color":"#cd9d2d"},"source-layer":"geojson"},{id:"Changi Airport Connector Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{"symbol-placement":"line","symbol-spacing":300,"text-field":"{title}","text-font":["Lato Regular"],"text-max-angle":30,"text-pitch-alignment":"viewport","text-rotation-alignment":"map","text-size":12,"text-transform":"none"},paint:{"text-halo-color":"#cd9d2d","text-color":"#ffffff","text-halo-width":2},"source-layer":"geojson"},{id:"Changi Sheltered Walkway",type:"fill",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.transport.walkway_sheltered"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible"},paint:{"fill-color":"#d6e2fa","fill-opacity":.99,"fill-outline-color":"#375692"},"source-layer":"geojson"},{id:"Carpark fill",metadata:{"source-type":"steerpath_floor_tiles"},minzoom:16,maxzoom:24,type:"fill",source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.carpark","what.infra.parking_bike","what.infra.parking_bike_locked"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{stops:[[18,"#dddddd"],[19.25,"#c0c0c0"]]},"fill-opacity":{stops:[[16,0],[16.5,.99]]}},"source-layer":"geojson"},{id:"Public",type:"fill",minzoom:15,maxzoom:17,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Public"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"fill-color":"hsl(43, 100%, 98%)","fill-opacity":.3,"fill-antialias":!1},"source-layer":"geojson"},{id:"Transit",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"fill-color":"hsl(0, 0%, 100%)","fill-antialias":!1,"fill-opacity":.99},"source-layer":"geojson"},{id:"Hole fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.hole"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(0, 0%, 90%)","fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Immigration",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.immigration"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Other service areas",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.baggage_claim","what.service.atm","what.service.baby_care","what.service.baggage_storage","what.service.clinic","what.service.tax_refund","what.service.free_singapore_tour","what.service.information","what.service.internet","what.service.laptop_access","what.service.meditation_room","what.service.money_exchange","what.service.phone","what.service.post","what.service.prayer_room","what.service.smoking_area","what.service.cloakroom","what.service.toilet","what.service.wifi","what.other","what.service.prayer_room","what.service.adult_diaper_change","what.service.changi_rewards","what.service.toilet_accessible","what.service.shower"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(263, 75%, 96%)","fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Retail",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.retail_anchor"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#CAACED"],[17.5,"#E0CCF8"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Lounge",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.airline_lounge","what.service.pay_per_use_lounge","what.service.lodging","what.service.airport_transfer","what.service.vip_counter","what.service.connect_changi","what.service.lounge_changi"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(224, 46%, 72%)"],[17.5,"hsl(215, 66%, 94%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Gate",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Gate screening",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.security"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible"},paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 54%, 85%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Travelator",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.travelator"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(0, 0%, 96%)","fill-opacity":{base:1,stops:[[17,0],[17.5,.99]]}},"source-layer":"geojson"},{id:"Checkin",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.checkin","what.service.checkin_early"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 79%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Entertainment",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.movie_theatre","what.service.tv_lounge","what.service.attraction_tour"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(1, 100%, 82%)"],[17.5,"hsl(0, 100%, 95%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Entertainment outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.movie_theatre","what.service.tv_lounge","what.service.attraction_tour"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(330, 100%, 82%)"],[17.5,"hsl(330, 100%, 68%)"]]},"line-width":1},"source-layer":"geojson"},{id:"Water fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.water"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(195, 87%, 63%)"],[17.5,"hsl(197, 71%, 91%)"]]},"fill-opacity":.99,"fill-antialias":!0},"source-layer":"geojson"},{id:"Water outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.water"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(190, 91%, 53%)"],[17.5,"hsl(190, 100%, 41%)"]]},"line-width":1},"source-layer":"geojson"},{id:"Garden fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.garden"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(183, 64%, 56%)"],[17.5,"hsl(181, 49%, 89%)"]]},"fill-opacity":.99,"fill-antialias":!0},"source-layer":"geojson"},{id:"Garden outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.garden"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(159, 55%, 61%)"],[17.5,"hsl(164, 100%, 35%)"]]},"line-width":1},"source-layer":"geojson"},{id:"Pickup zone outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.transport.pickup","what.transport.pickup_car"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":"hsl(0, 0%, 78%)","line-width":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Pick-up Zone",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.transport.pickup","what.transport.pickup_car"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#bcbaba"],[17.5,"#ececec"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Restarea",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.rest_area"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(1, 100%, 82%)"],[17.5,"hsl(0, 100%, 95%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Food",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.food","what.shop.food","what.shop.food_anchor","what.shop.food_anchor"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"#FFD3B3"],[17.5,"#FFE3CE"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Road marking fill",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:19,maxzoom:24,filter:["all",["in",["get","$type"],["literal",["Polygon"]]],["==",["get","dimension_what"],"what.road.marking_fill"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-opacity":{base:1,stops:[[19,0],[19.25,1]]},"fill-color":"#ffffff"},"source-layer":"geojson"},{id:"road marking line",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",source:"custom",minzoom:19,maxzoom:24,filter:["all",["==",["get","dimension_what"],"what.road.marking_line"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-opacity":{base:1,stops:[[19,0],[19.25,1]]},"line-color":"#ffffff","line-width":1.5},"source-layer":"geojson"},{id:"Kerb",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:18,maxzoom:24,filter:["all",["==",["get","dimension_what"],"what.road.kerb"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-opacity":{base:1,stops:[[18,0],[18.25,1]]},"line-color":"hsl(0, 0%, 63%)","line-width":1.5},"source-layer":"geojson"},{id:"Hole outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.hole"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-opacity":{base:1,stops:[[17,0],[17.5,1]]},"line-color":"hsl(0, 0%, 68%)","line-width":1},"source-layer":"geojson"},{id:"Travelator outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.travelator"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{},paint:{"line-color":"hsl(0, 0%, 81%)","line-width":3,"line-opacity":1},"source-layer":"geojson"},{id:"Airplanes outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.airplane"]],layout:{},paint:{"line-color":"hsl(0, 0%, 76%)","line-opacity":{base:1,stops:[[15,0],[15.5,1]]}},"source-layer":"geojson"},{id:"Immigration outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.immigration"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"line-color":"hsl(0, 0%, 85%)","line-width":2},"source-layer":"geojson"},{id:"Checkin outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.checkin","what.service.checkin_early"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-width":1,"line-color":"#89CBDF"},"source-layer":"geojson"},{id:"Other service outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.baggage_claim","what.service.atm","what.service.baby_care","what.service.baggage_storage","what.service.clinic","what.service.free_singapore_tour","what.service.information","what.service.internet","what.service.laptop_access","what.service.meditation_room","what.service.money_exchange","what.service.phone","what.service.post","what.service.prayer_room","what.service.smoking_area","what.service.tax_refund","what.service.cloakroom","what.service.toilet","what.service.wifi","what.other","what.service.prayer_room","what.service.adult_diaper_change","what.service.changi_rewards","what.service.toilet_accessible","what.service.shower"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":"hsl(0, 0%, 78%)","line-width":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Retail outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.retail_anchor"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"#CAACED"],[17.5,"#986FCA"]]},"line-width":1},"source-layer":"geojson"},{id:"Lounge outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.service.airline_lounge","what.service.pay_per_use_lounge","what.service.lodging","what.service.airport_transfer","what.service.vip_counter","what.service.connect_changi","what.service.lounge_changi"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(224, 46%, 72%)"],[17.5,"hsl(224, 43%, 58%)"]]},"line-width":1},"source-layer":"geojson"},{id:"Food outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.shop.food","what.shop.food","what.shop.food_anchor","what.shop.food_anchor"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"#FFD3B3"],[17.5,"#FFB681"]]},"line-width":1},"source-layer":"geojson"},{id:"Gate and outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","$type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane","what.security"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"#89CBDF"],[17.5,"hsl(194, 56%, 49%)"]]},"line-width":1},"source-layer":"geojson"},{id:"Restarea outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.service.rest_area"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,stops:[[17,"hsl(330, 100%, 82%)"],[17.5,"hsl(330, 100%, 68%)"]]},"line-width":1},"source-layer":"geojson"},{id:"highlight_custom_fill",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",minzoom:18,source:"custom",filter:["all",["all",["==",["geometry-type"],"Polygon"]],["any"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"fill-color":"#f6f6f6","fill-opacity":{stops:[[16,0],[16.5,.5]]}},"source-layer":"geojson"},{id:"highlight_custom_outline",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",minzoom:18,source:"custom",filter:["all",["all",["==",["geometry-type"],"Polygon"]],["any"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none","line-join":"round","line-cap":"round"},paint:{"line-color":"#5d5d5d","line-blur":10,"line-width":20,"line-opacity":{stops:[[16,0],[16.5,1]]}},"source-layer":"geojson"},{id:"Public outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","title"],"Public"],["==",["get","dimension_what"],"what.infra.wing"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"line-width":2,"line-color":"hsl(0, 0%, 46%)"},"source-layer":"geojson"},{id:"Transit border",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":"hsl(270, 41%, 46%)","line-width":2},"source-layer":"geojson"},{id:"Floor outline aka wall fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.wall","what.wall"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(0, 0%, 56%)"},"source-layer":"geojson"},{id:"Floor outline aka wall",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.infra.wall","what.wall"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-width":{base:1,stops:[[15.5,1],[22,3]]},"line-color":"hsl(0, 0%, 56%)"},"source-layer":"geojson"},{id:"T2 overlay outline copy",metadata:{"source-type":"steerpath_floor_tiles"},type:"line",source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","subType"],"building_outline"]],layout:{visibility:"none"},paint:{"line-color":"#ee3424","line-opacity":1,"line-width":3},"source-layer":"geojson"},{id:"High poi extrude",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill-extrusion",minzoom:16,maxzoom:20,source:"custom",layout:{visibility:"none"},filter:["all",["==",["geometry-type"],"Polygon"],["all",["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.retail_anchor","what.shop.food","what.shop.food","what.shop.food_anchor","what.shop.food_anchor","what.service.checkin","what.airplane_gate","what.security"]]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-extrusion-base":0,"fill-extrusion-color":{base:1,type:"categorical",property:"dimension_what",stops:[["category_retail","#E0CCF8"],["category_retail_anchor","#E0CCF8"],["category_restaurant","#FFE3CE"],["category_restaurant_anchor","#FFE3CE"],["category_food","#FFE3CE"],["category_food_anchor","#FFE3CE"],["service_checkin","hsl(194, 79%, 91%)"],["category_airplane_gate","hsl(194, 79%, 91%)"],["category_security","hsl(194, 54%, 85%)"]],default:"#ebe8e5"},"fill-extrusion-height":{stops:[[17,0],[17.5,3],[19,3],[19.5,0]]},"fill-extrusion-opacity":{stops:[[17,0],[17.5,.75],[19,.75],[19.5,0]]}},"source-layer":"geojson"},{id:"Medium poi extrude",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill-extrusion",minzoom:16,maxzoom:20,source:"custom",layout:{visibility:"none"},filter:["all",["==",["geometry-type"],"Polygon"],["all",["in",["get","dimension_what"],["literal",["what.service.baggage_claim","what.other"]]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-extrusion-base":0,"fill-extrusion-color":{base:1,type:"categorical",property:"dimension_what",stops:[["service_baggage_claim","hsl(263, 75%, 96%)"],["category_other","hsl(263, 75%, 96%)"]],default:"#ebe8e5"},"fill-extrusion-height":{stops:[[17,0],[17.5,1.5],[19,1.5],[19.5,0]]},"fill-extrusion-opacity":{stops:[[17,0],[17.5,.75],[19,.75],[19.5,0]]}},"source-layer":"geojson"},{id:"Low poi extrude",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill-extrusion",minzoom:16,maxzoom:20,source:"custom",layout:{visibility:"none"},filter:["all",["in",["get","dimension_what"],["literal",["what.infra.garden"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-extrusion-base":0,"fill-extrusion-color":{base:1,type:"categorical",property:"dimension_what",stops:[["other","#ebe8e5"],["infrastructure_garden","hsl(181, 49%, 89%)"]],default:"#ebe8e5"},"fill-extrusion-height":{stops:[[17,0],[17.5,.5],[19,.5],[19.5,0]]},"fill-extrusion-opacity":{stops:[[17,0],[17.5,.75],[19,.75],[19.5,0]]}},"source-layer":"geojson"},{id:"temporarily_disabled_highlight_custom_extrusion",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill-extrusion",source:"custom",minzoom:18,layout:{visibility:"none"},filter:["all",["all",["==",["get","buildingRef"],"67"]],["any"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-extrusion-base":0,"fill-extrusion-color":{type:"identity",property:"fillExtrusionColor",default:"#fff"},"fill-extrusion-height":{stops:[[16,0],[16.5,.1]]},"fill-extrusion-opacity":{stops:[[16,0],[16.5,.5]]}},"source-layer":"geojson"},{id:"Aerobridge gates",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.aerobridge"]],layout:{visibility:"none","text-field":"{cad_text}","text-font":["Lato Regular"],"text-padding":0,"text-size":15,"text-ignore-placement":!0},paint:{"text-opacity":{base:1,stops:[[15,0],[15.5,1],[17,1],[17.5,0]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(194, 64%, 49%)","text-halo-width":2},"source-layer":"geojson"},{id:"Gate names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airplane_gate","what.gate_airplane"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-ignore-placement":!0,"text-size":18,"text-allow-overlap":!0},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(194, 79%, 91%)","text-color":"hsl(194, 64%, 49%)","text-halo-width":2},"source-layer":"geojson"},{id:"Lounge title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.service.airline_lounge","what.service.lodging","what.service.vip_counter","what.service.checkin_early","what.service.connect_changi","what.service.lounge_changi"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]],["has","title"],["!=",["get","title"],""]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"text-padding":2,"text-font":["Lato Regular"],"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"icon-image":"{dimension_what}","icon-offset":[0,-32],"text-anchor":"top","icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-padding":1},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-blur":0,"text-halo-color":"hsl(224, 43%, 58%)","text-halo-width":1.5,"text-color":"#ffffff","text-translate":[0,0],"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Pay Per Use Lounge title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.service.pay_per_use_lounge"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]],["has","title"],["!=",["get","title"],""]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"text-padding":2,"text-font":["Lato Regular"],"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"icon-image":"what.service.airline_lounge","icon-offset":[0,-32],"text-anchor":"top","icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-padding":1},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-blur":0,"text-halo-color":"hsl(224, 43%, 58%)","text-halo-width":1.5,"text-color":"#ffffff","text-translate":[0,0],"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Tenant title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.shop.retail","what.shop.food"]]],["!=",["get","title"],""],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-20],"icon-image":"{dimension_what}","text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-color":"#ffffff","text-halo-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.shop.retail","hsl(267, 31%, 52%)"],["what.shop.food","hsl(25, 76%, 58%)"]],default:"hsl(267, 31%, 52%)"},"text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Anchor tenant title",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.shop.retail_anchor","what.shop.food_anchor"]]],["!=",["get","title"],""],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-20],"icon-image":{base:1,type:"categorical",property:"dimension_what",stops:[["what.shop.retail_anchor","what.shop.retail"],["what.shop.food_anchor","what.shop.food"]],default:"what.shop.retail"},"text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"text-max-width":5},paint:{"text-color":"#ffffff","text-halo-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.shop.retail_anchor","hsl(267, 31%, 52%)"],["what.shop.food_anchor","hsl(25, 76%, 58%)"]],default:"hsl(267, 31%, 52%)"},"text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Entrance texts",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.entrance"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]},"text-ignore-placement":!0,"text-max-width":5},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2},"source-layer":"geojson"},{id:"Exit texts",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.exit"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]},"text-ignore-placement":!0},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2},"source-layer":"geojson"},{id:"Changi Walkway Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.walkway"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-pitch-alignment":"viewport","text-size":12},paint:{"text-halo-color":"#cd9d2d","text-color":"#ffffff","text-halo-width":2,"text-opacity":0},"source-layer":"geojson"},{id:"Changi Sheltered Walkway Text",type:"symbol",minzoom:16,maxzoom:24,metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.walkway_sheltered"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-pitch-alignment":"viewport","text-size":12},paint:{"text-halo-color":"#375692","text-color":"#ffffff","text-halo-width":2},"source-layer":"geojson"},{id:"Checkin row text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.checkin"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]}},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2},"source-layer":"geojson"},{id:"Belt text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.baggage_claim"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]}},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2},"source-layer":"geojson"},{id:"Infrastructure icons",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.ramp","what.infra.escalator"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[22,.7]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Attraction text and icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["has","title"],["!=",["get","title"],""],["in",["get","dimension_what"],["literal",["what.shop.fun","what.service.attraction_tour"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"icon-offset":[0,-30],"icon-image":"{dimension_what}","text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(330, 100%, 68%)","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"},"source-layer":"geojson"},{id:"Rest area text and icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.rest_area"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"icon-offset":[0,-30],"icon-image":"{dimension_what}","text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[24,1]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(330, 100%, 68%)","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"},"source-layer":"geojson"},{id:"Airport transfer icon and text",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.airport_transfer"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-40],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"},"source-layer":"geojson"},{id:"Other Attraction icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["has","title"],["!=",["get","title"],""],["in",["get","dimension_what"],["literal",["what.service.movie_theatre"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[22,15]]},"icon-offset":[0,-30],"icon-image":"{dimension_what}","text-transform":"uppercase","text-font":["Lato Regular"],visibility:"visible","icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(330, 100%, 68%)","text-halo-width":2,"text-halo-blur":0,"text-color":"hsl(0, 0%, 100%)"},"source-layer":"geojson"},{id:"Other Service icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.lift","what.service.phone","what.service.baggage_storage","what.service.atm","what.service.money_exchange","what.service.internet","what.service.tv_lounge","what.service.toilet","what.service.baby_care","what.service.clinic","what.service.post","what.service.wifi","what.service.prayer_room","what.service.tax_refund","what.service.device_charging","what.service.meditation_room","what.service.smoking_area","what.service.information","what.service.cloakroom","what.service.prayer_room","what.service.adult_diaper_change","what.service.changi_rewards","what.service.toilet_accessible","what.service.shower"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[24,1]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"iShop Changi",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","title"],"iShop Changi"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-padding":1,"icon-size":{base:1,stops:[[17,.3],[22,1]]},"text-field":"{title}","text-font":["Lato Regular"],"text-max-width":4,"text-size":{base:1,stops:[[16,6],[20,18]]},"text-letter-spacing":-.05,"text-line-height":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 47%)","text-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Pickup Zone Text",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.transport.pickup","what.transport.pickup_car"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-field":"{title}","text-font":["Lato Regular"],"text-padding":0,"text-size":{base:1,stops:[[17,8],[18,15]]}},paint:{"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"hsl(0, 0%, 100%)","text-color":"hsl(0, 0%, 39%)","text-halo-width":2},"source-layer":"geojson"},{id:"Gate screening icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.security"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.1],[19,1]]},"icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Immigration icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.service.immigration"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-allow-overlap":!0,"text-size":{base:1,stops:[[17,1],[20,18]]},"text-letter-spacing":-.05},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Parking icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.infra.carpark","what.infra.parking_bike","what.infra.parking_bike_locked"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,-40],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","text-offset":[0,0],"icon-size":{base:1,stops:[[17,.3],[22,1]]},"text-anchor":"top","text-field":"{title}","icon-padding":1},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"#ec7033","text-halo-width":2,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]}},"source-layer":"geojson"},{id:"Transport Taxi, Bus, Consierge and Train",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.transport.taxi_queue","what.transport.taxi","what.transport.type_bus","what.transport.bus","what.transport.train","what.service.ground_transport_concierge"]]],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,0],"icon-image":"{dimension_what}","text-font":["Lato Regular"],"icon-allow-overlap":!0,visibility:"visible","text-offset":[0,1],"icon-size":{base:1,stops:[[17,.3],[22,.7]]},"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":1,"text-max-width":5},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-translate":[0,0]},"source-layer":"geojson"},{id:"Construction area",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.construction"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,stops:[[17,"hsl(0, 0%, 100%)"],[17.5,"hsl(0, 0%, 70%)"]]},"fill-opacity":.99,"fill-antialias":!1},"source-layer":"geojson"},{id:"Construction outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.construction"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":"hsl(0, 0%, 70%)","line-opacity":1,"line-width":1},"source-layer":"geojson"},{id:"Construction text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.construction"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","text-letter-spacing":-.05,"icon-size":{base:1,stops:[[17,.3],[22,1]]},"icon-allow-overlap":!0,"text-size":{base:1,stops:[[17,1],[20,20]]},"text-max-width":5,"text-field":"{title}","text-font":["Lato Regular"]},paint:{"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-color":"hsl(0, 0%, 39%)","text-halo-color":"hsl(0, 0%, 70%)","text-halo-width":4},"source-layer":"geojson"},{id:"highlight_custom_symbol",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:18,filter:["all",["all",["==",["geometry-type"],"Point"]],["any"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none","icon-image":"{dimension_what}","icon-size":1,"icon-optional":!0,"text-field":"{title}","text-max-width":4,"text-padding":2,"text-line-height":.8,"text-optional":!0,"text-font":["Lato Regular"],"icon-offset":[0,-16],"text-offset":[0,.2],"text-anchor":"top","text-size":{stops:[[16,10],[18,16]]}},paint:{"icon-opacity":{stops:[[16,0],[16.5,1]]},"text-color":"#fff","text-halo-width":2,"text-halo-color":"#373737","text-halo-blur":1,"text-opacity":{stops:[[18,0],[18.5,1]]}},"source-layer":"geojson"},{id:"Transit overlay",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(250, 75%, 33%)","fill-antialias":!1,"fill-opacity":{base:1,stops:[[16,.4],[16.5,0]]}},"source-layer":"geojson"},{id:"Public overlay",metadata:{"source-type":"steerpath_floor_tiles"},type:"fill",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Public"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":"hsl(31, 100%, 43%)","fill-opacity":{base:1,stops:[[16,.4],[16.5,0]]},"fill-antialias":!1},"source-layer":"geojson"},{id:"Public overlay text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Public"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-offset":[0,-104],"icon-size":1,"text-field":"Public","text-size":25,"text-font":["Lato Regular"],"text-allow-overlap":!0},paint:{"icon-opacity":{base:1,stops:[[13,1],[13.5,0]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"hsl(22, 38%, 45%)","text-halo-width":2,"text-halo-blur":2,"text-opacity":{base:1,stops:[[15,0],[15.5,1],[16.25,1],[16.5,0]]}},"source-layer":"geojson"},{id:"Transit overlay text",metadata:{"source-type":"steerpath_floor_tiles"},type:"symbol",source:"custom",minzoom:15,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.infra.wing"],["==",["get","title"],"Transit"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-offset":[0,-104],"icon-size":1,"text-field":"Transit","text-font":["Lato Regular"],"text-size":25,"text-allow-overlap":!0},paint:{"icon-opacity":{base:1,stops:[[13,1],[13.5,0]]},"text-color":"hsl(0, 0%, 100%)","text-halo-color":"hsl(254, 56%, 46%)","text-halo-width":2,"text-halo-blur":2,"text-opacity":{base:1,stops:[[15,0],[15.5,1],[16.25,1],[16.5,0]]}},"source-layer":"geojson"},{id:"Skytrain line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.transport.skytrain"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"none"},paint:{"line-color":"hsl(13, 97%, 67%)","line-width":3},"source-layer":"geojson"},{id:"Skytrain icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.transport.skytrain"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,15]]},"icon-offset":[0,0],"icon-image":"{dimension_what}","text-font":["Lato Regular"],visibility:"visible","text-offset":[0,1],"icon-size":.4,"text-anchor":"top","text-field":"{title}","text-letter-spacing":0,"icon-padding":2,"text-max-width":10},paint:{"icon-opacity":{base:1,stops:[[15,0],[15.5,1]]},"text-color":"hsl(0, 0%, 100%)","text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-color":"#ec7033","text-halo-width":2,"text-halo-blur":0,"text-translate":[0,0]},"source-layer":"geojson"},{id:"Building overlay",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:16,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#008FBA"],["where.changi.terminals.t1.l1","#1a72B6"],["where.changi.terminals.t2.l1","#ee3424"],["where.changi.terminals.t3.l1","#008880"],["where.changi.terminals.t4.l1","#6f2770"]],default:"#1a72B6"},"fill-opacity":{base:1,stops:[[15,.99],[15.5,0]]},"fill-antialias":!1},"source-layer":"geojson"},{id:"Building overlay outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:15.5,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","#008FBA"],["where.changi.terminals.t1.l1","#1a72B6"],["where.changi.terminals.t2.l1","#ee3424"],["where.changi.terminals.t3.l1","#008880"],["where.changi.terminals.t4.l1","#6f2770"]],default:"#1a72B6"},"line-opacity":1,"line-width":2},"source-layer":"geojson"},{id:"Building icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel.l1","where.changi.terminals.t1.l1","where.changi.terminals.t2.l1","where.changi.terminals.t3.l1","where.changi.terminals.t4.l1"]]]],layout:{visibility:"visible","icon-size":{base:1,stops:[[13,.21],[14,.3],[15,.6],[16,1]]},"text-font":["Lato Regular"],"text-size":50,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel.l1","building_Jewel"],["where.changi.terminals.t1.l1","building_T1"],["where.changi.terminals.t2.l1","building_T2"],["where.changi.terminals.t3.l1","building_T3"],["where.changi.terminals.t4.l1","building_T4"]],default:"building_T1"},"icon-offset":[0,0]},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2,"text-opacity":{base:1,stops:[[15.5,1],[15.6,0]]},"icon-opacity":{base:1,stops:[[15,1],[15.5,0]]}},"source-layer":"geojson"}],Ws=[{id:"Smoke Zone Polygon",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.smoke_zone"]]]],paint:{"fill-color":"#7595ff","fill-opacity":.1}},{id:"Fire Zone Polygon",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],paint:{"fill-color":"#ff75df","fill-opacity":.1}},{id:"Smoke Zone Outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.smoke_zone"]]]],paint:{"line-color":"#1376bd","line-width":2,"line-dasharray":[4,2]}},{id:"Fire Zone Outline",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],paint:{"line-color":"#ff75df","line-width":2,"line-dasharray":[4,2]}},{id:"Fire Safety Icons",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.smoke_detector.general","what.fire_safety.smoke_detector.esc","what.fire_safety.beam_detector","what.fire_safety.flame_detector","what.fire_safety.manual_call_point","what.fire_safety.flow_switch"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,8],[20,14]]},"icon-image":"{dimension_what}","text-font":["Lato Regular"],"text-padding":1,"icon-size":{base:1,stops:[[17,.3],[21,1]]},"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"text-anchor":"top","text-offset":[0,.6],"icon-allow-overlap":["step",["zoom"],!1,20,!0],"text-allow-overlap":["step",["zoom"],!1,20,!0]},paint:{"text-color":"#ffffff","text-halo-color":"#ff75df","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2,"icon-opacity":{base:1,stops:[[17,0],[17.5,1]]}}},{id:"Smoke Zone Title",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.smoke_zone"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,14],[20,24]]},"text-font":["Lato Regular"],"text-padding":1,"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"text-allow-overlap":!0},paint:{"text-color":"#ffffff","text-halo-color":"#1376bd","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2}},{id:"FA Zone Title",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom","source-layer":"geojson",minzoom:17,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.fire_safety.fire_zone"]]]],layout:{"text-line-height":1,"text-size":{base:1,stops:[[16,14],[20,24]]},"text-font":["Lato Regular"],"text-padding":1,"text-field":"{title}","text-letter-spacing":0,"text-max-width":5,"text-allow-overlap":!0},paint:{"text-color":"#ffffff","text-halo-color":"#ff75df","text-halo-blur":0,"text-opacity":{base:1,stops:[[17,0],[17.5,1]]},"text-halo-width":2}}],Vs=[{id:"airside turf fill",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.airside.turf"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.turf","#c5e0ca"]],default:"#c5e0ca"},"fill-opacity":1}},{id:"airside building fill",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.airside.building"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.building","#969ba3"]],default:"#969ba3"},"fill-opacity":1}},{id:"airside line base",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["in",["get","dimension_what"],["literal",["what.airside.taxiway","what.airside.lead_in_line","what.airside.push_back_line"]]],["==",["get","dimension_where"],"where.changi.airside"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#AAAAAA","line-opacity":1,"line-width":{base:1.4,stops:[[5.8,0],[6,3],[20,40]]}}},{id:"airside roadway edge",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["in",["geometry-type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airside.roadway_edge"]]],["==",["get","dimension_where"],"where.changi.airside"],["!=",["get","title"],"landside roadway"],["!=",["get","title"],"external layout"]],paint:{"line-color":"#8c98ab","line-opacity":1,"line-width":1},layout:{visibility:"visible"}},{id:"airside markings fill",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airside.markings.epa","what.airside.markings.era","what.airside.markings.esa","what.airside.markings.plb"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.markings.epa","blue"],["what.airside.markings.era","red"],["what.airside.markings.esa","green"],["what.airside.markings.plb","magenta"]],default:"black"},"fill-opacity":.1}},{id:"airside construction fill",type:"fill",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:14,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airside.construction"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.construction","#c9c9c9"]],default:"black"},"fill-opacity":.4}},{id:"airside kcz abl line",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.airside.markings.kcz","what.airside.markings.abl"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.markings.kcz","white"],["what.airside.markings.abl","#f29b9b"]],default:"black"},"line-width":1}},{id:"airside markings line",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.airside.markings.epa","what.airside.markings.era","what.airside.markings.esa","what.airside.markings.plb"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.markings.kcz","white"],["what.airside.markings.abl","#f29b9b"],["what.airside.markings.epa","#7dbaf0"],["what.airside.markings.era","#ff6b6b"],["what.airside.markings.esa","#8ed191"],["what.airside.markings.plb","#c893e6"]],default:"black"},"line-width":1}},{id:"airside construction line",type:"line",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:14,maxzoom:24,filter:["all",["in",["get","dimension_what"],["literal",["what.airside.construction"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_what",stops:[["what.airside.construction","black"]],default:"black"},"line-width":1}},{id:"taxiway line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.taxiway"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"#fcd5a2","line-opacity":1,"line-width":1.5}},{id:"taxiway name",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.taxiway"],["==",["get","dimension_where"],"where.changi.airside"],["!=",["get","title"],"unknown"]],layout:{"symbol-placement":"line","symbol-spacing":150,"text-field":"{title}","text-font":["Lato Regular"],"text-max-angle":30,"text-pitch-alignment":"viewport","text-rotation-alignment":"map","text-size":9,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"#ffffff","text-halo-blur":1,"text-halo-color":"#807f7e","text-halo-width":2,"text-translate":[0,0]}},{id:"pushback line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.push_back_line"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"white","line-opacity":1,"line-width":1.5,"line-dasharray":[2,2]}},{id:"pushback fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.push_back_line"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":"white","fill-opacity":1}},{id:"leadin line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.lead_in_line"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"#f0d748","line-opacity":1,"line-width":1.5}},{id:"leadin fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.lead_in_line"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":"#f0d748","fill-opacity":1}},{id:"acft type marking line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.markings.acft_type"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"#e0d569","line-opacity":1,"line-width":1}},{id:"acft type marking names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airside.markings.acft_type"]]],["==",["get","dimension_where"],"where.changi.airside"]],layout:{visibility:"visible","text-field":"{text}","text-max-width":25,"text-font":["Lato Regular"],"text-padding":0,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-size":["interpolate",["exponential",2],["zoom"],13,["*",["get","height"],.1],15,["*",["get","height"],.5],17,["*",["get","height"],2],19,["*",["get","height"],5],22,["*",["get","height"],45]],"text-anchor":{type:"identity",property:"attachPt"},"text-justify":["match",["get","testJustify"],"left","left","right","right","center","center","auto"],"text-rotation-alignment":"map","text-rotate":["get","rotation"]},paint:{"text-color":"black"}},{id:"Compass Swing line dashed",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["in",["geometry-type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airside.markings.compass_swing"]]],["==",["get","dimension_where"],"where.changi.airside"],["==",["get","dxfDashed"],!0]],paint:{"line-color":"white","line-opacity":1,"line-width":2,"line-dasharray":[2,2]}},{id:"Compass Swing line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["in",["geometry-type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airside.markings.compass_swing"]]],["==",["get","dimension_where"],"where.changi.airside"],["!=",["get","dxfDashed"],!0]],paint:{"line-color":"white","line-opacity":1,"line-width":2}},{id:"EOT EOP line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["in",["geometry-type"],["literal",["LineString","Polygon"]]],["in",["get","dimension_what"],["literal",["what.airside.markings.eot","what.airside.markings.eop"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"white","line-opacity":1,"line-width":2}},{id:"EOT TOP Compass Swing names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airside.markings.eot","what.airside.markings.eop","what.airside.markings.compass_swing"]]],["==",["get","dimension_where"],"where.changi.airside"]],layout:{visibility:"visible","text-field":"{text}","text-max-width":25,"text-font":["Lato Regular"],"text-padding":0,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-size":["interpolate",["exponential",2],["zoom"],13,["*",["get","height"],.1],15,["*",["get","height"],.5],17,["*",["get","height"],2],19,["*",["get","height"],5],22,["*",["get","height"],45]],"text-anchor":{type:"identity",property:"attachPt"},"text-justify":["match",["get","testJustify"],"left","left","right","right","center","center","auto"],"text-rotation-alignment":"map","text-rotate":["get","rotation"]},paint:{"text-halo-color":"hsl(194, 0%, 60%)","text-color":"white","text-halo-width":1}},{id:"stand marking fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16.5,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airside.markings.stand"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{type:"identity",property:"dxfColour"},"fill-opacity":.7},layout:{"fill-sort-key":["coalesce",["-",1,["get","dxfArea"]],1]}},{id:"stand marking names",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airside.markings.stand"]]],["==",["get","dimension_where"],"where.changi.airside"]],layout:{visibility:"visible","text-field":"{text}","text-max-width":25,"text-font":["Lato Regular"],"text-padding":0,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-size":["interpolate",["exponential",2],["zoom"],13,["*",["get","height"],.1],15,["*",["get","height"],.5],17,["*",["get","height"],2],19,["*",["get","height"],5],22,["*",["get","height"],45]],"text-anchor":{type:"identity",property:"attachPt"},"text-justify":["match",["get","testJustify"],"left","left","right","right","center","center","auto"],"text-rotation-alignment":"map","text-rotate":["-",["get","rotation"],-45]},paint:{"text-color":{type:"identity",property:"dxfColour"}}},{id:"mws marking fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:16.5,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.airside.markings.mws"]]],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{type:"identity",property:"dxfColour"},"fill-opacity":.7},layout:{"fill-sort-key":["coalesce",["-",1,["get","dxfArea"]],1]}},{id:"taxiway holding psn line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.taxiway.holding_psn"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-opacity":1,"line-width":2.5,"line-dasharray":[4,2]}},{id:"runway holding psn line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.runway.holding_psn"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"#e0d569","line-opacity":1,"line-width":2.5}},{id:"runway fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.runway"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{type:"identity",property:"dxfColour"},"fill-opacity":.8},layout:{"fill-sort-key":["case",["==",["get","dxfColour"],"#ffffff"],2,["==",["get","dxfColour"],"#999999"],1,0]}},{id:"runway displ threshold fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.runway.displ_threshold"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{type:"identity",property:"dxfColour"},"fill-opacity":.8},layout:{"fill-sort-key":["case",["==",["get","dxfColour"],"#ffffff"],2,["==",["get","dxfColour"],"#999999"],1,0]}},{id:"runway stopway fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.runway.stopway"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":{type:"identity",property:"dxfColour"},"fill-opacity":.8}},{id:"runway stopway line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.runway.stopway"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-opacity":.8}},{id:"runway clearway outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["get","dimension_what"],"what.airside.runway.clearway"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-width":1.5,"line-opacity":.8}},{id:"runway strip outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["get","dimension_what"],"what.airside.runway.strip"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-width":1.5,"line-dasharray":[8,4],"line-opacity":.8}},{id:"runway resa outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.runway.resa"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-width":1.5,"line-dasharray":[3,3],"line-opacity":1}},{id:"runway resa line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.runway.resa"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":{type:"identity",property:"dxfColour"},"line-width":1.5,"line-opacity":1}},{id:"airside building name",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.airside.building"],["==",["get","dimension_where"],"where.changi.airside"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-size":10,visibility:"visible"},paint:{"text-color":"#807f7e","text-halo-blur":1,"text-halo-color":"#ffffff","text-halo-width":1,"text-translate":[0,0]}},{id:"fence jet blast fill",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.fence.jet_blast"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"fill-color":"#42566e","fill-opacity":.8}},{id:"fence jet blast name",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.airside.fence.jet_blast"],["==",["get","dimension_where"],"where.changi.airside"]],layout:{"text-field":"Jet Blast Fence","text-font":["Lato Regular"],"text-size":10,visibility:"visible"},paint:{"text-color":"#807f7e","text-halo-blur":1,"text-halo-color":"#ffffff","text-halo-width":1,"text-translate":[0,0]}},{id:"fence perimeter line",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","dimension_what"],"what.airside.fence.perimeter"],["==",["get","dimension_where"],"where.changi.airside"]],paint:{"line-color":"#f04f43","line-opacity":1,"line-width":1.5,"line-dasharray":[3,3]}},{id:"apron stand name",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.airside.apron.stand"],["==",["get","dimension_where"],"where.changi.airside"],["!=",["get","title"],"Unknown"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-size":12,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"#807f7e","text-halo-blur":1,"text-halo-color":"#ffffff","text-halo-width":1,"text-translate":[0,0]}},{id:"runway name",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.airside.runway"],["==",["get","dimension_where"],"where.changi.airside"],["!=",["get","title"],"Unknown"]],layout:{"text-field":"{title}","text-font":["Lato Regular"],"text-size":16,"text-transform":"uppercase",visibility:"visible"},paint:{"text-color":"#807f7e","text-halo-blur":1,"text-halo-color":"#ffffff","text-halo-width":1,"text-translate":[0,0]}},{id:"Airside Construction Name",type:"symbol",metadata:{fallback:"true","source-type":"steerpath_floor_tiles"},source:"custom",minzoom:13,maxzoom:24,filter:["all",["==",["geometry-type"],"Point"],["in",["get","dimension_what"],["literal",["what.airside.construction"]]],["==",["get","dimension_where"],"where.changi.airside"]],layout:{visibility:"visible","text-field":"{text}","text-max-width":25,"text-font":["Lato Regular"],"text-padding":0,"text-allow-overlap":!0,"text-ignore-placement":!0,"text-size":["interpolate",["exponential",2],["zoom"],13,["*",["get","height"],.1],15,["*",["get","height"],.5],17,["*",["get","height"],2],19,["*",["get","height"],5],22,["*",["get","height"],45]],"text-anchor":{type:"identity",property:"attachPt"},"text-justify":["match",["get","testJustify"],"left","left","right","right","center","center","auto"],"text-rotation-alignment":"map","text-rotate":["%",["-",360,["+",["get","rotation"],0]],360]},paint:{"text-halo-color":"hsl(194, 0%, 60%)","text-color":{type:"identity",property:"dxfColour"},"text-halo-width":1}},{id:"Aerobridge",type:"fill",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:15,maxzoom:24,filter:["all",["==",["geometry-type"],"Polygon"],["in",["get","dimension_what"],["literal",["what.infra.aerobridge","what.infra.tunnel"]]]],paint:{"fill-color":"hsl(0, 0%, 68%)","fill-opacity":{base:1,stops:[[15,0],[15.5,.99]]},"fill-antialias":!1}},{id:"Building overlay base",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel","where.changi.terminals.t1","where.changi.terminals.t2","where.changi.terminals.t3","where.changi.terminals.t4"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel","#97b5bc"],["where.changi.terminals.t1","#92a7b8"],["where.changi.terminals.t2","#d59d99"],["where.changi.terminals.t3","#8ab8b5"],["where.changi.terminals.t4","#a891aa"]],default:"#1a72B6"},"fill-opacity":.9,"fill-antialias":!1}},{id:"Building underlay icon",type:"symbol",metadata:{"source-type":"steerpath_base_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel","where.changi.terminals.t1","where.changi.terminals.t2","where.changi.terminals.t3","where.changi.terminals.t4"]]]],layout:{visibility:"visible","icon-size":{base:1,stops:[[13,.21],[14,.3],[15,.6],[16,1]]},"text-font":["Lato Regular"],"text-size":50,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel","building_Jewel"],["where.changi.terminals.t1","building_T1"],["where.changi.terminals.t2","building_T2"],["where.changi.terminals.t3","building_T3"],["where.changi.terminals.t4","building_T4"]],default:"building_T1"},"icon-offset":[0,0]},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2,"text-opacity":1,"icon-opacity":1}},{id:"Building overlay",type:"fill",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:16,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel","where.changi.terminals.t1","where.changi.terminals.t2","where.changi.terminals.t3","where.changi.terminals.t4"]]]],paint:{"fill-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel","#008FBA"],["where.changi.terminals.t1","#1a72B6"],["where.changi.terminals.t2","#ee3424"],["where.changi.terminals.t3","#008880"],["where.changi.terminals.t4","#6f2770"]],default:"#1a72B6"},"fill-opacity":{base:1,stops:[[15,.99],[15.5,0]]},"fill-antialias":!1}},{id:"Building overlay outline",type:"line",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",maxzoom:15.5,filter:["all",["==",["geometry-type"],"Polygon"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel","where.changi.terminals.t1","where.changi.terminals.t2","where.changi.terminals.t3","where.changi.terminals.t4"]]]],paint:{"line-color":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel","#008FBA"],["where.changi.terminals.t1","#1a72B6"],["where.changi.terminals.t2","#ee3424"],["where.changi.terminals.t3","#008880"],["where.changi.terminals.t4","#6f2770"]],default:"#1a72B6"},"line-opacity":1,"line-width":2}},{id:"Building icon",type:"symbol",metadata:{"source-type":"steerpath_floor_tiles"},source:"custom",minzoom:1,maxzoom:17,filter:["all",["==",["geometry-type"],"Point"],["==",["get","dimension_what"],"what.building"],["in",["get","dimension_where"],["literal",["where.changi.terminals.jewel","where.changi.terminals.t1","where.changi.terminals.t2","where.changi.terminals.t3","where.changi.terminals.t4"]]]],layout:{visibility:"visible","icon-size":{base:1,stops:[[13,.21],[14,.3],[15,.6],[16,1]]},"text-font":["Lato Regular"],"text-size":50,"icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-image":{base:1,type:"categorical",property:"dimension_where",stops:[["where.changi.terminals.jewel","building_Jewel"],["where.changi.terminals.t1","building_T1"],["where.changi.terminals.t2","building_T2"],["where.changi.terminals.t3","building_T3"],["where.changi.terminals.t4","building_T4"]],default:"building_T1"},"icon-offset":[0,0]},paint:{"text-color":"hsl(0, 0%, 100%)","text-halo-color":"rgba(0,136,128,1)","text-halo-width":2,"text-opacity":{base:1,stops:[[15.5,1],[15.6,0]]},"icon-opacity":{base:1,stops:[[15,1],[15.5,0]]}}}];function qs(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var r,i=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),o="Feature"===(r=t).type?r.geometry:r,a=o.type,s=t.bbox,l=o.coordinates;if(s&&!1===function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}(i,s))return!1;"Polygon"===a&&(l=[l]);for(var u=!1,c=0;c<l.length&&!u;c++)if(Zs(i,l[c][0],n.ignoreBoundary)){for(var h=!1,d=1;d<l[c].length&&!h;)Zs(i,l[c][d],!n.ignoreBoundary)&&(h=!0),d++;h||(u=!0)}return u}function Zs(e,t,n){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,o=t.length-1;i<t.length;o=i++){var a=t[i][0],s=t[i][1],l=t[o][0],u=t[o][1];if(e[1]*(a-l)+s*(l-e[0])+u*(e[0]-a)===0&&(a-e[0])*(l-e[0])<=0&&(s-e[1])*(u-e[1])<=0)return!n;s>e[1]!=u>e[1]&&e[0]<(l-a)*(e[1]-s)/(u-s)+a&&(r=!r)}return r}function Ys(){var e=this;return{enableGPS:function(){return x(e,void 0,void 0,function(){return S(this,function(e){return[2,{success:!0}]})})},disableGPS:function(){},destroyGPS:function(){},requestGPSPermission:function(){return x(e,void 0,void 0,function(){return S(this,function(e){return[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}]})})},isGPSPermissionGranted:function(){return x(e,void 0,void 0,function(){return S(this,function(e){return[2,!1]})})},getGPSPosition:function(){return x(e,void 0,void 0,function(){return S(this,function(e){return[2,{coordinates:[0,0],accuracy:0,timestamp:0}]})})},isGPSEnabled:function(){return!1}}}function $s(){var e=this;return{enableCompass:function(){return x(e,void 0,void 0,function(){return S(this,function(e){return[2,!1]})})},disableCompass:function(){},addCallback:function(){},removeCallback:function(){},isCompassEnabled:function(){return!1},isCompassPermissionDenied:function(){return!1},getCompassHeading:function(){return null}}}function Ks(){var e=this;return{start:function(){},stop:function(){},requestPermission:function(){return x(e,void 0,void 0,function(){return S(this,function(e){return[2,!1]})})}}}const Js=e=>{let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},a=t=e(r,i,o);return o},Xs=e=>e?Js(e):Js;var Qs={ready:!0,missing:[]};function el(e){return{ready:0===e.length,missing:A([],e,!0)}}var tl=function(e){function t(t,n){var r=this,i=A([],t,!0);return(r=e.call(this,null!=n?n:"Not ready: missing ".concat(i.join(", ")))||this).name="NotReadyError",r.missing=i,r}return b(t,e),t}(Error),nl={ready:!1,missing:[]},rl={ready:!1,missing:[],modules:{mapDataService:nl,focusManager:nl,cameraDirector:nl,userLocation:nl,routingManager:nl,navigationEngine:nl}},il=["mapDataService","focusManager","cameraDirector","userLocation","routingManager","navigationEngine"];function ol(){var e=new al;return e.notifyMapLoaded(),e}var al=function(){function e(){this.camera={moveTo:function(){},getZoom:function(){return 0},fitBounds:function(){}},this.cameraAttached=!1,this.followBreaker={breakFollow:function(){}},this.mapLoaded=!1,this.pending=null}return e.prototype.attachCamera=function(e){this.camera=e,this.cameraAttached=!0,this.flushIfReady()},e.prototype.detachCamera=function(){this.camera={moveTo:function(){},getZoom:function(){return 0},fitBounds:function(){}},this.cameraAttached=!1,this.mapLoaded=!1},e.prototype.attachFollowBreaker=function(e){this.followBreaker=e},e.prototype.detachFollowBreaker=function(){this.followBreaker={breakFollow:function(){}}},e.prototype.notifyMapLoaded=function(){this.mapLoaded=!0,this.flushIfReady()},e.prototype.submit=function(e,t){this.canWrite()?this.write(e,t):this.pending={stop:e,reason:t}},e.prototype.getZoom=function(){return this.camera.getZoom()},e.prototype.getReadiness=function(){return this.cameraAttached?Qs:el(["camera"])},e.prototype.canWrite=function(){return this.mapLoaded&&this.cameraAttached},e.prototype.flushIfReady=function(){if(this.canWrite()&&this.pending){var e=this.pending;this.pending=null,this.write(e.stop,e.reason)}},e.prototype.write=function(e,t){"focus"===t&&this.followBreaker.breakFollow(),this.camera.moveTo(e)},e}();function sl(e){if(!e||!Array.isArray(e))return null;try{var t=e,n=t[0];if(!n)return null;var r=void 0;if(Array.isArray(n)){var i=n[0];if(2===t.length&&Array.isArray(i)&&"number"==typeof i[0]){var o=n,a=t[1];r=[[[o[0],o[1]],[a[0],o[1]],[a[0],a[1]],[o[0],a[1]],[o[0],o[1]]]]}else if("number"==typeof i&&n.length>=2){var s=t;if(!function(e){if(!e||e.length<3)return!1;for(var t=0,n=e;t<n.length;t++){var r=n[t];if(!Array.isArray(r)||"number"!=typeof r[0]||"number"!=typeof r[1])return!1}return!0}(s))return null;r=[s]}else{if(!Array.isArray(i)||"number"!=typeof i[0])return null;r=t}}else{if(!("number"==typeof n&&t.length>=4))return null;r=[[[t[0],t[1]],[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],[t[0],t[1]]]]}return function(e,t,n){void 0===n&&(n={});for(var r=0,i=e;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}return ee({type:"Polygon",coordinates:e},t,n)}(r)}catch(e){return null}}var ll,ul=function(){function e(){this.defaultFocusedTaxonomy="",this.currentFocus="",this.stylePort={readLayers:function(){return[]},commitLayers:function(){}},this.styleAttached=!1,this.cameraDirector=ol(),this.focusChangeListeners=new Set}return e.prototype.attachStyle=function(e){this.stylePort=e,this.styleAttached=!0},e.prototype.detachStyle=function(){this.stylePort={readLayers:function(){return[]},commitLayers:function(){}},this.styleAttached=!1},e.prototype.attachCameraDirector=function(e){this.cameraDirector=e},e.prototype.detachCameraDirector=function(){this.cameraDirector=ol()},e.prototype.subscribeToFocusChange=function(e){var t=this;return this.focusChangeListeners.add(e),function(){t.focusChangeListeners.delete(e)}},e.prototype.getReadiness=function(){return this.styleAttached?Qs:el(["style"])},e.prototype.commit=function(e,t){if(void 0===t&&(t={}),e){var n=!0===t.moveCamera;this.currentFocus=e;var r=this.stylePort.readLayers();if(Array.isArray(r)&&r.length>0){var i=function(e,t){if(t){var n=Es(t);if(e.length>0)for(var r=0;r<e.length;r+=1){var i=e[r].id;Ts.includes(i)||Rs(e[r],n)}return e}}(r,e);i&&this.stylePort.commitLayers(i)}if(n){var o=this.getFlyToLocation(e,!0);(null==o?void 0:o.center)&&this.cameraDirector.submit({center:o.center,zoom:o.zoom,bearing:o.bearing,pitch:o.pitch,durationMs:1200,easing:"ease"},"focus")}this.focusChangeListeners.forEach(function(t){try{t(e)}catch(e){}})}},e.prototype.getDefaultFocusedTaxonomy=function(){return this.defaultFocusedTaxonomy},e.prototype.setDefaultFocusedTaxonomy=function(e){this.defaultFocusedTaxonomy=e},e.prototype.getCurrentFocus=function(){return this.currentFocus},e.prototype.setCurrentFocus=function(e){this.currentFocus=e},e.prototype.getCurrentFocusBuilding=function(){var e=Ss(this.currentFocus);return e?bs(e)?Ps(this.currentFocus):e:null},e.prototype.getCurrentFocusFloor=function(){var e=Ss(this.currentFocus);return e&&bs(e)?e:null},e.prototype.getUserViewportBuilding=function(e){var t,n=te(e),r=null;return t=function(e){if(!r&&!bs(e)&&e.bounds){var t=sl(e.bounds);t&&qs(n,t)&&(r=e)}},_s(ys(),t),r},e.prototype.checkUserViewport=function(e,t,n){var r=te(e);if(null==t)return!1;if(!Object.prototype.hasOwnProperty.call(t,"bounds"))return!1;var i=sl(t.bounds),o=!!i&&qs(r,i);if(null==n)return o;if(!Object.prototype.hasOwnProperty.call(n,"bounds"))return o;var a=sl(n.bounds),s=!!a&&qs(r,a);return o||s},e.prototype.changeToUserViewpoint=function(e,t){if(void 0===t&&(t={}),!this.checkUserViewport(e,this.getCurrentFocusBuilding(),this.getCurrentFocusFloor())){var n=this.getUserViewportBuilding(e);if(n){var r=null!=t?t:{};n.taxonomyPath&&n.taxonomyPath in r?this.commit(r[n.taxonomyPath],{moveCamera:!1}):n.name&&n.name in r?this.commit(r[n.name],{moveCamera:!1}):n.defaultFloorPath&&this.commit(n.defaultFloorPath,{moveCamera:!1})}}},e.prototype.getFlyToLocation=function(e,t){void 0===t&&(t=!0);var n="[getFlyToLocation]",r="Please review the where taxonomy camera configuration in Spatialverse Configurator → Map Config → Taxonomies page.",i=function(e){if(!(null==e?void 0:e.cameraConfigs))return null;var n=t?e.cameraConfigs.mobile||e.cameraConfigs.web:e.cameraConfigs.web||e.cameraConfigs.mobile;return!(null==n?void 0:n.center)||!Array.isArray(n.center)||n.center.length<2?null:n},o=Ss(e);if(!o)return console.error(n,'Where taxonomy "'.concat(e,'" was not found in the focus tree. ').concat(r),{whereTaxonomyPath:e}),null;var a,s,l=i(o);if(l)return l;a=e,s=o,console.warn(n,'Camera config for where taxonomy "'.concat(a,'" was not found. ').concat(r),{whereTaxonomyPath:a,node:s?{name:s.name,taxonomyPath:s.taxonomyPath,cameraConfigs:s.cameraConfigs}:void 0,isMobile:t});for(var u=As(e),c=u.length-1;c>=0;c-=1){var h=i(u[c]);if(h)return h}if(!bs(o))for(var d=0,p=ws(o);d<p.length;d++){var f=i(p[d]);if(f)return f}return console.error(n,'Camera config not found for where taxonomy "'.concat(e,'" and no ancestor or child fallback was available. ').concat(r),{whereTaxonomyPath:e,matchedNode:{name:o.name,taxonomyPath:o.taxonomyPath},ancestorsChecked:u.map(function(e){return e.taxonomyPath})}),null},e.prototype.getFloorAltitudeRangesForBuilding=function(e){var t=Ss(e);if(!t)return[];for(var n=[],r=0,i=ws(t);r<i.length;r++){var o=i[r];if(bs(o)&&o.taxonomyPath){var a=o.altMin,s=o.altMax;"number"!=typeof a||"number"!=typeof s||Number.isNaN(a)||Number.isNaN(s)||n.push({whereDimension:o.taxonomyPath,minAltitude:a,maxAltitude:s})}}return n.sort(function(e,t){return e.minAltitude-t.minAltitude})},e.prototype.isLngLatInsideBuildingFocusBounds=function(e,t){var n=function(e){var t=Ss(e);if(!t)return null;var n=sl(t.bounds);if(n)return n;var r=Ps(e);return sl(null==r?void 0:r.bounds)}(t);if(!n)return!1;try{return qs(te(e),n)}catch(e){return!1}},e}();function cl(){return ll||(ll=new ul),ll}var hl=function(){function e(e){var t,n;void 0===e&&(e={}),this.floorRanges=[],this.getFloorRangesFromFocusTree=null,this.currentAltitude=null,this.currentFloor=null,this.onFloorChangeCallbacks=new Set,this.floorRanges=null!==(t=e.floorRanges)&&void 0!==t?t:[],this.getFloorRangesFromFocusTree=null!==(n=e.getFloorRangesFromFocusTree)&&void 0!==n?n:null}return e.prototype.setFloorRanges=function(e){this.floorRanges=A([],e,!0).sort(function(e,t){return e.minAltitude-t.minAltitude})},e.prototype.setGetFloorRangesFromFocusTree=function(e){this.getFloorRangesFromFocusTree=e},e.prototype.updateAltitude=function(e){var t,n=e.altitude;if(!(null==n||isNaN(n)||n<0)){this.currentAltitude=n;var r=null!==(t=this.getFloorRanges())&&void 0!==t?t:this.floorRanges,i=this.altitudeToFloor(n,r);if(i&&i!==this.currentFloor){var o=this.currentFloor;this.currentFloor=i,this.onFloorChangeCallbacks.forEach(function(e){try{e(o,i)}catch(e){}})}else i&&(this.currentFloor=i)}},e.prototype.getCurrentFloor=function(){return this.currentFloor},e.prototype.getCurrentAltitude=function(){return this.currentAltitude},e.prototype.onFloorChange=function(e){var t=this;return this.onFloorChangeCallbacks.add(e),function(){return t.onFloorChangeCallbacks.delete(e)}},e.prototype.altitudeToFloor=function(e,t){for(var n=0,r=t;n<r.length;n++){var i=r[n];if(e>=i.minAltitude&&e<=i.maxAltitude)return i.whereDimension}return null},e.prototype.getFloorRanges=function(){if(this.getFloorRangesFromFocusTree)try{return this.getFloorRangesFromFocusTree()}catch(e){return null}return null},e.prototype.reset=function(){this.currentAltitude=null,this.currentFloor=null},e.prototype.destroy=function(){this.reset(),this.onFloorChangeCallbacks.clear(),this.getFloorRangesFromFocusTree=null,this.floorRanges=[]},e}(),dl=function(){function e(e,t,n){var r,i,o;void 0===n&&(n={}),this.proposalListeners=new Set,this.acceptedListeners=new Set,this.autoRejectedListeners=new Set,this.lastProposalTime=0,this.whereProposalSentAtMs=new Map,this.isActive=!1,this.gpsCallbackRef=null,this.pendingProposalId=null,this.pendingWhereTaxonomyPath=null,this.isAwaitingDecision=!1,this.lastAcceptedTaxonomyPath=null,this.gpsController=e,this.altitudeManager=t,this.proposalCooldownMs=null!==(r=n.proposalCooldownMs)&&void 0!==r?r:2e3,this.autoAcceptCooldownMs=null!==(i=n.autoAcceptCooldownMs)&&void 0!==i?i:2e4,this.portalAutoAcceptCooldownMs=null!==(o=n.portalAutoAcceptCooldownMs)&&void 0!==o?o:2e4,this.portalLiftAutoAcceptCooldownMs=n.portalLiftAutoAcceptCooldownMs}return e.prototype.start=function(){var e=this;this.isActive||(this.gpsCallbackRef=function(t){return e.evaluate(t)},this.gpsController.addCallback({onLocationUpdate:this.gpsCallbackRef}),this.isActive=!0)},e.prototype.stop=function(){this.isActive&&(this.gpsCallbackRef=null,this.clearPending(),this.lastProposalTime=0,this.lastAcceptedTaxonomyPath=null,this.whereProposalSentAtMs.clear(),this.isActive=!1)},e.prototype.resetLastAcceptedPath=function(){this.lastAcceptedTaxonomyPath=null},e.prototype.resetPortalProposalSuppression=function(){for(var e=0,t=A([],this.whereProposalSentAtMs.keys(),!0);e<t.length;e++){var n=t[e];n.startsWith("portal:")&&this.whereProposalSentAtMs.delete(n)}},e.prototype.addWhereTaxonomyUpdateProposedListener=function(e){this.proposalListeners.add(e)},e.prototype.removeWhereTaxonomyUpdateProposedListener=function(e){this.proposalListeners.delete(e)},e.prototype.addWhereTaxonomyUpdateAcceptedListener=function(e){this.acceptedListeners.add(e)},e.prototype.removeWhereTaxonomyUpdateAcceptedListener=function(e){this.acceptedListeners.delete(e)},e.prototype.addWhereTaxonomyUpdateAutoRejectedListener=function(e){this.autoRejectedListeners.add(e)},e.prototype.removeWhereTaxonomyUpdateAutoRejectedListener=function(e){this.autoRejectedListeners.delete(e)},e.prototype.removeAllListeners=function(){this.proposalListeners.clear(),this.acceptedListeners.clear(),this.autoRejectedListeners.clear()},e.prototype.acceptProposal=function(e){this.isAwaitingDecision&&this.pendingProposalId&&e===this.pendingProposalId&&this.pendingWhereTaxonomyPath&&(this.lastAcceptedTaxonomyPath=this.pendingWhereTaxonomyPath,this.lastProposalTime=Date.now(),this.publishAccepted(this.pendingWhereTaxonomyPath),this.clearPending())},e.prototype.setLastAcceptedTaxonomyPath=function(e){this.lastAcceptedTaxonomyPath=e},e.prototype.getLastAcceptedTaxonomyPath=function(){return this.lastAcceptedTaxonomyPath},e.prototype.rejectProposal=function(e){this.isAwaitingDecision&&this.pendingProposalId&&e===this.pendingProposalId&&(this.lastProposalTime=Date.now(),this.clearPending())},e.prototype.manualOverride=function(e,t){this.isAwaitingDecision&&this.pendingProposalId&&e===this.pendingProposalId&&(this.lastAcceptedTaxonomyPath=t,this.lastProposalTime=Date.now(),this.publishAccepted(t),this.clearPending())},e.prototype.notifyManualFloorChange=function(e,t){void 0===t&&(t=!1),this.lastAcceptedTaxonomyPath!==e&&(this.lastAcceptedTaxonomyPath=e,this.publishAccepted(e,t))},e.prototype.proposeFromNavigation=function(t){var n,r;if(this.isAwaitingDecision)return!1;var i=Date.now();if(i-this.lastProposalTime<this.proposalCooldownMs)return!1;var o="portal:".concat(t.portalDedupeKey),a=this.whereProposalSentAtMs.get(o);if("number"==typeof a&&i-a<e.WHERE_PROPOSAL_SUPPRESSION_MS)return!1;var s=cl().getCurrentFocus();if("string"==typeof s&&s===t.whereTaxonomyPath)return!1;if(this.lastAcceptedTaxonomyPath===t.whereTaxonomyPath)return!1;var l={segmentIndex:t.portal.segmentIndex,instructionLine:t.portal.instructionLine,portalName:null!==(n=t.portal.portalName)&&void 0!==n?n:void 0,description:null!==(r=t.portal.description)&&void 0!==r?r:void 0};return this.emitProposalPayload({kind:"portal",whereTaxonomyPath:t.whereTaxonomyPath,portalDedupeKey:t.portalDedupeKey,portal:l},i),!0},e.prototype.evaluate=function(e){},e.prototype.publishAccepted=function(e,t){void 0===t&&(t=!1),this.acceptedListeners.forEach(function(n){try{n(e,t)}catch(e){console.error("AutoFocusManager accepted listener error",e)}})},e.prototype.clearPending=function(){this.isAwaitingDecision=!1,this.pendingProposalId=null,this.pendingWhereTaxonomyPath=null},e.prototype.emitProposal=function(e,t,n){void 0===n&&(n=Date.now()),this.emitProposalPayload({kind:"altitude",whereTaxonomyPath:e},n)},e.prototype.resolvePortalAutoAcceptCooldownMs=function(e){var t,n,r,i,o="".concat(null!==(t=e.instructionLine)&&void 0!==t?t:""," ").concat(null!==(n=e.description)&&void 0!==n?n:""," ").concat(null!==(r=e.portalName)&&void 0!==r?r:"").toLowerCase();return/\blift\b|elevator/.test(o)?null!==(i=this.portalLiftAutoAcceptCooldownMs)&&void 0!==i?i:2*this.portalAutoAcceptCooldownMs:this.portalAutoAcceptCooldownMs},e.prototype.emitProposalPayload=function(e,t){var n="altitude"===e.kind?e.whereTaxonomyPath:"portal:".concat(e.portalDedupeKey);this.whereProposalSentAtMs.set(n,t);var r=this.generateId();this.pendingProposalId=r,this.pendingWhereTaxonomyPath=e.whereTaxonomyPath,this.isAwaitingDecision=!0;var i="altitude"===e.kind?{kind:"altitude",whereTaxonomyPath:e.whereTaxonomyPath,id:r,autoAcceptCooldownMs:this.autoAcceptCooldownMs}:{kind:"portal",whereTaxonomyPath:e.whereTaxonomyPath,id:r,autoAcceptCooldownMs:this.resolvePortalAutoAcceptCooldownMs(e.portal),portal:e.portal};this.proposalListeners.forEach(function(e){try{e(i)}catch(e){console.error("AutoFocusManager proposal listener error.",e)}})},e.prototype.generateId=function(){return"proposal_".concat(Date.now(),"_").concat(Math.random().toString(36).slice(2,10))},e.WHERE_PROPOSAL_SUPPRESSION_MS=6e4,e}(),pl={pendingWhere:"",proposalId:null,proposalKind:null,portalMeta:null,isAwaitingDecision:!1,showTaxonomyUpdatePopup:!1,autoAcceptCooldownMs:0};function fl(e,t,n){if(null!==e)for(var r,i,o,a,s,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,m=f?e.features.length:1,v=0;v<m;v++){s=(c=!!(u=f?e.features[v].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var y=0;y<s;y++){var w=0,b=0;if(null!==(a=c?u.geometries[y]:u)){l=a.coordinates;var _=a.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,v,w,b))return!1;d++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,v,w,b))return!1;d++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===t(l[r][i],d,v,w,b))return!1;d++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===t(l[r][i][o],d,v,w,b))return!1;d++}b++}w++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===fl(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function gl(e){var t=[1/0,1/0,-1/0,-1/0];return fl(e,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}function ml(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function vl(e,t){void 0===t&&(t={});var n=gl(e);return function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ml(e[0])||!ml(e[1]))throw new Error("coordinates must contain numbers");return function(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}({type:"Point",coordinates:e},t,n)}([(n[0]+n[2])/2,(n[1]+n[3])/2],t.properties,t)}gl.default=gl;var yl=6371008.8,wl={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:yl,metres:yl,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function bl(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return function(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}({type:"LineString",coordinates:e},t,n)}function _l(e){return e%360*Math.PI/180}function xl(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Sl(e,t,n){void 0===n&&(n={});var r=xl(e),i=xl(t),o=_l(i[1]-r[1]),a=_l(i[0]-r[0]),s=_l(r[1]),l=_l(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return function(e,t){void 0===t&&(t="kilometers");var n=wl[t];if(!n)throw new Error(t+" units is invalid");return e*n}(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}function Al(e,t,n,r){if(!(i=r=r||{})||i.constructor!==Object)throw new Error("options is invalid");var i,o,a=[];if("Feature"===e.type)o=e.geometry.coordinates;else{if("LineString"!==e.type)throw new Error("input must be a LineString Feature or Geometry");o=e.coordinates}for(var s,l,u,c=o.length,h=0,d=0;d<o.length&&!(t>=h&&d===o.length-1);d++){if(h>t&&0===a.length){if(!(s=t-h))return a.push(o[d]),bl(a);l=Ho(o[d],o[d-1])-180,u=Yo(o[d],s,l,r),a.push(u.geometry.coordinates)}if(h>=n)return(s=n-h)?(l=Ho(o[d],o[d-1])-180,u=Yo(o[d],s,l,r),a.push(u.geometry.coordinates),bl(a)):(a.push(o[d]),bl(a));if(h>=t&&a.push(o[d]),d===o.length-1)return bl(a);h+=Sl(o[d],o[d+1],r)}if(h<t&&o.length===c)throw new Error("Start position is beyond line");var p=o[o.length-1];return bl([p,p])}for(var Pl=function(){function e(){this.localStoarge=new a.MMKV}return e.prototype.contains=function(e){return this.localStoarge.contains(e)},e.prototype.getString=function(e){return this.localStoarge.getString(e)},e.prototype.set=function(e,t){this.localStoarge.set(e,t)},e.prototype.clearAll=function(){this.localStoarge.clearAll()},e}(),Ml={},Cl={byteLength:function(e){var t=Dl(e),n=t[0],r=t[1];return 3*(n+r)/4-r},toByteArray:function(e){var t,n,r=Dl(e),i=r[0],o=r[1],a=new El(function(e,t,n){return 3*(t+n)/4-n}(0,i,o)),s=0,l=o>0?i-4:i;for(n=0;n<l;n+=4)t=Tl[e.charCodeAt(n)]<<18|Tl[e.charCodeAt(n+1)]<<12|Tl[e.charCodeAt(n+2)]<<6|Tl[e.charCodeAt(n+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;2===o&&(t=Tl[e.charCodeAt(n)]<<2|Tl[e.charCodeAt(n+1)]>>4,a[s++]=255&t);1===o&&(t=Tl[e.charCodeAt(n)]<<10|Tl[e.charCodeAt(n+1)]<<4|Tl[e.charCodeAt(n+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t);return a},fromByteArray:function(e){for(var t,n=e.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(Ol(e,a,a+o>s?s:a+o));1===r?(t=e[n-1],i.push(kl[t>>2]+kl[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(kl[t>>10]+kl[t>>4&63]+kl[t<<2&63]+"="));return i.join("")}},kl=[],Tl=[],El="undefined"!=typeof Uint8Array?Uint8Array:Array,Rl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ll=0;Ll<64;++Ll)kl[Ll]=Rl[Ll],Tl[Rl.charCodeAt(Ll)]=Ll;function Dl(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function Fl(e){return kl[e>>18&63]+kl[e>>12&63]+kl[e>>6&63]+kl[63&e]}function Ol(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(Fl(r));return i.join("")}Tl["-".charCodeAt(0)]=62,Tl["_".charCodeAt(0)]=63;var jl={
2
2
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
3
- read:function(e,t,r,n,i){var o,a,l=8*i-n-1,s=(1<<l)-1,u=s>>1,c=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=l;c>0;o=256*o+e[t+h],h+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=f,c-=8);if(0===o)o=1-u;else{if(o===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=u}return(p?-1:1)*a*Math.pow(2,o-n)},write:function(e,t,r,n,i,o){var a,l,s,u=8*o-i-1,c=(1<<u)-1,h=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+h>=1?f/s:f*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=c?(l=0,a=c):a+h>=1?(l=(t*s-1)*Math.pow(2,i),a+=h):(l=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&l,p+=d,l/=256,i-=8);for(a=a<<i|l,u+=i;u>0;e[r+p]=255&a,p+=d,a/=256,u-=8);e[r+p-d]|=128*g}};
3
+ read:function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=u}return(p?-1:1)*a*Math.pow(2,o-r)},write:function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=f,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+p]=255&a,p+=f,a/=256,u-=8);e[n+p-f]|=128*g}};
4
4
  /*!
5
5
  * The buffer module from node.js, for the browser.
6
6
  *
7
7
  * @author Feross Aboukhadijeh <https://feross.org>
8
8
  * @license MIT
9
9
  */
10
- !function(e){var t=kl,r=Tl,n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},e.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=o(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(N(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(N(e,ArrayBuffer)||e&&N(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(N(e,SharedArrayBuffer)||e&&N(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var i=function(e){if(a.isBuffer(e)){var t=0|f(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||D(e.length)?o(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return s(e),o(e<0?0:0|f(e))}function c(e){for(var t=e.length<0?0:0|f(e.length),r=o(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,a.prototype),n}function f(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||N(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(e).length;default:if(i)return n?-1:R(e).length;t=(""+t).toLowerCase(),i=!0}}function d(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),D(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,a=1,l=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,l/=2,s/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=r;o<l;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===s)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(r+s>l&&(r=l-s),o=r;o>=0;o--){for(var h=!0,f=0;f<s;f++)if(u(e,o+f)!==u(t,f)){h=!1;break}if(h)return o}return-1}function v(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var l=parseInt(t.substr(2*a,2),16);if(D(l))return a;e[r+a]=l}return a}function w(e,t,r,n){return I(R(t,e.length-r),e,r,n)}function b(e,t,r,n){return I(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return I(B(t),e,r,n)}function x(e,t,r,n){return I(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,l,s,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(s=(31&u)<<6|63&o)>127&&(c=s);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(s=(15&u)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:o=e[i+1],a=e[i+2],l=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&l)&&(s=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&l)>65535&&s<1114112&&(c=s)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(e){var t=e.length;if(t<=j)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=j));return r}(n)}e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return function(e,t,r){return s(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(N(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),N(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(N(o,Uint8Array))i+o.length>n.length?a.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):d.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(N(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),l=(r>>>=0)-(t>>>=0),s=Math.min(o,l),u=this.slice(n,i),c=e.slice(t,r),h=0;h<s;++h)if(u[h]!==c[h]){o=u[h],l=c[h];break}return o<l?-1:l<o?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return b(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var j=4096;function k(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function E(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=U[e[o]];return i}function z(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function F(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,n,i,o){return t=+t,n>>>=0,o||F(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function C(e,t,n,i,o){return t=+t,n>>>=0,o||F(e,0,n,8),r.write(e,t,n,i,52,8),n+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||O(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||O(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);O(this,e,t,r,i-1,-i)}var o=0,a=1,l=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===l&&0!==this[t+o-1]&&(l=1),this[t+o]=(e/a|0)-l&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);O(this,e,t,r,i-1,-i)}var o=r-1,a=1,l=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===l&&0!==this[t+o+1]&&(l=1),this[t+o]=(e/a|0)-l&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return C(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return C(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var l=a.isBuffer(e)?e:a.from(e,n),s=l.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=l[o%s]}return this};var T=/[^+/0-9A-Za-z-_]/g;function R(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function B(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function I(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function N(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function D(e){return e!=e}var U=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()}(jl);let Rl=function(e){var t={},r=t.lib={},n=function(){},i=r.Base={extend:function(e){n.prototype=this;var t=new n;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=r.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes;if(e=e.sigBytes,this.clamp(),n%4)for(var i=0;i<e;i++)t[n+i>>>2]|=(r[i>>>2]>>>24-i%4*8&255)<<24-(n+i)%4*8;else if(65535<r.length)for(i=0;i<e;i+=4)t[n+i>>>2]=r[i>>>2];else t.push.apply(t,r);return this.sigBytes+=e,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],n=0;n<t;n+=4)r.push(4294967296*e.random()|0);return new o.init(r,t)}}),a=t.enc={},l=a.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],n=0;n<e;n++){var i=t[n>>>2]>>>24-n%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},s=a.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],n=0;n<e;n++)r.push(String.fromCharCode(t[n>>>2]>>>24-n%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},u=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(s.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return s.parse(unescape(encodeURIComponent(e)))}},c=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,l=i/(4*a);if(t=(l=t?e.ceil(l):e.max((0|l)-this._minBufferSize,0))*a,i=e.min(4*t,i),t){for(var s=0;s<t;s+=a)this._doProcessBlock(n,s);s=n.splice(0,t),r.sigBytes-=i}return new o.init(s,i)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=c.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){c.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new h.HMAC.init(e,r).finalize(t)}}});var h=t.algo={};return t}(Math);!function(){var e=Rl,t=e.lib.WordArray;e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp(),e=[];for(var i=0;i<r;i+=3)for(var o=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;4>a&&i+.75*a<r;a++)e.push(n.charAt(o>>>6*(3-a)&63));if(t=n.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var r=e.length,n=this._map;(i=n.charAt(64))&&(-1!=(i=e.indexOf(i))&&(r=i));for(var i=[],o=0,a=0;a<r;a++)if(a%4){var l=n.indexOf(e.charAt(a-1))<<a%4*2,s=n.indexOf(e.charAt(a))>>>6-a%4*2;i[o>>>2]|=(l|s)<<24-o%4*8,o++}return t.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function t(e,t,r,n,i,o,a){return((e=e+(t&r|~t&n)+i+a)<<o|e>>>32-o)+t}function r(e,t,r,n,i,o,a){return((e=e+(t&n|r&~n)+i+a)<<o|e>>>32-o)+t}function n(e,t,r,n,i,o,a){return((e=e+(t^r^n)+i+a)<<o|e>>>32-o)+t}function i(e,t,r,n,i,o,a){return((e=e+(r^(t|~n))+i+a)<<o|e>>>32-o)+t}for(var o=Rl,a=(s=o.lib).WordArray,l=s.Hasher,s=o.algo,u=[],c=0;64>c;c++)u[c]=4294967296*e.abs(e.sin(c+1))|0;s=s.MD5=l.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,o){for(var a=0;16>a;a++){var l=e[s=o+a];e[s]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}a=this._hash.words;var s=e[o+0],c=(l=e[o+1],e[o+2]),h=e[o+3],f=e[o+4],p=e[o+5],d=e[o+6],g=e[o+7],m=e[o+8],y=e[o+9],v=e[o+10],w=e[o+11],b=e[o+12],_=e[o+13],x=e[o+14],S=e[o+15],P=t(P=a[0],A=a[1],k=a[2],j=a[3],s,7,u[0]),j=t(j,P,A,k,l,12,u[1]),k=t(k,j,P,A,c,17,u[2]),A=t(A,k,j,P,h,22,u[3]);P=t(P,A,k,j,f,7,u[4]),j=t(j,P,A,k,p,12,u[5]),k=t(k,j,P,A,d,17,u[6]),A=t(A,k,j,P,g,22,u[7]),P=t(P,A,k,j,m,7,u[8]),j=t(j,P,A,k,y,12,u[9]),k=t(k,j,P,A,v,17,u[10]),A=t(A,k,j,P,w,22,u[11]),P=t(P,A,k,j,b,7,u[12]),j=t(j,P,A,k,_,12,u[13]),k=t(k,j,P,A,x,17,u[14]),P=r(P,A=t(A,k,j,P,S,22,u[15]),k,j,l,5,u[16]),j=r(j,P,A,k,d,9,u[17]),k=r(k,j,P,A,w,14,u[18]),A=r(A,k,j,P,s,20,u[19]),P=r(P,A,k,j,p,5,u[20]),j=r(j,P,A,k,v,9,u[21]),k=r(k,j,P,A,S,14,u[22]),A=r(A,k,j,P,f,20,u[23]),P=r(P,A,k,j,y,5,u[24]),j=r(j,P,A,k,x,9,u[25]),k=r(k,j,P,A,h,14,u[26]),A=r(A,k,j,P,m,20,u[27]),P=r(P,A,k,j,_,5,u[28]),j=r(j,P,A,k,c,9,u[29]),k=r(k,j,P,A,g,14,u[30]),P=n(P,A=r(A,k,j,P,b,20,u[31]),k,j,p,4,u[32]),j=n(j,P,A,k,m,11,u[33]),k=n(k,j,P,A,w,16,u[34]),A=n(A,k,j,P,x,23,u[35]),P=n(P,A,k,j,l,4,u[36]),j=n(j,P,A,k,f,11,u[37]),k=n(k,j,P,A,g,16,u[38]),A=n(A,k,j,P,v,23,u[39]),P=n(P,A,k,j,_,4,u[40]),j=n(j,P,A,k,s,11,u[41]),k=n(k,j,P,A,h,16,u[42]),A=n(A,k,j,P,d,23,u[43]),P=n(P,A,k,j,y,4,u[44]),j=n(j,P,A,k,b,11,u[45]),k=n(k,j,P,A,S,16,u[46]),P=i(P,A=n(A,k,j,P,c,23,u[47]),k,j,s,6,u[48]),j=i(j,P,A,k,g,10,u[49]),k=i(k,j,P,A,x,15,u[50]),A=i(A,k,j,P,p,21,u[51]),P=i(P,A,k,j,b,6,u[52]),j=i(j,P,A,k,h,10,u[53]),k=i(k,j,P,A,v,15,u[54]),A=i(A,k,j,P,l,21,u[55]),P=i(P,A,k,j,m,6,u[56]),j=i(j,P,A,k,S,10,u[57]),k=i(k,j,P,A,d,15,u[58]),A=i(A,k,j,P,_,21,u[59]),P=i(P,A,k,j,f,6,u[60]),j=i(j,P,A,k,w,10,u[61]),k=i(k,j,P,A,c,15,u[62]),A=i(A,k,j,P,y,21,u[63]);a[0]=a[0]+P|0,a[1]=a[1]+A|0,a[2]=a[2]+k|0,a[3]=a[3]+j|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296);for(r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(r.length+1),this._process(),r=(t=this._hash).words,n=0;4>n;n++)i=r[n],r[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=l.clone.call(this);return e._hash=this._hash.clone(),e}}),o.MD5=l._createHelper(s),o.HmacMD5=l._createHmacHelper(s)}(Math),function(){var e,t=Rl,r=(e=t.lib).Base,n=e.WordArray,i=(e=t.algo).EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=(l=this.cfg).hasher.create(),i=n.create(),o=i.words,a=l.keySize,l=l.iterations;o.length<a;){s&&r.update(s);var s=r.update(e).finalize(t);r.reset();for(var u=1;u<l;u++)s=r.finalize(s),r.reset();i.concat(s)}return i.sigBytes=4*a,i}});t.EvpKDF=function(e,t,r){return i.create(r).compute(e,t)}}(),Rl.lib.Cipher||function(){var e=(f=Rl).lib,t=e.Base,r=e.WordArray,n=e.BufferedBlockAlgorithm,i=f.enc.Base64,o=f.algo.EvpKDF,a=e.Cipher=n.extend({cfg:t.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,r,n){return("string"==typeof r?p:h).encrypt(e,t,r,n)},decrypt:function(t,r,n){return("string"==typeof r?p:h).decrypt(e,t,r,n)}}}});e.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=f.mode={},s=function(e,t,r){var n=this._iv;n?this._iv=void 0:n=this._prevBlock;for(var i=0;i<r;i++)e[t+i]^=n[i]},u=(e.BlockCipherMode=t.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();u.Encryptor=u.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize;s.call(this,e,t,n),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+n)}}),u.Decryptor=u.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=e.slice(t,t+n);r.decryptBlock(e,t),s.call(this,e,t,n),this._prevBlock=i}}),l=l.CBC=u,u=(f.pad={}).Pkcs7={pad:function(e,t){for(var n,i=(n=(n=4*t)-e.sigBytes%n)<<24|n<<16|n<<8|n,o=[],a=0;a<n;a+=4)o.push(i);n=r.create(o,n),e.concat(n)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},e.BlockCipher=a.extend({cfg:a.cfg.extend({mode:l,padding:u}),reset:function(){a.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=t.createEncryptor;else r=t.createDecryptor,this._minBufferSize=1;this._mode=r.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var c=e.CipherParams=t.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),h=(l=(f.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?r.create([1398893684,1701076831]).concat(e).concat(t):t).toString(i)},parse:function(e){var t=(e=i.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var n=r.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return c.create({ciphertext:e,salt:n})}},e.SerializableCipher=t.extend({cfg:t.extend({format:l}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n);return t=i.finalize(t),i=i.cfg,c.create({ciphertext:t,key:r,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),f=(f.kdf={}).OpenSSL={execute:function(e,t,n,i){return i||(i=r.random(8)),e=o.create({keySize:t+n}).compute(e,i),n=r.create(e.words.slice(t),4*n),e.sigBytes=4*t,c.create({key:e,iv:n,salt:i})}},p=e.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:f}),encrypt:function(e,t,r,n){return r=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize),n.iv=r.iv,(e=h.encrypt.call(this,e,t,r.key,n)).mixIn(r),e},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),r=n.kdf.execute(r,e.keySize,e.ivSize,t.salt),n.iv=r.iv,h.decrypt.call(this,e,t,r.key,n)}})}(),function(){for(var e=Rl,t=e.lib.BlockCipher,r=e.algo,n=[],i=[],o=[],a=[],l=[],s=[],u=[],c=[],h=[],f=[],p=[],d=0;256>d;d++)p[d]=128>d?d<<1:d<<1^283;var g=0,m=0;for(d=0;256>d;d++){var y=(y=m^m<<1^m<<2^m<<3^m<<4)>>>8^255&y^99;n[g]=y,i[y]=g;var v=p[g],w=p[v],b=p[w],_=257*p[y]^16843008*y;o[g]=_<<24|_>>>8,a[g]=_<<16|_>>>16,l[g]=_<<8|_>>>24,s[g]=_,_=16843009*b^65537*w^257*v^16843008*g,u[y]=_<<24|_>>>8,c[y]=_<<16|_>>>16,h[y]=_<<8|_>>>24,f[y]=_,g?(g=v^p[p[p[b^v]]],m^=p[p[m]]):g=m=1}var x=[0,1,2,4,8,16,32,64,128,27,54];r=r.AES=t.extend({_doReset:function(){for(var e=(r=this._key).words,t=r.sigBytes/4,r=4*((this._nRounds=t+6)+1),i=this._keySchedule=[],o=0;o<r;o++)if(o<t)i[o]=e[o];else{var a=i[o-1];o%t?6<t&&4==o%t&&(a=n[a>>>24]<<24|n[a>>>16&255]<<16|n[a>>>8&255]<<8|n[255&a]):(a=n[(a=a<<8|a>>>24)>>>24]<<24|n[a>>>16&255]<<16|n[a>>>8&255]<<8|n[255&a],a^=x[o/t|0]<<24),i[o]=i[o-t]^a}for(e=this._invKeySchedule=[],t=0;t<r;t++)o=r-t,a=t%4?i[o]:i[o-4],e[t]=4>t||4>=o?a:u[n[a>>>24]]^c[n[a>>>16&255]]^h[n[a>>>8&255]]^f[n[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,a,l,s,n)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,c,h,f,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,l){for(var s=this._nRounds,u=e[t]^r[0],c=e[t+1]^r[1],h=e[t+2]^r[2],f=e[t+3]^r[3],p=4,d=1;d<s;d++){var g=n[u>>>24]^i[c>>>16&255]^o[h>>>8&255]^a[255&f]^r[p++],m=n[c>>>24]^i[h>>>16&255]^o[f>>>8&255]^a[255&u]^r[p++],y=n[h>>>24]^i[f>>>16&255]^o[u>>>8&255]^a[255&c]^r[p++];f=n[f>>>24]^i[u>>>16&255]^o[c>>>8&255]^a[255&h]^r[p++],u=g,c=m,h=y}g=(l[u>>>24]<<24|l[c>>>16&255]<<16|l[h>>>8&255]<<8|l[255&f])^r[p++],m=(l[c>>>24]<<24|l[h>>>16&255]<<16|l[f>>>8&255]<<8|l[255&u])^r[p++],y=(l[h>>>24]<<24|l[f>>>16&255]<<16|l[u>>>8&255]<<8|l[255&c])^r[p++],f=(l[f>>>24]<<24|l[u>>>16&255]<<16|l[c>>>8&255]<<8|l[255&h])^r[p++],e[t]=g,e[t+1]=m,e[t+2]=y,e[t+3]=f},keySize:8});e.AES=t._createHelper(r)}();var Bl=Rl,Il=function(e,t,r){return v(void 0,void 0,void 0,function(){var n,i,o,a,l;return w(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="string"==typeof(u=e)&&u.length>0&&u.length%2==0&&/^[0-9a-fA-F]+$/.test(u)?jl.Buffer.from(e,"hex").toString("base64"):e,i=jl.Buffer.from(t,"base64").toString("hex"),o=jl.Buffer.from(r,"utf8").toString("hex"),[4,d.default.decrypt(n,o,i,"aes-256-cbc")];case 1:return a=s.sent(),[2,JSON.parse(a)];case 2:throw l=s.sent(),console.error("Error decrypting file:",l),l;case 3:return[2]}var u})})};var Nl=function(e,t){return v(void 0,void 0,void 0,function(){var r,n,i,o;return w(this,function(a){switch(a.label){case 0:r="".concat(g.default.DocumentDirectoryPath+"/"+e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,g.default.readFile(r,"utf8")];case 2:return n=a.sent(),i=Bl.AES.decrypt(n,t),[2,JSON.parse(i.toString(Bl.enc.Utf8))];case 3:return o=a.sent(),console.error("Failed to read file:",o.message),[2,[]];case 4:return[2]}})})},Dl=function(e){return v(void 0,void 0,void 0,function(){var t,r,n,i,o;return w(this,function(a){switch(a.label){case 0:return a.trys.push([0,9,,10]),[4,g.default.readDir(e)];case 1:t=a.sent(),r=0,n=t,a.label=2;case 2:return r<n.length?(i=n[r]).isFile()?[4,g.default.unlink(i.path)]:[3,4]:[3,8];case 3:return a.sent(),[3,7];case 4:return i.isDirectory()?[4,Dl(i.path)]:[3,7];case 5:return a.sent(),[4,g.default.unlink(i.path)];case 6:a.sent(),a.label=7;case 7:return r++,[3,2];case 8:return console.log("Contents of ".concat(e," have been cleared.")),[3,10];case 9:return o=a.sent(),console.error("Error clearing contents of ".concat(e,":"),o),[3,10];case 10:return[2]}})})};const Ul=e=>{let t;const r=new Set,n=(e,n)=>{const i="function"==typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,o={setState:n,getState:i,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{r.clear()}},a=t=e(n,i,o);return o};var Gl={},Wl={get exports(){return Gl},set exports(e){Gl=e}},ql={},Vl={},$l={get exports(){return Vl},set exports(e){Vl=e}},Jl={},Yl=f.default;var Xl="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Hl=Yl.useState,Kl=Yl.useEffect,Zl=Yl.useLayoutEffect,Ql=Yl.useDebugValue;function es(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Xl(e,r)}catch(e){return!0}}var ts="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=Hl({inst:{value:r,getSnapshot:t}}),i=n[0].inst,o=n[1];return Zl(function(){i.value=r,i.getSnapshot=t,es(i)&&o({inst:i})},[e,r,t]),Kl(function(){return es(i)&&o({inst:i}),e(function(){es(i)&&o({inst:i})})},[e]),Ql(r),r};Jl.useSyncExternalStore=void 0!==Yl.useSyncExternalStore?Yl.useSyncExternalStore:ts,$l.exports=Jl;
10
+ !function(e){var t=Cl,n=jl,r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},e.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|p(e,t),r=o(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return a.from(r,t,n);var i=function(e){if(a.isBuffer(e)){var t=0|d(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||B(e.length)?o(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return l(e),o(e<0?0:0|d(e))}function c(e){for(var t=e.length<0?0:0|d(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,a.prototype),r}function d(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(e).length;default:if(i)return r?-1:j(e).length;t=(""+t).toLowerCase(),i=!0}}function f(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),B(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(u(e,o+d)!==u(t,d)){h=!1;break}if(h)return o}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(B(s))return a;e[n+a]=s}return a}function w(e,t,n,r){return I(j(t,e.length-n),e,n,r)}function b(e,t,n,r){return I(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return I(N(t),e,n,r)}function x(e,t,n,r){return I(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=P));return n}(r)}e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,n){return s(e,t,n)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(z(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(z(o,Uint8Array))i+o.length>r.length?a.from(o).copy(r,i):Uint8Array.prototype.set.call(r,o,i);else{if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):f.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(e,t,n,r,i){if(z(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),h=0;h<l;++h)if(u[h]!==c[h]){o=u[h],s=c[h];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return b(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function M(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function k(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=U[e[o]];return i}function T(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function E(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,r,i,o){return t=+t,r>>>=0,o||L(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function F(e,t,r,i,o){return t=+t,r>>>=0,o||L(e,0,r,8),n.write(e,t,r,i,52,8),r+8}a.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,a.prototype),r},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),n.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=a.isBuffer(e)?e:a.from(e,r),l=s.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=s[o%l]}return this};var O=/[^+/0-9A-Za-z-_]/g;function j(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function N(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function I(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function B(e){return e!=e}var U=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()}(Ml);let Nl=function(e){var t={},n=t.lib={},r=function(){},i=n.Base={extend:function(e){r.prototype=this;var t=new r;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=n.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes;if(e=e.sigBytes,this.clamp(),r%4)for(var i=0;i<e;i++)t[r+i>>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535<n.length)for(i=0;i<e;i+=4)t[r+i>>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r<t;r+=4)n.push(4294967296*e.random()|0);return new o.init(n,t)}}),a=t.enc={},s=a.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++){var i=t[r>>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},l=a.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r<e;r++)n.push(String.fromCharCode(t[r>>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},u=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},c=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,i=e.min(4*t,i),t){for(var l=0;l<t;l+=a)this._doProcessBlock(r,l);l=r.splice(0,t),n.sigBytes-=i}return new o.init(l,i)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=c.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){c.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=t.algo={};return t}(Math);!function(){var e=Nl,t=e.lib.WordArray;e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp(),e=[];for(var i=0;i<n;i+=3)for(var o=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;4>a&&i+.75*a<n;a++)e.push(r.charAt(o>>>6*(3-a)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var n=e.length,r=this._map;(i=r.charAt(64))&&(-1!=(i=e.indexOf(i))&&(n=i));for(var i=[],o=0,a=0;a<n;a++)if(a%4){var s=r.indexOf(e.charAt(a-1))<<a%4*2,l=r.indexOf(e.charAt(a))>>>6-a%4*2;i[o>>>2]|=(s|l)<<24-o%4*8,o++}return t.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function t(e,t,n,r,i,o,a){return((e=e+(t&n|~t&r)+i+a)<<o|e>>>32-o)+t}function n(e,t,n,r,i,o,a){return((e=e+(t&r|n&~r)+i+a)<<o|e>>>32-o)+t}function r(e,t,n,r,i,o,a){return((e=e+(t^n^r)+i+a)<<o|e>>>32-o)+t}function i(e,t,n,r,i,o,a){return((e=e+(n^(t|~r))+i+a)<<o|e>>>32-o)+t}for(var o=Nl,a=(l=o.lib).WordArray,s=l.Hasher,l=o.algo,u=[],c=0;64>c;c++)u[c]=4294967296*e.abs(e.sin(c+1))|0;l=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,o){for(var a=0;16>a;a++){var s=e[l=o+a];e[l]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}a=this._hash.words;var l=e[o+0],c=(s=e[o+1],e[o+2]),h=e[o+3],d=e[o+4],p=e[o+5],f=e[o+6],g=e[o+7],m=e[o+8],v=e[o+9],y=e[o+10],w=e[o+11],b=e[o+12],_=e[o+13],x=e[o+14],S=e[o+15],A=t(A=a[0],C=a[1],M=a[2],P=a[3],l,7,u[0]),P=t(P,A,C,M,s,12,u[1]),M=t(M,P,A,C,c,17,u[2]),C=t(C,M,P,A,h,22,u[3]);A=t(A,C,M,P,d,7,u[4]),P=t(P,A,C,M,p,12,u[5]),M=t(M,P,A,C,f,17,u[6]),C=t(C,M,P,A,g,22,u[7]),A=t(A,C,M,P,m,7,u[8]),P=t(P,A,C,M,v,12,u[9]),M=t(M,P,A,C,y,17,u[10]),C=t(C,M,P,A,w,22,u[11]),A=t(A,C,M,P,b,7,u[12]),P=t(P,A,C,M,_,12,u[13]),M=t(M,P,A,C,x,17,u[14]),A=n(A,C=t(C,M,P,A,S,22,u[15]),M,P,s,5,u[16]),P=n(P,A,C,M,f,9,u[17]),M=n(M,P,A,C,w,14,u[18]),C=n(C,M,P,A,l,20,u[19]),A=n(A,C,M,P,p,5,u[20]),P=n(P,A,C,M,y,9,u[21]),M=n(M,P,A,C,S,14,u[22]),C=n(C,M,P,A,d,20,u[23]),A=n(A,C,M,P,v,5,u[24]),P=n(P,A,C,M,x,9,u[25]),M=n(M,P,A,C,h,14,u[26]),C=n(C,M,P,A,m,20,u[27]),A=n(A,C,M,P,_,5,u[28]),P=n(P,A,C,M,c,9,u[29]),M=n(M,P,A,C,g,14,u[30]),A=r(A,C=n(C,M,P,A,b,20,u[31]),M,P,p,4,u[32]),P=r(P,A,C,M,m,11,u[33]),M=r(M,P,A,C,w,16,u[34]),C=r(C,M,P,A,x,23,u[35]),A=r(A,C,M,P,s,4,u[36]),P=r(P,A,C,M,d,11,u[37]),M=r(M,P,A,C,g,16,u[38]),C=r(C,M,P,A,y,23,u[39]),A=r(A,C,M,P,_,4,u[40]),P=r(P,A,C,M,l,11,u[41]),M=r(M,P,A,C,h,16,u[42]),C=r(C,M,P,A,f,23,u[43]),A=r(A,C,M,P,v,4,u[44]),P=r(P,A,C,M,b,11,u[45]),M=r(M,P,A,C,S,16,u[46]),A=i(A,C=r(C,M,P,A,c,23,u[47]),M,P,l,6,u[48]),P=i(P,A,C,M,g,10,u[49]),M=i(M,P,A,C,x,15,u[50]),C=i(C,M,P,A,p,21,u[51]),A=i(A,C,M,P,b,6,u[52]),P=i(P,A,C,M,h,10,u[53]),M=i(M,P,A,C,y,15,u[54]),C=i(C,M,P,A,s,21,u[55]),A=i(A,C,M,P,m,6,u[56]),P=i(P,A,C,M,S,10,u[57]),M=i(M,P,A,C,f,15,u[58]),C=i(C,M,P,A,_,21,u[59]),A=i(A,C,M,P,d,6,u[60]),P=i(P,A,C,M,w,10,u[61]),M=i(M,P,A,C,c,15,u[62]),C=i(C,M,P,A,v,21,u[63]);a[0]=a[0]+A|0,a[1]=a[1]+C|0,a[2]=a[2]+M|0,a[3]=a[3]+P|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296);for(n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),n=(t=this._hash).words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return t},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),o.MD5=s._createHelper(l),o.HmacMD5=s._createHmacHelper(l)}(Math),function(){var e,t=Nl,n=(e=t.lib).Base,r=e.WordArray,i=(e=t.algo).EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:e.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=(s=this.cfg).hasher.create(),i=r.create(),o=i.words,a=s.keySize,s=s.iterations;o.length<a;){l&&n.update(l);var l=n.update(e).finalize(t);n.reset();for(var u=1;u<s;u++)l=n.finalize(l),n.reset();i.concat(l)}return i.sigBytes=4*a,i}});t.EvpKDF=function(e,t,n){return i.create(n).compute(e,t)}}(),Nl.lib.Cipher||function(){var e=(d=Nl).lib,t=e.Base,n=e.WordArray,r=e.BufferedBlockAlgorithm,i=d.enc.Base64,o=d.algo.EvpKDF,a=e.Cipher=r.extend({cfg:t.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){r.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,n,r){return("string"==typeof n?p:h).encrypt(e,t,n,r)},decrypt:function(t,n,r){return("string"==typeof n?p:h).decrypt(e,t,n,r)}}}});e.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var s=d.mode={},l=function(e,t,n){var r=this._iv;r?this._iv=void 0:r=this._prevBlock;for(var i=0;i<n;i++)e[t+i]^=r[i]},u=(e.BlockCipherMode=t.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();u.Encryptor=u.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;l.call(this,e,t,r),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),u.Decryptor=u.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=e.slice(t,t+r);n.decryptBlock(e,t),l.call(this,e,t,r),this._prevBlock=i}}),s=s.CBC=u,u=(d.pad={}).Pkcs7={pad:function(e,t){for(var r,i=(r=(r=4*t)-e.sigBytes%r)<<24|r<<16|r<<8|r,o=[],a=0;a<r;a+=4)o.push(i);r=n.create(o,r),e.concat(r)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},e.BlockCipher=a.extend({cfg:a.cfg.extend({mode:s,padding:u}),reset:function(){a.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else n=t.createDecryptor,this._minBufferSize=1;this._mode=n.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var c=e.CipherParams=t.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),h=(s=(d.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?n.create([1398893684,1701076831]).concat(e).concat(t):t).toString(i)},parse:function(e){var t=(e=i.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var r=n.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return c.create({ciphertext:e,salt:r})}},e.SerializableCipher=t.extend({cfg:t.extend({format:s}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r);return t=i.finalize(t),i=i.cfg,c.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),d=(d.kdf={}).OpenSSL={execute:function(e,t,r,i){return i||(i=n.random(8)),e=o.create({keySize:t+r}).compute(e,i),r=n.create(e.words.slice(t),4*r),e.sigBytes=4*t,c.create({key:e,iv:r,salt:i})}},p=e.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:d}),encrypt:function(e,t,n,r){return n=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,(e=h.encrypt.call(this,e,t,n.key,r)).mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,h.decrypt.call(this,e,t,n.key,r)}})}(),function(){for(var e=Nl,t=e.lib.BlockCipher,n=e.algo,r=[],i=[],o=[],a=[],s=[],l=[],u=[],c=[],h=[],d=[],p=[],f=0;256>f;f++)p[f]=128>f?f<<1:f<<1^283;var g=0,m=0;for(f=0;256>f;f++){var v=(v=m^m<<1^m<<2^m<<3^m<<4)>>>8^255&v^99;r[g]=v,i[v]=g;var y=p[g],w=p[y],b=p[w],_=257*p[v]^16843008*v;o[g]=_<<24|_>>>8,a[g]=_<<16|_>>>16,s[g]=_<<8|_>>>24,l[g]=_,_=16843009*b^65537*w^257*y^16843008*g,u[v]=_<<24|_>>>8,c[v]=_<<16|_>>>16,h[v]=_<<8|_>>>24,d[v]=_,g?(g=y^p[p[p[b^y]]],m^=p[p[m]]):g=m=1}var x=[0,1,2,4,8,16,32,64,128,27,54];n=n.AES=t.extend({_doReset:function(){for(var e=(n=this._key).words,t=n.sigBytes/4,n=4*((this._nRounds=t+6)+1),i=this._keySchedule=[],o=0;o<n;o++)if(o<t)i[o]=e[o];else{var a=i[o-1];o%t?6<t&&4==o%t&&(a=r[a>>>24]<<24|r[a>>>16&255]<<16|r[a>>>8&255]<<8|r[255&a]):(a=r[(a=a<<8|a>>>24)>>>24]<<24|r[a>>>16&255]<<16|r[a>>>8&255]<<8|r[255&a],a^=x[o/t|0]<<24),i[o]=i[o-t]^a}for(e=this._invKeySchedule=[],t=0;t<n;t++)o=n-t,a=t%4?i[o]:i[o-4],e[t]=4>t||4>=o?a:u[r[a>>>24]]^c[r[a>>>16&255]]^h[r[a>>>8&255]]^d[r[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,a,s,l,r)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,c,h,d,i),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var l=this._nRounds,u=e[t]^n[0],c=e[t+1]^n[1],h=e[t+2]^n[2],d=e[t+3]^n[3],p=4,f=1;f<l;f++){var g=r[u>>>24]^i[c>>>16&255]^o[h>>>8&255]^a[255&d]^n[p++],m=r[c>>>24]^i[h>>>16&255]^o[d>>>8&255]^a[255&u]^n[p++],v=r[h>>>24]^i[d>>>16&255]^o[u>>>8&255]^a[255&c]^n[p++];d=r[d>>>24]^i[u>>>16&255]^o[c>>>8&255]^a[255&h]^n[p++],u=g,c=m,h=v}g=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[h>>>8&255]<<8|s[255&d])^n[p++],m=(s[c>>>24]<<24|s[h>>>16&255]<<16|s[d>>>8&255]<<8|s[255&u])^n[p++],v=(s[h>>>24]<<24|s[d>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^n[p++],d=(s[d>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&h])^n[p++],e[t]=g,e[t+1]=m,e[t+2]=v,e[t+3]=d},keySize:8});e.AES=t._createHelper(n)}();var Il=Nl,zl=function(e,t,n){return x(void 0,void 0,void 0,function(){var r,i,o,a,s;return S(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),r="string"==typeof(u=e)&&u.length>0&&u.length%2==0&&/^[0-9a-fA-F]+$/.test(u)?Ml.Buffer.from(e,"hex").toString("base64"):e,i=Ml.Buffer.from(t,"base64").toString("hex"),o=Ml.Buffer.from(n,"utf8").toString("hex"),[4,m.default.decrypt(r,o,i,"aes-256-cbc")];case 1:return a=l.sent(),[2,JSON.parse(a)];case 2:throw s=l.sent(),console.error("Error decrypting file:",s),s;case 3:return[2]}var u})})};var Bl=function(e,t){return x(void 0,void 0,void 0,function(){var n,r,i,o;return S(this,function(a){switch(a.label){case 0:n="".concat(v.default.DocumentDirectoryPath+"/"+e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,v.default.readFile(n,"utf8")];case 2:return r=a.sent(),i=Il.AES.decrypt(r,t),[2,JSON.parse(i.toString(Il.enc.Utf8))];case 3:return o=a.sent(),console.error("Failed to read file:",o.message),[2,[]];case 4:return[2]}})})},Ul=function(e){return x(void 0,void 0,void 0,function(){var t,n,r,i,o;return S(this,function(a){switch(a.label){case 0:return a.trys.push([0,9,,10]),[4,v.default.readDir(e)];case 1:t=a.sent(),n=0,r=t,a.label=2;case 2:return n<r.length?(i=r[n]).isFile()?[4,v.default.unlink(i.path)]:[3,4]:[3,8];case 3:return a.sent(),[3,7];case 4:return i.isDirectory()?[4,Ul(i.path)]:[3,7];case 5:return a.sent(),[4,v.default.unlink(i.path)];case 6:a.sent(),a.label=7;case 7:return n++,[3,2];case 8:return console.log("Contents of ".concat(e," have been cleared.")),[3,10];case 9:return o=a.sent(),console.error("Error clearing contents of ".concat(e,":"),o),[3,10];case 10:return[2]}})})},Hl={},Gl={get exports(){return Hl},set exports(e){Hl=e}},Wl={},Vl={},ql={get exports(){return Vl},set exports(e){Vl=e}},Zl={},Yl=f.default;var $l="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Kl=Yl.useState,Jl=Yl.useEffect,Xl=Yl.useLayoutEffect,Ql=Yl.useDebugValue;function eu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!$l(e,n)}catch(e){return!0}}var tu="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=Kl({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Xl(function(){i.value=n,i.getSnapshot=t,eu(i)&&o({inst:i})},[e,n,t]),Jl(function(){return eu(i)&&o({inst:i}),e(function(){eu(i)&&o({inst:i})})},[e]),Ql(n),n};Zl.useSyncExternalStore=void 0!==Yl.useSyncExternalStore?Yl.useSyncExternalStore:tu,ql.exports=Zl;
11
11
  /**
12
12
  * @license React
13
13
  * use-sync-external-store-shim/with-selector.production.js
@@ -17,7 +17,7 @@ read:function(e,t,r,n,i){var o,a,l=8*i-n-1,s=(1<<l)-1,u=s>>1,c=-7,h=r?i-1:0,f=r?
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
19
  */
20
- var rs=f.default,ns=Vl;var is="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},os=ns.useSyncExternalStore,as=rs.useRef,ls=rs.useEffect,ss=rs.useMemo,us=rs.useDebugValue;ql.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var o=as(null);if(null===o.current){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=ss(function(){function e(e){if(!s){if(s=!0,o=e,e=n(e),void 0!==i&&a.hasValue){var t=a.value;if(i(t,e))return l=t}return l=e}if(t=l,is(o,e))return t;var r=n(e);return void 0!==i&&i(t,r)?(o=e,t):(o=e,l=r)}var o,l,s=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,i]);var l=os(e,o[0],o[1]);return ls(function(){a.hasValue=!0,a.value=l},[l]),us(l),l},Wl.exports=ql;var cs=ue(Gl);const{useDebugValue:hs}=f.default,{useSyncExternalStoreWithSelector:fs}=cs;const ps=e=>e;const ds=e=>{const t="function"==typeof e?(e=>e?Ul(e):Ul)(e):e,r=(e,r)=>function(e,t=ps,r){const n=fs(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return hs(n),n}(t,e,r);return Object.assign(r,t),r},gs=e=>e?ds(e):ds;var ms={};
20
+ var nu=f.default,ru=Vl;var iu="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ou=ru.useSyncExternalStore,au=nu.useRef,su=nu.useEffect,lu=nu.useMemo,uu=nu.useDebugValue;Wl.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=au(null);if(null===o.current){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=lu(function(){function e(e){if(!l){if(l=!0,o=e,e=r(e),void 0!==i&&a.hasValue){var t=a.value;if(i(t,e))return s=t}return s=e}if(t=s,iu(o,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(o=e,t):(o=e,s=n)}var o,s,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,i]);var s=ou(e,o[0],o[1]);return su(function(){a.hasValue=!0,a.value=s},[s]),uu(s),s},Gl.exports=Wl;var cu=se(Hl);const{useDebugValue:hu}=f.default,{useSyncExternalStoreWithSelector:du}=cu;const pu=e=>e;const fu=e=>{const t="function"==typeof e?Xs(e):e,n=(e,n)=>function(e,t=pu,n){const r=du(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return hu(r),r}(t,e,n);return Object.assign(n,t),n},gu=e=>e?fu(e):fu;var mu,vu,yu,wu,bu,_u,xu,Su,Au,Pu,Mu={};
21
21
  /**
22
22
  * @license
23
23
  * Lodash <https://lodash.com/>
@@ -26,5 +26,5 @@ var rs=f.default,ns=Vl;var is="function"==typeof Object.is?Object.is:function(e,
26
26
  * Based on Underscore.js <http://underscorejs.org/LICENSE>
27
27
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
28
28
  */
29
- !function(e,t){(function(){var r,n="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=16,l=32,s=64,u=128,c=256,h=1/0,f=9007199254740991,p=NaN,d=4294967295,g=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",l],["partialRight",s],["rearg",c]],m="[object Arguments]",y="[object Array]",v="[object Boolean]",w="[object Date]",b="[object Error]",_="[object Function]",x="[object GeneratorFunction]",S="[object Map]",P="[object Number]",j="[object Object]",k="[object Promise]",A="[object RegExp]",E="[object Set]",z="[object String]",M="[object Symbol]",O="[object WeakMap]",F="[object ArrayBuffer]",L="[object DataView]",C="[object Float32Array]",T="[object Float64Array]",R="[object Int8Array]",B="[object Int16Array]",I="[object Int32Array]",N="[object Uint8Array]",D="[object Uint8ClampedArray]",U="[object Uint16Array]",G="[object Uint32Array]",W=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,Y=RegExp($.source),X=RegExp(J.source),H=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(re.source),ie=/^\s+/,oe=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Pe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",je="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Ae="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\ufe0e\\ufe0f",ze="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Me="['’]",Oe="["+Se+"]",Fe="["+ze+"]",Le="["+Pe+"]",Ce="\\d+",Te="["+je+"]",Re="["+ke+"]",Be="[^"+Se+ze+Ce+je+ke+Ae+"]",Ie="\\ud83c[\\udffb-\\udfff]",Ne="[^"+Se+"]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",Ue="[\\ud800-\\udbff][\\udc00-\\udfff]",Ge="["+Ae+"]",We="\\u200d",qe="(?:"+Re+"|"+Be+")",Ve="(?:"+Ge+"|"+Be+")",$e="(?:['’](?:d|ll|m|re|s|t|ve))?",Je="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Le+"|"+Ie+")"+"?",Xe="["+Ee+"]?",He=Xe+Ye+("(?:"+We+"(?:"+[Ne,De,Ue].join("|")+")"+Xe+Ye+")*"),Ke="(?:"+[Te,De,Ue].join("|")+")"+He,Ze="(?:"+[Ne+Le+"?",Le,De,Ue,Oe].join("|")+")",Qe=RegExp(Me,"g"),et=RegExp(Le,"g"),tt=RegExp(Ie+"(?="+Ie+")|"+Ze+He,"g"),rt=RegExp([Ge+"?"+Re+"+"+$e+"(?="+[Fe,Ge,"$"].join("|")+")",Ve+"+"+Je+"(?="+[Fe,Ge+qe,"$"].join("|")+")",Ge+"?"+qe+"+"+$e,Ge+"+"+Je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ce,Ke].join("|"),"g"),nt=RegExp("["+We+Se+Pe+Ee+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,lt={};lt[C]=lt[T]=lt[R]=lt[B]=lt[I]=lt[N]=lt[D]=lt[U]=lt[G]=!0,lt[m]=lt[y]=lt[F]=lt[v]=lt[L]=lt[w]=lt[b]=lt[_]=lt[S]=lt[P]=lt[j]=lt[A]=lt[E]=lt[z]=lt[O]=!1;var st={};st[m]=st[y]=st[F]=st[L]=st[v]=st[w]=st[C]=st[T]=st[R]=st[B]=st[I]=st[S]=st[P]=st[j]=st[A]=st[E]=st[z]=st[M]=st[N]=st[D]=st[U]=st[G]=!0,st[b]=st[_]=st[O]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,ht=parseInt,ft="object"==typeof se&&se&&se.Object===Object&&se,pt="object"==typeof self&&self&&self.Object===Object&&self,dt=ft||pt||Function("return this")(),gt=t&&!t.nodeType&&t,mt=gt&&e&&!e.nodeType&&e,yt=mt&&mt.exports===gt,vt=yt&&ft.process,wt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||vt&&vt.binding&&vt.binding("util")}catch(e){}}(),bt=wt&&wt.isArrayBuffer,_t=wt&&wt.isDate,xt=wt&&wt.isMap,St=wt&&wt.isRegExp,Pt=wt&&wt.isSet,jt=wt&&wt.isTypedArray;function kt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function At(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function Et(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function zt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Mt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Ot(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function Ft(e,t){return!!(null==e?0:e.length)&&Gt(e,t,0)>-1}function Lt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Ct(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Tt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Rt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Bt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function It(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Nt=$t("length");function Dt(e,t,r){var n;return r(e,function(e,r,i){if(t(e,r,i))return n=r,!1}),n}function Ut(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Gt(e,t,r){return t==t?function(e,t,r){var n=r-1,i=e.length;for(;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Ut(e,qt,r)}function Wt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function qt(e){return e!=e}function Vt(e,t){var r=null==e?0:e.length;return r?Xt(e,t)/r:p}function $t(e){return function(t){return null==t?r:t[e]}}function Jt(e){return function(t){return null==e?r:e[t]}}function Yt(e,t,r,n,i){return i(e,function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)}),r}function Xt(e,t){for(var n,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==r&&(n=n===r?a:n+a)}return n}function Ht(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Kt(e){return e?e.slice(0,dr(e)+1).replace(ie,""):e}function Zt(e){return function(t){return e(t)}}function Qt(e,t){return Ct(t,function(t){return e[t]})}function er(e,t){return e.has(t)}function tr(e,t){for(var r=-1,n=e.length;++r<n&&Gt(t,e[r],0)>-1;);return r}function rr(e,t){for(var r=e.length;r--&&Gt(t,e[r],0)>-1;);return r}var nr=Jt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ir=Jt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function or(e){return"\\"+ut[e]}function ar(e){return nt.test(e)}function lr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function sr(e,t){return function(r){return e(t(r))}}function ur(e,t){for(var r=-1,n=e.length,i=0,a=[];++r<n;){var l=e[r];l!==t&&l!==o||(e[r]=o,a[i++]=r)}return a}function cr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function hr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}function fr(e){return ar(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):Nt(e)}function pr(e){return ar(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function dr(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var gr=Jt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var mr=function e(t){var oe=(t=null==t?dt:mr.defaults(dt.Object(),t,mr.pick(dt,ot))).Array,se=t.Date,Se=t.Error,Pe=t.Function,je=t.Math,ke=t.Object,Ae=t.RegExp,Ee=t.String,ze=t.TypeError,Me=oe.prototype,Oe=Pe.prototype,Fe=ke.prototype,Le=t["__core-js_shared__"],Ce=Oe.toString,Te=Fe.hasOwnProperty,Re=0,Be=function(){var e=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ie=Fe.toString,Ne=Ce.call(ke),De=dt._,Ue=Ae("^"+Ce.call(Te).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=yt?t.Buffer:r,We=t.Symbol,qe=t.Uint8Array,Ve=Ge?Ge.allocUnsafe:r,$e=sr(ke.getPrototypeOf,ke),Je=ke.create,Ye=Fe.propertyIsEnumerable,Xe=Me.splice,He=We?We.isConcatSpreadable:r,Ke=We?We.iterator:r,Ze=We?We.toStringTag:r,tt=function(){try{var e=ho(ke,"defineProperty");return e({},"",{}),e}catch(e){}}(),nt=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,ut=se&&se.now!==dt.Date.now&&se.now,ft=t.setTimeout!==dt.setTimeout&&t.setTimeout,pt=je.ceil,gt=je.floor,mt=ke.getOwnPropertySymbols,vt=Ge?Ge.isBuffer:r,wt=t.isFinite,Nt=Me.join,Jt=sr(ke.keys,ke),yr=je.max,vr=je.min,wr=se.now,br=t.parseInt,_r=je.random,xr=Me.reverse,Sr=ho(t,"DataView"),Pr=ho(t,"Map"),jr=ho(t,"Promise"),kr=ho(t,"Set"),Ar=ho(t,"WeakMap"),Er=ho(ke,"create"),zr=Ar&&new Ar,Mr={},Or=Io(Sr),Fr=Io(Pr),Lr=Io(jr),Cr=Io(kr),Tr=Io(Ar),Rr=We?We.prototype:r,Br=Rr?Rr.valueOf:r,Ir=Rr?Rr.toString:r;function Nr(e){if(tl(e)&&!qa(e)&&!(e instanceof Wr)){if(e instanceof Gr)return e;if(Te.call(e,"__wrapped__"))return No(e)}return new Gr(e)}var Dr=function(){function e(){}return function(t){if(!el(t))return{};if(Je)return Je(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function Ur(){}function Gr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Wr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function $r(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Jr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new $r;++t<r;)this.add(e[t])}function Yr(e){var t=this.__data__=new Vr(e);this.size=t.size}function Xr(e,t){var r=qa(e),n=!r&&Wa(e),i=!r&&!n&&Ya(e),o=!r&&!n&&!i&&ul(e),a=r||n||i||o,l=a?Ht(e.length,Ee):[],s=l.length;for(var u in e)!t&&!Te.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||wo(u,s))||l.push(u);return l}function Hr(e){var t=e.length;return t?e[Yn(0,t-1)]:r}function Kr(e,t){return To(zi(e),ln(t,0,e.length))}function Zr(e){return To(zi(e))}function Qr(e,t,n){(n!==r&&!Da(e[t],n)||n===r&&!(t in e))&&on(e,t,n)}function en(e,t,n){var i=e[t];Te.call(e,t)&&Da(i,n)&&(n!==r||t in e)||on(e,t,n)}function tn(e,t){for(var r=e.length;r--;)if(Da(e[r][0],t))return r;return-1}function rn(e,t,r,n){return fn(e,function(e,i,o){t(n,e,r(e),o)}),n}function nn(e,t){return e&&Mi(t,Ol(t),e)}function on(e,t,r){"__proto__"==t&&tt?tt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function an(e,t){for(var n=-1,i=t.length,o=oe(i),a=null==e;++n<i;)o[n]=a?r:kl(e,t[n]);return o}function ln(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function sn(e,t,n,i,o,a){var l,s=1&t,u=2&t,c=4&t;if(n&&(l=o?n(e,i,o,a):n(e)),l!==r)return l;if(!el(e))return e;var h=qa(e);if(h){if(l=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!s)return zi(e,l)}else{var f=go(e),p=f==_||f==x;if(Ya(e))return Si(e,s);if(f==j||f==m||p&&!o){if(l=u||p?{}:yo(e),!s)return u?function(e,t){return Mi(e,po(e),t)}(e,function(e,t){return e&&Mi(t,Fl(t),e)}(l,e)):function(e,t){return Mi(e,fo(e),t)}(e,nn(l,e))}else{if(!st[f])return o?e:{};l=function(e,t,r){var n=e.constructor;switch(t){case F:return Pi(e);case v:case w:return new n(+e);case L:return function(e,t){var r=t?Pi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case C:case T:case R:case B:case I:case N:case D:case U:case G:return ji(e,r);case S:return new n;case P:case z:return new n(e);case A:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new n;case M:return i=e,Br?ke(Br.call(i)):{}}var i}(e,f,s)}}a||(a=new Yr);var d=a.get(e);if(d)return d;a.set(e,l),al(e)?e.forEach(function(r){l.add(sn(r,t,n,r,e,a))}):rl(e)&&e.forEach(function(r,i){l.set(i,sn(r,t,n,i,e,a))});var g=h?r:(c?u?io:no:u?Fl:Ol)(e);return Et(g||e,function(r,i){g&&(r=e[i=r]),en(l,i,sn(r,t,n,i,e,a))}),l}function un(e,t,n){var i=n.length;if(null==e)return!i;for(e=ke(e);i--;){var o=n[i],a=t[o],l=e[o];if(l===r&&!(o in e)||!a(l))return!1}return!0}function cn(e,t,i){if("function"!=typeof e)throw new ze(n);return Oo(function(){e.apply(r,i)},t)}function hn(e,t,r,n){var i=-1,o=Ft,a=!0,l=e.length,s=[],u=t.length;if(!l)return s;r&&(t=Ct(t,Zt(r))),n?(o=Lt,a=!1):t.length>=200&&(o=er,a=!1,t=new Jr(t));e:for(;++i<l;){var c=e[i],h=null==r?c:r(c);if(c=n||0!==c?c:0,a&&h==h){for(var f=u;f--;)if(t[f]===h)continue e;s.push(c)}else o(t,h,n)||s.push(c)}return s}Nr.templateSettings={escape:H,evaluate:K,interpolate:Z,variable:"",imports:{_:Nr}},Nr.prototype=Ur.prototype,Nr.prototype.constructor=Nr,Gr.prototype=Dr(Ur.prototype),Gr.prototype.constructor=Gr,Wr.prototype=Dr(Ur.prototype),Wr.prototype.constructor=Wr,qr.prototype.clear=function(){this.__data__=Er?Er(null):{},this.size=0},qr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qr.prototype.get=function(e){var t=this.__data__;if(Er){var n=t[e];return n===i?r:n}return Te.call(t,e)?t[e]:r},qr.prototype.has=function(e){var t=this.__data__;return Er?t[e]!==r:Te.call(t,e)},qr.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Er&&t===r?i:t,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(e){var t=this.__data__,r=tn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Xe.call(t,r,1),--this.size,!0)},Vr.prototype.get=function(e){var t=this.__data__,n=tn(t,e);return n<0?r:t[n][1]},Vr.prototype.has=function(e){return tn(this.__data__,e)>-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=tn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},$r.prototype.clear=function(){this.size=0,this.__data__={hash:new qr,map:new(Pr||Vr),string:new qr}},$r.prototype.delete=function(e){var t=uo(this,e).delete(e);return this.size-=t?1:0,t},$r.prototype.get=function(e){return uo(this,e).get(e)},$r.prototype.has=function(e){return uo(this,e).has(e)},$r.prototype.set=function(e,t){var r=uo(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Jr.prototype.add=Jr.prototype.push=function(e){return this.__data__.set(e,i),this},Jr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Yr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Yr.prototype.get=function(e){return this.__data__.get(e)},Yr.prototype.has=function(e){return this.__data__.has(e)},Yr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!Pr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new $r(n)}return r.set(e,t),this.size=r.size,this};var fn=Li(bn),pn=Li(_n,!0);function dn(e,t){var r=!0;return fn(e,function(e,n,i){return r=!!t(e,n,i)}),r}function gn(e,t,n){for(var i=-1,o=e.length;++i<o;){var a=e[i],l=t(a);if(null!=l&&(s===r?l==l&&!sl(l):n(l,s)))var s=l,u=a}return u}function mn(e,t){var r=[];return fn(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function yn(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=vo),i||(i=[]);++o<a;){var l=e[o];t>0&&r(l)?t>1?yn(l,t-1,r,n,i):Tt(i,l):n||(i[i.length]=l)}return i}var vn=Ci(),wn=Ci(!0);function bn(e,t){return e&&vn(e,t,Ol)}function _n(e,t){return e&&wn(e,t,Ol)}function xn(e,t){return Ot(t,function(t){return Ka(e[t])})}function Sn(e,t){for(var n=0,i=(t=wi(t,e)).length;null!=e&&n<i;)e=e[Bo(t[n++])];return n&&n==i?e:r}function Pn(e,t,r){var n=t(e);return qa(e)?n:Tt(n,r(e))}function jn(e){return null==e?e===r?"[object Undefined]":"[object Null]":Ze&&Ze in ke(e)?function(e){var t=Te.call(e,Ze),n=e[Ze];try{e[Ze]=r;var i=!0}catch(e){}var o=Ie.call(e);i&&(t?e[Ze]=n:delete e[Ze]);return o}(e):function(e){return Ie.call(e)}(e)}function kn(e,t){return e>t}function An(e,t){return null!=e&&Te.call(e,t)}function En(e,t){return null!=e&&t in ke(e)}function zn(e,t,n){for(var i=n?Lt:Ft,o=e[0].length,a=e.length,l=a,s=oe(a),u=1/0,c=[];l--;){var h=e[l];l&&t&&(h=Ct(h,Zt(t))),u=vr(h.length,u),s[l]=!n&&(t||o>=120&&h.length>=120)?new Jr(l&&h):r}h=e[0];var f=-1,p=s[0];e:for(;++f<o&&c.length<u;){var d=h[f],g=t?t(d):d;if(d=n||0!==d?d:0,!(p?er(p,g):i(c,g,n))){for(l=a;--l;){var m=s[l];if(!(m?er(m,g):i(e[l],g,n)))continue e}p&&p.push(g),c.push(d)}}return c}function Mn(e,t,n){var i=null==(e=Eo(e,t=wi(t,e)))?e:e[Bo(Ho(t))];return null==i?r:kt(i,e,n)}function On(e){return tl(e)&&jn(e)==m}function Fn(e,t,n,i,o){return e===t||(null==e||null==t||!tl(e)&&!tl(t)?e!=e&&t!=t:function(e,t,n,i,o,a){var l=qa(e),s=qa(t),u=l?y:go(e),c=s?y:go(t),h=(u=u==m?j:u)==j,f=(c=c==m?j:c)==j,p=u==c;if(p&&Ya(e)){if(!Ya(t))return!1;l=!0,h=!1}if(p&&!h)return a||(a=new Yr),l||ul(e)?to(e,t,n,i,o,a):function(e,t,r,n,i,o,a){switch(r){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case F:return!(e.byteLength!=t.byteLength||!o(new qe(e),new qe(t)));case v:case w:case P:return Da(+e,+t);case b:return e.name==t.name&&e.message==t.message;case A:case z:return e==t+"";case S:var l=lr;case E:var s=1&n;if(l||(l=cr),e.size!=t.size&&!s)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var c=to(l(e),l(t),n,i,o,a);return a.delete(e),c;case M:if(Br)return Br.call(e)==Br.call(t)}return!1}(e,t,u,n,i,o,a);if(!(1&n)){var d=h&&Te.call(e,"__wrapped__"),g=f&&Te.call(t,"__wrapped__");if(d||g){var _=d?e.value():e,x=g?t.value():t;return a||(a=new Yr),o(_,x,n,i,a)}}if(!p)return!1;return a||(a=new Yr),function(e,t,n,i,o,a){var l=1&n,s=no(e),u=s.length,c=no(t),h=c.length;if(u!=h&&!l)return!1;var f=u;for(;f--;){var p=s[f];if(!(l?p in t:Te.call(t,p)))return!1}var d=a.get(e),g=a.get(t);if(d&&g)return d==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);var y=l;for(;++f<u;){var v=e[p=s[f]],w=t[p];if(i)var b=l?i(w,v,p,t,e,a):i(v,w,p,e,t,a);if(!(b===r?v===w||o(v,w,n,i,a):b)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var _=e.constructor,x=t.constructor;_==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,i,o,a)}(e,t,n,i,Fn,o))}function Ln(e,t,n,i){var o=n.length,a=o,l=!i;if(null==e)return!a;for(e=ke(e);o--;){var s=n[o];if(l&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){var u=(s=n[o])[0],c=e[u],h=s[1];if(l&&s[2]){if(c===r&&!(u in e))return!1}else{var f=new Yr;if(i)var p=i(c,h,u,e,t,f);if(!(p===r?Fn(h,c,3,i,f):p))return!1}}return!0}function Cn(e){return!(!el(e)||(t=e,Be&&Be in t))&&(Ka(e)?Ue:ye).test(Io(e));var t}function Tn(e){return"function"==typeof e?e:null==e?ns:"object"==typeof e?qa(e)?Un(e[0],e[1]):Dn(e):fs(e)}function Rn(e){if(!Po(e))return Jt(e);var t=[];for(var r in ke(e))Te.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Bn(e){if(!el(e))return function(e){var t=[];if(null!=e)for(var r in ke(e))t.push(r);return t}(e);var t=Po(e),r=[];for(var n in e)("constructor"!=n||!t&&Te.call(e,n))&&r.push(n);return r}function In(e,t){return e<t}function Nn(e,t){var r=-1,n=$a(e)?oe(e.length):[];return fn(e,function(e,i,o){n[++r]=t(e,i,o)}),n}function Dn(e){var t=co(e);return 1==t.length&&t[0][2]?ko(t[0][0],t[0][1]):function(r){return r===e||Ln(r,e,t)}}function Un(e,t){return _o(e)&&jo(t)?ko(Bo(e),t):function(n){var i=kl(n,e);return i===r&&i===t?Al(n,e):Fn(t,i,3)}}function Gn(e,t,n,i,o){e!==t&&vn(t,function(a,l){if(o||(o=new Yr),el(a))!function(e,t,n,i,o,a,l){var s=zo(e,n),u=zo(t,n),c=l.get(u);if(c)return void Qr(e,n,c);var h=a?a(s,u,n+"",e,t,l):r,f=h===r;if(f){var p=qa(u),d=!p&&Ya(u),g=!p&&!d&&ul(u);h=u,p||d||g?qa(s)?h=s:Ja(s)?h=zi(s):d?(f=!1,h=Si(u,!0)):g?(f=!1,h=ji(u,!0)):h=[]:il(u)||Wa(u)?(h=s,Wa(s)?h=yl(s):el(s)&&!Ka(s)||(h=yo(u))):f=!1}f&&(l.set(u,h),o(h,u,i,a,l),l.delete(u));Qr(e,n,h)}(e,t,l,n,Gn,i,o);else{var s=i?i(zo(e,l),a,l+"",e,t,o):r;s===r&&(s=a),Qr(e,l,s)}},Fl)}function Wn(e,t){var n=e.length;if(n)return wo(t+=t<0?n:0,n)?e[t]:r}function qn(e,t,r){t=t.length?Ct(t,function(e){return qa(e)?function(t){return Sn(t,1===e.length?e[0]:e)}:e}):[ns];var n=-1;t=Ct(t,Zt(so()));var i=Nn(e,function(e,r,i){var o=Ct(t,function(t){return t(e)});return{criteria:o,index:++n,value:e}});return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(i,function(e,t){return function(e,t,r){var n=-1,i=e.criteria,o=t.criteria,a=i.length,l=r.length;for(;++n<a;){var s=ki(i[n],o[n]);if(s)return n>=l?s:s*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)})}function Vn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],l=Sn(e,a);r(l,a)&&Qn(o,wi(a,e),l)}return o}function $n(e,t,r,n){var i=n?Wt:Gt,o=-1,a=t.length,l=e;for(e===t&&(t=zi(t)),r&&(l=Ct(e,Zt(r)));++o<a;)for(var s=0,u=t[o],c=r?r(u):u;(s=i(l,c,s,n))>-1;)l!==e&&Xe.call(l,s,1),Xe.call(e,s,1);return e}function Jn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;wo(i)?Xe.call(e,i,1):hi(e,i)}}return e}function Yn(e,t){return e+gt(_r()*(t-e+1))}function Xn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=gt(t/2))&&(e+=e)}while(t);return r}function Hn(e,t){return Fo(Ao(e,t,ns),e+"")}function Kn(e){return Hr(Dl(e))}function Zn(e,t){var r=Dl(e);return To(r,ln(t,0,r.length))}function Qn(e,t,n,i){if(!el(e))return e;for(var o=-1,a=(t=wi(t,e)).length,l=a-1,s=e;null!=s&&++o<a;){var u=Bo(t[o]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=l){var h=s[u];(c=i?i(h,u,s):r)===r&&(c=el(h)?h:wo(t[o+1])?[]:{})}en(s,u,c),s=s[u]}return e}var ei=zr?function(e,t){return zr.set(e,t),e}:ns,ti=tt?function(e,t){return tt(e,"toString",{configurable:!0,enumerable:!1,value:es(t),writable:!0})}:ns;function ri(e){return To(Dl(e))}function ni(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=oe(i);++n<i;)o[n]=e[n+t];return o}function ii(e,t){var r;return fn(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function oi(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=e[o];null!==a&&!sl(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return ai(e,t,ns,r)}function ai(e,t,n,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var l=(t=n(t))!=t,s=null===t,u=sl(t),c=t===r;o<a;){var h=gt((o+a)/2),f=n(e[h]),p=f!==r,d=null===f,g=f==f,m=sl(f);if(l)var y=i||g;else y=c?g&&(i||p):s?g&&p&&(i||!d):u?g&&p&&!d&&(i||!m):!d&&!m&&(i?f<=t:f<t);y?o=h+1:a=h}return vr(a,4294967294)}function li(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],l=t?t(a):a;if(!r||!Da(l,s)){var s=l;o[i++]=0===a?0:a}}return o}function si(e){return"number"==typeof e?e:sl(e)?p:+e}function ui(e){if("string"==typeof e)return e;if(qa(e))return Ct(e,ui)+"";if(sl(e))return Ir?Ir.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ci(e,t,r){var n=-1,i=Ft,o=e.length,a=!0,l=[],s=l;if(r)a=!1,i=Lt;else if(o>=200){var u=t?null:Xi(e);if(u)return cr(u);a=!1,i=er,s=new Jr}else s=t?[]:l;e:for(;++n<o;){var c=e[n],h=t?t(c):c;if(c=r||0!==c?c:0,a&&h==h){for(var f=s.length;f--;)if(s[f]===h)continue e;t&&s.push(h),l.push(c)}else i(s,h,r)||(s!==l&&s.push(h),l.push(c))}return l}function hi(e,t){return null==(e=Eo(e,t=wi(t,e)))||delete e[Bo(Ho(t))]}function fi(e,t,r,n){return Qn(e,t,r(Sn(e,t)),n)}function pi(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ni(e,n?0:o,n?o+1:i):ni(e,n?o+1:0,n?i:o)}function di(e,t){var r=e;return r instanceof Wr&&(r=r.value()),Rt(t,function(e,t){return t.func.apply(t.thisArg,Tt([e],t.args))},r)}function gi(e,t,r){var n=e.length;if(n<2)return n?ci(e[0]):[];for(var i=-1,o=oe(n);++i<n;)for(var a=e[i],l=-1;++l<n;)l!=i&&(o[i]=hn(o[i]||a,e[l],t,r));return ci(yn(o,1),t,r)}function mi(e,t,n){for(var i=-1,o=e.length,a=t.length,l={};++i<o;){var s=i<a?t[i]:r;n(l,e[i],s)}return l}function yi(e){return Ja(e)?e:[]}function vi(e){return"function"==typeof e?e:ns}function wi(e,t){return qa(e)?e:_o(e,t)?[e]:Ro(vl(e))}var bi=Hn;function _i(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:ni(e,t,n)}var xi=nt||function(e){return dt.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function Pi(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function ji(e,t){var r=t?Pi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function ki(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,a=sl(e),l=t!==r,s=null===t,u=t==t,c=sl(t);if(!s&&!c&&!a&&e>t||a&&l&&u&&!s&&!c||i&&l&&u||!n&&u||!o)return 1;if(!i&&!a&&!c&&e<t||c&&n&&o&&!i&&!a||s&&n&&o||!l&&o||!u)return-1}return 0}function Ai(e,t,r,n){for(var i=-1,o=e.length,a=r.length,l=-1,s=t.length,u=yr(o-a,0),c=oe(s+u),h=!n;++l<s;)c[l]=t[l];for(;++i<a;)(h||i<o)&&(c[r[i]]=e[i]);for(;u--;)c[l++]=e[i++];return c}function Ei(e,t,r,n){for(var i=-1,o=e.length,a=-1,l=r.length,s=-1,u=t.length,c=yr(o-l,0),h=oe(c+u),f=!n;++i<c;)h[i]=e[i];for(var p=i;++s<u;)h[p+s]=t[s];for(;++a<l;)(f||i<o)&&(h[p+r[a]]=e[i++]);return h}function zi(e,t){var r=-1,n=e.length;for(t||(t=oe(n));++r<n;)t[r]=e[r];return t}function Mi(e,t,n,i){var o=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],u=i?i(n[s],e[s],s,n,e):r;u===r&&(u=e[s]),o?on(n,s,u):en(n,s,u)}return n}function Oi(e,t){return function(r,n){var i=qa(r)?At:rn,o=t?t():{};return i(r,e,so(n,2),o)}}function Fi(e){return Hn(function(t,n){var i=-1,o=n.length,a=o>1?n[o-1]:r,l=o>2?n[2]:r;for(a=e.length>3&&"function"==typeof a?(o--,a):r,l&&bo(n[0],n[1],l)&&(a=o<3?r:a,o=1),t=ke(t);++i<o;){var s=n[i];s&&e(t,s,i,a)}return t})}function Li(e,t){return function(r,n){if(null==r)return r;if(!$a(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=ke(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function Ci(e){return function(t,r,n){for(var i=-1,o=ke(t),a=n(t),l=a.length;l--;){var s=a[e?l:++i];if(!1===r(o[s],s,o))break}return t}}function Ti(e){return function(t){var n=ar(t=vl(t))?pr(t):r,i=n?n[0]:t.charAt(0),o=n?_i(n,1).join(""):t.slice(1);return i[e]()+o}}function Ri(e){return function(t){return Rt(Kl(Wl(t).replace(Qe,"")),e,"")}}function Bi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Dr(e.prototype),n=e.apply(r,t);return el(n)?n:r}}function Ii(e){return function(t,n,i){var o=ke(t);if(!$a(t)){var a=so(n,3);t=Ol(t),n=function(e){return a(o[e],e,o)}}var l=e(t,n,i);return l>-1?o[a?t[l]:l]:r}}function Ni(e){return ro(function(t){var i=t.length,o=i,a=Gr.prototype.thru;for(e&&t.reverse();o--;){var l=t[o];if("function"!=typeof l)throw new ze(n);if(a&&!s&&"wrapper"==ao(l))var s=new Gr([],!0)}for(o=s?o:i;++o<i;){var u=ao(l=t[o]),c="wrapper"==u?oo(l):r;s=c&&xo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[ao(c[0])].apply(s,c[3]):1==l.length&&xo(l)?s[u]():s.thru(l)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&qa(r))return s.plant(r).value();for(var n=0,o=i?t[n].apply(this,e):r;++n<i;)o=t[n].call(this,o);return o}})}function Di(e,t,n,i,o,a,l,s,c,h){var f=t&u,p=1&t,d=2&t,g=24&t,m=512&t,y=d?r:Bi(e);return function u(){for(var v=arguments.length,w=oe(v),b=v;b--;)w[b]=arguments[b];if(g)var _=lo(u),x=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(w,_);if(i&&(w=Ai(w,i,o,g)),a&&(w=Ei(w,a,l,g)),v-=x,g&&v<h){var S=ur(w,_);return Ji(e,t,Di,u.placeholder,n,w,S,s,c,h-v)}var P=p?n:this,j=d?P[e]:e;return v=w.length,s?w=function(e,t){var n=e.length,i=vr(t.length,n),o=zi(e);for(;i--;){var a=t[i];e[i]=wo(a,n)?o[a]:r}return e}(w,s):m&&v>1&&w.reverse(),f&&c<v&&(w.length=c),this&&this!==dt&&this instanceof u&&(j=y||Bi(j)),j.apply(P,w)}}function Ui(e,t){return function(r,n){return function(e,t,r,n){return bn(e,function(e,i,o){t(n,r(e),i,o)}),n}(r,e,t(n),{})}}function Gi(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=ui(n),i=ui(i)):(n=si(n),i=si(i)),o=e(n,i)}return o}}function Wi(e){return ro(function(t){return t=Ct(t,Zt(so())),Hn(function(r){var n=this;return e(t,function(e){return kt(e,n,r)})})})}function qi(e,t){var n=(t=t===r?" ":ui(t)).length;if(n<2)return n?Xn(t,e):t;var i=Xn(t,pt(e/fr(t)));return ar(t)?_i(pr(i),0,e).join(""):i.slice(0,e)}function Vi(e){return function(t,n,i){return i&&"number"!=typeof i&&bo(t,n,i)&&(n=i=r),t=pl(t),n===r?(n=t,t=0):n=pl(n),function(e,t,r,n){for(var i=-1,o=yr(pt((t-e)/(r||1)),0),a=oe(o);o--;)a[n?o:++i]=e,e+=r;return a}(t,n,i=i===r?t<n?1:-1:pl(i),e)}}function $i(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ml(t),r=ml(r)),e(t,r)}}function Ji(e,t,n,i,o,a,u,c,h,f){var p=8&t;t|=p?l:s,4&(t&=~(p?s:l))||(t&=-4);var d=[e,t,o,p?a:r,p?u:r,p?r:a,p?r:u,c,h,f],g=n.apply(r,d);return xo(e)&&Mo(g,d),g.placeholder=i,Lo(g,e,t)}function Yi(e){var t=je[e];return function(e,r){if(e=ml(e),(r=null==r?0:vr(dl(r),292))&&wt(e)){var n=(vl(e)+"e").split("e");return+((n=(vl(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Xi=kr&&1/cr(new kr([,-0]))[1]==h?function(e){return new kr(e)}:ss;function Hi(e){return function(t){var r=go(t);return r==S?lr(t):r==E?hr(t):function(e,t){return Ct(t,function(t){return[t,e[t]]})}(t,e(t))}}function Ki(e,t,i,h,f,p,d,g){var m=2&t;if(!m&&"function"!=typeof e)throw new ze(n);var y=h?h.length:0;if(y||(t&=-97,h=f=r),d=d===r?d:yr(dl(d),0),g=g===r?g:dl(g),y-=f?f.length:0,t&s){var v=h,w=f;h=f=r}var b=m?r:oo(e),_=[e,t,i,h,f,v,w,p,d,g];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,a=i<131,l=n==u&&8==r||n==u&&r==c&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!a&&!l)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var s=t[3];if(s){var h=e[3];e[3]=h?Ai(h,s,t[4]):s,e[4]=h?ur(e[3],o):t[4]}(s=t[5])&&(h=e[5],e[5]=h?Ei(h,s,t[6]):s,e[6]=h?ur(e[5],o):t[6]);(s=t[7])&&(e[7]=s);n&u&&(e[8]=null==e[8]?t[8]:vr(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(_,b),e=_[0],t=_[1],i=_[2],h=_[3],f=_[4],!(g=_[9]=_[9]===r?m?0:e.length:yr(_[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||t==a?function(e,t,n){var i=Bi(e);return function o(){for(var a=arguments.length,l=oe(a),s=a,u=lo(o);s--;)l[s]=arguments[s];var c=a<3&&l[0]!==u&&l[a-1]!==u?[]:ur(l,u);return(a-=c.length)<n?Ji(e,t,Di,o.placeholder,r,l,c,r,r,n-a):kt(this&&this!==dt&&this instanceof o?i:e,this,l)}}(e,t,g):t!=l&&33!=t||f.length?Di.apply(r,_):function(e,t,r,n){var i=1&t,o=Bi(e);return function t(){for(var a=-1,l=arguments.length,s=-1,u=n.length,c=oe(u+l),h=this&&this!==dt&&this instanceof t?o:e;++s<u;)c[s]=n[s];for(;l--;)c[s++]=arguments[++a];return kt(h,i?r:this,c)}}(e,t,i,h);else var x=function(e,t,r){var n=1&t,i=Bi(e);return function t(){return(this&&this!==dt&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,i);return Lo((b?ei:Mo)(x,_),e,t)}function Zi(e,t,n,i){return e===r||Da(e,Fe[n])&&!Te.call(i,n)?t:e}function Qi(e,t,n,i,o,a){return el(e)&&el(t)&&(a.set(t,e),Gn(e,t,r,Qi,a),a.delete(t)),e}function eo(e){return il(e)?r:e}function to(e,t,n,i,o,a){var l=1&n,s=e.length,u=t.length;if(s!=u&&!(l&&u>s))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var f=-1,p=!0,d=2&n?new Jr:r;for(a.set(e,t),a.set(t,e);++f<s;){var g=e[f],m=t[f];if(i)var y=l?i(m,g,f,t,e,a):i(g,m,f,e,t,a);if(y!==r){if(y)continue;p=!1;break}if(d){if(!It(t,function(e,t){if(!er(d,t)&&(g===e||o(g,e,n,i,a)))return d.push(t)})){p=!1;break}}else if(g!==m&&!o(g,m,n,i,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ro(e){return Fo(Ao(e,r,Vo),e+"")}function no(e){return Pn(e,Ol,fo)}function io(e){return Pn(e,Fl,po)}var oo=zr?function(e){return zr.get(e)}:ss;function ao(e){for(var t=e.name+"",r=Mr[t],n=Te.call(Mr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function lo(e){return(Te.call(Nr,"placeholder")?Nr:e).placeholder}function so(){var e=Nr.iteratee||is;return e=e===is?Tn:e,arguments.length?e(arguments[0],arguments[1]):e}function uo(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function co(e){for(var t=Ol(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,jo(i)]}return t}function ho(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Cn(n)?n:r}var fo=mt?function(e){return null==e?[]:(e=ke(e),Ot(mt(e),function(t){return Ye.call(e,t)}))}:gs,po=mt?function(e){for(var t=[];e;)Tt(t,fo(e)),e=$e(e);return t}:gs,go=jn;function mo(e,t,r){for(var n=-1,i=(t=wi(t,e)).length,o=!1;++n<i;){var a=Bo(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Qa(i)&&wo(a,i)&&(qa(e)||Wa(e))}function yo(e){return"function"!=typeof e.constructor||Po(e)?{}:Dr($e(e))}function vo(e){return qa(e)||Wa(e)||!!(He&&e&&e[He])}function wo(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&we.test(e))&&e>-1&&e%1==0&&e<t}function bo(e,t,r){if(!el(r))return!1;var n=typeof t;return!!("number"==n?$a(r)&&wo(t,r.length):"string"==n&&t in r)&&Da(r[t],e)}function _o(e,t){if(qa(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!sl(e))||(ee.test(e)||!Q.test(e)||null!=t&&e in ke(t))}function xo(e){var t=ao(e),r=Nr[t];if("function"!=typeof r||!(t in Wr.prototype))return!1;if(e===r)return!0;var n=oo(r);return!!n&&e===n[0]}(Sr&&go(new Sr(new ArrayBuffer(1)))!=L||Pr&&go(new Pr)!=S||jr&&go(jr.resolve())!=k||kr&&go(new kr)!=E||Ar&&go(new Ar)!=O)&&(go=function(e){var t=jn(e),n=t==j?e.constructor:r,i=n?Io(n):"";if(i)switch(i){case Or:return L;case Fr:return S;case Lr:return k;case Cr:return E;case Tr:return O}return t});var So=Le?Ka:ms;function Po(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function jo(e){return e==e&&!el(e)}function ko(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==r||e in ke(n)))}}function Ao(e,t,n){return t=yr(t===r?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=yr(r.length-t,0),a=oe(o);++i<o;)a[i]=r[t+i];i=-1;for(var l=oe(t+1);++i<t;)l[i]=r[i];return l[t]=n(a),kt(e,this,l)}}function Eo(e,t){return t.length<2?e:Sn(e,ni(t,0,-1))}function zo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Mo=Co(ei),Oo=ft||function(e,t){return dt.setTimeout(e,t)},Fo=Co(ti);function Lo(e,t,r){var n=t+"";return Fo(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Et(g,function(r){var n="_."+r[0];t&r[1]&&!Ft(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ue):[]}(n),r)))}function Co(e){var t=0,n=0;return function(){var i=wr(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function To(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var a=Yn(n,o),l=e[a];e[a]=e[n],e[n]=l}return e.length=t,e}var Ro=function(e){var t=Ca(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,function(e,r,n,i){t.push(n?i.replace(fe,"$1"):r||e)}),t});function Bo(e){if("string"==typeof e||sl(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Io(e){if(null!=e){try{return Ce.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function No(e){if(e instanceof Wr)return e.clone();var t=new Gr(e.__wrapped__,e.__chain__);return t.__actions__=zi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Do=Hn(function(e,t){return Ja(e)?hn(e,yn(t,1,Ja,!0)):[]}),Uo=Hn(function(e,t){var n=Ho(t);return Ja(n)&&(n=r),Ja(e)?hn(e,yn(t,1,Ja,!0),so(n,2)):[]}),Go=Hn(function(e,t){var n=Ho(t);return Ja(n)&&(n=r),Ja(e)?hn(e,yn(t,1,Ja,!0),r,n):[]});function Wo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:dl(r);return i<0&&(i=yr(n+i,0)),Ut(e,so(t,3),i)}function qo(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=dl(n),o=n<0?yr(i+o,0):vr(o,i-1)),Ut(e,so(t,3),o,!0)}function Vo(e){return(null==e?0:e.length)?yn(e,1):[]}function $o(e){return e&&e.length?e[0]:r}var Jo=Hn(function(e){var t=Ct(e,yi);return t.length&&t[0]===e[0]?zn(t):[]}),Yo=Hn(function(e){var t=Ho(e),n=Ct(e,yi);return t===Ho(n)?t=r:n.pop(),n.length&&n[0]===e[0]?zn(n,so(t,2)):[]}),Xo=Hn(function(e){var t=Ho(e),n=Ct(e,yi);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?zn(n,r,t):[]});function Ho(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Ko=Hn(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?$n(e,t):e}var Qo=ro(function(e,t){var r=null==e?0:e.length,n=an(e,t);return Jn(e,Ct(t,function(e){return wo(e,r)?+e:e}).sort(ki)),n});function ea(e){return null==e?e:xr.call(e)}var ta=Hn(function(e){return ci(yn(e,1,Ja,!0))}),ra=Hn(function(e){var t=Ho(e);return Ja(t)&&(t=r),ci(yn(e,1,Ja,!0),so(t,2))}),na=Hn(function(e){var t=Ho(e);return t="function"==typeof t?t:r,ci(yn(e,1,Ja,!0),r,t)});function ia(e){if(!e||!e.length)return[];var t=0;return e=Ot(e,function(e){if(Ja(e))return t=yr(e.length,t),!0}),Ht(t,function(t){return Ct(e,$t(t))})}function oa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Ct(n,function(e){return kt(t,r,e)})}var aa=Hn(function(e,t){return Ja(e)?hn(e,t):[]}),la=Hn(function(e){return gi(Ot(e,Ja))}),sa=Hn(function(e){var t=Ho(e);return Ja(t)&&(t=r),gi(Ot(e,Ja),so(t,2))}),ua=Hn(function(e){var t=Ho(e);return t="function"==typeof t?t:r,gi(Ot(e,Ja),r,t)}),ca=Hn(ia);var ha=Hn(function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,oa(e,n)});function fa(e){var t=Nr(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var da=ro(function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return an(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Wr&&wo(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:pa,args:[o],thisArg:r}),new Gr(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(r),e})):this.thru(o)});var ga=Oi(function(e,t,r){Te.call(e,r)?++e[r]:on(e,r,1)});var ma=Ii(Wo),ya=Ii(qo);function va(e,t){return(qa(e)?Et:fn)(e,so(t,3))}function wa(e,t){return(qa(e)?zt:pn)(e,so(t,3))}var ba=Oi(function(e,t,r){Te.call(e,r)?e[r].push(t):on(e,r,[t])});var _a=Hn(function(e,t,r){var n=-1,i="function"==typeof t,o=$a(e)?oe(e.length):[];return fn(e,function(e){o[++n]=i?kt(t,e,r):Mn(e,t,r)}),o}),xa=Oi(function(e,t,r){on(e,r,t)});function Sa(e,t){return(qa(e)?Ct:Nn)(e,so(t,3))}var Pa=Oi(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});var ja=Hn(function(e,t){if(null==e)return[];var r=t.length;return r>1&&bo(e,t[0],t[1])?t=[]:r>2&&bo(t[0],t[1],t[2])&&(t=[t[0]]),qn(e,yn(t,1),[])}),ka=ut||function(){return dt.Date.now()};function Aa(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Ki(e,u,r,r,r,r,t)}function Ea(e,t){var i;if("function"!=typeof t)throw new ze(n);return e=dl(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var za=Hn(function(e,t,r){var n=1;if(r.length){var i=ur(r,lo(za));n|=l}return Ki(e,n,t,r,i)}),Ma=Hn(function(e,t,r){var n=3;if(r.length){var i=ur(r,lo(Ma));n|=l}return Ki(t,n,e,r,i)});function Oa(e,t,i){var o,a,l,s,u,c,h=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new ze(n);function g(t){var n=o,i=a;return o=a=r,h=t,s=e.apply(i,n)}function m(e){var n=e-c;return c===r||n>=t||n<0||p&&e-h>=l}function y(){var e=ka();if(m(e))return v(e);u=Oo(y,function(e){var r=t-(e-c);return p?vr(r,l-(e-h)):r}(e))}function v(e){return u=r,d&&o?g(e):(o=a=r,s)}function w(){var e=ka(),n=m(e);if(o=arguments,a=this,c=e,n){if(u===r)return function(e){return h=e,u=Oo(y,t),f?g(e):s}(c);if(p)return xi(u),u=Oo(y,t),g(c)}return u===r&&(u=Oo(y,t)),s}return t=ml(t)||0,el(i)&&(f=!!i.leading,l=(p="maxWait"in i)?yr(ml(i.maxWait)||0,t):l,d="trailing"in i?!!i.trailing:d),w.cancel=function(){u!==r&&xi(u),h=0,o=c=a=u=r},w.flush=function(){return u===r?s:v(ka())},w}var Fa=Hn(function(e,t){return cn(e,1,t)}),La=Hn(function(e,t,r){return cn(e,ml(t)||0,r)});function Ca(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ze(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Ca.Cache||$r),r}function Ta(e){if("function"!=typeof e)throw new ze(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ca.Cache=$r;var Ra=bi(function(e,t){var r=(t=1==t.length&&qa(t[0])?Ct(t[0],Zt(so())):Ct(yn(t,1),Zt(so()))).length;return Hn(function(n){for(var i=-1,o=vr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return kt(e,this,n)})}),Ba=Hn(function(e,t){var n=ur(t,lo(Ba));return Ki(e,l,r,t,n)}),Ia=Hn(function(e,t){var n=ur(t,lo(Ia));return Ki(e,s,r,t,n)}),Na=ro(function(e,t){return Ki(e,c,r,r,r,t)});function Da(e,t){return e===t||e!=e&&t!=t}var Ua=$i(kn),Ga=$i(function(e,t){return e>=t}),Wa=On(function(){return arguments}())?On:function(e){return tl(e)&&Te.call(e,"callee")&&!Ye.call(e,"callee")},qa=oe.isArray,Va=bt?Zt(bt):function(e){return tl(e)&&jn(e)==F};function $a(e){return null!=e&&Qa(e.length)&&!Ka(e)}function Ja(e){return tl(e)&&$a(e)}var Ya=vt||ms,Xa=_t?Zt(_t):function(e){return tl(e)&&jn(e)==w};function Ha(e){if(!tl(e))return!1;var t=jn(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!il(e)}function Ka(e){if(!el(e))return!1;var t=jn(e);return t==_||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==dl(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function el(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function tl(e){return null!=e&&"object"==typeof e}var rl=xt?Zt(xt):function(e){return tl(e)&&go(e)==S};function nl(e){return"number"==typeof e||tl(e)&&jn(e)==P}function il(e){if(!tl(e)||jn(e)!=j)return!1;var t=$e(e);if(null===t)return!0;var r=Te.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ce.call(r)==Ne}var ol=St?Zt(St):function(e){return tl(e)&&jn(e)==A};var al=Pt?Zt(Pt):function(e){return tl(e)&&go(e)==E};function ll(e){return"string"==typeof e||!qa(e)&&tl(e)&&jn(e)==z}function sl(e){return"symbol"==typeof e||tl(e)&&jn(e)==M}var ul=jt?Zt(jt):function(e){return tl(e)&&Qa(e.length)&&!!lt[jn(e)]};var cl=$i(In),hl=$i(function(e,t){return e<=t});function fl(e){if(!e)return[];if($a(e))return ll(e)?pr(e):zi(e);if(Ke&&e[Ke])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ke]());var t=go(e);return(t==S?lr:t==E?cr:Dl)(e)}function pl(e){return e?(e=ml(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function dl(e){var t=pl(e),r=t%1;return t==t?r?t-r:t:0}function gl(e){return e?ln(dl(e),0,d):0}function ml(e){if("number"==typeof e)return e;if(sl(e))return p;if(el(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=el(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var r=me.test(e);return r||ve.test(e)?ht(e.slice(2),r?2:8):ge.test(e)?p:+e}function yl(e){return Mi(e,Fl(e))}function vl(e){return null==e?"":ui(e)}var wl=Fi(function(e,t){if(Po(t)||$a(t))Mi(t,Ol(t),e);else for(var r in t)Te.call(t,r)&&en(e,r,t[r])}),bl=Fi(function(e,t){Mi(t,Fl(t),e)}),_l=Fi(function(e,t,r,n){Mi(t,Fl(t),e,n)}),xl=Fi(function(e,t,r,n){Mi(t,Ol(t),e,n)}),Sl=ro(an);var Pl=Hn(function(e,t){e=ke(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&bo(t[0],t[1],o)&&(i=1);++n<i;)for(var a=t[n],l=Fl(a),s=-1,u=l.length;++s<u;){var c=l[s],h=e[c];(h===r||Da(h,Fe[c])&&!Te.call(e,c))&&(e[c]=a[c])}return e}),jl=Hn(function(e){return e.push(r,Qi),kt(Cl,r,e)});function kl(e,t,n){var i=null==e?r:Sn(e,t);return i===r?n:i}function Al(e,t){return null!=e&&mo(e,t,En)}var El=Ui(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ie.call(t)),e[t]=r},es(ns)),zl=Ui(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ie.call(t)),Te.call(e,t)?e[t].push(r):e[t]=[r]},so),Ml=Hn(Mn);function Ol(e){return $a(e)?Xr(e):Rn(e)}function Fl(e){return $a(e)?Xr(e,!0):Bn(e)}var Ll=Fi(function(e,t,r){Gn(e,t,r)}),Cl=Fi(function(e,t,r,n){Gn(e,t,r,n)}),Tl=ro(function(e,t){var r={};if(null==e)return r;var n=!1;t=Ct(t,function(t){return t=wi(t,e),n||(n=t.length>1),t}),Mi(e,io(e),r),n&&(r=sn(r,7,eo));for(var i=t.length;i--;)hi(r,t[i]);return r});var Rl=ro(function(e,t){return null==e?{}:function(e,t){return Vn(e,t,function(t,r){return Al(e,r)})}(e,t)});function Bl(e,t){if(null==e)return{};var r=Ct(io(e),function(e){return[e]});return t=so(t),Vn(e,r,function(e,r){return t(e,r[0])})}var Il=Hi(Ol),Nl=Hi(Fl);function Dl(e){return null==e?[]:Qt(e,Ol(e))}var Ul=Ri(function(e,t,r){return t=t.toLowerCase(),e+(r?Gl(t):t)});function Gl(e){return Hl(vl(e).toLowerCase())}function Wl(e){return(e=vl(e))&&e.replace(be,nr).replace(et,"")}var ql=Ri(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),Vl=Ri(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),$l=Ti("toLowerCase");var Jl=Ri(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});var Yl=Ri(function(e,t,r){return e+(r?" ":"")+Hl(t)});var Xl=Ri(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Hl=Ti("toUpperCase");function Kl(e,t,n){return e=vl(e),(t=n?r:t)===r?function(e){return it.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Zl=Hn(function(e,t){try{return kt(e,r,t)}catch(e){return Ha(e)?e:new Se(e)}}),Ql=ro(function(e,t){return Et(t,function(t){t=Bo(t),on(e,t,za(e[t],e))}),e});function es(e){return function(){return e}}var ts=Ni(),rs=Ni(!0);function ns(e){return e}function is(e){return Tn("function"==typeof e?e:sn(e,1))}var os=Hn(function(e,t){return function(r){return Mn(r,e,t)}}),as=Hn(function(e,t){return function(r){return Mn(e,r,t)}});function ls(e,t,r){var n=Ol(t),i=xn(t,n);null!=r||el(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=xn(t,Ol(t)));var o=!(el(r)&&"chain"in r&&!r.chain),a=Ka(e);return Et(i,function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=zi(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Tt([this.value()],arguments))})}),e}function ss(){}var us=Wi(Ct),cs=Wi(Mt),hs=Wi(It);function fs(e){return _o(e)?$t(Bo(e)):function(e){return function(t){return Sn(t,e)}}(e)}var ps=Vi(),ds=Vi(!0);function gs(){return[]}function ms(){return!1}var ys=Gi(function(e,t){return e+t},0),vs=Yi("ceil"),ws=Gi(function(e,t){return e/t},1),bs=Yi("floor");var _s,xs=Gi(function(e,t){return e*t},1),Ss=Yi("round"),Ps=Gi(function(e,t){return e-t},0);return Nr.after=function(e,t){if("function"!=typeof t)throw new ze(n);return e=dl(e),function(){if(--e<1)return t.apply(this,arguments)}},Nr.ary=Aa,Nr.assign=wl,Nr.assignIn=bl,Nr.assignInWith=_l,Nr.assignWith=xl,Nr.at=Sl,Nr.before=Ea,Nr.bind=za,Nr.bindAll=Ql,Nr.bindKey=Ma,Nr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qa(e)?e:[e]},Nr.chain=fa,Nr.chunk=function(e,t,n){t=(n?bo(e,t,n):t===r)?1:yr(dl(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,l=oe(pt(i/t));o<i;)l[a++]=ni(e,o,o+=t);return l},Nr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Nr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=oe(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Tt(qa(r)?zi(r):[r],yn(t,1))},Nr.cond=function(e){var t=null==e?0:e.length,r=so();return e=t?Ct(e,function(e){if("function"!=typeof e[1])throw new ze(n);return[r(e[0]),e[1]]}):[],Hn(function(r){for(var n=-1;++n<t;){var i=e[n];if(kt(i[0],this,r))return kt(i[1],this,r)}})},Nr.conforms=function(e){return function(e){var t=Ol(e);return function(r){return un(r,e,t)}}(sn(e,1))},Nr.constant=es,Nr.countBy=ga,Nr.create=function(e,t){var r=Dr(e);return null==t?r:nn(r,t)},Nr.curry=function e(t,n,i){var o=Ki(t,8,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},Nr.curryRight=function e(t,n,i){var o=Ki(t,a,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},Nr.debounce=Oa,Nr.defaults=Pl,Nr.defaultsDeep=jl,Nr.defer=Fa,Nr.delay=La,Nr.difference=Do,Nr.differenceBy=Uo,Nr.differenceWith=Go,Nr.drop=function(e,t,n){var i=null==e?0:e.length;return i?ni(e,(t=n||t===r?1:dl(t))<0?0:t,i):[]},Nr.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?ni(e,0,(t=i-(t=n||t===r?1:dl(t)))<0?0:t):[]},Nr.dropRightWhile=function(e,t){return e&&e.length?pi(e,so(t,3),!0,!0):[]},Nr.dropWhile=function(e,t){return e&&e.length?pi(e,so(t,3),!0):[]},Nr.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&bo(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=dl(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:dl(i))<0&&(i+=o),i=n>i?0:gl(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},Nr.filter=function(e,t){return(qa(e)?Ot:mn)(e,so(t,3))},Nr.flatMap=function(e,t){return yn(Sa(e,t),1)},Nr.flatMapDeep=function(e,t){return yn(Sa(e,t),h)},Nr.flatMapDepth=function(e,t,n){return n=n===r?1:dl(n),yn(Sa(e,t),n)},Nr.flatten=Vo,Nr.flattenDeep=function(e){return(null==e?0:e.length)?yn(e,h):[]},Nr.flattenDepth=function(e,t){return(null==e?0:e.length)?yn(e,t=t===r?1:dl(t)):[]},Nr.flip=function(e){return Ki(e,512)},Nr.flow=ts,Nr.flowRight=rs,Nr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Nr.functions=function(e){return null==e?[]:xn(e,Ol(e))},Nr.functionsIn=function(e){return null==e?[]:xn(e,Fl(e))},Nr.groupBy=ba,Nr.initial=function(e){return(null==e?0:e.length)?ni(e,0,-1):[]},Nr.intersection=Jo,Nr.intersectionBy=Yo,Nr.intersectionWith=Xo,Nr.invert=El,Nr.invertBy=zl,Nr.invokeMap=_a,Nr.iteratee=is,Nr.keyBy=xa,Nr.keys=Ol,Nr.keysIn=Fl,Nr.map=Sa,Nr.mapKeys=function(e,t){var r={};return t=so(t,3),bn(e,function(e,n,i){on(r,t(e,n,i),e)}),r},Nr.mapValues=function(e,t){var r={};return t=so(t,3),bn(e,function(e,n,i){on(r,n,t(e,n,i))}),r},Nr.matches=function(e){return Dn(sn(e,1))},Nr.matchesProperty=function(e,t){return Un(e,sn(t,1))},Nr.memoize=Ca,Nr.merge=Ll,Nr.mergeWith=Cl,Nr.method=os,Nr.methodOf=as,Nr.mixin=ls,Nr.negate=Ta,Nr.nthArg=function(e){return e=dl(e),Hn(function(t){return Wn(t,e)})},Nr.omit=Tl,Nr.omitBy=function(e,t){return Bl(e,Ta(so(t)))},Nr.once=function(e){return Ea(2,e)},Nr.orderBy=function(e,t,n,i){return null==e?[]:(qa(t)||(t=null==t?[]:[t]),qa(n=i?r:n)||(n=null==n?[]:[n]),qn(e,t,n))},Nr.over=us,Nr.overArgs=Ra,Nr.overEvery=cs,Nr.overSome=hs,Nr.partial=Ba,Nr.partialRight=Ia,Nr.partition=Pa,Nr.pick=Rl,Nr.pickBy=Bl,Nr.property=fs,Nr.propertyOf=function(e){return function(t){return null==e?r:Sn(e,t)}},Nr.pull=Ko,Nr.pullAll=Zo,Nr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?$n(e,t,so(r,2)):e},Nr.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?$n(e,t,r,n):e},Nr.pullAt=Qo,Nr.range=ps,Nr.rangeRight=ds,Nr.rearg=Na,Nr.reject=function(e,t){return(qa(e)?Ot:mn)(e,Ta(so(t,3)))},Nr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=so(t,3);++n<o;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return Jn(e,i),r},Nr.rest=function(e,t){if("function"!=typeof e)throw new ze(n);return Hn(e,t=t===r?t:dl(t))},Nr.reverse=ea,Nr.sampleSize=function(e,t,n){return t=(n?bo(e,t,n):t===r)?1:dl(t),(qa(e)?Kr:Zn)(e,t)},Nr.set=function(e,t,r){return null==e?e:Qn(e,t,r)},Nr.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Qn(e,t,n,i)},Nr.shuffle=function(e){return(qa(e)?Zr:ri)(e)},Nr.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&bo(e,t,n)?(t=0,n=i):(t=null==t?0:dl(t),n=n===r?i:dl(n)),ni(e,t,n)):[]},Nr.sortBy=ja,Nr.sortedUniq=function(e){return e&&e.length?li(e):[]},Nr.sortedUniqBy=function(e,t){return e&&e.length?li(e,so(t,2)):[]},Nr.split=function(e,t,n){return n&&"number"!=typeof n&&bo(e,t,n)&&(t=n=r),(n=n===r?d:n>>>0)?(e=vl(e))&&("string"==typeof t||null!=t&&!ol(t))&&!(t=ui(t))&&ar(e)?_i(pr(e),0,n):e.split(t,n):[]},Nr.spread=function(e,t){if("function"!=typeof e)throw new ze(n);return t=null==t?0:yr(dl(t),0),Hn(function(r){var n=r[t],i=_i(r,0,t);return n&&Tt(i,n),kt(e,this,i)})},Nr.tail=function(e){var t=null==e?0:e.length;return t?ni(e,1,t):[]},Nr.take=function(e,t,n){return e&&e.length?ni(e,0,(t=n||t===r?1:dl(t))<0?0:t):[]},Nr.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?ni(e,(t=i-(t=n||t===r?1:dl(t)))<0?0:t,i):[]},Nr.takeRightWhile=function(e,t){return e&&e.length?pi(e,so(t,3),!1,!0):[]},Nr.takeWhile=function(e,t){return e&&e.length?pi(e,so(t,3)):[]},Nr.tap=function(e,t){return t(e),e},Nr.throttle=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new ze(n);return el(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Oa(e,t,{leading:i,maxWait:t,trailing:o})},Nr.thru=pa,Nr.toArray=fl,Nr.toPairs=Il,Nr.toPairsIn=Nl,Nr.toPath=function(e){return qa(e)?Ct(e,Bo):sl(e)?[e]:zi(Ro(vl(e)))},Nr.toPlainObject=yl,Nr.transform=function(e,t,r){var n=qa(e),i=n||Ya(e)||ul(e);if(t=so(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:el(e)&&Ka(o)?Dr($e(e)):{}}return(i?Et:bn)(e,function(e,n,i){return t(r,e,n,i)}),r},Nr.unary=function(e){return Aa(e,1)},Nr.union=ta,Nr.unionBy=ra,Nr.unionWith=na,Nr.uniq=function(e){return e&&e.length?ci(e):[]},Nr.uniqBy=function(e,t){return e&&e.length?ci(e,so(t,2)):[]},Nr.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ci(e,r,t):[]},Nr.unset=function(e,t){return null==e||hi(e,t)},Nr.unzip=ia,Nr.unzipWith=oa,Nr.update=function(e,t,r){return null==e?e:fi(e,t,vi(r))},Nr.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:fi(e,t,vi(n),i)},Nr.values=Dl,Nr.valuesIn=function(e){return null==e?[]:Qt(e,Fl(e))},Nr.without=aa,Nr.words=Kl,Nr.wrap=function(e,t){return Ba(vi(t),e)},Nr.xor=la,Nr.xorBy=sa,Nr.xorWith=ua,Nr.zip=ca,Nr.zipObject=function(e,t){return mi(e||[],t||[],en)},Nr.zipObjectDeep=function(e,t){return mi(e||[],t||[],Qn)},Nr.zipWith=ha,Nr.entries=Il,Nr.entriesIn=Nl,Nr.extend=bl,Nr.extendWith=_l,ls(Nr,Nr),Nr.add=ys,Nr.attempt=Zl,Nr.camelCase=Ul,Nr.capitalize=Gl,Nr.ceil=vs,Nr.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ml(n))==n?n:0),t!==r&&(t=(t=ml(t))==t?t:0),ln(ml(e),t,n)},Nr.clone=function(e){return sn(e,4)},Nr.cloneDeep=function(e){return sn(e,5)},Nr.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:r)},Nr.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:r)},Nr.conformsTo=function(e,t){return null==t||un(e,t,Ol(t))},Nr.deburr=Wl,Nr.defaultTo=function(e,t){return null==e||e!=e?t:e},Nr.divide=ws,Nr.endsWith=function(e,t,n){e=vl(e),t=ui(t);var i=e.length,o=n=n===r?i:ln(dl(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},Nr.eq=Da,Nr.escape=function(e){return(e=vl(e))&&X.test(e)?e.replace(J,ir):e},Nr.escapeRegExp=function(e){return(e=vl(e))&&ne.test(e)?e.replace(re,"\\$&"):e},Nr.every=function(e,t,n){var i=qa(e)?Mt:dn;return n&&bo(e,t,n)&&(t=r),i(e,so(t,3))},Nr.find=ma,Nr.findIndex=Wo,Nr.findKey=function(e,t){return Dt(e,so(t,3),bn)},Nr.findLast=ya,Nr.findLastIndex=qo,Nr.findLastKey=function(e,t){return Dt(e,so(t,3),_n)},Nr.floor=bs,Nr.forEach=va,Nr.forEachRight=wa,Nr.forIn=function(e,t){return null==e?e:vn(e,so(t,3),Fl)},Nr.forInRight=function(e,t){return null==e?e:wn(e,so(t,3),Fl)},Nr.forOwn=function(e,t){return e&&bn(e,so(t,3))},Nr.forOwnRight=function(e,t){return e&&_n(e,so(t,3))},Nr.get=kl,Nr.gt=Ua,Nr.gte=Ga,Nr.has=function(e,t){return null!=e&&mo(e,t,An)},Nr.hasIn=Al,Nr.head=$o,Nr.identity=ns,Nr.includes=function(e,t,r,n){e=$a(e)?e:Dl(e),r=r&&!n?dl(r):0;var i=e.length;return r<0&&(r=yr(i+r,0)),ll(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Gt(e,t,r)>-1},Nr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:dl(r);return i<0&&(i=yr(n+i,0)),Gt(e,t,i)},Nr.inRange=function(e,t,n){return t=pl(t),n===r?(n=t,t=0):n=pl(n),function(e,t,r){return e>=vr(t,r)&&e<yr(t,r)}(e=ml(e),t,n)},Nr.invoke=Ml,Nr.isArguments=Wa,Nr.isArray=qa,Nr.isArrayBuffer=Va,Nr.isArrayLike=$a,Nr.isArrayLikeObject=Ja,Nr.isBoolean=function(e){return!0===e||!1===e||tl(e)&&jn(e)==v},Nr.isBuffer=Ya,Nr.isDate=Xa,Nr.isElement=function(e){return tl(e)&&1===e.nodeType&&!il(e)},Nr.isEmpty=function(e){if(null==e)return!0;if($a(e)&&(qa(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||ul(e)||Wa(e)))return!e.length;var t=go(e);if(t==S||t==E)return!e.size;if(Po(e))return!Rn(e).length;for(var r in e)if(Te.call(e,r))return!1;return!0},Nr.isEqual=function(e,t){return Fn(e,t)},Nr.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Fn(e,t,r,n):!!i},Nr.isError=Ha,Nr.isFinite=function(e){return"number"==typeof e&&wt(e)},Nr.isFunction=Ka,Nr.isInteger=Za,Nr.isLength=Qa,Nr.isMap=rl,Nr.isMatch=function(e,t){return e===t||Ln(e,t,co(t))},Nr.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Ln(e,t,co(t),n)},Nr.isNaN=function(e){return nl(e)&&e!=+e},Nr.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Cn(e)},Nr.isNil=function(e){return null==e},Nr.isNull=function(e){return null===e},Nr.isNumber=nl,Nr.isObject=el,Nr.isObjectLike=tl,Nr.isPlainObject=il,Nr.isRegExp=ol,Nr.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=f},Nr.isSet=al,Nr.isString=ll,Nr.isSymbol=sl,Nr.isTypedArray=ul,Nr.isUndefined=function(e){return e===r},Nr.isWeakMap=function(e){return tl(e)&&go(e)==O},Nr.isWeakSet=function(e){return tl(e)&&"[object WeakSet]"==jn(e)},Nr.join=function(e,t){return null==e?"":Nt.call(e,t)},Nr.kebabCase=ql,Nr.last=Ho,Nr.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=dl(n))<0?yr(i+o,0):vr(o,i-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Ut(e,qt,o,!0)},Nr.lowerCase=Vl,Nr.lowerFirst=$l,Nr.lt=cl,Nr.lte=hl,Nr.max=function(e){return e&&e.length?gn(e,ns,kn):r},Nr.maxBy=function(e,t){return e&&e.length?gn(e,so(t,2),kn):r},Nr.mean=function(e){return Vt(e,ns)},Nr.meanBy=function(e,t){return Vt(e,so(t,2))},Nr.min=function(e){return e&&e.length?gn(e,ns,In):r},Nr.minBy=function(e,t){return e&&e.length?gn(e,so(t,2),In):r},Nr.stubArray=gs,Nr.stubFalse=ms,Nr.stubObject=function(){return{}},Nr.stubString=function(){return""},Nr.stubTrue=function(){return!0},Nr.multiply=xs,Nr.nth=function(e,t){return e&&e.length?Wn(e,dl(t)):r},Nr.noConflict=function(){return dt._===this&&(dt._=De),this},Nr.noop=ss,Nr.now=ka,Nr.pad=function(e,t,r){e=vl(e);var n=(t=dl(t))?fr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return qi(gt(i),r)+e+qi(pt(i),r)},Nr.padEnd=function(e,t,r){e=vl(e);var n=(t=dl(t))?fr(e):0;return t&&n<t?e+qi(t-n,r):e},Nr.padStart=function(e,t,r){e=vl(e);var n=(t=dl(t))?fr(e):0;return t&&n<t?qi(t-n,r)+e:e},Nr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(vl(e).replace(ie,""),t||0)},Nr.random=function(e,t,n){if(n&&"boolean"!=typeof n&&bo(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=pl(e),t===r?(t=e,e=0):t=pl(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=_r();return vr(e+o*(t-e+ct("1e-"+((o+"").length-1))),t)}return Yn(e,t)},Nr.reduce=function(e,t,r){var n=qa(e)?Rt:Yt,i=arguments.length<3;return n(e,so(t,4),r,i,fn)},Nr.reduceRight=function(e,t,r){var n=qa(e)?Bt:Yt,i=arguments.length<3;return n(e,so(t,4),r,i,pn)},Nr.repeat=function(e,t,n){return t=(n?bo(e,t,n):t===r)?1:dl(t),Xn(vl(e),t)},Nr.replace=function(){var e=arguments,t=vl(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Nr.result=function(e,t,n){var i=-1,o=(t=wi(t,e)).length;for(o||(o=1,e=r);++i<o;){var a=null==e?r:e[Bo(t[i])];a===r&&(i=o,a=n),e=Ka(a)?a.call(e):a}return e},Nr.round=Ss,Nr.runInContext=e,Nr.sample=function(e){return(qa(e)?Hr:Kn)(e)},Nr.size=function(e){if(null==e)return 0;if($a(e))return ll(e)?fr(e):e.length;var t=go(e);return t==S||t==E?e.size:Rn(e).length},Nr.snakeCase=Jl,Nr.some=function(e,t,n){var i=qa(e)?It:ii;return n&&bo(e,t,n)&&(t=r),i(e,so(t,3))},Nr.sortedIndex=function(e,t){return oi(e,t)},Nr.sortedIndexBy=function(e,t,r){return ai(e,t,so(r,2))},Nr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=oi(e,t);if(n<r&&Da(e[n],t))return n}return-1},Nr.sortedLastIndex=function(e,t){return oi(e,t,!0)},Nr.sortedLastIndexBy=function(e,t,r){return ai(e,t,so(r,2),!0)},Nr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=oi(e,t,!0)-1;if(Da(e[r],t))return r}return-1},Nr.startCase=Yl,Nr.startsWith=function(e,t,r){return e=vl(e),r=null==r?0:ln(dl(r),0,e.length),t=ui(t),e.slice(r,r+t.length)==t},Nr.subtract=Ps,Nr.sum=function(e){return e&&e.length?Xt(e,ns):0},Nr.sumBy=function(e,t){return e&&e.length?Xt(e,so(t,2)):0},Nr.template=function(e,t,n){var i=Nr.templateSettings;n&&bo(e,t,n)&&(t=r),e=vl(e),t=_l({},t,i,Zi);var o,a,l=_l({},t.imports,i.imports,Zi),s=Ol(l),u=Qt(l,s),c=0,h=t.interpolate||_e,f="__p += '",p=Ae((t.escape||_e).source+"|"+h.source+"|"+(h===Z?pe:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),d="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(p,function(t,r,n,i,l,s){return n||(n=i),f+=e.slice(c,s).replace(xe,or),r&&(o=!0,f+="' +\n__e("+r+") +\n'"),l&&(a=!0,f+="';\n"+l+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=s+t.length,t}),f+="';\n";var g=Te.call(t,"variable")&&t.variable;if(g){if(he.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(W,""):f).replace(q,"$1").replace(V,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Zl(function(){return Pe(s,d+"return "+f).apply(r,u)});if(m.source=f,Ha(m))throw m;return m},Nr.times=function(e,t){if((e=dl(e))<1||e>f)return[];var r=d,n=vr(e,d);t=so(t),e-=d;for(var i=Ht(n,t);++r<e;)t(r);return i},Nr.toFinite=pl,Nr.toInteger=dl,Nr.toLength=gl,Nr.toLower=function(e){return vl(e).toLowerCase()},Nr.toNumber=ml,Nr.toSafeInteger=function(e){return e?ln(dl(e),-9007199254740991,f):0===e?e:0},Nr.toString=vl,Nr.toUpper=function(e){return vl(e).toUpperCase()},Nr.trim=function(e,t,n){if((e=vl(e))&&(n||t===r))return Kt(e);if(!e||!(t=ui(t)))return e;var i=pr(e),o=pr(t);return _i(i,tr(i,o),rr(i,o)+1).join("")},Nr.trimEnd=function(e,t,n){if((e=vl(e))&&(n||t===r))return e.slice(0,dr(e)+1);if(!e||!(t=ui(t)))return e;var i=pr(e);return _i(i,0,rr(i,pr(t))+1).join("")},Nr.trimStart=function(e,t,n){if((e=vl(e))&&(n||t===r))return e.replace(ie,"");if(!e||!(t=ui(t)))return e;var i=pr(e);return _i(i,tr(i,pr(t))).join("")},Nr.truncate=function(e,t){var n=30,i="...";if(el(t)){var o="separator"in t?t.separator:o;n="length"in t?dl(t.length):n,i="omission"in t?ui(t.omission):i}var a=(e=vl(e)).length;if(ar(e)){var l=pr(e);a=l.length}if(n>=a)return e;var s=n-fr(i);if(s<1)return i;var u=l?_i(l,0,s).join(""):e.slice(0,s);if(o===r)return u+i;if(l&&(s+=u.length-s),ol(o)){if(e.slice(s).search(o)){var c,h=u;for(o.global||(o=Ae(o.source,vl(de.exec(o))+"g")),o.lastIndex=0;c=o.exec(h);)var f=c.index;u=u.slice(0,f===r?s:f)}}else if(e.indexOf(ui(o),s)!=s){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+i},Nr.unescape=function(e){return(e=vl(e))&&Y.test(e)?e.replace($,gr):e},Nr.uniqueId=function(e){var t=++Re;return vl(e)+t},Nr.upperCase=Xl,Nr.upperFirst=Hl,Nr.each=va,Nr.eachRight=wa,Nr.first=$o,ls(Nr,(_s={},bn(Nr,function(e,t){Te.call(Nr.prototype,t)||(_s[t]=e)}),_s),{chain:!1}),Nr.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Nr[e].placeholder=Nr}),Et(["drop","take"],function(e,t){Wr.prototype[e]=function(n){n=n===r?1:yr(dl(n),0);var i=this.__filtered__&&!t?new Wr(this):this.clone();return i.__filtered__?i.__takeCount__=vr(n,i.__takeCount__):i.__views__.push({size:vr(n,d),type:e+(i.__dir__<0?"Right":"")}),i},Wr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Et(["filter","map","takeWhile"],function(e,t){var r=t+1,n=1==r||3==r;Wr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),Et(["head","last"],function(e,t){var r="take"+(t?"Right":"");Wr.prototype[e]=function(){return this[r](1).value()[0]}}),Et(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");Wr.prototype[e]=function(){return this.__filtered__?new Wr(this):this[r](1)}}),Wr.prototype.compact=function(){return this.filter(ns)},Wr.prototype.find=function(e){return this.filter(e).head()},Wr.prototype.findLast=function(e){return this.reverse().find(e)},Wr.prototype.invokeMap=Hn(function(e,t){return"function"==typeof e?new Wr(this):this.map(function(r){return Mn(r,e,t)})}),Wr.prototype.reject=function(e){return this.filter(Ta(so(e)))},Wr.prototype.slice=function(e,t){e=dl(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Wr(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=dl(t))<0?n.dropRight(-t):n.take(t-e)),n)},Wr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wr.prototype.toArray=function(){return this.take(d)},bn(Wr.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=Nr[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(Nr.prototype[t]=function(){var t=this.__wrapped__,l=i?[1]:arguments,s=t instanceof Wr,u=l[0],c=s||qa(t),h=function(e){var t=o.apply(Nr,Tt([e],l));return i&&f?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(s=c=!1);var f=this.__chain__,p=!!this.__actions__.length,d=a&&!f,g=s&&!p;if(!a&&c){t=g?t:new Wr(this);var m=e.apply(t,l);return m.__actions__.push({func:pa,args:[h],thisArg:r}),new Gr(m,f)}return d&&g?e.apply(this,l):(m=this.thru(h),d?i?m.value()[0]:m.value():m)})}),Et(["pop","push","shift","sort","splice","unshift"],function(e){var t=Me[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Nr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(qa(i)?i:[],e)}return this[r](function(r){return t.apply(qa(r)?r:[],e)})}}),bn(Wr.prototype,function(e,t){var r=Nr[t];if(r){var n=r.name+"";Te.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}}),Mr[Di(r,2).name]=[{name:"wrapper",func:r}],Wr.prototype.clone=function(){var e=new Wr(this.__wrapped__);return e.__actions__=zi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=zi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=zi(this.__views__),e},Wr.prototype.reverse=function(){if(this.__filtered__){var e=new Wr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=qa(e),n=t<0,i=r?e.length:0,o=function(e,t,r){var n=-1,i=r.length;for(;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=vr(t,e+a);break;case"takeRight":e=yr(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,l=o.end,s=l-a,u=n?l:a-1,c=this.__iteratees__,h=c.length,f=0,p=vr(s,this.__takeCount__);if(!r||!n&&i==s&&p==s)return di(e,this.__actions__);var d=[];e:for(;s--&&f<p;){for(var g=-1,m=e[u+=t];++g<h;){var y=c[g],v=y.iteratee,w=y.type,b=v(m);if(2==w)m=b;else if(!b){if(1==w)continue e;break e}}d[f++]=m}return d},Nr.prototype.at=da,Nr.prototype.chain=function(){return fa(this)},Nr.prototype.commit=function(){return new Gr(this.value(),this.__chain__)},Nr.prototype.next=function(){this.__values__===r&&(this.__values__=fl(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},Nr.prototype.plant=function(e){for(var t,n=this;n instanceof Ur;){var i=No(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},Nr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wr){var t=e;return this.__actions__.length&&(t=new Wr(this)),(t=t.reverse()).__actions__.push({func:pa,args:[ea],thisArg:r}),new Gr(t,this.__chain__)}return this.thru(ea)},Nr.prototype.toJSON=Nr.prototype.valueOf=Nr.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},Nr.prototype.first=Nr.prototype.head,Ke&&(Nr.prototype[Ke]=function(){return this}),Nr}();mt?((mt.exports=mr)._=mr,gt._=mr):dt._=mr}).call(se)}({get exports(){return ms},set exports(e){ms=e}},ms);var ys,vs,ws,bs,_s="meters";function xs(e){var t=Ts.getState().data;if("string"==typeof e){if(!e||!t.hasOwnProperty(ws.Edge)||!t[ws.Edge].edges.hasOwnProperty(e))return;return ms.cloneDeep(t[ws.Edge].edges[e])}var r=Ss(e.whereDimension);if(r.length<1)return console.error("RouteNetworkData is empty in getEdgeData"),null;var n=function(e,t,r){void 0===r&&(r=.001);if(0===t.length)throw new Error("RouteNetworkData is empty");var n=na();n.load(t);var i,o,a=fl(U(e)),l=[a[0]-r,a[1]-r,a[2]+r,a[3]+r],s=n.search(l),u=1/0;s.features.forEach(function(t){var r=il(t,e),n=Y(r.geometry.coordinates,e);n<u&&(u=n,i=r,o=t)}),0===s.features.length&&(console.warn("No candidate features found in spatial index, falling back to brute force"),t.forEach(function(t){var r=il(t,e),n=Y(r.geometry.coordinates,e);n<u&&(u=n,i=r,o=t)}));return{nearestPoint:i,closestLine:o,minDistance:u}}(e.sourceCoords,r),i=n.nearestPoint,o=n.closestLine;Ts.getState().updateNetworkWithIntersection(o,i.geometry.coordinates);var a=[G([e.sourceCoords,i.geometry.coordinates],{title:"user_edgeLine",zone:o.properties.zone,wheelchair:1,direction:ys.TwoWay,dimension_where:e.whereDimension})],l={id:"user_position",name:"GPS Position",coords:e.sourceCoords,lines:a,where:e.whereDimension,what:"",zone:o.properties.zone};return Ts.getState().upsertEdge(l),l}function Ss(e,t){void 0===t&&(t=!0);var r=Ts.getState().data;if(!r.hasOwnProperty(ws.Network))return[];for(var n=r[ws.Network],i=[],o=0;o<n.length;o++){var a=n[o];a&&a.properties&&a.properties.dimension_where&&(t?a.properties.dimension_where.includes(e)&&i.push(a):a.properties.dimension_where===e&&i.push(a))}return ms.cloneDeep(i)}function Ps(e,t){return void 0===t&&(t=!0),Ss(e,t)}function js(e){return xs(e)}function ks(e){var t;return(t=Ts.getState().data).hasOwnProperty("portal")?t.portal:{edgeData:{},lines:[]}}function As(e){return function(e){var t=Ts.getState().data;return e&&t.hasOwnProperty("what.service.immigration")&&t["what.service.immigration"].hasOwnProperty(e)?t["what.service.immigration"][e]:[]}(e)}!function(e){e[e.TwoWay=2]="TwoWay",e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(ys||(ys={})),function(e){e.Transit="transit",e.Public="public"}(vs||(vs={})),function(e){e.Edge="what.route_edge",e.Network="what.route_network",e.PortalNetwork="what.link"}(ws||(ws={})),function(e){e.escalator="escalator",e.lift="lift",e.liftAnchor="liftAnchor",e.bus="airport_transfer",e.skytrain="skytrain",e.entrance="entrance",e.exit="exit",e.staircase="staircase",e.unknown=""}(bs||(bs={}));function Es(e,t,r){void 0===r&&(r=!0);var n=function(r,n){var i=il(n,r);void 0!==i.properties.index&&(t.geometry.coordinates.splice(i.properties.index+1,0,e.geometry.coordinates),t.properties&&(t.properties.modified=1))};if(r){var i=function(e,t){var r=-1;return tl(e,function(e,n,i,o,a){if(-1===r){var l=U(e);Y(t,l,{units:"meters"})<.001&&(r=n)}}),r}(t,e);-1===i?n(e.geometry.coordinates,t):(t.geometry.coordinates[i]=e.geometry.coordinates,t.properties&&(t.properties.modified=1))}else n(e.geometry.coordinates,t)}function zs(e){var t=e.split("."),r=t[t.length-1];return e.replace(".".concat(r),"")}var Ms="where.changi";function Os(e,t){var r=[],n={};for(var i in e)if(e[i].where.includes(t)){var o=e[i];n[i]=o,r.push.apply(r,o.lines),o.links.forEach(function(e){r.push.apply(r,e.lines)})}return{edgeData:n,lines:r}}function Fs(e,t){var r=[],n={};return t.forEach(function(i){if(i in e&&t.has(e[i].id)){var o=e[i];n[i]=o,r.push.apply(r,o.lines),o.links.forEach(function(e){r.push.apply(r,e.lines)})}}),{edgeData:n,lines:r}}var Ls,Cs,Ts=gs(function(e,t){return{data:{},setRoute:function(t){return e({data:t})},updateNetworkWithIntersection:function(r,n){var i;if(r&&n){var o=t().data,a=o[ws.Network]||[];if(0!==a.length){var l=!1,s=a.map(function(e){ms.isEqual(e,r)&&(Es(U(n),e,!1),l=!0);return e});l&&e({data:y(y({},o),(i={},i[ws.Network]=s,i))})}}},upsertEdge:function(r){var n,i,o;if(r&&r.id){var a=t().data,l=y(y({},a),((n={})[ws.Edge]=y(y({},a[ws.Edge]),{edges:y(y({},(null===(o=a[ws.Edge])||void 0===o?void 0:o.edges)||{}),(i={},i[r.id]=r,i))}),n));e({data:l})}}}}),Rs=gs(function(e){return{data:{},setMapObjectsData:function(t){return e({data:t})}}}),Bs=gs(function(e){return{data:{},setRoute:function(t){return e({data:t})}}}),Is=gs(function(e){return{data:{},setRoute:function(t){return e({data:t})}}});function Ns(e){return e===Ls.Routing?"generate-route-json-per-role":e===Ls.MapObjects?"generate-map-objects-per-role":e===Ls.MBTiles?"generate-vector-tiles":e===Ls.Fonts?"generate-font-sprites":void 0}function Ds(e,t){return t.valueOf()+e}!function(e){e.Routing="routing",e.MapObjects="mapObjects",e.MBTiles="mbtiles",e.Fonts="fonts"}(Ls||(Ls={})),function(e){e.Ready="Ready",e.Awaiting="Awaiting",e.DownloadingResources="DownloadingResources",e.Unavailable="Unavailable"}(Cs||(Cs={}));var Us=Ts.setState,Gs=Rs.setState,Ws=Bs.setState,qs=Is.setState;function Vs(e,t,r){var n,i;return v(this,void 0,void 0,function(){var o,a,l,s,u,c,h,f,d,m,y,b,_,x,S,P,j,k,A,E,z,M,O,F=this;return w(this,function(L){switch(L.label){case 0:o=e.publishedDataType,a=Ds("version",o),l=Ds("roleName",o),s=null==e?void 0:e.roleName,u=Cs.Awaiting,c=function(e){return e===Ls.Routing?Us:e===Ls.MapObjects?Gs:e===Ls.MBTiles?Ws:e===Ls.Fonts?qs:void 0}(o),h=e.secretKey,f="".concat(g.default.DocumentDirectoryPath,"/extracted/"),d=function(){return v(F,void 0,void 0,function(){var r;return w(this,function(n){return r=t.contains(a)?t.getString(a):"0.0.0",[2,new Promise(function(n,i){p.default({url:"".concat(e.URL,"/check-published-versions"),headers:{Authorization:"Bearer ".concat(e.accessToken),"Content-Type":"application/json"},method:"POST",data:JSON.stringify({version:r,dataType:Ns(e.publishedDataType)})}).then(function(e){var r=e.data,i={currentVersion:void 0,remoteVersion:void 0,roleName:void 0,URL:void 0,data:void 0},c=t.getString(a),h=t.getString(l),f=c;if(r.hasOwnProperty("version")&&(f=r.version),i.currentVersion=c,i.remoteVersion=f,c){var p=t.getString(Ds("data",o));if(o===Ls.MBTiles||o===Ls.Fonts)p&&(i.data=p);else t.getString(Ds("encryptionTag",o))&&p&&(i.data=p)}if(s&&(i.roleName=s,h!==s))return r.hasOwnProperty("downloadUrl")&&(i.URL=r.downloadUrl),u=Cs.DownloadingResources,console.log("Role mismatch. Setting status to DownloadingResources: ",i.roleName,h),void n(i);f&&(r.hasOwnProperty("downloadUrl")&&(i.URL=r.downloadUrl),(c&&f>c||!c||!i.data)&&(u=i.URL?Cs.DownloadingResources:u)),console.log("final: ",i.URL,i.currentVersion,i.remoteVersion,i.roleName),n(i)}).catch(function(t){console.log("error while fetching published version: ",e.publishedDataType),t.response?(console.log(t.response.data),console.log(t.response.status),console.log(t.response.headers)):t.request?console.log(t.request):console.log("Error",t.message),console.log(t.config),i(t)})})]})})},m=function(e,r,n,i){try{return t.set(Ds("data",o),e),t.set(a,r),t.set(Ds("roleName",o),n),i&&t.set(Ds("encryptionTag",o),i),!0}catch(e){return console.log("error storing routing file from local storage",e),!1}},y=function(){return v(F,void 0,void 0,function(){var r,n,i,a;return w(this,function(l){switch(l.label){case 0:return r=t.getString(Ds("data",o)),o!==Ls.MBTiles&&o!==Ls.Fonts?[3,2]:[4,$s(o,r,f,h)];case 1:return(n=l.sent())?(c({data:n}),u=Cs.Ready,[2,!0]):[2,!1];case 2:return i=t.getString(Ds("encryptionTag",o)),r&&i?[4,Il(r,i,e.secretKey)]:[3,4];case 3:return a=l.sent(),c({data:a}),u=Cs.Ready,[2,!0];case 4:return[2,!1];case 5:return[2]}})})},b=function(){return v(F,void 0,void 0,function(){return w(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,y()];case 1:return e.sent()||(console.log("metaAtlasSDK: failed to load data",o),u=Cs.Unavailable),[3,3];case 2:return e.sent(),console.log("metaAtlasSDK: erro while loading data",o),u=Cs.Unavailable,t.clearAll(),[3,3];case 3:return[2]}})})},L.label=1;case 1:return L.trys.push([1,26,,28]),[4,d()];case 2:if(_=L.sent(),u!==Cs.DownloadingResources||!_.URL)return[3,15];console.log("metaAtlasSDK: downloading file from server",o),L.label=3;case 3:return L.trys.push([3,12,,14]),o!==Ls.MBTiles&&o!==Ls.Fonts?[3,7]:(x="".concat(g.default.DocumentDirectoryPath,"/").concat(o,".zip"),[4,g.default.downloadFile({fromUrl:_.URL,toFile:x,begin:function(e){var t,n=(e.contentLength/1048576).toFixed(2);r&&(null==r?void 0:r.onStart)&&(null===(t=null==r?void 0:r.onStart)||void 0===t||t.call(r,{totalSize:n})),console.log("Download started. Total size: ".concat(n," MB"))},progress:function(e){var t,n=e.bytesWritten/e.contentLength*100,i=(e.bytesWritten/1048576).toFixed(2),o=(e.contentLength/1048576).toFixed(2);r&&(null==r?void 0:r.onProgress)&&(null===(t=null==r?void 0:r.onProgress)||void 0===t||t.call(r,{downloaded:i,totalSize:o,progress:n.toFixed(2)})),console.log("Downloaded: ".concat(i," MB / ").concat(o," MB (").concat(n.toFixed(2),"%)"))}}).promise]);case 4:return S=L.sent(),[4,g.default.mkdir(f)];case 5:if(L.sent(),200!==S.statusCode)throw r&&(null==r?void 0:r.onError)&&(null===(n=null==r?void 0:r.onError)||void 0===n||n.call(r,S.statusCode.toString())),new Error("Download failed with status ".concat(S.statusCode));return r&&(null==r?void 0:r.onSuccess)&&(null===(i=null==r?void 0:r.onSuccess)||void 0===i||i.call(r,x)),console.log("File downloaded to: ".concat(x)),g.default.stat(x).then(function(e){var t=(e.size/1048576).toFixed(2);console.log("File size: ".concat(t," MB"))}).catch(function(e){console.error("Error getting file size:",e)}),k=m(x,_.remoteVersion,s),[4,$s(o,x,f,h)];case 6:if(!(z=L.sent()))throw new Error("No MBTiles file found in the archive");return k&&(console.log("Loaded file"),c({data:z}),u=Cs.Ready),[3,11];case 7:return[4,fetch(_.URL)];case 8:if(!(S=L.sent()).ok)throw new Error("HTTP error! Status: ".concat(S.status));return[4,S.json()];case 9:return P=L.sent(),j=P.data,M=P.tag,[4,Il(j,M,e.secretKey)];case 10:O=L.sent(),(k=m(j,_.remoteVersion,s,M))&&(console.log("loaded file"),c({data:O}),u=Cs.Ready),L.label=11;case 11:return[3,14];case 12:return A=L.sent(),console.error("Error fetching and decrypting data:",A),[4,b()];case 13:return L.sent(),[3,14];case 14:return[3,25];case 15:return o!==Ls.MBTiles&&o!==Ls.Fonts?[3,21]:(E=t.getString(Ds("data",o)),[4,g.default.exists(E)]);case 16:return L.sent()?console.log("File exists at: ".concat(E)):(console.log("File does not exist at: ".concat(E)),m("","","")),[4,$s(o,E,f,h)];case 17:return z=L.sent(),E?(c({data:z}),u=Cs.Ready,[3,20]):[3,18];case 18:return[4,b()];case 19:L.sent(),L.label=20;case 20:return[3,25];case 21:return M=t.getString("encryptionTag"),_.data&&M?(console.log("loaded local file"),[4,Il(_.data,M,e.secretKey)]):[3,23];case 22:return O=L.sent(),c({data:O}),u=Cs.Ready,[3,25];case 23:return[4,b()];case 24:L.sent(),L.label=25;case 25:return[3,28];case 26:return L.sent(),[4,b()];case 27:return L.sent(),[3,28];case 28:return[2,u]}})})}function $s(e,t,r,n){return v(this,void 0,void 0,function(){var i,o,a,l,u,c,h,f,p,d,m,y,v,b,_,x,S,P,j,k,A;return w(this,function(w){switch(w.label){case 0:return w.trys.push([0,30,,31]),i="",[4,g.default.exists(r)];case 1:return w.sent()?[3,3]:[4,g.default.mkdir(r)];case 2:return w.sent(),console.log("Directory created at: ".concat(r)),[3,4];case 3:console.log("Directory already exists at: ".concat(r)),w.label=4;case 4:return e!==Ls.MBTiles?[3,24]:[4,s.unzipWithPassword(t,r,n)];case 5:return w.sent(),[4,g.default.readDir(r)];case 6:o=w.sent(),a=o.filter(function(e){return e.name.endsWith(".mbtiles")}),l=0,u=a,w.label=7;case 7:return l<u.length?(c=u[l],[4,g.default.unlink(c.path)]):[3,10];case 8:w.sent(),w.label=9;case 9:return l++,[3,7];case 10:return[4,g.default.readDir(r)];case 11:return _=w.sent(),h=_.find(function(e){return e.name.endsWith(".zip")}),h?[4,s.unzip("".concat(r).concat(h.name),r)]:[3,15];case 12:return w.sent(),f="".concat(r).concat(h.name),[4,g.default.exists(f)];case 13:return w.sent()?[4,Js(f)]:[3,15];case 14:w.sent(),w.label=15;case 15:return[4,g.default.readDir(r)];case 16:return p=w.sent(),d=p.find(function(e){return e.name.endsWith(".mbtiles")}),d?(m="geojson_".concat(performance.now().toFixed(0),".mbtiles"),y="".concat(r).concat(m),[4,g.default.moveFile(d.path,y)]):[3,22];case 17:return w.sent(),[4,g.default.exists(d.path)];case 18:return w.sent()?[4,g.default.unlink(d.path)]:[3,20];case 19:w.sent(),w.label=20;case 20:return[4,g.default.readDir(r)];case 21:return v=w.sent(),console.log("All files in unzip destination:",v),i=y,[3,23];case 22:throw new Error("MBTiles file not found.");case 23:return[3,29];case 24:return e!==Ls.Fonts?[3,28]:[4,s.unzip(t,r)];case 25:return b=w.sent(),[4,g.default.readDir(b)];case 26:return _=w.sent(),x=_.map(function(e){return e.name}),[4,g.default.readDir("".concat(b,"sprites"))];case 27:if(S=w.sent(),P=S.map(function(e){return e.name}),console.log("Sprites Files:",P),j=x.includes("fonts"),k=x.includes("sprites"),!j||!k)throw new Error("Missing required directories: fonts or sprites.");return i=b,[3,29];case 28:throw new Error("Unsupported data type.");case 29:return[2,i];case 30:throw A=w.sent(),console.error("Error extracting offline file path:",A),A;case 31:return[2]}})})}var Js=function(e){return v(void 0,void 0,void 0,function(){var t;return w(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,g.default.unlink(e)];case 1:return r.sent(),console.log("File deleted successfully"),[3,3];case 2:return t=r.sent(),console.error("Error deleting file:",t),[3,3];case 3:return[2]}})})};var Ys,Xs,Hs={};function Ks(e){var t=e.children,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["children"]);return y(y({},r),{name:e.name,taxonomyPath:e.taxonomyPath,children:(null!=t?t:[]).map(Ks)})}function Zs(e,t){if(e.taxonomyPath){var r=t.get(e.taxonomyPath);r&&(e.altMin=r.altMin,e.altMax=r.altMax,r.timestamp&&(e.altitudeTimestamp=r.timestamp))}for(var n=0,i=function(e){var t;return null!==(t=e.children)&&void 0!==t?t:[]}(e);n<i.length;n++){Zs(i[n],t)}}function Qs(e,t){if(!t||"object"!==T(t))return e;var r=function(e){for(var t=new Map,r=0,n=Object.keys(e);r<n.length;r++){var i=e[n[r]];if(i&&"object"===T(i))for(var o=0,a=Object.keys(i);o<a.length;o++){var l=i[a[o]];null!=(null==l?void 0:l.floorTaxonomyPath)&&"number"==typeof l.altMin&&"number"==typeof l.altMax&&t.set(l.floorTaxonomyPath,{altMin:l.altMin,altMax:l.altMax,timestamp:l.timestamp})}}return t}(t);if(0===r.size)return e;var n=JSON.parse(JSON.stringify(e));for(var i in n){var o=n[i];(null==o?void 0:o.taxonomyPath)&&Zs(o,r)}return n}function eu(e,t){if(!e||"object"!==T(e)||0===Object.keys(e).length)return console.error("[focus-core] Focus tree data is missing or empty"),void(Hs={});var r=function(e){var t={};return Object.keys(e).forEach(function(r){var n=e[r];(null==n?void 0:n.taxonomyPath)&&(t[r]=Ks(n))}),t}(e);t&&(r=Qs(r,t)),Hs=r}function tu(){return Hs}function ru(e){var t;return null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]}function nu(e){return 0===ru(e).length}function iu(e,t,r,n,i){if(void 0===n&&(n=0),void 0===i&&(i=null),r)return t(r,n,i),void ru(r).forEach(function(i){return iu(e,t,i,n+1,r)});for(var o in e){var a=e[o];(null==a?void 0:a.taxonomyPath)&&iu(e,t,a,0,null)}}function ou(){var e=tu(),t=[];for(var r in e){var n=e[r];(null==n?void 0:n.taxonomyPath)&&t.push(n)}return t}function au(e){if(!e)return null;var t=null;return iu(tu(),function(r){r.taxonomyPath===e&&(t=r)}),t}function lu(e){if(!e)return null;var t=null;return iu(tu(),function(r){ru(r).some(function(t){return t.taxonomyPath===e})&&(t=r)}),t}function su(e){var t=ru(e);return 0===t.length?e.taxonomyPath?[e.taxonomyPath]:[]:t.flatMap(function(e){return su(e)})}!function(e){e.Name="Name",e.WhereDimension="WhereDimension",e.Relevance="Relevance",e.RelevanceStrict="RelevanceStrict"}(Ys||(Ys={})),function(e){e.Name="title",e.LocalRef="localRef",e.WhatTaxonomy="dimension_what"}(Xs||(Xs={}));var uu=function(){function e(){this.defaultFocusedTaxonomy="",this.searchableGeoJsonFeatures=[],this.currentFocus=this.defaultFocusedTaxonomy,this.token="",this.empApi="",this.HOST="",this.atomsAPIAccessToken="",this.apiRequestLimit=5e3,this.secretKeyForDecryption="",this.routingStatus=Cs.Awaiting,this.searchStatus=Cs.Awaiting,this.offlineMapStatus=Cs.Awaiting,this.storage=new Pl,this.ignoredLayers=["Aerodrome","Aerodrome names","Aerobridge","Aerobridge gates","Airplanes","Airplanes outline","Building icon","Building overlay","Building overlay outline","Building underlay","Building underlay icon","Building underlay selected outline","building_outline","Changi Airport Connector","Changi Airport Connector Text","Changi Walkway Text","T2 overlay outline copy","Building overlay base","Skytrain track outdoor"],this.lastClicked={mapObjectId:null,coordinates:null,name:null,whatDimension:null,whereDimension:null,geometry:null,properties:null}}return e.prototype.init=function(e,t,r,n,i){this.empApi=e,this.token=t,this.HOST=n,this.secretKeyForDecryption=r,this.tileserverRoleName=i},e.prototype.getAtomsAPIAccessToken=function(e){var t=this,r=JSON.stringify({strategy:"atomstoken",atomsSdkToken:this.token,clientEngine:"API",clientOS:"Linux"}),n={method:"post",url:"".concat(this.empApi,"/authentication"),headers:{"Content-Type":"application/json"},data:r};p.default(n).then(function(r){return v(t,void 0,void 0,function(){var t;return w(this,function(n){return(null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.accessToken)&&(this.atomsAPIAccessToken=r.data.accessToken,e({authenticated:!0})),[2]})})}).catch(function(t){e({authenticated:!1,error:t})})},e.prototype.setupFocusTree=function(){return v(this,void 0,void 0,function(){var e,t,r,n;return w(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e="".concat(this.empApi,"/role-based-camera-properties"),[4,p.default.get(e,{headers:{Authorization:"Bearer ".concat(this.atomsAPIAccessToken)}})];case 1:return(null==(t=i.sent())?void 0:t.data)&&Object.keys(t.data).length>0?(eu(t.data),(r=ou()).length>0&&!this.currentFocus&&(this.defaultFocusedTaxonomy=r[0].taxonomyPath,this.currentFocus=r[0].taxonomyPath),console.log("Focus tree loaded from ATOMS API",t.data)):(console.error("[focus-core] Empty focus tree response from ATOMS API"),eu({})),[3,3];case 2:return n=i.sent(),console.error("[focus-core] Failed to load focus tree from ATOMS API",n),eu({}),[3,3];case 3:return[2]}})})},e.prototype.hasPublishedDataVersion=function(e){return function(e,t){var r=Ds("version",e);return null!=t.getString(r)}(e,this.storage)},e.prototype.setupOfflineMaps=function(e,t){return v(this,void 0,void 0,function(){var r,n,i,o;return w(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,Vs({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:Ls.MBTiles,roleName:this.tileserverRoleName},this.storage,t)];case 1:return r=a.sent(),[4,Vs({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:Ls.Fonts,roleName:this.tileserverRoleName},this.storage,t)];case 2:return n=a.sent(),console.log("Offline Map & fonts status:",r,n),i=r===Cs.Ready&&n===Cs.Ready,this.offlineMapStatus=i?Cs.Ready:Cs.Unavailable,e&&e(this.offlineMapStatus===Cs.Ready),[2,i];case 3:return o=a.sent(),console.error("Error setting up offline maps:",o),this.offlineMapStatus=Cs.Unavailable,e&&e(!1),[3,4];case 4:return[2]}})})},e.prototype.getOfflineMapStatus=function(){return this.offlineMapStatus},e.prototype.setupRouting=function(e){return v(this,void 0,void 0,function(){var t;return w(this,function(r){switch(r.label){case 0:return[4,Vs({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:Ls.Routing,roleName:this.tileserverRoleName},this.storage)];case 1:return t=r.sent(),this.routingStatus=t,console.log("routing status: ",t),e&&e(t===Cs.Ready),[2]}})})},e.prototype.getRoutingStatus=function(){return this.routingStatus},e.prototype.setLastClickedFeature=function(e){return this.lastClicked=e,this.lastClicked},e.prototype.getLastClickedFeature=function(){var e=this.lastClicked;if(!this.lastClicked||this.lastClicked&&(null===this.lastClicked.name||null===this.lastClicked.whereDimension)){e=this.setLastClickedFeature({mapObjectId:null,coordinates:null,name:null,whatDimension:null,whereDimension:null,geometry:null,properties:null})}return e},e.prototype.isClickableFeature=function(e){return!!(e&&e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"isSearchable")&&e.properties.isSearchable&&"Transit"!==e.properties.title&&"Public"!==e.properties.title)},e.prototype.getMidPointOfFeature=function(e){if(!e)return null;if(e.lngLat)return e.lngLat;if(!e.geometry)return null;if("Point"===e.geometry.type)return e.geometry.coordinates;var t=D(e.geometry);if("LineString"===t.geometry.type||"MultiLineString"===t.geometry.type&&1==t.geometry.coordinates.length){var r=ol(t=G(e.geometry.coordinates));return _l(t,r/2,r).geometry.coordinates[0]}return dl(t).geometry.coordinates},e.prototype.getFocusTree=function(){return tu()},e.prototype.getWhatTaxonomies=function(){if(this.searchStatus===Cs.Ready){for(var e=new Set,t=0,r=this.searchableGeoJsonFeatures;t<r.length;t++){var n=r[t];e.add(n.properties.dimension_what)}return Array.from(e)}return console.warn("getWhatTaxonomies called before Search APIs are ready"),[]},e.prototype.getCurrentFocus=function(){return this.currentFocus},e.prototype.getCurrentFocusBuilding=function(){var e=au(this.currentFocus);return e?nu(e)?lu(this.currentFocus):e:null},e.prototype.getCurrentFocusFloor=function(){var e=au(this.currentFocus);return e&&nu(e)?e:null},e.prototype.getUserViewportBuilding=function(e){var t,r=this,n=U(e),i=null;return t=function(e){if(!i&&!nu(e)&&e.bounds){var t=r.normalizeBoundsToPolygon(e.bounds);t&&xl(n,t)&&(i=e)}},iu(tu(),t),i},e.prototype.normalizeBoundsToPolygon=function(e){if(!e||!Array.isArray(e))return null;try{var t=e,r=t[0];if(!r)return null;var n=void 0;if(Array.isArray(r)){var i=r[0];if(2===t.length&&Array.isArray(i)&&"number"==typeof i[0]){var o=r,a=t[1];n=[[[o[0],o[1]],[a[0],o[1]],[a[0],a[1]],[o[0],a[1]],[o[0],o[1]]]]}else if("number"==typeof i&&r.length>=2){var l=t;if(!this.isValidRing(l))return null;n=[l]}else{if(!Array.isArray(i)||"number"!=typeof i[0])return null;n=t}}else{if(!("number"==typeof r&&t.length>=4))return null;n=[[[t[0],t[1]],[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],[t[0],t[1]]]]}return function(e,t,r){void 0===r&&(r={});for(var n=0,i=e;n<i.length;n++){var o=i[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}return D({type:"Polygon",coordinates:e},t,r)}(n)}catch(e){return null}},e.prototype.isValidRing=function(e){if(!e||e.length<3)return!1;for(var t=0,r=e;t<r.length;t++){var n=r[t];if(!Array.isArray(n)||"number"!=typeof n[0]||"number"!=typeof n[1])return!1}return!0},e.prototype.checkUserViewport=function(e,t,r){var n=U(e);if(null==t)return!1;if(!t.hasOwnProperty("bounds"))return!1;var i=this.normalizeBoundsToPolygon(t.bounds),o=!!i&&xl(n,i);if(null==r)return o;if(!r.hasOwnProperty("bounds"))return o;var a=this.normalizeBoundsToPolygon(r.bounds),l=!!a&&xl(n,a);return o||l},e.prototype.filterBaseMapWhereDimension=function(e,t){var r=t;if(r){this.currentFocus=r;var n=[r],i=au(r);if(i){var o=su(i);n=o.length>0&&!nu(i)?o:(nu(i),[i.taxonomyPath])}if(e.length>0)for(var a=0;a<e.length;a+=1){var l=e[a].id;this.ignoredLayers.includes(l)||this.filterLayer(e[a],n)}return e}},e.prototype.filterLayersWhereDimension=function(e,t){if(t){var r;r=[t];for(var n=0;n<e.length;n+=1)this.filterLayer(e[n],r);return e}},e.prototype.filterLayer=function(e,t){var r=e.filter;if("openmaptiles"!==e.source&&r){for(var n=!1,i=0;i<r.length;i+=1){var o=r[i];if(Array.isArray(o[1])&&"dimension_where"===o[1][1]){o[0]="in",o[2]=["literal",t],n=!0;break}}n||r.push(["in",["get","dimension_where"],["literal",t]])}},e.prototype.getFlyToLocation=function(e,t){void 0===t&&(t=!0);var r="[getFlyToLocation]",n="Please review the where taxonomy camera configuration in Spatialverse Configurator → Map Config → Taxonomies page.",i=function(e){if(!(null==e?void 0:e.cameraConfigs))return null;var r=t?e.cameraConfigs.mobile||e.cameraConfigs.web:e.cameraConfigs.web||e.cameraConfigs.mobile;return!(null==r?void 0:r.center)||!Array.isArray(r.center)||r.center.length<2?null:r},o=au(e);if(!o)return console.error(r,'Where taxonomy "'.concat(e,'" was not found in the focus tree. ').concat(n),{whereTaxonomyPath:e}),null;var a,l,s=i(o);if(s)return s;a=e,l=o,console.warn(r,'Camera config for where taxonomy "'.concat(a,'" was not found. ').concat(n),{whereTaxonomyPath:a,node:l?{name:l.name,taxonomyPath:l.taxonomyPath,cameraConfigs:l.cameraConfigs}:void 0,isMobile:t});for(var u=function(e){if(!au(e))return[];for(var t=[],r=e;;){var n=lu(r);if(!n)break;t.unshift(n),r=n.taxonomyPath}return t}(e),c=u.length-1;c>=0;c-=1){var h=i(u[c]);if(h)return h}if(!nu(o))for(var f=0,p=ru(o);f<p.length;f++){var d=i(p[f]);if(d)return d}return console.error(r,'Camera config not found for where taxonomy "'.concat(e,'" and no ancestor or child fallback was available. ').concat(n),{whereTaxonomyPath:e,matchedNode:{name:o.name,taxonomyPath:o.taxonomyPath},ancestorsChecked:u.map(function(e){return e.taxonomyPath})}),null},e.prototype.filterLayersByType=function(e,t,r,n){if(r){for(var i=0;i<e.length;i+=1){var o=void 0,a=e[i].filter;if(o=n?["case",["!",["in",["get",t],["literal",r]]],!0,["all",["in",["get",t],["literal",r]],["!=",["geometry-type"],n]],!0,!1]:["!",["in",["get",t],["literal",r]]],a){for(var l=!1,s=0;s<a.length;s+=1){var u=a[s];if(n){if("case"===u[0]&&Array.isArray(u[1])&&Array.isArray(u[3])&&Array.isArray(u[3][1])&&Array.isArray(u[3][1])&&Array.isArray(u[3][1][1])&&Array.isArray(u[3][1][2])&&Array.isArray(u[3][2])&&u[3][1][1][1]===t&&u[3][2][2]===n){u[1][1][2]=["literal",r],u[1][1][1]=["get",t],u[3][1][2]=["literal",r],u[3][1][1]=["get",t],u[3][2][2]=n,l=!0;break}}else if(Array.isArray(u[1])&&Array.isArray(u[1][1])&&"!"===u[0]&&u[1][1][1]===t){u[0]="!",u[1][2]=["literal",r],l=!0;break}}l||(console.log("pushing: ",r,t),a.push(o))}}return e}},e.prototype.createFilterForStyle=function(e,t,r,n){function i(e,t){var r=t.filter(function(t){return!e.includes(t)});return e.push.apply(e,r),e}return function e(o){if(Array.isArray(o)&&"match"===o[0]){var a=b([],o,!0);return Array.isArray(a[1])&&a[1][1]===t?function(e,t){for(var o=3;o<t.length;o+=2){if(e[o]===n){var a=i(e[o-1],r);return void(e[o-1]=a)}o+2===t.length&&e.splice(o+1,0,r,n)}}(a,o):a[a.length-1]=e(a[a.length-1]),a}return["match",["get",t],r,n,o]}(e)},e.prototype.styleLayersByType=function(e,t,r,n,i){if(r){for(var o=0;o<e.length;o+=1){var a=e[o],l=a.paint,s=a.type;if((s&&"fill"===s||"line"===s)&&l[n]){var u=l[n];if(u){var c=this.createFilterForStyle(u,t,r,i);l[n]=c}}}return e}},e.prototype.createFilterForClearStyle=function(e,t,r){return function e(n){if(Array.isArray(n)&&"match"===n[0]){var i=b([],n,!0);return Array.isArray(i[1])&&i[1][1]===t?r.length>0?function(e,t){for(var n=function(t){Array.isArray(e[t])&&r.forEach(function(r){var n=e[t].indexOf(r);n>-1&&(e[t].length>1?e[t].splice(n,1):e[t]=[""])})},i=2;i<t.length;i+=2)n(i)}(i,n):i=i[i.length-1]:i[i.length-1]=e(i[i.length-1]),i}}(e)},e.prototype.clearStyleLayersByType=function(e,t,r,n){for(var i=0;i<e.length;i+=1){var o=e[i],a=o.paint,l=o.type;if((l&&"fill"===l||"line"===l)&&a[n]){var s=a[n];if(s){var u=this.createFilterForClearStyle(s,t,r);a[n]=u}}}return e},e.prototype.normalize=function(e){return e.trim().toLowerCase()},e.prototype.relevanceSort=function(e,t,r){function n(e){var n=[-1,0,e.name];if(e.name){var i=e.name.toLowerCase(),o=t.toLowerCase();return i===o?[1e3,-e.name.length,i]:i.startsWith(o)?[500,-e.name.length,i]:i.split(" ").some(function(e){return e.startsWith(o)})?[200,-e.name.length,i]:r?n:i.includes(o)?[0,-e.name.length,i]:n}return n}return void 0===r&&(r=!1),e.sort(function(e,t){var r=n(e),i=n(t);return i[0]-r[0]||i[1]-r[1]||r[2].localeCompare(i[2])}).filter(function(e){return n(e)[0]>=0})},e.prototype.sort=function(e,t,r){void 0===r&&(r="");var n=function(e,t){return e&&t?e.localeCompare(t):0};return t===Ys.Name?e.sort(function(e,t){return n(e.name,t.name)}):t===Ys.WhereDimension?e.sort(function(e,t){var r=n(e.whereDimension,t.whereDimension);return 0===r?n(e.name,t.name):r}):t===Ys.Relevance?this.relevanceSort(e,r):t===Ys.RelevanceStrict?this.relevanceSort(e,r,!0):void 0},e.prototype.setupMapObjectSearch=function(e){return v(this,void 0,void 0,function(){var t,r,n,i,o;return w(this,function(a){switch(a.label){case 0:return[4,Vs({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:Ls.MapObjects,roleName:this.tileserverRoleName},this.storage)];case 1:for(t=a.sent(),this.searchStatus=t,console.log("search status: ",t),r=Rs.getState().data,n=0;n<r.length;n++)(i=r[n])&&(o={mapObjectId:i.mID,lngLat:i.lngLat,geometry:{type:"Point",coordinates:i.lngLat},properties:{myMapObjectId:i.mID,title:i.name,localRef:i.localRef,dimension_what:i.what,dimension_where:i.where,isSearchable:!0}},this.searchableGeoJsonFeatures.push(o));return e&&e(t===Cs.Ready),[2]}})})},e.prototype.getSearchStatus=function(){return this.searchStatus},e.prototype.createMetaFeature=function(e,t,r,n,i,o,a){return void 0===e&&(e=null),void 0===t&&(t=null),void 0===r&&(r=null),void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),{mapObjectId:e,coordinates:t,name:r,whatDimension:n,whereDimension:i,geometry:o,properties:null!=a?a:{},isSearchable:!0}},e.prototype.getAllMapObjects=function(e){for(var t,r,n,i=new Set,o=[],a=0,l=this.searchableGeoJsonFeatures;a<l.length;a++){var s=l[a],u=null===(t=s.properties)||void 0===t?void 0:t.myMapObjectId;if(null!=u&&!i.has(u)){i.add(u);var c=null!==(r=s.lngLat)&&void 0!==r?r:"Point"===(null===(n=s.geometry)||void 0===n?void 0:n.type)?s.geometry.coordinates:null;o.push(this.createMetaFeature(s.properties.myMapObjectId,c,s.properties.title,s.properties.dimension_what,s.properties.dimension_where,s.geometry,s.properties))}}e(o)},e.prototype.getMapObjectsByName=function(e,t,r,n){var i,o;void 0===t&&(t=!1);for(var a=new Set,l=[],s=this.normalize(e),u=0,c=this.searchableGeoJsonFeatures;u<c.length;u++){var h=c[u],f=h.properties.myMapObjectId,p=this.normalize(h.properties.title);if((!t||p.includes(s))&&((t||p===s)&&!a.has(f))){a.add(f);var d=null!==(i=h.lngLat)&&void 0!==i?i:"Point"===(null===(o=h.geometry)||void 0===o?void 0:o.type)?h.geometry.coordinates:null,g=this.createMetaFeature(h.properties.myMapObjectId,d,h.properties.title,h.properties.dimension_what,h.properties.dimension_where,h.geometry,h.properties);l.push(g)}}n(this.sort(l,r,e))},e.prototype.getMapObjectById=function(e,t){for(var r=[],n=0,i=this.searchableGeoJsonFeatures;n<i.length;n++){var o=i[n],a=o.properties.myMapObjectId;if(String(a)===String(e)){var l=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);r.push(l)}}t(r)},e.prototype.getMapObjectByLocalRef=function(e,t){for(var r=[],n=0,i=this.searchableGeoJsonFeatures;n<i.length;n++){var o=i[n],a=o.properties.localRef;if(String(a)===String(e)){var l=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);r.push(l)}}t(r)},e.prototype.getMapObjectsByWhatTaxonomy=function(e,t){for(var r=[],n=0,i=this.searchableGeoJsonFeatures;n<i.length;n++){var o=i[n],a=o.properties.dimension_what;if(String(a)===String(e)){var l=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);r.push(l)}}t(r)},e.prototype.getMapObjectsByWhereTaxonomy=function(e,t){for(var r=[],n=0,i=this.searchableGeoJsonFeatures;n<i.length;n++){var o=i[n],a=o.properties.dimension_where;if(String(a)===String(e)){var l=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);r.push(l)}}t(r)},e.prototype.getMapObjectsByWhatAndWhereTaxonomy=function(e,t,r){for(var n=[],i=0,o=this.searchableGeoJsonFeatures;i<o.length;i++){var a=o[i],l=a.properties.dimension_where,s=a.properties.dimension_what;if(String(l)===String(t)&&String(s)===String(e)){var u=this.createMetaFeature(a.properties.myMapObjectId,a.lngLat,a.properties.title,a.properties.dimension_what,a.properties.dimension_where,a.geometry,a.properties);n.push(u)}}r(n)},e.prototype.getMapObjectsInWhatTaxonomy=function(e,t){for(var r=[],n=0,i=this.searchableGeoJsonFeatures;n<i.length;n++){var o=i[n],a=o.properties.dimension_what;if(e.includes(String(a))){var l=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);r.push(l)}}t(r)},e.prototype.getMapObjectsInWhereTaxonomy=function(e,t){for(var r=[],n=0,i=this.searchableGeoJsonFeatures;n<i.length;n++){var o=i[n],a=o.properties.dimension_where;if(e.includes(String(a))){var l=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);r.push(l)}}t(r)},e.prototype.getMapObjectsInWhatAndWhereTaxonomy=function(e,t,r){for(var n=[],i=0,o=this.searchableGeoJsonFeatures;i<o.length;i++){var a=o[i],l=a.properties.dimension_where,s=a.properties.dimension_what;if(t.includes(String(l))&&e.includes(String(s))){var u=this.createMetaFeature(a.properties.myMapObjectId,a.lngLat,a.properties.title,a.properties.dimension_what,a.properties.dimension_where,a.geometry,a.properties);n.push(u)}}r(n)},e.prototype.geofence=function(e,t,r){var n=this;void 0===t&&(t=2),p.default({url:"".concat(this.empApi,"/geofence"),headers:{Authorization:"Bearer ".concat(this.atomsAPIAccessToken),"Content-Type":"application/json"},method:"POST",data:JSON.stringify({point:e,padding:t})}).then(function(e){return v(n,void 0,void 0,function(){var t;return w(this,function(n){return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchableMOs)&&r(e.data.searchableMOs),[2]})})}).catch(function(e){console.log("error occured while geofencing",e),r([])})},e}();function cu(e,t){if(!new.target)return new cu(e,t);if(Array.isArray(e)||(t=e,e=[]),t=t||{},this.data=e||[],this.length=this.data.length,this.compare=t.compare||fu,this.setNodeId=t.setNodeId||hu,this.length>0)for(var r=this.length>>1;r>=0;r--)this._down(r);if(t.setNodeId)for(r=0;r<this.length;++r)this.setNodeId(this.data[r],r)}function hu(){}function fu(e,t){return e-t}function pu(e){this.node=e,this.parent=null,this.closed=!1,this.open=0,this.distanceToSource=Number.POSITIVE_INFINITY,this.fScore=Number.POSITIVE_INFINITY,this.heapIndex=-1}cu.prototype={push:function(e){this.data.push(e),this.setNodeId(e,this.length),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this.setNodeId(this.data[0],0),this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},updateItem:function(e){this._down(e),this._up(e)},_up:function(e){for(var t=this.data,r=this.compare,n=this.setNodeId,i=t[e];e>0;){var o=e-1>>1,a=t[o];if(r(i,a)>=0)break;t[e]=a,n(a,e),e=o}t[e]=i,n(i,e)},_down:function(e){for(var t=this.data,r=this.compare,n=this.length>>1,i=t[e],o=this.setNodeId;e<n;){var a=1+(e<<1),l=a+1,s=t[a];if(l<this.length&&r(t[l],s)<0&&(a=l,s=t[l]),r(s,i)>=0)break;t[e]=s,o(s,e),e=a}t[e]=i,o(i,e)}};const du=[];"function"==typeof Object.freeze&&Object.freeze(du);const gu={heuristic:function(){return 0},distance:function(){return 1},blocked:function(){return!1},compareFScore:function(e,t){return e.fScore-t.fScore},NO_PATH:du,setHeapIndex:function(e,t){e.heapIndex=t},setH1:function(e,t){e.h1=t},setH2:function(e,t){e.h2=t},compareF1Score:function(e,t){return e.f1-t.f1},compareF2Score:function(e,t){return e.f2-t.f2}};var mu=gu.NO_PATH;function yu(e,t){var r=(t=t||{}).oriented,n=t.blocked;n||(n=gu.blocked);var i=t.heuristic;i||(i=gu.heuristic);var o=t.distance;o||(o=gu.distance);var a=function(){var e=0,t=[];return{createNewState:function(r){var n=t[e];return n?(n.node=r,n.parent=null,n.closed=!1,n.open=0,n.distanceToSource=Number.POSITIVE_INFINITY,n.fScore=Number.POSITIVE_INFINITY,n.heapIndex=-1):(n=new pu(r),t[e]=n),e++,n},reset:function(){e=0}}}();return{find:function(t,l){var s=e.getNode(t);if(!s)throw new Error("fromId is not defined in this graph: "+t);var u=e.getNode(l);if(!u)throw new Error("toId is not defined in this graph: "+l);a.reset();var c,h=new Map,f=new cu({compare:gu.compareFScore,setNodeId:gu.setHeapIndex}),p=a.createNewState(s);for(h.set(t,p),p.fScore=i(s,u),p.distanceToSource=0,f.push(p),p.open=1;f.length>0;){if(vu(c=f.pop(),u))return wu(c);c.closed=!0,e.forEachLinkedNode(c.node.id,d,r)}return mu;function d(e,t){var r=h.get(e.id);if(r||(r=a.createNewState(e),h.set(e.id,r)),!r.closed&&(0===r.open&&(f.push(r),r.open=1),!n(e,c.node,t))){var l=c.distanceToSource+o(e,c.node,t);l>=r.distanceToSource||(r.parent=c,r.distanceToSource=l,r.fScore=l+i(r.node,u),f.updateItem(r.heapIndex))}}}}}function vu(e,t){return e.node===t}function wu(e){for(var t=[e.node],r=e.parent;r;)t.push(r.node),r=r.parent;return t}function bu(e){!function(e){if(!e)throw new Error("Eventify cannot use falsy object as events subject");const t=["on","fire","off"];for(let r=0;r<t.length;++r)if(e.hasOwnProperty(t[r]))throw new Error("Subject cannot be eventified, since it already has property '"+t[r]+"'")}(e);const t=function(e){let t=Object.create(null);return{on:function(r,n,i){if("function"!=typeof n)throw new Error("callback is expected to be a function");let o=t[r];return o||(o=t[r]=[]),o.push({callback:n,ctx:i}),e},off:function(r,n){if(void 0===r)return t=Object.create(null),e;if(t[r]){if("function"!=typeof n)delete t[r];else{const e=t[r];for(let t=0;t<e.length;++t)e[t].callback===n&&e.splice(t,1)}}return e},fire:function(r){const n=t[r];if(!n)return e;let i;arguments.length>1&&(i=Array.prototype.slice.call(arguments,1));for(let e=0;e<n.length;++e){const t=n[e];t.callback.apply(t.ctx,i)}return e}}}(e);return e.on=t.on,e.off=t.off,e.fire=t.fire,e}function _u(e){if("uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId),void 0===e.multigraph&&(e.multigraph=!1),"function"!=typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t,r=new Map,n=new Map,i={},o=0,a=e.multigraph?function(e,t,r){var n=ju(e,t),o=i.hasOwnProperty(n);if(o||_(e,t)){o||(i[n]=0);var a="@"+ ++i[n];n=ju(e+a,t+a)}return new Pu(e,t,r,n)}:function(e,t,r){var i=ju(e,t),o=n.get(i);if(o)return o.data=r,o;return new Pu(e,t,r,i)},l=[],s=x,u=x,c=x,h=x,f={version:20,addNode:g,addLink:function(e,t,r){c();var i=m(e)||g(e),o=m(t)||g(t),l=a(e,t,r),u=n.has(l.id);n.set(l.id,l),Su(i,l),e!==t&&Su(o,l);return s(l,u?"update":"add"),h(),l},removeLink:function(e,t){void 0!==t&&(e=_(e,t));return b(e)},removeNode:y,getNode:m,getNodeCount:v,getLinkCount:w,getEdgeCount:w,getLinksCount:w,getNodesCount:v,getLinks:function(e){var t=m(e);return t?t.links:null},forEachNode:j,forEachLinkedNode:function(e,t,n){var i=m(e);if(i&&i.links&&"function"==typeof t)return n?function(e,t,n){var i=e.values(),o=i.next();for(;!o.done;){var a=o.value;if(a.fromId===t&&n(r.get(a.toId),a))return!0;o=i.next()}}(i.links,e,t):function(e,t,n){var i=e.values(),o=i.next();for(;!o.done;){var a=o.value,l=a.fromId===t?a.toId:a.fromId;if(n(r.get(l),a))return!0;o=i.next()}}(i.links,e,t)},forEachLink:function(e){if("function"==typeof e)for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}},beginUpdate:c,endUpdate:h,clear:function(){c(),j(function(e){y(e.id)}),h()},hasLink:_,hasNode:m,getLink:_,getLinkById:function(e){return void 0===e?void 0:n.get(e)}};return bu(f),t=f.on,f.on=function(){return f.beginUpdate=c=S,f.endUpdate=h=P,s=p,u=d,f.on=t,t.apply(f,arguments)},f;function p(e,t){l.push({link:e,changeType:t})}function d(e,t){l.push({node:e,changeType:t})}function g(e,t){if(void 0===e)throw new Error("Invalid node identifier");c();var n=m(e);return n?(n.data=t,u(n,"update")):(n=new xu(e,t),u(n,"add")),r.set(e,n),h(),n}function m(e){return r.get(e)}function y(e){var t=m(e);if(!t)return!1;c();var n=t.links;return n&&(n.forEach(b),t.links=null),r.delete(e),u(t,"remove"),h(),!0}function v(){return r.size}function w(){return n.size}function b(e){if(!e)return!1;if(!n.get(e.id))return!1;c(),n.delete(e.id);var t=m(e.fromId),r=m(e.toId);return t&&t.links.delete(e),r&&r.links.delete(e),s(e,"remove"),h(),!0}function _(e,t){if(void 0!==e&&void 0!==t)return n.get(ju(e,t))}function x(){}function S(){o+=1}function P(){0===(o-=1)&&l.length>0&&(f.fire("changed",l),l.length=0)}function j(e){if("function"!=typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var t=r.values(),n=t.next();!n.done;){if(e(n.value))return!0;n=t.next()}}}function xu(e,t){this.id=e,this.links=null,this.data=t}function Su(e,t){e.links?e.links.add(t):e.links=new Set([t])}function Pu(e,t,r,n){this.fromId=e,this.toId=t,this.data=r,this.id=n}function ju(e,t){return e.toString()+"👉 "+t.toString()}yu.l2=function(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.sqrt(r*r+n*n)},yu.l1=function(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.abs(r)+Math.abs(n)};var ku,Au,Eu,zu=function(){var e,t,r=!0,n=!0,i={edgeData:{},lines:[]};function o(e,t,r,n,i,o,a){void 0===a&&(a=!1);var l="".concat(t.toString(),",").concat(n),s=e.getNode(l);if(void 0===s){var u={mapObjectId:r,coords:t,where:n,what:i,zone:o,zoneUnionVertex:!1};s=e.addNode(l,u)}else a&&(s.data.mapObjectId=r,s.data.zone!==o&&(s.data.zoneUnionVertex=!0),s.data.zone=o);return s}function a(e,t,n,i){var o=i.cost,a=i.description,l=i.isPortal?o/1:o;(!r||r&&i.wheelChairAccesible)&&e.addLink(t.id,n.id,{weight:l,cost:o,description:a})}function l(e,t){return Y(U(e),U(t),{units:"meters"})}function s(e,t){var r=t;if(r){for(var n=o(e,r.coords,r.id,r.where,r.what,r.zone,!0),i=0;i<r.lines.length;i+=1)for(var s=r.lines[i],u=J(s),c=0;c<u.length-1;c+=1){var h=o(e,u[c],"vertex",r.where,ws.Edge,s.properties.zone),f=o(e,u[c+1],"vertex",r.where,ws.Edge,s.properties.zone);if(h.id!==f.id){var p=l(u[c],u[c+1]);s.properties.direction!==ys.Forward&&s.properties.direction!==ys.TwoWay||a(e,h,f,{wheelChairAccesible:s.properties.wheelchair,cost:p,isPortal:!1,description:null}),s.properties.direction!==ys.Backward&&s.properties.direction!==ys.TwoWay||a(e,f,h,{wheelChairAccesible:s.properties.wheelchair,cost:p,isPortal:!1,description:null})}}return n}}function u(e,t){var r=t;if(void 0!==r)return o(e,r.coords,r.id,r.where,r.what,r.zone,!0)}function c(e){return{type:"Feature",geometry:{type:"LineString",coordinates:[e.data.coords]},properties:{dimension_where:e.data.where,zone:e.data.zone,cost:0}}}function h(t,r,h,f){var p=_u(),d=s(p,t),g=s(p,r);if(d&&g){!function(e,t){for(var r in t){for(var n=t[r],i=0;i<n.links.length;i+=1){var o=n.links[i],l=o.cost;l=ms.toInteger(l);var c=o.direction,h=o.wheelchair,f=o.description,p=u(e,n),d=u(e,o);void 0!==p&&void 0!==d&&p.id!==d.id&&(c!==ys.Forward&&c!==ys.TwoWay||a(e,p,d,{wheelChairAccesible:h,cost:l,description:f,isPortal:!0}),c!==ys.Backward&&c!==ys.TwoWay||a(e,d,p,{wheelChairAccesible:h,cost:l,description:f,isPortal:!0}),s(e,o))}s(e,n)}}(p,h),function(e,t){for(var r=0;r<t.length;r+=1){var n=t[r];if("LineString"===n.geometry.type){var i=J(n);if(n.properties)for(var s=n.properties.dimension_where,u=ws.Network,c=n.properties.zone,h=0;h<i.length-1;h+=1){var f=o(e,i[h],"vertex",s,u,c,!0),p=o(e,i[h+1],"vertex",s,u,c,!0);if(f.id!==p.id){var d=l(i[h],i[h+1]);n.properties.direction!==ys.Forward&&n.properties.direction!==ys.TwoWay||a(e,f,p,{wheelChairAccesible:n.properties.wheelchair,cost:d,isPortal:!1,description:null}),n.properties.direction!==ys.Backward&&n.properties.direction!==ys.TwoWay||a(e,p,f,{wheelChairAccesible:n.properties.wheelchair,cost:d,isPortal:!1,description:null})}}}}}(p,f);var m=function(t,r,i){return yu(i,{oriented:!0,distance:function(e,t,r){return r.data.weight},blocked:function(t,r,i){if(n&&(null==t?void 0:t.data.zone)!==(null==r?void 0:r.data.zone)){var o=zs(t.data.where),a=zs(e.where),l=zs(r.data.where);if(o!==a&&l!==a)return!0}return!1}}).find(t.id,r.id).reverse()}(d,g,p),y=function(e,t,r,n){if(r.length<=1)return{};for(var o=e,a=t,l=[],s=r[0].data,u=[c(r[0])],h=1;h<r.length;h+=1){var f,p=r[h],d=r[h-1],g=u[u.length-1];if("vertex"!==p.data.mapObjectId||p.data.zoneUnionVertex){var m=void 0;if(uc(d.data.what)&&uc(p.data.what)){d.data.zone!==p.data.zone&&console.warn("A portal is triggering a change in zone");var y=void 0;if(lc(d.data.what)){var v=function(e,t,r,n){void 0===n&&(n=!1);var i=r.data.mapObjectId,o=Fs(e,(new Set).add(i));if(o&&o.edgeData[i])for(var a=o.edgeData[i],l=0;l<a.links.length;l+=1){var s=a.links[l];if(s.id===t.data.mapObjectId&&s.pathFeatures&&s.pathFeatures.length>0){var u=s.pathFeatures[0],c=!1===n?r.data.coords:t.data.coords,h=!1===n?t.data.coords:r.data.coords;return G(Y(c,u.geometry.coordinates[0])<Y(h,u.geometry.coordinates[0])?u.geometry.coordinates:u.geometry.coordinates.slice().reverse())}}return null};(y=v(i.edgeData,p,d,!1))||(y=v(i.edgeData,d,p,!0))}var w=(f=n.getLink(d.id,p.id))&&f.data.cost?f.data.cost:void 0,b=f&&f.data.description?f.data.description:void 0;m={geojson:W([d.data.coords,p.data.coords],{zone:p.data.zone}),edges:[d.data.mapObjectId,p.data.mapObjectId],startFloor:d.data.where,endFloor:p.data.where,isPortal:!0,portalPath:y,cost:w,description:b},l.push(m),s=p.data}else{var _=h+1<r.length?r[h+1]:void 0;p.data.zoneUnionVertex&&d&&_&&(null==d?void 0:d.data.zone)===(null==_?void 0:_.data.zone)?console.log("ignore zoneUnionVertex in segment"):(m={geojson:g,edges:[s.mapObjectId,p.data.mapObjectId],startFloor:s.where,endFloor:s.where,isPortal:!1,portalPath:void 0,cost:g.properties.cost},l.push(m),s=p.data)}}if(uc(d.data.what)&&uc(p.data.what))g.geometry.coordinates.length<2&&u.pop(),u.push(c(p));else w=(f=n.getLink(d.id,p.id))&&f.data.cost?f.data.cost:void 0,g.geometry.coordinates.push(p.data.coords),g.properties.cost+=w;if(p.data.zoneUnionVertex){var x=h>0?r[h-1]:void 0;if(_=h+1<r.length?r[h+1]:void 0,x&&_&&(null==x?void 0:x.data.zone)===(null==_?void 0:_.data.zone))console.log("ignore zoneUnionVertex");else if(_){var S=ms.cloneDeep(p);S.data.zone=_.data.zone,u.push(c(S))}else u.push(c(p))}}return{startNode:o,endNode:a,routes:l,distance:0}}(t,r,m,p);return y}return{}}function f(e,t,r){for(var n=new Set,o=0;r.routes&&o<r.routes.length;o+=1){var a=r.routes[o];a.isPortal&&(n.add(a.edges[0]),n.add(a.edges[1]))}var l=performance.now(),s=Ps(Ms),u=Fs(i.edgeData,n);console.log("time load: ",(performance.now()-l)/1e3),l=performance.now(),e.lines.concat(t.lines,u.lines);var c=s;return console.log("time network: ",(performance.now()-l)/1e3,s.length),h(e,t,u.edgeData,c)}return{getRoute:function(o,a,l){if(r=l,o===a)return{};var s=js(o),u=js(a);e=s,t=u;var c=performance.now();if(i=ks(),console.log("time portal load with extrapolation: ",(performance.now()-c)/1e3),c=performance.now(),e&&t){n=!0;var p=function(){var r=function(e,t){var r=performance.now(),n=Ps(zs(e.where)),o=Ps(zs(t.where)),a=Os(i.edgeData,zs(e.where)),l=Os(i.edgeData,zs(t.where));console.log("time load: ",(performance.now()-r)/1e3),r=performance.now(),e.lines.concat(t.lines,a.lines,l.lines);var s=n.concat(o);return console.log("time network: ",(performance.now()-r)/1e3,n.length),h(e,t,y(y({},a.edgeData),l.edgeData),s)}(e,t);if(console.log("Direct route",r),ms.isEmpty(r)){var n=function(e,t){var r=performance.now(),n=Ps(Ms);console.log("time load: ",(performance.now()-r)/1e3),r=performance.now(),e.lines.concat(t.lines,i.lines);var o=n;return console.log("time network: ",(performance.now()-r)/1e3,n.length),h(e,t,i.edgeData,o)}(e,t);return f(e,t,n)}return f(e,t,r)},d=p();return ms.isEmpty(d)&&(n=!1,d=p()),console.log("time total: ",(performance.now()-c)/1e3),d}return{}}}}(),Mu=6371008.8,Ou={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:Mu,metres:Mu,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function Fu(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function Lu(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ru(e[0])||!Ru(e[1]))throw new Error("coordinates must contain numbers");return Fu({type:"Point",coordinates:e},t,r)}function Cu(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Fu({type:"LineString",coordinates:e},t,r)}function Tu(e){return e%360*Math.PI/180}function Ru(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Bu(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Iu(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Nu(e,t,r){void 0===r&&(r={});var n=Bu(e),i=Bu(t),o=Tu(i[1]-n[1]),a=Tu(i[0]-n[0]),l=Tu(n[1]),s=Tu(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(l)*Math.cos(s);return function(e,t){void 0===t&&(t="kilometers");var r=Ou[t];if(!r)throw new Error(t+" units is invalid");return e*r}(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),r.units)}function Du(e,t){!function(e,t){var r,n,i,o,a,l,s,u,c,h,f=0,p="FeatureCollection"===e.type,d="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(l=p?e.features[r].geometry:d?e.geometry:e,u=p?e.features[r].properties:d?e.properties:{},c=p?e.features[r].bbox:d?e.bbox:void 0,h=p?e.features[r].id:d?e.id:void 0,a=(s=!!l&&"GeometryCollection"===l.type)?l.geometries.length:1,i=0;i<a;i++)if(null!==(o=s?l.geometries[i]:l))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,f,u,c,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,u,c,h))return!1;f++}}(e,function(e,r,n,i,o){var a,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Fu(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var s=0;s<e.coordinates.length;s++){var u=e.coordinates[s];if(!1===t(Fu({type:a,coordinates:u},n),r,s))return!1}})}function Uu(e,t,r){void 0===r&&(r={});var n=Lu([1/0,1/0],{dist:1/0}),i=0;return Du(e,function(e){for(var o=Iu(e),a=0;a<o.length-1;a++){var l=Lu(o[a]);l.properties.dist=Nu(t,l,r);var s=Lu(o[a+1]);s.properties.dist=Nu(t,s,r);var u=Nu(l,s,r),c=Math.max(l.properties.dist,s.properties.dist),h=Uo(l,s),f=Jo(t,c,h+90,r),p=Jo(t,c,h-90,r),d=Qa(Cu([f.geometry.coordinates,p.geometry.coordinates]),Cu([l.geometry.coordinates,s.geometry.coordinates])),g=null;d.features.length>0&&((g=d.features[0]).properties.dist=Nu(t,g,r),g.properties.location=i+Nu(l,g,r)),l.properties.dist<n.properties.dist&&((n=l).properties.index=a,n.properties.location=i),s.properties.dist<n.properties.dist&&((n=s).properties.index=a+1,n.properties.location=i+u),g&&g.properties.dist<n.properties.dist&&((n=g).properties.index=a),i+=u}}),n}function Gu(e,t,r){var n,i=Iu(r);if("LineString"!==("FeatureCollection"===(n=r).type?"FeatureCollection":"GeometryCollection"===n.type?"GeometryCollection":"Feature"===n.type&&null!==n.geometry?n.geometry.type:n.type))throw new Error("line must be a LineString");for(var o,a=Uu(r,e),l=Uu(r,t),s=[(o=a.properties.index<=l.properties.index?[a,l]:[l,a])[0].geometry.coordinates],u=o[0].properties.index+1;u<o[1].properties.index+1;u++)s.push(i[u]);return s.push(o[1].geometry.coordinates),Cu(s,r.properties)}function Wu(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function qu(e,t){!function(e,t){var r,n,i,o,a,l,s,u,c,h,f=0,p="FeatureCollection"===e.type,d="Feature"===e.type,g=p?e.features.length:1;for(r=0;r<g;r++){for(l=p?e.features[r].geometry:d?e.geometry:e,u=p?e.features[r].properties:d?e.properties:{},c=p?e.features[r].bbox:d?e.bbox:void 0,h=p?e.features[r].id:d?e.id:void 0,a=(s=!!l&&"GeometryCollection"===l.type)?l.geometries.length:1,i=0;i<a;i++)if(null!==(o=s?l.geometries[i]:l))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,f,u,c,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,u,c,h))return!1;f++}}(e,function(e,r,n,i,o){var a,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Wu(e,n,{bbox:i,id:o}),r,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var s=0;s<e.coordinates.length;s++){var u=e.coordinates[s];if(!1===t(Wu({type:a,coordinates:u},n),r,s))return!1}})}function Vu(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function $u(e){return"Feature"===e.type?e.geometry:e}function Ju(e,t){void 0===t&&(t={});var r=$u(e);switch(t.properties||"Feature"!==e.type||(t.properties=e.properties),r.type){case"Polygon":return function(e,t){void 0===t&&(t={});var r=$u(e),n=r.coordinates,i=t.properties?t.properties:"Feature"===e.type?e.properties:{};return Yu(n,i)}(r,t);case"MultiPolygon":return function(e,t){void 0===t&&(t={});var r=$u(e),n=r.coordinates,i=t.properties?t.properties:"Feature"===e.type?e.properties:{},o=[];return n.forEach(function(e){o.push(Yu(e,i))}),function(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}(o)}(r,t);default:throw new Error("invalid poly")}}function Yu(e,t){return e.length>1?function(e,t,r){return void 0===r&&(r={}),Vu({type:"MultiLineString",coordinates:e},t,r)}(e,t):function(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Vu({type:"LineString",coordinates:e},t,r)}(e[0],t)}function Xu(e,t){var r=!0;return qu(e,function(e){qu(t,function(t){if(!1===r)return!1;r=function(e,t){switch(e.type){case"Point":switch(t.type){case"Point":return r=e.coordinates,n=t.coordinates,!(r[0]===n[0]&&r[1]===n[1]);case"LineString":return!Hu(t,e);case"Polygon":return!xl(e,t)}break;case"LineString":switch(t.type){case"Point":return!Hu(e,t);case"LineString":return!function(e,t){if(Qa(e,t).features.length>0)return!0;return!1}(e,t);case"Polygon":return!Ku(t,e)}break;case"Polygon":switch(t.type){case"Point":return!xl(t,e);case"LineString":return!Ku(e,t);case"Polygon":return!function(e,t){for(var r=0,n=e.coordinates[0];r<n.length;r++){if(xl(n[r],t))return!0}for(var i=0,o=t.coordinates[0];i<o.length;i++){if(xl(o[i],e))return!0}var a=Qa(Ju(e),Ju(t));if(a.features.length>0)return!0;return!1}(t,e)}}var r,n;return!1}(e.geometry,t.geometry)})}),r}function Hu(e,t){for(var r=0;r<e.coordinates.length-1;r++)if(Zu(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}function Ku(e,t){for(var r=0,n=t.coordinates;r<n.length;r++){if(xl(n[r],e))return!0}return Qa(t,Ju(e)).features.length>0}function Zu(e,t,r){var n=r[0]-e[0],i=r[1]-e[1],o=t[0]-e[0],a=t[1]-e[1];return 0===n*a-i*o&&(Math.abs(o)>=Math.abs(a)?o>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:a>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1])}function Qu(e){var t=js(e.edges[0]),r=js(e.edges[1]);return{maneuverType:ku.Static,coordinates:[],distance:0,features:[],time:0,startEdge:{mapObjectId:e.edges[0],whereDimension:e.startFloor,whatDimension:t?t.what:"",name:t?t.name:""},endEdge:{mapObjectId:e.edges[1],whereDimension:e.endFloor,whatDimension:r?r.what:"",name:r?r.name:""},isPortal:e.isPortal,instructions:[],patchNumber:-1,whereDimension:"",zone:"",cost:e.cost,description:e.description}}function ec(e){return e.maneuverType===ku.RouteOverview||e.maneuverType===ku.SectionOverview}function tc(e,t){for(var r=0;r<e.length;r+=1){var n=e[r];n.properties.highlight=!!t}return e}function rc(e,t,r,n,i){if(void 0===i&&(i=""),0===e.length)return[];var o=[U(e,{segmentNumber:t,dimension_where:i,patchNumber:n,isNode:!0})];return tc(o,r),o}function nc(e,t,r,n,i,o){if(void 0===o&&(o=""),0===e.length)return[];var a={segmentNumber:t,dimension_where:o,patchNumber:n,isNode:!1,zone:i},l=G(e,y(y({},a),{featureBelongsToLineString:!0})),s=U(e[0],y(y({},a),{featureBelongsToLineString:!1})),u=U(e[e.length-1],y(y({},a),{featureBelongsToLineString:!1})),c=[];return c.push(s,l,u),tc(c,r),c}function ic(e,t){void 0===t&&(t=0);var r=ms.cloneDeep(e.segments[1]),n=e.segments.length>1?e.segments[1].startEdge.whereDimension:"";r.coordinates=[],r.features=[],r.time=0,r.distance=0,r.isPortal=!1,r.maneuverType=ku.RouteOverview,r.patchNumber=t,r.instructions=["Overview"];for(var i=1;i<e.segments.length;i+=1)if(e.segments[i].maneuverType!==ku.SectionOverview){for(var o=0;o<e.segments[i].coordinates.length;o+=1){var a=e.segments[i].coordinates[o];r.coordinates.push(a)}for(o=0;o<e.segments[i].features.length;o+=1){var l=ms.cloneDeep(e.segments[i].features[o]);l.properties&&!l.properties.isNode&&(l.properties.dimension_where!==n?l.properties.isNonHighlightedOverview="1":l.properties.isNonHighlightedOverview="0",l.properties.dimension_where=n,l.properties.patchNumber=r.patchNumber,l.properties.segmentNumber=r.patchNumber,r.features.push(l))}}return r.endEdge=ms.cloneDeep(e.segments[e.segments.length-1].endEdge),r.time=e.walkingTime+e.transportTime,r.distance=e.walkingDistance+e.transportDistance,r}function oc(e,t,r,n,i){return void 0===n&&(n=!0),void 0===i&&(i=0),v(this,void 0,void 0,function(){var o,a,l,s,u,c,h,f,p,d,g,m,v,b,_,x,S,P,j,k,A,E,z,M,O,F,L,C,T,R,B,I,N,D,U,W,q,V,Y,X,H,K,Z,Q,ee,te,re,ne,ie,oe,ae,le,se,ue,ce,he,fe,pe,de;return w(this,function(w){for(o=zu.getRoute(e,t,r),a=o.routes,l=[],u=0;a&&u<a.length;u+=1)if(c=a[u],h=c.geojson.properties.zone,c.isPortal)s=y(y({},Qu(c)),{maneuverType:ku.Static,coordinates:[c.geojson.geometry.coordinates[1]],zone:h,isPortal:!1}),U=y(y({},Qu(c)),{maneuverType:ku.EnterPortal,coordinates:[c.geojson.geometry.coordinates[0]]}),l.push(U),W=y(y({},Qu(c)),{maneuverType:ku.ExitPortal,coordinates:[c.geojson.geometry.coordinates[1]]}),l.push(W),(q=l.length>0?l[l.length-1]:void 0)&&q.maneuverType===ku.ExitPortal&&(l.pop(),c.portalPath&&(V=y(y({},Qu(c)),{maneuverType:ku.TravelPortal,coordinates:c.portalPath.geometry.coordinates,zone:h}),l.push(V)),l.push(W));else{if(f=c.geojson.geometry.coordinates,p=ku.Static,0===l.length&&(d=y(y({},Qu(c)),{maneuverType:ku.Static,coordinates:[f[0]]}),l.push(d)),u>0&&l.length>0&&(g=a[u-1],m=g.geojson.properties.zone,h!==m&&(v=g.geojson.geometry.coordinates,P=y(y({},Qu(g)),{maneuverType:ku.ChangeZone,zone:h,coordinates:[v[v.length-1]]}),l.push(P),p=ku.ChangeZone)),f.length>2)for(ee=0;ee<f.length-2;ee+=1)b=f[ee],_=f[ee+1],x=f[ee+2],s=y(y({},Qu(c)),{maneuverType:ku.Static,coordinates:[x],zone:h}),void 0,S=ku.ContinueStraight,P=y(y({},Qu(c)),{maneuverType:S,zone:h}),p===ku.ContinueStraight?(ee+3===f.length?l[l.length-1].coordinates.push(_,x):l[l.length-1].coordinates.push(_),l[l.length-1].maneuverType=S):(P.coordinates.push(b,_),l.push(P),ee+3===f.length&&(S===ku.ContinueStraight?l[l.length-1].coordinates.push(x):l.push(y(y({},Qu(c)),{maneuverType:ku.ContinueStraight,coordinates:[_,x],zone:h})))),p=S;else P=y(y({},Qu(c)),{maneuverType:ku.ContinueStraight,coordinates:f,zone:h}),l.push(P);if(j=function(){if(l.length>0){var e=l[l.length-1];e.maneuverType===ku.ChangeZone&&e.zone===vs.Transit&&l.pop()}},(q=l.length>0?l[l.length-1]:void 0)&&q.maneuverType===ku.ContinueStraight)for(k=As(q.startEdge.whereDimension),A=G(q.coordinates),ee=0;ee<k.length;ee+=1)E=k[ee],Xu(A,E)||((z=Qa(A,E)).features.length>1?(l.pop(),M=Gu(J(A)[0],$(z.features[0]),A),ol(M,{units:"meters"})>=10?(O=y(y({},Qu(c)),{maneuverType:ku.ContinueStraight,zone:h,coordinates:J(M)}),l.push(O)):l.length>0&&((q=l[l.length-1]).maneuverType===ku.ChangeZone?(F=J(M),q.coordinates=[F[F.length-1]],l.length>1&&((R=l[l.length-2]).coordinates=R.coordinates.concat(J(M)))):q.coordinates.concat(J(M))),L=Gu($(z.features[0]),$(z.features[1]),A),C=y(y({},Qu(c)),{maneuverType:ku.PassThroughImmigration,zone:h,coordinates:J(L)}),0===l.length&&(C.coordinates=M.geometry.coordinates.concat(C.coordinates)),j(),l.push(C),I=J(A),N=Gu($(z.features[1]),I[I.length-1],A),D=y(y({},Qu(c)),{maneuverType:ku.ContinueStraight,zone:h,coordinates:J(N)}),l.push(D)):z.features.length>0&&(xl(J(A)[0],E)?(l.pop(),L=Gu(J(A)[0],$(z.features[0]),A),C=y(y({},Qu(c)),{maneuverType:ku.PassThroughImmigration,zone:h,coordinates:J(L)}),(q=l.length>0?l[l.length-1]:void 0)&&q.maneuverType===ku.ChangeZone&&(T=l.pop(),l.length>1&&(R=l[l.length-1]).maneuverType===ku.PassThroughImmigration&&(l.pop(),T.coordinates=[R.coordinates[0]],l.push(T),C.coordinates=R.coordinates.concat(C.coordinates))),j(),l.push(C),I=J(A),N=Gu($(z.features[0]),I[I.length-1],A),D=y(y({},Qu(c)),{maneuverType:ku.ContinueStraight,zone:h,coordinates:J(N)}),l.push(D)):(B=Gu(J(A)[0],$(z.features[0]),A),q.coordinates=J(B),I=J(A),N=Gu($(z.features[0]),I[I.length-1],A),D=y(y({},Qu(c)),{maneuverType:ku.PassThroughImmigration,zone:h,coordinates:J(N)}),l.push(D))))}if(s&&l.push(s),(Y={segments:l,walkingDistance:0,transportDistance:0,walkingTime:0,transportTime:0,distanceUnit:_s,speed:1}).segments.length>0){for(H=0,(X=n)&&((K=ms.cloneDeep(Y.segments[0])).maneuverType=ku.RouteOverview,Y.segments.unshift(K),H=1),Z=i+H,Q=Y.segments.length>H?Y.segments[H].startEdge.whereDimension:"",ee=H;ee<Y.segments.length;ee+=1){if(te=!1,re=Y.segments[ee],ne=i+ee,re.isPortal){if(re.maneuverType===ku.EnterPortal){for(oe=rc(re.coordinates[0],ne,te,Z,re.startEdge.whereDimension),ae=[],le=0,se=oe;le<se.length;le++)ue=se[le],ae.push(ue);re.features=ae,re.patchNumber=Z,re.whereDimension=Q,(ce=Y.segments.length>=ee+2?Y.segments[ee+1]:void 0)&&ce.maneuverType!==ku.TravelPortal?(he=re.cost,re.time=he||0):re.time=0,re.distance=0}re.maneuverType===ku.TravelPortal&&(re.features=nc(re.coordinates,ne,te,Z,re.zone,re.startEdge.whereDimension),re.patchNumber=Z,re.whereDimension=Q,he=re.cost,re.time=he||0,fe=void 0,fe=re.coordinates.length>1?ol(G(re.coordinates),{units:Y.distanceUnit}):0,re.distance=fe,ee>0&&(Y.segments[ee-1].time=0)),re.maneuverType===ku.ExitPortal&&(Z+=1,Q=re.endEdge.whereDimension,Y.segments.splice(ee,1),ee-=1),(pe=Y.segments.length>=ee+2?Y.segments[ee+1]:void 0)&&pe.maneuverType===ku.TravelPortal&&(Z+=1)}else re.maneuverType===ku.Static||re.maneuverType===ku.ChangeZone?(re.features=rc(re.coordinates[0],ne,te,Z,re.endEdge.whereDimension),re.patchNumber=Z,re.whereDimension=Q):(re.features=nc(re.coordinates,ne,te,Z,re.zone,re.startEdge.whereDimension),re.patchNumber=Z,re.whereDimension=Q),ie=re.coordinates,fe=void 0,fe=ie.length>1?ol(G(ie),{units:Y.distanceUnit}):0,re.distance=fe,re.maneuverType!==ku.PassThroughImmigration?re.time=re.distance/Y.speed:re.time=0;re.maneuverType===ku.TravelPortal?(Y.transportDistance+=re.distance,Y.transportTime+=re.time):(Y.walkingDistance+=re.distance,Y.walkingTime+=re.time)}X&&(de=ic(Y,i),Y.segments[0]=de)}return[2,Y]})})}function ac(e,t,r){for(var n,i=[],o=0;o<e.segments.length;o+=1){var a=e.segments[o];if(r.includeOverviewFeatures){if(ec(a)){for(var l=[],s=[],u=0;u<a.features.length;u++){var c=a.features[u];void 0!==(null===(n=c.properties)||void 0===n?void 0:n.patchNumber)&&c.properties.patchNumber===r.patchNumberForOverviewFeatures&&void 0!==c.properties.isNonHighlightedOverview&&("1"===c.properties.isNonHighlightedOverview?l.push(c):s.push(c))}var h=l.concat(s);i=i.concat(h)}}else a.patchNumber===t&&(ec(a)||(i=i.concat(a.features)))}return i}function lc(e){return!!Object.values(Au).includes(e)}function sc(e){return!!Object.values(Eu).includes(e)}function uc(e){return!(!lc(e)&&!sc(e))}function cc(e){switch(e){case"what.transport.skytrain":return"Skytrain";case"what.service.airport_transfer":return"Bus";case"what.infra.escalator":return"Escalator";case"what.infra.lift":return"Lift";case"what.infra.entrance":case"what.infra.exit":return"";default:return e}}function hc(e,t){var r,n=function(e){var t=e.split(".").slice(-2).join("").toUpperCase().match(/^(T\d+|JEWEL)([A-Za-z]\d+[A-Za-z]?)$/);if(t){var r=void 0;switch(t[1][0]){case"T":r="Terminal";break;case"J":r="Jewel";break;default:r="Level"}var n="Terminal"===r?"".concat(r," ").concat(t[1][1]):"".concat(r),i=void 0;switch(t[2][0]){case"L":default:i="Level";break;case"B":i="Basement"}return{Terminal:n,Level:"".concat(i," ").concat(t[2].substring(1))}}return null}(t);if(n){if((r=e)===Au.Skytrain||r===Au.Bus)return n.Terminal;if(e===Au.Escalator||e===Au.Lift)return n.Level;if(sc(e))return n.Terminal}return t.split(".").slice(-2).join(" ").toUpperCase()}!function(e){e.RouteOverview="Route Overview",e.SectionOverview="Section Overview",e.LeftHairPinTurn="Left hairpin turn",e.RightHairPinTurn="Right hairpin turn",e.LeftTurn="Turn left",e.RightTurn="Turn right",e.ContinueStraight="Continue straight",e.EnterPortal="Enter Portal",e.TravelPortal="Travel Portal",e.ExitPortal="Exit Portal",e.Static="Static",e.ChangeZone="Change Zone",e.PassThroughImmigration="Pass Through Immigration"}(ku||(ku={})),function(e){e.Skytrain="what.transport.skytrain",e.Bus="what.service.airport_transfer",e.Escalator="what.infra.escalator",e.Lift="what.infra.lift"}(Au||(Au={})),function(e){e.Entrance="what.infra.entrance",e.Exit="what.infra.exit"}(Eu||(Eu={}));var fc=["match",["get","isNonHighlightedOverview"],"1","#A7A6BA","0",["match",["get","zone"],"transit","#4F7EF8","public","#CF9FFF","#CF9FFF"],["match",["get","zone"],"transit","#4F7EF8","public","#CF9FFF","#CF9FFF"]],pc=[{id:"route-line-outline-inactive",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!1]],paint:{"line-color":"#FFFFFF","line-gap-width":6},layout:{"line-cap":"round","line-join":"round"}},{id:"route-line-inactive",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!1]],style:{lineCap:"round",lineJoin:"round",lineColor:fc,lineWidth:5},paint:{"line-color":fc,"line-width":5},layout:{"line-cap":"round","line-join":"round"},belowLayerID:"route-line-animate"},{id:"route-line-active",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!0]],style:{lineCap:"round",lineJoin:"round",lineColor:fc,lineWidth:6},paint:{"line-color":fc,"line-width":6},layout:{"line-cap":"round","line-join":"round"},belowLayerID:"route-line-animate"},{id:"route-line-outline-active",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!0]],style:{lineCap:"round",lineJoin:"round",lineColor:"#FFFFFF",lineGapWidth:6},paint:{"line-color":"#FFFFFF","line-gap-width":6},layout:{"line-cap":"round","line-join":"round"}},{id:"route-line-endpoint-active",type:"circle",filter:["all",["==",["geometry-type"],"Point"],["==",["get","highlight"],!0],["==",["get","isNode"],!0]],style:{circleRadius:2,circleOpacity:0,circleStrokeWidth:2,circleStrokeColor:"#FFFFFF",circleStrokeOpacity:.7},paint:{"circle-radius":2,"circle-opacity":0,"circle-stroke-width":2,"circle-stroke-color":"#FFFFFF","circle-stroke-opacity":.7}},{id:"route-line-endpoint-fill-active",type:"circle",filter:["all",["==",["geometry-type"],"Point"],["==",["get","highlight"],!0],["==",["get","isNode"],!0]],style:{circleRadius:2,circleColor:"#FFFFFF",circleOpacity:.7},paint:{"circle-color":"#FFFFFF","circle-radius":2,"circle-opacity":.7}}],dc=[{id:"route-line-animate",type:"line",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","highlight"],!0]],style:{lineCap:"round",lineJoin:"round",lineColor:"#FFFFFF",lineOpacity:.7,lineWidth:4},paint:{"line-color":"#FFFFFF","line-width":4,"line-opacity":.7},layout:{"line-cap":"round","line-join":"round"},isAnimationLayer:!0}];var gc=function(){function e(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: (".concat(e,", ").concat(t,")"));if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}return e.prototype.wrap=function(){return new e(function(e,t,r){var n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}(this.lng,-180,180),this.lat)},e.prototype.toArray=function(){return[this.lng,this.lat]},e.prototype.toString=function(){return"LngLat(".concat(this.lng,", ").concat(this.lat,")")},e.prototype.distanceTo=function(e){var t=Math.PI/180,r=this.lat*t,n=e.lat*t,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return 6371008.8*Math.acos(Math.min(i,1))},e.convert=function(t){if(t instanceof e)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new e(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"===T(t)&&null!==t)return new e(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")},e}(),mc=function(){function e(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}return e.prototype.setNorthEast=function(e){return this._ne=e instanceof gc?new gc(e.lng,e.lat):gc.convert(e),this},e.prototype.setSouthWest=function(e){return this._sw=e instanceof gc?new gc(e.lng,e.lat):gc.convert(e),this},e.prototype.extend=function(t){var r,n,i=this._sw,o=this._ne;if(t instanceof gc)r=t,n=t;else{if(!(t instanceof e)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(e.convert(a))}var l=t;return this.extend(gc.convert(l))}return t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(gc.convert(t)):this}if(r=t._sw,n=t._ne,!r||!n)return this}return i||o?(i.lng=Math.min(r.lng,i.lng),i.lat=Math.min(r.lat,i.lat),o.lng=Math.max(n.lng,o.lng),o.lat=Math.max(n.lat,o.lat)):(this._sw=new gc(r.lng,r.lat),this._ne=new gc(n.lng,n.lat)),this},e.prototype.getCenter=function(){return new gc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},e.prototype.getSouthWest=function(){return this._sw},e.prototype.getNorthEast=function(){return this._ne},e.prototype.getNorthWest=function(){return new gc(this.getWest(),this.getNorth())},e.prototype.getSouthEast=function(){return new gc(this.getEast(),this.getSouth())},e.prototype.getWest=function(){return this._sw.lng},e.prototype.getSouth=function(){return this._sw.lat},e.prototype.getEast=function(){return this._ne.lng},e.prototype.getNorth=function(){return this._ne.lat},e.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},e.prototype.toString=function(){return"LngLatBounds(".concat(this._sw.toString(),", ").concat(this._ne.toString(),")")},e.prototype.isEmpty=function(){return!(this._sw&&this._ne)},e.prototype.contains=function(e){var t=gc.convert(e),r=t.lng,n=t.lat,i=this._sw.lat<=n&&n<=this._ne.lat,o=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(o=this._sw.lng>=r&&r>=this._ne.lng),i&&o},e.convert=function(t){return t instanceof e?t:t?new e(t):t},e.fromLngLat=function(t,r){void 0===r&&(r=0);var n=360*r/40075017,i=n/Math.cos(Math.PI/180*t.lat);return new e(new gc(t.lng-i,t.lat-n),new gc(t.lng+i,t.lat+n))},e}(),yc={type:"FeatureCollection",features:[{geometry:{coordinates:[[[103.9887700096493,1.362197288740075],[103.98372695828216,1.350203640412193],[103.984442,1.3499],[103.984522,1.349519],[103.984595,1.349021],[103.984565,1.348824],[103.984299,1.348207],[103.984136,1.347977],[103.983544,1.347659],[103.983441,1.347551],[103.983406,1.347433],[103.983438,1.347319],[103.98353,1.347197],[103.983795,1.347079],[103.983766,1.346924],[103.983353,1.346048],[103.983243,1.345936],[103.982807,1.34491],[103.98248,1.344461],[103.981917,1.344321],[103.981657,1.343706],[103.981226,1.343634],[103.97963,1.344317],[103.979559,1.344288],[103.979305,1.343685],[103.979333,1.343613],[103.980066,1.3433],[103.980216,1.343181],[103.980255,1.343074],[103.980445,1.342997],[103.980612,1.34296],[103.980632,1.343008],[103.981048,1.342832],[103.981052,1.342818],[103.981227,1.342745],[103.981024,1.342263],[103.981054,1.342188],[103.981315,1.342076],[103.981218,1.341848],[103.981229,1.341501],[103.981132,1.341272],[103.981005,1.341209],[103.981055,1.341086],[103.980457,1.339669],[103.980355,1.339515],[103.980135,1.338995],[103.979095,1.338198],[103.978279,1.33808],[103.975271,1.339366],[103.975204,1.340095],[103.974918,1.340087],[103.974943,1.339506],[103.972207,1.340676],[103.971501,1.341176],[103.971142,1.341811],[103.972739,1.345616],[103.973197,1.345431],[103.973555,1.346306],[103.973211,1.346453],[103.973054,1.346829],[103.974724,1.350763],[103.975653,1.350486],[103.980587,1.362174],[103.98131,1.363104],[103.981335,1.363107],[103.982564,1.366051],[103.982293,1.366167],[103.982119,1.365756],[103.98133,1.366093],[103.982618,1.369145],[103.98282,1.369273],[103.982831,1.369696],[103.98365,1.371667],[103.983928,1.371539],[103.984111,1.37199],[103.984496,1.371861],[103.985404,1.373591],[103.985121,1.374019],[103.985113,1.374014],[103.982647,1.371321],[103.982496,1.372373],[103.98168,1.372263],[103.981716,1.372072],[103.980021,1.371786],[103.979887,1.372243],[103.980729,1.37247],[103.980692,1.372603],[103.981091,1.372691],[103.981034,1.372998],[103.981337,1.372997],[103.981415,1.373516],[103.981322,1.373544],[103.981172,1.373714],[103.980969,1.373801],[103.980852,1.373993],[103.980606,1.374239],[103.97928,1.374501],[103.981086,1.37878],[103.982853,1.378401],[103.982635,1.378257],[103.982474,1.378058],[103.982393,1.377849],[103.982097,1.377612],[103.981862,1.376523],[103.985786,1.375761],[103.986733,1.376127],[103.987115,1.376646],[103.987447,1.377519],[103.987659,1.378416],[103.987955,1.379165],[103.988196,1.380074],[103.988279,1.380704],[103.989644,1.384016],[103.991056,1.387452],[103.991115,1.387492],[103.991621,1.387271],[103.991907,1.387951],[103.993194,1.387398],[103.993351,1.387769],[103.993603,1.387683],[103.99394,1.388483],[103.995052,1.388468],[103.995287,1.388368],[103.995056,1.387822],[103.995064,1.387801],[103.996031,1.38852],[103.996133,1.388744],[103.997576,1.388221],[103.998461,1.388714],[103.999043,1.387917],[103.999938,1.386438],[104.000151,1.386113],[104.000588,1.385316],[104.000768,1.38415],[104.000444,1.382669],[103.999984,1.38182],[103.999957,1.381676],[103.99978,1.3813],[103.999989,1.38094],[103.999901,1.378161],[104.000575,1.377859],[104.00064,1.373982],[104.001258,1.373986],[104.00125,1.372264],[104.000731,1.372053],[104.000573,1.371818],[104.000571,1.371054],[104.000705,1.370845],[104.001129,1.370664],[104.001219,1.370704],[104.006418,1.368481],[104.006488,1.368648],[104.015097,1.364966],[104.015027,1.3648],[104.019352,1.36295],[104.017473,1.358499],[104.017508,1.358413],[104.018449,1.358011],[104.004397,1.324724],[104.00394,1.324916],[104.00425,1.32565],[104.004093,1.325724],[104.00417,1.325903],[104.004083,1.326121],[104.004174,1.32613],[104.004166,1.326149],[104.004173,1.326152],[104.004163,1.326177],[104.004154,1.326173],[104.004072,1.326164],[104.004122,1.326278],[104.003918,1.326365],[104.000334,1.317873],[103.999845,1.317087],[103.998308,1.313445],[103.993946,1.31531],[103.993768,1.315219],[103.99308,1.315514],[103.996385,1.323344],[103.996638,1.323447],[104.006107,1.345878],[104.006018,1.346102],[104.005537,1.346307],[104.005938,1.347258],[104.005852,1.347472],[103.997773,1.350929],[103.997657,1.350891],[103.997481,1.350593],[103.997142,1.350738],[103.997042,1.350698],[103.996503,1.349419],[103.996637,1.349084],[103.996896,1.348973],[103.996911,1.348937],[103.996038,1.346869],[103.995996,1.346857],[103.995743,1.346965],[103.99541,1.34683],[103.994841,1.345481],[103.995596,1.345158],[103.99563,1.34516],[103.995702,1.345189],[103.995789,1.345396],[103.996936,1.344905],[103.996533,1.343951],[103.995387,1.344445],[103.995511,1.344736],[103.995481,1.344808],[103.995464,1.344827],[103.994861,1.345089],[103.994637,1.344998],[103.988369,1.330147],[103.988347,1.329713],[103.98857,1.328474],[103.987978,1.327071],[103.987955,1.326785],[103.987164,1.324911],[103.987081,1.324946],[103.98561,1.321461],[103.986331,1.321152],[103.985866,1.320051],[103.985468,1.320222],[103.985421,1.320111],[103.985409,1.320116],[103.985405,1.320108],[103.985358,1.320128],[103.985296,1.319981],[103.985334,1.319965],[103.985348,1.319944],[103.98515,1.319072],[103.980111,1.321228],[103.978578,1.322455],[103.983567,1.33428],[103.983476,1.335036],[103.983474,1.335069],[103.983009,1.335268],[103.98354933284033,1.3364946996522131],[103.98231231703316,1.3370245683484567],[103.98342436604707,1.3396729339712583],[103.98417983421598,1.3393514014339156],[103.9844931502899,1.3400841720206023],[103.98503039557389,1.3398560432442772],[103.98580504242307,1.3417286171903666],[103.9835684958817,1.3426734121936035],[103.983583,1.342772],[103.983691,1.343028],[103.983891,1.343501],[103.983783,1.343856],[103.984129,1.343961],[103.984026,1.344257],[103.983817,1.344347],[103.98423,1.345329],[103.98415,1.345913],[103.98415,1.345913],[103.98451944524408,1.346791860811539],[103.98493495319761,1.3466099688724271],[103.98503012886492,1.3465959003602783],[103.98510582249939,1.3466114463854497],[103.985247,1.346683],[103.985504,1.347296],[103.986192,1.347001],[103.9870399702827,1.3489902225591661],[103.99210440121716,1.3609279279595752],[103.9887700096493,1.362197288740075]]],type:"Polygon"},type:"Feature",properties:{}}]},vc={},wc={},bc={};Object.defineProperty(bc,"__esModule",{value:!0}),bc.bytesToString=bc.stringToBytes=bc.NIL=bc.X500=bc.OID=bc.URL=bc.DNS=bc.hexToByte=bc.byteToHex=void 0;let _c=[],xc={};for(var Sc=0;Sc<256;Sc++)_c[Sc]=(Sc+256).toString(16).substr(1),xc[_c[Sc]]=Sc;bc.byteToHex=_c,bc.hexToByte=xc,bc.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",bc.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",bc.OID="6ba7b812-9dad-11d1-80b4-00c04fd430c8",bc.X500="6ba7b814-9dad-11d1-80b4-00c04fd430c8",bc.NIL="00000000-0000-0000-0000-000000000000";bc.stringToBytes=e=>{e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t};bc.bytesToString=e=>{const t=new Uint8Array(e,0,e.byteLength);return String.fromCharCode.apply(null,Array.from(t))},Object.defineProperty(wc,"__esModule",{value:!0}),wc.parse=void 0;const Pc=bc;wc.parse=(e,t,r)=>{let n=t&&r||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,e=>(i<16&&t&&(t[n+i++]=Pc.hexToByte[e]),""));i<16;)t[n+i++]=0;return t};var jc={};Object.defineProperty(jc,"__esModule",{value:!0}),jc.unparse=void 0;const kc=bc;jc.unparse=(e,t)=>{let r=t||0,n=kc.byteToHex;return n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]};var Ac={},Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;var zc=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.validate=void 0;const Mc=zc(Ec);Ac.validate=e=>"string"==typeof e&&Mc.default.test(e);var Oc={};Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.version=void 0;const Fc=Ac;Oc.version=e=>{if(!(0,Fc.validate)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)};var Lc={},Cc={};Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.stringify=void 0;const Tc=Ac,Rc=[];for(let e=0;e<256;++e)Rc.push((e+256).toString(16).substr(1));Cc.stringify=(e,t=0)=>{const r=(Rc[e[t+0]]+Rc[e[t+1]]+Rc[e[t+2]]+Rc[e[t+3]]+"-"+Rc[e[t+4]]+Rc[e[t+5]]+"-"+Rc[e[t+6]]+Rc[e[t+7]]+"-"+Rc[e[t+8]]+Rc[e[t+9]]+"-"+Rc[e[t+10]]+Rc[e[t+11]]+Rc[e[t+12]]+Rc[e[t+13]]+Rc[e[t+14]]+Rc[e[t+15]]).toLowerCase();if(!(0,Tc.validate)(r))throw TypeError("Stringified UUID is invalid");return r};var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.rng=void 0;Bc.rng=()=>{let e=new Uint8Array(16);for(let t=0;t<16;t++)e[t]=255&256*Math.random()+0;return e},Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.v1=void 0;const Ic=Cc,Nc=Bc;let Dc,Uc,Gc=0,Wc=0;Lc.v1=(e,t,r=0)=>{let n=t&&r||0;const i=t||new Uint8Array(16);let o=e&&e.node?e.node:Dc,a=e&&e.clockseq?e.clockseq:Uc;if(null==o||null==a){const t=e&&e.random?e.random:e&&e.rng?e.rng():(0,Nc.rng)();null==o&&(o=Dc=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==a&&(a=Uc=16383&(t[6]<<8|t[7]))}let l=e&&e.msecs?e.msecs:Date.now(),s=e&&e.nsecs?e.nsecs:Wc+1;const u=l-Gc+(s-Wc)/1e4;if(u<0&&e&&!e.clockseq&&(a=a+1&16383),(u<0||l>Gc)&&e&&!e.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Gc=l,Wc=s,Uc=a,l+=122192928e5;const c=(1e4*(268435455&l)+s)%4294967296;i[n++]=c>>>24&255,i[n++]=c>>>16&255,i[n++]=c>>>8&255,i[n++]=255&c;const h=l/4294967296*1e4&268435455;i[n++]=h>>>8&255,i[n++]=255&h,i[n++]=h>>>24&15|16,i[n++]=h>>>16&255,i[n++]=a>>>8|128,i[n++]=255&a;for(let e=0;e<6;++e)i[n+e]=o[e];return t||(0,Ic.stringify)(i)};var qc={},Vc={};Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.v35=void 0;const $c=Cc,Jc=wc,Yc=bc;Vc.v35=(e,t,r)=>(e,n,i,o=0)=>{if("string"==typeof e&&(e=(0,Yc.stringToBytes)(e)),"string"==typeof n&&(n=(0,Jc.parse)(n)),n&&16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(n),a.set(e,n.length),a=(0,Yc.stringToBytes)(r((0,Yc.bytesToString)(a.buffer))),a[6]=15&a[6]|t,a[8]=63&a[8]|128,i)for(let e=0;e<16;++e)i[o+e]=a[e];return i||(0,$c.stringify)(a)};var Xc={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.any_hmac_md5=e.b64_hmac_md5=e.hex_hmac_md5=e.any_md5=e.b64_md5=e.hex_md5=void 0;let t=0,r="";e.hex_md5=e=>o(n(s(e))),e.default=e.hex_md5;e.b64_md5=e=>a(n(s(e)));e.any_md5=(e,t)=>l(n(s(e)),t);e.hex_hmac_md5=(e,t)=>o(i(s(e),s(t)));e.b64_hmac_md5=(e,t)=>a(i(s(e),s(t)));e.any_hmac_md5=(e,t,r)=>l(i(s(e),s(t)),r);const n=e=>c(h(u(e),8*e.length)),i=(e,t)=>{var r=u(e);r.length>16&&(r=h(r,8*e.length));let n=Array(16),i=Array(16);for(var o=0;o<16;o++)n[o]=909522486^r[o],i[o]=1549556828^r[o];var a=h(n.concat(u(t)),512+8*t.length);return c(h(i.concat(a),640))},o=e=>{for(var r,n=t?"0123456789ABCDEF":"0123456789abcdef",i="",o=0;o<e.length;o++)r=e.charCodeAt(o),i+=n.charAt(r>>>4&15)+n.charAt(15&r);return i},a=e=>{for(var t="",n=e.length,i=0;i<n;i+=3)for(var o=e.charCodeAt(i)<<16|(i+1<n?e.charCodeAt(i+1)<<8:0)|(i+2<n?e.charCodeAt(i+2):0),a=0;a<4;a++)8*i+6*a>8*e.length?t+=r:t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>>6*(3-a)&63);return t},l=(e,t)=>{var r,n,i,o,a,l=t.length,s=Array(Math.ceil(e.length/2));for(r=0;r<s.length;r++)s[r]=e.charCodeAt(2*r)<<8|e.charCodeAt(2*r+1);var u=Math.ceil(8*e.length/(Math.log(t.length)/Math.log(2))),c=Array(u);for(n=0;n<u;n++){for(a=[],o=0,r=0;r<s.length;r++)o=(o<<16)+s[r],o-=(i=Math.floor(o/l))*l,(a.length>0||i>0)&&(a[a.length]=i);c[n]=o,s=a}var h="";for(r=c.length-1;r>=0;r--)h+=t.charAt(c[r]);return h},s=e=>{for(var t,r,n="",i=-1;++i<e.length;)t=e.charCodeAt(i),r=i+1<e.length?e.charCodeAt(i+1):0,t>=55296&&t<=56319&&r>=56320&&r<=57343&&(t=65536+((1023&t)<<10)+(1023&r),i++),t<=127?n+=String.fromCharCode(t):t<=2047?n+=String.fromCharCode(192|t>>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n},u=e=>{let t=Array(e.length>>2);for(var r=0;r<t.length;r++)t[r]=0;for(r=0;r<8*e.length;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<r%32;return t},c=e=>{for(var t="",r=0;r<32*e.length;r+=8)t+=String.fromCharCode(e[r>>5]>>>r%32&255);return t},h=(e,t)=>{e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,a=0;a<e.length;a+=16){var l=r,s=n,u=i,c=o;r=p(r,n,i,o,e[a+0],7,-680876936),o=p(o,r,n,i,e[a+1],12,-389564586),i=p(i,o,r,n,e[a+2],17,606105819),n=p(n,i,o,r,e[a+3],22,-1044525330),r=p(r,n,i,o,e[a+4],7,-176418897),o=p(o,r,n,i,e[a+5],12,1200080426),i=p(i,o,r,n,e[a+6],17,-1473231341),n=p(n,i,o,r,e[a+7],22,-45705983),r=p(r,n,i,o,e[a+8],7,1770035416),o=p(o,r,n,i,e[a+9],12,-1958414417),i=p(i,o,r,n,e[a+10],17,-42063),n=p(n,i,o,r,e[a+11],22,-1990404162),r=p(r,n,i,o,e[a+12],7,1804603682),o=p(o,r,n,i,e[a+13],12,-40341101),i=p(i,o,r,n,e[a+14],17,-1502002290),n=p(n,i,o,r,e[a+15],22,1236535329),r=d(r,n,i,o,e[a+1],5,-165796510),o=d(o,r,n,i,e[a+6],9,-1069501632),i=d(i,o,r,n,e[a+11],14,643717713),n=d(n,i,o,r,e[a+0],20,-373897302),r=d(r,n,i,o,e[a+5],5,-701558691),o=d(o,r,n,i,e[a+10],9,38016083),i=d(i,o,r,n,e[a+15],14,-660478335),n=d(n,i,o,r,e[a+4],20,-405537848),r=d(r,n,i,o,e[a+9],5,568446438),o=d(o,r,n,i,e[a+14],9,-1019803690),i=d(i,o,r,n,e[a+3],14,-187363961),n=d(n,i,o,r,e[a+8],20,1163531501),r=d(r,n,i,o,e[a+13],5,-1444681467),o=d(o,r,n,i,e[a+2],9,-51403784),i=d(i,o,r,n,e[a+7],14,1735328473),n=d(n,i,o,r,e[a+12],20,-1926607734),r=g(r,n,i,o,e[a+5],4,-378558),o=g(o,r,n,i,e[a+8],11,-2022574463),i=g(i,o,r,n,e[a+11],16,1839030562),n=g(n,i,o,r,e[a+14],23,-35309556),r=g(r,n,i,o,e[a+1],4,-1530992060),o=g(o,r,n,i,e[a+4],11,1272893353),i=g(i,o,r,n,e[a+7],16,-155497632),n=g(n,i,o,r,e[a+10],23,-1094730640),r=g(r,n,i,o,e[a+13],4,681279174),o=g(o,r,n,i,e[a+0],11,-358537222),i=g(i,o,r,n,e[a+3],16,-722521979),n=g(n,i,o,r,e[a+6],23,76029189),r=g(r,n,i,o,e[a+9],4,-640364487),o=g(o,r,n,i,e[a+12],11,-421815835),i=g(i,o,r,n,e[a+15],16,530742520),n=g(n,i,o,r,e[a+2],23,-995338651),r=m(r,n,i,o,e[a+0],6,-198630844),o=m(o,r,n,i,e[a+7],10,1126891415),i=m(i,o,r,n,e[a+14],15,-1416354905),n=m(n,i,o,r,e[a+5],21,-57434055),r=m(r,n,i,o,e[a+12],6,1700485571),o=m(o,r,n,i,e[a+3],10,-1894986606),i=m(i,o,r,n,e[a+10],15,-1051523),n=m(n,i,o,r,e[a+1],21,-2054922799),r=m(r,n,i,o,e[a+8],6,1873313359),o=m(o,r,n,i,e[a+15],10,-30611744),i=m(i,o,r,n,e[a+6],15,-1560198380),n=m(n,i,o,r,e[a+13],21,1309151649),r=m(r,n,i,o,e[a+4],6,-145523070),o=m(o,r,n,i,e[a+11],10,-1120210379),i=m(i,o,r,n,e[a+2],15,718787259),n=m(n,i,o,r,e[a+9],21,-343485551),r=y(r,l),n=y(n,s),i=y(i,u),o=y(o,c)}return[r,n,i,o]},f=(e,t,r,n,i,o)=>y(v(y(y(t,e),y(n,o)),i),r),p=(e,t,r,n,i,o,a)=>f(t&r|~t&n,e,t,i,o,a),d=(e,t,r,n,i,o,a)=>f(t&n|r&~n,e,t,i,o,a),g=(e,t,r,n,i,o,a)=>f(t^r^n,e,t,i,o,a),m=(e,t,r,n,i,o,a)=>f(r^(t|~n),e,t,i,o,a),y=(e,t)=>{var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r},v=(e,t)=>e<<t|e>>>32-t}(Xc);var Hc=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qc,"__esModule",{value:!0}),qc.v3=void 0;const Kc=Vc,Zc=Hc(Xc);qc.v3=(0,Kc.v35)("v3",48,Zc.default);var Qc={};Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.v4=void 0;const eh=jc,th=Bc;Qc.v4=function(e,t,r){let n=t&&r||0,i=(0,th.rng)();if(!e||e instanceof String||(e.random&&(i=e.random),e.rng&&(i=e.rng())),i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;o++)t[n+o]=i[o];return t||(0,eh.unparse)(i)};var rh={},nh={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.any_hmac_sha1=e.b64_hmac_sha1=e.hex_hmac_sha1=e.any_sha1=e.b64_sha1=e.hex_sha1=void 0;let t=0,r="";e.hex_sha1=e=>o(n(s(e))),e.default=e.hex_sha1;e.b64_sha1=e=>a(n(s(e)));e.any_sha1=(e,t)=>l(n(s(e)),t);e.hex_hmac_sha1=(e,t)=>o(i(s(e),s(t)));e.b64_hmac_sha1=(e,t)=>a(i(s(e),s(t)));e.any_hmac_sha1=(e,t,r)=>l(i(s(e),s(t)),r);const n=e=>c(h(u(e),8*e.length)),i=(e,t)=>{let r=u(e);r.length>16&&(r=h(r,8*e.length));let n=Array(16),i=Array(16);for(var o=0;o<16;o++)n[o]=909522486^r[o],i[o]=1549556828^r[o];var a=h(n.concat(u(t)),512+8*t.length);return c(h(i.concat(a),672))},o=e=>{for(var r,n=t?"0123456789ABCDEF":"0123456789abcdef",i="",o=0;o<e.length;o++)r=e.charCodeAt(o),i+=n.charAt(r>>>4&15)+n.charAt(15&r);return i},a=e=>{for(var t="",n=e.length,i=0;i<n;i+=3)for(var o=e.charCodeAt(i)<<16|(i+1<n?e.charCodeAt(i+1)<<8:0)|(i+2<n?e.charCodeAt(i+2):0),a=0;a<4;a++)8*i+6*a>8*e.length?t+=r:t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>>6*(3-a)&63);return t},l=(e,t)=>{var r,n,i,o,a=t.length,l=[],s=Array(Math.ceil(e.length/2));for(r=0;r<s.length;r++)s[r]=e.charCodeAt(2*r)<<8|e.charCodeAt(2*r+1);for(;s.length>0;){for(o=[],i=0,r=0;r<s.length;r++)i=(i<<16)+s[r],i-=(n=Math.floor(i/a))*a,(o.length>0||n>0)&&(o[o.length]=n);l[l.length]=i,s=o}var u="";for(r=l.length-1;r>=0;r--)u+=t.charAt(l[r]);var c=Math.ceil(8*e.length/(Math.log(t.length)/Math.log(2)));for(r=u.length;r<c;r++)u=t[0]+u;return u},s=e=>{for(var t,r,n="",i=-1;++i<e.length;)t=e.charCodeAt(i),r=i+1<e.length?e.charCodeAt(i+1):0,t>=55296&&t<=56319&&r>=56320&&r<=57343&&(t=65536+((1023&t)<<10)+(1023&r),i++),t<=127?n+=String.fromCharCode(t):t<=2047?n+=String.fromCharCode(192|t>>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n},u=e=>{for(var t=Array(e.length>>2),r=0;r<t.length;r++)t[r]=0;for(r=0;r<8*e.length;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t},c=e=>{for(var t="",r=0;r<32*e.length;r+=8)t+=String.fromCharCode(e[r>>5]>>>24-r%32&255);return t},h=(e,t)=>{e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r=Array(80),n=1732584193,i=-271733879,o=-1732584194,a=271733878,l=-1009589776,s=0;s<e.length;s+=16){for(var u=n,c=i,h=o,m=a,y=l,v=0;v<80;v++){r[v]=v<16?e[s+v]:g(r[v-3]^r[v-8]^r[v-14]^r[v-16],1);let t=d(d(g(n,5),f(v,i,o,a)),d(d(l,r[v]),p(v)));l=a,a=o,o=g(i,30),i=n,n=t}n=d(n,u),i=d(i,c),o=d(o,h),a=d(a,m),l=d(l,y)}return[n,i,o,a,l]},f=(e,t,r,n)=>e<20?t&r|~t&n:e<40?t^r^n:e<60?t&r|t&n|r&n:t^r^n,p=e=>e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514,d=(e,t)=>{var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r},g=(e,t)=>e<<t|e>>>32-t}(nh);var ih=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rh,"__esModule",{value:!0}),rh.v5=void 0;const oh=Vc,ah=ih(nh);rh.v5=(0,oh.v35)("v5",80,ah.default),Object.defineProperty(vc,"__esModule",{value:!0});const lh=wc,sh=jc,uh=Ac,ch=Oc,hh=Lc,fh=qc,ph=Qc,dh=rh,gh=bc;var mh,yh=vc.default={parse:lh.parse,unparse:sh.unparse,validate:uh.validate,version:ch.version,v1:hh.v1,v3:fh.v3,v4:ph.v4,v5:dh.v5,NIL:gh.NIL,DNS:gh.DNS,URL:gh.URL,OID:gh.OID,X500:gh.X500},vh=function(e){var n=e.pin,i=e.wrapperStyle,o=e.mapRef,a=e.mapLoadedRef,l=e.regionChangeTrigger,s=r.useState(null),u=s[0],c=s[1],h=r.useState(0),p=h[0],d=h[1],g=r.useState(0),m=g[0],y=g[1],b=r.useState(!1),_=b[0],x=b[1],S=function(e){return"ios"===t.Platform.OS?[e[1],e[0]]:e},P=function(e){return v(void 0,void 0,void 0,function(){var t,r;return w(this,function(n){switch(n.label){case 0:if(!o.current||!e||!a.current)return[2,null];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,o.current.project(S(e))];case 2:return[2,{x:(t=n.sent())[0],y:t[1]}];case 3:return r=n.sent(),console.warn("Failed to convert coordinates to screen position:",r),[2,null];case 4:return[2]}})})};r.useEffect(function(){n.coordinates&&a.current&&P(n.coordinates).then(function(e){e&&c(e)})},[n.coordinates,a.current]),r.useEffect(function(){n.coordinates&&a.current&&void 0!==l&&P(n.coordinates).then(function(e){e&&c(e)})},[l,n.coordinates,a.current]);return u?f.default.createElement(t.View,{onLayout:function(e){var t=e.nativeEvent.layout,r=t.width,n=-t.height/2;_||(d(-r/2),y(n),x(!0))},style:[i,{left:u.x+p,top:u.y+m,opacity:_?1:0}]},n.customElement):null},wh=r.forwardRef(function(e,n){var i=e.mapRef,o=e.mapLoadedRef,a=e.cameraRef,l=e.metaAtlasCoreRef,s=r.useRef([]),u=r.useState(0),c=u[0],h=u[1],p=t.StyleSheet.create({overlayContainer:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"box-none",zIndex:1},popupWrapper:{position:"absolute",pointerEvents:"auto"}}),d=function(){h(function(e){return e+1})};return r.useImperativeHandle(n,function(){return{dropPin:function(e,t,n){return void 0===n&&(n=!0),v(this,void 0,void 0,function(){var i,o,a;return w(this,function(u){return i=function(e){return l.current.getMidPointOfFeature(e)}(e),r.isValidElement(t)?(o="",n&&s.current.length>0?(s.current[s.current.length-1]=y(y({},s.current[s.current.length-1]),{coordinates:i,customElement:t,isVisible:!0}),o=s.current[s.current.length-1].id):(a={id:yh.v4(),coordinates:i,customElement:t,isVisible:!0},o=a.id,s.current.push(a)),d(),[2,o]):(console.warn("Invalid react element passed to dropPin function"),[2,""])})})},hidePin:function(e){var t;if(void 0===e&&(e="-1"),"-1"===e){var r=s.current[s.current.length-1];if(!r)return void console.warn("No pins available to hide.");t=r.id}else t=e;var n=s.current.findIndex(function(e){return e.id===t});-1!==n?(s.current[n]=y(y({},s.current[n]),{isVisible:!1}),d()):console.warn("Pin with ID: ".concat(t," not found."))},hidePins:function(){s.current=s.current.map(function(e){return y(y({},e),{isVisible:!1})}),d()},showPin:function(e){return void 0===e&&(e="-1"),v(this,void 0,void 0,function(){var t,r,n;return w(this,function(i){if("-1"===e){if(!(r=s.current[s.current.length-1]))return console.warn("No pins available to show."),[2];t=r.id}else t=e;return-1===(n=s.current.findIndex(function(e){return e.id===t}))?(console.warn("Pin with ID: ".concat(t," not found.")),[2]):(s.current[n]=y(y({},s.current[n]),{isVisible:!0}),d(),[2])})})},showPins:function(){s.current=s.current.map(function(e){return y(y({},e),{isVisible:!0})}),d()},clearPin:function(e){var t;if(void 0===e&&(e="-1"),"-1"===e){if((t=s.current.length-1)<0)return void console.warn("No pins available to clear.")}else if(-1===(t=s.current.findIndex(function(t){return t.id===e})))return void console.warn("Pin with ID: ".concat(e," not found."));s.current.splice(t,1),d()},clearPins:function(){s.current=[],d()},fitViewToPins:function(e,t){var r;if(void 0===t&&(t=50),0!==s.current.length){var n=s.current.filter(function(t){return!!e.includes(t.id)});if(0!==n.length){for(var i=n[0].coordinates,o=new gc(i[0],i[1]),l=new gc(i[0],i[1]),u=new mc(o,l),c=0;c<n.length;c++){var h=n[c];u.extend(h.coordinates)}var f=u.toArray();null===(r=null==a?void 0:a.current)||void 0===r||r.fitBounds([f[0][0],f[0][1],f[1][0],f[1][1]],{padding:{top:t,right:t,bottom:t,left:t},duration:1e3})}else console.warn("No pins to fit on the map.")}else console.warn("No pins to fit on the map.")},notifyRegionChange:function(){h(function(e){return e+1})}}}),f.default.createElement(f.default.Fragment,null,o.current&&f.default.createElement(t.View,{style:p.overlayContainer},s.current.map(function(e){return e.isVisible&&r.isValidElement(e.customElement)&&f.default.createElement(vh,{key:e.id,pin:e,wrapperStyle:p.popupWrapper,mapRef:i,mapLoadedRef:o,regionChangeTrigger:c})})))});wh.displayName="MarkerOverlayContainer",exports.NetworkMode=void 0,(mh=exports.NetworkMode||(exports.NetworkMode={})).Offline="offline",mh.Online="online";var bh=function(e){var t=e.isOffline,i=e.tileServer,o=e.props,a=r.useState(""),l=a[0],s=a[1];return r.useEffect(function(){var e;try{if(!Bs||"function"!=typeof Bs.getState)return void console.error("Invalid useMBTilesDataStore provided");var r=null===(e=Bs.getState())||void 0===e?void 0:e.data;if(t&&!r)return void console.warn("Offline mode enabled but no MBTiles data available");var n=t&&r?"mbtiles://".concat(r):i;if(!n||"string"!=typeof n)return void console.error("Invalid source URL");s(n)}catch(e){console.error("Error setting up vector source:",e)}},[t,o]),f.default.createElement(n.VectorSource,{id:"custom",key:t?"offline":"online",url:l})};exports.MetaAtlasSDK=function(e){var i=this,o=t.StyleSheet.create({page:{flex:1,backgroundColor:"#F5FCFF",alignItems:"center",justifyContent:e.isFullHeight?"center":"flex-start"},map:{flex:1,alignSelf:"stretch",maxHeight:e.isFullHeight?void 0:e.maxMapHeight}}),a=r.useRef(new uu),l=r.useRef(null),s=r.useRef(null),u=r.useRef(null),c=r.useRef(!1),h=r.useRef(!1),p=r.useRef(!1),d=r.useRef(!1),y=r.useState(!1),_=y[0],x=y[1],S=r.useState(null),P=S[0],j=S[1],k=r.useRef(null),A=r.useRef(new Set),E=r.useRef(!1),z=r.useState({center:[103.8218,1.2564],zoom:15.5,bearing:0}),M=z[0],O=z[1],F=r.useState(""),L=F[0],C=F[1],T=function(e){C(JSON.stringify(e))},I=r.useRef(ll),N=r.useRef(sl),D=r.useRef(ul),G=r.useRef(cl),W=r.useState(!1),q=W[0],V=W[1],$=r.useState(!1),J=$[0],X=$[1],H=r.useState(null),K=H[0],Z=H[1],Q=r.useState(!0),ee=Q[0],te=Q[1],re="https://atoms-sdk.sandbox.spatialverse.online/",ne="https://atoms-map-tiles-middleware.sandbox.spatialverse.online/".concat(e.tileserverRoleName,"/latest/geojson?accessToken=").concat(e.accessToken),ie=e.onNetworkModeUpdate?e.onNetworkModeUpdate:function(){},oe=function(){return v(i,void 0,void 0,function(){var t,r,n=this;return w(this,function(i){switch(i.label){case 0:return t=function(){return v(n,void 0,void 0,function(){var e;return w(this,function(t){switch(t.label){case 0:return[4,se()];case 1:return e=t.sent(),X(e),ie(e?exports.NetworkMode.Offline:exports.NetworkMode.Online),[2]}})})},a.current.getOfflineMapStatus()===Cs.Ready?[3,2]:(r=function(r){return v(n,void 0,void 0,function(){return w(this,function(n){return e.onOfflineMapsStatusUpdate(r),r&&t(),[2]})})},[4,a.current.setupOfflineMaps(r)]);case 1:return i.sent(),[3,3];case 2:t(),i.label=3;case 3:return[2]}})})},ae=function(){return v(i,void 0,void 0,function(){var e,t,r=this;return w(this,function(n){switch(n.label){case 0:return e=function(){return v(r,void 0,void 0,function(){var e,t;return w(this,function(r){switch(r.label){case 0:e="".concat(g.default.DocumentDirectoryPath,"/extracted/"),r.label=1;case 1:return r.trys.push([1,5,,6]),[4,g.default.exists(e)];case 2:return r.sent()?[4,Dl(e)]:[3,4];case 3:r.sent(),ie(exports.NetworkMode.Online),console.log("Unzipped files deleted from: ".concat(e)),r.label=4;case 4:return[3,6];case 5:return t=r.sent(),console.error("Error during cleanup:",t),[3,6];case 6:return[2]}})})},[4,e()];case 1:return n.sent(),t=JSON.parse(L),ll.sprite&&ll.glyphs&&(t.glyphs=I.current.glyphs,t.sprite=I.current.sprite),T(t),X(!1),Bs.setState({data:""}),a.current.offlineMapStatus=Cs.Awaiting,ie(exports.NetworkMode.Online),[2]}})})},se=function(){return v(i,void 0,void 0,function(){var e,t,r,n,i,o,a,l,s;return w(this,function(u){switch(u.label){case 0:e=Bs.getState().data,t=Is.getState().data,r=JSON.parse(L),u.label=1;case 1:return u.trys.push([1,8,,9]),console.log("Paths Here:",e,t),(n=e)?[4,g.default.exists(e)]:[3,3];case 2:n=u.sent(),u.label=3;case 3:return n?(console.log("MBTiles path set:",e),i="".concat(t,"fonts"),(o=t)?[4,g.default.exists(i)]:[3,5]):(console.error("MBTiles file not found:",e),[2,!1]);case 4:o=u.sent(),u.label=5;case 5:return o?(console.log("Fonts path set:",i),r.glyphs="file://".concat(i,"/{fontstack}/{range}.pbf"),a="".concat(t,"sprites"),(l=t)?[4,g.default.exists(a)]:[3,7]):(console.error("Fonts directory not found:",i),[2,!1]);case 6:l=u.sent(),u.label=7;case 7:return l?(console.log("Sprites path set:",a),r.sprite="file://".concat(a,"/sprites"),T(r),[2,!0]):(console.error("Sprites directory not found:",a),[2,!1]);case 8:return s=u.sent(),console.error("Error setting up MBTiles, Fonts, and Sprites:",s),[2,!1];case 9:return[2]}})})};r.useEffect(function(){return u.current||(u.current=new R(s,function(){return a.current.getFocusTree()},function(e){return j(e)})),function(){var e,t;try{null===(t=null===(e=u.current)||void 0===e?void 0:e.destroyGPS)||void 0===t||t.call(e)}catch(e){}c.current=!1}},[]),r.useEffect(function(){E.current&&c.current&&s.current&&(E.current=!1,s.current.setStop({center:M.center,zoom:M.zoom,bearing:M.bearing,duration:1200,easing:"ease"}))},[M]),r.useEffect(function(){var e=m.default.addEventListener(function(e){Z(e.isConnected)});return function(){try{e&&e()}catch(e){}}},[]),r.useEffect(function(){var t=function(){return v(i,void 0,void 0,function(){var t,r,n=this;return w(this,function(i){switch(i.label){case 0:return t=function(t){return v(n,void 0,void 0,function(){var r,n,i,o,a;return w(this,function(l){switch(l.label){case 0:return l.trys.push([0,5,,6]),r="".concat(re+t),[4,fetch(r)];case 1:return n=l.sent(),(i=n.headers.get("Content-Type"))&&i.includes("application/json")?[4,n.json()]:[3,3];case 2:return o=l.sent(),s=o,u=e.secretKey,function(e,t){v(void 0,void 0,void 0,function(){var r;return w(this,function(n){switch(n.label){case 0:r="".concat(g.default.DocumentDirectoryPath+"/"+t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,g.default.writeFile(r,e,"utf8")];case 2:return n.sent(),[3,4];case 3:return n.sent(),console.error("failed to save file to local storage",t),[3,4];case 4:return[2]}})})}(Bl.AES.encrypt(JSON.stringify(s),u).toString(),t),[2,o];case 3:return console.warn("Invalid Content-Type: expected JSON but received ".concat(i," for URL: ").concat(r)),[2,Nl(t,e.secretKey)];case 4:return[3,6];case 5:return a=l.sent(),console.error("Error fetching or parsing JSON for ".concat(t,":"),a),[2,Nl(t,e.secretKey)];case 6:return[2]}var s,u})})},r=function(){return v(n,void 0,void 0,function(){var r,n,i,o,a;return w(this,function(l){switch(l.label){case 0:return l.trys.push([0,7,,8]),[4,t("combined_style.json")];case 1:return r=l.sent(),I.current=null!==r?r:I.current,[4,t("customerLayer.json")];case 2:return n=l.sent(),N.current=n.length>0?n:N.current,"firealarmteam"!==e.tileserverRoleName?[3,4]:[4,t("firealarmstyles.json")];case 3:i=l.sent(),D.current=i.length>0?i:D.current,l.label=4;case 4:return"airside"!==e.tileserverRoleName?[3,6]:[4,t("airsideLayers.json")];case 5:o=l.sent(),G.current=o.length>0?o:G.current,l.label=6;case 6:return[3,8];case 7:return a=l.sent(),console.error("Error fetching styles:",a),[3,8];case 8:return[2]}})})},[4,r()];case 1:return i.sent(),[2]}})})},r=!1;m.default.addEventListener(function(e){return v(i,void 0,void 0,function(){return w(this,function(n){switch(n.label){case 0:return r?[3,3]:(r=!0,e.isConnected?[4,t()]:[3,2]);case 1:n.sent(),n.label=2;case 2:V(!0),n.label=3;case 3:return[2]}})})})},[e.secretKey,e.tileserverRoleName]),r.useEffect(function(){if(q){var t=function(e,t,r){var n=e.layers,i=n.findIndex(function(e){return e.id===t}),o=n.findIndex(function(e){return e.id===r});if(-1===i||-1===o)throw new Error("One or both layer IDs not found.");var a=n.splice(i,1)[0],l=i<o?o-1:o;return n.splice(l,0,a),e},r=To(I.current);if(function(e,t,r){var n=e.layers,i=n.findIndex(function(e){return e.id===r});if(-1===i)throw new Error("Target layer ID not found.");n.splice(i,0,t)}(r,{id:"airside-boundary",type:"fill",source:"boundary",paint:{"fill-color":"#e2e6ee"}},"highway_major_casing"),t(r,"landcover_grass","highway_major_casing"),t(r,"water","highway_major_casing"),("changi"===e.tileserverRoleName||"changipublic-airside"===e.tileserverRoleName)&&G.current&&G.current.length>0){for(var n=0;n<N.current.length;n++){(i=To(N.current[n]))["source-layer"]="geojson",r.layers.push(i)}for(n=0;n<G.current.length;n++){(i=To(G.current[n]))["source-layer"]="geojson",r.layers.push(i)}}else if("airside"===e.tileserverRoleName&&G.current&&G.current.length>0)for(n=0;n<G.current.length;n++){(i=To(G.current[n]))["source-layer"]="geojson",r.layers.push(i)}else if("firealarmteam"===e.tileserverRoleName&&D.current&&D.current.length>0){for(n=0;n<N.current.length;n++){(i=To(N.current[n]))["source-layer"]="geojson",r.layers.push(i)}for(n=0;n<D.current.length;n++){(i=To(D.current[n]))["source-layer"]="geojson",r.layers.push(i)}}else for(n=0;n<N.current.length;n++){var i;(i=To(N.current[n]))["source-layer"]="geojson",r.layers.push(i)}T(r)}},[e.tileserverRoleName,q]),r.useEffect(function(){a.current.init("https://atoms-api.sandbox.spatialverse.online",e.accessToken,e.secretKey,re,e.tileserverRoleName)},[e.accessToken]),r.useEffect(function(){console.log(K,"isNetworkConnected");var t,r=e.onRoutingStatusUpdate?e.onRoutingStatusUpdate:function(){},n=e.onSearchStatusUpdate?e.onSearchStatusUpdate:function(){};null!==K&&(K?a.current.getAtomsAPIAccessToken(function(t){return v(i,void 0,void 0,function(){var i,o,l,s;return w(this,function(u){switch(u.label){case 0:return h.current=!0,t.authenticated?[4,a.current.setupFocusTree()]:[3,4];case 1:return u.sent(),(i=ou()).length>0&&(null==(o=a.current.getFlyToLocation(i[0].taxonomyPath,!0))?void 0:o.center)&&(E.current=!0,O({center:o.center,zoom:null!==(l=o.zoom)&&void 0!==l?l:15.5,bearing:null!==(s=o.bearing)&&void 0!==s?s:0})),a.current.getRoutingStatus()!==Cs.Ready&&a.current.setupRouting(r),a.current.getSearchStatus()!==Cs.Ready&&a.current.setupMapObjectSearch(n),a.current.hasPublishedDataVersion(Ls.MBTiles)?a.current.getOfflineMapStatus()===Cs.Ready?[3,3]:[4,a.current.setupOfflineMaps(e.onOfflineMapsStatusUpdate)]:[3,3];case 2:u.sent(),u.label=3;case 3:return _e(),[3,5];case 4:xe("Failed to authenticate token"),u.label=5;case 5:return[2]}})})}):(a.current.getRoutingStatus()!==Cs.Ready&&a.current.setupRouting(r),a.current.getSearchStatus()!==Cs.Ready&&a.current.setupMapObjectSearch(n),_e()),ee&&(t=K,v(i,void 0,void 0,function(){return w(this,function(e){return t?J&&ae():oe(),[2]})})))},[K,ee]);var ue=r.useState(pc),ce=ue[0],he=ue[1],fe=r.useRef({type:"FeatureCollection",features:[]}),pe=r.useRef(null),de=r.useRef(-1),ge=r.useRef(-1),me=r.useRef(dc),ye=r.useRef(new al([])),ve=function(e){ye.current.destroy(),ye.current=e},we=function(e,t){if(pe.current&&pe.current.segments.length>e){var r=pe.current.segments[e];if(r.features.length>0){var n=function(e,t){void 0===t&&(t="");for(var r=[],n=0;n<e.features.length;n+=1){var i=e.features[n];i.properties.featureBelongsToLineString&&(""!==t?i.properties.dimension_where&&i.properties.dimension_where===t&&r.push(i):r.push(i))}return r}(r,t);if(n.length>0){var i=n[0].geometry.coordinates;i.length<=2&&i.push(i[i.length-1]),ve(new al(n[0].geometry.coordinates))}else ve(new al([]));x(!_)}}};r.useEffect(function(){var e;ye.current.__getValue().length>2&&(e=U(ye.current.originalRoute[0]),ye.current.timing({toValue:{end:{point:e}},duration:2e3,easing:t.Easing.linear}).start())},[ye.current]);var be=function(){return!0===c.current&&null!==l.current};r.useImperativeHandle(e.ref,function(){return{requestGPSPermission:function(){var e,t;return v(this,void 0,void 0,function(){return w(this,function(r){switch(r.label){case 0:return[4,null===(t=null===(e=u.current)||void 0===e?void 0:e.requestGPSPermission)||void 0===t?void 0:t.call(e)];case 1:return[2,r.sent()]}})})},isGPSPermissionGranted:function(){var e,t;return v(this,void 0,void 0,function(){return w(this,function(r){switch(r.label){case 0:return[4,null===(t=null===(e=u.current)||void 0===e?void 0:e.isGPSPermissionGranted)||void 0===t?void 0:t.call(e)];case 1:return[2,r.sent()]}})})},enableGPS:function(e){var t,r;return v(this,void 0,void 0,function(){return w(this,function(n){switch(n.label){case 0:return[4,null===(r=null===(t=u.current)||void 0===t?void 0:t.enableGPS)||void 0===r?void 0:r.call(t,e)];case 1:return[2,n.sent()]}})})},disableGPS:function(){var e,t;null===(t=null===(e=u.current)||void 0===e?void 0:e.disableGPS)||void 0===t||t.call(e)},destroyGPS:function(){var e,t;null===(t=null===(e=u.current)||void 0===e?void 0:e.destroyGPS)||void 0===t||t.call(e)},focusToGPS:function(e){var t,r;return v(this,void 0,void 0,function(){return w(this,function(n){switch(n.label){case 0:return[4,null===(r=null===(t=u.current)||void 0===t?void 0:t.focusToGPS)||void 0===r?void 0:r.call(t,e)];case 1:return[2,n.sent()]}})})},getGPSPosition:function(e){var t,r;return v(this,void 0,void 0,function(){return w(this,function(n){switch(n.label){case 0:return[4,null===(r=null===(t=u.current)||void 0===t?void 0:t.getGPSPosition)||void 0===r?void 0:r.call(t,e)];case 1:return[2,n.sent()]}})})},isGPSEnabled:function(){var e,t;return null===(t=null===(e=u.current)||void 0===e?void 0:e.isGPSEnabled)||void 0===t?void 0:t.call(e)},isGPSAutoFocusEnabled:function(){var e,t;return null===(t=null===(e=u.current)||void 0===e?void 0:e.isGPSAutoFocusEnabled)||void 0===t?void 0:t.call(e)},isOutOfFocus:function(){var e,t;return null===(t=null===(e=u.current)||void 0===e?void 0:e.isOutOfFocus)||void 0===t?void 0:t.call(e)},getCurrentGPSPosition:function(){var e,t;return null===(t=null===(e=u.current)||void 0===e?void 0:e.getCurrentGPSPosition)||void 0===t?void 0:t.call(e)},getZoom:function(){var e;return v(this,void 0,void 0,function(){return w(this,function(t){switch(t.label){case 0:return be()?[4,null===(e=l.current)||void 0===e?void 0:e.getZoom()]:[2,null];case 1:return[2,t.sent()]}})})},getCenter:function(){var e;return v(this,void 0,void 0,function(){return w(this,function(t){switch(t.label){case 0:return be()?[4,null===(e=l.current)||void 0===e?void 0:e.getCenter()]:[2,null];case 1:return[2,t.sent()]}})})},moveTo:function(e,t){var r;be()&&(null===(r=s.current)||void 0===r||r.easeTo({center:e,easing:"ease",duration:t}))},zoomTo:function(e,t){var r;be()&&(null===(r=s.current)||void 0===r||r.zoomTo(e,{duration:t,easing:"ease"}))},filterWhereDimension:function(e){var t=JSON.parse(L),r=t.layers,n=a.current.filterBaseMapWhereDimension(r,e);t.layers=n,T(t);var i=a.current.filterLayersWhereDimension(To(ce),e);he(i),we(de.current,e),x(!_)},setupOfflineMaps:function(t){return v(this,void 0,void 0,function(){return w(this,function(r){switch(r.label){case 0:return a.current.getOfflineMapStatus()===Cs.Ready?[3,2]:[4,a.current.setupOfflineMaps(e.onOfflineMapsStatusUpdate,t)];case 1:r.sent(),r.label=2;case 2:return[2]}})})},toggleMapMode:function(e){return v(this,void 0,void 0,function(){return w(this,function(t){return te(!1),e===exports.NetworkMode.Offline?oe():e===exports.NetworkMode.Online&&ae(),[2]})})},focusTo:function(e,t){var r,n;if(void 0===t&&(t=!0),e){if(this.filterWhereDimension(e),t){var i=a.current.getFlyToLocation(e,!0);(null==i?void 0:i.center)&&(this.flyTo({center:i.center,zoomLevel:i.zoom,bearing:i.bearing}),null===(n=null===(r=u.current)||void 0===r?void 0:r.setOutOfFocus)||void 0===n||n.call(r,!0))}A.current.forEach(function(t){try{t(e)}catch(e){}})}},subscribeToFocusChange:function(e){return A.current.add(e),function(){A.current.delete(e)}},filterLayersByType:function(e,t,r){void 0===e&&(e=[]),void 0===r&&(r="");var n=JSON.parse(L),i=n.layers,o=a.current.filterLayersByType(i,t,e,r);n.layers=o,T(n)},styleLayersByType:function(e,t,r,n){var i=JSON.parse(L),o=i.layers,l=a.current.styleLayersByType(o,t,e,r,n);i.layers=l,T(i)},clearStyleLayersByType:function(e,t,r){var n=JSON.parse(L),i=n.layers,o=a.current.clearStyleLayersByType(i,e,t,r);n.layers=o,T(n)},flyTo:function(e,t){var r,n,i,o;return void 0===t&&(t=!0),v(this,void 0,void 0,function(){var a,u,c,h,f;return w(this,function(p){switch(p.label){case 0:return be()?(t||this.clearPins(),[4,null===(r=l.current)||void 0===r?void 0:r.getCenter()]):[2];case 1:return(a=p.sent())?(u=e.center?e.center:a,e.zoomLevel?(h=e.zoomLevel,[3,4]):[3,2]):[2];case 2:return[4,null===(n=l.current)||void 0===n?void 0:n.getZoom()];case 3:h=p.sent(),p.label=4;case 4:return c=h,f=2*Y(a,u,{units:"meters"}),null!==e.bearing?null===(i=s.current)||void 0===i||i.setStop({center:u,zoom:c,duration:f,bearing:e.bearing,easing:"fly"}):null===(o=s.current)||void 0===o||o.setStop({center:u,zoom:c,duration:f,easing:"fly"}),[2]}})})},getFocusTree:function(){return a.current.getFocusTree()},getWhatTaxonomies:function(){return a.current.getWhatTaxonomies()},getCurrentFocus:function(){return a.current.getCurrentFocus()},getCurrentFocusBuilding:function(){return a.current.getCurrentFocusBuilding()},getCurrentFocusFloor:function(){return a.current.getCurrentFocusFloor()},getLastClickedFeature:function(){return a.current.getLastClickedFeature()},getAllMapObjects:function(){var e;return(e=a.current).getAllMapObjects.apply(e,arguments)},getMapObjectsByName:function(){var e;return(e=a.current).getMapObjectsByName.apply(e,arguments)},getMapObjectById:function(){var e;return(e=a.current).getMapObjectById.apply(e,arguments)},getMapObjectByLocalRef:function(){var e;return(e=a.current).getMapObjectByLocalRef.apply(e,arguments)},getMapObjectsByWhatTaxonomy:function(){var e;return(e=a.current).getMapObjectsByWhatTaxonomy.apply(e,arguments)},getMapObjectsByWhereTaxonomy:function(){var e;return(e=a.current).getMapObjectsByWhereTaxonomy.apply(e,arguments)},getMapObjectsByWhatAndWhereTaxonomy:function(){var e;return(e=a.current).getMapObjectsByWhatAndWhereTaxonomy.apply(e,arguments)},getMapObjectsInWhatTaxonomy:function(){var e;return(e=a.current).getMapObjectsInWhatTaxonomy.apply(e,arguments)},getMapObjectsInWhereTaxonomy:function(){var e;return(e=a.current).getMapObjectsInWhereTaxonomy.apply(e,arguments)},getMapObjectsInWhatAndWhereTaxonomy:function(){var e;return(e=a.current).getMapObjectsInWhatAndWhereTaxonomy.apply(e,arguments)},getMidPointOfFeature:function(e){return a.current.getMidPointOfFeature(e)},dropPin:function(e,t,r){var n;return void 0===r&&(r=!0),v(this,void 0,void 0,function(){return w(this,function(i){switch(i.label){case 0:return[4,null===(n=k.current)||void 0===n?void 0:n.dropPin(e,t,r)];case 1:return[2,i.sent()||""]}})})},hidePin:function(e){var t;void 0===e&&(e="-1"),null===(t=k.current)||void 0===t||t.hidePin(e)},hidePins:function(){var e;null===(e=k.current)||void 0===e||e.hidePins()},showPin:function(e){var t;return void 0===e&&(e="-1"),v(this,void 0,void 0,function(){return w(this,function(r){switch(r.label){case 0:return[4,null===(t=k.current)||void 0===t?void 0:t.showPin(e)];case 1:return r.sent(),[2]}})})},showPins:function(){var e;null===(e=k.current)||void 0===e||e.showPins()},clearPin:function(e){var t;void 0===e&&(e="-1"),null===(t=k.current)||void 0===t||t.clearPin(e)},clearPins:function(){var e;null===(e=k.current)||void 0===e||e.clearPins()},fitViewToPins:function(e,t){var r;void 0===t&&(t=50),null===(r=k.current)||void 0===r||r.fitViewToPins(e,t)},fitViewToFeatures:function(e,t){var r;if(void 0===t&&(t=50),0!==e.length){for(var n=e[0].coordinates,i=new gc(n[0],n[1]),o=new gc(n[0],n[1]),a=new mc(i,o),l=0;l<e.length;l++){var u=e[l];a.extend(u.coordinates)}var c=a.toArray();null===(r=s.current)||void 0===r||r.fitBounds([c[0][0],c[0][1],c[1][0],c[1][1]],{padding:{top:t,right:t,bottom:t,left:t},duration:1e3})}else console.warn("No pins to fit on the map.")},changeTerminalInFocusToUserViewpoint:function(e){var t;return void 0===e&&(e={}),v(this,void 0,void 0,function(){var r,n,i;return w(this,function(o){switch(o.label){case 0:return be()?[4,null===(t=l.current)||void 0===t?void 0:t.getCenter()]:[2];case 1:return(r=o.sent())?a.current.checkUserViewport(r,a.current.getCurrentFocusBuilding(),a.current.getCurrentFocusFloor())?[2]:(n=a.current.getUserViewportBuilding(r))?(i=null!=e?e:{},n.taxonomyPath&&n.taxonomyPath in i?(this.focusTo(i[n.taxonomyPath],!1),[2]):n.name&&n.name in i?(this.focusTo(i[n.name],!1),[2]):n.defaultFloorPath?(this.focusTo(n.defaultFloorPath,!1),[2]):[2]):[2]:[2]}})})},computeRoute:function(e,t,r,n,i){return void 0===r&&(r=!1),void 0===n&&(n=!0),void 0===i&&(i=0),v(this,void 0,void 0,function(){var o;return w(this,function(l){switch(l.label){case 0:return a.current.getRoutingStatus()!==Cs.Ready?[3,2]:(ge.current=-1,[4,oc(e,t,r,n,i)]);case 1:return function(e){for(var t=function(t){return 0===t||1===t&&e.segments[t-1].maneuverType===ku.RouteOverview},r=function(e){return e.startEdge.whereDimension.toLowerCase().includes("l1")?"Clear Arrival Immigration":"Clear Departure Immigration"},n=0;n<e.segments.length;n+=1){var i=e.segments[n];if(i.instructions=[],i.maneuverType===ku.RouteOverview){var o="Overview";i.instructions.push(o)}if(n>0&&i.maneuverType===ku.ChangeZone)o="",e.segments[n-1].zone===vs.Public&&i.zone===vs.Transit?o=r(i):e.segments[n-1].zone===vs.Transit&&i.zone===vs.Public&&(o="Exit Baggage Claim Hall"),i.instructions.push(o);else if(i.maneuverType===ku.ContinueStraight||i.maneuverType===ku.PassThroughImmigration){var a=i.maneuverType===ku.ContinueStraight?"Walk for ".concat(Math.ceil(i.distance)," ").concat(e.distanceUnit):r(i);o=void 0,e.segments[n-1].maneuverType===ku.ChangeZone||(e.segments[n-1].maneuverType,ku.PassThroughImmigration),o=a,i.instructions.push(o)}else if(i.maneuverType===ku.Static)t(n)&&i.instructions.push("Start at ".concat(i.startEdge.name," on ").concat(i.startEdge.whereDimension.split(".").slice(-2).join(" ").toUpperCase())),n===e.segments.length-1&&i.instructions.push("Arrive at ".concat(i.endEdge.name," on ").concat(i.endEdge.whereDimension.split(".").slice(-2).join(" ").toUpperCase()));else if(i.maneuverType===ku.EnterPortal)if(o="Enter ".concat(i.startEdge.name," at ").concat(i.startEdge.whereDimension.split(".").slice(-2).join(" ").toUpperCase()),sc(i.startEdge.whatDimension))o="Continue to ".concat(hc(i.startEdge.whatDimension,i.endEdge.whereDimension)),i.instructions.push(o);else if(lc(i.startEdge.whatDimension)){var l=n+1<=e.segments.length-1?e.segments[n+1]:void 0;if(l&&l.maneuverType===ku.TravelPortal){i.instructions.push(o),n+=1;var s=cc(l.startEdge.whatDimension);o="Take ".concat(s," to ").concat(hc(i.startEdge.whatDimension,i.endEdge.whereDimension)),l.instructions.push(o),i.description&&l.instructions.push(i.description)}else{var u=cc(i.startEdge.whatDimension);o="Take ".concat(u," to ").concat(hc(i.startEdge.whatDimension,i.endEdge.whereDimension)),i.instructions.push(o)}}}}(o=l.sent()),[2,o];case 2:return[2,null]}})})},computeRoutes:function(e,t){return void 0===t&&(t=!1),v(this,void 0,void 0,function(){var r,n,i,o,a,l,s,u,c,h,f;return w(this,function(p){switch(p.label){case 0:if(e.length<2)return console.warn("Invalid array passed to computeRoutes"),[2,void 0];console.log("calling computeRoutes with mapObjectIds: ",e),n={},(r={segments:[],walkingDistance:0,transportDistance:0,walkingTime:0,transportTime:0,distanceUnit:_s,speed:1}).segments.push(n),i=1,o=0,p.label=1;case 1:return o<e.length-1?(a=e[o],l=e[o+1],[4,this.computeRoute(a,l,t,true,i)]):[3,4];case 2:for((s=p.sent()).segments.length>0&&((u=s.segments[0]).maneuverType=ku.SectionOverview,u.instructions=["".concat(u.startEdge.name," to ").concat(u.endEdge.name)]),c=0;c<s.segments.length;c+=1)h=s.segments[c],r.segments.push(h);r.walkingDistance+=s.walkingDistance,r.transportDistance+=s.transportDistance,r.walkingTime+=s.walkingTime,r.transportTime+=s.transportTime,i+=s.segments.length,p.label=3;case 3:return o+=1,[3,1];case 4:return r.segments.length>1?(f=ic(r),r.segments[0]=f):r.segments.length=0,pe.current=r,[2,r]}})})},computeRoutesFromLocation:function(e,t,r,n){return void 0===n&&(n=!1),v(this,void 0,void 0,function(){var i;return w(this,function(o){switch(o.label){case 0:return 2!==e.length||""===t||r.length<1?(console.warn("Invalid input parameters passed to computeRoutesFromLocation"),[2,void 0]):(console.log("calling computeRoutesFromLocation with startLngLat: ",e,"startWhereDimension: ",t,"mapObjectIds: ",r),i={sourceCoords:e,whereDimension:t},[4,this.computeRoutes(b([i],r,!0),n)]);case 1:return[2,o.sent()]}})})},setActiveRoute:function(e){pe.current=e},getActiveRoute:function(){return pe.current},highlightRouteSegment:function(e){var t,r;return v(this,void 0,void 0,function(){var n,i,o,a,l,u,c,h,f,p,d,g,m,y,v,b,S,P,j,k,A;return w(this,function(w){if(pe.current&&pe.current.segments.length>e){if(pe.current.segments[e].coordinates.length>0){if(de.current=e,n=pe.current.segments[e],i=n.maneuverType===ku.ExitPortal||n.maneuverType===ku.Static?n.endEdge.whereDimension:n.startEdge.whereDimension,o=fe.current.features,a=n.features[0].properties.patchNumber,ge.current!==a&&(ge.current=a,l={type:"FeatureCollection",features:ac(pe.current,a,{includeOverviewFeatures:ec(n),patchNumberForOverviewFeatures:a})},o=l.features),i&&i!==this.getCurrentFocus()&&this.filterWhereDimension(i),u=function(e,t,r){void 0===r&&(r=!1);for(var n=0;n<e.length;n+=1){var i=e[n];i.properties.segmentNumber===t?r?!0===i.properties.startPoint&&tc([i],!0):tc([i],!0):tc([i],!1)}return e}(o,e),fe.current={type:"FeatureCollection",features:u},we(e,i),ec(n)?ve(new al([])):we(e,i),x(!_),n)if(c=function(e){return"Point"===e.geometry.type?e.geometry.coordinates:e.geometry.coordinates[0]},n.coordinates.length>1){for(h=function(e,t){void 0===t&&(t=0);for(var r=[],n=0;n<e.segments.length;n+=1){var i=e.segments[n];i.patchNumber===t&&(r=r.concat(i.features))}return r}(pe.current,n.patchNumber),f=c(h[0]),p=new gc(f[0],f[1]),d=new gc(f[0],f[1]),g=new mc(p,d),m=0;m<h.length;m++)if("Point"===(y=h[m]).geometry.type)g.extend(y.geometry.coordinates);else for(v=0,b=y.geometry.coordinates;v<b.length;v++)S=b[v],g.extend(S);P=g.toArray(),null===(t=s.current)||void 0===t||t.fitBounds([P[0][0],P[0][1],P[1][0],P[1][1]],{padding:{top:50,right:50,bottom:50,left:50},duration:1e3})}else j={type:"FeatureCollection",features:[U(n.coordinates[0])]},k=le(j,.025,3).features[0].geometry.coordinates,A=le(j,-.025,-3).features[0].geometry.coordinates,null===(r=s.current)||void 0===r||r.fitBounds([A[0],A[1],k[0],k[1]],{padding:{top:50,right:50,bottom:50,left:50},duration:1e3})}else console.log("at vertical portal segment, ignoring!");console.log(pe.current.segments[e].instructions)}else console.warn("Invalid segment number passed to highlightRouteSegment");return[2]})})},clearRoute:function(){fe.current={type:"FeatureCollection",features:[]},pe.current=null,ve(new al([])),x(!_)},getRoutingStatus:function(){return a.current.getRoutingStatus()}}},[L,ce,_,P]);var _e=function(){!0===c.current&&!0===h.current&&!1===p.current&&e.onLoad&&(p.current=!0,e.onLoad())},xe=function(t){!1===d.current&&(d.current=!0,e.onLoadFail&&e.onLoadFail(t))},Se=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],o=n.LineLayer;"line"===i.type?o=i.isAnimationLayer?n.Animated.LineLayer:n.LineLayer:"circle"===i.type?o=i.isAnimationLayer?n.Animated.CircleLayer:n.CircleLayer:"symbol"===i.type&&(o=i.isAnimationLayer?n.Animated.SymbolLayer:n.SymbolLayer);var a=(i.belowLayerID,f.default.createElement(o,{key:i.id,id:i.id,filter:i.filter,style:i.style}));t.push(a)}return t}(ce),Pe={sw:[M.center[0]-.05,M.center[1]-.05],ne:[M.center[0]+.05,M.center[1]+.05]};return f.default.createElement(t.View,{style:o.page},""!==L?f.default.createElement(n.MapView,{onPress:function(t){return v(i,void 0,void 0,function(){var r,n,i,o,s,u,c,h;return w(this,function(f){switch(f.label){case 0:r=t.nativeEvent.point,f.label=1;case 1:return f.trys.push([1,4,,5]),[4,null===(c=l.current)||void 0===c?void 0:c.project(t.nativeEvent.lngLat)];case 2:return n=f.sent(),d=r,i=(g=function(e){return Array.isArray(e)&&e.length>=2&&"number"==typeof e[0]&&"number"==typeof e[1]&&Number.isFinite(e[0])&&Number.isFinite(e[1])})(p=n)?p:g(d)?d:[0,0],[4,null===(h=l.current)||void 0===h?void 0:h.queryRenderedFeatures(i)];case 3:return function(e){for(var t,r,n,i,o,l,s=e[0],u=0;u<e.length;u++){var c=e[u];a.current.isClickableFeature(c)&&(s=c)}if((null===(t=s.properties)||void 0===t?void 0:t.center)||s.geometry&&s.geometry.coordinates){var h=(null===(r=s.properties)||void 0===r?void 0:r.center)?s.properties.center:s.geometry.coordinates;a.current.setLastClickedFeature({mapObjectId:null===(n=s.properties)||void 0===n?void 0:n.myMapObjectId,coordinates:h,name:null===(i=s.properties)||void 0===i?void 0:i.title,whatDimension:null===(o=s.properties)||void 0===o?void 0:o.dimension_what,whereDimension:null===(l=s.properties)||void 0===l?void 0:l.dimension_where,geometry:s.geometry,properties:s.properties})}}(o=f.sent()),e.onPress&&((s=null==o?void 0:o[0])?e.onPress(s):e.onPress(t.nativeEvent)),[3,5];case 4:return u=f.sent(),console.error("[onMapClicked] Error querying rendered features:",u),[3,5];case 5:return[2]}var p,d,g})})},onRegionWillChange:function(t){var r,n,i,o,a;t.nativeEvent.userInteraction&&(null===(n=null===(r=u.current)||void 0===r?void 0:r.isGPSEnabled)||void 0===n?void 0:n.call(r))&&(null===(o=(i=u.current).setOutOfFocus)||void 0===o||o.call(i,!0)),null===(a=e.onMoveStart)||void 0===a||a.call(e,t)},onRegionIsChanging:function(t){var r,n;null===(r=k.current)||void 0===r||r.notifyRegionChange(),null===(n=e.onMove)||void 0===n||n.call(e,t)},onRegionDidChange:function(t){return v(i,void 0,void 0,function(){var r;return w(this,function(n){return null===(r=e.onMoveEnd)||void 0===r||r.call(e,t),[2]})})},onDidFinishLoadingMap:function(){!1===c.current&&(c.current=!0,E.current&&s.current&&(E.current=!1,s.current.setStop({center:M.center,zoom:M.zoom,bearing:M.bearing,duration:1200,easing:"ease"})),_e())},onDidFailLoadingMap:function(){c.current=!1,xe("Failed to load map style")},style:o.map,logo:!1,ref:l,mapStyle:L||null,attribution:!1,compass:!1},f.default.createElement(n.Camera,{ref:s,duration:2e3,easing:"ease",initialViewState:{center:M.center,zoom:M.zoom,bearing:M.bearing,bounds:[Pe.sw[0],Pe.sw[1],Pe.ne[0],Pe.ne[1]]},maxZoom:22,minZoom:12}),f.default.createElement(bh,{isOffline:J,tileServer:ne,props:e}),f.default.createElement(n.ShapeSource,{id:"mapPinsSource",shape:fe.current},Se),ye.current.__getValue().length>2?f.default.createElement(n.Animated.ShapeSource,{id:"route",shape:new n.Animated.Shape({type:"LineString",coordinates:ye.current})},f.default.createElement(n.Animated.LineLayer,{id:"lineroute",style:me.current[0].style,aboveLayerID:"route-line-active"})):null,f.default.createElement(n.ShapeSource,{id:"boundary",shape:yc}),f.default.createElement(B,{position:P,showAccuracy:!0,pulse:!0}),e.children):null,f.default.createElement(wh,{ref:k,mapRef:l,mapLoadedRef:c,cameraRef:s,metaAtlasCoreRef:a}))};
29
+ !function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=16,s=32,l=64,u=128,c=256,h=1/0,d=9007199254740991,p=NaN,f=4294967295,g=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",s],["partialRight",l],["rearg",c]],m="[object Arguments]",v="[object Array]",y="[object Boolean]",w="[object Date]",b="[object Error]",_="[object Function]",x="[object GeneratorFunction]",S="[object Map]",A="[object Number]",P="[object Object]",M="[object Promise]",C="[object RegExp]",k="[object Set]",T="[object String]",E="[object Symbol]",R="[object WeakMap]",L="[object ArrayBuffer]",D="[object DataView]",F="[object Float32Array]",O="[object Float64Array]",j="[object Int8Array]",N="[object Int16Array]",I="[object Int32Array]",z="[object Uint8Array]",B="[object Uint8ClampedArray]",U="[object Uint16Array]",H="[object Uint32Array]",G=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,Y=RegExp(q.source),$=RegExp(Z.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,re=RegExp(ne.source),ie=/^\s+/,oe=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Ae="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Pe="\\u2700-\\u27bf",Me="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="['’]",Re="["+Se+"]",Le="["+Te+"]",De="["+Ae+"]",Fe="\\d+",Oe="["+Pe+"]",je="["+Me+"]",Ne="[^"+Se+Te+Fe+Pe+Me+Ce+"]",Ie="\\ud83c[\\udffb-\\udfff]",ze="[^"+Se+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",Ue="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+Ce+"]",Ge="\\u200d",We="(?:"+je+"|"+Ne+")",Ve="(?:"+He+"|"+Ne+")",qe="(?:['’](?:d|ll|m|re|s|t|ve))?",Ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+De+"|"+Ie+")"+"?",$e="["+ke+"]?",Ke=$e+Ye+("(?:"+Ge+"(?:"+[ze,Be,Ue].join("|")+")"+$e+Ye+")*"),Je="(?:"+[Oe,Be,Ue].join("|")+")"+Ke,Xe="(?:"+[ze+De+"?",De,Be,Ue,Re].join("|")+")",Qe=RegExp(Ee,"g"),et=RegExp(De,"g"),tt=RegExp(Ie+"(?="+Ie+")|"+Xe+Ke,"g"),nt=RegExp([He+"?"+je+"+"+qe+"(?="+[Le,He,"$"].join("|")+")",Ve+"+"+Ze+"(?="+[Le,He+We,"$"].join("|")+")",He+"?"+We+"+"+qe,He+"+"+Ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fe,Je].join("|"),"g"),rt=RegExp("["+Ge+Se+Ae+ke+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,st={};st[F]=st[O]=st[j]=st[N]=st[I]=st[z]=st[B]=st[U]=st[H]=!0,st[m]=st[v]=st[L]=st[y]=st[D]=st[w]=st[b]=st[_]=st[S]=st[A]=st[P]=st[C]=st[k]=st[T]=st[R]=!1;var lt={};lt[m]=lt[v]=lt[L]=lt[D]=lt[y]=lt[w]=lt[F]=lt[O]=lt[j]=lt[N]=lt[I]=lt[S]=lt[A]=lt[P]=lt[C]=lt[k]=lt[T]=lt[E]=lt[z]=lt[B]=lt[U]=lt[H]=!0,lt[b]=lt[_]=lt[R]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,ht=parseInt,dt="object"==typeof ae&&ae&&ae.Object===Object&&ae,pt="object"==typeof self&&self&&self.Object===Object&&self,ft=dt||pt||Function("return this")(),gt=t&&!t.nodeType&&t,mt=gt&&e&&!e.nodeType&&e,vt=mt&&mt.exports===gt,yt=vt&&dt.process,wt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),bt=wt&&wt.isArrayBuffer,_t=wt&&wt.isDate,xt=wt&&wt.isMap,St=wt&&wt.isRegExp,At=wt&&wt.isSet,Pt=wt&&wt.isTypedArray;function Mt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Lt(e,t){return!!(null==e?0:e.length)&&Ht(e,t,0)>-1}function Dt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Ft(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Ot(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function jt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Nt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function It(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var zt=qt("length");function Bt(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Ut(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ht(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ut(e,Wt,n)}function Gt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Wt(e){return e!=e}function Vt(e,t){var n=null==e?0:e.length;return n?$t(e,t)/n:p}function qt(e){return function(t){return null==t?n:t[e]}}function Zt(e){return function(t){return null==e?n:e[t]}}function Yt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function $t(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function Kt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Jt(e){return e?e.slice(0,gn(e)+1).replace(ie,""):e}function Xt(e){return function(t){return e(t)}}function Qt(e,t){return Ft(t,function(t){return e[t]})}function en(e,t){return e.has(t)}function tn(e,t){for(var n=-1,r=e.length;++n<r&&Ht(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length;n--&&Ht(t,e[n],0)>-1;);return n}var rn=Zt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),on=Zt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function an(e){return"\\"+ut[e]}function sn(e){return rt.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function un(e,t){return function(n){return e(t(n))}}function cn(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[i++]=n)}return a}function hn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function dn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function pn(e){return sn(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):zt(e)}function fn(e){return sn(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function gn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var mn=Zt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var vn=function e(t){var oe=(t=null==t?ft:vn.defaults(ft.Object(),t,vn.pick(ft,ot))).Array,ae=t.Date,Se=t.Error,Ae=t.Function,Pe=t.Math,Me=t.Object,Ce=t.RegExp,ke=t.String,Te=t.TypeError,Ee=oe.prototype,Re=Ae.prototype,Le=Me.prototype,De=t["__core-js_shared__"],Fe=Re.toString,Oe=Le.hasOwnProperty,je=0,Ne=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ie=Le.toString,ze=Fe.call(Me),Be=ft._,Ue=Ce("^"+Fe.call(Oe).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=vt?t.Buffer:n,Ge=t.Symbol,We=t.Uint8Array,Ve=He?He.allocUnsafe:n,qe=un(Me.getPrototypeOf,Me),Ze=Me.create,Ye=Le.propertyIsEnumerable,$e=Ee.splice,Ke=Ge?Ge.isConcatSpreadable:n,Je=Ge?Ge.iterator:n,Xe=Ge?Ge.toStringTag:n,tt=function(){try{var e=ho(Me,"defineProperty");return e({},"",{}),e}catch(e){}}(),rt=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ut=ae&&ae.now!==ft.Date.now&&ae.now,dt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=Pe.ceil,gt=Pe.floor,mt=Me.getOwnPropertySymbols,yt=He?He.isBuffer:n,wt=t.isFinite,zt=Ee.join,Zt=un(Me.keys,Me),yn=Pe.max,wn=Pe.min,bn=ae.now,_n=t.parseInt,xn=Pe.random,Sn=Ee.reverse,An=ho(t,"DataView"),Pn=ho(t,"Map"),Mn=ho(t,"Promise"),Cn=ho(t,"Set"),kn=ho(t,"WeakMap"),Tn=ho(Me,"create"),En=kn&&new kn,Rn={},Ln=Io(An),Dn=Io(Pn),Fn=Io(Mn),On=Io(Cn),jn=Io(kn),Nn=Ge?Ge.prototype:n,In=Nn?Nn.valueOf:n,zn=Nn?Nn.toString:n;function Bn(e){if(ts(e)&&!Wa(e)&&!(e instanceof Wn)){if(e instanceof Gn)return e;if(Oe.call(e,"__wrapped__"))return zo(e)}return new Gn(e)}var Un=function(){function e(){}return function(t){if(!es(t))return{};if(Ze)return Ze(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Hn(){}function Gn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Zn;++t<n;)this.add(e[t])}function $n(e){var t=this.__data__=new qn(e);this.size=t.size}function Kn(e,t){var n=Wa(e),r=!n&&Ga(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&us(e),a=n||r||i||o,s=a?Kt(e.length,ke):[],l=s.length;for(var u in e)!t&&!Oe.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||wo(u,l))||s.push(u);return s}function Jn(e){var t=e.length;return t?e[Yr(0,t-1)]:n}function Xn(e,t){return Oo(Ti(e),sr(t,0,e.length))}function Qn(e){return Oo(Ti(e))}function er(e,t,r){(r!==n&&!Ba(e[t],r)||r===n&&!(t in e))&&or(e,t,r)}function tr(e,t,r){var i=e[t];Oe.call(e,t)&&Ba(i,r)&&(r!==n||t in e)||or(e,t,r)}function nr(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function rr(e,t,n,r){return dr(e,function(e,i,o){t(r,e,n(e),o)}),r}function ir(e,t){return e&&Ei(t,Rs(t),e)}function or(e,t,n){"__proto__"==t&&tt?tt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,i=t.length,o=oe(i),a=null==e;++r<i;)o[r]=a?n:Ms(e,t[r]);return o}function sr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function lr(e,t,r,i,o,a){var s,l=1&t,u=2&t,c=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!es(e))return e;var h=Wa(e);if(h){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Ti(e,s)}else{var d=go(e),p=d==_||d==x;if(Ya(e))return Si(e,l);if(d==P||d==m||p&&!o){if(s=u||p?{}:vo(e),!l)return u?function(e,t){return Ei(e,fo(e),t)}(e,function(e,t){return e&&Ei(t,Ls(t),e)}(s,e)):function(e,t){return Ei(e,po(e),t)}(e,ir(s,e))}else{if(!lt[d])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case L:return Ai(e);case y:case w:return new r(+e);case D:return function(e,t){var n=t?Ai(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case F:case O:case j:case N:case I:case z:case B:case U:case H:return Pi(e,n);case S:return new r;case A:case T:return new r(e);case C:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new r;case E:return i=e,In?Me(In.call(i)):{}}var i}(e,d,l)}}a||(a=new $n);var f=a.get(e);if(f)return f;a.set(e,s),as(e)?e.forEach(function(n){s.add(lr(n,t,r,n,e,a))}):ns(e)&&e.forEach(function(n,i){s.set(i,lr(n,t,r,i,e,a))});var g=h?n:(c?u?io:ro:u?Ls:Rs)(e);return kt(g||e,function(n,i){g&&(n=e[i=n]),tr(s,i,lr(n,t,r,i,e,a))}),s}function ur(e,t,r){var i=r.length;if(null==e)return!i;for(e=Me(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,i){if("function"!=typeof e)throw new Te(r);return Ro(function(){e.apply(n,i)},t)}function hr(e,t,n,r){var i=-1,o=Lt,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Ft(t,Xt(n))),r?(o=Dt,a=!1):t.length>=200&&(o=en,a=!1,t=new Yn(t));e:for(;++i<s;){var c=e[i],h=null==n?c:n(c);if(c=r||0!==c?c:0,a&&h==h){for(var d=u;d--;)if(t[d]===h)continue e;l.push(c)}else o(t,h,r)||l.push(c)}return l}Bn.templateSettings={escape:K,evaluate:J,interpolate:X,variable:"",imports:{_:Bn}},Bn.prototype=Hn.prototype,Bn.prototype.constructor=Bn,Gn.prototype=Un(Hn.prototype),Gn.prototype.constructor=Gn,Wn.prototype=Un(Hn.prototype),Wn.prototype.constructor=Wn,Vn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(e){var t=this.__data__;if(Tn){var r=t[e];return r===i?n:r}return Oe.call(t,e)?t[e]:n},Vn.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==n:Oe.call(t,e)},Vn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tn&&t===n?i:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():$e.call(t,n,1),--this.size,!0)},qn.prototype.get=function(e){var t=this.__data__,r=nr(t,e);return r<0?n:t[r][1]},qn.prototype.has=function(e){return nr(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(Pn||qn),string:new Vn}},Zn.prototype.delete=function(e){var t=uo(this,e).delete(e);return this.size-=t?1:0,t},Zn.prototype.get=function(e){return uo(this,e).get(e)},Zn.prototype.has=function(e){return uo(this,e).has(e)},Zn.prototype.set=function(e,t){var n=uo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(e){return this.__data__.set(e,i),this},Yn.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.clear=function(){this.__data__=new qn,this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},$n.prototype.get=function(e){return this.__data__.get(e)},$n.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!Pn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Zn(r)}return n.set(e,t),this.size=n.size,this};var dr=Di(br),pr=Di(_r,!0);function fr(e,t){var n=!0;return dr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function gr(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(l===n?s==s&&!ls(s):r(s,l)))var l=s,u=a}return u}function mr(e,t){var n=[];return dr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function vr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?vr(s,t-1,n,r,i):Ot(i,s):r||(i[i.length]=s)}return i}var yr=Fi(),wr=Fi(!0);function br(e,t){return e&&yr(e,t,Rs)}function _r(e,t){return e&&wr(e,t,Rs)}function xr(e,t){return Rt(t,function(t){return Ja(e[t])})}function Sr(e,t){for(var r=0,i=(t=wi(t,e)).length;null!=e&&r<i;)e=e[No(t[r++])];return r&&r==i?e:n}function Ar(e,t,n){var r=t(e);return Wa(e)?r:Ot(r,n(e))}function Pr(e){return null==e?e===n?"[object Undefined]":"[object Null]":Xe&&Xe in Me(e)?function(e){var t=Oe.call(e,Xe),r=e[Xe];try{e[Xe]=n;var i=!0}catch(e){}var o=Ie.call(e);i&&(t?e[Xe]=r:delete e[Xe]);return o}(e):function(e){return Ie.call(e)}(e)}function Mr(e,t){return e>t}function Cr(e,t){return null!=e&&Oe.call(e,t)}function kr(e,t){return null!=e&&t in Me(e)}function Tr(e,t,r){for(var i=r?Dt:Lt,o=e[0].length,a=e.length,s=a,l=oe(a),u=1/0,c=[];s--;){var h=e[s];s&&t&&(h=Ft(h,Xt(t))),u=wn(h.length,u),l[s]=!r&&(t||o>=120&&h.length>=120)?new Yn(s&&h):n}h=e[0];var d=-1,p=l[0];e:for(;++d<o&&c.length<u;){var f=h[d],g=t?t(f):f;if(f=r||0!==f?f:0,!(p?en(p,g):i(c,g,r))){for(s=a;--s;){var m=l[s];if(!(m?en(m,g):i(e[s],g,r)))continue e}p&&p.push(g),c.push(f)}}return c}function Er(e,t,r){var i=null==(e=ko(e,t=wi(t,e)))?e:e[No(Ko(t))];return null==i?n:Mt(i,e,r)}function Rr(e){return ts(e)&&Pr(e)==m}function Lr(e,t,r,i,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!=e&&t!=t:function(e,t,r,i,o,a){var s=Wa(e),l=Wa(t),u=s?v:go(e),c=l?v:go(t),h=(u=u==m?P:u)==P,d=(c=c==m?P:c)==P,p=u==c;if(p&&Ya(e)){if(!Ya(t))return!1;s=!0,h=!1}if(p&&!h)return a||(a=new $n),s||us(e)?to(e,t,r,i,o,a):function(e,t,n,r,i,o,a){switch(n){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case L:return!(e.byteLength!=t.byteLength||!o(new We(e),new We(t)));case y:case w:case A:return Ba(+e,+t);case b:return e.name==t.name&&e.message==t.message;case C:case T:return e==t+"";case S:var s=ln;case k:var l=1&r;if(s||(s=hn),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=to(s(e),s(t),r,i,o,a);return a.delete(e),c;case E:if(In)return In.call(e)==In.call(t)}return!1}(e,t,u,r,i,o,a);if(!(1&r)){var f=h&&Oe.call(e,"__wrapped__"),g=d&&Oe.call(t,"__wrapped__");if(f||g){var _=f?e.value():e,x=g?t.value():t;return a||(a=new $n),o(_,x,r,i,a)}}if(!p)return!1;return a||(a=new $n),function(e,t,r,i,o,a){var s=1&r,l=ro(e),u=l.length,c=ro(t),h=c.length;if(u!=h&&!s)return!1;var d=u;for(;d--;){var p=l[d];if(!(s?p in t:Oe.call(t,p)))return!1}var f=a.get(e),g=a.get(t);if(f&&g)return f==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);var v=s;for(;++d<u;){var y=e[p=l[d]],w=t[p];if(i)var b=s?i(w,y,p,t,e,a):i(y,w,p,e,t,a);if(!(b===n?y===w||o(y,w,r,i,a):b)){m=!1;break}v||(v="constructor"==p)}if(m&&!v){var _=e.constructor,x=t.constructor;_==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,r,i,o,a)}(e,t,r,i,Lr,o))}function Dr(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=Me(e);o--;){var l=r[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var u=(l=r[o])[0],c=e[u],h=l[1];if(s&&l[2]){if(c===n&&!(u in e))return!1}else{var d=new $n;if(i)var p=i(c,h,u,e,t,d);if(!(p===n?Lr(h,c,3,i,d):p))return!1}}return!0}function Fr(e){return!(!es(e)||(t=e,Ne&&Ne in t))&&(Ja(e)?Ue:ve).test(Io(e));var t}function Or(e){return"function"==typeof e?e:null==e?rl:"object"==typeof e?Wa(e)?Ur(e[0],e[1]):Br(e):dl(e)}function jr(e){if(!Ao(e))return Zt(e);var t=[];for(var n in Me(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Nr(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in Me(e))t.push(n);return t}(e);var t=Ao(e),n=[];for(var r in e)("constructor"!=r||!t&&Oe.call(e,r))&&n.push(r);return n}function Ir(e,t){return e<t}function zr(e,t){var n=-1,r=qa(e)?oe(e.length):[];return dr(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function Br(e){var t=co(e);return 1==t.length&&t[0][2]?Mo(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function Ur(e,t){return _o(e)&&Po(t)?Mo(No(e),t):function(r){var i=Ms(r,e);return i===n&&i===t?Cs(r,e):Lr(t,i,3)}}function Hr(e,t,r,i,o){e!==t&&yr(t,function(a,s){if(o||(o=new $n),es(a))!function(e,t,r,i,o,a,s){var l=To(e,r),u=To(t,r),c=s.get(u);if(c)return void er(e,r,c);var h=a?a(l,u,r+"",e,t,s):n,d=h===n;if(d){var p=Wa(u),f=!p&&Ya(u),g=!p&&!f&&us(u);h=u,p||f||g?Wa(l)?h=l:Za(l)?h=Ti(l):f?(d=!1,h=Si(u,!0)):g?(d=!1,h=Pi(u,!0)):h=[]:is(u)||Ga(u)?(h=l,Ga(l)?h=vs(l):es(l)&&!Ja(l)||(h=vo(u))):d=!1}d&&(s.set(u,h),o(h,u,i,a,s),s.delete(u));er(e,r,h)}(e,t,s,r,Hr,i,o);else{var l=i?i(To(e,s),a,s+"",e,t,o):n;l===n&&(l=a),er(e,s,l)}},Ls)}function Gr(e,t){var r=e.length;if(r)return wo(t+=t<0?r:0,r)?e[t]:n}function Wr(e,t,n){t=t.length?Ft(t,function(e){return Wa(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e}):[rl];var r=-1;t=Ft(t,Xt(lo()));var i=zr(e,function(e,n,i){var o=Ft(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var l=Mi(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Vr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Sr(e,a);n(s,a)&&Qr(o,wi(a,e),s)}return o}function qr(e,t,n,r){var i=r?Gt:Ht,o=-1,a=t.length,s=e;for(e===t&&(t=Ti(t)),n&&(s=Ft(e,Xt(n)));++o<a;)for(var l=0,u=t[o],c=n?n(u):u;(l=i(s,c,l,r))>-1;)s!==e&&$e.call(s,l,1),$e.call(e,l,1);return e}function Zr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;wo(i)?$e.call(e,i,1):hi(e,i)}}return e}function Yr(e,t){return e+gt(xn()*(t-e+1))}function $r(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Lo(Co(e,t,rl),e+"")}function Jr(e){return Jn(Bs(e))}function Xr(e,t){var n=Bs(e);return Oo(n,sr(t,0,n.length))}function Qr(e,t,r,i){if(!es(e))return e;for(var o=-1,a=(t=wi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var u=No(t[o]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=s){var h=l[u];(c=i?i(h,u,l):n)===n&&(c=es(h)?h:wo(t[o+1])?[]:{})}tr(l,u,c),l=l[u]}return e}var ei=En?function(e,t){return En.set(e,t),e}:rl,ti=tt?function(e,t){return tt(e,"toString",{configurable:!0,enumerable:!1,value:el(t),writable:!0})}:rl;function ni(e){return Oo(Bs(e))}function ri(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=oe(i);++r<i;)o[r]=e[r+t];return o}function ii(e,t){var n;return dr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ls(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ai(e,t,rl,n)}function ai(e,t,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,u=ls(t),c=t===n;o<a;){var h=gt((o+a)/2),d=r(e[h]),p=d!==n,f=null===d,g=d==d,m=ls(d);if(s)var v=i||g;else v=c?g&&(i||p):l?g&&p&&(i||!f):u?g&&p&&!f&&(i||!m):!f&&!m&&(i?d<=t:d<t);v?o=h+1:a=h}return wn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Ba(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function li(e){return"number"==typeof e?e:ls(e)?p:+e}function ui(e){if("string"==typeof e)return e;if(Wa(e))return Ft(e,ui)+"";if(ls(e))return zn?zn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ci(e,t,n){var r=-1,i=Lt,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Dt;else if(o>=200){var u=t?null:$i(e);if(u)return hn(u);a=!1,i=en,l=new Yn}else l=t?[]:s;e:for(;++r<o;){var c=e[r],h=t?t(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;t&&l.push(h),s.push(c)}else i(l,h,n)||(l!==s&&l.push(h),s.push(c))}return s}function hi(e,t){return null==(e=ko(e,t=wi(t,e)))||delete e[No(Ko(t))]}function di(e,t,n,r){return Qr(e,t,n(Sr(e,t)),r)}function pi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof Wn&&(n=n.value()),jt(t,function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))},n)}function gi(e,t,n){var r=e.length;if(r<2)return r?ci(e[0]):[];for(var i=-1,o=oe(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=hr(o[i]||a,e[s],t,n));return ci(vr(o,1),t,n)}function mi(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var l=i<a?t[i]:n;r(s,e[i],l)}return s}function vi(e){return Za(e)?e:[]}function yi(e){return"function"==typeof e?e:rl}function wi(e,t){return Wa(e)?e:_o(e,t)?[e]:jo(ys(e))}var bi=Kr;function _i(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:ri(e,t,r)}var xi=rt||function(e){return ft.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function Ai(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function Pi(e,t){var n=t?Ai(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Mi(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=ls(e),s=t!==n,l=null===t,u=t==t,c=ls(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!r&&u||!o)return 1;if(!i&&!a&&!c&&e<t||c&&r&&o&&!i&&!a||l&&r&&o||!s&&o||!u)return-1}return 0}function Ci(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,u=yn(o-a,0),c=oe(l+u),h=!r;++s<l;)c[s]=t[s];for(;++i<a;)(h||i<o)&&(c[n[i]]=e[i]);for(;u--;)c[s++]=e[i++];return c}function ki(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,u=t.length,c=yn(o-s,0),h=oe(c+u),d=!r;++i<c;)h[i]=e[i];for(var p=i;++l<u;)h[p+l]=t[l];for(;++a<s;)(d||i<o)&&(h[p+n[a]]=e[i++]);return h}function Ti(e,t){var n=-1,r=e.length;for(t||(t=oe(r));++n<r;)t[n]=e[n];return t}function Ei(e,t,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=i?i(r[l],e[l],l,r,e):n;u===n&&(u=e[l]),o?or(r,l,u):tr(r,l,u)}return r}function Ri(e,t){return function(n,r){var i=Wa(n)?Ct:rr,o=t?t():{};return i(n,e,lo(r,2),o)}}function Li(e){return Kr(function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&bo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=Me(t);++i<o;){var l=r[i];l&&e(t,l,i,a)}return t})}function Di(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Me(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Fi(e){return function(t,n,r){for(var i=-1,o=Me(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function Oi(e){return function(t){var r=sn(t=ys(t))?fn(t):n,i=r?r[0]:t.charAt(0),o=r?_i(r,1).join(""):t.slice(1);return i[e]()+o}}function ji(e){return function(t){return jt(Js(Gs(t).replace(Qe,"")),e,"")}}function Ni(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Un(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Ii(e){return function(t,r,i){var o=Me(t);if(!qa(t)){var a=lo(r,3);t=Rs(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function zi(e){return no(function(t){var i=t.length,o=i,a=Gn.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Te(r);if(a&&!l&&"wrapper"==ao(s))var l=new Gn([],!0)}for(o=l?o:i;++o<i;){var u=ao(s=t[o]),c="wrapper"==u?oo(s):n;l=c&&xo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[ao(c[0])].apply(l,c[3]):1==s.length&&xo(s)?l[u]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Wa(n))return l.plant(n).value();for(var r=0,o=i?t[r].apply(this,e):n;++r<i;)o=t[r].call(this,o);return o}})}function Bi(e,t,r,i,o,a,s,l,c,h){var d=t&u,p=1&t,f=2&t,g=24&t,m=512&t,v=f?n:Ni(e);return function u(){for(var y=arguments.length,w=oe(y),b=y;b--;)w[b]=arguments[b];if(g)var _=so(u),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,_);if(i&&(w=Ci(w,i,o,g)),a&&(w=ki(w,a,s,g)),y-=x,g&&y<h){var S=cn(w,_);return Zi(e,t,Bi,u.placeholder,r,w,S,l,c,h-y)}var A=p?r:this,P=f?A[e]:e;return y=w.length,l?w=function(e,t){var r=e.length,i=wn(t.length,r),o=Ti(e);for(;i--;){var a=t[i];e[i]=wo(a,r)?o[a]:n}return e}(w,l):m&&y>1&&w.reverse(),d&&c<y&&(w.length=c),this&&this!==ft&&this instanceof u&&(P=v||Ni(P)),P.apply(A,w)}}function Ui(e,t){return function(n,r){return function(e,t,n,r){return br(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Hi(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=ui(r),i=ui(i)):(r=li(r),i=li(i)),o=e(r,i)}return o}}function Gi(e){return no(function(t){return t=Ft(t,Xt(lo())),Kr(function(n){var r=this;return e(t,function(e){return Mt(e,r,n)})})})}function Wi(e,t){var r=(t=t===n?" ":ui(t)).length;if(r<2)return r?$r(t,e):t;var i=$r(t,pt(e/pn(t)));return sn(t)?_i(fn(i),0,e).join(""):i.slice(0,e)}function Vi(e){return function(t,r,i){return i&&"number"!=typeof i&&bo(t,r,i)&&(r=i=n),t=ps(t),r===n?(r=t,t=0):r=ps(r),function(e,t,n,r){for(var i=-1,o=yn(pt((t-e)/(n||1)),0),a=oe(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,r,i=i===n?t<r?1:-1:ps(i),e)}}function qi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function Zi(e,t,r,i,o,a,u,c,h,d){var p=8&t;t|=p?s:l,4&(t&=~(p?l:s))||(t&=-4);var f=[e,t,o,p?a:n,p?u:n,p?n:a,p?n:u,c,h,d],g=r.apply(n,f);return xo(e)&&Eo(g,f),g.placeholder=i,Do(g,e,t)}function Yi(e){var t=Pe[e];return function(e,n){if(e=ms(e),(n=null==n?0:wn(fs(n),292))&&wt(e)){var r=(ys(e)+"e").split("e");return+((r=(ys(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var $i=Cn&&1/hn(new Cn([,-0]))[1]==h?function(e){return new Cn(e)}:ll;function Ki(e){return function(t){var n=go(t);return n==S?ln(t):n==k?dn(t):function(e,t){return Ft(t,function(t){return[t,e[t]]})}(t,e(t))}}function Ji(e,t,i,h,d,p,f,g){var m=2&t;if(!m&&"function"!=typeof e)throw new Te(r);var v=h?h.length:0;if(v||(t&=-97,h=d=n),f=f===n?f:yn(fs(f),0),g=g===n?g:fs(g),v-=d?d.length:0,t&l){var y=h,w=d;h=d=n}var b=m?n:oo(e),_=[e,t,i,h,d,y,w,p,f,g];if(b&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,s=r==u&&8==n||r==u&&n==c&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var h=e[3];e[3]=h?Ci(h,l,t[4]):l,e[4]=h?cn(e[3],o):t[4]}(l=t[5])&&(h=e[5],e[5]=h?ki(h,l,t[6]):l,e[6]=h?cn(e[5],o):t[6]);(l=t[7])&&(e[7]=l);r&u&&(e[8]=null==e[8]?t[8]:wn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(_,b),e=_[0],t=_[1],i=_[2],h=_[3],d=_[4],!(g=_[9]=_[9]===n?m?0:e.length:yn(_[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||t==a?function(e,t,r){var i=Ni(e);return function o(){for(var a=arguments.length,s=oe(a),l=a,u=so(o);l--;)s[l]=arguments[l];var c=a<3&&s[0]!==u&&s[a-1]!==u?[]:cn(s,u);return(a-=c.length)<r?Zi(e,t,Bi,o.placeholder,n,s,c,n,n,r-a):Mt(this&&this!==ft&&this instanceof o?i:e,this,s)}}(e,t,g):t!=s&&33!=t||d.length?Bi.apply(n,_):function(e,t,n,r){var i=1&t,o=Ni(e);return function t(){for(var a=-1,s=arguments.length,l=-1,u=r.length,c=oe(u+s),h=this&&this!==ft&&this instanceof t?o:e;++l<u;)c[l]=r[l];for(;s--;)c[l++]=arguments[++a];return Mt(h,i?n:this,c)}}(e,t,i,h);else var x=function(e,t,n){var r=1&t,i=Ni(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return Do((b?ei:Eo)(x,_),e,t)}function Xi(e,t,r,i){return e===n||Ba(e,Le[r])&&!Oe.call(i,r)?t:e}function Qi(e,t,r,i,o,a){return es(e)&&es(t)&&(a.set(t,e),Hr(e,t,n,Qi,a),a.delete(t)),e}function eo(e){return is(e)?n:e}function to(e,t,r,i,o,a){var s=1&r,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var d=-1,p=!0,f=2&r?new Yn:n;for(a.set(e,t),a.set(t,e);++d<l;){var g=e[d],m=t[d];if(i)var v=s?i(m,g,d,t,e,a):i(g,m,d,e,t,a);if(v!==n){if(v)continue;p=!1;break}if(f){if(!It(t,function(e,t){if(!en(f,t)&&(g===e||o(g,e,r,i,a)))return f.push(t)})){p=!1;break}}else if(g!==m&&!o(g,m,r,i,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function no(e){return Lo(Co(e,n,Vo),e+"")}function ro(e){return Ar(e,Rs,po)}function io(e){return Ar(e,Ls,fo)}var oo=En?function(e){return En.get(e)}:ll;function ao(e){for(var t=e.name+"",n=Rn[t],r=Oe.call(Rn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Oe.call(Bn,"placeholder")?Bn:e).placeholder}function lo(){var e=Bn.iteratee||il;return e=e===il?Or:e,arguments.length?e(arguments[0],arguments[1]):e}function uo(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function co(e){for(var t=Rs(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Po(i)]}return t}function ho(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Fr(r)?r:n}var po=mt?function(e){return null==e?[]:(e=Me(e),Rt(mt(e),function(t){return Ye.call(e,t)}))}:gl,fo=mt?function(e){for(var t=[];e;)Ot(t,po(e)),e=qe(e);return t}:gl,go=Pr;function mo(e,t,n){for(var r=-1,i=(t=wi(t,e)).length,o=!1;++r<i;){var a=No(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Qa(i)&&wo(a,i)&&(Wa(e)||Ga(e))}function vo(e){return"function"!=typeof e.constructor||Ao(e)?{}:Un(qe(e))}function yo(e){return Wa(e)||Ga(e)||!!(Ke&&e&&e[Ke])}function wo(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function bo(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&wo(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function _o(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ls(e))||(ee.test(e)||!Q.test(e)||null!=t&&e in Me(t))}function xo(e){var t=ao(e),n=Bn[t];if("function"!=typeof n||!(t in Wn.prototype))return!1;if(e===n)return!0;var r=oo(n);return!!r&&e===r[0]}(An&&go(new An(new ArrayBuffer(1)))!=D||Pn&&go(new Pn)!=S||Mn&&go(Mn.resolve())!=M||Cn&&go(new Cn)!=k||kn&&go(new kn)!=R)&&(go=function(e){var t=Pr(e),r=t==P?e.constructor:n,i=r?Io(r):"";if(i)switch(i){case Ln:return D;case Dn:return S;case Fn:return M;case On:return k;case jn:return R}return t});var So=De?Ja:ml;function Ao(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Le)}function Po(e){return e==e&&!es(e)}function Mo(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in Me(r)))}}function Co(e,t,r){return t=yn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=yn(n.length-t,0),a=oe(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=oe(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),Mt(e,this,s)}}function ko(e,t){return t.length<2?e:Sr(e,ri(t,0,-1))}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Eo=Fo(ei),Ro=dt||function(e,t){return ft.setTimeout(e,t)},Lo=Fo(ti);function Do(e,t,n){var r=t+"";return Lo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return kt(g,function(n){var r="_."+n[0];t&n[1]&&!Lt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ue):[]}(r),n)))}function Fo(e){var t=0,r=0;return function(){var i=bn(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Oo(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var a=Yr(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var jo=function(e){var t=Fa(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,function(e,n,r,i){t.push(r?i.replace(de,"$1"):n||e)}),t});function No(e){if("string"==typeof e||ls(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Io(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function zo(e){if(e instanceof Wn)return e.clone();var t=new Gn(e.__wrapped__,e.__chain__);return t.__actions__=Ti(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bo=Kr(function(e,t){return Za(e)?hr(e,vr(t,1,Za,!0)):[]}),Uo=Kr(function(e,t){var r=Ko(t);return Za(r)&&(r=n),Za(e)?hr(e,vr(t,1,Za,!0),lo(r,2)):[]}),Ho=Kr(function(e,t){var r=Ko(t);return Za(r)&&(r=n),Za(e)?hr(e,vr(t,1,Za,!0),n,r):[]});function Go(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=yn(r+i,0)),Ut(e,lo(t,3),i)}function Wo(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=fs(r),o=r<0?yn(i+o,0):wn(o,i-1)),Ut(e,lo(t,3),o,!0)}function Vo(e){return(null==e?0:e.length)?vr(e,1):[]}function qo(e){return e&&e.length?e[0]:n}var Zo=Kr(function(e){var t=Ft(e,vi);return t.length&&t[0]===e[0]?Tr(t):[]}),Yo=Kr(function(e){var t=Ko(e),r=Ft(e,vi);return t===Ko(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Tr(r,lo(t,2)):[]}),$o=Kr(function(e){var t=Ko(e),r=Ft(e,vi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Tr(r,n,t):[]});function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Jo=Kr(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?qr(e,t):e}var Qo=no(function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Zr(e,Ft(t,function(e){return wo(e,n)?+e:e}).sort(Mi)),r});function ea(e){return null==e?e:Sn.call(e)}var ta=Kr(function(e){return ci(vr(e,1,Za,!0))}),na=Kr(function(e){var t=Ko(e);return Za(t)&&(t=n),ci(vr(e,1,Za,!0),lo(t,2))}),ra=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:n,ci(vr(e,1,Za,!0),n,t)});function ia(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,function(e){if(Za(e))return t=yn(e.length,t),!0}),Kt(t,function(t){return Ft(e,qt(t))})}function oa(e,t){if(!e||!e.length)return[];var r=ia(e);return null==t?r:Ft(r,function(e){return Mt(t,n,e)})}var aa=Kr(function(e,t){return Za(e)?hr(e,t):[]}),sa=Kr(function(e){return gi(Rt(e,Za))}),la=Kr(function(e){var t=Ko(e);return Za(t)&&(t=n),gi(Rt(e,Za),lo(t,2))}),ua=Kr(function(e){var t=Ko(e);return t="function"==typeof t?t:n,gi(Rt(e,Za),n,t)}),ca=Kr(ia);var ha=Kr(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,oa(e,r)});function da(e){var t=Bn(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var fa=no(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Wn&&wo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:pa,args:[o],thisArg:n}),new Gn(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(o)});var ga=Ri(function(e,t,n){Oe.call(e,n)?++e[n]:or(e,n,1)});var ma=Ii(Go),va=Ii(Wo);function ya(e,t){return(Wa(e)?kt:dr)(e,lo(t,3))}function wa(e,t){return(Wa(e)?Tt:pr)(e,lo(t,3))}var ba=Ri(function(e,t,n){Oe.call(e,n)?e[n].push(t):or(e,n,[t])});var _a=Kr(function(e,t,n){var r=-1,i="function"==typeof t,o=qa(e)?oe(e.length):[];return dr(e,function(e){o[++r]=i?Mt(t,e,n):Er(e,t,n)}),o}),xa=Ri(function(e,t,n){or(e,n,t)});function Sa(e,t){return(Wa(e)?Ft:zr)(e,lo(t,3))}var Aa=Ri(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var Pa=Kr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&bo(e,t[0],t[1])?t=[]:n>2&&bo(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,vr(t,1),[])}),Ma=ut||function(){return ft.Date.now()};function Ca(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Ji(e,u,n,n,n,n,t)}function ka(e,t){var i;if("function"!=typeof t)throw new Te(r);return e=fs(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Ta=Kr(function(e,t,n){var r=1;if(n.length){var i=cn(n,so(Ta));r|=s}return Ji(e,r,t,n,i)}),Ea=Kr(function(e,t,n){var r=3;if(n.length){var i=cn(n,so(Ea));r|=s}return Ji(t,r,e,n,i)});function Ra(e,t,i){var o,a,s,l,u,c,h=0,d=!1,p=!1,f=!0;if("function"!=typeof e)throw new Te(r);function g(t){var r=o,i=a;return o=a=n,h=t,l=e.apply(i,r)}function m(e){var r=e-c;return c===n||r>=t||r<0||p&&e-h>=s}function v(){var e=Ma();if(m(e))return y(e);u=Ro(v,function(e){var n=t-(e-c);return p?wn(n,s-(e-h)):n}(e))}function y(e){return u=n,f&&o?g(e):(o=a=n,l)}function w(){var e=Ma(),r=m(e);if(o=arguments,a=this,c=e,r){if(u===n)return function(e){return h=e,u=Ro(v,t),d?g(e):l}(c);if(p)return xi(u),u=Ro(v,t),g(c)}return u===n&&(u=Ro(v,t)),l}return t=ms(t)||0,es(i)&&(d=!!i.leading,s=(p="maxWait"in i)?yn(ms(i.maxWait)||0,t):s,f="trailing"in i?!!i.trailing:f),w.cancel=function(){u!==n&&xi(u),h=0,o=c=a=u=n},w.flush=function(){return u===n?l:y(Ma())},w}var La=Kr(function(e,t){return cr(e,1,t)}),Da=Kr(function(e,t,n){return cr(e,ms(t)||0,n)});function Fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(r);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Fa.Cache||Zn),n}function Oa(e){if("function"!=typeof e)throw new Te(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fa.Cache=Zn;var ja=bi(function(e,t){var n=(t=1==t.length&&Wa(t[0])?Ft(t[0],Xt(lo())):Ft(vr(t,1),Xt(lo()))).length;return Kr(function(r){for(var i=-1,o=wn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Mt(e,this,r)})}),Na=Kr(function(e,t){var r=cn(t,so(Na));return Ji(e,s,n,t,r)}),Ia=Kr(function(e,t){var r=cn(t,so(Ia));return Ji(e,l,n,t,r)}),za=no(function(e,t){return Ji(e,c,n,n,n,t)});function Ba(e,t){return e===t||e!=e&&t!=t}var Ua=qi(Mr),Ha=qi(function(e,t){return e>=t}),Ga=Rr(function(){return arguments}())?Rr:function(e){return ts(e)&&Oe.call(e,"callee")&&!Ye.call(e,"callee")},Wa=oe.isArray,Va=bt?Xt(bt):function(e){return ts(e)&&Pr(e)==L};function qa(e){return null!=e&&Qa(e.length)&&!Ja(e)}function Za(e){return ts(e)&&qa(e)}var Ya=yt||ml,$a=_t?Xt(_t):function(e){return ts(e)&&Pr(e)==w};function Ka(e){if(!ts(e))return!1;var t=Pr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Ja(e){if(!es(e))return!1;var t=Pr(e);return t==_||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xa(e){return"number"==typeof e&&e==fs(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=xt?Xt(xt):function(e){return ts(e)&&go(e)==S};function rs(e){return"number"==typeof e||ts(e)&&Pr(e)==A}function is(e){if(!ts(e)||Pr(e)!=P)return!1;var t=qe(e);if(null===t)return!0;var n=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Fe.call(n)==ze}var os=St?Xt(St):function(e){return ts(e)&&Pr(e)==C};var as=At?Xt(At):function(e){return ts(e)&&go(e)==k};function ss(e){return"string"==typeof e||!Wa(e)&&ts(e)&&Pr(e)==T}function ls(e){return"symbol"==typeof e||ts(e)&&Pr(e)==E}var us=Pt?Xt(Pt):function(e){return ts(e)&&Qa(e.length)&&!!st[Pr(e)]};var cs=qi(Ir),hs=qi(function(e,t){return e<=t});function ds(e){if(!e)return[];if(qa(e))return ss(e)?fn(e):Ti(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=go(e);return(t==S?ln:t==k?hn:Bs)(e)}function ps(e){return e?(e=ms(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fs(e){var t=ps(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?sr(fs(e),0,f):0}function ms(e){if("number"==typeof e)return e;if(ls(e))return p;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=me.test(e);return n||ye.test(e)?ht(e.slice(2),n?2:8):ge.test(e)?p:+e}function vs(e){return Ei(e,Ls(e))}function ys(e){return null==e?"":ui(e)}var ws=Li(function(e,t){if(Ao(t)||qa(t))Ei(t,Rs(t),e);else for(var n in t)Oe.call(t,n)&&tr(e,n,t[n])}),bs=Li(function(e,t){Ei(t,Ls(t),e)}),_s=Li(function(e,t,n,r){Ei(t,Ls(t),e,r)}),xs=Li(function(e,t,n,r){Ei(t,Rs(t),e,r)}),Ss=no(ar);var As=Kr(function(e,t){e=Me(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&bo(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=Ls(a),l=-1,u=s.length;++l<u;){var c=s[l],h=e[c];(h===n||Ba(h,Le[c])&&!Oe.call(e,c))&&(e[c]=a[c])}return e}),Ps=Kr(function(e){return e.push(n,Qi),Mt(Fs,n,e)});function Ms(e,t,r){var i=null==e?n:Sr(e,t);return i===n?r:i}function Cs(e,t){return null!=e&&mo(e,t,kr)}var ks=Ui(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ie.call(t)),e[t]=n},el(rl)),Ts=Ui(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ie.call(t)),Oe.call(e,t)?e[t].push(n):e[t]=[n]},lo),Es=Kr(Er);function Rs(e){return qa(e)?Kn(e):jr(e)}function Ls(e){return qa(e)?Kn(e,!0):Nr(e)}var Ds=Li(function(e,t,n){Hr(e,t,n)}),Fs=Li(function(e,t,n,r){Hr(e,t,n,r)}),Os=no(function(e,t){var n={};if(null==e)return n;var r=!1;t=Ft(t,function(t){return t=wi(t,e),r||(r=t.length>1),t}),Ei(e,io(e),n),r&&(n=lr(n,7,eo));for(var i=t.length;i--;)hi(n,t[i]);return n});var js=no(function(e,t){return null==e?{}:function(e,t){return Vr(e,t,function(t,n){return Cs(e,n)})}(e,t)});function Ns(e,t){if(null==e)return{};var n=Ft(io(e),function(e){return[e]});return t=lo(t),Vr(e,n,function(e,n){return t(e,n[0])})}var Is=Ki(Rs),zs=Ki(Ls);function Bs(e){return null==e?[]:Qt(e,Rs(e))}var Us=ji(function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)});function Hs(e){return Ks(ys(e).toLowerCase())}function Gs(e){return(e=ys(e))&&e.replace(be,rn).replace(et,"")}var Ws=ji(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Vs=ji(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),qs=Oi("toLowerCase");var Zs=ji(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var Ys=ji(function(e,t,n){return e+(n?" ":"")+Ks(t)});var $s=ji(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ks=Oi("toUpperCase");function Js(e,t,r){return e=ys(e),(t=r?n:t)===n?function(e){return it.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Xs=Kr(function(e,t){try{return Mt(e,n,t)}catch(e){return Ka(e)?e:new Se(e)}}),Qs=no(function(e,t){return kt(t,function(t){t=No(t),or(e,t,Ta(e[t],e))}),e});function el(e){return function(){return e}}var tl=zi(),nl=zi(!0);function rl(e){return e}function il(e){return Or("function"==typeof e?e:lr(e,1))}var ol=Kr(function(e,t){return function(n){return Er(n,e,t)}}),al=Kr(function(e,t){return function(n){return Er(e,n,t)}});function sl(e,t,n){var r=Rs(t),i=xr(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=xr(t,Rs(t)));var o=!(es(n)&&"chain"in n&&!n.chain),a=Ja(e);return kt(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ot([this.value()],arguments))})}),e}function ll(){}var ul=Gi(Ft),cl=Gi(Et),hl=Gi(It);function dl(e){return _o(e)?qt(No(e)):function(e){return function(t){return Sr(t,e)}}(e)}var pl=Vi(),fl=Vi(!0);function gl(){return[]}function ml(){return!1}var vl=Hi(function(e,t){return e+t},0),yl=Yi("ceil"),wl=Hi(function(e,t){return e/t},1),bl=Yi("floor");var _l,xl=Hi(function(e,t){return e*t},1),Sl=Yi("round"),Al=Hi(function(e,t){return e-t},0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Te(r);return e=fs(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Ca,Bn.assign=ws,Bn.assignIn=bs,Bn.assignInWith=_s,Bn.assignWith=xs,Bn.at=Ss,Bn.before=ka,Bn.bind=Ta,Bn.bindAll=Qs,Bn.bindKey=Ea,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Bn.chain=da,Bn.chunk=function(e,t,r){t=(r?bo(e,t,r):t===n)?1:yn(fs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=oe(pt(i/t));o<i;)s[a++]=ri(e,o,o+=t);return s},Bn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Bn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=oe(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Ot(Wa(n)?Ti(n):[n],vr(t,1))},Bn.cond=function(e){var t=null==e?0:e.length,n=lo();return e=t?Ft(e,function(e){if("function"!=typeof e[1])throw new Te(r);return[n(e[0]),e[1]]}):[],Kr(function(n){for(var r=-1;++r<t;){var i=e[r];if(Mt(i[0],this,n))return Mt(i[1],this,n)}})},Bn.conforms=function(e){return function(e){var t=Rs(e);return function(n){return ur(n,e,t)}}(lr(e,1))},Bn.constant=el,Bn.countBy=ga,Bn.create=function(e,t){var n=Un(e);return null==t?n:ir(n,t)},Bn.curry=function e(t,r,i){var o=Ji(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Bn.curryRight=function e(t,r,i){var o=Ji(t,a,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Bn.debounce=Ra,Bn.defaults=As,Bn.defaultsDeep=Ps,Bn.defer=La,Bn.delay=Da,Bn.difference=Bo,Bn.differenceBy=Uo,Bn.differenceWith=Ho,Bn.drop=function(e,t,r){var i=null==e?0:e.length;return i?ri(e,(t=r||t===n?1:fs(t))<0?0:t,i):[]},Bn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?ri(e,0,(t=i-(t=r||t===n?1:fs(t)))<0?0:t):[]},Bn.dropRightWhile=function(e,t){return e&&e.length?pi(e,lo(t,3),!0,!0):[]},Bn.dropWhile=function(e,t){return e&&e.length?pi(e,lo(t,3),!0):[]},Bn.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&bo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=fs(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:fs(i))<0&&(i+=o),i=r>i?0:gs(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},Bn.filter=function(e,t){return(Wa(e)?Rt:mr)(e,lo(t,3))},Bn.flatMap=function(e,t){return vr(Sa(e,t),1)},Bn.flatMapDeep=function(e,t){return vr(Sa(e,t),h)},Bn.flatMapDepth=function(e,t,r){return r=r===n?1:fs(r),vr(Sa(e,t),r)},Bn.flatten=Vo,Bn.flattenDeep=function(e){return(null==e?0:e.length)?vr(e,h):[]},Bn.flattenDepth=function(e,t){return(null==e?0:e.length)?vr(e,t=t===n?1:fs(t)):[]},Bn.flip=function(e){return Ji(e,512)},Bn.flow=tl,Bn.flowRight=nl,Bn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Bn.functions=function(e){return null==e?[]:xr(e,Rs(e))},Bn.functionsIn=function(e){return null==e?[]:xr(e,Ls(e))},Bn.groupBy=ba,Bn.initial=function(e){return(null==e?0:e.length)?ri(e,0,-1):[]},Bn.intersection=Zo,Bn.intersectionBy=Yo,Bn.intersectionWith=$o,Bn.invert=ks,Bn.invertBy=Ts,Bn.invokeMap=_a,Bn.iteratee=il,Bn.keyBy=xa,Bn.keys=Rs,Bn.keysIn=Ls,Bn.map=Sa,Bn.mapKeys=function(e,t){var n={};return t=lo(t,3),br(e,function(e,r,i){or(n,t(e,r,i),e)}),n},Bn.mapValues=function(e,t){var n={};return t=lo(t,3),br(e,function(e,r,i){or(n,r,t(e,r,i))}),n},Bn.matches=function(e){return Br(lr(e,1))},Bn.matchesProperty=function(e,t){return Ur(e,lr(t,1))},Bn.memoize=Fa,Bn.merge=Ds,Bn.mergeWith=Fs,Bn.method=ol,Bn.methodOf=al,Bn.mixin=sl,Bn.negate=Oa,Bn.nthArg=function(e){return e=fs(e),Kr(function(t){return Gr(t,e)})},Bn.omit=Os,Bn.omitBy=function(e,t){return Ns(e,Oa(lo(t)))},Bn.once=function(e){return ka(2,e)},Bn.orderBy=function(e,t,r,i){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(r=i?n:r)||(r=null==r?[]:[r]),Wr(e,t,r))},Bn.over=ul,Bn.overArgs=ja,Bn.overEvery=cl,Bn.overSome=hl,Bn.partial=Na,Bn.partialRight=Ia,Bn.partition=Aa,Bn.pick=js,Bn.pickBy=Ns,Bn.property=dl,Bn.propertyOf=function(e){return function(t){return null==e?n:Sr(e,t)}},Bn.pull=Jo,Bn.pullAll=Xo,Bn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,lo(n,2)):e},Bn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?qr(e,t,n,r):e},Bn.pullAt=Qo,Bn.range=pl,Bn.rangeRight=fl,Bn.rearg=za,Bn.reject=function(e,t){return(Wa(e)?Rt:mr)(e,Oa(lo(t,3)))},Bn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=lo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Zr(e,i),n},Bn.rest=function(e,t){if("function"!=typeof e)throw new Te(r);return Kr(e,t=t===n?t:fs(t))},Bn.reverse=ea,Bn.sampleSize=function(e,t,r){return t=(r?bo(e,t,r):t===n)?1:fs(t),(Wa(e)?Xn:Xr)(e,t)},Bn.set=function(e,t,n){return null==e?e:Qr(e,t,n)},Bn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:Qr(e,t,r,i)},Bn.shuffle=function(e){return(Wa(e)?Qn:ni)(e)},Bn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&bo(e,t,r)?(t=0,r=i):(t=null==t?0:fs(t),r=r===n?i:fs(r)),ri(e,t,r)):[]},Bn.sortBy=Pa,Bn.sortedUniq=function(e){return e&&e.length?si(e):[]},Bn.sortedUniqBy=function(e,t){return e&&e.length?si(e,lo(t,2)):[]},Bn.split=function(e,t,r){return r&&"number"!=typeof r&&bo(e,t,r)&&(t=r=n),(r=r===n?f:r>>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ui(t))&&sn(e)?_i(fn(e),0,r):e.split(t,r):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Te(r);return t=null==t?0:yn(fs(t),0),Kr(function(n){var r=n[t],i=_i(n,0,t);return r&&Ot(i,r),Mt(e,this,i)})},Bn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Bn.take=function(e,t,r){return e&&e.length?ri(e,0,(t=r||t===n?1:fs(t))<0?0:t):[]},Bn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?ri(e,(t=i-(t=r||t===n?1:fs(t)))<0?0:t,i):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?pi(e,lo(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?pi(e,lo(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new Te(r);return es(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Ra(e,t,{leading:i,maxWait:t,trailing:o})},Bn.thru=pa,Bn.toArray=ds,Bn.toPairs=Is,Bn.toPairsIn=zs,Bn.toPath=function(e){return Wa(e)?Ft(e,No):ls(e)?[e]:Ti(jo(ys(e)))},Bn.toPlainObject=vs,Bn.transform=function(e,t,n){var r=Wa(e),i=r||Ya(e)||us(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Ja(o)?Un(qe(e)):{}}return(i?kt:br)(e,function(e,r,i){return t(n,e,r,i)}),n},Bn.unary=function(e){return Ca(e,1)},Bn.union=ta,Bn.unionBy=na,Bn.unionWith=ra,Bn.uniq=function(e){return e&&e.length?ci(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?ci(e,lo(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?ci(e,n,t):[]},Bn.unset=function(e,t){return null==e||hi(e,t)},Bn.unzip=ia,Bn.unzipWith=oa,Bn.update=function(e,t,n){return null==e?e:di(e,t,yi(n))},Bn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:di(e,t,yi(r),i)},Bn.values=Bs,Bn.valuesIn=function(e){return null==e?[]:Qt(e,Ls(e))},Bn.without=aa,Bn.words=Js,Bn.wrap=function(e,t){return Na(yi(t),e)},Bn.xor=sa,Bn.xorBy=la,Bn.xorWith=ua,Bn.zip=ca,Bn.zipObject=function(e,t){return mi(e||[],t||[],tr)},Bn.zipObjectDeep=function(e,t){return mi(e||[],t||[],Qr)},Bn.zipWith=ha,Bn.entries=Is,Bn.entriesIn=zs,Bn.extend=bs,Bn.extendWith=_s,sl(Bn,Bn),Bn.add=vl,Bn.attempt=Xs,Bn.camelCase=Us,Bn.capitalize=Hs,Bn.ceil=yl,Bn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ms(r))==r?r:0),t!==n&&(t=(t=ms(t))==t?t:0),sr(ms(e),t,r)},Bn.clone=function(e){return lr(e,4)},Bn.cloneDeep=function(e){return lr(e,5)},Bn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:n)},Bn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:n)},Bn.conformsTo=function(e,t){return null==t||ur(e,t,Rs(t))},Bn.deburr=Gs,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=wl,Bn.endsWith=function(e,t,r){e=ys(e),t=ui(t);var i=e.length,o=r=r===n?i:sr(fs(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},Bn.eq=Ba,Bn.escape=function(e){return(e=ys(e))&&$.test(e)?e.replace(Z,on):e},Bn.escapeRegExp=function(e){return(e=ys(e))&&re.test(e)?e.replace(ne,"\\$&"):e},Bn.every=function(e,t,r){var i=Wa(e)?Et:fr;return r&&bo(e,t,r)&&(t=n),i(e,lo(t,3))},Bn.find=ma,Bn.findIndex=Go,Bn.findKey=function(e,t){return Bt(e,lo(t,3),br)},Bn.findLast=va,Bn.findLastIndex=Wo,Bn.findLastKey=function(e,t){return Bt(e,lo(t,3),_r)},Bn.floor=bl,Bn.forEach=ya,Bn.forEachRight=wa,Bn.forIn=function(e,t){return null==e?e:yr(e,lo(t,3),Ls)},Bn.forInRight=function(e,t){return null==e?e:wr(e,lo(t,3),Ls)},Bn.forOwn=function(e,t){return e&&br(e,lo(t,3))},Bn.forOwnRight=function(e,t){return e&&_r(e,lo(t,3))},Bn.get=Ms,Bn.gt=Ua,Bn.gte=Ha,Bn.has=function(e,t){return null!=e&&mo(e,t,Cr)},Bn.hasIn=Cs,Bn.head=qo,Bn.identity=rl,Bn.includes=function(e,t,n,r){e=qa(e)?e:Bs(e),n=n&&!r?fs(n):0;var i=e.length;return n<0&&(n=yn(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ht(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fs(n);return i<0&&(i=yn(r+i,0)),Ht(e,t,i)},Bn.inRange=function(e,t,r){return t=ps(t),r===n?(r=t,t=0):r=ps(r),function(e,t,n){return e>=wn(t,n)&&e<yn(t,n)}(e=ms(e),t,r)},Bn.invoke=Es,Bn.isArguments=Ga,Bn.isArray=Wa,Bn.isArrayBuffer=Va,Bn.isArrayLike=qa,Bn.isArrayLikeObject=Za,Bn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Pr(e)==y},Bn.isBuffer=Ya,Bn.isDate=$a,Bn.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},Bn.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||us(e)||Ga(e)))return!e.length;var t=go(e);if(t==S||t==k)return!e.size;if(Ao(e))return!jr(e).length;for(var n in e)if(Oe.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Lr(e,t)},Bn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Lr(e,t,n,r):!!i},Bn.isError=Ka,Bn.isFinite=function(e){return"number"==typeof e&&wt(e)},Bn.isFunction=Ja,Bn.isInteger=Xa,Bn.isLength=Qa,Bn.isMap=ns,Bn.isMatch=function(e,t){return e===t||Dr(e,t,co(t))},Bn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Dr(e,t,co(t),r)},Bn.isNaN=function(e){return rs(e)&&e!=+e},Bn.isNative=function(e){if(So(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Fr(e)},Bn.isNil=function(e){return null==e},Bn.isNull=function(e){return null===e},Bn.isNumber=rs,Bn.isObject=es,Bn.isObjectLike=ts,Bn.isPlainObject=is,Bn.isRegExp=os,Bn.isSafeInteger=function(e){return Xa(e)&&e>=-9007199254740991&&e<=d},Bn.isSet=as,Bn.isString=ss,Bn.isSymbol=ls,Bn.isTypedArray=us,Bn.isUndefined=function(e){return e===n},Bn.isWeakMap=function(e){return ts(e)&&go(e)==R},Bn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Pr(e)},Bn.join=function(e,t){return null==e?"":zt.call(e,t)},Bn.kebabCase=Ws,Bn.last=Ko,Bn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=fs(r))<0?yn(i+o,0):wn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ut(e,Wt,o,!0)},Bn.lowerCase=Vs,Bn.lowerFirst=qs,Bn.lt=cs,Bn.lte=hs,Bn.max=function(e){return e&&e.length?gr(e,rl,Mr):n},Bn.maxBy=function(e,t){return e&&e.length?gr(e,lo(t,2),Mr):n},Bn.mean=function(e){return Vt(e,rl)},Bn.meanBy=function(e,t){return Vt(e,lo(t,2))},Bn.min=function(e){return e&&e.length?gr(e,rl,Ir):n},Bn.minBy=function(e,t){return e&&e.length?gr(e,lo(t,2),Ir):n},Bn.stubArray=gl,Bn.stubFalse=ml,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=xl,Bn.nth=function(e,t){return e&&e.length?Gr(e,fs(t)):n},Bn.noConflict=function(){return ft._===this&&(ft._=Be),this},Bn.noop=ll,Bn.now=Ma,Bn.pad=function(e,t,n){e=ys(e);var r=(t=fs(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Wi(gt(i),n)+e+Wi(pt(i),n)},Bn.padEnd=function(e,t,n){e=ys(e);var r=(t=fs(t))?pn(e):0;return t&&r<t?e+Wi(t-r,n):e},Bn.padStart=function(e,t,n){e=ys(e);var r=(t=fs(t))?pn(e):0;return t&&r<t?Wi(t-r,n)+e:e},Bn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(ys(e).replace(ie,""),t||0)},Bn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&bo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=ps(e),t===n?(t=e,e=0):t=ps(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=xn();return wn(e+o*(t-e+ct("1e-"+((o+"").length-1))),t)}return Yr(e,t)},Bn.reduce=function(e,t,n){var r=Wa(e)?jt:Yt,i=arguments.length<3;return r(e,lo(t,4),n,i,dr)},Bn.reduceRight=function(e,t,n){var r=Wa(e)?Nt:Yt,i=arguments.length<3;return r(e,lo(t,4),n,i,pr)},Bn.repeat=function(e,t,r){return t=(r?bo(e,t,r):t===n)?1:fs(t),$r(ys(e),t)},Bn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,r){var i=-1,o=(t=wi(t,e)).length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[No(t[i])];a===n&&(i=o,a=r),e=Ja(a)?a.call(e):a}return e},Bn.round=Sl,Bn.runInContext=e,Bn.sample=function(e){return(Wa(e)?Jn:Jr)(e)},Bn.size=function(e){if(null==e)return 0;if(qa(e))return ss(e)?pn(e):e.length;var t=go(e);return t==S||t==k?e.size:jr(e).length},Bn.snakeCase=Zs,Bn.some=function(e,t,r){var i=Wa(e)?It:ii;return r&&bo(e,t,r)&&(t=n),i(e,lo(t,3))},Bn.sortedIndex=function(e,t){return oi(e,t)},Bn.sortedIndexBy=function(e,t,n){return ai(e,t,lo(n,2))},Bn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Ba(e[r],t))return r}return-1},Bn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Bn.sortedLastIndexBy=function(e,t,n){return ai(e,t,lo(n,2),!0)},Bn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},Bn.startCase=Ys,Bn.startsWith=function(e,t,n){return e=ys(e),n=null==n?0:sr(fs(n),0,e.length),t=ui(t),e.slice(n,n+t.length)==t},Bn.subtract=Al,Bn.sum=function(e){return e&&e.length?$t(e,rl):0},Bn.sumBy=function(e,t){return e&&e.length?$t(e,lo(t,2)):0},Bn.template=function(e,t,r){var i=Bn.templateSettings;r&&bo(e,t,r)&&(t=n),e=ys(e),t=_s({},t,i,Xi);var o,a,s=_s({},t.imports,i.imports,Xi),l=Rs(s),u=Qt(s,l),c=0,h=t.interpolate||_e,d="__p += '",p=Ce((t.escape||_e).source+"|"+h.source+"|"+(h===X?pe:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),f="//# sourceURL="+(Oe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(p,function(t,n,r,i,s,l){return r||(r=i),d+=e.slice(c,l).replace(xe,an),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+t.length,t}),d+="';\n";var g=Oe.call(t,"variable")&&t.variable;if(g){if(he.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(G,""):d).replace(W,"$1").replace(V,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Xs(function(){return Ae(l,f+"return "+d).apply(n,u)});if(m.source=d,Ka(m))throw m;return m},Bn.times=function(e,t){if((e=fs(e))<1||e>d)return[];var n=f,r=wn(e,f);t=lo(t),e-=f;for(var i=Kt(r,t);++n<e;)t(n);return i},Bn.toFinite=ps,Bn.toInteger=fs,Bn.toLength=gs,Bn.toLower=function(e){return ys(e).toLowerCase()},Bn.toNumber=ms,Bn.toSafeInteger=function(e){return e?sr(fs(e),-9007199254740991,d):0===e?e:0},Bn.toString=ys,Bn.toUpper=function(e){return ys(e).toUpperCase()},Bn.trim=function(e,t,r){if((e=ys(e))&&(r||t===n))return Jt(e);if(!e||!(t=ui(t)))return e;var i=fn(e),o=fn(t);return _i(i,tn(i,o),nn(i,o)+1).join("")},Bn.trimEnd=function(e,t,r){if((e=ys(e))&&(r||t===n))return e.slice(0,gn(e)+1);if(!e||!(t=ui(t)))return e;var i=fn(e);return _i(i,0,nn(i,fn(t))+1).join("")},Bn.trimStart=function(e,t,r){if((e=ys(e))&&(r||t===n))return e.replace(ie,"");if(!e||!(t=ui(t)))return e;var i=fn(e);return _i(i,tn(i,fn(t))).join("")},Bn.truncate=function(e,t){var r=30,i="...";if(es(t)){var o="separator"in t?t.separator:o;r="length"in t?fs(t.length):r,i="omission"in t?ui(t.omission):i}var a=(e=ys(e)).length;if(sn(e)){var s=fn(e);a=s.length}if(r>=a)return e;var l=r-pn(i);if(l<1)return i;var u=s?_i(s,0,l).join(""):e.slice(0,l);if(o===n)return u+i;if(s&&(l+=u.length-l),os(o)){if(e.slice(l).search(o)){var c,h=u;for(o.global||(o=Ce(o.source,ys(fe.exec(o))+"g")),o.lastIndex=0;c=o.exec(h);)var d=c.index;u=u.slice(0,d===n?l:d)}}else if(e.indexOf(ui(o),l)!=l){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+i},Bn.unescape=function(e){return(e=ys(e))&&Y.test(e)?e.replace(q,mn):e},Bn.uniqueId=function(e){var t=++je;return ys(e)+t},Bn.upperCase=$s,Bn.upperFirst=Ks,Bn.each=ya,Bn.eachRight=wa,Bn.first=qo,sl(Bn,(_l={},br(Bn,function(e,t){Oe.call(Bn.prototype,t)||(_l[t]=e)}),_l),{chain:!1}),Bn.VERSION="4.17.21",kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Bn[e].placeholder=Bn}),kt(["drop","take"],function(e,t){Wn.prototype[e]=function(r){r=r===n?1:yn(fs(r),0);var i=this.__filtered__&&!t?new Wn(this):this.clone();return i.__filtered__?i.__takeCount__=wn(r,i.__takeCount__):i.__views__.push({size:wn(r,f),type:e+(i.__dir__<0?"Right":"")}),i},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),kt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),kt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}}),kt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}}),Wn.prototype.compact=function(){return this.filter(rl)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Kr(function(e,t){return"function"==typeof e?new Wn(this):this.map(function(n){return Er(n,e,t)})}),Wn.prototype.reject=function(e){return this.filter(Oa(lo(e)))},Wn.prototype.slice=function(e,t){e=fs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Wn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=fs(t))<0?r.dropRight(-t):r.take(t-e)),r)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(f)},br(Wn.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=Bn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof Wn,u=s[0],c=l||Wa(t),h=function(e){var t=o.apply(Bn,Ot([e],s));return i&&d?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var d=this.__chain__,p=!!this.__actions__.length,f=a&&!d,g=l&&!p;if(!a&&c){t=g?t:new Wn(this);var m=e.apply(t,s);return m.__actions__.push({func:pa,args:[h],thisArg:n}),new Gn(m,d)}return f&&g?e.apply(this,s):(m=this.thru(h),f?i?m.value()[0]:m.value():m)})}),kt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ee[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wa(i)?i:[],e)}return this[n](function(n){return t.apply(Wa(n)?n:[],e)})}}),br(Wn.prototype,function(e,t){var n=Bn[t];if(n){var r=n.name+"";Oe.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}}),Rn[Bi(n,2).name]=[{name:"wrapper",func:n}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ti(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=wn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,h=c.length,d=0,p=wn(l,this.__takeCount__);if(!n||!r&&i==l&&p==l)return fi(e,this.__actions__);var f=[];e:for(;l--&&d<p;){for(var g=-1,m=e[u+=t];++g<h;){var v=c[g],y=v.iteratee,w=v.type,b=y(m);if(2==w)m=b;else if(!b){if(1==w)continue e;break e}}f[d++]=m}return f},Bn.prototype.at=fa,Bn.prototype.chain=function(){return da(this)},Bn.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===n&&(this.__values__=ds(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,r=this;r instanceof Hn;){var i=zo(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:pa,args:[ea],thisArg:n}),new Gn(t,this.__chain__)}return this.thru(ea)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Je&&(Bn.prototype[Je]=function(){return this}),Bn}();mt?((mt.exports=vn)._=vn,gt._=vn):ft._=vn}).call(ae)}({get exports(){return Mu},set exports(e){Mu=e}},Mu),function(e){e[e.TwoWay=2]="TwoWay",e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(vu||(vu={})),function(e){e.Transit="transit",e.Public="public"}(yu||(yu={})),exports.LocationType=void 0,(wu=exports.LocationType||(exports.LocationType={})).MapObject="map-object",wu.Coordinate="coordinate",function(e){e.Edge="what.route_edge",e.Network="what.route_network",e.PortalNetwork="what.link",e.AirsideNetwork="what.route.network"}(bu||(bu={})),function(e){e.Vehicle="vehicle",e.Plane="plane",e.Pedestrian="pedestrian"}(_u||(_u={})),function(e){e.escalator="escalator",e.lift="lift",e.liftAnchor="liftAnchor",e.bus="airport_transfer",e.skytrain="skytrain",e.entrance="entrance",e.exit="exit",e.staircase="staircase",e.unknown=""}(xu||(xu={})),function(e){e.RouteOverview="Route Overview",e.SectionOverview="Section Overview",e.LeftHairPinTurn="Left hairpin turn",e.RightHairPinTurn="Right hairpin turn",e.LeftTurn="Turn left",e.RightTurn="Turn right",e.ContinueStraight="Continue straight",e.EnterPortal="Enter Portal",e.TravelPortal="Travel Portal",e.ExitPortal="Exit Portal",e.Static="Static",e.ChangeZone="Change Zone",e.PassThroughImmigration="Pass Through Immigration",e.RoadChangeContinueStraight="Road Change Continue Straight",e.TurnLeftAndContinue="Turn Left and Continue",e.TurnSlightLeftAndContinue="Turn Slight Left and Continue",e.TurnRightAndContinue="Turn Right and Continue",e.TurnSlightRightAndContinue="Turn Slight Right and Continue",e.UTurnAndContinue="U-Turn and Continue"}(Su||(Su={})),function(e){e.Internal="Internal",e.External="External"}(Au||(Au={})),exports.RouteMode=void 0,(Pu=exports.RouteMode||(exports.RouteMode={})).WithinTerminal="WithinTerminal",Pu.ToTerminal="ToTerminal",Pu.FromTerminal="FromTerminal",Pu.Airside="Airside";var Cu=((mu={})[exports.RouteMode.WithinTerminal]=["gps","compass","motion"],mu[exports.RouteMode.Airside]=["gps","compass"],mu[exports.RouteMode.ToTerminal]=[],mu[exports.RouteMode.FromTerminal]=[],mu);function ku(e,t){var n;return(null==t?void 0:t.requiredSensors)?t.requiredSensors:null!==(n=Cu[e])&&void 0!==n?n:[]}var Tu=6371008.8,Eu={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:Tu,metres:Tu,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function Ru(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Du(e[0])||!Du(e[1]))throw new Error("coordinates must contain numbers");return function(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}({type:"Point",coordinates:e},t,n)}function Lu(e){return e%360*Math.PI/180}function Du(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Fu(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ou(e,t,n){void 0===n&&(n={});var r=Fu(e),i=Fu(t),o=Lu(i[1]-r[1]),a=Lu(i[0]-r[0]),s=Lu(r[1]),l=Lu(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return function(e,t){void 0===t&&(t="kilometers");var n=Eu[t];if(!n)throw new Error(t+" units is invalid");return e*n}(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}function ju(e,t,n){void 0===n&&(n={});for(var r,i=("Feature"===(r=e).type?r.geometry:r).coordinates,o=0,a=0;a<i.length&&!(t>=o&&a===i.length-1);a++){if(o>=t){var s=t-o;if(s){var l=Ho(i[a],i[a-1])-180;return Yo(i[a],s,l,n)}return Ru(i[a])}o+=Ou(i[a],i[a+1],n)}return Ru(i[i.length-1])}var Nu="where.changi.airside",Iu="meters",zu="Custom Location",Bu="custom_location",Uu="user_position";function Hu(e,t){var n,r=null!=t?t:{},i=r.vehicleTemplateType,o=r.distanceThreshold,a=void 0===o?30:o,s=nc.getState().data;if(e.type===exports.LocationType.MapObject){var l=e.mapObjectId;if(!l||!s.hasOwnProperty(bu.Edge)||!s[bu.Edge].edges.hasOwnProperty(l))return;return Mu.cloneDeep(s[bu.Edge].edges[l])}if(e.type!==exports.LocationType.Coordinate);else{var u=Gu(e.whereDimension,!1,bu.Network,!0);if(u.length<1){var c="RouteNetworkData not found for the whereDimension: ".concat(e.whereDimension);throw console.error(c),new Error(c)}var h=e.coordinates,d=function(e,t,n,r){if(0===e.length||0===n)return;var i=e.map(function(e){return{feature:e,dist:zo(os(e,t,{units:"meters"}).geometry.coordinates,t,{units:"meters"})}}).filter(function(e){return e.dist<=n}).sort(function(e,t){return e.dist-t.dist}).map(function(e){return e.feature}),o=function(e,t){if(0===e.length)return;var n=e.find(function(e){return!!$u(e,null!=t?t:void 0)});if(!n)return;return n}(i,null!=r?r:void 0);return null!=o?o:void 0}(u,h,a,i);if(d){console.log("DEBUG - Nearest Accessible Network Feature:",d);var p=os(d,h,{units:"meters"});nc.getState().updateNetworkWithIntersection(d,p.geometry.coordinates);var f=ne([h,p.geometry.coordinates],{center:[h[0],h[1]],dimension_what:"what.route_edge",dimension_where:"where.changi.airside",direction:vu.TwoWay,mapObjectId:"",modified:1,myMapObjectId:"",title:zu,uniqueId:"",zone:yu.Public});return{id:Uu,where:e.whereDimension,what:null===(n=f.properties)||void 0===n?void 0:n.dimension_what,name:zu,coords:h,lines:[f],localRef:Bu,zone:yu.Public}}var g,m=function(){var e=Object.values(nc.getState().data[bu.Edge].edges).filter(function(e){return"where.changi.airside"===e.where}),t=e.flatMap(function(e){return e.lines});return t}(),v=function(e,t,n){if(0===e.length||0===n)return;var r=e.map(function(e){return{feature:e,dist:os(e,t,{units:"meters"}).properties.dist}}).filter(function(e){return e.dist<=n}).sort(function(e,t){return e.dist-t.dist});if(0===r.length)return;return r}(m,h,a),y=null==v?void 0:v.find(function(e){var t=function(e,t){var n,r=te(e.geometry.coordinates.at(-1)),i=1/0;return t.forEach(function(e){var t=os(e,r,{units:"meters"}).properties.dist;t<i&&(i=t,n=e)}),i<=1?n:void 0}(e.feature,u);return!(!t||!$u(t,null!=i?i:void 0))&&(g=t,!0)});if(y)return console.log("DEBUG - Nearest Accessible Edge:",y),console.log("DEBUG - Accessible Network Feature:",g),function(e){if(!e)return;var t=Io(e),n=t[0],r=ne(t,{center:[n[0],n[1]],dimension_what:"what.route_edge",dimension_where:"where.changi.airside",direction:vu.TwoWay,mapObjectId:"",modified:1,myMapObjectId:"",title:zu,uniqueId:"",zone:yu.Public}),i={id:Uu,where:Nu,what:bu.Edge,name:zu,coords:n,lines:[r],localRef:Bu,zone:yu.Public};return i}(y.feature);var w=function(e,t,n){void 0===n&&(n=.001);if(0===t.length)throw new Error("RouteNetworkData is empty");var r=ia();r.load(t);var i,o,a=gl(te(e)),s=[a[0]-n,a[1]-n,a[2]+n,a[3]+n],l=r.search(s),u=1/0;l.features.forEach(function(t){var n=os(t,e,{units:"meters"}),r=zo(n.geometry.coordinates,e,{units:"meters"});r<u&&(u=r,i=n,o=t)}),0===l.features.length&&(console.warn("No candidate features found in spatial index, falling back to brute force"),t.forEach(function(t){var n=os(t,e,{units:"meters"}),r=zo(n.geometry.coordinates,e,{units:"meters"});r<u&&(u=r,i=n,o=t)}));return{nearestPoint:i,closestLine:o,minDistance:u}}(h,A(A([],u,!0),m,!0)).minDistance;if(void 0!==a){c="Your location is ".concat(w.toFixed(2),"m from the nearest road. Please move within ").concat(a,"m to start navigation.");throw console.error(c),new Error(c)}}}function Gu(e,t,n,r){void 0===t&&(t=!0),void 0===r&&(r=!1);var i=nc.getState().data;if(!i.hasOwnProperty(bu.Network))return[];for(var o=i[bu.Network],a=[],s=0;s<o.length;s++){var l=o[s];if(l&&l.properties&&l.properties.dimension_where){var u=!1;u=t?l.properties.dimension_where.includes(e):l.properties.dimension_where===e;var c=!0;n&&l.properties.dimension_what?c=r?l.properties.dimension_what.includes(n):l.properties.dimension_what===n:n&&!l.properties.dimension_what&&(c=!1),u&&c&&a.push(l)}}return Mu.cloneDeep(a)}function Wu(e,t,n,r){return void 0===t&&(t=!0),void 0===r&&(r=!1),Gu(e,t,n,r)}function Vu(e,t){return Hu(e,t)}function qu(e){var t;return(t=nc.getState().data).hasOwnProperty("portal")?t.portal:{edgeData:{},lines:[]}}function Zu(e){return function(e){var t=nc.getState().data;return e&&t.hasOwnProperty("what.service.immigration")&&t["what.service.immigration"].hasOwnProperty(e)?t["what.service.immigration"][e]:[]}(e)}function Yu(e,t,n){void 0===n&&(n=!0);var r=function(n,r){var i=os(r,n);void 0!==i.properties.index&&(t.geometry.coordinates.splice(i.properties.index+1,0,e.geometry.coordinates),t.properties&&(t.properties.modified=1))};if(n){var i=function(e,t){var n=-1;return ns(e,function(e,r){if(-1===n){var i=te(e);zo(t,i,{units:"meters"})<.001&&(n=r)}}),n}(t,e);-1===i?r(e.geometry.coordinates,t):(t.geometry.coordinates[i]=e.geometry.coordinates,t.properties&&(t.properties.modified=1))}else r(e.geometry.coordinates,t)}function $u(e,t){var n,r;if(void 0===t)return!0;var i=t.customProperties,o=t.allowedRoadwayCategories,a=null!==(n=e.properties)&&void 0!==n?n:{},s=Object.entries(i).every(function(e){var t=e[0],n=e[1];return a[t]&&a[t].includes(n)}),l=o.includes(null!==(r=a.dimension_what)&&void 0!==r?r:"");return s&&l}function Ku(e){var t=e.split("."),n=t[t.length-1];return e.replace(".".concat(n),"")}var Ju="where";function Xu(e,t){var n=[],r={};for(var i in e)if(e[i].where.includes(t)){var o=e[i];r[i]=o,n.push.apply(n,o.lines),o.links.forEach(function(e){n.push.apply(n,e.lines)})}return{edgeData:r,lines:n}}function Qu(e,t){var n=[],r={};return t.forEach(function(i){if(i in e&&t.has(e[i].id)){var o=e[i];r[i]=o,n.push.apply(n,o.lines),o.links.forEach(function(e){n.push.apply(n,e.lines)})}}),{edgeData:r,lines:n}}var ec,tc,nc=gu(function(e,t){return{data:{},setRoute:function(t){return e({data:t})},updateNetworkWithIntersection:function(n,r){var i;if(n&&r){var o=t().data,a=o[bu.Network]||[];if(0!==a.length){var s=!1,l=a.map(function(e){Mu.isEqual(e,n)&&(Yu(te(r),e,!1),s=!0);return e});s&&e({data:_(_({},o),(i={},i[bu.Network]=l,i))})}}},upsertEdge:function(n){var r,i,o;if(n&&n.id){var a=t().data,s=_(_({},a),((r={})[bu.Edge]=_(_({},a[bu.Edge]),{edges:_(_({},(null===(o=a[bu.Edge])||void 0===o?void 0:o.edges)||{}),(i={},i[n.id]=n,i))}),r));e({data:s})}},getTemplateTypes:function(){return t().data.templatesData.templateTypes},getTemplateDefaults:function(){return t().data.templatesData.defaults}}}),rc=gu(function(e){return{data:{},setMapObjectsData:function(t){return e({data:t})}}}),ic=gu(function(e){return{data:{},setRoute:function(t){return e({data:t})}}}),oc=gu(function(e){return{data:{},setRoute:function(t){return e({data:t})}}});function ac(e){return e===ec.Routing?"generate-route-json-per-role":e===ec.MapObjects?"generate-map-objects-per-role":e===ec.MBTiles?"generate-vector-tiles":e===ec.Fonts?"generate-font-sprites":void 0}function sc(e,t){return t.valueOf()+e}!function(e){e.Routing="routing",e.MapObjects="mapObjects",e.MBTiles="mbtiles",e.Fonts="fonts"}(ec||(ec={})),function(e){e.Ready="Ready",e.Awaiting="Awaiting",e.DownloadingResources="DownloadingResources",e.Unavailable="Unavailable"}(tc||(tc={}));var lc=nc.setState,uc=rc.setState,cc=ic.setState,hc=oc.setState;function dc(e,t,n){var r,i;return x(this,void 0,void 0,function(){var o,a,s,l,u,c,h,d,p,f,m,y,w,b,_,A,P,M,C,k,T,E,R,L=this;return S(this,function(D){switch(D.label){case 0:o=e.publishedDataType,a=sc("version",o),s=sc("roleName",o),l=null==e?void 0:e.roleName,u=tc.Awaiting,c=function(e){return e===ec.Routing?lc:e===ec.MapObjects?uc:e===ec.MBTiles?cc:e===ec.Fonts?hc:void 0}(o),h=e.secretKey,d="".concat(v.default.DocumentDirectoryPath,"/extracted/"),p=function(){return x(L,void 0,void 0,function(){var n;return S(this,function(r){return n=t.contains(a)?t.getString(a):"0.0.0",[2,new Promise(function(r,i){g.default({url:"".concat(e.URL,"/check-published-versions"),headers:{Authorization:"Bearer ".concat(e.accessToken),"Content-Type":"application/json"},method:"POST",data:JSON.stringify({version:n,dataType:ac(e.publishedDataType)})}).then(function(e){var n=e.data,i={currentVersion:void 0,remoteVersion:void 0,roleName:void 0,URL:void 0,data:void 0},c=t.getString(a),h=t.getString(s),d=c;if(n.hasOwnProperty("version")&&(d=n.version),i.currentVersion=c,i.remoteVersion=d,c){var p=t.getString(sc("data",o));if(o===ec.MBTiles||o===ec.Fonts)p&&(i.data=p);else t.getString(sc("encryptionTag",o))&&p&&(i.data=p)}if(l&&(i.roleName=l,h!==l))return n.hasOwnProperty("downloadUrl")&&(i.URL=n.downloadUrl),u=tc.DownloadingResources,console.log("Role mismatch. Setting status to DownloadingResources: ",i.roleName,h),void r(i);d&&(n.hasOwnProperty("downloadUrl")&&(i.URL=n.downloadUrl),(c&&d>c||!c||!i.data)&&(u=i.URL?tc.DownloadingResources:u)),console.log("final: ",i.URL,i.currentVersion,i.remoteVersion,i.roleName),r(i)}).catch(function(t){console.log("error while fetching published version: ",e.publishedDataType),t.response?(console.log(t.response.data),console.log(t.response.status),console.log(t.response.headers)):t.request?console.log(t.request):console.log("Error",t.message),console.log(t.config),i(t)})})]})})},f=function(e,n,r,i){try{return t.set(sc("data",o),e),t.set(a,n),t.set(sc("roleName",o),r),i&&t.set(sc("encryptionTag",o),i),!0}catch(e){return console.log("error storing routing file from local storage",e),!1}},m=function(){return x(L,void 0,void 0,function(){var n,r,i,a;return S(this,function(s){switch(s.label){case 0:return n=t.getString(sc("data",o)),o!==ec.MBTiles&&o!==ec.Fonts?[3,2]:[4,pc(o,n,d,h)];case 1:return(r=s.sent())?(c({data:r}),u=tc.Ready,[2,!0]):[2,!1];case 2:return i=t.getString(sc("encryptionTag",o)),n&&i?[4,zl(n,i,e.secretKey)]:[3,4];case 3:return a=s.sent(),c({data:a}),u=tc.Ready,[2,!0];case 4:return[2,!1];case 5:return[2]}})})},y=function(){return x(L,void 0,void 0,function(){return S(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,m()];case 1:return e.sent()||(console.log("metaAtlasSDK: failed to load data",o),u=tc.Unavailable),[3,3];case 2:return e.sent(),console.log("metaAtlasSDK: erro while loading data",o),u=tc.Unavailable,t.clearAll(),[3,3];case 3:return[2]}})})},D.label=1;case 1:return D.trys.push([1,26,,28]),[4,p()];case 2:if(w=D.sent(),u!==tc.DownloadingResources||!w.URL)return[3,15];console.log("metaAtlasSDK: downloading file from server",o),D.label=3;case 3:return D.trys.push([3,12,,14]),o!==ec.MBTiles&&o!==ec.Fonts?[3,7]:(b="".concat(v.default.DocumentDirectoryPath,"/").concat(o,".zip"),[4,v.default.downloadFile({fromUrl:w.URL,toFile:b,begin:function(e){var t,r=(e.contentLength/1048576).toFixed(2);n&&(null==n?void 0:n.onStart)&&(null===(t=null==n?void 0:n.onStart)||void 0===t||t.call(n,{totalSize:r})),console.log("Download started. Total size: ".concat(r," MB"))},progress:function(e){var t,r=e.bytesWritten/e.contentLength*100,i=(e.bytesWritten/1048576).toFixed(2),o=(e.contentLength/1048576).toFixed(2);n&&(null==n?void 0:n.onProgress)&&(null===(t=null==n?void 0:n.onProgress)||void 0===t||t.call(n,{downloaded:i,totalSize:o,progress:r.toFixed(2)})),console.log("Downloaded: ".concat(i," MB / ").concat(o," MB (").concat(r.toFixed(2),"%)"))}}).promise]);case 4:return _=D.sent(),[4,v.default.mkdir(d)];case 5:if(D.sent(),200!==_.statusCode)throw n&&(null==n?void 0:n.onError)&&(null===(r=null==n?void 0:n.onError)||void 0===r||r.call(n,_.statusCode.toString())),new Error("Download failed with status ".concat(_.statusCode));return n&&(null==n?void 0:n.onSuccess)&&(null===(i=null==n?void 0:n.onSuccess)||void 0===i||i.call(n,b)),console.log("File downloaded to: ".concat(b)),v.default.stat(b).then(function(e){var t=(e.size/1048576).toFixed(2);console.log("File size: ".concat(t," MB"))}).catch(function(e){console.error("Error getting file size:",e)}),M=f(b,w.remoteVersion,l),[4,pc(o,b,d,h)];case 6:if(!(T=D.sent()))throw new Error("No MBTiles file found in the archive");return M&&(console.log("Loaded file"),c({data:T}),u=tc.Ready),[3,11];case 7:return[4,fetch(w.URL)];case 8:if(!(_=D.sent()).ok)throw new Error("HTTP error! Status: ".concat(_.status));return[4,_.json()];case 9:return A=D.sent(),P=A.data,E=A.tag,[4,zl(P,E,e.secretKey)];case 10:R=D.sent(),(M=f(P,w.remoteVersion,l,E))&&(console.log("loaded file"),c({data:R}),u=tc.Ready),D.label=11;case 11:return[3,14];case 12:return C=D.sent(),console.error("Error fetching and decrypting data:",C),[4,y()];case 13:return D.sent(),[3,14];case 14:return[3,25];case 15:return o!==ec.MBTiles&&o!==ec.Fonts?[3,21]:(k=t.getString(sc("data",o)),[4,v.default.exists(k)]);case 16:return D.sent()?console.log("File exists at: ".concat(k)):(console.log("File does not exist at: ".concat(k)),f("","","")),[4,pc(o,k,d,h)];case 17:return T=D.sent(),k?(c({data:T}),u=tc.Ready,[3,20]):[3,18];case 18:return[4,y()];case 19:D.sent(),D.label=20;case 20:return[3,25];case 21:return E=t.getString("encryptionTag"),w.data&&E?(console.log("loaded local file"),[4,zl(w.data,E,e.secretKey)]):[3,23];case 22:return R=D.sent(),c({data:R}),u=tc.Ready,[3,25];case 23:return[4,y()];case 24:D.sent(),D.label=25;case 25:return[3,28];case 26:return D.sent(),[4,y()];case 27:return D.sent(),[3,28];case 28:return[2,u]}})})}function pc(e,t,n,r){return x(this,void 0,void 0,function(){var i,o,a,s,l,c,h,d,p,f,g,m,y,w,b,_,x,A,P,M,C;return S(this,function(S){switch(S.label){case 0:return S.trys.push([0,30,,31]),i="",[4,v.default.exists(n)];case 1:return S.sent()?[3,3]:[4,v.default.mkdir(n)];case 2:return S.sent(),console.log("Directory created at: ".concat(n)),[3,4];case 3:console.log("Directory already exists at: ".concat(n)),S.label=4;case 4:return e!==ec.MBTiles?[3,24]:[4,u.unzipWithPassword(t,n,r)];case 5:return S.sent(),[4,v.default.readDir(n)];case 6:o=S.sent(),a=o.filter(function(e){return e.name.endsWith(".mbtiles")}),s=0,l=a,S.label=7;case 7:return s<l.length?(c=l[s],[4,v.default.unlink(c.path)]):[3,10];case 8:S.sent(),S.label=9;case 9:return s++,[3,7];case 10:return[4,v.default.readDir(n)];case 11:return b=S.sent(),h=b.find(function(e){return e.name.endsWith(".zip")}),h?[4,u.unzip("".concat(n).concat(h.name),n)]:[3,15];case 12:return S.sent(),d="".concat(n).concat(h.name),[4,v.default.exists(d)];case 13:return S.sent()?[4,gc(d)]:[3,15];case 14:S.sent(),S.label=15;case 15:return[4,v.default.readDir(n)];case 16:return p=S.sent(),f=p.find(function(e){return e.name.endsWith(".mbtiles")}),f?(g="geojson_".concat(performance.now().toFixed(0),".mbtiles"),m="".concat(n).concat(g),[4,v.default.moveFile(f.path,m)]):[3,22];case 17:return S.sent(),[4,v.default.exists(f.path)];case 18:return S.sent()?[4,v.default.unlink(f.path)]:[3,20];case 19:S.sent(),S.label=20;case 20:return[4,v.default.readDir(n)];case 21:return y=S.sent(),console.log("All files in unzip destination:",y),i=m,[3,23];case 22:throw new Error("MBTiles file not found.");case 23:return[3,29];case 24:return e!==ec.Fonts?[3,28]:[4,u.unzip(t,n)];case 25:return w=S.sent(),[4,v.default.readDir(w)];case 26:return b=S.sent(),_=b.map(function(e){return e.name}),[4,v.default.readDir("".concat(w,"sprites"))];case 27:if(x=S.sent(),A=x.map(function(e){return e.name}),console.log("Sprites Files:",A),P=_.includes("fonts"),M=_.includes("sprites"),!P||!M)throw new Error("Missing required directories: fonts or sprites.");return i=w,[3,29];case 28:throw new Error("Unsupported data type.");case 29:return[2,i];case 30:throw C=S.sent(),console.error("Error extracting offline file path:",C),C;case 31:return[2]}})})}var fc,gc=function(e){return x(void 0,void 0,void 0,function(){var t;return S(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,v.default.unlink(e)];case 1:return n.sent(),console.log("File deleted successfully"),[3,3];case 2:return t=n.sent(),console.error("Error deleting file:",t),[3,3];case 3:return[2]}})})};function mc(e){if(e&&"object"===z(e)&&!Array.isArray(e))return e}function vc(e,t){var n=mc(e),r=mc(t);if(n||r)return _(_({},null!=n?n:{}),null!=r?r:{})}function yc(e){var t,n,r,i,o,a,s,l,u,c,h,d,p=null!==(n=null!==(t=e.mID)&&void 0!==t?t:e.id)&&void 0!==n?n:e.mapObjectId,f={myMapObjectId:p,title:null!==(r=e.name)&&void 0!==r?r:e.title,localRef:e.localRef,dimension_what:null!==(i=e.what)&&void 0!==i?i:e.whatDimension,dimension_where:null!==(o=e.where)&&void 0!==o?o:e.whereDimension,isSearchable:!0},g=function(e){var t=mc(e),n=null==t?void 0:t.features;if(Array.isArray(n)&&0!==n.length){for(var r,i=0,o=n;i<o.length;i++){var a=mc(o[i]),s=mc(null==a?void 0:a.properties);if(s&&(r||(r=_({},s)),s.booth_info||s.metadata))return _({},s)}return r?_({},r):void 0}}(e.property_geojson),m=mc(e.properties),v=function(e){var t,n,r,i,o,a,s,l,u=mc(e.booth_info),c=null!==(n=null!==(t=e.images)&&void 0!==t?t:e.property_images)&&void 0!==n?n:null==u?void 0:u.images,h=null!==(i=null!==(r=e.logos)&&void 0!==r?r:e.property_logos)&&void 0!==i?i:null==u?void 0:u.logos,d=null!==(o=e.overview)&&void 0!==o?o:null==u?void 0:u.overview,p=null!==(a=e.products)&&void 0!==a?a:null==u?void 0:u.products,f=null!==(s=e.videos)&&void 0!==s?s:null==u?void 0:u.videos,g=null!==(l=e.files)&&void 0!==l?l:null==u?void 0:u.files;if(null!=d||null!=p||null!=c||null!=h||null!=f||null!=g||u)return _(_(_(_(_(_(_({},null!=u?u:{}),void 0!==d?{overview:d}:{}),void 0!==p?{products:p}:{}),void 0!==c?{images:c}:{}),void 0!==h?{logos:h}:{}),void 0!==f?{videos:f}:{}),void 0!==g?{files:g}:{})}(e),y=_(_(_({},f),null!=g?g:{}),null!=m?m:{});v&&Object.keys(v).length>0?y.booth_info=v:(null==g?void 0:g.booth_info)?y.booth_info=g.booth_info:(null==m?void 0:m.booth_info)&&(y.booth_info=m.booth_info);var w=vc(function(e){if(null!=e){if("object"===z(e)&&!Array.isArray(e))return e;if("string"==typeof e&&e.trim())try{return mc(JSON.parse(e))}catch(e){return}}}(e.metaData),vc(e.metadata,vc(null==g?void 0:g.metadata,null==m?void 0:m.metadata)));return w&&Object.keys(w).length>0&&(y.metadata=w),y.myMapObjectId=null!==(a=y.myMapObjectId)&&void 0!==a?a:p,y.title=null!==(l=null!==(s=y.title)&&void 0!==s?s:e.name)&&void 0!==l?l:e.title,y.dimension_what=null!==(c=null!==(u=y.dimension_what)&&void 0!==u?u:e.what)&&void 0!==c?c:e.whatDimension,y.dimension_where=null!==(d=null!==(h=y.dimension_where)&&void 0!==h?h:e.where)&&void 0!==d?d:e.whereDimension,y.isSearchable=!0,y}!function(e){e.Name="Name",e.WhereDimension="WhereDimension",e.Relevance="Relevance",e.RelevanceStrict="RelevanceStrict"}(fc||(fc={}));var wc=function(){function e(){this.searchableGeoJsonFeatures=[],this.token="",this.empApi="",this.HOST="",this.atomsAPIAccessToken="",this.apiRequestLimit=5e3,this.secretKeyForDecryption="",this.routingStatus=tc.Awaiting,this.searchStatus=tc.Awaiting,this.offlineMapStatus=tc.Awaiting,this.storage=new Pl,this.onReadinessChange=null,this.lastClicked={mapObjectId:null,coordinates:null,name:null,whatDimension:null,whereDimension:null,geometry:null,properties:null}}return e.prototype.init=function(e,t,n,r,i){this.empApi=e,this.token=t,this.HOST=r,this.secretKeyForDecryption=n,this.tileserverRoleName=i},Object.defineProperty(e.prototype,"defaultFocusedTaxonomy",{get:function(){return cl().getDefaultFocusedTaxonomy()},set:function(e){cl().setDefaultFocusedTaxonomy(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentFocus",{get:function(){return cl().getCurrentFocus()},set:function(e){cl().setCurrentFocus(e)},enumerable:!1,configurable:!0}),e.prototype.getAtomsAPIAccessToken=function(e){var t=this,n=JSON.stringify({strategy:"atomstoken",atomsSdkToken:this.token,clientEngine:"API",clientOS:"Linux"}),r={method:"post",url:"".concat(this.empApi,"/authentication"),headers:{"Content-Type":"application/json"},data:n};g.default(r).then(function(n){return x(t,void 0,void 0,function(){var t;return S(this,function(r){return(null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.accessToken)&&(this.atomsAPIAccessToken=n.data.accessToken,e({authenticated:!0})),[2]})})}).catch(function(t){e({authenticated:!1,error:t})})},e.prototype.setupFocusTree=function(){return x(this,void 0,void 0,function(){var e,t,n,r;return S(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e="".concat(this.empApi,"/role-based-camera-properties"),[4,g.default.get(e,{headers:{Authorization:"Bearer ".concat(this.atomsAPIAccessToken)}})];case 1:return(null==(t=i.sent())?void 0:t.data)&&Object.keys(t.data).length>0?(vs(t.data),(n=xs()).length>0&&!this.currentFocus&&(this.defaultFocusedTaxonomy=n[0].taxonomyPath,this.currentFocus=n[0].taxonomyPath),console.log("Focus tree loaded from ATOMS API",t.data)):(console.error("[focus-core] Empty focus tree response from ATOMS API"),vs({})),[3,3];case 2:return r=i.sent(),console.error("[focus-core] Failed to load focus tree from ATOMS API",r),vs({}),[3,3];case 3:return[2]}})})},e.prototype.hasPublishedDataVersion=function(e){return function(e,t){var n=sc("version",e);return null!=t.getString(n)}(e,this.storage)},e.prototype.setupOfflineMaps=function(e,t){return x(this,void 0,void 0,function(){var n,r,i,o;return S(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,dc({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:ec.MBTiles,roleName:this.tileserverRoleName},this.storage,t)];case 1:return n=a.sent(),[4,dc({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:ec.Fonts,roleName:this.tileserverRoleName},this.storage,t)];case 2:return r=a.sent(),console.log("Offline Map & fonts status:",n,r),i=n===tc.Ready&&r===tc.Ready,this.offlineMapStatus=i?tc.Ready:tc.Unavailable,this.emitReadinessChange(),e&&e(this.offlineMapStatus===tc.Ready),[2,i];case 3:return o=a.sent(),console.error("Error setting up offline maps:",o),this.offlineMapStatus=tc.Unavailable,this.emitReadinessChange(),e&&e(!1),[3,4];case 4:return[2]}})})},e.prototype.getOfflineMapStatus=function(){return this.offlineMapStatus},e.prototype.setupRouting=function(e){return x(this,void 0,void 0,function(){var t;return S(this,function(n){switch(n.label){case 0:return[4,dc({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:ec.Routing,roleName:this.tileserverRoleName},this.storage)];case 1:return t=n.sent(),this.routingStatus=t,this.emitReadinessChange(),console.log("routing status: ",t),e&&e(t===tc.Ready),[2]}})})},e.prototype.getRoutingStatus=function(){return this.routingStatus},e.prototype.getReadiness=function(){var e=[];return this.routingStatus!==tc.Ready&&e.push(ec.Routing),this.searchStatus!==tc.Ready&&e.push(ec.MapObjects),this.offlineMapStatus!==tc.Ready&&e.push(ec.MBTiles),el(e)},e.prototype.emitReadinessChange=function(){var e;null===(e=this.onReadinessChange)||void 0===e||e.call(this)},e.prototype.setLastClickedFeature=function(e){return this.lastClicked=e,this.lastClicked},e.prototype.hydrateClickedFeature=function(e){var t,n,r,i,o,a,s,l,u,c,h,d=null!==(r=null!==(t=e.mapObjectId)&&void 0!==t?t:null===(n=e.properties)||void 0===n?void 0:n.myMapObjectId)&&void 0!==r?r:null;if(null==d)return e;var p=this.searchableGeoJsonFeatures.find(function(e){var t,n,r=null!==(n=null===(t=e.properties)||void 0===t?void 0:t.myMapObjectId)&&void 0!==n?n:e.mapObjectId;return null!=r&&String(r)===String(d)});if(!(null==p?void 0:p.properties))return e;var f=function(e,t){var n,r,i,o,a,s,l=vc(e.metadata,t.metadata);return _(_(_(_({},e),t),{myMapObjectId:null!==(n=t.myMapObjectId)&&void 0!==n?n:e.myMapObjectId,title:null!==(r=t.title)&&void 0!==r?r:e.title,dimension_what:null!==(i=t.dimension_what)&&void 0!==i?i:e.dimension_what,dimension_where:null!==(o=t.dimension_where)&&void 0!==o?o:e.dimension_where,localRef:null!==(a=t.localRef)&&void 0!==a?a:e.localRef,booth_info:null!==(s=e.booth_info)&&void 0!==s?s:t.booth_info}),l?{metadata:l}:{})}(p.properties,null!==(i=e.properties)&&void 0!==i?i:{}),g=null!==(a=null!==(o=e.coordinates)&&void 0!==o?o:p.lngLat)&&void 0!==a?a:null;return{mapObjectId:String(d),coordinates:g,name:null!==(s=e.name)&&void 0!==s?s:"string"==typeof f.title?f.title:null,whatDimension:null!==(l=e.whatDimension)&&void 0!==l?l:"string"==typeof f.dimension_what?f.dimension_what:null,whereDimension:null!==(u=e.whereDimension)&&void 0!==u?u:"string"==typeof f.dimension_where?f.dimension_where:null,geometry:null!==(h=null!==(c=e.geometry)&&void 0!==c?c:p.geometry)&&void 0!==h?h:null,properties:f}},e.prototype.getLastClickedFeature=function(){var e=this.lastClicked;if(!this.lastClicked||this.lastClicked&&(null===this.lastClicked.name||null===this.lastClicked.whereDimension)){e=this.setLastClickedFeature({mapObjectId:null,coordinates:null,name:null,whatDimension:null,whereDimension:null,geometry:null,properties:null})}return e},e.prototype.isClickableFeature=function(e){return!!(e&&e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"isSearchable")&&e.properties.isSearchable&&"Transit"!==e.properties.title&&"Public"!==e.properties.title)},e.prototype.getMidPointOfFeature=function(e){if(!e)return null;if(e.lngLat)return e.lngLat;if(!e.geometry)return null;if("Point"===e.geometry.type)return e.geometry.coordinates;var t=ee(e.geometry);if("LineString"===t.geometry.type||"MultiLineString"===t.geometry.type&&1==t.geometry.coordinates.length){var n=as(t=ne(e.geometry.coordinates));return Al(t,n/2,n).geometry.coordinates[0]}return vl(t).geometry.coordinates},e.prototype.getFocusTree=function(){return ys()},e.prototype.getWhatTaxonomies=function(){if(this.searchStatus===tc.Ready){for(var e=new Set,t=0,n=this.searchableGeoJsonFeatures;t<n.length;t++){var r=n[t];e.add(r.properties.dimension_what)}return Array.from(e)}return console.warn("getWhatTaxonomies called before Search APIs are ready"),[]},e.prototype.getCurrentFocus=function(){return cl().getCurrentFocus()},e.prototype.getCurrentFocusBuilding=function(){return cl().getCurrentFocusBuilding()},e.prototype.getCurrentFocusFloor=function(){return cl().getCurrentFocusFloor()},e.prototype.getUserViewportBuilding=function(e){return cl().getUserViewportBuilding(e)},e.prototype.checkUserViewport=function(e,t,n){return cl().checkUserViewport(e,t,n)},e.prototype.getFlyToLocation=function(e,t){return void 0===t&&(t=!0),cl().getFlyToLocation(e,t)},e.prototype.normalize=function(e){return e.trim().toLowerCase()},e.prototype.relevanceSort=function(e,t,n){function r(e){var r=[-1,0,e.name];if(e.name){var i=e.name.toLowerCase(),o=t.toLowerCase();return i===o?[1e3,-e.name.length,i]:i.startsWith(o)?[500,-e.name.length,i]:i.split(" ").some(function(e){return e.startsWith(o)})?[200,-e.name.length,i]:n?r:i.includes(o)?[0,-e.name.length,i]:r}return r}return void 0===n&&(n=!1),e.sort(function(e,t){var n=r(e),i=r(t);return i[0]-n[0]||i[1]-n[1]||n[2].localeCompare(i[2])}).filter(function(e){return r(e)[0]>=0})},e.prototype.sort=function(e,t,n){void 0===n&&(n="");var r=function(e,t){return e&&t?e.localeCompare(t):0};return t===fc.Name?e.sort(function(e,t){return r(e.name,t.name)}):t===fc.WhereDimension?e.sort(function(e,t){var n=r(e.whereDimension,t.whereDimension);return 0===n?r(e.name,t.name):n}):t===fc.Relevance?this.relevanceSort(e,n):t===fc.RelevanceStrict?this.relevanceSort(e,n,!0):void 0},e.prototype.setupMapObjectSearch=function(e){return x(this,void 0,void 0,function(){var t,n,r,i,o,a,s;return S(this,function(l){switch(l.label){case 0:return[4,dc({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:ec.MapObjects,roleName:this.tileserverRoleName},this.storage)];case 1:for(t=l.sent(),this.searchStatus=t,this.emitReadinessChange(),console.log("search status: ",t),this.searchableGeoJsonFeatures=[],n=rc.getState().data,r=0;r<n.length;r++)(i=n[r])&&(o=i,a=i.lngLat,s={mapObjectId:i.mID,lngLat:a,geometry:a?{type:"Point",coordinates:a}:i.geometry,properties:yc(o)},this.searchableGeoJsonFeatures.push(s));return e&&e(t===tc.Ready),[2]}})})},e.prototype.getSearchStatus=function(){return this.searchStatus},e.prototype.createMetaFeature=function(e,t,n,r,i,o,a){return void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),{mapObjectId:e,coordinates:t,name:n,whatDimension:r,whereDimension:i,geometry:o,properties:null!=a?a:{},isSearchable:!0}},e.prototype.getAllMapObjects=function(e){for(var t,n,r,i=new Set,o=[],a=0,s=this.searchableGeoJsonFeatures;a<s.length;a++){var l=s[a],u=null===(t=l.properties)||void 0===t?void 0:t.myMapObjectId;if(null!=u&&!i.has(u)){i.add(u);var c=null!==(n=l.lngLat)&&void 0!==n?n:"Point"===(null===(r=l.geometry)||void 0===r?void 0:r.type)?l.geometry.coordinates:null;o.push(this.createMetaFeature(l.properties.myMapObjectId,c,l.properties.title,l.properties.dimension_what,l.properties.dimension_where,l.geometry,l.properties))}}e(o)},e.prototype.getMapObjectsByName=function(e,t,n,r){var i,o;void 0===t&&(t=!1);for(var a=new Set,s=[],l=this.normalize(e),u=0,c=this.searchableGeoJsonFeatures;u<c.length;u++){var h=c[u],d=h.properties.myMapObjectId,p=this.normalize(h.properties.title);if((!t||p.includes(l))&&((t||p===l)&&!a.has(d))){a.add(d);var f=null!==(i=h.lngLat)&&void 0!==i?i:"Point"===(null===(o=h.geometry)||void 0===o?void 0:o.type)?h.geometry.coordinates:null,g=this.createMetaFeature(h.properties.myMapObjectId,f,h.properties.title,h.properties.dimension_what,h.properties.dimension_where,h.geometry,h.properties);s.push(g)}}r(this.sort(s,n,e))},e.prototype.getMapObjectById=function(e,t){for(var n=[],r=0,i=this.searchableGeoJsonFeatures;r<i.length;r++){var o=i[r],a=o.properties.myMapObjectId;if(String(a)===String(e)){var s=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);n.push(s)}}t(n)},e.prototype.getMapObjectByLocalRef=function(e,t){for(var n=[],r=0,i=this.searchableGeoJsonFeatures;r<i.length;r++){var o=i[r],a=o.properties.localRef;if(String(a)===String(e)){var s=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);n.push(s)}}t(n)},e.prototype.getMapObjectsByWhatTaxonomy=function(e,t){for(var n=[],r=0,i=this.searchableGeoJsonFeatures;r<i.length;r++){var o=i[r],a=o.properties.dimension_what;if(String(a)===String(e)){var s=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);n.push(s)}}t(n)},e.prototype.getMapObjectsByWhereTaxonomy=function(e,t){for(var n=[],r=0,i=this.searchableGeoJsonFeatures;r<i.length;r++){var o=i[r],a=o.properties.dimension_where;if(String(a)===String(e)){var s=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);n.push(s)}}t(n)},e.prototype.getMapObjectsByWhatAndWhereTaxonomy=function(e,t,n){for(var r=[],i=0,o=this.searchableGeoJsonFeatures;i<o.length;i++){var a=o[i],s=a.properties.dimension_where,l=a.properties.dimension_what;if(String(s)===String(t)&&String(l)===String(e)){var u=this.createMetaFeature(a.properties.myMapObjectId,a.lngLat,a.properties.title,a.properties.dimension_what,a.properties.dimension_where,a.geometry,a.properties);r.push(u)}}n(r)},e.prototype.getMapObjectsInWhatTaxonomy=function(e,t){for(var n=[],r=0,i=this.searchableGeoJsonFeatures;r<i.length;r++){var o=i[r],a=o.properties.dimension_what;if(e.includes(String(a))){var s=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);n.push(s)}}t(n)},e.prototype.getMapObjectsInWhereTaxonomy=function(e,t){for(var n=[],r=0,i=this.searchableGeoJsonFeatures;r<i.length;r++){var o=i[r],a=o.properties.dimension_where;if(e.includes(String(a))){var s=this.createMetaFeature(o.properties.myMapObjectId,o.lngLat,o.properties.title,o.properties.dimension_what,o.properties.dimension_where,o.geometry,o.properties);n.push(s)}}t(n)},e.prototype.getMapObjectsInWhatAndWhereTaxonomy=function(e,t,n){for(var r=[],i=0,o=this.searchableGeoJsonFeatures;i<o.length;i++){var a=o[i],s=a.properties.dimension_where,l=a.properties.dimension_what;if(t.includes(String(s))&&e.includes(String(l))){var u=this.createMetaFeature(a.properties.myMapObjectId,a.lngLat,a.properties.title,a.properties.dimension_what,a.properties.dimension_where,a.geometry,a.properties);r.push(u)}}n(r)},e.prototype.geofence=function(e,t,n){var r=this;void 0===t&&(t=2),g.default({url:"".concat(this.empApi,"/geofence"),headers:{Authorization:"Bearer ".concat(this.atomsAPIAccessToken),"Content-Type":"application/json"},method:"POST",data:JSON.stringify({point:e,padding:t})}).then(function(e){return x(r,void 0,void 0,function(){var t;return S(this,function(r){return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.searchableMOs)&&n(e.data.searchableMOs),[2]})})}).catch(function(e){console.log("error occured while geofencing",e),n([])})},e}(),bc=function(){function e(e){void 0===e&&(e={});var t,n,r,i,o=this;this.onCompassSensorUpdate=function(e){o.handleCompassUpdate(e)},this.cameraDirector=ol(),this.marker={show:function(){},hide:function(){},remove:function(){},update:function(){},updateHeading:function(){}},this.sensorsAttached=!1,this.markerAttached=!1,this.locationCallbacks=new Set,this.errorCallbacks=new Set,this.toggleCallbacks=new Set,this.compassCallbacks=new Set,this.lastProcessedPosition=null,this.lastExternalGpsPosition=null,this.lastAppliedPose=null,this.lastAppliedCameraStop=null,this.lastHeadingMarkerDeg=null,this.sdkMode="normal",this.follow=!0,this.headingFollow=!1,this.lastHeadingCameraUpdateMs=0,this.lastHeadingFollowCenterUpdateMs=0,this.lastHeadingCameraEaseDeg=null,this.lastCameraBearingUnwrapped=null,this.lastCameraUpdateMs=0,this.gps=null!==(t=e.gps)&&void 0!==t?t:Ys(),this.compass=null!==(n=e.compass)&&void 0!==n?n:$s(),this.motion=null!==(r=e.motion)&&void 0!==r?r:Ks(),this.getFocusTree=null!==(i=e.getFocusTree)&&void 0!==i?i:function(){return null},this.compass.addCallback({onCompassUpdate:this.onCompassSensorUpdate})}return e.prototype.attachSensors=function(e){this.installSensors(e),this.sensorsAttached=!0},e.prototype.detachSensors=function(){var e;this.gps.disableGPS(),this.compass.disableCompass(),null===(e=this.motion)||void 0===e||e.stop(),this.installSensors({gps:Ys(),compass:$s(),motion:Ks()}),this.sensorsAttached=!1},e.prototype.attachCameraDirector=function(e){var t=this;this.cameraDirector=e,e.attachFollowBreaker({breakFollow:function(){t.setFollow(!1)}})},e.prototype.detachCameraDirector=function(){this.cameraDirector.detachFollowBreaker(),this.cameraDirector=ol()},e.prototype.attachMarker=function(e){this.marker=e,this.markerAttached=!0},e.prototype.detachMarker=function(){this.marker={show:function(){},hide:function(){},remove:function(){},update:function(){},updateHeading:function(){}},this.markerAttached=!1},e.prototype.getReadiness=function(){var e=[];return this.sensorsAttached||e.push("sensors"),this.markerAttached||e.push("marker"),el(e)},e.prototype.getSdkMode=function(){return this.sdkMode},e.prototype.getIsNavigating=function(){return"navigation"===this.sdkMode},e.prototype.isCompassPermissionDenied=function(){return this.compass.isCompassPermissionDenied()},e.prototype.enterNavigationMode=function(){this.clearNormalHeadingCameraFollowInternal({easeMapToNorthUp:!1}),this.sdkMode="navigation",this.follow=!0,this.marker.show()},e.prototype.enterNormalMode=function(){this.sdkMode="normal",this.follow=!0,this.marker.show(),this.marker.updateHeading(null),this.lastHeadingMarkerDeg=null},e.prototype.notifyUserGesture=function(){this.gps.isGPSEnabled()&&(this.follow=!1,this.emitToggle())},e.prototype.getCameraFollowState=function(){return"navigation"===this.sdkMode?{mode:"navigation",owner:"navigation",isFollowing:this.isFollowing()}:{mode:"normal",owner:"gps",isFollowing:this.gps.isGPSEnabled()&&this.isFollowing(),followsHeading:this.headingFollow}},e.prototype.applyPose=function(e){"navigation"===this.sdkMode&&this.writeMarker(e)},e.prototype.applyCameraStop=function(e,t){void 0===t&&(t={}),"navigation"===this.sdkMode&&this.commitCameraStop(e,t)},e.prototype.recenter=function(e){var t,n,r;return x(this,void 0,void 0,function(){var i,o,a;return S(this,function(s){switch(s.label){case 0:return this.follow=!0,this.emitToggle(),"navigation"===this.sdkMode?(i=this.lastAppliedCameraStop,o=this.lastAppliedPose,i||o?(a=(null==e?void 0:e.useDefaultZoom)?19:this.cameraDirector.getZoom()||(null==i?void 0:i.zoom)||19,this.commitCameraStop({center:null!==(t=null==i?void 0:i.center)&&void 0!==t?t:o.coordinates,bearing:null==i?void 0:i.bearing,pitch:null!==(n=null==i?void 0:i.pitch)&&void 0!==n?n:60,zoom:a,paddingFraction:null!==(r=null==i?void 0:i.paddingFraction)&&void 0!==r?r:{top:.3},durationMs:300,easing:"linear"},{force:!0}),[2]):[2]):[4,this.focusToGPS({flyToLocation:!0,duration:1e3})];case 1:return s.sent(),[2]}})})},e.prototype.addCallback=function(e){e.onLocationUpdate&&this.locationCallbacks.add(e.onLocationUpdate),e.onError&&this.errorCallbacks.add(e.onError),e.onToggle&&this.toggleCallbacks.add(e.onToggle),e.onCompassUpdate&&this.compassCallbacks.add(e.onCompassUpdate)},e.prototype.removeCallback=function(e){e.onLocationUpdate&&this.locationCallbacks.delete(e.onLocationUpdate),e.onError&&this.errorCallbacks.delete(e.onError),e.onToggle&&this.toggleCallbacks.delete(e.onToggle),e.onCompassUpdate&&this.compassCallbacks.delete(e.onCompassUpdate)},e.prototype.simulatePosition=function(e,t){void 0===t&&(t=5);var n={coordinates:e,accuracy:t,timestamp:Date.now()};this.applyGpsSample(n)},e.prototype.enableGPS=function(e){var t,n,r,i;return void 0===e&&(e={}),x(this,void 0,void 0,function(){var o,a,s,l,u,c=this;return S(this,function(h){switch(h.label){case 0:(null===(t=e.callbacks)||void 0===t?void 0:t.onLocationUpdate)&&this.locationCallbacks.add(e.callbacks.onLocationUpdate),(null===(n=e.callbacks)||void 0===n?void 0:n.onError)&&this.errorCallbacks.add(e.callbacks.onError),(null===(r=e.callbacks)||void 0===r?void 0:r.onToggle)&&this.toggleCallbacks.add(e.callbacks.onToggle),this.marker.show(),this.follow=!1!==e.trackUserLocation,h.label=1;case 1:return h.trys.push([1,9,,10]),[4,this.gps.isGPSPermissionGranted()];case 2:if(!h.sent())return o={type:"permission_denied",message:"GPS permission is required to enable location services."},this.fanoutError(o,o.message),[2,{success:!1,warning:o}];h.label=3;case 3:return h.trys.push([3,5,,6]),[4,this.compass.enableCompass()];case 4:case 5:return h.sent(),[3,6];case 6:return[4,this.gps.getGPSPosition(e)];case 7:return a=h.sent(),s=this.isPositionWithinBounds(a.coordinates),[4,this.gps.enableGPS(_(_({},e),{callbacks:{onLocationUpdate:function(t){var n;c.handleRealGPSUpdate(t,c.shouldFlyTo(e.flyToLocation),null!==(n=e.zoom)&&void 0!==n?n:18)},onError:function(e,t){c.fanoutError(e,t)},onToggle:function(e){c.toggleCallbacks.forEach(function(t){try{t(e)}catch(e){}})}}}))];case 8:return l=h.sent(),this.handleRealGPSUpdate(a,this.shouldFlyTo(e.flyToLocation),null!==(i=e.zoom)&&void 0!==i?i:18),l.success?s?[2,{success:!0}]:[2,{success:!0,warning:{type:"outside_bounds",message:"You are currently outside of operational boundaries. GPS functionality may be limited.",position:a}}]:[2,l];case 9:return u=h.sent(),this.fanoutError(u,"Failed to enable GPS due to an unexpected error."),[2,{success:!1,warning:{type:"unavailable",message:"Failed to enable GPS due to an unexpected error."}}];case 10:return[2]}})})},e.prototype.installSensors=function(e){var t;this.compass.removeCallback({onCompassUpdate:this.onCompassSensorUpdate}),this.gps=e.gps,this.compass=e.compass,this.motion=null!==(t=e.motion)&&void 0!==t?t:null,this.compass.addCallback({onCompassUpdate:this.onCompassSensorUpdate})},e.prototype.ensureRequiredSensors=function(e){var t,n,r;return x(this,void 0,void 0,function(){var i,o,a,s,l,u,c,h,d=this;return S(this,function(p){switch(p.label){case 0:if(!this.sensorsAttached)throw new tl(["sensors"]);if(0===e.length)return[2,!0];i=e.includes("gps"),o=e.includes("compass"),a=e.includes("motion"),s=this.gps.isGPSEnabled(),l=this.compass.isCompassEnabled(),u=!1,c=!1,h=function(){u&&d.disableGPS(),c&&d.compass.disableCompass()},p.label=1;case 1:return p.trys.push([1,10,,11]),!i||s?[3,3]:[4,this.enableGPS({flyToLocation:!0,trackUserLocation:!0})];case 2:if(!p.sent().success)return[2,!1];u=!0,p.label=3;case 3:return!o||l?[3,5]:[4,this.compass.enableCompass()];case 4:if(!p.sent())return h(),[2,!1];c=!0,p.label=5;case 5:return a?[4,null===(n=null===(t=this.motion)||void 0===t?void 0:t.requestPermission)||void 0===n?void 0:n.call(t)]:[3,7];case 6:if(!(null===(r=p.sent())||void 0===r||r))return h(),[2,!1];p.label=7;case 7:return i?[4,this.gps.getGPSPosition({enableHighAccuracy:!0,timeout:1e4,maximumAge:5e3})]:[3,9];case 8:if(!p.sent())return h(),[2,!1];p.label=9;case 9:return[2,!0];case 10:return p.sent(),h(),[2,!1];case 11:return[2]}})})},e.prototype.disableGPS=function(){this.clearNormalHeadingCameraFollowInternal({easeMapToNorthUp:!0}),this.compass.disableCompass(),this.gps.disableGPS(),this.follow=!0,this.lastProcessedPosition=null,this.lastAppliedPose=null,this.lastAppliedCameraStop=null,this.lastHeadingMarkerDeg=null,this.lastHeadingCameraEaseDeg=null,this.lastCameraBearingUnwrapped=null,this.marker.hide(),this.emitToggle()},e.prototype.requestGPSPermission=function(){return x(this,void 0,void 0,function(){return S(this,function(e){return[2,this.gps.requestGPSPermission()]})})},e.prototype.isGPSPermissionGranted=function(){return x(this,void 0,void 0,function(){return S(this,function(e){return[2,this.gps.isGPSPermissionGranted()]})})},e.prototype.focusToGPS=function(e){var t,n,r;return void 0===e&&(e={}),x(this,void 0,void 0,function(){var i,o,a,s,l,u,c,h;return S(this,function(d){if(i=e.zoom,o=e.duration,a=void 0===o?1e3:o,s=e.flyToLocation,l=void 0===s||s,this.follow=!0,this.emitToggle(),!(u=null!==(n=null===(t=this.lastProcessedPosition)||void 0===t?void 0:t.coordinates)&&void 0!==n?n:null===(r=this.lastAppliedPose)||void 0===r?void 0:r.coordinates))throw{type:"unavailable",message:"Unable to determine current location. GPS may not be available."};return l&&(void 0===(c=i)&&(h=this.cameraDirector.getZoom(),c=h>0?h:18),this.commitCameraStop({center:u,zoom:c,durationMs:a,easing:"ease"},{force:!0})),[2,{success:!0}]})})},e.prototype.setNormalHeadingCameraFollow=function(e){if(e){if("navigation"===this.sdkMode)return;if(!this.gps.isGPSEnabled()||!this.follow||this.compass.isCompassPermissionDenied())return;if(!this.compass.isCompassEnabled())return;this.headingFollow=!0;var t=this.compass.getCompassHeading();return null!=t&&Number.isFinite(t)&&(this.lastHeadingCameraEaseDeg=null,this.applyNormalHeading(t)),void this.emitToggle()}this.clearNormalHeadingCameraFollowInternal({easeMapToNorthUp:!0})},e.prototype.isNormalHeadingCameraFollowEnabled=function(){return this.headingFollow},e.prototype.clearNormalHeadingCameraFollowForNavigation=function(){this.clearNormalHeadingCameraFollowInternal({easeMapToNorthUp:!1})},e.prototype.isFollowing=function(){return this.follow},e.prototype.setFollow=function(e){this.follow=e,this.emitToggle()},e.prototype.getGPSPosition=function(e){return x(this,void 0,void 0,function(){var t;return S(this,function(n){switch(n.label){case 0:return[4,this.gps.getGPSPosition(e)];case 1:return t=n.sent(),this.lastProcessedPosition=t,[2,t]}})})},e.prototype.showBlueDot=function(){this.marker.updateHeading(null),this.lastHeadingMarkerDeg=null},e.prototype.hideBlueDot=function(){null!=this.lastHeadingMarkerDeg&&this.marker.updateHeading(this.lastHeadingMarkerDeg)},e.prototype.show=function(){this.marker.show()},e.prototype.hide=function(){this.marker.hide()},e.prototype.getCurrentPosition=function(){return this.lastProcessedPosition},e.prototype.getExternalGpsPosition=function(){var e,t=null===(e=this.lastExternalGpsPosition)||void 0===e?void 0:e.coordinates;return!t||t.length<2?null:{coordinates:[t[0],t[1]]}},e.prototype.isGPSEnabled=function(){return this.gps.isGPSEnabled()},e.prototype.isCompassEnabled=function(){return this.compass.isCompassEnabled()},e.prototype.getZoom=function(){return this.cameraDirector.getZoom()},e.prototype.startMotion=function(e){var t;null===(t=this.motion)||void 0===t||t.start(e)},e.prototype.stopMotion=function(){var e;null===(e=this.motion)||void 0===e||e.stop()},e.prototype.destroy=function(){var e;this.clearNormalHeadingCameraFollowInternal({easeMapToNorthUp:!1}),this.gps.destroyGPS(),this.compass.disableCompass(),null===(e=this.motion)||void 0===e||e.stop(),this.marker.remove(),this.locationCallbacks.clear(),this.errorCallbacks.clear(),this.toggleCallbacks.clear(),this.compassCallbacks.clear(),this.lastProcessedPosition=null,this.lastExternalGpsPosition=null,this.lastAppliedPose=null,this.lastAppliedCameraStop=null,this.detachCameraDirector(),this.detachMarker()},e.prototype.applyGpsSample=function(e){this.marker.show(),this.handleRealGPSUpdate(e,!1)},e.prototype.triggerGPSUpdate=function(e){this.gps.isGPSEnabled()?console.error("Internal GPS is already enabled, skipping triggerGPSUpdate, please disable internal GPS first"):this.compass.isCompassEnabled()?console.error("Compass is already enabled, skipping triggerGPSUpdate, please disable compass first"):(this.lastExternalGpsPosition=function(e){return{coordinates:[e.coordinates[0],e.coordinates[1]],accuracy:e.accuracy,timestamp:e.timestamp||Date.now(),heading:e.heading,speed:e.speed,altitude:e.altitude,altitudeAccuracy:e.altitudeAccuracy}}(e),this.applyGpsSample(e),this.emitExternalHeading(e))},e.prototype.shouldFlyTo=function(e){return void 0===e&&(e=!0),this.follow&&e},e.prototype.handleRealGPSUpdate=function(e,t,n){var r,i,o;if(this.lastProcessedPosition={coordinates:[e.coordinates[0],e.coordinates[1]],accuracy:e.accuracy,timestamp:e.timestamp||Date.now(),heading:null!==(r=e.heading)&&void 0!==r?r:void 0,speed:null!==(i=e.speed)&&void 0!==i?i:void 0,altitude:e.altitude,altitudeAccuracy:e.altitudeAccuracy},this.locationCallbacks.forEach(function(t){try{t(e)}catch(e){}}),"navigation"!==this.sdkMode){var a=null!=this.lastHeadingMarkerDeg?this.lastHeadingMarkerDeg:null!==(o=e.heading)&&void 0!==o?o:null;this.writeMarker({coordinates:this.lastProcessedPosition.coordinates,accuracy:e.accuracy,heading:a}),this.headingFollow?this.syncHeadingFollowCenterFromGps():t&&this.focusToGPS({zoom:n,flyToLocation:t}).catch(function(){})}},e.prototype.handleCompassUpdate=function(e){this.compassCallbacks.forEach(function(t){try{t(e)}catch(e){}}),this.compass.isCompassPermissionDenied()||this.gps.isGPSEnabled()&&"navigation"!==this.sdkMode&&this.applyNormalHeading(e.heading)},e.prototype.applyNormalHeading=function(e){var t,n,r;if(null===e||!Number.isFinite(e))return this.lastHeadingMarkerDeg=null,this.lastHeadingCameraEaseDeg=null,this.lastCameraBearingUnwrapped=null,void this.marker.updateHeading(null);var i=null===(t=this.lastProcessedPosition)||void 0===t?void 0:t.coordinates,o=null!==(r=null===(n=this.lastProcessedPosition)||void 0===n?void 0:n.accuracy)&&void 0!==r?r:5;if(i?this.writeMarker({coordinates:i,accuracy:o,heading:e}):this.writeHeadingOnly(e),this.headingFollow&&this.follow&&"navigation"!==this.sdkMode&&!(null!==this.lastHeadingCameraEaseDeg&&_c(e,this.lastHeadingCameraEaseDeg)<3)&&i&&!(i.length<2)){var a=Date.now();if(!(a-this.lastHeadingCameraUpdateMs<48)){this.lastHeadingCameraUpdateMs=a,this.lastHeadingCameraEaseDeg=e;var s=this.unwrapCameraBearing(e);this.commitCameraStop({center:i,bearing:s,pitch:56,zoom:this.cameraDirector.getZoom()||18,paddingFraction:{top:.22},durationMs:280,easing:"linear"})}}},e.prototype.commitCameraStop=function(e,t){if(void 0===t&&(t={}),this.follow){var n=Date.now();!t.force&&n-this.lastCameraUpdateMs<48||(this.lastCameraUpdateMs=n,this.lastAppliedCameraStop=e,this.cameraDirector.submit(e,"user-location"))}},e.prototype.writeHeadingOnly=function(e){(null===this.lastHeadingMarkerDeg||_c(e,this.lastHeadingMarkerDeg)>=3)&&(this.marker.updateHeading(e),this.lastHeadingMarkerDeg=e)},e.prototype.writeMarker=function(e){var t=null!=e.heading&&Number.isFinite(e.heading)?e.heading:null;if(null==t)return this.marker.update(e.coordinates,e.accuracy,null),void(this.lastAppliedPose={coordinates:e.coordinates,accuracy:e.accuracy,heading:null});var n=null===this.lastHeadingMarkerDeg||_c(t,this.lastHeadingMarkerDeg)>=3,r=n?t:this.lastHeadingMarkerDeg;this.marker.update(e.coordinates,e.accuracy,r),n&&(this.lastHeadingMarkerDeg=t),this.lastAppliedPose={coordinates:e.coordinates,accuracy:e.accuracy,heading:r}},e.prototype.syncHeadingFollowCenterFromGps=function(){var e;if(this.headingFollow&&this.gps.isGPSEnabled()&&this.follow&&"navigation"!==this.sdkMode){var t=null===(e=this.lastProcessedPosition)||void 0===e?void 0:e.coordinates;if(t&&!(t.length<2)){var n=Date.now();n-this.lastHeadingFollowCenterUpdateMs<48||(this.lastHeadingFollowCenterUpdateMs=n,this.commitCameraStop(_(_({center:t},null!=this.lastCameraBearingUnwrapped?{bearing:this.lastCameraBearingUnwrapped}:{}),{pitch:56,durationMs:200,easing:"linear"})))}}},e.prototype.clearNormalHeadingCameraFollowInternal=function(e){var t,n=this.headingFollow;if(this.headingFollow=!1,this.lastHeadingCameraEaseDeg=null,n&&e.easeMapToNorthUp){var r=null===(t=this.lastProcessedPosition)||void 0===t?void 0:t.coordinates;if(r){var i=this.unwrapCameraBearing(0);this.commitCameraStop({center:r,bearing:i,pitch:0,durationMs:400,easing:"ease"},{force:!0})}}this.lastCameraBearingUnwrapped=null,n&&this.emitToggle()},e.prototype.unwrapCameraBearing=function(e){var t=this.lastCameraBearingUnwrapped;if(null==t)return this.lastCameraBearingUnwrapped=e,e;var n=t+function(e,t){var n=(e%360+360)%360,r=(t%360+360)%360-n;r>180&&(r-=360);r<-180&&(r+=360);return r}(t,e);return this.lastCameraBearingUnwrapped=n,n},e.prototype.isPositionWithinBounds=function(e){var t,n=this.getFocusTree();if(!n||"object"!==z(n))return!1;for(var r=e[0],i=e[1],o=0,a=Object.keys(n);o<a.length;o++){var s=n[a[o]],l=null==s?void 0:s.bounds;if(l&&Array.isArray(l))try{if(2===l.length&&Array.isArray(l[0])&&"number"==typeof l[0][0]&&Array.isArray(l[1])&&"number"==typeof l[1][0]&&!Array.isArray(l[0][0])){var u=l[0],c=l[1];if(r>=u[0]&&r<=c[0]&&i>=u[1]&&i<=c[1])return!0;continue}var h=Array.isArray(null===(t=l[0])||void 0===t?void 0:t[0])?l[0]:l;if(!Array.isArray(h)||h.length<3)continue;for(var d=1/0,p=1/0,f=-1/0,g=-1/0,m=0,v=h;m<v.length;m++){var y=v[m];Array.isArray(y)&&"number"==typeof y[0]&&(d=Math.min(d,y[0]),p=Math.min(p,y[1]),f=Math.max(f,y[0]),g=Math.max(g,y[1]))}if(Number.isFinite(d)&&r>=d&&r<=f&&i>=p&&i<=g)return!0}catch(e){continue}}return!1},e.prototype.emitToggle=function(){var e=this.gps.isGPSEnabled()&&this.isFollowing();this.toggleCallbacks.forEach(function(t){try{t(e)}catch(e){}})},e.prototype.fanoutError=function(e,t){this.errorCallbacks.forEach(function(n){try{n(e,t)}catch(e){}})},e.prototype.emitExternalHeading=function(e){if(void 0!==e.heading&&null!==e.heading){var t=e.heading,n={heading:t,accuracy:e.accuracy?Math.round(e.accuracy):null,timestamp:Date.now(),isCalibrated:Number.isFinite(t)};this.compassCallbacks.forEach(function(e){try{e(n)}catch(e){}})}},e}();function _c(e,t){var n=Math.abs(e-t)%360;return n>180?360-n:n}function xc(e){var t=JSON.parse(e);if(!Array.isArray(t))throw new Error("Dead zones JSON must be a top-level array");for(var n=0,r=t;n<r.length;n++){var i=r[n];if(!i||"object"!==z(i)||"string"!=typeof i.id)throw new Error("Each dead zone must have a string id");var o=i.geometry;if(!o||"Polygon"!==o.type||!Array.isArray(o.coordinates))throw new Error("Dead zone ".concat(i.id,": geometry must be GeoJSON Polygon"))}return t}function Sc(e,t,n){if(!n.length)return null;for(var r=te(e),i=0,o=n;i<o.length;i++){var a=o[i],s=a.whereDimension;if(null==s||""===s||t&&s===t)try{if(qs(r,a.geometry))return a}catch(e){continue}}return null}var Ac=function(e,t){for(var n=t-e;n>180;)n-=360;for(;n<-180;)n+=360;return n},Pc=function(e){for(var t=e;t<0;)t+=360;for(;t>=360;)t-=360;return t};function Mc(e,t){var n,r;void 0===t&&(t={});var i=null!==(n=t.turnAngleMinDeg)&&void 0!==n?n:22,o=null!==(r=t.minLegM)&&void 0!==r?r:3;if(!e||e.length<2)return[];for(var a=function(e){for(var t=[0],n=1;n<e.length;n+=1){var r=e[n-1],i=e[n];t.push(t[n-1]+zo(r,i,{units:"meters"}))}return t}(e),s=e.length,l=[],u=1;u<s-1;u+=1){var c=Ho(e[u-1],e[u]),h=Ho(e[u],e[u+1]);Math.abs(Ac(c,h))>=i&&l.push(u)}for(var d=[],p=0,f=0,g=l;f<g.length;f++){var m=g[f],v=m;if(!(v<=p)){var y=e[p],w=e[v],b=a[v]-a[p],_=Ho(y,w);d.push({type:"straight",lengthM:b,bearingDeg:Pc(_),startAlongM:a[p],endAlongM:a[v]});c=Ho(e[m-1],e[m]),h=Ho(e[m],e[m+1]);var x=Ac(c,h);d.push({type:"turn",atAlongM:a[m],entryBearingDeg:Pc(c),exitBearingDeg:Pc(h),turnAngleDeg:x}),p=m}}if(p<s-1){y=e[p],w=e[s-1],b=a[s-1]-a[p],_=Ho(y,w);d.push({type:"straight",bearingDeg:Pc(_),lengthM:b,startAlongM:a[p],endAlongM:a[s-1]})}return function(e,t){if(0===e.length||t<=0)return e;for(var n=[],r=0;r<e.length;r+=1){var i=e[r];if("straight"===i.type&&i.lengthM<t&&n.length>0){var o=n[n.length-1];if("straight"===o.type){n[n.length-1]={type:"straight",lengthM:o.lengthM+i.lengthM,bearingDeg:i.bearingDeg,startAlongM:o.startAlongM,endAlongM:i.endAlongM};continue}}n.push(i)}return n}(d,o)}function Cc(e,t,n){if(!e.length||n<=0)return null;for(var r=Math.max(0,Math.min(t,n)),i=null,o=0,a=e;o<a.length;o++){var s=a[o];if("straight"===s.type){if(r>=s.startAlongM&&r<=s.endAlongM+1e-6)return s.bearingDeg;i=s.bearingDeg}}for(var l=e.length-1;l>=0;l-=1)if("straight"===e[l].type)return e[l].bearingDeg;return i}function kc(e,t){for(var n=Math.max(0,t),r=-1,i=0;i<e.length;i+=1){var o=e[i];if("straight"===o.type&&(r+=1,n>=o.startAlongM&&n<=o.endAlongM+1e-6))return r}return Math.max(0,r)}var Tc=new Map;function Ec(e,t,n){var r,i,o="".concat(e,"|").concat(function(e){for(var t=0,n=0;n<e.length;n+=1){var r=e[n];t=(t<<5)-t+(1e6*r[0]+r[1])*(n+1)|0}return String(t)}(t),"|").concat(null!==(r=null==n?void 0:n.turnAngleMinDeg)&&void 0!==r?r:"","|").concat(null!==(i=null==n?void 0:n.minLegM)&&void 0!==i?i:""),a=Tc.get(o);return a||(a=Mc(t,n),Tc.set(o,a)),a}function Rc(e){return e.length<2?0:as(ne(e),{units:"meters"})}function Lc(e,t,n){for(var r=e,i=t-r;i>180;)i-=360;for(;i<-180;)i+=360;for(var o=r+i*n;o<0;)o+=360;for(;o>=360;)o-=360;return o}function Dc(e,t){var n,r,i,o;if(!(null===(n=null==e?void 0:e.segments)||void 0===n?void 0:n.length))return null;for(var a=t.whereDimension,s=t.forwardFloor,l=t.requireWhereDimensionMatch,u=[],c=function(e,t){return Math.abs(e[0]-t[0])<1e-7&&Math.abs(e[1]-t[1])<1e-7},h=Math.max(0,s);h<e.segments.length;h+=1){var d=e.segments[h];if(d.maneuverType!==Su.RouteOverview&&d.maneuverType!==Su.SectionOverview&&(!l||!a||d.whereDimension===a)){var p=null!==(i=null===(r=d.features)||void 0===r?void 0:r.find(function(e){var t;return"LineString"===(null===(t=null==e?void 0:e.geometry)||void 0===t?void 0:t.type)}))&&void 0!==i?i:null===(o=d.features)||void 0===o?void 0:o[1];if(p&&"LineString"===p.geometry.type){var f=p.geometry.coordinates;if(!(f.length<2)){var g=0;u.length>0&&c(u[u.length-1],f[0])&&(g=1);for(var m=g;m<f.length;m+=1)u.push(f[m])}}}}if(u.length<2)return null;var v=ne(u,{});return as(v,{units:"meters"})<=0?null:{line:v}}var Fc=function(){function e(){this.built=null,this.snapped=!1,this.lastAlongM=0,this.lastDisplay=null,this.lastDisplayHeadingDeg=null,this.lastRawFix=null,this.lightSmoothRaw=null,this.transitionBlend=0,this.lastDebugSnapshot=null}return e.prototype.reset=function(){this.built=null,this.snapped=!1,this.lastAlongM=0,this.lastDisplay=null,this.lastDisplayHeadingDeg=null,this.lastRawFix=null,this.lightSmoothRaw=null,this.transitionBlend=0,this.lastDebugSnapshot=null},e.prototype.getDebugSnapshot=function(){return this.lastDebugSnapshot},e.prototype.setTrackingLine=function(e){this.built=e,e||(this.snapped=!1)},e.prototype.seedFromEnginePose=function(e,t,n){var r;this.lastDisplayHeadingDeg=null;var i=this.confidenceFromAccuracy(t),o=this.scaledThresholds(t),a=o.enter,s=o.exit;if(!this.built||this.built.line.geometry.coordinates.length<2){this.lastDisplay=null,this.lastDisplayHeadingDeg=null;var l=this.smoothUnsnapped(e,t);this.lastDisplay=l,this.snapped=!1,this.lastAlongM=0,this.lastRawFix={coords:e,t:n},this.lightSmoothRaw=A([],e,!0),this.transitionBlend=0;var u=Math.max(t,5);return this.lastDebugSnapshot={hasTrackingLine:!1,trackingLineLengthM:0,snapped:!1,reportedAccuracyM:t,accuracyForScalingM:u,enterThresholdM:a,exitThresholdM:s,rawDistanceToRouteM:1/0,smoothedDistanceForEnterM:1/0,lastAlongRouteM:this.lastAlongM,standstill:!1,confidence:i,routeHeadingDeg:null},{displayCoords:l,snapped:!1,rawDistanceToRouteM:1/0,displayHeadingDeg:null,confidence:i}}var c=this.built.line,h=as(c,{units:"meters"}),d=os(c,te(e),{units:"meters"}),p=null!==(r=d.properties.dist)&&void 0!==r?r:1/0;this.lightSmoothRaw=A([],e,!0);var f=p,g=this.snapped;this.snapped?p>s&&(g=!1,this.transitionBlend=1):f<=a&&(g=!0,this.transitionBlend=1),this.lastRawFix={coords:e,t:n};var m,v=Math.max(0,Math.min(h,d.properties.location));this.lastAlongM=v;var y=null;if(g){var w=ju(c,v,{units:"meters"}).geometry.coordinates,b=Ho(w,ju(c,Math.min(v+5,h),{units:"meters"}).geometry.coordinates);for(Number.isFinite(b)||(b=0);b<0;)b+=360;for(;b>=360;)b-=360;null===this.lastDisplayHeadingDeg?this.lastDisplayHeadingDeg=b:this.lastDisplayHeadingDeg=Lc(this.lastDisplayHeadingDeg,b,.22+.12*(1-i)),y=this.lastDisplayHeadingDeg,m=w}else this.lastDisplayHeadingDeg=null,this.lastDisplay=null,m=this.smoothUnsnapped(e,t),y=null;this.snapped=g,this.lastDisplay=m;var _=Math.max(t,5);return this.lastDebugSnapshot={hasTrackingLine:!0,trackingLineLengthM:h,snapped:this.snapped,reportedAccuracyM:t,accuracyForScalingM:_,enterThresholdM:a,exitThresholdM:s,rawDistanceToRouteM:p,smoothedDistanceForEnterM:f,lastAlongRouteM:this.lastAlongM,standstill:!1,confidence:i,routeHeadingDeg:y},{displayCoords:m,snapped:this.snapped,rawDistanceToRouteM:p,displayHeadingDeg:y,confidence:i}},e.prototype.confidenceFromAccuracy=function(e){var t=Math.max(e,5);return Math.max(0,Math.min(1,1-(t-5)/45))},e.prototype.scaledThresholds=function(e){var t=Math.max(e,5);return{enter:14+.45*t,exit:Math.max(20,26+.75*t)}},e.prototype.update=function(e,t,n){var r,i,o=this.confidenceFromAccuracy(t),a=this.scaledThresholds(t),s=a.enter,l=a.exit;if(!this.built||this.built.line.geometry.coordinates.length<2){var u=this.smoothUnsnapped(e,t);this.lastDisplay=u,this.snapped=!1,this.lastRawFix={coords:e,t:n};var c=Math.max(t,5),h=this.scaledThresholds(t),d=h.enter,p=h.exit;return this.lastDebugSnapshot={hasTrackingLine:!1,trackingLineLengthM:0,snapped:!1,reportedAccuracyM:t,accuracyForScalingM:c,enterThresholdM:d,exitThresholdM:p,rawDistanceToRouteM:1/0,smoothedDistanceForEnterM:1/0,lastAlongRouteM:this.lastAlongM,standstill:!1,confidence:o,routeHeadingDeg:null},{displayCoords:u,snapped:!1,rawDistanceToRouteM:1/0,displayHeadingDeg:null,confidence:o}}var f=this.built.line,g=as(f,{units:"meters"}),m=os(f,te(e),{units:"meters"}),v=null!==(r=m.properties.dist)&&void 0!==r?r:1/0;if(this.lightSmoothRaw){c=.25+.35*(1-o);this.lightSmoothRaw=[this.lightSmoothRaw[0]*(1-c)+e[0]*c,this.lightSmoothRaw[1]*(1-c)+e[1]*c]}else this.lightSmoothRaw=A([],e,!0);var y=null!==(i=os(f,te(this.lightSmoothRaw),{units:"meters"}).properties.dist)&&void 0!==i?i:v,w=this.snapped;if(this.snapped)v>l&&(w=!1,this.transitionBlend=1);else if(y<=s){w=!0,this.transitionBlend=1;var b=m.properties.location;this.lastAlongM=Math.max(this.lastAlongM,b)}var _,x=!1;if(this.lastRawFix){var S=zo(this.lastRawFix.coords,e,{units:"meters"}),P=Math.max(0,n-this.lastRawFix.t);S<.85&&P<8e3&&(x=!0)}this.lastRawFix={coords:e,t:n};var M=null;if(w){var C=m.properties.location,k=void 0;if(x)k=this.lastAlongM;else{var T=Math.max(this.lastAlongM-3,C);k=Math.min(T,g),this.lastAlongM=k}var E=Math.max(0,Math.min(k,g)),R=ju(f,E,{units:"meters"}).geometry.coordinates,L=Ho(R,ju(f,Math.min(E+5,g),{units:"meters"}).geometry.coordinates);for(Number.isFinite(L)||(L=0);L<0;)L+=360;for(;L>=360;)L-=360;null===this.lastDisplayHeadingDeg?this.lastDisplayHeadingDeg=L:this.lastDisplayHeadingDeg=Lc(this.lastDisplayHeadingDeg,L,.22+.12*(1-o)),M=this.lastDisplayHeadingDeg;var D=1+.2*(1-o);if(_=this.lastDisplay?[this.lastDisplay[0]*(1-D)+R[0]*D,this.lastDisplay[1]*(1-D)+R[1]*D]:R,this.transitionBlend>0&&this.lastDisplay&&!this.snapped){var F=.35;_=[_[0]*(1-F)+this.lastDisplay[0]*F,_[1]*(1-F)+this.lastDisplay[1]*F],this.transitionBlend=Math.max(0,this.transitionBlend-.25)}}else if(this.lastDisplayHeadingDeg=null,_=this.smoothUnsnapped(e,t),M=null,this.transitionBlend>0&&this.lastDisplay&&this.snapped){F=.35;_=[_[0]*(1-F)+this.lastDisplay[0]*F,_[1]*(1-F)+this.lastDisplay[1]*F],this.transitionBlend=Math.max(0,this.transitionBlend-.25)}this.snapped=w,this.lastDisplay=_;var O=Math.max(t,5);return this.lastDebugSnapshot={hasTrackingLine:!0,trackingLineLengthM:g,snapped:this.snapped,reportedAccuracyM:t,accuracyForScalingM:O,enterThresholdM:s,exitThresholdM:l,rawDistanceToRouteM:v,smoothedDistanceForEnterM:y,lastAlongRouteM:this.lastAlongM,standstill:x,confidence:o,routeHeadingDeg:M},{displayCoords:_,snapped:this.snapped,rawDistanceToRouteM:v,displayHeadingDeg:M,confidence:o}},e.prototype.smoothUnsnapped=function(e,t){var n=.88+.25*(1-this.confidenceFromAccuracy(t));if(!this.lastDisplay)return e;var r=this.lastDisplay[0]*(1-n)+e[0]*n,i=this.lastDisplay[1]*(1-n)+e[1]*n,o=zo(this.lastDisplay,[r,i],{units:"meters"});if(o>1){var a=1/o;r=this.lastDisplay[0]+(r-this.lastDisplay[0])*a,i=this.lastDisplay[1]+(i-this.lastDisplay[1])*a}return[r,i]},e.prototype.getSnapped=function(){return this.snapped},e}(),Oc=function(){function e(){this.pieces=[],this.totalLenM=0,this.alongM=0,this.movementHeadingDeg=null,this.lastSampleMs=0,this.magSlow=9.81,this.lastPeakMs=0,this.lastBumpForPeak=0,this.stepLengthEma=.72,this.energyEma=0,this.stopSinceMs=null,this.straightIdx=0,this.turnConfirmForwardM=0,this.pendingTurnExitBearing=null}return e.prototype.reset=function(e){this.pieces=e.pieces,this.totalLenM=Math.max(0,e.totalLenM),this.alongM=Math.max(0,Math.min(e.startAlongM,this.totalLenM)),this.movementHeadingDeg=e.initialMovementHeadingDeg,this.lastSampleMs=0,this.magSlow=9.81,this.lastPeakMs=0,this.lastBumpForPeak=0,this.stepLengthEma=.72,this.energyEma=0,this.stopSinceMs=null,this.straightIdx=kc(this.pieces,this.alongM),this.turnConfirmForwardM=0,this.pendingTurnExitBearing=null},e.prototype.getAlongM=function(){return this.alongM},e.prototype.getMovementHeadingDeg=function(){return this.movementHeadingDeg},e.prototype.getStraightPieceIndex=function(){return this.straightIdx},e.prototype.feed=function(e){var t,n=e.timestampMs,r=this.lastSampleMs>0?Math.min(.2,Math.max(0,(n-this.lastSampleMs)/1e3)):0;this.lastSampleMs=n;var i=e.accelerationIncludingGravity,o=0;i&&(o=Math.sqrt(i.x*i.x+i.y*i.y+i.z*i.z)),this.magSlow=.92*this.magSlow+.08*o;var a=o-this.magSlow;this.energyEma=.9*this.energyEma+.1*Math.abs(a);var s=!1;i&&n-this.lastPeakMs>=380&&a>1.15&&a>.4*this.lastBumpForPeak&&(s=!0,this.lastPeakMs=n),this.lastBumpForPeak=a,this.energyEma<.35?this.stopSinceMs=null!==(t=this.stopSinceMs)&&void 0!==t?t:n:this.stopSinceMs=null;var l=!(null!=this.stopSinceMs&&n-this.stopSinceMs>900),u=Cc(this.pieces,this.alongM,this.totalLenM),c=e.rotationRate;if(r>0&&l&&c&&null!=this.movementHeadingDeg){var h=c.gamma;if(Number.isFinite(h)){for(var d=this.movementHeadingDeg+h*r;d<0;)d+=360;for(;d>=360;)d-=360;this.movementHeadingDeg=d}}null!=u&&null==this.movementHeadingDeg&&(this.movementHeadingDeg=u),s&&null!=u&&null!=this.movementHeadingDeg&&(this.movementHeadingDeg=Lc(this.movementHeadingDeg,u,.07));var p=0;if(null!=u&&null!=this.movementHeadingDeg){for(var f=u-this.movementHeadingDeg;f>180;)f-=360;for(;f<-180;)f+=360;p=Math.max(0,Math.cos(f*Math.PI/180))}else p=s?.55:0;if(this.updateTurnAnchorState(u,s?this.stepLengthEma*p:0),s&&l&&this.totalLenM>0){var g=this.stepLengthEma*p,m=Math.min(this.totalLenM,this.alongM+Math.max(0,g));if(p>.2&&m>this.alongM+.05){var v=(m-this.alongM)/Math.max(p,.2);this.stepLengthEma=.92*this.stepLengthEma+.08*v,this.stepLengthEma=Math.max(.45,Math.min(1.05,this.stepLengthEma))}this.alongM=m}return this.straightIdx=kc(this.pieces,this.alongM),{alongM:this.alongM,movementHeadingDeg:this.movementHeadingDeg,moving:l,straightPieceIndex:this.straightIdx,alignmentGain:p,stepDetected:s}},e.prototype.updateTurnAnchorState=function(e,t){var n=this,r=this.pieces.find(function(e){return"turn"===e.type&&n.alongM>=e.atAlongM-.5&&n.alongM<=e.atAlongM+2.5});if(r&&null!=e&&(this.pendingTurnExitBearing=r.exitBearingDeg),null!=this.pendingTurnExitBearing&&null!=this.movementHeadingDeg){for(var i=this.movementHeadingDeg-this.pendingTurnExitBearing;i>180;)i-=360;for(;i<-180;)i+=360;Math.abs(i)<42&&t>0?this.turnConfirmForwardM+=t:t>0&&(this.turnConfirmForwardM=Math.max(0,this.turnConfirmForwardM-.5*t)),this.turnConfirmForwardM>=1.2&&(this.pendingTurnExitBearing=null,this.turnConfirmForwardM=0)}},e}(),jc=function(){function e(e,t,n,r){var i,o=this;this.gpsCallbackRef=null,this.compassCallbackRef=null,this.unsubscribeFocus=null,this.uiHandlers={},this.lastEmittedSegmentIndex=-1,this.lerpedCoords=null,this.routeArc=[],this.currentRouteStep=0,this.targetRouteStep=0,this.routeSteps=500,this.animationSpeed=1,this.SNAP_WINDOW_METERS=5,this.OFF_ROUTE_THRESHOLD_METERS=25,this.REROUTE_COOLDOWN_MS=5e3,this.lastRerouteTime=0,this.lastKnownRemainingDistanceM=null,this.arrivalLockActive=!1,this.arrivalCameraFramingApplied=!1,this.navigationCompleteEmitted=!1,this.lastRawPosition=null,this.MIN_DISTANCE_FOR_VALID_HEADING_METERS=10,this.totalDistanceTraveled=0,this.currentHeading=null,this.currentPosition=null,this.cameraPitch=60,this.cameraZoomLevel=19,this.lastWhereUsedForTracking=null,this.isNavigating=!1,this.routeAlignedHeadingDeg=null,this.frozenUnsnappedHeadingDeg=null,this.navigationSnapped=!1,this.lastSnapStateForUi=!1,this.routeFollowingEstimator=new Fc,this.routeTrackingEpoch=0,this.trackingLineCacheKey="",this.trackingLineCached=null,this.trackingLineLengthMCached=0,this.targetNavCoords=null,this.targetNavHeadingDeg=null,this.targetAlongMOnTrackingLine=null,this.targetAlongMCacheKey="",this.visualNavCoords=null,this.visualNavHeadingDeg=null,this.visualAlongMOnTrackingLine=null,this.visualAlongMCacheKey="",this.lastNavAccuracy=10,this.lastNavVisualFrameTime=0,this.lastAppliedVisualNavCoords=null,this.lastAppliedVisualHeadingDeg=null,this.tickNavVisual=function(){return o.runNavVisualFrame()},this.lastRouteProgressVisualMs=0,this.lastRouteSliceVisualNavCoords=null,this.lastBlueDotProgressVisualMs=0,this.lastAppliedRouteSliceSegmentIndex=-1,this.lastAppliedRouteSliceAlongM=-1,this.navigationLocMode="gps",this.deadZones=[],this.deadZonesUrl=null,this.deadZonesLoadPromise=null,this.activeDeadZoneId=null,this.deadZoneInsideConsecutive=0,this.pdrRawGpsOutsideConsecutive=0,this.lastDeadZoneModeSwitchMs=0,this.startAnchorLockActive=!1,this.startAnchorLockAnchorLngLat=null,this.startAnchorLockWhereTaxonomyPath=null,this.anchorPdrHandoffGoodFrames=0,this.anchorPdrBlendActive=!1,this.anchorPdrBlendW=0,this.anchorPdrBlendGpsTarget=null,this.anchorPdrLastBlendGpsTs=0,this.lastAnchorBlendBForOdom=null,this.qualityPdrBadConsecutive=0,this.qualityBlendRerouteSuppressed=!1,this.portalProgressHoldActive=!1,this.pdrLockedRouteSegmentIndex=-1,this.pdrAlongMeters=0,this.pdrLastAlongForDistanceM=null,this.pdrLockedLine=null,this.pdrEngine=new Oc,this.pdrLastFeed=null,this.pdrNavigationAllowedByUi=!0,this.lastRouteFollowingConfidence=.75,this.routingManager=e,this.userLocation=t,this.autoFocusManager=n,(null==r?void 0:r.deadZonesUrl)&&(this.deadZonesUrl=r.deadZonesUrl),(null===(i=null==r?void 0:r.deadZones)||void 0===i?void 0:i.length)&&(this.deadZones=A([],r.deadZones,!0)),this.unsubscribeFocus=cl().subscribeToFocusChange(function(){o.onWhereTaxonomyUpdate()}),this.gpsCallbackRef=function(e){o.updateNavigationWithGPS(e)},this.userLocation.addCallback({onLocationUpdate:this.gpsCallbackRef}),this.compassCallbackRef=function(e){o.updateNavigationWithCompass(e)},this.userLocation.addCallback({onCompassUpdate:this.compassCallbackRef})}return e.prototype.getReadiness=function(){return Qs},e.prototype.focusedWhere=function(){return cl().getCurrentFocus()||null},e.prototype.emitUserPose=function(e){this.userLocation.applyPose(e)},e.prototype.emitUserCameraStop=function(e,t){this.userLocation.applyCameraStop(e,t)},e.prototype.setUIHandlers=function(e){this.uiHandlers=e||{}},e.prototype.setNavigationPdrOptions=function(e){void 0!==e.deadZonesUrl&&(this.deadZonesUrl=e.deadZonesUrl||null,this.deadZonesLoadPromise=null),void 0!==e.deadZones&&(this.deadZones=e.deadZones.length?A([],e.deadZones,!0):[])},e.prototype.setPdrNavigationAllowed=function(e){this.pdrNavigationAllowedByUi=e,e||"pdr"!==this.navigationLocMode||this.leavePdrMode()},e.prototype.getPdrNavigationDebug=function(){var e,t,n,r,i,o,a,s;return this.isNavigating?{mode:this.navigationLocMode,deadZoneId:this.activeDeadZoneId,anchorBlendActive:this.anchorPdrBlendActive,anchorBlendW:this.anchorPdrBlendW,lockedSegmentIndex:this.pdrLockedRouteSegmentIndex,pdrAlongMeters:this.pdrAlongMeters,subSegmentStraightIndex:null!==(t=null===(e=this.pdrLastFeed)||void 0===e?void 0:e.straightPieceIndex)&&void 0!==t?t:this.pdrEngine.getStraightPieceIndex(),movementHeadingDeg:this.pdrEngine.getMovementHeadingDeg(),moving:null!==(r=null===(n=this.pdrLastFeed)||void 0===n?void 0:n.moving)&&void 0!==r&&r,alignmentGain:null!==(o=null===(i=this.pdrLastFeed)||void 0===i?void 0:i.alignmentGain)&&void 0!==o?o:0,stepDetected:null!==(s=null===(a=this.pdrLastFeed)||void 0===a?void 0:a.stepDetected)&&void 0!==s&&s}:null},e.prototype.getSegmentLineStringFeature=function(e){var t,n,r,i,o=this.routingManager.getReferenceRouteForTracking(),a=null===(t=null==o?void 0:o.segments)||void 0===t?void 0:t[e];if(!a)return null;var s=null!==(r=null===(n=a.features)||void 0===n?void 0:n.find(function(e){var t;return"LineString"===(null===(t=null==e?void 0:e.geometry)||void 0===t?void 0:t.type)}))&&void 0!==r?r:null===(i=a.features)||void 0===i?void 0:i[1];return s&&"LineString"===s.geometry.type?s:null},e.prototype.ensureDeadZonesLoaded=function(){return x(this,void 0,void 0,function(){var e=this;return S(this,function(t){switch(t.label){case 0:return this.deadZonesUrl?this.deadZonesLoadPromise?[4,this.deadZonesLoadPromise]:[3,2]:[2];case 1:case 3:return t.sent(),[2];case 2:return this.deadZonesLoadPromise=function(e){return x(this,void 0,void 0,function(){var t,n;return S(this,function(r){switch(r.label){case 0:return[4,fetch(e)];case 1:if(!(t=r.sent()).ok)throw new Error("Failed to load dead zones (".concat(t.status,"): ").concat(e));return n=xc,[4,t.text()];case 2:return[2,n.apply(void 0,[r.sent()])]}})})}(this.deadZonesUrl).then(function(t){e.deadZones=t}).catch(function(e){console.warn("[NavigationEngine] Failed to load dead zones",e)}),[4,this.deadZonesLoadPromise]}})})},e.prototype.leavePdrMode=function(){var e,t;if("pdr"===this.navigationLocMode){this.userLocation.stopMotion();var n=this.activeDeadZoneId;this.navigationLocMode="gps",this.resetAnchorPdrBlendState(),this.activeDeadZoneId=null,this.pdrLockedLine=null,this.pdrLockedRouteSegmentIndex=-1,this.pdrAlongMeters=0,this.pdrLastAlongForDistanceM=null,this.pdrLastFeed=null,this.pdrRawGpsOutsideConsecutive=0,this.lastDeadZoneModeSwitchMs=Date.now(),this.qualityBlendRerouteSuppressed=!1,null===(t=(e=this.uiHandlers).onNavigationLocModeChange)||void 0===t||t.call(e,"gps",null!=n?n:void 0)}},e.prototype.resetDeadZoneEvaluationState=function(){this.deadZoneInsideConsecutive=0,this.pdrRawGpsOutsideConsecutive=0,this.lastDeadZoneModeSwitchMs=0},e.prototype.resetAnchorPdrBlendState=function(){var e,t,n=this.anchorPdrBlendActive;this.anchorPdrBlendActive=!1,this.anchorPdrBlendW=0,this.anchorPdrBlendGpsTarget=null,this.anchorPdrLastBlendGpsTs=0,this.lastAnchorBlendBForOdom=null,this.anchorPdrHandoffGoodFrames=0,n&&(null===(t=(e=this.uiHandlers).onAnchorGpsBlendChange)||void 0===t||t.call(e,!1,0))},e.prototype.clearStartAnchorLock=function(){this.startAnchorLockActive=!1,this.startAnchorLockAnchorLngLat=null,this.startAnchorLockWhereTaxonomyPath=null,this.resetAnchorPdrBlendState()},e.prototype.configureStartAnchorLock=function(e){var t;this.clearStartAnchorLock();var n=null==e?void 0:e.startAnchorLngLat;n&&Number.isFinite(n[0])&&Number.isFinite(n[1])&&(this.startAnchorLockActive=!0,this.startAnchorLockAnchorLngLat=[n[0],n[1]],this.startAnchorLockWhereTaxonomyPath=null!==(t=null==e?void 0:e.lockWhereTaxonomyPath)&&void 0!==t?t:null)},e.prototype.evaluateStartAnchorLockScope=function(e){this.startAnchorLockActive&&this.startAnchorLockWhereTaxonomyPath&&this.focusedWhere()&&this.focusedWhere()!==this.startAnchorLockWhereTaxonomyPath&&this.clearStartAnchorLock()},e.prototype.tryEnterQualityRecoveryPdr=function(t,n,r){var i,o,a,s;if(!this.pdrNavigationAllowedByUi)return!1;if(this.arrivalLockActive)return!1;if(r-this.lastDeadZoneModeSwitchMs<e.DEAD_ZONE_MODE_SWITCH_COOLDOWN_MS)return!1;var l=null!==(a=null!==(o=null!==(i=this.visualNavCoords)&&void 0!==i?i:this.lerpedCoords)&&void 0!==o?o:this.targetNavCoords)&&void 0!==a?a:null===(s=this.currentPosition)||void 0===s?void 0:s.coordinates;if(!l||l.length<2)return!1;var u=zo(l,t.coordinates,{units:"meters"});return n>=e.QUALITY_PDR_BAD_ACCURACY_M||u>=e.QUALITY_PDR_MAX_RESIDUAL_M?(this.qualityPdrBadConsecutive+=1,!(this.qualityPdrBadConsecutive<e.QUALITY_PDR_CONSECUTIVE_BAD)&&(this.enterPdrFromRouteSeed(null,l)?(this.qualityPdrBadConsecutive=0,this.qualityBlendRerouteSuppressed=!0,!0):(this.qualityPdrBadConsecutive=0,!1))):(this.qualityPdrBadConsecutive=0,!1)},e.prototype.enterPdrFromRouteSeed=function(e,t){var n,r,i,o,a,s,l=this;if("pdr"===this.navigationLocMode)return!0;if(!this.pdrNavigationAllowedByUi)return!1;var u=this.routingManager.getReferenceRouteForTracking();if(!(null===(n=null==u?void 0:u.segments)||void 0===n?void 0:n.length))return!1;var c=null!==(i=null!==(r=null!=t?t:this.visualNavCoords)&&void 0!==r?r:this.lerpedCoords)&&void 0!==i?i:null===(o=this.currentPosition)||void 0===o?void 0:o.coordinates;if(!c)return!1;var h=this.findNearestSegmentIndexForCurrentWhere(u,c);this.maybeAdvanceLastEmittedSegmentIndex(h);var d=this.getSegmentLineStringFeature(h);if(!d)return!1;var p=d.geometry.coordinates;if(p.length<2)return!1;var f=Rc(p);if(!(f>0))return!1;var g=os(d,te(c),{units:"meters"}),m=Math.max(0,Math.min(f,g.properties.location)),v=Ec(h,p),y=Cc(v,m,f);this.pdrLockedRouteSegmentIndex=h,this.pdrLockedLine=d,this.pdrAlongMeters=m,this.pdrLastAlongForDistanceM=m,this.activeDeadZoneId=e,this.navigationLocMode="pdr",this.lastDeadZoneModeSwitchMs=Date.now(),this.resetAnchorPdrBlendState(),this.pdrEngine.reset({totalLenM:f,startAlongM:m,pieces:v,initialMovementHeadingDeg:y});var w=ju(d,m,{units:"meters"});return this.setTargetNavCoords(w.geometry.coordinates),this.navigationSnapped=!0,this.routeAlignedHeadingDeg=y,this.frozenUnsnappedHeadingDeg=y,this.targetNavHeadingDeg=this.resolveNavigationHeadingTarget(),this.pdrLastFeed={moving:!1,alignmentGain:1,stepDetected:!1,straightPieceIndex:this.pdrEngine.getStraightPieceIndex()},this.userLocation.startMotion(function(e){return l.updateNavigationWithMotion(e)}),null===(s=(a=this.uiHandlers).onNavigationLocModeChange)||void 0===s||s.call(a,"pdr",null!=e?e:void 0),!0},e.prototype.tryEnterPdrMode=function(e,t){return this.enterPdrFromRouteSeed(e.id,t)},e.prototype.rebindPdrLockedLineAtSeed=function(e,t){var n,r,i;if("pdr"!==this.navigationLocMode)return!1;var o=this.routingManager.getReferenceRouteForTracking();if(!(null===(n=null==o?void 0:o.segments)||void 0===n?void 0:n.length))return this.leavePdrMode(),!1;var a=this.findNearestSegmentIndexForCurrentWhere(o,e);this.maybeAdvanceLastEmittedSegmentIndex(a);var s=this.getSegmentLineStringFeature(a);if(!s)return this.leavePdrMode(),!1;var l=s.geometry.coordinates;if(l.length<2)return this.leavePdrMode(),!1;var u=Rc(l);if(!(u>0))return this.leavePdrMode(),!1;var c=os(s,te(e),{units:"meters"}),h=Math.max(0,Math.min(u,c.properties.location)),d=Ec(a,l),p=Cc(d,h,u);this.pdrLockedRouteSegmentIndex=a,this.pdrLockedLine=s,this.pdrAlongMeters=h,this.pdrLastAlongForDistanceM=h,this.activeDeadZoneId=t,null===t?this.resetAnchorPdrBlendState():this.anchorPdrHandoffGoodFrames=0,this.pdrEngine.reset({totalLenM:u,startAlongM:h,pieces:d,initialMovementHeadingDeg:p});var f=ju(s,h,{units:"meters"});return this.setTargetNavCoords(f.geometry.coordinates),this.navigationSnapped=!0,this.routeAlignedHeadingDeg=p,this.frozenUnsnappedHeadingDeg=p,this.targetNavHeadingDeg=this.resolveNavigationHeadingTarget(),this.pdrRawGpsOutsideConsecutive=0,this.pdrLastFeed={moving:!1,alignmentGain:1,stepDetected:!1,straightPieceIndex:this.pdrEngine.getStraightPieceIndex()},null===(i=(r=this.uiHandlers).onNavigationLocModeChange)||void 0===i||i.call(r,"pdr",null!=t?t:void 0),!0},e.prototype.rebindPdrToDeadZone=function(e,t){return this.rebindPdrLockedLineAtSeed(t,e.id)},e.prototype.getPdrPureCoords=function(){var e,t,n,r;return this.pdrLockedLine&&Number.isFinite(this.pdrAlongMeters)?ju(this.pdrLockedLine,this.pdrAlongMeters,{units:"meters"}).geometry.coordinates:null!==(r=null!==(t=null!==(e=this.visualNavCoords)&&void 0!==e?e:this.lerpedCoords)&&void 0!==t?t:null===(n=this.currentPosition)||void 0===n?void 0:n.coordinates)&&void 0!==r?r:[0,0]},e.prototype.anchorPdrReliabilityFromAccuracy=function(e){var t=Math.max(e,5);return Math.max(0,Math.min(1,1-(t-5)/45))},e.prototype.updateAnchorPdrBlendTowardGps=function(t,n,r){var i,o,a,s,l=t.coordinates,u=this.getBuiltTrackingLine();if(!u)return this.anchorPdrHandoffGoodFrames=0,!1;this.routeFollowingEstimator.setTrackingLine(u);var c=this.routeFollowingEstimator.update(l,n,r);if(this.lastRouteFollowingConfidence=c.confidence,c.snapped&&(this.anchorPdrBlendGpsTarget=[c.displayCoords[0],c.displayCoords[1]]),!this.anchorPdrBlendActive){if(c.snapped&&n<=e.ANCHOR_PDR_HANDOFF_MAX_ACCURACY_M&&c.confidence>=e.ANCHOR_PDR_HANDOFF_MIN_CONFIDENCE){if(this.anchorPdrHandoffGoodFrames+=1,this.anchorPdrHandoffGoodFrames>=e.ANCHOR_PDR_HANDOFF_CONSECUTIVE_GOOD){this.anchorPdrBlendActive=!0,this.anchorPdrBlendW=0,this.anchorPdrHandoffGoodFrames=0,this.anchorPdrLastBlendGpsTs=r;var h=this.getPdrPureCoords();this.lastAnchorBlendBForOdom=[h[0],h[1]],this.setTargetNavCoords(h),this.ensureNavVisualLoop(),null===(o=(i=this.uiHandlers).onAnchorGpsBlendChange)||void 0===o||o.call(i,!0,0)}}else this.anchorPdrHandoffGoodFrames=0;return!1}if(!this.anchorPdrBlendGpsTarget)return this.ensureNavVisualLoop(),!1;var d=(r-this.anchorPdrLastBlendGpsTs)/1e3;if((!Number.isFinite(d)||d<=0)&&(d=.12),d>2&&(d=.25),this.anchorPdrLastBlendGpsTs=r,c.snapped&&n<=e.ANCHOR_PDR_HANDOFF_MAX_ACCURACY_M){var p=this.anchorPdrReliabilityFromAccuracy(n),f=Math.min(.35,e.ANCHOR_PDR_BLEND_SPEED_PER_S*p*d);this.anchorPdrBlendW=Math.min(1,this.anchorPdrBlendW+f)}var g=this.getPdrPureCoords(),m=this.anchorPdrBlendGpsTarget,v=this.anchorPdrBlendW,y=[g[0]+(m[0]-g[0])*v,g[1]+(m[1]-g[1])*v];return this.setTargetNavCoords(y),this.lastAnchorBlendBForOdom&&(this.totalDistanceTraveled+=zo(this.lastAnchorBlendBForOdom,y,{units:"meters"})),this.lastAnchorBlendBForOdom=[y[0],y[1]],this.anchorPdrBlendW>=.995?this.completeAnchorBlendHandoff(c,t,n,r):(null===(s=(a=this.uiHandlers).onAnchorGpsBlendChange)||void 0===s||s.call(a,!0,this.anchorPdrBlendW),this.ensureNavVisualLoop(),!1)},e.prototype.completeAnchorBlendHandoff=function(e,t,n,r){var i,o,a=[e.displayCoords[0],e.displayCoords[1]];return this.leavePdrMode(),this.startAnchorLockActive&&(this.startAnchorLockActive=!1,this.startAnchorLockAnchorLngLat=null,this.startAnchorLockWhereTaxonomyPath=null),this.visualNavCoords=A([],a,!0),this.lerpedCoords=A([],a,!0),this.setTargetNavCoords(a),this.navigationSnapped=e.snapped,this.lastNavAccuracy=n,this.lastRawPosition={coords:t.coordinates,timestamp:r},e.snapped!==this.lastSnapStateForUi&&(this.lastSnapStateForUi=e.snapped,null===(o=(i=this.uiHandlers).onSnapStateChange)||void 0===o||o.call(i,e.snapped)),!0},e.prototype.updateNavigationWithMotion=function(e){if(this.isNavigating&&"pdr"===this.navigationLocMode&&this.pdrLockedLine){var t=this.pdrEngine.feed(e),n=null===this.activeDeadZoneId&&this.anchorPdrBlendActive;if(!n&&null!=this.pdrLastAlongForDistanceM&&Number.isFinite(this.pdrLastAlongForDistanceM)){var r=t.alongM-this.pdrLastAlongForDistanceM;r>0&&(this.totalDistanceTraveled+=r)}this.pdrLastAlongForDistanceM=t.alongM,this.pdrAlongMeters=t.alongM,this.pdrLastFeed={moving:t.moving,alignmentGain:t.alignmentGain,stepDetected:t.stepDetected,straightPieceIndex:t.straightPieceIndex};var i=ju(this.pdrLockedLine,t.alongM,{units:"meters"}).geometry.coordinates;if(n&&this.anchorPdrBlendGpsTarget){var o=this.anchorPdrBlendGpsTarget,a=this.anchorPdrBlendW,s=[i[0]+(o[0]-i[0])*a,i[1]+(o[1]-i[1])*a];this.setTargetNavCoords(s),this.lastAnchorBlendBForOdom&&(this.totalDistanceTraveled+=zo(this.lastAnchorBlendBForOdom,s,{units:"meters"})),this.lastAnchorBlendBForOdom=[s[0],s[1]]}else this.setTargetNavCoords(i);this.navigationSnapped=!0,this.ensureNavVisualLoop()}},e.prototype.resolveArrivalTargetFromRoute=function(e){var t,n,r,i,o;if(!(null===(t=null==e?void 0:e.segments)||void 0===t?void 0:t.length))return null;for(var a=e.segments.length-1;a>=0;a-=1){var s=e.segments[a];if(s.maneuverType!==Su.RouteOverview&&s.maneuverType!==Su.SectionOverview){var l=null===(n=s.features)||void 0===n?void 0:n.find(function(e){var t;return"Point"===(null===(t=null==e?void 0:e.geometry)||void 0===t?void 0:t.type)}),u=null==l?void 0:l.geometry,c="Point"===(null==u?void 0:u.type)?u.coordinates:void 0;if(c&&Number.isFinite(c[0])&&Number.isFinite(c[1]))return[c[0],c[1]];var h=null!==(i=null===(r=s.features)||void 0===r?void 0:r.find(function(e){var t;return"LineString"===(null===(t=null==e?void 0:e.geometry)||void 0===t?void 0:t.type)}))&&void 0!==i?i:null===(o=s.features)||void 0===o?void 0:o[1],d=null==h?void 0:h.geometry,p="LineString"===(null==d?void 0:d.type)?d.coordinates:void 0;if(p&&p.length>0){var f=p[p.length-1];if(Number.isFinite(f[0])&&Number.isFinite(f[1]))return[f[0],f[1]]}}}return null},e.prototype.applyArrivalCameraFraming=function(t,n){var r=Ho(t,n);for(Number.isFinite(r)||(r=0);r<0;)r+=360;for(;r>=360;)r-=360;this.emitUserCameraStop({center:n,bearing:r,pitch:e.ARRIVAL_CAMERA_PITCH,zoom:Math.max(e.ARRIVAL_CAMERA_ZOOM,this.userLocation.getZoom()),durationMs:1500,easing:"linear"})},e.prototype.maybeEnterArrivalLockAndFrame=function(e,t,n){var r,i;if(Number.isFinite(t)&&!(t>20||(this.arrivalLockActive||(this.arrivalLockActive=!0,this.navigationCompleteEmitted||(this.navigationCompleteEmitted=!0,null===(i=(r=this.uiHandlers).onNavigationComplete)||void 0===i||i.call(r))),this.arrivalCameraFramingApplied))){var o=this.resolveArrivalTargetFromRoute(n);o&&this.applyArrivalCameraFraming([e[0],e[1]],o),this.arrivalCameraFramingApplied=!0}},e.prototype.notifyReroute=function(e){this.leavePdrMode(),this.lastEmittedSegmentIndex=-1,this.lastKnownRemainingDistanceM=null,this.arrivalLockActive=!1,this.arrivalCameraFramingApplied=!1,this.navigationCompleteEmitted=!1,this.routeTrackingEpoch++,this.invalidateRouteTrackingCache(),this.lastAppliedRouteSliceSegmentIndex=-1,this.lastAppliedRouteSliceAlongM=-1,this.lastAppliedVisualNavCoords=null,this.lastAppliedVisualHeadingDeg=null,this.lastRouteSliceVisualNavCoords=null,this.lastBlueDotProgressVisualMs=0,this.autoFocusManager.resetPortalProposalSuppression(),this.uiHandlers.onReroute&&this.uiHandlers.onReroute(e)},e.prototype.invalidateRouteTrackingCache=function(){this.trackingLineCacheKey="",this.trackingLineCached=null,this.trackingLineLengthMCached=0,this.targetAlongMOnTrackingLine=null,this.targetAlongMCacheKey="",this.visualAlongMOnTrackingLine=null,this.visualAlongMCacheKey="",this.routeFollowingEstimator.reset()},e.prototype.getBuiltTrackingLine=function(){var e,t,n=this.routingManager.getReferenceRouteForTracking();if(!(null===(e=null==n?void 0:n.segments)||void 0===e?void 0:e.length))return null;var r=Math.max(0,this.lastEmittedSegmentIndex),i="".concat(this.routeTrackingEpoch,"|").concat(null!==(t=this.focusedWhere())&&void 0!==t?t:"","|").concat(r,"|").concat(n.segments.length);if(i===this.trackingLineCacheKey&&this.trackingLineCached)return this.trackingLineCached;var o=Dc(n,{whereDimension:this.focusedWhere(),forwardFloor:r,requireWhereDimensionMatch:!0}),a=o?as(o.line,{units:"meters"}):0;return(!o||a<=0)&&(a=(o=Dc(n,{whereDimension:this.focusedWhere(),forwardFloor:r,requireWhereDimensionMatch:!1}))?as(o.line,{units:"meters"}):0),this.trackingLineCacheKey=i,this.trackingLineCached=o,this.trackingLineLengthMCached=a,this.targetAlongMOnTrackingLine=null,this.targetAlongMCacheKey="",this.visualAlongMOnTrackingLine=null,this.visualAlongMCacheKey="",o},e.prototype.findNextNavigableSegmentIndex=function(e,t){if(!(null==e?void 0:e.length))return null;for(var n=t+1;n<e.length;n++){var r=e[n];if(r.maneuverType!==Su.RouteOverview&&r.maneuverType!==Su.SectionOverview)return n}return null},e.prototype.isPortalRouteSegment=function(e){if(e.isPortal)return!0;var t=e.maneuverType;return t===Su.EnterPortal||t===Su.TravelPortal||t===Su.ExitPortal},e.prototype.resolvePostPortalDestinationWhere=function(e,t){var n,r,i,o=e.segments,a=o.length;if(t<0||t>=a)return null;for(var s=t;s<a&&this.isPortalRouteSegment(o[s]);)s+=1;if(s<a){var l=null===(n=o[s])||void 0===n?void 0:n.whereDimension;if(l)return l}var u=s-1;if(u>=t){var c=null===(i=null===(r=o[u])||void 0===r?void 0:r.endEdge)||void 0===i?void 0:i.whereDimension;if(c)return c}return null},e.prototype.maybeProposePortalFloorChange=function(t,n,r,i){var o;if(this.autoFocusManager&&this.isNavigating&&null!=i&&!(i>e.PORTAL_PROPOSE_VICINITY_M)){var a=t.segments,s=this.findNextNavigableSegmentIndex(a,n),l=null,u=null;if(this.isPortalRouteSegment(r))l=n,u=r;else{if(null===s||!this.isPortalRouteSegment(a[s]))return;l=s,u=a[s]}var c=this.resolvePostPortalDestinationWhere(t,l);if(c&&c!==this.focusedWhere()){var h="".concat(l,":").concat(c),d=null===(o=u.instructions)||void 0===o?void 0:o[0];this.autoFocusManager.proposeFromNavigation({whereTaxonomyPath:c,portalDedupeKey:h,portal:{segmentIndex:l,instructionLine:d,portalName:u.portalName,description:u.description}}),i<=e.PORTAL_PROGRESS_HOLD_VICINITY_M&&(this.portalProgressHoldActive=!0)}}},e.prototype.findNearestSegmentIndexAlongRoute=function(e,t,n,r){var i=this,o=-1,a=1/0,s=null;return e.segments.forEach(function(e,l){var u,c,h;if(!(l<n)){var d=null!==(c=null===(u=e.features)||void 0===u?void 0:u.find(function(e){var t;return"LineString"===(null===(t=null==e?void 0:e.geometry)||void 0===t?void 0:t.type)}))&&void 0!==c?c:null===(h=e.features)||void 0===h?void 0:h[1];if(e.maneuverType!==Su.RouteOverview&&e.maneuverType!==Su.SectionOverview&&d&&"LineString"===d.geometry.type&&(!r||e.whereDimension===i.focusedWhere())){var p=os(d,t,{units:"meters"}),f=p.properties.dist;f<a&&(a=f,o=l,s=p.geometry.coordinates)}}}),{nearestIndex:o,minDistance:a,snappedCoords:s}},e.prototype.findNearestSegmentIndexForCurrentWhere=function(e,t){var n=Math.max(0,this.lastEmittedSegmentIndex),r=te(t),i=this.findNearestSegmentIndexAlongRoute(e,r,n,!0).nearestIndex;return i>=0?i:n},e.prototype.maybeAdvanceLastEmittedSegmentIndex=function(e){var t,n;e<0||null===(n=(t=this.uiHandlers).onSegmentIndexChange)||void 0===n||n.call(t,e)},e.prototype.getCurrentPosition=function(){var e,t,n,r;return null!==(n=null!==(t=null!==(e=this.visualNavCoords)&&void 0!==e?e:this.lerpedCoords)&&void 0!==t?t:this.targetNavCoords)&&void 0!==n?n:null===(r=this.currentPosition)||void 0===r?void 0:r.coordinates},e.prototype.getNavigationPose=function(){var e,t,n=null!==(e=this.lerpedCoords)&&void 0!==e?e:null===(t=this.currentPosition)||void 0===t?void 0:t.coordinates;if(!n)return null;var r=null;return this.userLocation.isCompassPermissionDenied()||"number"!=typeof this.currentHeading||(r=this.currentHeading),{coordinates:n,headingDegrees:r,snapped:this.navigationSnapped,confidence:this.lastRouteFollowingConfidence}},e.prototype.getRouteFollowingDebug=function(){var t,n,r;if(!this.isNavigating)return null;var i=this.routeFollowingEstimator.getDebugSnapshot(),o=null!==(n=null===(t=this.currentPosition)||void 0===t?void 0:t.accuracy)&&void 0!==n?n:null,a={offRouteRerouteThresholdM:this.OFF_ROUTE_THRESHOLD_METERS,suppressRerouteBelowRemainingM:e.SUPPRESS_REROUTE_BELOW_REMAINING_M,lastKnownRemainingDistanceM:this.lastKnownRemainingDistanceM,whereTaxonomyPath:this.focusedWhere(),forwardFloor:Math.max(0,this.lastEmittedSegmentIndex),routeAlignedHeadingDeg:this.routeAlignedHeadingDeg,gpsReportedAccuracyM:"number"==typeof o&&Number.isFinite(o)?o:null};return _(i?_(_({},i),{snapped:this.navigationSnapped,routeHeadingDeg:null!==(r=this.routeAlignedHeadingDeg)&&void 0!==r?r:i.routeHeadingDeg}):{hasTrackingLine:!1,trackingLineLengthM:0,snapped:this.navigationSnapped,reportedAccuracyM:"number"==typeof o&&Number.isFinite(o)?o:NaN,accuracyForScalingM:NaN,enterThresholdM:NaN,exitThresholdM:NaN,rawDistanceToRouteM:NaN,smoothedDistanceForEnterM:NaN,lastAlongRouteM:0,standstill:!1,confidence:NaN,routeHeadingDeg:this.routeAlignedHeadingDeg},a)},e.prototype.regenerateRouteArc=function(){this.focusedWhere()&&this.onWhereTaxonomyUpdate()},e.prototype.resetAltitudeConfig=function(){console.log("Altitude config reset - handled by UserLocationController")},e.prototype.routeHasNavigableSegmentForWhere=function(e,t){var n,r,i,o,a;if(!(null===(n=null==e?void 0:e.segments)||void 0===n?void 0:n.length))return!1;for(var s=0,l=e.segments;s<l.length;s++){var u=l[s];if(u.maneuverType!==Su.RouteOverview&&u.maneuverType!==Su.SectionOverview&&u.whereDimension===t){var c=null!==(i=null===(r=u.features)||void 0===r?void 0:r.find(function(e){var t;return"LineString"===(null===(t=null==e?void 0:e.geometry)||void 0===t?void 0:t.type)}))&&void 0!==i?i:null===(o=u.features)||void 0===o?void 0:o[1];if(c&&"LineString"===(null===(a=c.geometry)||void 0===a?void 0:a.type)){var h=c.geometry.coordinates;if(Array.isArray(h)&&h.length>=2)return!0}}}return!1},e.prototype.onWhereTaxonomyUpdate=function(){var e,t,n,r,i,o,a,s,l,u,c;if(this.isNavigating){var h=this.focusedWhere();if(h){var d=this.lastWhereUsedForTracking!==h;this.lastWhereUsedForTracking=h,this.evaluateStartAnchorLockScope(null!==(n=null!==(t=null===(e=this.currentPosition)||void 0===e?void 0:e.coordinates)&&void 0!==t?t:this.visualNavCoords)&&void 0!==n?n:void 0),this.portalProgressHoldActive&&(this.portalProgressHoldActive=!1),this.invalidateRouteTrackingCache(),this.lastAppliedRouteSliceSegmentIndex=-1,this.lastAppliedRouteSliceAlongM=-1,this.lastAppliedVisualNavCoords=null,this.lastAppliedVisualHeadingDeg=null,this.lastRouteSliceVisualNavCoords=null,this.lastBlueDotProgressVisualMs=0;var p=this.routingManager.getReferenceRouteForTracking();if(p){if(d&&this.isNavigating&&!this.routeHasNavigableSegmentForWhere(p,h)){var f=null!==(i=null!==(r=this.visualNavCoords)&&void 0!==r?r:this.lerpedCoords)&&void 0!==i?i:null===(o=this.currentPosition)||void 0===o?void 0:o.coordinates,g=Date.now();this.lastRerouteTime=g,this.routingManager.requestRerouteFromPosition(f).catch(function(e){console.warn("Re-route failed:",e)})}if(d&&this.isNavigating&&"pdr"===this.navigationLocMode){var m=null!==(s=null!==(a=this.visualNavCoords)&&void 0!==a?a:this.lerpedCoords)&&void 0!==s?s:null===(l=this.currentPosition)||void 0===l?void 0:l.coordinates;if(m)if(null!=this.activeDeadZoneId)if(this.deadZones.length>0){var v=Sc(m,this.focusedWhere(),this.deadZones);v?this.rebindPdrToDeadZone(v,m):this.leavePdrMode()}else this.rebindPdrLockedLineAtSeed(m,this.activeDeadZoneId)||this.leavePdrMode();else this.rebindPdrLockedLineAtSeed(m,null)||this.leavePdrMode();else this.leavePdrMode()}var y=this.getCurrentPosition();y&&(this.updateRouteProgress(y),this.lastEmittedSegmentIndex>=0&&(null===(c=(u=this.uiHandlers).onSegmentIndexChange)||void 0===c||c.call(u,this.lastEmittedSegmentIndex)))}else console.warn("No reference route available for where taxonomy update")}else console.warn("No focused where-taxonomy available for where taxonomy update")}},e.prototype.generatePathForWhereTaxonomy=function(e,t){if(!e.segments||0===e.segments.length)return null;for(var n=[],r=1;r<e.segments.length;r+=1){(s=e.segments[r]).maneuverType!==Su.SectionOverview&&(s.whereDimension===t&&n.push(s))}if(0===n.length)return console.warn("No segments found for where taxonomy path: ".concat(t)),null;for(var i=[],o=0,a=n;o<a.length;o++)for(var s=a[o],l=0;l<s.coordinates.length;l+=1){var u=s.coordinates[l];i.push(u)}return i.length<2?(console.warn("Insufficient coordinates for path generation"),null):ne(i,{dimension_where:t,isNode:!1,featureBelongsToLineString:!0,isNonHighlightedOverview:"0"})},e.prototype.generateRouteArcFromPath=function(e){if("LineString"===e.geometry.type){var t=e,n=as(t,{units:"meters"});this.routeArc=[];for(var r=0;r<=this.routeSteps;r++){var i=ju(t,r/this.routeSteps*n,{units:"meters"});this.routeArc.push(i.geometry.coordinates)}this.currentRouteStep=0,this.targetRouteStep=0}else this.routeArc=[]},e.prototype.generateRouteArc=function(e,t,n){if(-1!==t&&e.segments[t]){var r=e.segments[t].features[1];if("LineString"===r.geometry.type){var i=r,o=as(i,{units:"meters"}),a=os(i,te(n),{units:"meters"}).properties.location;this.routeArc=[];for(var s=0;s<=this.routeSteps;s++){var l=ju(i,s/this.routeSteps*o,{units:"meters"});this.routeArc.push(l.geometry.coordinates)}this.currentRouteStep=Math.floor(a/o*this.routeSteps),this.currentRouteStep=Math.max(0,Math.min(this.routeSteps,this.currentRouteStep))}else this.routeArc=[]}else this.routeArc=[]},e.prototype.resetSmoothingState=function(){},e.prototype.startNavigation=function(e){var t,n,r,i,o;return x(this,void 0,void 0,function(){var a,s,l,u;return S(this,function(c){switch(c.label){case 0:return this.isNavigating?[2]:[4,this.ensureDeadZonesLoaded()];case 1:return c.sent(),this.configureStartAnchorLock(e),this.isNavigating=!0,this.portalProgressHoldActive=!1,this.userLocation.show(),a=this.routingManager.getActiveRoute(),(null===(t=null==a?void 0:a.segments)||void 0===t?void 0:t[0])&&(this.lastEmittedSegmentIndex=0,this.routingManager.highlightRouteSegment(0),this.onWhereTaxonomyUpdate()),this.startAnchorLockActive&&this.startAnchorLockAnchorLngLat&&this.enterPdrFromRouteSeed(null,this.startAnchorLockAnchorLngLat),s=this.startAnchorLockActive&&!!this.startAnchorLockAnchorLngLat&&"pdr"===this.navigationLocMode,l=this.userLocation.getCurrentPosition(),s?l&&Number.isFinite(l.accuracy)&&l.accuracy>=0?this.lastNavAccuracy=l.accuracy:l&&(this.lastNavAccuracy=null!==(n=l.accuracy)&&void 0!==n?n:10):(null==l?void 0:l.coordinates)&&(u=[l.coordinates[0],l.coordinates[1]],this.visualNavCoords=A([],u,!0),this.lastNavAccuracy=null!==(r=l.accuracy)&&void 0!==r?r:10,this.targetNavHeadingDeg=null,this.visualNavHeadingDeg=null,this.lerpedCoords=A([],u,!0),this.applyNavigationVisualFrame(u,this.lastNavAccuracy,null),this.setTargetNavCoords(u)),this.uiHandlers.onNavigationStart&&this.uiHandlers.onNavigationStart(),null===(o=(i=this.uiHandlers).onSegmentIndexChange)||void 0===o||o.call(i,0),this.resetSmoothingState(),this.lastKnownRemainingDistanceM=null,this.arrivalLockActive=!1,this.arrivalCameraFramingApplied=!1,this.navigationCompleteEmitted=!1,this.lastRouteProgressVisualMs=0,this.lastRouteSliceVisualNavCoords=null,this.lastBlueDotProgressVisualMs=0,this.resetDeadZoneEvaluationState(),this.qualityPdrBadConsecutive=0,this.qualityBlendRerouteSuppressed=!1,[2]}})})},e.prototype.getIsNavigating=function(){return"navigation"===this.userLocation.getSdkMode()},e.prototype.stopNavigation=function(){this.isNavigating&&(this.userLocation.stopMotion(),this.leavePdrMode(),this.isNavigating=!1,this.lastWhereUsedForTracking=null,this.portalProgressHoldActive=!1,this.stopNavVisualLoop(),this.setTargetNavCoords(null),this.targetNavHeadingDeg=null,this.visualNavCoords=null,this.visualNavHeadingDeg=null,this.frozenUnsnappedHeadingDeg=null,this.lastAppliedVisualNavCoords=null,this.lastAppliedVisualHeadingDeg=null,this.lastRouteSliceVisualNavCoords=null,this.lastBlueDotProgressVisualMs=0,this.lastRouteProgressVisualMs=0,this.lastAppliedRouteSliceSegmentIndex=-1,this.lastAppliedRouteSliceAlongM=-1,this.lerpedCoords=null,this.totalDistanceTraveled=0,this.currentHeading=null,this.currentPosition=null,this.navigationSnapped=!1,this.routeAlignedHeadingDeg=null,this.frozenUnsnappedHeadingDeg=null,this.lastSnapStateForUi=!1,this.invalidateRouteTrackingCache(),this.resetSmoothingState(),this.routeArc=[],this.currentRouteStep=0,this.targetRouteStep=0,this.lastKnownRemainingDistanceM=null,this.arrivalLockActive=!1,this.arrivalCameraFramingApplied=!1,this.navigationCompleteEmitted=!1,this.resetDeadZoneEvaluationState(),this.clearStartAnchorLock(),this.uiHandlers.onNavigationStop&&this.uiHandlers.onNavigationStop())},e.prototype.destroy=function(){var e,t;this.gpsCallbackRef&&this.userLocation.removeCallback({onLocationUpdate:this.gpsCallbackRef,onCompassUpdate:null!==(e=this.compassCallbackRef)&&void 0!==e?e:void 0}),this.gpsCallbackRef=null,this.compassCallbackRef=null,null===(t=this.unsubscribeFocus)||void 0===t||t.call(this),this.unsubscribeFocus=null,this.userLocation.stopMotion(),this.leavePdrMode(),this.isNavigating=!1,this.lastWhereUsedForTracking=null,this.portalProgressHoldActive=!1,this.stopNavVisualLoop(),this.setTargetNavCoords(null),this.targetNavHeadingDeg=null,this.visualNavCoords=null,this.visualNavHeadingDeg=null,this.frozenUnsnappedHeadingDeg=null,this.lastAppliedVisualNavCoords=null,this.lastAppliedVisualHeadingDeg=null,this.lastRouteSliceVisualNavCoords=null,this.lastBlueDotProgressVisualMs=0,this.lerpedCoords=null,this.totalDistanceTraveled=0,this.currentHeading=null,this.currentPosition=null,this.routeArc=[],this.currentRouteStep=0,this.targetRouteStep=0,this.resetDeadZoneEvaluationState(),this.qualityPdrBadConsecutive=0,this.qualityBlendRerouteSuppressed=!1,this.arrivalLockActive=!1,this.arrivalCameraFramingApplied=!1,this.navigationCompleteEmitted=!1,this.navigationSnapped=!1,this.routeAlignedHeadingDeg=null,this.frozenUnsnappedHeadingDeg=null,this.lastSnapStateForUi=!1,this.invalidateRouteTrackingCache(),this.lastRouteProgressVisualMs=0,this.lastAppliedRouteSliceSegmentIndex=-1,this.lastAppliedRouteSliceAlongM=-1,this.clearStartAnchorLock()},e.prototype.updateNavigationWithGPS=function(t){var n,r;if(this.isNavigating){this.currentPosition=t,this.evaluateStartAnchorLockScope(t.coordinates);var i=t.timestamp||Date.now(),o=i-this.lastDeadZoneModeSwitchMs<e.DEAD_ZONE_MODE_SWITCH_COOLDOWN_MS,a=Number.isFinite(t.accuracy)&&t.accuracy>=0?t.accuracy:50;if("pdr"===this.navigationLocMode)if(null!=this.activeDeadZoneId){var s=Sc(t.coordinates,this.focusedWhere(),this.deadZones);if(!!s&&!!this.activeDeadZoneId&&s.id===this.activeDeadZoneId)return this.pdrRawGpsOutsideConsecutive=0,void(this.deadZoneInsideConsecutive=0);if(o)return;if(this.pdrRawGpsOutsideConsecutive+=1,this.pdrRawGpsOutsideConsecutive<e.DEAD_ZONE_EXIT_CONSECUTIVE_COUNT)return;this.pdrRawGpsOutsideConsecutive=0,this.leavePdrMode()}else if(!this.updateAnchorPdrBlendTowardGps(t,a,i))return;if(!(this.startAnchorLockActive&&this.startAnchorLockAnchorLngLat&&"pdr"!==this.navigationLocMode&&this.enterPdrFromRouteSeed(null,this.startAnchorLockAnchorLngLat))){if("gps"===this.navigationLocMode&&this.deadZones.length>0)if(o)this.deadZoneInsideConsecutive=0;else{var l=Sc(t.coordinates,this.focusedWhere(),this.deadZones);if(l){if(this.deadZoneInsideConsecutive+=1,this.deadZoneInsideConsecutive>=e.DEAD_ZONE_ENTER_CONSECUTIVE_COUNT&&(this.deadZoneInsideConsecutive=0,this.tryEnterPdrMode(l,t.coordinates)))return}else this.deadZoneInsideConsecutive=0}if("gps"!==this.navigationLocMode||!this.tryEnterQualityRecoveryPdr(t,a,i)){var u=this.getBuiltTrackingLine();this.routeFollowingEstimator.setTrackingLine(u);var c=this.routeFollowingEstimator.update(t.coordinates,a,i);this.lastRouteFollowingConfidence=c.confidence;var h=[c.displayCoords[0],c.displayCoords[1]],d=!!this.arrivalLockActive||c.snapped;if(d!==this.lastSnapStateForUi&&(this.lastSnapStateForUi=d,null===(r=(n=this.uiHandlers).onSnapStateChange)||void 0===r||r.call(n,d)),this.navigationSnapped=d,this.routeAlignedHeadingDeg=null,this.lastRawPosition){var p=zo(this.lastRawPosition.coords,t.coordinates,{units:"meters"});this.totalDistanceTraveled+=p}this.lastRawPosition={coords:t.coordinates,timestamp:i},this.lastNavAccuracy=a,this.visualNavCoords||(this.visualNavCoords=[h[0],h[1]],this.visualNavHeadingDeg=this.frozenUnsnappedHeadingDeg),this.setTargetNavCoords([h[0],h[1]])}}}},e.prototype.updateNavigationWithCompass=function(e){if(this.isNavigating){if(this.userLocation.isCompassPermissionDenied())return this.currentHeading=null,void this.ensureNavVisualLoop();this.currentHeading=e.heading,this.ensureNavVisualLoop()}},e.prototype.headingFromAlongOnLine=function(t,n,r){if(!(n>0&&Number.isFinite(r)))return null;var i=Math.max(0,Math.min(n,r)),o=e.NAV_HEADING_LOOKAHEAD_M,a=Math.min(n,i+o);if(a<=i&&(a=Math.max(0,i-Math.min(1,o)))===i)return null;var s=Ho(ju(t,i,{units:"meters"}).geometry.coordinates,ju(t,a,{units:"meters"}).geometry.coordinates);if(!Number.isFinite(s))return null;for(;s<0;)s+=360;for(;s>=360;)s-=360;return s},e.prototype.computeHeadingFromGPS=function(){return this.userLocation.isCompassPermissionDenied()||"number"!=typeof this.currentHeading||Number.isNaN(this.currentHeading)?null:this.currentHeading},e.prototype.resolveNavigationHeadingTarget=function(){return"navigation"===this.userLocation.getSdkMode()&&null!==this.routeAlignedHeadingDeg&&Number.isFinite(this.routeAlignedHeadingDeg)?this.routeAlignedHeadingDeg:this.computeHeadingFromGPS()},e.prototype.ensureNavVisualLoop=function(){this.isNavigating&&void 0===this.navVisualRafId&&(this.lastNavVisualFrameTime=0,this.navVisualRafId=requestAnimationFrame(this.tickNavVisual))},e.prototype.setTargetNavCoords=function(e){this.targetNavCoords=e,this.targetAlongMOnTrackingLine=null,this.targetAlongMCacheKey="",null!==e&&this.ensureNavVisualLoop()},e.prototype.stopNavVisualLoop=function(){void 0!==this.navVisualRafId&&(cancelAnimationFrame(this.navVisualRafId),this.navVisualRafId=void 0),this.lastNavVisualFrameTime=0},e.approxMetersBetween=function(e,t){var n=Math.PI/180,r=.5*(e[1]+t[1])*n,i=(t[1]-e[1])*n,o=(t[0]-e[0])*n*Math.cos(r);return 6378137*Math.sqrt(i*i+o*o)},e.prototype.lerpVisualCoordsCartesian=function(t,n,r){var i=this.visualNavCoords,o=i[0]+(t[0]-i[0])*n,a=i[1]+(t[1]-i[1])*n,s=e.approxMetersBetween(i,[o,a]),l=e.NAV_VISUAL_MAX_FREE_MS*r;if(s>l&&s>0){var u=l/s;o=i[0]+(o-i[0])*u,a=i[1]+(a-i[1])*u}e.approxMetersBetween([o,a],t)<e.NAV_VISUAL_SNAP_DIST_M&&(o=t[0],a=t[1]),this.visualNavCoords=[o,a]},e.prototype.getOrSnapAlong=function(e,t,n,r,i){return null!==r&&i===n?{alongM:r,cacheKey:n}:{alongM:os(e,te(t),{units:"meters"}).properties.location,cacheKey:n}},e.prototype.advanceVisualAlongLine=function(t,n,r,i,o,a,s){var l,u;if(void 0===s&&(s=e.NAV_VISUAL_MAX_ALONG_MS),!(n>0)||!(null===(u=null===(l=null==t?void 0:t.geometry)||void 0===l?void 0:l.coordinates)||void 0===u?void 0:u.length)||t.geometry.coordinates.length<2)return!1;if(this.targetAlongMCacheKey!==i||null===this.targetAlongMOnTrackingLine){var c=os(t,te(r),{units:"meters"});this.targetAlongMOnTrackingLine=c.properties.location,this.targetAlongMCacheKey=i}if(this.visualAlongMCacheKey!==i||null===this.visualAlongMOnTrackingLine){var h=os(t,te(this.visualNavCoords),{units:"meters"});this.visualAlongMOnTrackingLine=h.properties.location,this.visualAlongMCacheKey=i}var d=Math.max(0,Math.min(n,this.targetAlongMOnTrackingLine)),p=Math.max(0,Math.min(n,this.visualAlongMOnTrackingLine)),f=(d-p)*o,g=s*a;Math.abs(f)>g&&(f=Math.sign(f)*g);var m=Math.max(0,Math.min(n,p+f));Math.abs(m-d)<e.NAV_VISUAL_SNAP_DIST_M&&(m=d),this.visualAlongMOnTrackingLine=m;var v=ju(t,m,{units:"meters"});return this.visualNavCoords=v.geometry.coordinates,!0},e.prototype.routeVisualProgressMinMs=function(t){return this.navigationSnapped?t?e.ROUTE_PROGRESS_VISUAL_MIN_INTERVAL_MS_ANCHOR_BLEND:e.ROUTE_PROGRESS_VISUAL_MIN_INTERVAL_MS:4*e.ROUTE_PROGRESS_VISUAL_MIN_INTERVAL_MS},e.prototype.routeVisualSliceMinDeltaM=function(){return this.navigationSnapped?e.ROUTE_SLICE_RESEND_MIN_DELTA_M:e.ROUTE_SLICE_RESEND_MIN_DELTA_M_UNSMAPPED},e.prototype.runNavVisualFrame=function(){var t,n,r,i;if(this.isNavigating){var o=this.targetNavCoords;if(o){var a=performance.now(),s=this.lastNavVisualFrameTime>0?Math.min(.12,(a-this.lastNavVisualFrameTime)/1e3):0;this.lastNavVisualFrameTime=a;var l="pdr"===this.navigationLocMode&&null===this.activeDeadZoneId&&this.anchorPdrBlendActive,u=!0;if(this.visualNavCoords){var c=this.visualNavCoords[0],h=this.visualNavCoords[1],d=l?e.NAV_VISUAL_POS_LAMBDA_ANCHOR_BLEND:e.NAV_VISUAL_POS_LAMBDA,p=s>0?1-Math.exp(-d*s):1;if("pdr"===this.navigationLocMode&&this.pdrLockedLine){var f=this.pdrLockedLine,g="pdr|".concat(this.pdrLockedRouteSegmentIndex),m=(null===(n=null===(t=null==f?void 0:f.geometry)||void 0===t?void 0:t.coordinates)||void 0===n?void 0:n.length)>=2?as(f,{units:"meters"}):0,v=l?e.NAV_VISUAL_MAX_ALONG_MS_ANCHOR_BLEND:e.NAV_VISUAL_MAX_ALONG_MS;this.advanceVisualAlongLine(f,m,o,g,p,s,v)||this.lerpVisualCoordsCartesian(o,p,s)}else if(this.navigationSnapped){f=null==(w=this.getBuiltTrackingLine())?void 0:w.line,m=this.trackingLineLengthMCached,g=this.trackingLineCacheKey;this.advanceVisualAlongLine(f,m,o,g,p,s)||this.lerpVisualCoordsCartesian(o,p,s)}else this.lerpVisualCoordsCartesian(o,p,s);if(this.navigationSnapped){var y=null;if("pdr"===this.navigationLocMode&&this.pdrLockedLine){m=(null===(i=null===(r=null==(f=this.pdrLockedLine)?void 0:f.geometry)||void 0===r?void 0:r.coordinates)||void 0===i?void 0:i.length)>=2?as(f,{units:"meters"}):0;null!==this.visualAlongMOnTrackingLine&&(y=this.headingFromAlongOnLine(f,m,this.visualAlongMOnTrackingLine))}else{var w;(f=null==(w=this.getBuiltTrackingLine())?void 0:w.line)&&null!==this.visualAlongMOnTrackingLine&&(y=this.headingFromAlongOnLine(f,this.trackingLineLengthMCached,this.visualAlongMOnTrackingLine))}null!==y?(this.routeAlignedHeadingDeg=y,this.frozenUnsnappedHeadingDeg=y,this.targetNavHeadingDeg=y):(this.routeAlignedHeadingDeg=null,this.targetNavHeadingDeg=this.frozenUnsnappedHeadingDeg)}else this.routeAlignedHeadingDeg=null,this.targetNavHeadingDeg=this.frozenUnsnappedHeadingDeg;var b=this.visualNavCoords[0]-c,_=this.visualNavCoords[1]-h;u=b*b+_*_>1e-18;var x=this.targetNavHeadingDeg,S=this.visualNavHeadingDeg;if(null!==x&&Number.isFinite(x))if(null!==S&&Number.isFinite(S)){var A=s>0?1-Math.exp(-e.NAV_VISUAL_HEAD_LAMBDA*s):1;this.visualNavHeadingDeg=Lc(S,x,A)}else this.visualNavHeadingDeg=x;else this.visualNavHeadingDeg=null}else this.visualNavCoords=[o[0],o[1]],this.visualNavHeadingDeg=this.targetNavHeadingDeg;this.lerpedCoords=[this.visualNavCoords[0],this.visualNavCoords[1]];var P=this.headingDeltaDegrees(this.visualNavHeadingDeg,this.targetNavHeadingDeg),M=e.approxMetersBetween(this.visualNavCoords,o),C=!u&&M<e.NAV_VISUAL_SNAP_DIST_M&&P<.05;if(this.portalProgressHoldActive)this.isNavigating&&(this.navVisualRafId=requestAnimationFrame(this.tickNavVisual));else{var k=performance.now(),T=this.routeVisualProgressMinMs(l),E=this.routeVisualSliceMinDeltaM(),R=null,L=!1,D=!1;if(this.navigationSnapped){var F=k-this.lastRouteProgressVisualMs>=T,O=(null===this.lastAppliedVisualNavCoords?1/0:e.approxMetersBetween(this.lastAppliedVisualNavCoords,this.visualNavCoords))>=E;F&&O&&(R=this.computeRouteSliceGateSnapshot(this.visualNavCoords,E)),D=L=F&&O&&!!R}else{O=(null===this.lastRouteSliceVisualNavCoords?1/0:e.approxMetersBetween(this.lastRouteSliceVisualNavCoords,this.visualNavCoords))>=E;(F=k-this.lastRouteProgressVisualMs>=T)&&O&&(R=this.computeRouteSliceGateSnapshot(this.visualNavCoords,E)),L=F&&O&&!!R;var j=l?e.ROUTE_PROGRESS_VISUAL_MIN_INTERVAL_MS_ANCHOR_BLEND:e.ROUTE_PROGRESS_VISUAL_MIN_INTERVAL_MS,N=e.NAV_VISUAL_APPLY_MIN_DELTA_M,I=null===this.lastAppliedVisualNavCoords?1/0:e.approxMetersBetween(this.lastAppliedVisualNavCoords,this.visualNavCoords),z=k-this.lastBlueDotProgressVisualMs>=j,B=I>=N;D=L||null===this.lastAppliedVisualNavCoords||z&&B}if(L&&R&&(this.lastRouteProgressVisualMs=k,this.lastRouteSliceVisualNavCoords=[this.visualNavCoords[0],this.visualNavCoords[1]],this.updateRouteProgress(this.visualNavCoords,R)),D){this.lastBlueDotProgressVisualMs=k,this.applyNavigationVisualFrame(this.visualNavCoords,this.lastNavAccuracy,this.visualNavHeadingDeg);var U=this.getCurrentPosition();U&&U.length>=2&&this.updateCamera(U,this.visualNavHeadingDeg),this.lastAppliedVisualNavCoords=[this.visualNavCoords[0],this.visualNavCoords[1]],this.lastAppliedVisualHeadingDeg=this.visualNavHeadingDeg}else this.applyNavigationHeadingVisualOnly();if(C)return this.navVisualRafId=void 0,void(this.lastNavVisualFrameTime=0);this.isNavigating&&(this.navVisualRafId=requestAnimationFrame(this.tickNavVisual))}}else this.navVisualRafId=void 0}else this.navVisualRafId=void 0},e.prototype.headingDeltaDegrees=function(e,t){if(null===e||null===t||!Number.isFinite(e)||!Number.isFinite(t))return 0;var n=Math.abs(e-t)%360;return n>180&&(n=360-n),n},e.prototype.applyNavigationHeadingVisualOnly=function(){var e=this.computeHeadingFromGPS(),t=this.visualNavCoords;t&&this.emitUserPose({coordinates:t,accuracy:this.lastNavAccuracy,heading:e})},e.prototype.applyNavigationVisualFrame=function(e,t,n){var r=this.computeHeadingFromGPS();this.emitUserPose({coordinates:e,accuracy:t,heading:r})},e.prototype.computeRouteSliceGateSnapshot=function(t,n){var r,i,o,a,s,l,u,c;void 0===n&&(n=this.routeVisualSliceMinDeltaM());var h=this.routingManager.getReferenceRouteForTracking();if(!t||!h)return null;var d,p,f,g=te([t[0],t[1]]),m=Math.max(0,this.lastEmittedSegmentIndex);if("pdr"===this.navigationLocMode&&this.pdrLockedRouteSegmentIndex>=0){d=this.pdrLockedRouteSegmentIndex;var v=h.segments[d],y=null!==(i=null===(r=null==v?void 0:v.features)||void 0===r?void 0:r.find(function(e){var t;return"LineString"===(null===(t=null==e?void 0:e.geometry)||void 0===t?void 0:t.type)}))&&void 0!==i?i:null===(o=null==v?void 0:v.features)||void 0===o?void 0:o[1];if("LineString"===(null===(a=null==y?void 0:y.geometry)||void 0===a?void 0:a.type)){var w=os(y,g,{units:"meters"});f=w.geometry.coordinates,p=w.properties.dist}else f=t,p=0}else{var b=this.findNearestSegmentIndexAlongRoute(h,g,m,!0);d=b.nearestIndex,p=b.minDistance,f=b.snappedCoords}if(-1===d)return null;var _=h.segments[d],x=null!==(l=null===(s=_.features)||void 0===s?void 0:s.find(function(e){var t;return"LineString"===(null===(t=null==e?void 0:e.geometry)||void 0===t?void 0:t.type)}))&&void 0!==l?l:null===(u=_.features)||void 0===u?void 0:u[1];if("LineString"!==(null===(c=null==x?void 0:x.geometry)||void 0===c?void 0:c.type))return null;var S=null!=f?f:t,A=[S[0],S[1]],P=os(x,te(A),{units:"meters"}).properties.location,M=as(x,{units:"meters"}),C=Math.max(0,M-P),k=this.lastRouteSliceVisualNavCoords,T=null===k?1/0:e.approxMetersBetween(k,t);return{referenceRoute:h,nearestIndex:d,minDistance:p,referenceSegment:_,referenceLineFeature:x,ptCoords:A,snappedAlongM:P,originalLen:M,remainingSegmentDistance:C,slicePointChanged:d!==this.lastAppliedRouteSliceSegmentIndex||T>=n}},e.prototype.updateRouteProgress=function(t,n){var r,i,o=null!=n?n:this.computeRouteSliceGateSnapshot(t);if(t&&o){var a=o.referenceRoute,s=o.nearestIndex,l=o.minDistance,u=o.referenceSegment,c=o.referenceLineFeature,h=o.ptCoords,d=o.snappedAlongM,p=o.originalLen,f=o.remainingSegmentDistance,g=o.slicePointChanged;this.maybeProposePortalFloorChange(a,s,u,Number.isFinite(f)?f:null);var m=null;if(g){m=A([h],Al(c,d,p,{units:"meters"}).geometry.coordinates,!0);var v=null!==(i=null===(r=u.features)||void 0===r?void 0:r.findIndex(function(e){var t;return"LineString"===(null===(t=null==e?void 0:e.geometry)||void 0===t?void 0:t.type)}))&&void 0!==i?i:1,y=u.features.slice();if(v>=0&&y[v]){var w=y[v];y[v]=_(_({},w),{geometry:_(_({},w.geometry),{coordinates:m})})}var b=_(_({},u),{features:y}),x=a.segments.slice();x[s]=b;var S=_(_({},a),{segments:x});this.routingManager.setActiveRoute(S),this.routingManager.highlightRouteSegment(s,!0,!0,!1,!1),this.lastAppliedRouteSliceSegmentIndex=s,this.lastAppliedRouteSliceAlongM=d}try{for(var P=0,M=0,C=s;C<a.segments.length;C+=1)P+=a.segments[C].distance||0,M+=a.segments[C].time||0;var k=u.distance||0,T=u.time||0;if(p>0&&k>0){var E=Math.max(0,Math.min(1,f/p));P-=k,M-=T,P+=k*E,M+=T*E}this.lastKnownRemainingDistanceM=P,this.maybeEnterArrivalLockAndFrame([t[0],t[1]],P,a),this.uiHandlers.onProgressUpdate&&this.uiHandlers.onProgressUpdate({remainingTime:M,remainingDistance:P,segmentRemainingDistance:f})}catch(e){}if(this.uiHandlers.onBearingUpdate&&m&&m.length>=2){var R=Ho(m[0],m[1]);this.uiHandlers.onBearingUpdate(R)}this.maybeAdvanceLastEmittedSegmentIndex(s);var L=-1===s||l>this.OFF_ROUTE_THRESHOLD_METERS,D=null!=this.lastKnownRemainingDistanceM&&this.lastKnownRemainingDistanceM<e.SUPPRESS_REROUTE_BELOW_REMAINING_M;if(L&&!D&&!this.arrivalLockActive&&!this.startAnchorLockActive&&!this.qualityBlendRerouteSuppressed){var F=Date.now();F-this.lastRerouteTime>=this.REROUTE_COOLDOWN_MS&&(this.lastRerouteTime=F,this.routingManager.requestRerouteFromPosition(t).catch(function(e){console.warn("Re-route failed:",e)}))}return{nearestIndex:s,minDistance:l}}},e.prototype.updateCamera=function(e,t,n){void 0===n&&(n=!1),this.arrivalLockActive||!e||e.length<2||"number"!=typeof e[0]||"number"!=typeof e[1]||null!==t&&this.emitUserCameraStop({center:[e[0],e[1]],bearing:t,pitch:this.cameraPitch,zoom:this.cameraZoomLevel,paddingFraction:{top:.3},durationMs:300,easing:"linear"},{force:n})},e.NAV_VISUAL_APPLY_MIN_DELTA_M=.1,e.NAV_VISUAL_APPLY_MIN_DELTA_M_ANCHOR_BLEND=.05,e.NAV_VISUAL_APPLY_MIN_HEADING_DEG=1,e.NAV_VISUAL_POS_LAMBDA=9,e.NAV_VISUAL_POS_LAMBDA_ANCHOR_BLEND=17,e.NAV_VISUAL_HEAD_LAMBDA=12,e.NAV_VISUAL_SNAP_DIST_M=.04,e.NAV_HEADING_LOOKAHEAD_M=5,e.NAV_VISUAL_MAX_ALONG_MS=3,e.NAV_VISUAL_MAX_ALONG_MS_ANCHOR_BLEND=8,e.NAV_VISUAL_MAX_FREE_MS=4,e.ROUTE_PROGRESS_VISUAL_MIN_INTERVAL_MS=50,e.ROUTE_PROGRESS_VISUAL_MIN_INTERVAL_MS_ANCHOR_BLEND=28,e.ROUTE_SLICE_RESEND_MIN_DELTA_M=.5,e.ROUTE_SLICE_RESEND_MIN_DELTA_M_UNSMAPPED=2,e.DEAD_ZONE_MODE_SWITCH_COOLDOWN_MS=3e3,e.DEAD_ZONE_ENTER_CONSECUTIVE_COUNT=2,e.DEAD_ZONE_EXIT_CONSECUTIVE_COUNT=2,e.ANCHOR_PDR_HANDOFF_CONSECUTIVE_GOOD=4,e.ANCHOR_PDR_HANDOFF_MAX_ACCURACY_M=32,e.ANCHOR_PDR_HANDOFF_MIN_CONFIDENCE=.3,e.ANCHOR_PDR_BLEND_SPEED_PER_S=.55,e.QUALITY_PDR_BAD_ACCURACY_M=35,e.QUALITY_PDR_MAX_RESIDUAL_M=30,e.QUALITY_PDR_CONSECUTIVE_BAD=3,e.PORTAL_PROPOSE_VICINITY_M=15,e.PORTAL_PROGRESS_HOLD_VICINITY_M=5,e.SUPPRESS_REROUTE_BELOW_REMAINING_M=20,e.ARRIVAL_CAMERA_ZOOM=20,e.ARRIVAL_CAMERA_PITCH=55,e}();function Nc(e,t,n){if(null!==e)for(var r,i,o,a,s,l,u,c,h=0,d=0,p=e.type,f="FeatureCollection"===p,g="Feature"===p,m=f?e.features.length:1,v=0;v<m;v++){s=(c=!!(u=f?e.features[v].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var y=0;y<s;y++){var w=0,b=0;if(null!==(a=c?u.geometries[y]:u)){l=a.coordinates;var _=a.type;switch(h=!n||"Polygon"!==_&&"MultiPolygon"!==_?0:1,_){case null:break;case"Point":if(!1===t(l,d,v,w,b))return!1;d++,w++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===t(l[r],d,v,w,b))return!1;d++,"MultiPoint"===_&&w++}"LineString"===_&&w++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===t(l[r][i],d,v,w,b))return!1;d++}"MultiLineString"===_&&w++,"Polygon"===_&&b++}"Polygon"===_&&w++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(b=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===t(l[r][i][o],d,v,w,b))return!1;d++}b++}w++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===Nc(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Ic(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return zc(e);case"FeatureCollection":return function(e){var t={type:"FeatureCollection"};return Object.keys(e).forEach(function(n){switch(n){case"type":case"features":return;default:t[n]=e[n]}}),t.features=e.features.map(function(e){return zc(e)}),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return Uc(e);default:throw new Error("unknown GeoJSON type")}}function zc(e){var t={type:"Feature"};return Object.keys(e).forEach(function(n){switch(n){case"type":case"properties":case"geometry":return;default:t[n]=e[n]}}),t.properties=Bc(e.properties),t.geometry=Uc(e.geometry),t}function Bc(e){var t={};return e?(Object.keys(e).forEach(function(n){var r=e[n];"object"==typeof r?null===r?t[n]=null:Array.isArray(r)?t[n]=r.map(function(e){return e}):t[n]=Bc(r):t[n]=r}),t):t}function Uc(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map(function(e){return Uc(e)}),t):(t.coordinates=Hc(e.coordinates),t)}function Hc(e){var t=e;return"object"!=typeof t[0]?t.slice():t.map(function(e){return Hc(e)})}var Gc=6371008.8,Wc={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:Gc,metres:Gc,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function Vc(e){return e%360*Math.PI/180}function qc(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return function(e,t){void 0===t&&(t="kilometers");var n=Wc[t];if(!n)throw new Error(t+" units is invalid");return e*n}(function(e,t){void 0===t&&(t="kilometers");var n=Wc[t];if(!n)throw new Error(t+" units is invalid");return e/n}(e,t),n)}function Zc(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Yc(e,t,n,r){void 0===r&&(r={});var i=t<0,o=qc(Math.abs(t),r.units,"meters");i&&(o=-Math.abs(o));var a=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),s=function(e,t,n,r){r=void 0===r?Gc:Number(r);var i=t/r,o=e[0]*Math.PI/180,a=Vc(e[1]),s=Vc(n),l=i*Math.cos(s),u=a+l;Math.abs(u)>Math.PI/2&&(u=u>0?Math.PI-u:-Math.PI-u);var c=Math.log(Math.tan(u/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(c)>1e-11?l/c:Math.cos(a),d=i*Math.sin(s)/h;return[(180*(o+d)/Math.PI+540)%360-180,180*u/Math.PI]}(a,o,n);return s[0]+=s[0]-a[0]>180?-360:a[0]-s[0]>180?360:0,function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Zc(e[0])||!Zc(e[1]))throw new Error("coordinates must contain numbers");return function(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}({type:"Point",coordinates:e},t,n)}(s,r.properties)}function $c(e,t,n,r){if(!(i=r=r||{})||i.constructor!==Object)throw new Error("options is invalid");var i,o=r.units,a=r.zTranslation,s=r.mutate;if(!e)throw new Error("geojson is required");if(null==t||isNaN(t))throw new Error("distance is required");if(a&&"number"!=typeof a&&isNaN(a))throw new Error("zTranslation is not a number");if(a=void 0!==a?a:0,0===t&&0===a)return e;if(null==n||isNaN(n))throw new Error("direction is required");return t<0&&(t=-t,n+=180),!1!==s&&void 0!==s||(e=Ic(e)),Nc(e,function(e){var r=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(Yc(e,t,n,{units:o}));e[0]=r[0],e[1]=r[1],a&&3===e.length&&(e[2]+=a)}),e}function Kc(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function Jc(e,t){!function(e,t){var n,r,i,o,a,s,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(s=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}(e,function(e,n,r,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(Kc(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(Kc({type:a,coordinates:u},r),n,l))return!1}})}function Xc(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function Qc(e){return"Feature"===e.type?e.geometry:e}function eh(e,t){void 0===t&&(t={});var n=Qc(e);switch(t.properties||"Feature"!==e.type||(t.properties=e.properties),n.type){case"Polygon":return function(e,t){void 0===t&&(t={});var n=Qc(e),r=n.coordinates,i=t.properties?t.properties:"Feature"===e.type?e.properties:{};return th(r,i)}(n,t);case"MultiPolygon":return function(e,t){void 0===t&&(t={});var n=Qc(e),r=n.coordinates,i=t.properties?t.properties:"Feature"===e.type?e.properties:{},o=[];return r.forEach(function(e){o.push(th(e,i))}),function(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}(o)}(n,t);default:throw new Error("invalid poly")}}function th(e,t){return e.length>1?function(e,t,n){return void 0===n&&(n={}),Xc({type:"MultiLineString",coordinates:e},t,n)}(e,t):function(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return Xc({type:"LineString",coordinates:e},t,n)}(e[0],t)}function nh(e,t){var n=!0;return Jc(e,function(e){Jc(t,function(t){if(!1===n)return!1;n=function(e,t){switch(e.type){case"Point":switch(t.type){case"Point":return n=e.coordinates,r=t.coordinates,!(n[0]===r[0]&&n[1]===r[1]);case"LineString":return!rh(t,e);case"Polygon":return!qs(e,t)}break;case"LineString":switch(t.type){case"Point":return!rh(e,t);case"LineString":return!function(e,t){if(es(e,t).features.length>0)return!0;return!1}(e,t);case"Polygon":return!ih(t,e)}break;case"Polygon":switch(t.type){case"Point":return!qs(t,e);case"LineString":return!ih(e,t);case"Polygon":return!function(e,t){for(var n=0,r=e.coordinates[0];n<r.length;n++){if(qs(r[n],t))return!0}for(var i=0,o=t.coordinates[0];i<o.length;i++){if(qs(o[i],e))return!0}var a=es(eh(e),eh(t));if(a.features.length>0)return!0;return!1}(t,e)}}var n,r;return!1}(e.geometry,t.geometry)})}),n}function rh(e,t){for(var n=0;n<e.coordinates.length-1;n++)if(oh(e.coordinates[n],e.coordinates[n+1],t.coordinates))return!0;return!1}function ih(e,t){for(var n=0,r=t.coordinates;n<r.length;n++){if(qs(r[n],e))return!0}return es(t,eh(e)).features.length>0}function oh(e,t,n){var r=n[0]-e[0],i=n[1]-e[1],o=t[0]-e[0],a=t[1]-e[1];return 0===r*a-i*o&&(Math.abs(o)>=Math.abs(a)?o>0?e[0]<=n[0]&&n[0]<=t[0]:t[0]<=n[0]&&n[0]<=e[0]:a>0?e[1]<=n[1]&&n[1]<=t[1]:t[1]<=n[1]&&n[1]<=e[1])}var ah=6371008.8,sh={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:ah,metres:ah,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function lh(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function uh(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!dh(e[0])||!dh(e[1]))throw new Error("coordinates must contain numbers");return lh({type:"Point",coordinates:e},t,n)}function ch(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return lh({type:"LineString",coordinates:e},t,n)}function hh(e){return e%360*Math.PI/180}function dh(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function ph(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function fh(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function gh(e,t,n){void 0===n&&(n={});var r=ph(e),i=ph(t),o=hh(i[1]-r[1]),a=hh(i[0]-r[0]),s=hh(r[1]),l=hh(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(l);return function(e,t){void 0===t&&(t="kilometers");var n=sh[t];if(!n)throw new Error(t+" units is invalid");return e*n}(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}function mh(e,t){!function(e,t){var n,r,i,o,a,s,l,u,c,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,g=p?e.features.length:1;for(n=0;n<g;n++){for(s=p?e.features[n].geometry:f?e.geometry:e,u=p?e.features[n].properties:f?e.properties:{},c=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,a=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<a;i++)if(null!==(o=l?s.geometries[i]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===t(o.geometries[r],d,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,u,c,h))return!1;d++}}(e,function(e,n,r,i,o){var a,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(lh(e,r,{bbox:i,id:o}),n,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u=e.coordinates[l];if(!1===t(lh({type:a,coordinates:u},r),n,l))return!1}})}function vh(e,t,n){void 0===n&&(n={});var r=uh([1/0,1/0],{dist:1/0}),i=0;return mh(e,function(e){for(var o=fh(e),a=0;a<o.length-1;a++){var s=uh(o[a]);s.properties.dist=gh(t,s,n);var l=uh(o[a+1]);l.properties.dist=gh(t,l,n);var u=gh(s,l,n),c=Math.max(s.properties.dist,l.properties.dist),h=Ho(s,l),d=Yo(t,c,h+90,n),p=Yo(t,c,h-90,n),f=es(ch([d.geometry.coordinates,p.geometry.coordinates]),ch([s.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=gh(t,g,n),g.properties.location=i+gh(s,g,n)),s.properties.dist<r.properties.dist&&((r=s).properties.index=a,r.properties.location=i),l.properties.dist<r.properties.dist&&((r=l).properties.index=a+1,r.properties.location=i+u),g&&g.properties.dist<r.properties.dist&&((r=g).properties.index=a),i+=u}}),r}function yh(e,t,n){var r,i=fh(n);if("LineString"!==("FeatureCollection"===(r=n).type?"FeatureCollection":"GeometryCollection"===r.type?"GeometryCollection":"Feature"===r.type&&null!==r.geometry?r.geometry.type:r.type))throw new Error("line must be a LineString");for(var o,a=vh(n,e),s=vh(n,t),l=[(o=a.properties.index<=s.properties.index?[a,s]:[s,a])[0].geometry.coordinates],u=o[0].properties.index+1;u<o[1].properties.index+1;u++)l.push(i[u]);return l.push(o[1].geometry.coordinates),ch(l,n.properties)}function wh(e,t){if(!new.target)return new wh(e,t);if(Array.isArray(e)||(t=e,e=[]),t=t||{},this.data=e||[],this.length=this.data.length,this.compare=t.compare||_h,this.setNodeId=t.setNodeId||bh,this.length>0)for(var n=this.length>>1;n>=0;n--)this._down(n);if(t.setNodeId)for(n=0;n<this.length;++n)this.setNodeId(this.data[n],n)}function bh(){}function _h(e,t){return e-t}function xh(e){this.node=e,this.parent=null,this.closed=!1,this.open=0,this.distanceToSource=Number.POSITIVE_INFINITY,this.fScore=Number.POSITIVE_INFINITY,this.heapIndex=-1}wh.prototype={push:function(e){this.data.push(e),this.setNodeId(e,this.length),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this.setNodeId(this.data[0],0),this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},updateItem:function(e){this._down(e),this._up(e)},_up:function(e){for(var t=this.data,n=this.compare,r=this.setNodeId,i=t[e];e>0;){var o=e-1>>1,a=t[o];if(n(i,a)>=0)break;t[e]=a,r(a,e),e=o}t[e]=i,r(i,e)},_down:function(e){for(var t=this.data,n=this.compare,r=this.length>>1,i=t[e],o=this.setNodeId;e<r;){var a=1+(e<<1),s=a+1,l=t[a];if(s<this.length&&n(t[s],l)<0&&(a=s,l=t[s]),n(l,i)>=0)break;t[e]=l,o(l,e),e=a}t[e]=i,o(i,e)}};const Sh=[];"function"==typeof Object.freeze&&Object.freeze(Sh);const Ah={heuristic:function(){return 0},distance:function(){return 1},blocked:function(){return!1},compareFScore:function(e,t){return e.fScore-t.fScore},NO_PATH:Sh,setHeapIndex:function(e,t){e.heapIndex=t},setH1:function(e,t){e.h1=t},setH2:function(e,t){e.h2=t},compareF1Score:function(e,t){return e.f1-t.f1},compareF2Score:function(e,t){return e.f2-t.f2}};var Ph=Ah.NO_PATH;function Mh(e,t){var n=(t=t||{}).oriented,r=t.blocked;r||(r=Ah.blocked);var i=t.heuristic;i||(i=Ah.heuristic);var o=t.distance;o||(o=Ah.distance);var a=function(){var e=0,t=[];return{createNewState:function(n){var r=t[e];return r?(r.node=n,r.parent=null,r.closed=!1,r.open=0,r.distanceToSource=Number.POSITIVE_INFINITY,r.fScore=Number.POSITIVE_INFINITY,r.heapIndex=-1):(r=new xh(n),t[e]=r),e++,r},reset:function(){e=0}}}();return{find:function(t,s){var l=e.getNode(t);if(!l)throw new Error("fromId is not defined in this graph: "+t);var u=e.getNode(s);if(!u)throw new Error("toId is not defined in this graph: "+s);a.reset();var c,h=new Map,d=new wh({compare:Ah.compareFScore,setNodeId:Ah.setHeapIndex}),p=a.createNewState(l);for(h.set(t,p),p.fScore=i(l,u),p.distanceToSource=0,d.push(p),p.open=1;d.length>0;){if(Ch(c=d.pop(),u))return kh(c);c.closed=!0,e.forEachLinkedNode(c.node.id,f,n)}return Ph;function f(e,t){var n=h.get(e.id);if(n||(n=a.createNewState(e),h.set(e.id,n)),!n.closed&&(0===n.open&&(d.push(n),n.open=1),!r(e,c.node,t))){var s=c.distanceToSource+o(e,c.node,t);s>=n.distanceToSource||(n.parent=c,n.distanceToSource=s,n.fScore=s+i(n.node,u),d.updateItem(n.heapIndex))}}}}}function Ch(e,t){return e.node===t}function kh(e){for(var t=[e.node],n=e.parent;n;)t.push(n.node),n=n.parent;return t}function Th(e){!function(e){if(!e)throw new Error("Eventify cannot use falsy object as events subject");const t=["on","fire","off"];for(let n=0;n<t.length;++n)if(e.hasOwnProperty(t[n]))throw new Error("Subject cannot be eventified, since it already has property '"+t[n]+"'")}(e);const t=function(e){let t=Object.create(null);return{on:function(n,r,i){if("function"!=typeof r)throw new Error("callback is expected to be a function");let o=t[n];return o||(o=t[n]=[]),o.push({callback:r,ctx:i}),e},off:function(n,r){if(void 0===n)return t=Object.create(null),e;if(t[n]){if("function"!=typeof r)delete t[n];else{const e=t[n];for(let t=0;t<e.length;++t)e[t].callback===r&&e.splice(t,1)}}return e},fire:function(n){const r=t[n];if(!r)return e;let i;arguments.length>1&&(i=Array.prototype.slice.call(arguments,1));for(let e=0;e<r.length;++e){const t=r[e];t.callback.apply(t.ctx,i)}return e}}}(e);return e.on=t.on,e.off=t.off,e.fire=t.fire,e}function Eh(e){if("uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId),void 0===e.multigraph&&(e.multigraph=!1),"function"!=typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t,n=new Map,r=new Map,i={},o=0,a=e.multigraph?function(e,t,n){var r=Fh(e,t),o=i.hasOwnProperty(r);if(o||_(e,t)){o||(i[r]=0);var a="@"+ ++i[r];r=Fh(e+a,t+a)}return new Dh(e,t,n,r)}:function(e,t,n){var i=Fh(e,t),o=r.get(i);if(o)return o.data=n,o;return new Dh(e,t,n,i)},s=[],l=x,u=x,c=x,h=x,d={version:20,addNode:g,addLink:function(e,t,n){c();var i=m(e)||g(e),o=m(t)||g(t),s=a(e,t,n),u=r.has(s.id);r.set(s.id,s),Lh(i,s),e!==t&&Lh(o,s);return l(s,u?"update":"add"),h(),s},removeLink:function(e,t){void 0!==t&&(e=_(e,t));return b(e)},removeNode:v,getNode:m,getNodeCount:y,getLinkCount:w,getEdgeCount:w,getLinksCount:w,getNodesCount:y,getLinks:function(e){var t=m(e);return t?t.links:null},forEachNode:P,forEachLinkedNode:function(e,t,r){var i=m(e);if(i&&i.links&&"function"==typeof t)return r?function(e,t,r){var i=e.values(),o=i.next();for(;!o.done;){var a=o.value;if(a.fromId===t&&r(n.get(a.toId),a))return!0;o=i.next()}}(i.links,e,t):function(e,t,r){var i=e.values(),o=i.next();for(;!o.done;){var a=o.value,s=a.fromId===t?a.toId:a.fromId;if(r(n.get(s),a))return!0;o=i.next()}}(i.links,e,t)},forEachLink:function(e){if("function"==typeof e)for(var t=r.values(),n=t.next();!n.done;){if(e(n.value))return!0;n=t.next()}},beginUpdate:c,endUpdate:h,clear:function(){c(),P(function(e){v(e.id)}),h()},hasLink:_,hasNode:m,getLink:_,getLinkById:function(e){return void 0===e?void 0:r.get(e)}};return Th(d),t=d.on,d.on=function(){return d.beginUpdate=c=S,d.endUpdate=h=A,l=p,u=f,d.on=t,t.apply(d,arguments)},d;function p(e,t){s.push({link:e,changeType:t})}function f(e,t){s.push({node:e,changeType:t})}function g(e,t){if(void 0===e)throw new Error("Invalid node identifier");c();var r=m(e);return r?(r.data=t,u(r,"update")):(r=new Rh(e,t),u(r,"add")),n.set(e,r),h(),r}function m(e){return n.get(e)}function v(e){var t=m(e);if(!t)return!1;c();var r=t.links;return r&&(r.forEach(b),t.links=null),n.delete(e),u(t,"remove"),h(),!0}function y(){return n.size}function w(){return r.size}function b(e){if(!e)return!1;if(!r.get(e.id))return!1;c(),r.delete(e.id);var t=m(e.fromId),n=m(e.toId);return t&&t.links.delete(e),n&&n.links.delete(e),l(e,"remove"),h(),!0}function _(e,t){if(void 0!==e&&void 0!==t)return r.get(Fh(e,t))}function x(){}function S(){o+=1}function A(){0===(o-=1)&&s.length>0&&(d.fire("changed",s),s.length=0)}function P(e){if("function"!=typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}}}function Rh(e,t){this.id=e,this.links=null,this.data=t}function Lh(e,t){e.links?e.links.add(t):e.links=new Set([t])}function Dh(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function Fh(e,t){return e.toString()+"👉 "+t.toString()}Mh.l2=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)},Mh.l1=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.abs(n)+Math.abs(r)};var Oh,jh,Nh=function(){var e,t,n="custom_",r=yu.Transit,i=!0,o=!0,a=!1,s=null,l=!1,u={edgeData:{},lines:[]};function c(e,t,n,r,i,o,a,l,u){void 0===a&&(a=!1);var c="".concat(t.toString(),",").concat(r),h=e.getNode(c);if(void 0===h){var d=_(_({mapObjectId:n,coords:t,where:r,what:i,zone:o,zoneUnionVertex:!1,name:u},s?{localRef:l}:{}),s?{memberships:[{mapObjectId:n,localRef:l,name:u,what:i}]}:{});h=e.addNode(c,d)}else if(a){if(h.data.mapObjectId=n,h.data.what=i,h.data.where=r,s&&l&&(h.data.localRef=l),s&&u&&(h.data.name=u),h.data.zone!==o&&(h.data.zoneUnionVertex=!0),h.data.zone=o,s&&l)h.data.memberships.some(function(e){return e.localRef===l})||h.data.memberships.push({mapObjectId:n,localRef:l,name:u,what:i})}else{if(s&&l)h.data.memberships.some(function(e){return e.localRef===l})||h.data.memberships.push({mapObjectId:n,localRef:l,name:u,what:i})}return h}function h(e,t,r,o){var a=o.cost,l=o.description,u=o.isPortal?a/1:a;if(!i||i&&o.wheelChairAccesible){var c={weight:u,cost:a,description:l};o.dimension_what&&(c.dimension_what=o.dimension_what),o.name&&(c.name=o.name),s&&Object.keys(o).forEach(function(e){e.startsWith(n)&&(c[e]=o[e])}),e.addLink(t.id,r.id,c)}}function d(e,t){return zo(te(e),te(t),{units:"meters"})}function p(e,t,r){var i;if(s)for(var o=0,a=e;o<a.length;o++){var l=a[o];t.properties&&l in t.properties?r["".concat(n).concat(l)]=null!==(i=t.properties[l])&&void 0!==i?i:[]:t.properties&&!(l in t.properties)&&(r["".concat(n).concat(l)]=s.defaults[l]||[])}}function f(e,t){var n,r,i=t;if(i){for(var o=c(e,i.coords,i.id,i.where,i.what,i.zone||"public",!0,i.localRef,i.name),a=Object.keys((null==s?void 0:s.customProperties)||{}),l=0;l<i.lines.length;l+=1)for(var u=i.lines[l],f=Io(u),g=0;g<f.length-1;g+=1){var m=c(e,f[g],"vertex",i.where,bu.Edge,u.properties.zone,!1,(null===(n=u.properties)||void 0===n?void 0:n.localRef)||i.localRef,i.name),v=c(e,f[g+1],"vertex",i.where,bu.Edge,u.properties.zone,!1,(null===(r=u.properties)||void 0===r?void 0:r.localRef)||i.localRef,i.name);if(m.id!==v.id){var y=d(f[g],f[g+1]),w={wheelChairAccesible:u.properties.wheelchair,cost:y,isPortal:!1,description:null};s&&(p(a,u,w),w.dimension_what=i.what,w.name=i.name),u.properties.direction!==vu.Forward&&u.properties.direction!==vu.TwoWay||h(e,m,v,w),u.properties.direction!==vu.Backward&&u.properties.direction!==vu.TwoWay||h(e,v,m,w)}}return o}}function g(e,t){var n=t;if(void 0!==n)return c(e,n.coords,n.id,n.where,n.what,n.zone||r,!0,n.localRef)}function m(e){var t,n,i,o,a,s;return{type:"Feature",geometry:{type:"LineString",coordinates:[e.data.coords]},properties:{dimension_where:e.data.where,zone:(null===(t=e.data)||void 0===t?void 0:t.zone)?null===(n=e.data)||void 0===n?void 0:n.zone:r,cost:0,localRef:(null===(i=e.data)||void 0===i?void 0:i.localRef)?null===(o=e.data)||void 0===o?void 0:o.localRef:null,name:(null===(a=e.data)||void 0===a?void 0:a.name)?null===(s=e.data)||void 0===s?void 0:s.name:null,what:e.data.what}}}function v(e){var t;return((null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.memberships)||[]).map(function(e){return null==e?void 0:e.localRef}).filter(function(e){return Boolean(e)})}function y(e,t){var n,r,i,o,a=new Set(v(e)),s=new Set(v(t)),l=[];return a.forEach(function(e){s.has(e)&&l.push(e)}),1===l.length?l[0]:l.length>1?(null===(n=e.data)||void 0===n?void 0:n.localRef)&&l.includes(e.data.localRef)?e.data.localRef:(null===(r=t.data)||void 0===r?void 0:r.localRef)&&l.includes(t.data.localRef)?t.data.localRef:l.sort()[0]:(null===(i=t.data)||void 0===i?void 0:i.localRef)||(null===(o=e.data)||void 0===o?void 0:o.localRef)||null}function w(e,t){var n,r,i="";if((null===(n=e.data)||void 0===n?void 0:n.memberships)&&t){var o=e.data.memberships.find(function(e){return e.localRef===t});o&&o.name&&(i=o.name)}return!i&&(null===(r=e.data)||void 0===r?void 0:r.name)&&(i=e.data.name),"string"==typeof i&&"unknow"===i.trim().toLowerCase()?"":i}function b(e,t){var n,r,i="";if((null===(n=e.data)||void 0===n?void 0:n.memberships)&&t){var o=e.data.memberships.find(function(e){return e.localRef===t});o&&o.what&&(i=o.what)}return!i&&(null===(r=e.data)||void 0===r?void 0:r.what)&&(i=e.data.what),"string"==typeof i&&i.includes("taxiway_crossing_300_stands")&&(i=i.replace("taxiway_crossing_300_stands","taxiway_crossing")),i}function x(e,t,n,r){if(n.length<=1)throw new Error("Route not found");var i=e,o=t;if(s){var a=function(e,t){var n,r,i,o,a=[];if(!e||e.length<2)return a;for(var s=[],l=0;l<e.length-1;l+=1){var u=e[l],c=e[l+1],h=t.getLink(u.id,c.id),d=h&&h.data&&"number"==typeof h.data.cost?h.data.cost:0,p=y(u,c);s.push({a:u,b:c,ref:p,cost:d})}if(s.length<=2)return a;var f=s.length,g=m(e[0]);g.properties.localRef=null!==(r=null===(n=s[0])||void 0===n?void 0:n.ref)&&void 0!==r?r:g.properties.localRef,g.properties.name=w(e[0],null===(i=s[0])||void 0===i?void 0:i.ref),g.properties.what=b(e[0],null===(o=s[0])||void 0===o?void 0:o.ref);var v=e[0].data,_=null;for(l=0;l<f;l+=1){var x=s[l];x.ref!==g.properties.localRef&&(g.geometry.coordinates.length>1&&a.push({geojson:g,edges:[v.mapObjectId,x.a.data.mapObjectId],startFloor:v.where,endFloor:x.a.data.where,isPortal:!1,portalPath:void 0,cost:g.properties.cost,description:null}),(g=m(x.a)).properties.localRef=x.ref,g.properties.name=w(x.a,x.ref),g.properties.what=b(x.a,x.ref),v=x.a.data),g.geometry.coordinates.push(x.b.data.coords),g.properties.cost+=x.cost,_=x}return _&&g.geometry.coordinates.length>1&&(g.properties.name=w(_.b,_.ref),g.properties.what=b(_.b,_.ref),a.push({geojson:g,edges:[v.mapObjectId,_.b.data.mapObjectId],startFloor:v.where,endFloor:_.b.data.where,isPortal:!1,portalPath:void 0,cost:g.properties.cost,description:null})),a}(n,r);return{startNode:i,endNode:o,routes:a,distance:0}}for(var c=[],h=-1,d=0;d<n.length;d+=1)if(n[d].data.what===bu.Network){h=d;break}var p=-1;for(d=0;d<n.length;d+=1)n[d].data.what===bu.Network&&(p=d);for(var f=l&&null===s&&h>0,g=f?n[h]:n[0],v=f?h+1:1,_=g.data,x=[m(g)],S=v;S<n.length;S+=1){var A=n[S],P=n[S-1],M=x[x.length-1];if(null===s&&("vertex"!==A.data.mapObjectId||A.data.zoneUnionVertex)){var C=void 0;if(Zh(P.data.what)&&Zh(A.data.what)){P.data.zone!==A.data.zone&&console.warn("A portal is triggering a change in zone");var k=void 0;if(Vh(P.data.what)){var T=function(e,t,n,r){void 0===r&&(r=!1);var i=n.data.mapObjectId,o=Qu(e,(new Set).add(i));if(o&&o.edgeData[i])for(var a=o.edgeData[i],s=0;s<a.links.length;s+=1){var l=a.links[s];if(l.id===t.data.mapObjectId&&l.pathFeatures&&l.pathFeatures.length>0){var u=l.pathFeatures[0],c=!1===r?n.data.coords:t.data.coords,h=!1===r?t.data.coords:n.data.coords;return ne(zo(c,u.geometry.coordinates[0])<zo(h,u.geometry.coordinates[0])?u.geometry.coordinates:u.geometry.coordinates.slice().reverse())}}return null};(k=T(u.edgeData,A,P,!1))||(k=T(u.edgeData,P,A,!0))}var E=(D=r.getLink(P.id,A.id))&&D.data.cost?D.data.cost:void 0,R=D&&D.data.description?D.data.description:void 0;C={geojson:re([P.data.coords,A.data.coords],{zone:A.data.zone}),edges:[P.data.mapObjectId,A.data.mapObjectId],startFloor:P.data.where,endFloor:A.data.where,isPortal:!0,portalPath:k,cost:E,description:R},c.push(C),_=A.data}else{var L=S+1<n.length?n[S+1]:void 0;A.data.zoneUnionVertex&&P&&L&&(null==P?void 0:P.data.zone)===(null==L?void 0:L.data.zone)?console.log("ignore zoneUnionVertex in segment"):(C={geojson:M,edges:[_.mapObjectId,A.data.mapObjectId],startFloor:_.where,endFloor:_.where,isPortal:!1,portalPath:void 0,cost:M.properties.cost,description:null},c.push(C),_=A.data)}}if(null===s)if(Zh(P.data.what)&&Zh(A.data.what))M.geometry.coordinates.length<2&&x.pop(),x.push(m(A));else{var D;E=(D=r.getLink(P.id,A.id))&&D.data.cost?D.data.cost:void 0;l&&p>=0&&S>p&&A.data.what!==bu.Network||(M.geometry.coordinates.push(A.data.coords),M.properties.cost+=E)}if(A.data.zoneUnionVertex&&!s){var F=S>0?n[S-1]:void 0;L=S+1<n.length?n[S+1]:void 0;if(F&&L&&(null==F?void 0:F.data.zone)===(null==L?void 0:L.data.zone))console.log("ignore zoneUnionVertex");else if(L){var O=Mu.cloneDeep(A);O.data.zone=L.data.zone,x.push(m(O))}else x.push(m(A))}}if(l&&null===s){var j=x[x.length-1];if(j.geometry.coordinates.length>1){var N=c[c.length-1];if(!N||N.geojson!==j){var I=n[p>=0?p:n.length-1];c.push({geojson:j,edges:[_.mapObjectId,I.data.mapObjectId],startFloor:_.where,endFloor:I.data.where,isPortal:!1,portalPath:void 0,cost:j.properties.cost,description:null})}}}return{startNode:i,endNode:o,routes:c,distance:0}}function S(t,i,l,u){var m=Eh(),v=f(m,t),y=f(m,i);if(v&&y){a||function(e,t){for(var n in t){for(var r=t[n],i=0;i<r.links.length;i+=1){var o=r.links[i],a=o.cost;a=Mu.toInteger(a);var s=o.direction,l=o.wheelchair,u=o.description,c=g(e,r),d=g(e,o);void 0!==c&&void 0!==d&&c.id!==d.id&&(s!==vu.Forward&&s!==vu.TwoWay||h(e,c,d,{wheelChairAccesible:l,cost:a,description:u,isPortal:!0}),s!==vu.Backward&&s!==vu.TwoWay||h(e,d,c,{wheelChairAccesible:l,cost:a,description:u,isPortal:!0}),f(e,o))}f(e,r)}}(m,l),function(e,t){for(var n,i,o=Object.keys((null==s?void 0:s.customProperties)||{}),a=0;a<t.length;a+=1){var l=t[a];if("LineString"===l.geometry.type){var u=Io(l);if(l.properties)for(var f=l.properties.dimension_where,g=l.properties.dimension_what,m=l.properties.zone,v=null===(n=l.properties)||void 0===n?void 0:n.localRef,y=null===(i=l.properties)||void 0===i?void 0:i.title,w=0;w<u.length-1;w+=1){var b=c(e,u[w],"vertex",f,g,m||r,!0,v,y),_=c(e,u[w+1],"vertex",f,g,m||r,!0,v,y);if(b.id!==_.id){var x=d(u[w],u[w+1]),S={wheelChairAccesible:l.properties.wheelchair,cost:x,isPortal:!1,description:null};s&&(p(o,l,S),S.dimension_what=l.properties.dimension_what,S.name=y),l.properties.direction!==vu.Forward&&l.properties.direction!==vu.TwoWay||h(e,b,_,S),l.properties.direction!==vu.Backward&&l.properties.direction!==vu.TwoWay||h(e,_,b,S)}}}}}(m,u);var w=function(t,r,i){var l=null==s?void 0:s.customProperties,u=null,c=null,h=function(e){var t,n;return null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.dimension_what)||void 0===n?void 0:n.includes("what.route.network.vehicle.road.primary")},d=function(e,t,n){var r,i,o;if((null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.localRef)===(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.localRef))return null;if(!h(t))return null;var a=null;return null===(o=null==e?void 0:e.links)||void 0===o||o.forEach(function(e){var r,i,o,s;switch(n){case"start":null===a&&(null==e?void 0:e.toId)===(null==t?void 0:t.fromId)&&(a=null!==(i=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.localRef)&&void 0!==i?i:null);break;case"end":null===a&&(null==e?void 0:e.fromId)===(null==t?void 0:t.toId)&&(a=null!==(s=null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.localRef)&&void 0!==s?s:null);break;default:a=null}}),a},p=["twy-crs_unknown_1","twy-crs_unknown_2","twy-crs_unknown_3","twy-crs_unknown_4","twy-crs_unknown_5","twy-crs_unknown_6"],f=Mh(i,{oriented:!0,distance:function(e,n,i){var o,s,l=i.data.cost;return a?(null===u&&(u=d(t,i,"start")),null===c&&(c=d(r,i,"end")),u&&(null===(o=null==i?void 0:i.data)||void 0===o?void 0:o.localRef)===u&&h(i)&&(l*=.1),c&&(null===(s=null==i?void 0:i.data)||void 0===s?void 0:s.localRef)===c&&h(i)&&(l*=.1),l):l},blocked:function(i,u,c){if(o&&(null==i?void 0:i.data.zone)!==(null==u?void 0:u.data.zone)){var h=Ku(i.data.where),d=Ku(e.where),f=Ku(u.data.where);if(h!==d&&f!==d)return!0}if(a&&c.data.dimension_what&&c.data.dimension_what.includes(bu.AirsideNetwork)){if(s){if(!s.allowedRoadwayCategories.includes(c.data.dimension_what))return!0;var g=!0;for(var m in l)c.data["".concat(n).concat(m)].includes(l[m])||(console.log("Blocked on custom property '".concat(m,"' check. ").concat(c.data.name," ").concat(c.data.dimension_what.split(".").slice(5).map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" ")," Road allows ").concat(m,":[").concat(c.data["".concat(n).concat(m)],"]. Vehicle has ").concat(m,": ").concat(l[m])),g=!1);if(!1===g)return!0}var v=/3\d{2}/;if((!v.test(t.data.name)||"what.airside.apron.stand"!==t.data.what)&&(!v.test(r.data.name)||"what.airside.apron.stand"!==r.data.what)&&(null==s?void 0:s.allowedRoadwayCategories.includes("what.route.network.vehicle.road.tunnel"))&&"what.route.network.vehicle.road.taxiway_crossing"===c.data.dimension_what&&p.includes(c.data.localRef)&&(null==s?void 0:s.allowedRoadwayCategories.includes("what.route.network.vehicle.road.taxiway_crossing.300s")))return!0}return!1}}),g=f.find(t.id,r.id).reverse();return console.log("Shorest Path:",g),g}(v,y,m);try{return x(t,i,w,m)}catch(e){throw e}}return{}}function A(e,t,n){for(var r=new Set,i=0;n.routes&&i<n.routes.length;i+=1){var o=n.routes[i];o.isPortal&&(r.add(o.edges[0]),r.add(o.edges[1]))}var a=performance.now(),s=Wu(Ju,!0,bu.Network,!1),l=Qu(u.edgeData,r);console.log("time load: ",(performance.now()-a)/1e3),a=performance.now(),e.lines.concat(t.lines,l.lines);var c=s;return console.log("time network: ",(performance.now()-a)/1e3,s.length),S(e,t,l.edgeData,c)}function P(e,t,n){var r=performance.now();if(n){console.log("getDirectRoute() called for Airside Roadways Routing"),e.lines.concat(t.lines);var i=Wu("where.changi.airside",!1,bu.AirsideNetwork,!0);return console.log("Network Features:",i),console.log("time network: ",(performance.now()-r)/1e3),S(e,t,{},i)}console.log("getDirectRoute() called for In-Airport Routing");var o=Wu(Ku(e.where),!0,bu.Network,!1),a=Wu(Ku(t.where),!0,bu.Network,!1),s=Xu(u.edgeData,Ku(e.where)),l=Xu(u.edgeData,Ku(t.where));console.log("time load: ",(performance.now()-r)/1e3),r=performance.now(),e.lines.concat(t.lines,s.lines,l.lines);var c=o.concat(a);return console.log("time network: ",(performance.now()-r)/1e3,o.length),S(e,t,_(_({},s.edgeData),l.edgeData),c)}return{getRoute:function(n,r,c){var h=function(e){var t;return e.mode===exports.RouteMode.WithinTerminal&&null!==(t=e.config.wheelChairAccessible)&&void 0!==t&&t}(c),d=function(e){return e.mode===exports.RouteMode.Airside?e.config.vehicleType:null}(c),p=function(e){if(e.mode===exports.RouteMode.Airside)return e.config.distanceThreshold}(c);if(i=h,s=d,a=function(e){return e.mode===exports.RouteMode.Airside}(c),l=function(e){return Boolean(e.config.forRealtime)}(c),n.type===exports.LocationType.MapObject&&r.type===exports.LocationType.MapObject&&n.mapObjectId===r.mapObjectId)return console.warn("Start and end locations are the same for mode ".concat(c.mode)),{};if(n.type===exports.LocationType.Coordinate&&r.type===exports.LocationType.Coordinate&&n.coordinates[0]===r.coordinates[0]&&n.coordinates[1]===r.coordinates[1]){var f="Start and end locations are the same for mode ".concat(c.mode);throw console.warn(f),new Error(f)}var g=Vu(n,{distanceThreshold:p,vehicleTemplateType:s}),m=Vu(r,{distanceThreshold:p,vehicleTemplateType:s});console.log("Routing Mode:",c.mode),console.log("Node1:",g),console.log("Node2:",m),console.log("Config:",c.config),e=g,t=m;var v=performance.now();if(function(e){return[exports.RouteMode.WithinTerminal,exports.RouteMode.ToTerminal,exports.RouteMode.FromTerminal].includes(e.mode)}(c)&&(u=qu(),console.log("time portal load with extrapolation: ",(performance.now()-v)/1e3)),v=performance.now(),e&&t){var y=function(){var n=P(e,t,d);if(console.log("Direct route",n),Mu.isEmpty(n)){var r=function(e,t){var n=performance.now(),r=Wu(Ju,!0,bu.Network,!1);console.log("time load: ",(performance.now()-n)/1e3),n=performance.now(),e.lines.concat(t.lines,u.lines);var i=r;return console.log("time network: ",(performance.now()-n)/1e3,r.length),S(e,t,u.edgeData,i)}(e,t);return A(e,t,r)}return A(e,t,n)},w=void 0;if(c.mode===exports.RouteMode.Airside){o=!1;var b=P(e,t,d);return console.log("Airside direct route",b),b}return o=function(e){return e.mode===exports.RouteMode.WithinTerminal}(c),w=y(),Mu.isEmpty(w)&&(o=!1,w=y()),console.log("time total: ",(performance.now()-v)/1e3),w}return{}}}}(),Ih={getRoute:Nh.getRoute};function zh(e){var t,n,r,i,o,a,s,l,u,c,h,d=Vu({type:exports.LocationType.MapObject,mapObjectId:e.edges[0]}),p=Vu({type:exports.LocationType.MapObject,mapObjectId:e.edges[1]});return _(_(_({maneuverType:Su.Static,coordinates:[],distance:0,features:[],time:0,startEdge:{mapObjectId:e.edges[0],whereDimension:e.startFloor,whatDimension:d?d.what:"",name:d?d.name:null!==(r=null===(n=null===(t=e.geojson)||void 0===t?void 0:t.properties)||void 0===n?void 0:n.name)&&void 0!==r?r:""},endEdge:{mapObjectId:e.edges[1],whereDimension:e.endFloor,whatDimension:p?p.what:"",name:p?p.name:null===(o=null===(i=e.geojson)||void 0===i?void 0:i.properties)||void 0===o?void 0:o.name},isPortal:e.isPortal,segmentType:Au.Internal,instructions:[],patchNumber:-1,whereDimension:"",zone:"",cost:e.cost,description:e.description},(null===(s=null===(a=e.geojson)||void 0===a?void 0:a.properties)||void 0===s?void 0:s.localRef)?{localRef:e.geojson.properties.localRef}:{}),(null===(u=null===(l=e.geojson)||void 0===l?void 0:l.properties)||void 0===u?void 0:u.name)?{name:e.geojson.properties.name}:{}),(null===(h=null===(c=e.geojson)||void 0===c?void 0:c.properties)||void 0===h?void 0:h.what)?{whatTaxonomy:e.geojson.properties.what}:{})}function Bh(e){return e.maneuverType===Su.RouteOverview||e.maneuverType===Su.SectionOverview}function Uh(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];r.properties.highlight=!!t}return e}function Hh(e,t,n,r,i){if(void 0===i&&(i=""),0===e.length)return[];var o=[te(e,{segmentNumber:t,dimension_where:i,patchNumber:r,isNode:!0})];return Uh(o,n),o}function Gh(e,t,n,r,i,o,a,s,l){if(void 0===o&&(o=""),void 0===a&&(a=""),void 0===s&&(s=""),void 0===l&&(l=""),0===e.length)return[];var u=_(_(_({segmentNumber:t,dimension_where:o,patchNumber:r,isNode:!1,zone:i},l?{localRef:l}:{}),a?{whatTaxonomy:a}:{}),s?{name:s}:{}),c=ne(e,_(_({},u),{featureBelongsToLineString:!0})),h=te(e[0],_(_({},u),{featureBelongsToLineString:!1})),d=te(e[e.length-1],_(_({},u),{featureBelongsToLineString:!1})),p=[];return p.push(h,c,d),Uh(p,n),p}function Wh(e,t,n){var r,i,o,a,s,l;return x(this,void 0,void 0,function(){var u,c,h,d,p,f,g,m,v,y,w,b,x,A,P,M,C,k,T,E,R,L,D,F,O,j,N,I,z,B,U,H,G,W,V,q,Z,Y,$,K,J,X,Q,ee,te,re,ie,oe,ae,se,le,ue,ce,he,de,pe,fe,ge,me,ve,ye,we,be,_e,xe;return S(this,function(S){for(u=function(e){var t,n,r;return{shouldAddOverviewSegment:null===(t=e.config.shouldAddOverviewSegment)||void 0===t||t,shouldAddStartSegment:null===(n=e.config.shouldAddStartSegment)||void 0===n||n,shouldAddEndSegment:null===(r=e.config.shouldAddEndSegment)||void 0===r||r}}(n),c=u.shouldAddOverviewSegment,h=u.shouldAddStartSegment,d=u.shouldAddEndSegment,p=function(e){var t;return null!==(t=e.indexOffset)&&void 0!==t?t:0}(n),f=n.mode===exports.RouteMode.Airside,g=Ih.getRoute(e,t,n),m=g.routes,console.log("PathSegments:",m),v=[],w=0;m&&w<m.length;w+=1)if(b=m[w],x=b.geojson.properties.zone,b.isPortal)y=_(_({},zh(b)),{maneuverType:Su.Static,coordinates:[b.geojson.geometry.coordinates[1]],zone:x,isPortal:!1}),J=_(_({},zh(b)),{maneuverType:Su.EnterPortal,coordinates:[b.geojson.geometry.coordinates[0]]}),v.push(J),X=_(_({},zh(b)),{maneuverType:Su.ExitPortal,coordinates:[b.geojson.geometry.coordinates[1]]}),v.push(X),(Q=v.length>0?v[v.length-1]:void 0)&&Q.maneuverType===Su.ExitPortal&&(v.pop(),b.portalPath&&(ee=_(_({},zh(b)),{maneuverType:Su.TravelPortal,coordinates:b.portalPath.geometry.coordinates,zone:x}),v.push(ee)),v.push(X));else{if(A=b.geojson.geometry.coordinates,P=Su.Static,0===v.length&&h&&(M=_(_({},zh(b)),{maneuverType:Su.Static,coordinates:[A[0]]}),v.push(M)),w>0&&v.length>0&&(C=m[w-1],k=C.geojson.properties.zone,x===k||f||(T=C.geojson.geometry.coordinates,F=_(_({},zh(C)),{maneuverType:Su.ChangeZone,zone:x,coordinates:[T[T.length-1]]}),v.push(F),P=Su.ChangeZone)),A.length>2)for(le=0;le<A.length-2;le+=1)E=A[le],R=A[le+1],L=A[le+2],y=_(_({},zh(b)),{maneuverType:Su.Static,coordinates:[L],zone:x||""}),D=Su.ContinueStraight,F=_(_({},zh(b)),{maneuverType:D,zone:x}),P===Su.ContinueStraight?(le+3===A.length?v[v.length-1].coordinates.push(R,L):v[v.length-1].coordinates.push(R),v[v.length-1].maneuverType=D):(F.coordinates.push(E,R),v.push(F),le+3===A.length&&(D===Su.ContinueStraight?v[v.length-1].coordinates.push(L):v.push(_(_({},zh(b)),{maneuverType:Su.ContinueStraight,coordinates:[R,L],zone:x||""})))),P=D;else F=_(_({},zh(b)),{maneuverType:Su.ContinueStraight,coordinates:A,zone:x}),v.push(F),y=_(_({},zh(b)),{maneuverType:Su.Static,coordinates:[A[A.length-1]],zone:x||""});if(O=function(){if(v.length>0){var e=v[v.length-1];e.maneuverType===Su.ChangeZone&&e.zone===yu.Transit&&v.pop()}},(Q=v.length>0?v[v.length-1]:void 0)&&Q.maneuverType===Su.ContinueStraight)for(j=Zu(Q.startEdge.whereDimension),N=ne(Q.coordinates),le=0;le<j.length;le+=1)I=j[le],nh(N,I)||((z=es(N,I)).features.length>1?(v.pop(),B=yh(Io(N)[0],No(z.features[0]),N),as(B,{units:"meters"})>=10?(U=_(_({},zh(b)),{maneuverType:Su.ContinueStraight,zone:x,coordinates:Io(B)}),v.push(U)):v.length>0&&((Q=v[v.length-1]).maneuverType===Su.ChangeZone?(H=Io(B),Q.coordinates=[H[H.length-1]],v.length>1&&((q=v[v.length-2]).coordinates=q.coordinates.concat(Io(B)))):Q.coordinates.concat(Io(B))),G=yh(No(z.features[0]),No(z.features[1]),N),W=_(_({},zh(b)),{maneuverType:Su.PassThroughImmigration,zone:x,coordinates:Io(G)}),0===v.length&&(W.coordinates=B.geometry.coordinates.concat(W.coordinates)),O(),v.push(W),Y=Io(N),$=yh(No(z.features[1]),Y[Y.length-1],N),K=_(_({},zh(b)),{maneuverType:Su.ContinueStraight,zone:x,coordinates:Io($)}),v.push(K)):z.features.length>0&&(qs(Io(N)[0],I)?(v.pop(),G=yh(Io(N)[0],No(z.features[0]),N),W=_(_({},zh(b)),{maneuverType:Su.PassThroughImmigration,zone:x,coordinates:Io(G)}),(Q=v.length>0?v[v.length-1]:void 0)&&Q.maneuverType===Su.ChangeZone&&(V=v.pop(),v.length>1&&(q=v[v.length-1]).maneuverType===Su.PassThroughImmigration&&(v.pop(),V.coordinates=[q.coordinates[0]],v.push(V),W.coordinates=q.coordinates.concat(W.coordinates))),O(),v.push(W),Y=Io(N),$=yh(No(z.features[0]),Y[Y.length-1],N),K=_(_({},zh(b)),{maneuverType:Su.ContinueStraight,zone:x,coordinates:Io($)}),v.push(K)):(Z=yh(Io(N)[0],No(z.features[0]),N),Q.coordinates=Io(Z),Y=Io(N),$=yh(No(z.features[0]),Y[Y.length-1],N),K=_(_({},zh(b)),{maneuverType:Su.PassThroughImmigration,zone:x,coordinates:Io($)}),v.push(K))))}if(y&&d&&v.push(y),f&&v.length>0&&function(e){if(0!==(null==e?void 0:e.length)){e[0].coordinates=[e[1].coordinates[e[1].coordinates.length-1]],e[e.length-1].coordinates=[e[e.length-2].coordinates[0]],e.splice(1,1),e.splice(e.length-2,1);for(var t=1;t<e.length;t+=1){var n=e[t-1],r=e[t];if((n.maneuverType===Su.ContinueStraight||n.maneuverType===Su.RoadChangeContinueStraight||n.maneuverType===Su.TurnLeftAndContinue||n.maneuverType===Su.TurnSlightLeftAndContinue||n.maneuverType===Su.TurnRightAndContinue||n.maneuverType===Su.TurnSlightRightAndContinue||n.maneuverType===Su.UTurnAndContinue)&&r.maneuverType===Su.ContinueStraight&&n.localRef!==r.localRef){var i=n.coordinates,o=r.coordinates;if(i.length>=2&&o.length>=2){var a=Ho(i[i.length-2],i[i.length-1]),s=Ho(o[0],o[1])-a;s>180&&(s-=360),s<-180&&(s+=360),r.maneuverType=s>-30&&s<30?Su.RoadChangeContinueStraight:s>=30&&s<60?Su.TurnSlightRightAndContinue:s>=60&&s<120?Su.TurnRightAndContinue:s<=-30&&s>-60?Su.TurnSlightLeftAndContinue:s<=-60&&s>-120?Su.TurnLeftAndContinue:Su.UTurnAndContinue}else r.maneuverType=Su.RoadChangeContinueStraight}}}}(v),te={segments:v,walkingDistance:0,transportDistance:0,walkingTime:0,transportTime:0,distanceUnit:Iu,speed:1},f&&(te.speed=8.33),te.segments.length>0){for(ie=0,(re=c)&&((oe=Mu.cloneDeep(te.segments[0])).maneuverType=Su.RouteOverview,te.segments.unshift(oe),ie=1),ae=p+ie,se=te.segments.length>ie?te.segments[ie].startEdge.whereDimension:"",le=ie;le<te.segments.length;le+=1){if(ue=!1,ce=te.segments[le],he=p+le,ce.isPortal){if(ce.maneuverType===Su.EnterPortal){for(pe=Hh(ce.coordinates[0],he,ue,ae,ce.startEdge.whereDimension),fe=[],ge=0,me=pe;ge<me.length;ge++)ve=me[ge],fe.push(ve);ce.features=fe,ce.patchNumber=ae,ce.whereDimension=se,(ye=te.segments.length>=le+2?te.segments[le+1]:void 0)&&ye.maneuverType!==Su.TravelPortal?(we=ce.cost,ce.time=we||0):ce.time=0,ce.distance=0}ce.maneuverType===Su.TravelPortal&&(ce.features=Gh(ce.coordinates,he,ue,ae,ce.zone,ce.startEdge.whereDimension),ce.patchNumber=ae,ce.whereDimension=se,we=ce.cost,ce.time=we||0,be=void 0,be=ce.coordinates.length>1?as(ne(ce.coordinates),{units:te.distanceUnit}):0,ce.distance=be,le>0&&(te.segments[le-1].time=0)),ce.maneuverType===Su.ExitPortal&&(ae+=1,se=ce.endEdge.whereDimension,te.segments.splice(le,1),le-=1),(_e=te.segments.length>=le+2?te.segments[le+1]:void 0)&&_e.maneuverType===Su.TravelPortal&&(ae+=1)}else ce.maneuverType===Su.Static||ce.maneuverType===Su.ChangeZone?(ce.features=Hh(ce.coordinates[0],he,ue,ae,ce.endEdge.whereDimension),ce.patchNumber=ae,ce.whereDimension=se):(ce.features=Gh(ce.coordinates,he,ue,ae,ce.zone,ce.startEdge.whereDimension,null!==(o=null===(i=null===(r=ce.features[0])||void 0===r?void 0:r.properties)||void 0===i?void 0:i.what)&&void 0!==o?o:"",null!==(l=null===(s=null===(a=ce.features[0])||void 0===a?void 0:a.properties)||void 0===s?void 0:s.name)&&void 0!==l?l:"",ce.localRef),ce.patchNumber=ae,ce.whereDimension=se),de=ce.coordinates,be=void 0,be=de.length>1?as(ne(de),{units:te.distanceUnit}):0,ce.distance=be,ce.maneuverType!==Su.PassThroughImmigration?ce.time=ce.distance/te.speed:ce.time=0;f||ce.maneuverType===Su.TravelPortal?(te.transportDistance+=ce.distance,te.transportTime+=ce.time):(te.walkingDistance+=ce.distance,te.walkingTime+=ce.time)}re&&(xe=sd(te,p),te.segments[0]=xe)}return[2,te]})})}function Vh(e){return!!Object.values(Oh).includes(e)}function qh(e){return!!Object.values(jh).includes(e)}function Zh(e){return!(!Vh(e)&&!qh(e))}function Yh(e){switch(e){case"what.transport.skytrain":return"Skytrain";case"what.service.airport_transfer":return"Bus";case"what.infra.escalator":return"Escalator";case"what.infra.lift":return"Lift";case"what.infra.entrance":case"what.infra.exit":return"";default:return e}}function $h(e,t){var n,r=function(e){var t=e.split(".").slice(-2).join("").toUpperCase().match(/^(T\d+|JEWEL)([A-Za-z]\d+[A-Za-z]?)$/);if(t){var n=void 0;switch(t[1][0]){case"T":n="Terminal";break;case"J":n="Jewel";break;default:n="Level"}var r="Terminal"===n?"".concat(n," ").concat(t[1][1]):"".concat(n),i=void 0;switch(t[2][0]){case"L":default:i="Level";break;case"B":i="Basement"}return{Terminal:r,Level:"".concat(i," ").concat(t[2].substring(1))}}return null}(t);if(r){if((n=e)===Oh.Skytrain||n===Oh.Bus)return r.Terminal;if(e===Oh.Escalator||e===Oh.Lift)return r.Level;if(qh(e))return r.Terminal}return t.split(".").slice(-2).join(" ").toUpperCase()}!function(e){e.Skytrain="what.transport.skytrain",e.Bus="what.service.airport_transfer",e.Escalator="what.infra.escalator",e.Lift="what.infra.lift"}(Oh||(Oh={})),function(e){e.Entrance="what.infra.entrance",e.Exit="what.infra.exit"}(jh||(jh={}));var Kh=function(e){return(e="number"==typeof e?{precision:e}:e||{}).precision=e.precision||5,e.factor=e.factor||Math.pow(10,e.precision),e.dimension=e.dimension||2,e},Jh={encode:function(e,t){t=Kh(t);var n=[];return e.forEach(function(e){if(2===t.dimension)n.push(e.lat||e[0]),n.push(e.lng||e[1]);else for(var r=0;r<t.dimension;++r)n.push(e[r])}),Jh.encodeDeltas(n,t)},decode:function(e,t){t=Kh(t);for(var n=Jh.decodeDeltas(e,t),r=[],i=0;i<n.length;i+=2){var o=[],a=n[i],s=n[i+1];o.push(s,a),r.push(o)}return r},encodeDeltas:function(e,t){t=Kh(t);var n=[];return e.forEach(function(r,i){var o=r-(n[i%t.dimension]||0);n[i%t.dimension]=r,e[i]=o}),Jh.encodeFloats(e,t)},decodeDeltas:function(e,t){t=Kh(t);var n=[],r=Jh.decodeFloats(e,t);return r.forEach(function(e,i){r[i]=Math.round((n[i%t.dimension]=e+(n[i%t.dimension]||0))*t.factor)/t.factor}),r},encodeFloats:function(e,t){return t=Kh(t),Jh.encodeSignedIntegers(e.map(function(e){return Math.round(e*t.factor)}))},decodeFloats:function(e,t){return t=Kh(t),Jh.decodeSignedIntegers(e).map(function(e){return e/t.factor})},encodeSignedIntegers:function(e){return Jh.encodeUnsignedIntegers(e.map(function(e){return e<0?~(e<<1):e<<1}))},decodeSignedIntegers:function(e){return Jh.decodeUnsignedIntegers(e).map(function(e){return 1&e?~(e>>1):e>>1})},encodeUnsignedIntegers:function(e){return e.reduce(function(e,t){return e+Jh.encodeUnsignedInteger(t)},"")},decodeUnsignedIntegers:function(e){for(var t=[],n=0,r=0,i=0;i<e.length;i++){var o=e.charCodeAt(i)-63;n|=(31&o)<<r,o<32?(t.push(n),n=0,r=0):r+=5}return t},encodeSignedInteger:function(e){return Jh.encodeUnsignedInteger(e<0?~(e<<1):e<<1)},encodeUnsignedInteger:function(e){for(var t="";e>=32;)t+=String.fromCharCode(63+(32|31&e)),e>>=5;return t+=String.fromCharCode(e+63)}};function Xh(e,t,n,r){return x(this,void 0,void 0,function(){return S(this,function(e){return[2,null]})})}function Qh(e){return x(this,void 0,void 0,function(){return S(this,function(e){return[2,null]})})}function ed(e){var t={maneuverType:Su.Static,coordinates:[],distance:e.distance,features:[],time:e.duration,startEdge:{mapObjectId:"",whereDimension:"where.external",whatDimension:"what.location",name:e.from.name},endEdge:{mapObjectId:"",whereDimension:"where.external",whatDimension:"what.location",name:e.to.name},isPortal:"WALK"!==e.mode,segmentType:Au.External,instructions:[],patchNumber:-1,whereDimension:"where.external",zone:""};return"WALK"!==e.mode&&(t.portalName=e.routeLongName),t}function td(e,t,n,r,i){var o;return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===i&&(i=0),x(this,void 0,void 0,function(){var a,s,l,u,c,h,d,p,f,g,m,v,y,w,b,x,A,P,M,C,k,T,E,R;return S(this,function(S){try{if(a=null==e?void 0:e.legs,s=null===(o=null==e?void 0:e.legs)||void 0===o?void 0:o.length,l=[],n&&(u=_(_({},ed(a[0])),{maneuverType:Su.Static,coordinates:[Jh.decode(a[0].legGeometry.points,5)[0]],distance:0,isPortal:!1,features:[],time:0}),l.push(u)),a.map(function(e){var t=Jh.decode(e.legGeometry.points,5);if("WALK"===e.mode){var n=_(_({},ed(e)),{maneuverType:Su.ContinueStraight,coordinates:t,distance:e.distance,time:e.duration});l.push(n)}else{var r=[];if("BUS"===e.mode){var i=l[l.length-1];r=i.coordinates.length>2?i.coordinates[i.coordinates.length-1]:[],console.log("LAST_LINE:",i),console.log("LAST_VERTEX:",r)}var o=_(_({},ed(e)),{maneuverType:Su.EnterPortal,coordinates:r.length>1?[r]:[t[0]],isPortal:!0,distance:0,time:0}),a=_(_({},ed(e)),{maneuverType:Su.TravelPortal,coordinates:t,isPortal:!0,distance:e.distance,time:e.duration}),s=_(_({},ed(e)),{maneuverType:Su.ExitPortal,coordinates:[t[t.length-1]],distance:0,time:0,isPortal:!0});l.push(o,a,s)}}),r&&(c=Jh.decode(a[s-1].legGeometry.points,5),h=_(_({},ed(a[s-1])),{maneuverType:Su.Static,coordinates:[c[c.length-1]],distance:0,isPortal:!1,features:[],time:0}),l.push(h)),(d={segments:l,walkingDistance:0,transportDistance:0,walkingTime:0,transportTime:0,distanceUnit:Iu,speed:1}).segments.length>0){for(f=0,(p=t)&&((g=Mu.cloneDeep(d.segments[0])).maneuverType=Su.SectionOverview,d.segments.unshift(g),(g=Mu.cloneDeep(d.segments[0])).maneuverType=Su.RouteOverview,d.segments.unshift(g),f=2),m=i+f,v=d.segments.length>f?d.segments[f].startEdge.whereDimension:"",y=f;y<d.segments.length;y+=1){if(w=!1,b=d.segments[y],x=i+y,b.isPortal){if(b.maneuverType===Su.EnterPortal){for(A=od(b.coordinates[0],x,w,m,b.startEdge.whereDimension),P=[],M=0,C=A;M<C.length;M++)k=C[M],P.push(k);b.features=P,b.patchNumber=m,b.whereDimension=v}b.maneuverType===Su.TravelPortal&&(b.features=ad(b.coordinates,x,w,m,b.zone,b.startEdge.whereDimension),b.patchNumber=m,b.whereDimension=v),b.maneuverType===Su.ExitPortal&&(d.segments.splice(y,1),y-=1)}else b.maneuverType===Su.Static?(b.features=od(b.coordinates[0],x,w,m,b.endEdge.whereDimension),b.patchNumber=m,b.whereDimension=v):(b.features=ad(b.coordinates,x,w,m,b.zone,b.startEdge.whereDimension),b.patchNumber=m,b.whereDimension=v),T=b.coordinates,E=void 0,E=T.length>1?as(ne(T),{units:d.distanceUnit}):0,b.distance=E;b.maneuverType===Su.ContinueStraight?(d.walkingDistance+=b.distance,d.walkingTime+=b.time):(d.transportDistance+=b.distance,d.transportTime+=b.time)}p&&(R=sd(d,i),d.segments[0]=R,R=sd(d,i+1),d.segments[1]=R)}return[2,d]}catch(e){return console.log("Error:",e),[2,void 0]}return[2]})})}function nd(e,t,n,r,i){return x(this,void 0,void 0,function(){var i,o,a,s,l,u,c,h,d;return S(this,function(p){switch(p.label){case 0:if(!e)return console.error("ExternalTransitionPoint not received"),[2,void 0];if(t.type!==exports.LocationType.MapObject)return console.error("Internal location must be MapObject type for external routing"),[2,void 0];if(i=Number.POSITIVE_INFINITY,console.log("ExternalTransitionPoint",e),0===(a=void e.stopCode).length)return[2,void 0];if(console.log("AirportTransitionPoints:",a),!(a.length>0))return[3,5];s=0,p.label=1;case 1:return s<a.length?(l={type:exports.LocationType.MapObject,mapObjectId:a[s].id},u=void 0,c=void 0,"Inside"===r?(u=l,c=t):(u=t,c=l),[4,ld(u,c,n)]):[3,4];case 2:h=p.sent(),(d=h.walkingTime+h.transportTime)<i&&(i=d,o=h),p.label=3;case 3:return s+=1,[3,1];case 4:return console.log("InternalShortestRoute:",o),console.log("InternalShortestTime",i/60),[3,6];case 5:return console.error("Internal transition points not found"),[2,void 0];case 6:return[2,o]}})})}function rd(e,t,n,r){return void 0===r&&(r="Inside"),x(this,void 0,void 0,function(){var i,o,a,s,l,u,c,h,d,p,f,g,m,v;return S(this,function(y){switch(y.label){case 0:a=e.plan.itineraries.length,s=e.plan.itineraries,l=Number.POSITIVE_INFINITY,u=0,y.label=1;case 1:return u<a?(function(e,t){"Inside"!==t||"WALK"!==e[e.length-1].mode||"SUBWAY"!==e[e.length-2].mode&&"BUS"!==e[e.length-2].mode?"Outside"!==t||"WALK"!==e[0].mode||"SUBWAY"!==e[1].mode&&"BUS"!==e[1].mode||e.shift():e.pop()}(c=s[u].legs,r),h=s[u].legs.length,d=void 0,p=null,f=void 0,"Inside"===r?(d=c[h-1].mode,p={name:c[h-1].to.name,lat:c[h-1].to.lat,lng:c[h-1].to.lon,stopId:c[h-1].to.stopId,stopCode:c[h-1].to.stopCode}):"Outside"===r&&(d=c[0].mode,p={name:c[0].from.name,lat:c[0].from.lat,lng:c[0].from.lon,stopId:c[0].from.stopId,stopCode:c[0].from.stopCode}),"WALK"!==d?[3,3]:("Inside"===r?(d=c[h-2].mode,p={name:c[h-2].to.name,lat:c[h-2].to.lat,lng:c[h-2].to.lon,stopId:c[h-2].to.stopId,stopCode:c[h-2].to.stopCode}):"Outside"===r&&(d=c[1].mode,p={name:c[1].from.name,lat:c[1].from.lat,lng:c[1].from.lon,stopId:c[1].from.stopId,stopCode:c[1].from.stopCode}),console.log("INFINITY_WALKMODE"),[4,nd(p,t,n,r)])):[3,7];case 2:return f=y.sent(),[3,5];case 3:return[4,nd(p,t,n,r)];case 4:f=y.sent(),y.label=5;case 5:if(!f||0===f.segments.length)return console.error("Internal route to nearest transition point not found"),[2,void 0];g=f.walkingTime+f.transportTime,m=s[u].duration,(v=g+m)<l&&(l=v,i=f,o=s[u]),y.label=6;case 6:return u+=1,[3,1];case 7:return[2,{shortestInternalRoute:i,shortestExternalRoute:o}]}})})}function id(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];r.properties.highlight=!!t}return e}function od(e,t,n,r,i){if(void 0===i&&(i=""),0===e.length)return[];var o=[te(e,{segmentNumber:t,dimension_where:i,patchNumber:r,isNode:!0})];return id(o,n),o}function ad(e,t,n,r,i,o){if(void 0===o&&(o=""),0===e.length)return[];var a={segmentNumber:t,dimension_where:o,patchNumber:r,isNode:!1,zone:i},s=ne(e,_(_({},a),{featureBelongsToLineString:!0})),l=te(e[0],_(_({},a),{featureBelongsToLineString:!1})),u=te(e[e.length-1],_(_({},a),{featureBelongsToLineString:!1})),c=[];return c.push(l,s,u),id(c,n),c}function sd(e,t){void 0===t&&(t=0);var n=Mu.cloneDeep(e.segments[1]),r=e.segments.length>1?e.segments[1].startEdge.whereDimension:"";n.coordinates=[],n.features=[],n.time=0,n.distance=0,n.isPortal=!1,n.maneuverType=Su.RouteOverview,n.patchNumber=t,n.instructions=["Overview"];for(var i=1;i<e.segments.length;i+=1)if(e.segments[i].maneuverType!==Su.SectionOverview){for(var o=0;o<e.segments[i].coordinates.length;o+=1){var a=e.segments[i].coordinates[o];n.coordinates.push(a)}for(o=0;o<e.segments[i].features.length;o+=1){var s=Mu.cloneDeep(e.segments[i].features[o]);s.properties&&!s.properties.isNode&&(s.properties.dimension_where!==r?s.properties.isNonHighlightedOverview="1":s.properties.isNonHighlightedOverview="0",s.properties.dimension_where=r,s.properties.patchNumber=n.patchNumber,s.properties.segmentNumber=n.patchNumber,n.features.push(s))}}return n.endEdge=Mu.cloneDeep(e.segments[e.segments.length-1].endEdge),n.time=e.walkingTime+e.transportTime,n.distance=e.walkingDistance+e.transportDistance,n}function ld(e,t,n){return x(this,void 0,void 0,function(){var r;return S(this,function(i){switch(i.label){case 0:return[4,Wh(e,t,n)];case 1:return r=i.sent(),console.log("internal generated: ",r),function(e){for(var t=function(t){return 0===t||1===t&&e.segments[t-1].maneuverType===Su.RouteOverview},n=function(e){return e.startEdge.whereDimension.toLowerCase().includes("l1")?"Clear Arrival Immigration":"Clear Departure Immigration"},r=function(e){return e?e.split(".").slice(5).join(" ").split(/[\s_]+/).map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" "):""},i=0;i<e.segments.length;i+=1){var o=e.segments[i];if(o.instructions=[],o.maneuverType===Su.RouteOverview){var a="Overview";o.instructions.push(a)}if(i>0&&o.maneuverType===Su.ChangeZone)a="",e.segments[i-1].zone===yu.Public&&o.zone===yu.Transit?a=n(o):e.segments[i-1].zone===yu.Transit&&o.zone===yu.Public&&(a="Exit Baggage Claim Hall"),o.instructions.push(a);else if(o.maneuverType===Su.ContinueStraight||o.maneuverType===Su.PassThroughImmigration){var s=o.maneuverType===Su.ContinueStraight?"".concat((null==o?void 0:o.localRef)?"Continue":"Walk"," for ").concat(Math.ceil(o.distance)," ").concat(e.distanceUnit):n(o);o.localRef&&(s=o.maneuverType===Su.ContinueStraight?"".concat((null==o?void 0:o.localRef)?"Continue":"Walk","\n ").concat((null==o?void 0:o.name)&&"unknown"!==o.name?"on ".concat(o.name):"","\n ").concat("".concat(r(o.whatTaxonomy)," Road"),"\n for ").concat(Math.ceil(o.distance)," ").concat(e.distanceUnit):n(o)),a=void 0,0===i||e.segments[i-1].maneuverType!==Su.ChangeZone&&(e.segments[i-1].maneuverType,Su.PassThroughImmigration),a=s,o.instructions.push(a)}else if(o.maneuverType===Su.Static)t(i)&&o.instructions.push("Start at ".concat(o.startEdge.name," on ").concat(o.startEdge.whereDimension.split(".").slice(-2).join(" ").toUpperCase())),i===e.segments.length-1&&o.instructions.push("Arrive at ".concat(o.endEdge.name," on ").concat(o.endEdge.whereDimension.split(".").slice(-2).join(" ").toUpperCase()));else if(o.maneuverType===Su.EnterPortal){if(a="Enter ".concat(o.startEdge.name," at ").concat(o.startEdge.whereDimension.split(".").slice(-2).join(" ").toUpperCase()),qh(o.startEdge.whatDimension))a="Continue to ".concat($h(o.startEdge.whatDimension,o.endEdge.whereDimension)),o.instructions.push(a);else if(Vh(o.startEdge.whatDimension)){var l=i+1<=e.segments.length-1?e.segments[i+1]:void 0;if(l&&l.maneuverType===Su.TravelPortal){o.instructions.push(a),i+=1;var u=Yh(l.startEdge.whatDimension);a="Take ".concat(u," to ").concat($h(o.startEdge.whatDimension,o.endEdge.whereDimension)),l.instructions.push(a),o.description&&l.instructions.push(o.description)}else{var c=Yh(o.startEdge.whatDimension);a="Take ".concat(c," to ").concat($h(o.startEdge.whatDimension,o.endEdge.whereDimension)),o.instructions.push(a)}}}else o.maneuverType===Su.RoadChangeContinueStraight?(a="Continue on\n ".concat(o&&"unknown"!==o.name?o.name:"","\n ").concat("".concat(r(o.whatTaxonomy)," Road"),"\n for ").concat(Math.ceil(o.distance)," ").concat(e.distanceUnit),o.instructions.push(a)):o.maneuverType===Su.UTurnAndContinue?(a="Take U-Turn onto\n ".concat(o&&"unknown"!==o.name?o.name:"","\n ").concat("".concat(r(o.whatTaxonomy)," Road"),"\n for ").concat(Math.ceil(o.distance)," ").concat(e.distanceUnit),o.instructions.push(a)):o.maneuverType===Su.TurnSlightLeftAndContinue?(a="Turn Slight Left onto\n ".concat(o&&"unknown"!==o.name?o.name:"","\n ").concat("".concat(r(o.whatTaxonomy)," Road"),"\n & Continue for ").concat(Math.ceil(o.distance)," ").concat(e.distanceUnit),o.instructions.push(a)):o.maneuverType===Su.TurnLeftAndContinue?(a="Turn Left onto\n ".concat(o&&"unknown"!==o.name?o.name:"","\n ").concat("".concat(r(o.whatTaxonomy)," Road"),"\n & Continue for ").concat(Math.ceil(o.distance)," ").concat(e.distanceUnit),o.instructions.push(a)):o.maneuverType===Su.TurnRightAndContinue?(a="Turn Right onto\n ".concat(o&&"unknown"!==o.name?o.name:"","\n ").concat("".concat(r(o.whatTaxonomy)," Road"),"\n & Continue for ").concat(Math.ceil(o.distance)," ").concat(e.distanceUnit),o.instructions.push(a)):o.maneuverType===Su.TurnSlightRightAndContinue&&(a="Turn Slight Right onto\n ".concat(o&&"unknown"!==o.name?o.name:"","\n ").concat("".concat(r(o.whatTaxonomy)," Road"),"\n & Continue for ").concat(Math.ceil(o.distance)," ").concat(e.distanceUnit),o.instructions.push(a))}}(r),console.log(r.segments),[2,r]}})})}function ud(e,t,n,r,i){return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===i&&(i=0),x(this,void 0,void 0,function(){var o;return S(this,function(a){switch(a.label){case 0:return[4,td(e,t,n,r,i)];case 1:return o=a.sent(),console.log("GeneratedExternalRoute:",o),function(e){for(var t=0;t<e.segments.length;t+=1){var n=e.segments[t];if(n.instructions=[],n.maneuverType===Su.RouteOverview){var r="Overview";n.instructions.push(r)}n.maneuverType===Su.SectionOverview&&(r="",n.instructions.push(r)),t>0&&n.maneuverType===Su.ContinueStraight?(r="Walk for ".concat(Math.ceil(n.distance)," ").concat(e.distanceUnit),n.instructions.push(r)):t>0&&n.maneuverType===Su.TravelPortal?(r="Take ".concat(null==n?void 0:n.portalName," to ").concat(n.endEdge.name),n.instructions.push(r)):t>0&&n.maneuverType===Su.EnterPortal?(r="Enter ".concat(null==n?void 0:n.portalName," at ").concat(n.startEdge.name),n.instructions.push(r)):t>0&&n.maneuverType===Su.Static?t===e.segments.length-1?(r="Arrive at ".concat(n.endEdge.name),n.instructions.push(r)):1===t&&e.segments[t-1].maneuverType===Su.RouteOverview&&(r="Start at ".concat(n.startEdge.name),n.instructions.push(r)):0===t&&e.segments[t].maneuverType===Su.Static&&(r="Start at ".concat(n.startEdge.name),n.instructions.push(r))}}(o),[2,o]}})})}var cd=new Map;function hd(e){return x(this,void 0,void 0,function(){var e;return S(this,function(t){switch(t.label){case 0:return[4,Qh()];case 1:return(e=t.sent())?[2,e.GeocodeInfo]:[2,void 0]}})})}function dd(e){return x(this,void 0,void 0,function(){var t,n,r,i;return S(this,function(o){switch(o.label){case 0:return e.type===exports.LocationType.MapObject?(t=Vu(e))?[2,t.name||"Unknown Location"]:[2,"Unknown Location"]:e.type!==exports.LocationType.Coordinate?[3,3]:(n="".concat(e.coordinates[0],",").concat(e.coordinates[1]),"where.external"!==e.whereDimension?[3,2]:cd.has(n)?[2,cd.get(n)]:[4,hd()]);case 1:return r=o.sent(),i=n,r&&r.length>0&&(i="NIL"!==r[0].BUILDINGNAME&&"null"!==r[0].BUILDINGNAME?r[0].BUILDINGNAME:"NIL"!==r[0].ROAD&&"null"!==r[0].ROAD?r[0].ROAD:"".concat(e.coordinates[0].toFixed(5),",").concat(e.coordinates[1].toFixed(5))),cd.set(n,i),[2,i];case 2:return[2,"".concat(e.coordinates[0].toFixed(6),",").concat(e.coordinates[1].toFixed(6))];case 3:return[2,"Unknown Location"]}})})}function pd(){return{segments:[],walkingDistance:0,transportDistance:0,walkingTime:0,transportTime:0,distanceUnit:Iu,speed:1}}function fd(e,t,n,r,i){var o;return x(this,void 0,void 0,function(){var a,s,l,u,c,h,d,p,f,g,m,v,y;return S(this,function(w){switch(w.label){case 0:console.log("Case: Within Terminal (Pedestrian)"),a=null!==(o=t.wheelChairAccessible)&&void 0!==o&&o,s=pd(),l=pd(),s.segments.push({}),u=1,c=0,h=0,w.label=1;case 1:return h<e.length-1?(d={mode:exports.RouteMode.WithinTerminal,config:{wheelChairAccessible:a,shouldAddOverviewSegment:n,shouldAddStartSegment:r,shouldAddEndSegment:i,forRealtime:t.forRealtime},indexOffset:u},[4,ld(e[h],e[h+1],d)]):[3,4];case 2:if(!((p=w.sent()).segments.length>0))return console.error("Within-terminal route not found"),[2,void 0];for((f=p.segments[0]).maneuverType=Su.SectionOverview,f.instructions=["".concat(f.startEdge.name," to ").concat(f.endEdge.name)],g=0;g<p.segments.length;g+=1)m=p.segments[g],s.segments.push(m),l.segments.push(m);s.walkingDistance+=p.walkingDistance,s.transportDistance+=p.transportDistance,s.walkingTime+=p.walkingTime,s.transportTime+=p.transportTime,l.walkingDistance+=p.walkingDistance,l.transportDistance+=p.transportDistance,l.walkingTime+=p.walkingTime,l.transportTime+=p.transportTime,u+=p.segments.length,w.label=3;case 3:return h+=1,[3,1];case 4:return v=sd(l,c),s.segments[c]=v,l.segments.unshift(v),s.segments.length>1?(y=sd(s),s.segments[0]=y):s.segments.length=0,console.log("Within-terminal route:",s),[2,s]}})})}function gd(e,t,n,r,i){var o,a,s;return x(this,void 0,void 0,function(){var r,i,l,u,c,h,d,p,f,g,m,v,y,w,b,_,x,A,P,M,C,k,T,E,R,L,D,F,O,j;return S(this,function(S){switch(S.label){case 0:console.log("Case: To Terminal (External → Internal)"),r=t.departureDate,i=t.departureTime,l=t.wheelChairAccessible,u=void 0!==l&&l,c=pd(),h=pd(),d=pd(),c.segments.push({}),p=1,f=0,e.length>2&&(f=c.segments.length,p+=1,c.segments.push({})),g=0,S.label=1;case 1:return g<e.length-1?(m=e[g],e[g+1],m.type!==exports.LocationType.Coordinate?(console.error("ToTerminal mode: first location must be coordinate type"),[2,void 0]):(v=performance.now(),[4,Xh()])):[3,8];case 2:return(y=S.sent())?(w={mode:exports.RouteMode.ToTerminal,config:{departureDate:r,departureTime:i,shouldAddOverviewSegment:!0,shouldAddStartSegment:!0,shouldAddEndSegment:!0,forRealtime:t.forRealtime},indexOffset:p},[4,rd(y,e[g+1],w,"Inside")]):(console.error("External route not found"),[2,void 0]);case 3:return(b=S.sent())?(console.log("ShortestCompleteRoute:",b),_=performance.now(),console.log("EXECUTION_TIME:",_-v),[4,ud(b.shortestExternalRoute,n,!0,!0,p)]):[2,void 0];case 4:return(x=S.sent()).segments.length?[4,dd(e[g])]:(console.error("Something went wrong in computing external route"),[2,void 0]);case 5:return A=S.sent(),x.segments[2].instructions=["Start at ".concat(A)],p+=x.segments.length,p+=1,(P=null===(o=b.shortestInternalRoute)||void 0===o?void 0:o.segments)?(M={mode:exports.RouteMode.WithinTerminal,config:{wheelChairAccessible:u,shouldAddOverviewSegment:!0,shouldAddStartSegment:!0,shouldAddEndSegment:!0,forRealtime:t.forRealtime},indexOffset:p},C={type:exports.LocationType.MapObject,mapObjectId:P[0].startEdge.mapObjectId},k={type:exports.LocationType.MapObject,mapObjectId:P[P.length-1].endEdge.mapObjectId},[4,ld(C,k,M)]):(console.error("Internal route segments empty"),[2,void 0]);case 6:if(!((T=S.sent()).segments.length>0))return console.error("Internal route not found"),[2,void 0];for((L=T.segments[0]).maneuverType=Su.SectionOverview,L.instructions=["".concat(L.startEdge.name," to ").concat(L.endEdge.name)],E=T.segments[1].startEdge.whereDimension.split("."),x.segments[x.segments.length-1].instructions=["Arrive at ".concat(T.segments[1].startEdge.name," at ").concat(E[3].toUpperCase()," ").concat(E[4].toUpperCase())],x.segments[x.segments.length-1].whereDimension=T.segments[1].startEdge.whereDimension,x.segments[x.segments.length-1].endEdge.whereDimension=T.segments[1].startEdge.whereDimension,x.segments[x.segments.length-1].features[0].geometry.coordinates=T.segments[1].coordinates,x.segments[x.segments.length-1].coordinates=T.segments[1].coordinates,x.segments[x.segments.length-1].patchNumber+=1,x.segments[x.segments.length-1].features[0].properties.patchNumber+=1,x.segments.length>0&&((R=x.segments[0]).maneuverType=Su.RouteOverview,R.instructions=["Overview"],(L=x.segments[1]).maneuverType=Su.SectionOverview,L.instructions=["".concat(A," to ").concat(null===(a=b.shortestInternalRoute)||void 0===a?void 0:a.segments[0].startEdge.name)],L.startEdge.name=A,L.endEdge.name=null===(s=b.shortestInternalRoute)||void 0===s?void 0:s.segments[0].startEdge.name),D=0;D<x.segments.length;D+=1)F=x.segments[D],c.segments.push(F),h.segments.push(F);if(c.walkingDistance+=x.walkingDistance,c.transportDistance+=x.transportDistance,c.walkingTime+=x.walkingTime,c.transportTime+=x.transportTime,h.walkingDistance+=x.walkingDistance,h.transportDistance+=x.transportDistance,h.walkingTime+=x.walkingTime,h.transportTime+=x.transportTime,f=c.segments.length,c.segments.push({}),T){for(D=0;D<T.segments.length;D+=1)F=null==T?void 0:T.segments[D],c.segments.push(F),d.segments.push(F);c.walkingDistance+=T.walkingDistance,c.transportDistance+=T.transportDistance,c.walkingTime+=T.walkingTime,c.transportTime+=T.transportTime,d.walkingDistance+=T.walkingDistance,d.transportDistance+=T.transportDistance,d.walkingTime+=T.walkingTime,d.transportTime+=T.transportTime,p+=T.segments.length}S.label=7;case 7:return g+=1,[3,1];case 8:return console.log("MergedExternalRoute:",h),console.log("MergedInternalRoute:",d),O=sd(d,f),c.segments[f]=O,d.segments.unshift(O),c.segments.length>1?(j=sd(c),c.segments[0]=j):c.segments.length=0,console.log("To-terminal route:",c),[2,{fullRoute:c,internalRoute:d,externalRoute:h}]}})})}function md(e,t,n,r,i){var o,a;return x(this,void 0,void 0,function(){var n,r,i,s,l,u,c,h,d,p,f,g,m,v,y,w,b,_,x,A,P,M;return S(this,function(S){switch(S.label){case 0:console.log("Case: From Terminal (Internal → External)"),n=t.departureDate,r=t.departureTime,t.wheelChairAccessible,i=pd(),s=pd(),l=pd(),i.segments.push({}),u=1,c=0,h=0,S.label=1;case 1:return h<e.length-1?(e[h],e[h+1].type!==exports.LocationType.Coordinate?(console.error("FromTerminal mode: last location must be coordinate type"),[2,void 0]):[4,Xh()]):[3,8];case 2:return(d=S.sent())?(2===e.length&&(u+=1),p={mode:exports.RouteMode.FromTerminal,config:{departureDate:n,departureTime:r,shouldAddOverviewSegment:!0,shouldAddStartSegment:!0,shouldAddEndSegment:!0,forRealtime:t.forRealtime},indexOffset:u},[4,rd(d,e[h],p,"Outside")]):(console.error("External route not found"),[2,void 0]);case 3:return(f=S.sent())&&(g=f.shortestInternalRoute)?(u+=g.segments.length,[4,ud(f.shortestExternalRoute,!0,!0,!0,u)]):[2,void 0];case 4:return(m=S.sent()).segments.length?(m.segments[2].instructions=["Start at ".concat(null==g?void 0:g.segments[(null==g?void 0:g.segments.length)-1].endEdge.name)],m.segments[2].coordinates=g.segments[g.segments.length-1].coordinates,m.segments[2].features[0].geometry.coordinates=g.segments[g.segments.length-1].coordinates,[4,dd(e[h+1])]):(console.error("Something went wrong in computing external route"),[2,void 0]);case 5:return v=S.sent(),m.segments[m.segments.length-1].instructions=["Arrive at ".concat(v)],m.segments[m.segments.length-1].endEdge.name=v,[4,dd(e[h])];case 6:if(y=S.sent(),!(g&&g.segments.length>0))return console.log("Route not found"),[2,void 0];for((w=g.segments[0]).maneuverType=Su.SectionOverview,w.instructions=["".concat(y," to ").concat(g.segments[g.segments.length-1].endEdge.name)],m.segments.length>0&&((b=m.segments[0]).maneuverType=Su.RouteOverview,b.instructions=["Overview"],(_=m.segments[1]).maneuverType=Su.SectionOverview,_.instructions=["".concat(null===(o=f.shortestInternalRoute)||void 0===o?void 0:o.segments[f.shortestInternalRoute.segments.length-1].endEdge.name," to ").concat(v)],_.startEdge.name=null===(a=f.shortestInternalRoute)||void 0===a?void 0:a.segments[f.shortestInternalRoute.segments.length-1].endEdge.name,_.endEdge.name=v),2===e.length&&(c=i.segments.length,i.segments.push({})),x=0;x<g.segments.length;x+=1)A=g.segments[x],i.segments.push(A),l.segments.push(A);for(i.walkingDistance+=g.walkingDistance,i.transportDistance+=g.transportDistance,i.walkingTime+=g.walkingTime,i.transportTime+=g.transportTime,x=0;x<m.segments.length;x+=1)A=m.segments[x],i.segments.push(A),s.segments.push(A);i.walkingDistance+=m.walkingDistance,i.transportDistance+=m.transportDistance,i.walkingTime+=m.walkingTime,i.transportTime+=m.transportTime,s.walkingDistance+=m.walkingDistance,s.transportDistance+=m.transportDistance,s.walkingTime+=m.walkingTime,s.transportTime+=m.transportTime,u+=m.segments.length,S.label=7;case 7:return h+=1,[3,1];case 8:return console.log("MergedExternalRoute:",s),console.log("MergedInternalRoute:",l),P=sd(l,c),i.segments[c]=P,l.segments.unshift(P),i.segments.length>1?(M=sd(i),i.segments[0]=M):i.segments.length=0,console.log("From-terminal route:",i),[2,{fullRoute:i,internalRoute:l,externalRoute:s}]}})})}function vd(e,t,n,r,i){return x(this,void 0,void 0,function(){var o,a,s,l,u,c,h,d,p,f,g,m,v,y,w;return S(this,function(b){switch(b.label){case 0:console.log("Case: Airside Vehicle Routing"),o=t.vehicleType,a=t.distanceThreshold,s=void 0===a?30:a,l=pd(),u=pd(),l.segments.push({}),c=1,h=0,d=0,b.label=1;case 1:return d<e.length-1?(p={mode:exports.RouteMode.Airside,config:{vehicleType:o,distanceThreshold:s,shouldAddOverviewSegment:n,shouldAddStartSegment:r,shouldAddEndSegment:i,forRealtime:t.forRealtime},indexOffset:c},[4,ld(e[d],e[d+1],p)]):[3,4];case 2:if(!((f=b.sent()).segments.length>0))return console.error("Airside route not found"),[2,void 0];for((g=f.segments[0]).maneuverType=Su.SectionOverview,g.instructions=["".concat(g.startEdge.name," to ").concat(g.endEdge.name)],m=0;m<f.segments.length;m+=1)v=f.segments[m],l.segments.push(v),u.segments.push(v);l.walkingDistance+=f.walkingDistance,l.transportDistance+=f.transportDistance,l.walkingTime+=f.walkingTime,l.transportTime+=f.transportTime,u.walkingDistance+=f.walkingDistance,u.transportDistance+=f.transportDistance,u.walkingTime+=f.walkingTime,u.transportTime+=f.transportTime,c+=f.segments.length,b.label=3;case 3:return d+=1,[3,1];case 4:return y=sd(u,h),l.segments[h]=y,u.segments.unshift(y),l.segments.length>1?(w=sd(l),l.segments[0]=w):l.segments.length=0,console.log("Airside route:",l),[2,l]}})})}var yd=function(e){function t(t,n,r,i){void 0===i&&(i=[]);var o=e.call(this,null!=r?r:"".concat(t,": ").concat(n))||this;return o.name="NavigationStartError",o.code=t,o.mode=n,o.missing=i,o}return b(t,e),t}(Error);function wd(e,t){if("string"!=typeof e||""===e.trim())throw new Error("".concat(t," is required to start navigation"));return e}function bd(e){if(null==e)throw new Error("Routing mode is not set. Call setRoutingMode before startNavigation.");if(e===exports.RouteMode.ToTerminal||e===exports.RouteMode.FromTerminal)throw new yd("UNSUPPORTED_ROUTE_MODE",e);if(e===exports.RouteMode.Airside&&!function(e){if(!e||"object"!==z(e))return!1;var t=e[bu.Network];if(!Array.isArray(t)||0===t.length)return!1;return t.some(function(e){var t,n=null===(t=null==e?void 0:e.properties)||void 0===t?void 0:t.dimension_what;return"string"==typeof n&&n.includes(bu.AirsideNetwork)})}(nc.getState().data))throw new yd("MISSING_ROUTING_DATA",e);return e}function _d(e){return _(_({wheelChairAccessible:!1,shouldAddOverviewSegment:!0,shouldAddStartSegment:!0,shouldAddEndSegment:!0},e),{forRealtime:!0})}function xd(e){return e.startAnchorLngLat?e.startAnchorLngLat:e.useStartPositionAsAnchor?e.startLngLat:void 0}function Sd(e){var t=this,n=null,r=!1,i=null,o=-1,a=[],s=null,l=!1,u=function(){var e=[];return l||e.push("routingDisplay"),e},c=function(e){var t=u();if(t.length>0)throw new yd("NOT_READY",e,void 0,t)},h=function(e,t){if(t instanceof tl)throw new yd("NOT_READY",e,t.message,t.missing);throw t},d=function(){if(!s)throw new Error("NavigationEngine is not attached. Attach the engine after constructing Routing Manager.");return s},p=function(t){e.display.setDisplayRoute(t)},f=function(){return e.display.getDisplayRoute()},g=function(e){i=e},m=function(e){p(e),g(e)},v=function(n){return x(t,void 0,void 0,function(){var t,r,i,o,a,s;return S(this,function(l){switch(l.label){case 0:return t=!1!==n.useInternalGPS,r=ku(n.mode,n.config),(i=t?r:r.filter(function(e){return"motion"===e})).length>0?[4,e.ensureRequiredSensors(i)]:[3,2];case 1:l.sent(),l.label=2;case 2:return t?[4,e.getInternalGpsPosition()]:[3,4];case 3:return a=l.sent(),[3,5];case 4:a=e.getExternalGpsPosition(),l.label=5;case 5:if(!(null==(o=a)?void 0:o.coordinates)){if(!t&&n.mode===exports.RouteMode.Airside)throw new Error("No external GPS position available. Call triggerGPSUpdate() first or provide an initial position.");throw new Error("Unable to determine start location")}return t||null===(s=e.onExternalGpsUsed)||void 0===s||s.call(e),[2,o]}})})},y=function(e,r){return x(t,void 0,void 0,function(){var t,i,a,s,l,u,c,h,d;return S(this,function(p){return null===n?(console.error("Route mode not set. Please call setRoutingMode() before computing routes."),[2,void 0]):(t=function(e,t){var n=[];switch(e){case exports.RouteMode.Airside:t.vehicleType||n.push("vehicleType is required for Airside routing mode");break;case exports.RouteMode.ToTerminal:case exports.RouteMode.FromTerminal:var r=t;r.departureDate||n.push("departureDate is required for ToTerminal/FromTerminal routing modes"),r.departureTime||n.push("departureTime is required for ToTerminal/FromTerminal routing modes");break;case exports.RouteMode.WithinTerminal:break;default:n.push("Unknown routing mode: ".concat(e))}return{isValid:0===n.length,errors:n}}(n,r),t.isValid?e.length<2?(console.warn("Invalid array passed to computeRoutes"),[2,void 0]):function(e,t){if(e.length<2)return!1;switch(t){case exports.RouteMode.WithinTerminal:return e.every(function(e){return e.type===exports.LocationType.MapObject||e.type===exports.LocationType.Coordinate&&"string"==typeof e.whereDimension&&""!==e.whereDimension.trim()&&"where.external"!==e.whereDimension});case exports.RouteMode.ToTerminal:return e[0].type===exports.LocationType.Coordinate&&"where.external"===e[0].whereDimension&&e.slice(1).every(function(e){return e.type===exports.LocationType.MapObject});case exports.RouteMode.FromTerminal:var n=e.length-1;return e[n].type===exports.LocationType.Coordinate&&"where.external"===e[n].whereDimension&&e.slice(0,-1).every(function(e){return e.type===exports.LocationType.MapObject});case exports.RouteMode.Airside:return e.every(function(e){return e.type===exports.LocationType.MapObject||e.type===exports.LocationType.Coordinate&&e.whereDimension.includes("airside")});default:return!1}}(e,n)?(i=_({},r),n===exports.RouteMode.Airside&&(a=i).vehicleType&&(a.vehicleType=_(_({},a.vehicleType),{defaults:nc.getState().getTemplateDefaults()})),s=i.shouldAddOverviewSegment,l=void 0===s||s,u=i.shouldAddStartSegment,c=void 0===u||u,h=i.shouldAddEndSegment,d=void 0===h||h,o=-1,[2,function(e){switch(e){case exports.RouteMode.WithinTerminal:return fd;case exports.RouteMode.ToTerminal:return gd;case exports.RouteMode.FromTerminal:return md;case exports.RouteMode.Airside:return vd;default:throw new Error("Unknown route mode: ".concat(e))}}(n)(e,i,l,c,d)]):(console.error("Invalid location types for route mode: ".concat(n)),console.error("Locations:",e),[2,void 0]):(console.error("Config validation failed:",t.errors),[2,void 0]))})})},w=function(e,n,r,i){return x(t,void 0,void 0,function(){var t,o;return S(this,function(a){return 2!==e.length||""===n||r.length<1?(console.warn("Invalid input parameters passed to computeRoutesFromLocation"),[2,void 0]):(t={type:exports.LocationType.Coordinate,coordinates:e,whereDimension:n},o=r.map(function(e){return{type:exports.LocationType.MapObject,mapObjectId:e}}),[2,y(A([t],o,!0),null!=i?i:{})])})})},b=function(e,n,r,i){return x(t,void 0,void 0,function(){var t;return S(this,function(o){return 2!==e.length||""===n||r.type!==exports.LocationType.Coordinate?(console.warn("Invalid input parameters passed to computeRouteFromLocationToCoordinates"),[2,void 0]):(t={type:exports.LocationType.Coordinate,coordinates:e,whereDimension:n},[2,y([t,r],null!=i?i:{})])})})},P=function(t,n){var r={padding:{top:50,right:50,bottom:50,left:50},duration:1e3};if(n.coordinates.length>1){var i=function(e,t){void 0===t&&(t=0);for(var n=[],r=0;r<e.segments.length;r+=1){var i=e.segments[r];i.patchNumber===t&&(n=n.concat(i.features))}return n}(t,n.patchNumber);if(!i.length)return;e.fitBounds(function(e){var t=gl({type:"FeatureCollection",features:e});return[t[0],t[1],t[2],t[3]]}(i),r)}else{var o={type:"FeatureCollection",features:[te(n.coordinates[0])]},a=$c(o,.025,3).features[0].geometry.coordinates,s=$c(o,-.025,-3).features[0].geometry.coordinates;e.fitBounds([s[0],s[1],a[0],a[1]],r)}},M=function(n,r,i,s,l){return void 0===r&&(r=!0),void 0===i&&(i=!1),void 0===s&&(s=!0),void 0===l&&(l=!0),x(t,void 0,void 0,function(){var t,u,c,h,d;return S(this,function(p){return!(t=f())||t.segments.length<=n?(console.warn("Invalid segment number passed to highlightRouteSegment"),[2]):(u=t.segments[n]).coordinates.length?(c=u.maneuverType===Su.ExitPortal||u.maneuverType===Su.Static?u.endEdge.whereDimension:u.startEdge.whereDimension,h=u.features[0].properties.patchNumber,(i||o!==h)&&(o=h,a=function(e,t,n,r){var i;void 0===r&&(r=-1);for(var o=[],a=0;a<e.segments.length;a+=1){var s=e.segments[a];if(!(r>=0&&a<r))if(n.includeOverviewFeatures){if(Bh(s)){for(var l=[],u=[],c=0;c<s.features.length;c+=1){var h=s.features[c];void 0!==(null===(i=h.properties)||void 0===i?void 0:i.patchNumber)&&h.properties.patchNumber===n.patchNumberForOverviewFeatures&&void 0!==h.properties.isNonHighlightedOverview&&("1"===h.properties.isNonHighlightedOverview?l.push(h):u.push(h))}var d=l.concat(u);o=o.concat(d)}}else s.patchNumber===t&&(Bh(s)||(o=o.concat(s.features)))}return o}(t,h,{includeOverviewFeatures:Bh(u),patchNumberForOverviewFeatures:h},n)),c&&c!==cl().getCurrentFocus()&&r&&cl().commit(c,{moveCamera:!1}),d=function(e,t,n){void 0===n&&(n=!1);for(var r=0;r<e.length;r+=1){var i=e[r];i.properties.segmentNumber===t?n?!0===i.properties.startPoint&&id([i],!0):id([i],!0):id([i],!1)}return e}(a,n),a=d,e.display.setPatchFeatures({type:"FeatureCollection",features:d}),l&&!Bh(u)?function(t,n,r){var i,o=t.segments[n];if(null===(i=null==o?void 0:o.features)||void 0===i?void 0:i.length){var a=function(e,t){void 0===t&&(t="");for(var n=[],r=0;r<e.features.length;r+=1){var i=e.features[r];i.properties.featureBelongsToLineString&&(""!==t?i.properties.dimension_where&&i.properties.dimension_where===t&&n.push(i):n.push(i))}return n}(o,r);if(0!==a.length){var s=a[0].geometry.coordinates;s.length<=2&&s.push(s[s.length-1]),e.display.setAnimatedCoordinates(s)}else e.display.setAnimatedCoordinates([])}else e.display.setAnimatedCoordinates([])}(t,n,c):e.display.setAnimatedCoordinates([]),s&&P(t,u),[2]):(console.log("at vertical portal segment, ignoring!"),[2])})})},C=function(){i=null,o=-1,a=[],e.display.clear()},k=function(){r&&(null==s||s.stopNavigation(),e.enterNormalMode(),r=!1),C()},T=function(n){return x(t,void 0,void 0,function(){var t,i;return S(this,function(o){switch(o.label){case 0:(t=d()).setUIHandlers(n.handlers),m(n.route),e.enterNavigationMode(),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t.startNavigation({startAnchorLngLat:xd(n),lockWhereTaxonomyPath:n.lockWhereTaxonomyPath})];case 2:return o.sent(),[3,4];case 3:throw i=o.sent(),t.stopNavigation(),e.enterNormalMode(),r=!1,i;case 4:return r=!0,[2,n.route]}})})},E={attachEngine:function(e){s=e},attachDisplay:function(){l=!0},detachDisplay:function(){l=!1},getReadiness:function(){return el(u())},requestRerouteFromPosition:function(e){return x(t,void 0,void 0,function(){var t,n,o,a;return S(this,function(l){switch(l.label){case 0:return r&&e?(t=function(e){for(var t,n,r,i=null!==(t=null==e?void 0:e.segments)&&void 0!==t?t:[],o=i.length-1;o>=0;o-=1){var a=null===(r=null===(n=i[o])||void 0===n?void 0:n.endEdge)||void 0===r?void 0:r.mapObjectId;if(a)return a}}(i),t?(n=cl().getCurrentFocus(),[4,w(e,n,[t],_d())]):[2]):[2];case 1:return o=l.sent(),(null===(a=null==o?void 0:o.segments)||void 0===a?void 0:a.length)?(m(o),[4,M(0,!0,!0,!1,!1)]):[2];case 2:return l.sent(),null==s||s.onWhereTaxonomyUpdate(),null==s||s.notifyReroute(o),[2]}})})},getActiveRoute:f,setActiveRoute:function(e){p(e)},getReferenceRouteForTracking:function(){return i},setReferenceRouteForTracking:g,highlightRouteSegment:M,setRoutingMode:function(t){var r;n=t,null===(r=e.onRoutingModeChange)||void 0===r||r.call(e,t)},getRoutingParameters:function(){return n===exports.RouteMode.Airside?{vehicleType:nc.getState().getTemplateTypes()}:n===exports.RouteMode.WithinTerminal?{wheelChairAccessible:[!1,!0]}:void 0},computeRoute:function(e,t,n){return x(this,void 0,void 0,function(){return S(this,function(r){return[2,y([{type:exports.LocationType.MapObject,mapObjectId:e},{type:exports.LocationType.MapObject,mapObjectId:t}],n)]})})},computeRoutes:function(e,t){return x(this,void 0,void 0,function(){return S(this,function(n){return[2,y(e.map(function(e){return{type:exports.LocationType.MapObject,mapObjectId:e}}),t)]})})},computeRoutesFromLocation:w,computeRouteFromCoordinates:function(e,t,r){return x(this,void 0,void 0,function(){var i;return S(this,function(o){return n!==exports.RouteMode.Airside?(console.error("computeRouteFromCoordinates only works when routing mode is set to Airside"),[2,void 0]):e&&t&&2===e.length&&2===t.length?(i={vehicleType:null==r?void 0:r.vehicleType,shouldAddOverviewSegment:!0,shouldAddStartSegment:!0,shouldAddEndSegment:!0},[2,y([{type:exports.LocationType.Coordinate,coordinates:e,whereDimension:"where.changi.airside"},{type:exports.LocationType.Coordinate,coordinates:t,whereDimension:"where.changi.airside"}],i)]):(console.error("Invalid coordinates provided to computeRouteFromCoordinates"),[2,void 0])})})},startNavigation:function(e,r,i,o){return x(this,void 0,void 0,function(){var a,s,l,u,f,g,m;return S(this,function(y){switch(y.label){case 0:a=wd(null==o?void 0:o.userWhereDimension,"userWhereDimension"),s=bd(n),c(s),y.label=1;case 1:return y.trys.push([1,3,,4]),[4,v({mode:s,useInternalGPS:null==o?void 0:o.useInternalGPS,config:r})];case 2:return l=y.sent(),[3,4];case 3:return u=y.sent(),[2,h(s,u)];case 4:return f=l.coordinates,s!==exports.RouteMode.Airside?[3,6]:[4,w(f,a,[e],r)];case 5:return g=y.sent(),[2,(b={route:g,handlers:i},x(t,void 0,void 0,function(){return S(this,function(e){if(!b.route)throw k(),new Error("Failed to compute route from GPS location to destination");return p(b.route),b.handlers&&d().setUIHandlers(b.handlers),[2,b.route]})}))];case 6:return[4,w(f,a,[e],_d(r))];case 7:if(!(m=y.sent()))throw new Error("Failed to compute route from GPS location to destination");return[2,T({route:m,handlers:i,startLngLat:f,startAnchorLngLat:null==o?void 0:o.startAnchorLngLat,useStartPositionAsAnchor:null==o?void 0:o.useStartPositionAsAnchor,lockWhereTaxonomyPath:a})]}var b})})},startNavigationFromCoordinates:function(e,t,r,i){return x(this,void 0,void 0,function(){var o,a,s,l,u,d;return S(this,function(p){switch(p.label){case 0:o=wd(null==i?void 0:i.startWhereDimension,"startWhereDimension"),a=function(e){if(null==e)throw new Error("Routing mode is not set. Call setRoutingMode before startNavigation.");if(e===exports.RouteMode.ToTerminal||e===exports.RouteMode.FromTerminal)throw new yd("UNSUPPORTED_ROUTE_MODE",e);if(e===exports.RouteMode.Airside)throw new yd("MISSING_ROUTING_DATA",e);return e}(n),c(a),p.label=1;case 1:return p.trys.push([1,3,,4]),[4,v({mode:a,useInternalGPS:null==i?void 0:i.useInternalGPS,config:t})];case 2:return s=p.sent(),[3,4];case 3:return l=p.sent(),[2,h(a,l)];case 4:return u=s.coordinates,[4,b(u,o,e,_d(t))];case 5:if(!(d=p.sent()))throw new Error("Failed to compute route from GPS location to destination");return[2,T({route:d,handlers:r,startLngLat:u,startAnchorLngLat:null==i?void 0:i.startAnchorLngLat,useStartPositionAsAnchor:null==i?void 0:i.useStartPositionAsAnchor,lockWhereTaxonomyPath:o})]}})})},stopNavigation:k,clearRoute:function(){C()}};return E}var Ad=new Set;var Pd=function(){function e(){var e,t,n=this;this.bootstrapped=!1,this.platform=null,this.routingDisplay={setDisplayRoute:function(){},getDisplayRoute:function(){return null},setPatchFeatures:function(){},setAnimatedCoordinates:function(){},clear:function(){}},this.taxonomyUpdateDetach=null,this.focusManager=new ul,this.cameraDirector=new al,this.focusManager.attachCameraDirector(this.cameraDirector),e=this.focusManager,ll=e,this.mapDataService=new wc,this.userLocation=new bc({getFocusTree:function(){return n.mapDataService.getFocusTree()}}),this.userLocation.attachCameraDirector(this.cameraDirector),this.autoFocusManager=new dl(this.userLocation,new hl),this.autoFocusManager.addWhereTaxonomyUpdateAcceptedListener(function(e,t){n.focusManager.commit(e,{moveCamera:t})}),this.taxonomyUpdateStore=(t=function(){return n.autoFocusManager},Xs(function(e,n){return _(_({},pl),{openProposal:function(t){n().isAwaitingDecision||e({pendingWhere:t.whereTaxonomyPath,proposalId:t.id,proposalKind:t.kind,portalMeta:"portal"===t.kind?t.portal:null,isAwaitingDecision:!0,showTaxonomyUpdatePopup:!0,autoAcceptCooldownMs:t.autoAcceptCooldownMs})},clearProposal:function(){e(_({},pl))},acceptProposal:function(){var e,r=n().proposalId;r&&(null===(e=t())||void 0===e||e.acceptProposal(r),n().clearProposal())},rejectProposal:function(){var e,r=n().proposalId;r&&(null===(e=t())||void 0===e||e.rejectProposal(r),n().clearProposal())},manualOverride:function(e){var r,i=n().proposalId;i&&(null===(r=t())||void 0===r||r.manualOverride(i,e),n().clearProposal())}})})),this.routingManager=Sd({ensureRequiredSensors:function(e){return x(n,void 0,void 0,function(){return S(this,function(t){switch(t.label){case 0:return[4,this.userLocation.ensureRequiredSensors(e)];case 1:if(!t.sent())throw new Error("Required sensor permission failed");return[2]}})})},getInternalGpsPosition:function(){return x(n,void 0,void 0,function(){var e,t;return S(this,function(n){switch(n.label){case 0:return(null==(e=this.userLocation.getCurrentPosition())?void 0:e.coordinates)?[2,{coordinates:e.coordinates}]:[4,this.userLocation.getGPSPosition({enableHighAccuracy:!0,timeout:1e4,maximumAge:5e3})];case 1:if(!(null==(t=n.sent())?void 0:t.coordinates))throw new Error("Failed to get GPS position");return[2,{coordinates:t.coordinates}]}})})},getExternalGpsPosition:function(){return n.userLocation.getExternalGpsPosition()},onExternalGpsUsed:function(){n.userLocation.setFollow(!0)},enterNavigationMode:function(){n.userLocation.enterNavigationMode()},enterNormalMode:function(){n.userLocation.enterNormalMode()},display:{setDisplayRoute:function(e){n.routingDisplay.setDisplayRoute(e)},getDisplayRoute:function(){return n.routingDisplay.getDisplayRoute()},setPatchFeatures:function(e){n.routingDisplay.setPatchFeatures(e)},setAnimatedCoordinates:function(e){n.routingDisplay.setAnimatedCoordinates(e)},clear:function(){n.routingDisplay.clear()}},fitBounds:function(e,t){var r,i,o;null===(o=null===(i=null===(r=n.platform)||void 0===r?void 0:r.camera)||void 0===i?void 0:i.fitBounds)||void 0===o||o.call(i,e,t)}}),this.navigationEngine=new jc(this.routingManager,this.userLocation,this.autoFocusManager),this.routingManager.attachEngine(this.navigationEngine),this.readinessStore=Xs(function(e){return _(_({},rl),{sync:function(t){e({ready:t.ready,missing:t.missing,modules:t.modules})}})}),this.mapDataService.onReadinessChange=function(){return n.syncReadiness()},this.syncReadiness()}return e.prototype.bootstrap=function(){var e;this.bootstrapped||(Ad.size>0&&"boolean"==typeof(e=globalThis.__DEV__)&&e&&console.warn("MetaAtlasRuntime: a second concurrent bootstrap was attempted. Multi-map support is not available."),Ad.add(this),this.bootstrapped=!0)},e.prototype.attach=function(e){var t,n,r,i;this.platform=e,e.style?this.focusManager.attachStyle(e.style):this.focusManager.detachStyle(),e.camera?this.cameraDirector.attachCamera(e.camera):this.cameraDirector.detachCamera(),this.userLocation.attachCameraDirector(this.cameraDirector),e.sensors?this.userLocation.attachSensors({gps:e.sensors.gps,compass:e.sensors.compass,motion:e.sensors.motion}):this.userLocation.detachSensors(),e.marker?this.userLocation.attachMarker(e.marker):this.userLocation.detachMarker(),e.routingDisplay?(this.routingDisplay=e.routingDisplay,this.routingManager.attachDisplay()):(this.routingDisplay={setDisplayRoute:function(){},getDisplayRoute:function(){return null},setPatchFeatures:function(){},setAnimatedCoordinates:function(){},clear:function(){}},this.routingManager.detachDisplay()),this.taxonomyUpdateDetach||(this.taxonomyUpdateDetach=(t=this.taxonomyUpdateStore,n=this.autoFocusManager,r=function(e){t.getState().openProposal(e)},i=function(){t.getState().clearProposal()},n.addWhereTaxonomyUpdateProposedListener(r),n.addWhereTaxonomyUpdateAutoRejectedListener(i),function(){n.removeWhereTaxonomyUpdateProposedListener(r),n.removeWhereTaxonomyUpdateAutoRejectedListener(i)})),this.autoFocusManager.start(),this.syncReadiness()},e.prototype.detach=function(){var e;this.autoFocusManager.stop(),null===(e=this.taxonomyUpdateDetach)||void 0===e||e.call(this),this.taxonomyUpdateDetach=null,this.taxonomyUpdateStore.getState().clearProposal(),this.userLocation.detachSensors(),this.userLocation.detachMarker(),this.userLocation.detachCameraDirector(),this.focusManager.detachStyle(),this.cameraDirector.detachCamera(),this.cameraDirector.detachFollowBreaker(),this.routingDisplay={setDisplayRoute:function(){},getDisplayRoute:function(){return null},setPatchFeatures:function(){},setAnimatedCoordinates:function(){},clear:function(){}},this.routingManager.detachDisplay(),this.platform=null,Ad.delete(this),this.bootstrapped=!1,this.syncReadiness()},e.prototype.notifyMapLoaded=function(){this.cameraDirector.notifyMapLoaded()},e.prototype.isAttached=function(){return null!==this.platform},e.prototype.syncReadiness=function(){var e={mapDataService:this.mapDataService.getReadiness(),focusManager:this.focusManager.getReadiness(),cameraDirector:this.cameraDirector.getReadiness(),userLocation:this.userLocation.getReadiness(),routingManager:this.routingManager.getReadiness(),navigationEngine:this.navigationEngine.getReadiness()};this.readinessStore.getState().sync(_(_({},function(e){for(var t=[],n=new Set,r=0,i=il;r<i.length;r++)for(var o=0,a=e[i[r]].missing;o<a.length;o++){var s=a[o];n.has(s)||(n.add(s),t.push(s))}return{ready:0===t.length,missing:t}}(e)),{modules:e}))},e}();var Md=function(){function e(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: (".concat(e,", ").concat(t,")"));if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}return e.prototype.wrap=function(){return new e(function(e,t,n){var r=n-t,i=((e-t)%r+r)%r+t;return i===t?n:i}(this.lng,-180,180),this.lat)},e.prototype.toArray=function(){return[this.lng,this.lat]},e.prototype.toString=function(){return"LngLat(".concat(this.lng,", ").concat(this.lat,")")},e.prototype.distanceTo=function(e){var t=Math.PI/180,n=this.lat*t,r=e.lat*t,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((e.lng-this.lng)*t);return 6371008.8*Math.acos(Math.min(i,1))},e.convert=function(t){if(t instanceof e)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new e(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"===z(t)&&null!==t)return new e(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")},e}(),Cd=function(){function e(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}return e.prototype.setNorthEast=function(e){return this._ne=e instanceof Md?new Md(e.lng,e.lat):Md.convert(e),this},e.prototype.setSouthWest=function(e){return this._sw=e instanceof Md?new Md(e.lng,e.lat):Md.convert(e),this},e.prototype.extend=function(t){var n,r,i=this._sw,o=this._ne;if(t instanceof Md)n=t,r=t;else{if(!(t instanceof e)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(e.convert(a))}var s=t;return this.extend(Md.convert(s))}return t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(Md.convert(t)):this}if(n=t._sw,r=t._ne,!n||!r)return this}return i||o?(i.lng=Math.min(n.lng,i.lng),i.lat=Math.min(n.lat,i.lat),o.lng=Math.max(r.lng,o.lng),o.lat=Math.max(r.lat,o.lat)):(this._sw=new Md(n.lng,n.lat),this._ne=new Md(r.lng,r.lat)),this},e.prototype.getCenter=function(){return new Md((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},e.prototype.getSouthWest=function(){return this._sw},e.prototype.getNorthEast=function(){return this._ne},e.prototype.getNorthWest=function(){return new Md(this.getWest(),this.getNorth())},e.prototype.getSouthEast=function(){return new Md(this.getEast(),this.getSouth())},e.prototype.getWest=function(){return this._sw.lng},e.prototype.getSouth=function(){return this._sw.lat},e.prototype.getEast=function(){return this._ne.lng},e.prototype.getNorth=function(){return this._ne.lat},e.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},e.prototype.toString=function(){return"LngLatBounds(".concat(this._sw.toString(),", ").concat(this._ne.toString(),")")},e.prototype.isEmpty=function(){return!(this._sw&&this._ne)},e.prototype.contains=function(e){var t=Md.convert(e),n=t.lng,r=t.lat,i=this._sw.lat<=r&&r<=this._ne.lat,o=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(o=this._sw.lng>=n&&n>=this._ne.lng),i&&o},e.convert=function(t){return t instanceof e?t:t?new e(t):t},e.fromLngLat=function(t,n){void 0===n&&(n=0);var r=360*n/40075017,i=r/Math.cos(Math.PI/180*t.lat);return new e(new Md(t.lng-i,t.lat-r),new Md(t.lng+i,t.lat+r))},e}(),kd={type:"FeatureCollection",features:[{geometry:{coordinates:[[[103.9887700096493,1.362197288740075],[103.98372695828216,1.350203640412193],[103.984442,1.3499],[103.984522,1.349519],[103.984595,1.349021],[103.984565,1.348824],[103.984299,1.348207],[103.984136,1.347977],[103.983544,1.347659],[103.983441,1.347551],[103.983406,1.347433],[103.983438,1.347319],[103.98353,1.347197],[103.983795,1.347079],[103.983766,1.346924],[103.983353,1.346048],[103.983243,1.345936],[103.982807,1.34491],[103.98248,1.344461],[103.981917,1.344321],[103.981657,1.343706],[103.981226,1.343634],[103.97963,1.344317],[103.979559,1.344288],[103.979305,1.343685],[103.979333,1.343613],[103.980066,1.3433],[103.980216,1.343181],[103.980255,1.343074],[103.980445,1.342997],[103.980612,1.34296],[103.980632,1.343008],[103.981048,1.342832],[103.981052,1.342818],[103.981227,1.342745],[103.981024,1.342263],[103.981054,1.342188],[103.981315,1.342076],[103.981218,1.341848],[103.981229,1.341501],[103.981132,1.341272],[103.981005,1.341209],[103.981055,1.341086],[103.980457,1.339669],[103.980355,1.339515],[103.980135,1.338995],[103.979095,1.338198],[103.978279,1.33808],[103.975271,1.339366],[103.975204,1.340095],[103.974918,1.340087],[103.974943,1.339506],[103.972207,1.340676],[103.971501,1.341176],[103.971142,1.341811],[103.972739,1.345616],[103.973197,1.345431],[103.973555,1.346306],[103.973211,1.346453],[103.973054,1.346829],[103.974724,1.350763],[103.975653,1.350486],[103.980587,1.362174],[103.98131,1.363104],[103.981335,1.363107],[103.982564,1.366051],[103.982293,1.366167],[103.982119,1.365756],[103.98133,1.366093],[103.982618,1.369145],[103.98282,1.369273],[103.982831,1.369696],[103.98365,1.371667],[103.983928,1.371539],[103.984111,1.37199],[103.984496,1.371861],[103.985404,1.373591],[103.985121,1.374019],[103.985113,1.374014],[103.982647,1.371321],[103.982496,1.372373],[103.98168,1.372263],[103.981716,1.372072],[103.980021,1.371786],[103.979887,1.372243],[103.980729,1.37247],[103.980692,1.372603],[103.981091,1.372691],[103.981034,1.372998],[103.981337,1.372997],[103.981415,1.373516],[103.981322,1.373544],[103.981172,1.373714],[103.980969,1.373801],[103.980852,1.373993],[103.980606,1.374239],[103.97928,1.374501],[103.981086,1.37878],[103.982853,1.378401],[103.982635,1.378257],[103.982474,1.378058],[103.982393,1.377849],[103.982097,1.377612],[103.981862,1.376523],[103.985786,1.375761],[103.986733,1.376127],[103.987115,1.376646],[103.987447,1.377519],[103.987659,1.378416],[103.987955,1.379165],[103.988196,1.380074],[103.988279,1.380704],[103.989644,1.384016],[103.991056,1.387452],[103.991115,1.387492],[103.991621,1.387271],[103.991907,1.387951],[103.993194,1.387398],[103.993351,1.387769],[103.993603,1.387683],[103.99394,1.388483],[103.995052,1.388468],[103.995287,1.388368],[103.995056,1.387822],[103.995064,1.387801],[103.996031,1.38852],[103.996133,1.388744],[103.997576,1.388221],[103.998461,1.388714],[103.999043,1.387917],[103.999938,1.386438],[104.000151,1.386113],[104.000588,1.385316],[104.000768,1.38415],[104.000444,1.382669],[103.999984,1.38182],[103.999957,1.381676],[103.99978,1.3813],[103.999989,1.38094],[103.999901,1.378161],[104.000575,1.377859],[104.00064,1.373982],[104.001258,1.373986],[104.00125,1.372264],[104.000731,1.372053],[104.000573,1.371818],[104.000571,1.371054],[104.000705,1.370845],[104.001129,1.370664],[104.001219,1.370704],[104.006418,1.368481],[104.006488,1.368648],[104.015097,1.364966],[104.015027,1.3648],[104.019352,1.36295],[104.017473,1.358499],[104.017508,1.358413],[104.018449,1.358011],[104.004397,1.324724],[104.00394,1.324916],[104.00425,1.32565],[104.004093,1.325724],[104.00417,1.325903],[104.004083,1.326121],[104.004174,1.32613],[104.004166,1.326149],[104.004173,1.326152],[104.004163,1.326177],[104.004154,1.326173],[104.004072,1.326164],[104.004122,1.326278],[104.003918,1.326365],[104.000334,1.317873],[103.999845,1.317087],[103.998308,1.313445],[103.993946,1.31531],[103.993768,1.315219],[103.99308,1.315514],[103.996385,1.323344],[103.996638,1.323447],[104.006107,1.345878],[104.006018,1.346102],[104.005537,1.346307],[104.005938,1.347258],[104.005852,1.347472],[103.997773,1.350929],[103.997657,1.350891],[103.997481,1.350593],[103.997142,1.350738],[103.997042,1.350698],[103.996503,1.349419],[103.996637,1.349084],[103.996896,1.348973],[103.996911,1.348937],[103.996038,1.346869],[103.995996,1.346857],[103.995743,1.346965],[103.99541,1.34683],[103.994841,1.345481],[103.995596,1.345158],[103.99563,1.34516],[103.995702,1.345189],[103.995789,1.345396],[103.996936,1.344905],[103.996533,1.343951],[103.995387,1.344445],[103.995511,1.344736],[103.995481,1.344808],[103.995464,1.344827],[103.994861,1.345089],[103.994637,1.344998],[103.988369,1.330147],[103.988347,1.329713],[103.98857,1.328474],[103.987978,1.327071],[103.987955,1.326785],[103.987164,1.324911],[103.987081,1.324946],[103.98561,1.321461],[103.986331,1.321152],[103.985866,1.320051],[103.985468,1.320222],[103.985421,1.320111],[103.985409,1.320116],[103.985405,1.320108],[103.985358,1.320128],[103.985296,1.319981],[103.985334,1.319965],[103.985348,1.319944],[103.98515,1.319072],[103.980111,1.321228],[103.978578,1.322455],[103.983567,1.33428],[103.983476,1.335036],[103.983474,1.335069],[103.983009,1.335268],[103.98354933284033,1.3364946996522131],[103.98231231703316,1.3370245683484567],[103.98342436604707,1.3396729339712583],[103.98417983421598,1.3393514014339156],[103.9844931502899,1.3400841720206023],[103.98503039557389,1.3398560432442772],[103.98580504242307,1.3417286171903666],[103.9835684958817,1.3426734121936035],[103.983583,1.342772],[103.983691,1.343028],[103.983891,1.343501],[103.983783,1.343856],[103.984129,1.343961],[103.984026,1.344257],[103.983817,1.344347],[103.98423,1.345329],[103.98415,1.345913],[103.98415,1.345913],[103.98451944524408,1.346791860811539],[103.98493495319761,1.3466099688724271],[103.98503012886492,1.3465959003602783],[103.98510582249939,1.3466114463854497],[103.985247,1.346683],[103.985504,1.347296],[103.986192,1.347001],[103.9870399702827,1.3489902225591661],[103.99210440121716,1.3609279279595752],[103.9887700096493,1.362197288740075]]],type:"Polygon"},type:"Feature",properties:{}}]},Td={},Ed={},Rd={};Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.bytesToString=Rd.stringToBytes=Rd.NIL=Rd.X500=Rd.OID=Rd.URL=Rd.DNS=Rd.hexToByte=Rd.byteToHex=void 0;let Ld=[],Dd={};for(var Fd=0;Fd<256;Fd++)Ld[Fd]=(Fd+256).toString(16).substr(1),Dd[Ld[Fd]]=Fd;Rd.byteToHex=Ld,Rd.hexToByte=Dd,Rd.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Rd.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",Rd.OID="6ba7b812-9dad-11d1-80b4-00c04fd430c8",Rd.X500="6ba7b814-9dad-11d1-80b4-00c04fd430c8",Rd.NIL="00000000-0000-0000-0000-000000000000";Rd.stringToBytes=e=>{e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t};Rd.bytesToString=e=>{const t=new Uint8Array(e,0,e.byteLength);return String.fromCharCode.apply(null,Array.from(t))},Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.parse=void 0;const Od=Rd;Ed.parse=(e,t,n)=>{let r=t&&n||0,i=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,e=>(i<16&&t&&(t[r+i++]=Od.hexToByte[e]),""));i<16;)t[r+i++]=0;return t};var jd={};Object.defineProperty(jd,"__esModule",{value:!0}),jd.unparse=void 0;const Nd=Rd;jd.unparse=(e,t)=>{let n=t||0,r=Nd.byteToHex;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]};var Id={},zd={};Object.defineProperty(zd,"__esModule",{value:!0});zd.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;var Bd=ae&&ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Id,"__esModule",{value:!0}),Id.validate=void 0;const Ud=Bd(zd);Id.validate=e=>"string"==typeof e&&Ud.default.test(e);var Hd={};Object.defineProperty(Hd,"__esModule",{value:!0}),Hd.version=void 0;const Gd=Id;Hd.version=e=>{if(!(0,Gd.validate)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)};var Wd={},Vd={};Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.stringify=void 0;const qd=Id,Zd=[];for(let e=0;e<256;++e)Zd.push((e+256).toString(16).substr(1));Vd.stringify=(e,t=0)=>{const n=(Zd[e[t+0]]+Zd[e[t+1]]+Zd[e[t+2]]+Zd[e[t+3]]+"-"+Zd[e[t+4]]+Zd[e[t+5]]+"-"+Zd[e[t+6]]+Zd[e[t+7]]+"-"+Zd[e[t+8]]+Zd[e[t+9]]+"-"+Zd[e[t+10]]+Zd[e[t+11]]+Zd[e[t+12]]+Zd[e[t+13]]+Zd[e[t+14]]+Zd[e[t+15]]).toLowerCase();if(!(0,qd.validate)(n))throw TypeError("Stringified UUID is invalid");return n};var Yd={};Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.rng=void 0;Yd.rng=()=>{let e=new Uint8Array(16);for(let t=0;t<16;t++)e[t]=255&256*Math.random()+0;return e},Object.defineProperty(Wd,"__esModule",{value:!0}),Wd.v1=void 0;const $d=Vd,Kd=Yd;let Jd,Xd,Qd=0,ep=0;Wd.v1=(e,t,n=0)=>{let r=t&&n||0;const i=t||new Uint8Array(16);let o=e&&e.node?e.node:Jd,a=e&&e.clockseq?e.clockseq:Xd;if(null==o||null==a){const t=e&&e.random?e.random:e&&e.rng?e.rng():(0,Kd.rng)();null==o&&(o=Jd=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==a&&(a=Xd=16383&(t[6]<<8|t[7]))}let s=e&&e.msecs?e.msecs:Date.now(),l=e&&e.nsecs?e.nsecs:ep+1;const u=s-Qd+(l-ep)/1e4;if(u<0&&e&&!e.clockseq&&(a=a+1&16383),(u<0||s>Qd)&&e&&!e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Qd=s,ep=l,Xd=a,s+=122192928e5;const c=(1e4*(268435455&s)+l)%4294967296;i[r++]=c>>>24&255,i[r++]=c>>>16&255,i[r++]=c>>>8&255,i[r++]=255&c;const h=s/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=255&h,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=a>>>8|128,i[r++]=255&a;for(let e=0;e<6;++e)i[r+e]=o[e];return t||(0,$d.stringify)(i)};var tp={},np={};Object.defineProperty(np,"__esModule",{value:!0}),np.v35=void 0;const rp=Vd,ip=Ed,op=Rd;np.v35=(e,t,n)=>(e,r,i,o=0)=>{if("string"==typeof e&&(e=(0,op.stringToBytes)(e)),"string"==typeof r&&(r=(0,ip.parse)(r)),r&&16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=(0,op.stringToBytes)(n((0,op.bytesToString)(a.buffer))),a[6]=15&a[6]|t,a[8]=63&a[8]|128,i)for(let e=0;e<16;++e)i[o+e]=a[e];return i||(0,rp.stringify)(a)};var ap={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.any_hmac_md5=e.b64_hmac_md5=e.hex_hmac_md5=e.any_md5=e.b64_md5=e.hex_md5=void 0;let t=0,n="";e.hex_md5=e=>o(r(l(e))),e.default=e.hex_md5;e.b64_md5=e=>a(r(l(e)));e.any_md5=(e,t)=>s(r(l(e)),t);e.hex_hmac_md5=(e,t)=>o(i(l(e),l(t)));e.b64_hmac_md5=(e,t)=>a(i(l(e),l(t)));e.any_hmac_md5=(e,t,n)=>s(i(l(e),l(t)),n);const r=e=>c(h(u(e),8*e.length)),i=(e,t)=>{var n=u(e);n.length>16&&(n=h(n,8*e.length));let r=Array(16),i=Array(16);for(var o=0;o<16;o++)r[o]=909522486^n[o],i[o]=1549556828^n[o];var a=h(r.concat(u(t)),512+8*t.length);return c(h(i.concat(a),640))},o=e=>{for(var n,r=t?"0123456789ABCDEF":"0123456789abcdef",i="",o=0;o<e.length;o++)n=e.charCodeAt(o),i+=r.charAt(n>>>4&15)+r.charAt(15&n);return i},a=e=>{for(var t="",r=e.length,i=0;i<r;i+=3)for(var o=e.charCodeAt(i)<<16|(i+1<r?e.charCodeAt(i+1)<<8:0)|(i+2<r?e.charCodeAt(i+2):0),a=0;a<4;a++)8*i+6*a>8*e.length?t+=n:t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>>6*(3-a)&63);return t},s=(e,t)=>{var n,r,i,o,a,s=t.length,l=Array(Math.ceil(e.length/2));for(n=0;n<l.length;n++)l[n]=e.charCodeAt(2*n)<<8|e.charCodeAt(2*n+1);var u=Math.ceil(8*e.length/(Math.log(t.length)/Math.log(2))),c=Array(u);for(r=0;r<u;r++){for(a=[],o=0,n=0;n<l.length;n++)o=(o<<16)+l[n],o-=(i=Math.floor(o/s))*s,(a.length>0||i>0)&&(a[a.length]=i);c[r]=o,l=a}var h="";for(n=c.length-1;n>=0;n--)h+=t.charAt(c[n]);return h},l=e=>{for(var t,n,r="",i=-1;++i<e.length;)t=e.charCodeAt(i),n=i+1<e.length?e.charCodeAt(i+1):0,t>=55296&&t<=56319&&n>=56320&&n<=57343&&(t=65536+((1023&t)<<10)+(1023&n),i++),t<=127?r+=String.fromCharCode(t):t<=2047?r+=String.fromCharCode(192|t>>>6&31,128|63&t):t<=65535?r+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(r+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return r},u=e=>{let t=Array(e.length>>2);for(var n=0;n<t.length;n++)t[n]=0;for(n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<n%32;return t},c=e=>{for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>n%32&255);return t},h=(e,t)=>{e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,a=0;a<e.length;a+=16){var s=n,l=r,u=i,c=o;n=p(n,r,i,o,e[a+0],7,-680876936),o=p(o,n,r,i,e[a+1],12,-389564586),i=p(i,o,n,r,e[a+2],17,606105819),r=p(r,i,o,n,e[a+3],22,-1044525330),n=p(n,r,i,o,e[a+4],7,-176418897),o=p(o,n,r,i,e[a+5],12,1200080426),i=p(i,o,n,r,e[a+6],17,-1473231341),r=p(r,i,o,n,e[a+7],22,-45705983),n=p(n,r,i,o,e[a+8],7,1770035416),o=p(o,n,r,i,e[a+9],12,-1958414417),i=p(i,o,n,r,e[a+10],17,-42063),r=p(r,i,o,n,e[a+11],22,-1990404162),n=p(n,r,i,o,e[a+12],7,1804603682),o=p(o,n,r,i,e[a+13],12,-40341101),i=p(i,o,n,r,e[a+14],17,-1502002290),r=p(r,i,o,n,e[a+15],22,1236535329),n=f(n,r,i,o,e[a+1],5,-165796510),o=f(o,n,r,i,e[a+6],9,-1069501632),i=f(i,o,n,r,e[a+11],14,643717713),r=f(r,i,o,n,e[a+0],20,-373897302),n=f(n,r,i,o,e[a+5],5,-701558691),o=f(o,n,r,i,e[a+10],9,38016083),i=f(i,o,n,r,e[a+15],14,-660478335),r=f(r,i,o,n,e[a+4],20,-405537848),n=f(n,r,i,o,e[a+9],5,568446438),o=f(o,n,r,i,e[a+14],9,-1019803690),i=f(i,o,n,r,e[a+3],14,-187363961),r=f(r,i,o,n,e[a+8],20,1163531501),n=f(n,r,i,o,e[a+13],5,-1444681467),o=f(o,n,r,i,e[a+2],9,-51403784),i=f(i,o,n,r,e[a+7],14,1735328473),r=f(r,i,o,n,e[a+12],20,-1926607734),n=g(n,r,i,o,e[a+5],4,-378558),o=g(o,n,r,i,e[a+8],11,-2022574463),i=g(i,o,n,r,e[a+11],16,1839030562),r=g(r,i,o,n,e[a+14],23,-35309556),n=g(n,r,i,o,e[a+1],4,-1530992060),o=g(o,n,r,i,e[a+4],11,1272893353),i=g(i,o,n,r,e[a+7],16,-155497632),r=g(r,i,o,n,e[a+10],23,-1094730640),n=g(n,r,i,o,e[a+13],4,681279174),o=g(o,n,r,i,e[a+0],11,-358537222),i=g(i,o,n,r,e[a+3],16,-722521979),r=g(r,i,o,n,e[a+6],23,76029189),n=g(n,r,i,o,e[a+9],4,-640364487),o=g(o,n,r,i,e[a+12],11,-421815835),i=g(i,o,n,r,e[a+15],16,530742520),r=g(r,i,o,n,e[a+2],23,-995338651),n=m(n,r,i,o,e[a+0],6,-198630844),o=m(o,n,r,i,e[a+7],10,1126891415),i=m(i,o,n,r,e[a+14],15,-1416354905),r=m(r,i,o,n,e[a+5],21,-57434055),n=m(n,r,i,o,e[a+12],6,1700485571),o=m(o,n,r,i,e[a+3],10,-1894986606),i=m(i,o,n,r,e[a+10],15,-1051523),r=m(r,i,o,n,e[a+1],21,-2054922799),n=m(n,r,i,o,e[a+8],6,1873313359),o=m(o,n,r,i,e[a+15],10,-30611744),i=m(i,o,n,r,e[a+6],15,-1560198380),r=m(r,i,o,n,e[a+13],21,1309151649),n=m(n,r,i,o,e[a+4],6,-145523070),o=m(o,n,r,i,e[a+11],10,-1120210379),i=m(i,o,n,r,e[a+2],15,718787259),r=m(r,i,o,n,e[a+9],21,-343485551),n=v(n,s),r=v(r,l),i=v(i,u),o=v(o,c)}return[n,r,i,o]},d=(e,t,n,r,i,o)=>v(y(v(v(t,e),v(r,o)),i),n),p=(e,t,n,r,i,o,a)=>d(t&n|~t&r,e,t,i,o,a),f=(e,t,n,r,i,o,a)=>d(t&r|n&~r,e,t,i,o,a),g=(e,t,n,r,i,o,a)=>d(t^n^r,e,t,i,o,a),m=(e,t,n,r,i,o,a)=>d(n^(t|~r),e,t,i,o,a),v=(e,t)=>{var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},y=(e,t)=>e<<t|e>>>32-t}(ap);var sp=ae&&ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tp,"__esModule",{value:!0}),tp.v3=void 0;const lp=np,up=sp(ap);tp.v3=(0,lp.v35)("v3",48,up.default);var cp={};Object.defineProperty(cp,"__esModule",{value:!0}),cp.v4=void 0;const hp=jd,dp=Yd;cp.v4=function(e,t,n){let r=t&&n||0,i=(0,dp.rng)();if(!e||e instanceof String||(e.random&&(i=e.random),e.rng&&(i=e.rng())),i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;o++)t[r+o]=i[o];return t||(0,hp.unparse)(i)};var pp={},fp={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.any_hmac_sha1=e.b64_hmac_sha1=e.hex_hmac_sha1=e.any_sha1=e.b64_sha1=e.hex_sha1=void 0;let t=0,n="";e.hex_sha1=e=>o(r(l(e))),e.default=e.hex_sha1;e.b64_sha1=e=>a(r(l(e)));e.any_sha1=(e,t)=>s(r(l(e)),t);e.hex_hmac_sha1=(e,t)=>o(i(l(e),l(t)));e.b64_hmac_sha1=(e,t)=>a(i(l(e),l(t)));e.any_hmac_sha1=(e,t,n)=>s(i(l(e),l(t)),n);const r=e=>c(h(u(e),8*e.length)),i=(e,t)=>{let n=u(e);n.length>16&&(n=h(n,8*e.length));let r=Array(16),i=Array(16);for(var o=0;o<16;o++)r[o]=909522486^n[o],i[o]=1549556828^n[o];var a=h(r.concat(u(t)),512+8*t.length);return c(h(i.concat(a),672))},o=e=>{for(var n,r=t?"0123456789ABCDEF":"0123456789abcdef",i="",o=0;o<e.length;o++)n=e.charCodeAt(o),i+=r.charAt(n>>>4&15)+r.charAt(15&n);return i},a=e=>{for(var t="",r=e.length,i=0;i<r;i+=3)for(var o=e.charCodeAt(i)<<16|(i+1<r?e.charCodeAt(i+1)<<8:0)|(i+2<r?e.charCodeAt(i+2):0),a=0;a<4;a++)8*i+6*a>8*e.length?t+=n:t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>>6*(3-a)&63);return t},s=(e,t)=>{var n,r,i,o,a=t.length,s=[],l=Array(Math.ceil(e.length/2));for(n=0;n<l.length;n++)l[n]=e.charCodeAt(2*n)<<8|e.charCodeAt(2*n+1);for(;l.length>0;){for(o=[],i=0,n=0;n<l.length;n++)i=(i<<16)+l[n],i-=(r=Math.floor(i/a))*a,(o.length>0||r>0)&&(o[o.length]=r);s[s.length]=i,l=o}var u="";for(n=s.length-1;n>=0;n--)u+=t.charAt(s[n]);var c=Math.ceil(8*e.length/(Math.log(t.length)/Math.log(2)));for(n=u.length;n<c;n++)u=t[0]+u;return u},l=e=>{for(var t,n,r="",i=-1;++i<e.length;)t=e.charCodeAt(i),n=i+1<e.length?e.charCodeAt(i+1):0,t>=55296&&t<=56319&&n>=56320&&n<=57343&&(t=65536+((1023&t)<<10)+(1023&n),i++),t<=127?r+=String.fromCharCode(t):t<=2047?r+=String.fromCharCode(192|t>>>6&31,128|63&t):t<=65535?r+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(r+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return r},u=e=>{for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t},c=e=>{for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t},h=(e,t)=>{e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n=Array(80),r=1732584193,i=-271733879,o=-1732584194,a=271733878,s=-1009589776,l=0;l<e.length;l+=16){for(var u=r,c=i,h=o,m=a,v=s,y=0;y<80;y++){n[y]=y<16?e[l+y]:g(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);let t=f(f(g(r,5),d(y,i,o,a)),f(f(s,n[y]),p(y)));s=a,a=o,o=g(i,30),i=r,r=t}r=f(r,u),i=f(i,c),o=f(o,h),a=f(a,m),s=f(s,v)}return[r,i,o,a,s]},d=(e,t,n,r)=>e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r,p=e=>e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514,f=(e,t)=>{var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},g=(e,t)=>e<<t|e>>>32-t}(fp);var gp=ae&&ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pp,"__esModule",{value:!0}),pp.v5=void 0;const mp=np,vp=gp(fp);pp.v5=(0,mp.v35)("v5",80,vp.default),Object.defineProperty(Td,"__esModule",{value:!0});const yp=Ed,wp=jd,bp=Id,_p=Hd,xp=Wd,Sp=tp,Ap=cp,Pp=pp,Mp=Rd;var Cp,kp=Td.default={parse:yp.parse,unparse:wp.unparse,validate:bp.validate,version:_p.version,v1:xp.v1,v3:Sp.v3,v4:Ap.v4,v5:Pp.v5,NIL:Mp.NIL,DNS:Mp.DNS,URL:Mp.URL,OID:Mp.OID,X500:Mp.X500},Tp=r.forwardRef(function(e,t){var n=e.cameraRef,o=e.metaAtlasCoreRef,a=r.useRef([]),s=r.useState(0)[1],l=function(){s(function(e){return e+1})};return r.useImperativeHandle(t,function(){return{dropPin:function(e,t,n){return void 0===n&&(n=!0),x(this,void 0,void 0,function(){var i,s,u;return S(this,function(c){return i=function(e){return o.current.getMidPointOfFeature(e)}(e),r.isValidElement(t)?(s="",n&&a.current.length>0?(a.current[a.current.length-1]=_(_({},a.current[a.current.length-1]),{coordinates:i,customElement:t,isVisible:!0}),s=a.current[a.current.length-1].id):(u={id:kp.v4(),coordinates:i,customElement:t,isVisible:!0},s=u.id,a.current.push(u)),l(),[2,s]):(console.warn("Invalid react element passed to dropPin function"),[2,""])})})},hidePin:function(e){var t;if(void 0===e&&(e="-1"),"-1"===e){var n=a.current[a.current.length-1];if(!n)return void console.warn("No pins available to hide.");t=n.id}else t=e;var r=a.current.findIndex(function(e){return e.id===t});-1!==r?(a.current[r]=_(_({},a.current[r]),{isVisible:!1}),l()):console.warn("Pin with ID: ".concat(t," not found."))},hidePins:function(){a.current=a.current.map(function(e){return _(_({},e),{isVisible:!1})}),l()},showPin:function(e){return void 0===e&&(e="-1"),x(this,void 0,void 0,function(){var t,n,r;return S(this,function(i){if("-1"===e){if(!(n=a.current[a.current.length-1]))return console.warn("No pins available to show."),[2];t=n.id}else t=e;return-1===(r=a.current.findIndex(function(e){return e.id===t}))?(console.warn("Pin with ID: ".concat(t," not found.")),[2]):(a.current[r]=_(_({},a.current[r]),{isVisible:!0}),l(),[2])})})},showPins:function(){a.current=a.current.map(function(e){return _(_({},e),{isVisible:!0})}),l()},clearPin:function(e){var t;if(void 0===e&&(e="-1"),"-1"===e){if((t=a.current.length-1)<0)return void console.warn("No pins available to clear.")}else if(-1===(t=a.current.findIndex(function(t){return t.id===e})))return void console.warn("Pin with ID: ".concat(e," not found."));a.current.splice(t,1),l()},clearPins:function(){a.current=[],l()},fitViewToPins:function(e,t){var r;if(void 0===t&&(t=50),0!==a.current.length){var i=a.current.filter(function(t){return!!e.includes(t.id)});if(0!==i.length){for(var o=i[0].coordinates,s=new Md(o[0],o[1]),l=new Md(o[0],o[1]),u=new Cd(s,l),c=0;c<i.length;c++){var h=i[c];u.extend(h.coordinates)}var d=u.toArray();null===(r=null==n?void 0:n.current)||void 0===r||r.fitBounds([d[0][0],d[0][1],d[1][0],d[1][1]],{padding:{top:t,right:t,bottom:t,left:t},duration:1e3})}else console.warn("No pins to fit on the map.")}else console.warn("No pins to fit on the map.")}}}),f.default.createElement(f.default.Fragment,null,a.current.map(function(e){return e.isVisible&&r.isValidElement(e.customElement)&&f.default.createElement(i.MarkerView,{key:e.id,coordinate:e.coordinates},e.customElement)}))});Tp.displayName="MarkerOverlayContainer",function(e){e.Offline="offline",e.Online="online"}(Cp||(Cp={}));var Ep=function(e){var t=e.isOffline,n=e.tileServer,o=e.props,a=r.useState(""),s=a[0],l=a[1];return r.useEffect(function(){var e;try{if(!ic||"function"!=typeof ic.getState)return void console.error("Invalid useMBTilesDataStore provided");var r=null===(e=ic.getState())||void 0===e?void 0:e.data;if(t&&!r)return void console.warn("Offline mode enabled but no MBTiles data available");var i=t&&r?"mbtiles://".concat(r):n;if(!i||"string"!=typeof i)return void console.error("Invalid source URL");l(i)}catch(e){console.error("Error setting up vector source:",e)}},[t,o]),""===s?null:f.default.createElement(i.VectorSource,{id:"custom",key:t?"offline":"online",url:s})};Object.defineProperty(exports,"Animated",{enumerable:!0,get:function(){return i.Animated}}),Object.defineProperty(exports,"CircleLayer",{enumerable:!0,get:function(){return i.CircleLayer}}),Object.defineProperty(exports,"FillLayer",{enumerable:!0,get:function(){return i.FillLayer}}),Object.defineProperty(exports,"GeoJSONSource",{enumerable:!0,get:function(){return i.ShapeSource}}),Object.defineProperty(exports,"ImageSource",{enumerable:!0,get:function(){return i.ImageSource}}),Object.defineProperty(exports,"Images",{enumerable:!0,get:function(){return i.Images}}),Object.defineProperty(exports,"LineLayer",{enumerable:!0,get:function(){return i.LineLayer}}),Object.defineProperty(exports,"Marker",{enumerable:!0,get:function(){return i.MarkerView}}),Object.defineProperty(exports,"MarkerView",{enumerable:!0,get:function(){return i.MarkerView}}),Object.defineProperty(exports,"RasterSource",{enumerable:!0,get:function(){return i.RasterSource}}),Object.defineProperty(exports,"ShapeSource",{enumerable:!0,get:function(){return i.ShapeSource}}),Object.defineProperty(exports,"SymbolLayer",{enumerable:!0,get:function(){return i.SymbolLayer}}),Object.defineProperty(exports,"VectorSource",{enumerable:!0,get:function(){return i.VectorSource}}),exports.MetaAtlasSDK=function(e){var n=this,o=t.StyleSheet.create({page:{flex:1,backgroundColor:"#F5FCFF",alignItems:"center",justifyContent:e.isFullHeight?"center":"flex-start"},map:{flex:1,alignSelf:"stretch",maxHeight:e.isFullHeight?void 0:e.maxMapHeight}}),a=r.useRef(null);a.current||(a.current=new Pd);var s=a.current,l=r.useRef(s.mapDataService),u=r.useRef(null),c=r.useRef(null),h=r.useRef(null),d=r.useRef(s.userLocation),p=r.useRef(null),g=r.useRef(null),m=r.useRef(null),w=r.useRef(null),b=r.useRef(15.5),_=r.useRef(0),A=r.useRef(0),P=r.useRef(null);P.current||(P.current=H({getCamera:function(){return c.current},getZoom:function(){return b.current},getViewport:function(){return{width:A.current,height:_.current}}}));var M=function(e){var t,n=null===(t=e.nativeEvent)||void 0===t?void 0:t.zoom;"number"==typeof n&&Number.isFinite(n)&&(b.current=n)},C=r.useRef(!1),k=r.useRef(!1),T=r.useRef(!1),E=r.useRef(!1),R=r.useState(!1),L=R[0],D=R[1],F=r.useRef(null),O=r.useState({center:[103.8218,1.2564],zoom:15.5,bearing:0}),j=O[0],N=O[1],I=r.useState(""),z=I[0],W=I[1],V=r.useRef(""),q=function(e){var t=JSON.stringify(e);V.current=t,W(t)},Z=r.useRef(Hs),Y=r.useRef(Gs),$=r.useRef(Ws),K=r.useRef(Vs),X=r.useState(!1),Q=X[0],ee=X[1],te=r.useState(!1),ne=te[0],re=te[1],ie=r.useState(null),oe=ie[0],ae=ie[1],se=r.useState(!1),le=se[0],ue=se[1],ce="https://atoms.sandbox.spatialverse.online/sdk/2.1.2-sandbox/",he="https://atoms-map-tiles-middleware.sandbox.spatialverse.online/".concat(e.tileserverRoleName,"/latest/geojson?accessToken=").concat(e.accessToken),de=e.onNetworkModeUpdate?e.onNetworkModeUpdate:function(){},pe=function(){return x(n,void 0,void 0,function(){var t,n,r=this;return S(this,function(i){switch(i.label){case 0:return t=function(){return x(r,void 0,void 0,function(){var e;return S(this,function(t){switch(t.label){case 0:return[4,ge()];case 1:return e=t.sent(),re(e),de(e?Cp.Offline:Cp.Online),[2]}})})},l.current.getOfflineMapStatus()===tc.Ready?[3,2]:(n=function(n){return x(r,void 0,void 0,function(){return S(this,function(r){return e.onOfflineMapsStatusUpdate(n),n&&t(),[2]})})},[4,l.current.setupOfflineMaps(n)]);case 1:return i.sent(),[3,3];case 2:t(),i.label=3;case 3:return[2]}})})},fe=function(){return x(n,void 0,void 0,function(){var e,t,n=this;return S(this,function(r){switch(r.label){case 0:return e=function(){return x(n,void 0,void 0,function(){var e,t;return S(this,function(n){switch(n.label){case 0:e="".concat(v.default.DocumentDirectoryPath,"/extracted/"),n.label=1;case 1:return n.trys.push([1,5,,6]),[4,v.default.exists(e)];case 2:return n.sent()?[4,Ul(e)]:[3,4];case 3:n.sent(),de(Cp.Online),console.log("Unzipped files deleted from: ".concat(e)),n.label=4;case 4:return[3,6];case 5:return t=n.sent(),console.error("Error during cleanup:",t),[3,6];case 6:return[2]}})})},[4,e()];case 1:return r.sent(),t=JSON.parse(z),Hs.sprite&&Hs.glyphs&&(t.glyphs=Z.current.glyphs,t.sprite=Z.current.sprite),q(t),re(!1),ic.setState({data:""}),l.current.offlineMapStatus=tc.Awaiting,de(Cp.Online),[2]}})})},ge=function(){return x(n,void 0,void 0,function(){var e,t,n,r,i,o,a,s,l;return S(this,function(u){switch(u.label){case 0:e=ic.getState().data,t=oc.getState().data,n=JSON.parse(z),u.label=1;case 1:return u.trys.push([1,8,,9]),console.log("Paths Here:",e,t),(r=e)?[4,v.default.exists(e)]:[3,3];case 2:r=u.sent(),u.label=3;case 3:return r?(console.log("MBTiles path set:",e),i="".concat(t,"fonts"),(o=t)?[4,v.default.exists(i)]:[3,5]):(console.error("MBTiles file not found:",e),[2,!1]);case 4:o=u.sent(),u.label=5;case 5:return o?(console.log("Fonts path set:",i),n.glyphs="file://".concat(i,"/{fontstack}/{range}.pbf"),a="".concat(t,"sprites"),(s=t)?[4,v.default.exists(a)]:[3,7]):(console.error("Fonts directory not found:",i),[2,!1]);case 6:s=u.sent(),u.label=7;case 7:return s?(console.log("Sprites path set:",a),n.sprite="file://".concat(a,"/sprites"),q(n),[2,!0]):(console.error("Sprites directory not found:",a),[2,!1]);case 8:return l=u.sent(),console.error("Error setting up MBTiles, Fonts, and Sprites:",l),[2,!1];case 9:return[2]}})})},me=function(){var e,t,n;null===(e=a.current)||void 0===e||e.attach({style:{readLayers:function(){var e=V.current;if(!e)return[];try{var t=JSON.parse(e);return Array.isArray(t.layers)?t.layers:[]}catch(e){return[]}},commitLayers:function(e){var t,n=V.current;try{t=n?JSON.parse(n):{layers:[]}}catch(e){t={layers:[]}}t.layers=e,q(t)}},camera:null!==(t=P.current)&&void 0!==t?t:void 0,sensors:h.current&&p.current?{gps:h.current,compass:p.current,motion:w.current}:void 0,marker:null!==(n=g.current)&&void 0!==n?n:void 0,routingDisplay:{setDisplayRoute:function(e){var t;null===(t=m.current)||void 0===t||t.setDisplayRoute(e)},getDisplayRoute:function(){var e,t;return null!==(t=null===(e=m.current)||void 0===e?void 0:e.getDisplayRoute())&&void 0!==t?t:null},setPatchFeatures:function(e){var t;null===(t=m.current)||void 0===t||t.setPatchFeatures(e)},setAnimatedCoordinates:function(e){var t;null===(t=m.current)||void 0===t||t.setAnimatedCoordinates(e)},clear:function(){var e;null===(e=m.current)||void 0===e||e.clear()}}})};r.useEffect(function(){var e,t;null===(e=a.current)||void 0===e||e.bootstrap(),h.current||(h.current=new B),p.current||(p.current=new U),w.current||(w.current=new J),me();var n=null===(t=a.current)||void 0===t?void 0:t.focusManager.subscribeToFocusChange(function(e){var t;null===(t=m.current)||void 0===t||t.filterRoutingLayersWhereDimension(e)});return function(){var e,t,r,i,o;null==n||n(),C.current=!1;try{null===(t=null===(e=h.current)||void 0===e?void 0:e.destroyGPS)||void 0===t||t.call(e)}catch(e){}try{null===(i=null===(r=p.current)||void 0===r?void 0:r.destroy)||void 0===i||i.call(r)}catch(e){}try{null===(o=a.current)||void 0===o||o.detach()}catch(e){}}},[]),r.useEffect(function(){var e=y.default.addEventListener(function(e){ae(e.isConnected)});return function(){try{e&&e()}catch(e){}}},[]),r.useEffect(function(){var t=function(){return x(n,void 0,void 0,function(){var t,n,r=this;return S(this,function(i){switch(i.label){case 0:return t=function(t){return x(r,void 0,void 0,function(){var n,r,i,o,a;return S(this,function(s){switch(s.label){case 0:return s.trys.push([0,5,,6]),n="".concat(ce+t),[4,fetch(n)];case 1:return r=s.sent(),(i=r.headers.get("Content-Type"))&&i.includes("application/json")?[4,r.json()]:[3,3];case 2:return o=s.sent(),l=o,u=e.secretKey,function(e,t){x(void 0,void 0,void 0,function(){var n;return S(this,function(r){switch(r.label){case 0:n="".concat(v.default.DocumentDirectoryPath+"/"+t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,v.default.writeFile(n,e,"utf8")];case 2:return r.sent(),[3,4];case 3:return r.sent(),console.error("failed to save file to local storage",t),[3,4];case 4:return[2]}})})}(Il.AES.encrypt(JSON.stringify(l),u).toString(),t),[2,o];case 3:return console.warn("Invalid Content-Type: expected JSON but received ".concat(i," for URL: ").concat(n)),[2,Bl(t,e.secretKey)];case 4:return[3,6];case 5:return a=s.sent(),console.error("Error fetching or parsing JSON for ".concat(t,":"),a),[2,Bl(t,e.secretKey)];case 6:return[2]}var l,u})})},n=function(){return x(r,void 0,void 0,function(){var n,r,i,o,a;return S(this,function(s){switch(s.label){case 0:return s.trys.push([0,7,,8]),[4,t("combined_style.json")];case 1:return n=s.sent(),Z.current=null!==n?n:Z.current,[4,t("customerLayer.json")];case 2:return r=s.sent(),Y.current=r.length>0?r:Y.current,"firealarmteam"!==e.tileserverRoleName?[3,4]:[4,t("firealarmstyles.json")];case 3:i=s.sent(),$.current=i.length>0?i:$.current,s.label=4;case 4:return"airside"!==e.tileserverRoleName?[3,6]:[4,t("airsideLayers.json")];case 5:o=s.sent(),K.current=o.length>0?o:K.current,s.label=6;case 6:return[3,8];case 7:return a=s.sent(),console.error("Error fetching styles:",a),[3,8];case 8:return[2]}})})},[4,n()];case 1:return i.sent(),[2]}})})},r=!1;y.default.addEventListener(function(e){return x(n,void 0,void 0,function(){return S(this,function(n){switch(n.label){case 0:return r?[3,3]:(r=!0,e.isConnected?[4,t()]:[3,2]);case 1:n.sent(),n.label=2;case 2:ee(!0),n.label=3;case 3:return[2]}})})})},[e.secretKey,e.tileserverRoleName]),r.useEffect(function(){if(Q){var t=function(e,t,n){var r=e.layers,i=r.findIndex(function(e){return e.id===t}),o=r.findIndex(function(e){return e.id===n});if(-1===i||-1===o)throw new Error("One or both layer IDs not found.");var a=r.splice(i,1)[0],s=i<o?o-1:o;return r.splice(s,0,a),e},n=Do(Z.current);if(function(e,t,n){var r=e.layers,i=r.findIndex(function(e){return e.id===n});if(-1===i)throw new Error("Target layer ID not found.");r.splice(i,0,t)}(n,{id:"airside-boundary",type:"fill",source:"boundary",paint:{"fill-color":"#e2e6ee"}},"highway_major_casing"),t(n,"landcover_grass","highway_major_casing"),t(n,"water","highway_major_casing"),("changi"===e.tileserverRoleName||"changipublic-airside"===e.tileserverRoleName)&&K.current&&K.current.length>0){for(var r=0;r<Y.current.length;r++){(i=Do(Y.current[r]))["source-layer"]="geojson",n.layers.push(i)}for(r=0;r<K.current.length;r++){(i=Do(K.current[r]))["source-layer"]="geojson",n.layers.push(i)}}else if("airside"===e.tileserverRoleName&&K.current&&K.current.length>0)for(r=0;r<K.current.length;r++){(i=Do(K.current[r]))["source-layer"]="geojson",n.layers.push(i)}else if("firealarmteam"===e.tileserverRoleName&&$.current&&$.current.length>0){for(r=0;r<Y.current.length;r++){(i=Do(Y.current[r]))["source-layer"]="geojson",n.layers.push(i)}for(r=0;r<$.current.length;r++){(i=Do($.current[r]))["source-layer"]="geojson",n.layers.push(i)}}else for(r=0;r<Y.current.length;r++){var i;(i=Do(Y.current[r]))["source-layer"]="geojson",n.layers.push(i)}q(n)}},[e.tileserverRoleName,Q]),r.useEffect(function(){l.current.init("https://atoms-api.sandbox.spatialverse.online",e.accessToken,e.secretKey,ce,e.tileserverRoleName)},[e.accessToken]),r.useEffect(function(){console.log(oe,"isNetworkConnected");var t,r=e.onRoutingStatusUpdate?e.onRoutingStatusUpdate:function(){},i=e.onSearchStatusUpdate?e.onSearchStatusUpdate:function(){};null!==oe&&(oe?l.current.getAtomsAPIAccessToken(function(e){return x(n,void 0,void 0,function(){var t,n,o,s,u,c;return S(this,function(h){switch(h.label){case 0:return k.current=!0,e.authenticated?[4,l.current.setupFocusTree()]:[3,2];case 1:return h.sent(),(t=xs()).length>0&&(n=t[0].taxonomyPath,(null==(o=l.current.getFlyToLocation(n,!0))?void 0:o.center)&&N({center:o.center,zoom:null!==(s=o.zoom)&&void 0!==s?s:15.5,bearing:null!==(u=o.bearing)&&void 0!==u?u:0}),null===(c=a.current)||void 0===c||c.focusManager.commit(n,{moveCamera:!0})),l.current.getRoutingStatus()!==tc.Ready&&l.current.setupRouting(r),l.current.getSearchStatus()!==tc.Ready&&l.current.setupMapObjectSearch(i),we(),[3,3];case 2:be("Failed to authenticate token"),h.label=3;case 3:return[2]}})})}):(l.current.getRoutingStatus()!==tc.Ready&&l.current.setupRouting(r),l.current.getSearchStatus()!==tc.Ready&&l.current.setupMapObjectSearch(i),we()),le&&(t=oe,x(n,void 0,void 0,function(){return S(this,function(e){return t?ne&&fe():pe(),[2]})})))},[oe,le]);var ve=s.routingManager,ye=function(){return!0===C.current&&null!==u.current};r.useImperativeHandle(e.ref,function(){var t={getZoom:function(){var e;return x(this,void 0,void 0,function(){return S(this,function(t){switch(t.label){case 0:return ye()?[4,null===(e=u.current)||void 0===e?void 0:e.getZoom()]:[2,null];case 1:return[2,t.sent()]}})})},getCenter:function(){var e;return x(this,void 0,void 0,function(){return S(this,function(t){switch(t.label){case 0:return ye()?[4,null===(e=u.current)||void 0===e?void 0:e.getCenter()]:[2,null];case 1:return[2,t.sent()]}})})},getBearing:function(){var e;return x(this,void 0,void 0,function(){return S(this,function(t){switch(t.label){case 0:return ye()?[4,null===(e=u.current)||void 0===e?void 0:e.getBearing()]:[2,null];case 1:return[2,t.sent()]}})})},moveTo:function(e,t){var n;ye()&&(null===(n=c.current)||void 0===n||n.easeTo({center:e,easing:"ease",duration:t}))},zoomTo:function(e,t){var n;ye()&&(null===(n=c.current)||void 0===n||n.zoomTo(e,{duration:t,easing:"ease"}))},setupOfflineMaps:function(t){return x(this,void 0,void 0,function(){return S(this,function(n){switch(n.label){case 0:return l.current.getOfflineMapStatus()===tc.Ready?[3,2]:[4,l.current.setupOfflineMaps(e.onOfflineMapsStatusUpdate,t)];case 1:n.sent(),n.label=2;case 2:return[2]}})})},toggleMapMode:function(e){return x(this,void 0,void 0,function(){return S(this,function(t){return ue(!1),e===Cp.Offline?pe():e===Cp.Online&&fe(),[2]})})},focusTo:function(e,t){var n;void 0===t&&(t=!0),e&&(null===(n=a.current)||void 0===n||n.focusManager.commit(e,{moveCamera:t}))},subscribeToFocusChange:function(e){var t,n;return null!==(n=null===(t=a.current)||void 0===t?void 0:t.focusManager.subscribeToFocusChange(e))&&void 0!==n?n:function(){}},styleRouteLineLayer:function(e){var t;null===(t=m.current)||void 0===t||t.styleRouteLineLayer(e)},filterLayersByType:function(e,t,n){void 0===e&&(e=[]),void 0===n&&(n="");var r=JSON.parse(z),i=function(e,t,n,r){if(n){for(var i=0;i<e.length;i+=1){var o=void 0,a=e[i].filter;if(o=r?["case",["!",["in",["get",t],["literal",n]]],!0,["all",["in",["get",t],["literal",n]],["!=",["geometry-type"],r]],!0,!1]:["!",["in",["get",t],["literal",n]]],a){for(var s=!1,l=0;l<a.length;l+=1){var u=a[l];if(r){if("case"===u[0]&&Array.isArray(u[1])&&Array.isArray(u[3])&&Array.isArray(u[3][1])&&Array.isArray(u[3][1])&&Array.isArray(u[3][1][1])&&Array.isArray(u[3][1][2])&&Array.isArray(u[3][2])&&u[3][1][1][1]===t&&u[3][2][2]===r){u[1][1][2]=["literal",n],u[1][1][1]=["get",t],u[3][1][2]=["literal",n],u[3][1][1]=["get",t],u[3][2][2]=r,s=!0;break}}else if(Array.isArray(u[1])&&Array.isArray(u[1][1])&&"!"===u[0]&&u[1][1][1]===t){u[0]="!",u[1][2]=["literal",n],s=!0;break}}s||(console.log("pushing: ",n,t),a.push(o))}}return e}}(r.layers,t,e,n);r.layers=i,q(r)},styleLayersByType:function(e,t,n,r){var i=JSON.parse(z),o=function(e,t,n,r,i){if(n){for(var o=0;o<e.length;o+=1){var a=e[o],s=a.paint,l=a.type;if((l&&"fill"===l||"line"===l)&&s[r]){var u=s[r];if(u){var c=Ls(u,t,n,i);s[r]=c}}}return e}}(i.layers,t,e,n,r);i.layers=o,q(i)},clearStyleLayersByType:function(e,t,n){var r=JSON.parse(z),i=function(e,t,n,r){for(var i=0;i<e.length;i+=1){var o=e[i],a=o.paint,s=o.type;if((s&&"fill"===s||"line"===s)&&a[r]){var l=a[r];if(l){var u=Ds(l,t,n);a[r]=u}}}return e}(r.layers,e,t,n);r.layers=i,q(r)},flyTo:function(e,t){var n,r,i,o;return void 0===t&&(t=!0),x(this,void 0,void 0,function(){var a,s,l,h,d;return S(this,function(p){switch(p.label){case 0:return ye()?(t||this.clearPins(),[4,null===(n=u.current)||void 0===n?void 0:n.getCenter()]):[2];case 1:return(a=p.sent())?(s=e.center?e.center:a,e.zoomLevel?(h=e.zoomLevel,[3,4]):[3,2]):[2];case 2:return[4,null===(r=u.current)||void 0===r?void 0:r.getZoom()];case 3:h=p.sent(),p.label=4;case 4:return l=h,d=2*zo(a,s,{units:"meters"}),null!==e.bearing?null===(i=c.current)||void 0===i||i.setStop({center:s,zoom:l,duration:d,bearing:e.bearing,easing:"fly"}):null===(o=c.current)||void 0===o||o.setStop({center:s,zoom:l,duration:d,easing:"fly"}),[2]}})})},getFocusTree:function(){return l.current.getFocusTree()},getWhatTaxonomies:function(){return l.current.getWhatTaxonomies()},getCurrentFocus:function(){return l.current.getCurrentFocus()},getCurrentFocusBuilding:function(){return l.current.getCurrentFocusBuilding()},getCurrentFocusFloor:function(){return l.current.getCurrentFocusFloor()},getRootNodes:function(){return xs()},getChildNodes:function(e){return function(e){return Ms(e,1)}(e)},getNodesAtDepth:function(e,t){return Ms(e,t)},getNodeDepth:function(e){return function(e){if(!e)return null;var t=null;return _s(ys(),function(n,r){n.taxonomyPath===e&&(t=r)}),t}(e)},getSubtreeMaxRelativeDepth:function(e){return Cs(e)},getSelectorTierCount:function(e){return function(e){return Cs(e)+1}(e)},findNodeByTaxonomy:function(e){return Ss(e)},getAncestors:function(e){return As(e)},getLastClickedFeature:function(){return l.current.getLastClickedFeature()},getAllMapObjects:function(){var e;return(e=l.current).getAllMapObjects.apply(e,arguments)},getMapObjectsByName:function(){var e;return(e=l.current).getMapObjectsByName.apply(e,arguments)},getMapObjectById:function(){var e;return(e=l.current).getMapObjectById.apply(e,arguments)},getMapObjectByLocalRef:function(){var e;return(e=l.current).getMapObjectByLocalRef.apply(e,arguments)},getMapObjectsByWhatTaxonomy:function(){var e;return(e=l.current).getMapObjectsByWhatTaxonomy.apply(e,arguments)},getMapObjectsByWhereTaxonomy:function(){var e;return(e=l.current).getMapObjectsByWhereTaxonomy.apply(e,arguments)},getMapObjectsByWhatAndWhereTaxonomy:function(){var e;return(e=l.current).getMapObjectsByWhatAndWhereTaxonomy.apply(e,arguments)},getMapObjectsInWhatTaxonomy:function(){var e;return(e=l.current).getMapObjectsInWhatTaxonomy.apply(e,arguments)},getMapObjectsInWhereTaxonomy:function(){var e;return(e=l.current).getMapObjectsInWhereTaxonomy.apply(e,arguments)},getMapObjectsInWhatAndWhereTaxonomy:function(){var e;return(e=l.current).getMapObjectsInWhatAndWhereTaxonomy.apply(e,arguments)},getMidPointOfFeature:function(e){return l.current.getMidPointOfFeature(e)},dropPin:function(e,t,n){var r;return void 0===n&&(n=!0),x(this,void 0,void 0,function(){return S(this,function(i){switch(i.label){case 0:return[4,null===(r=F.current)||void 0===r?void 0:r.dropPin(e,t,n)];case 1:return[2,i.sent()||""]}})})},hidePin:function(e){var t;void 0===e&&(e="-1"),null===(t=F.current)||void 0===t||t.hidePin(e)},hidePins:function(){var e;null===(e=F.current)||void 0===e||e.hidePins()},showPin:function(e){var t;return void 0===e&&(e="-1"),x(this,void 0,void 0,function(){return S(this,function(n){switch(n.label){case 0:return[4,null===(t=F.current)||void 0===t?void 0:t.showPin(e)];case 1:return n.sent(),[2]}})})},showPins:function(){var e;null===(e=F.current)||void 0===e||e.showPins()},clearPin:function(e){var t;void 0===e&&(e="-1"),null===(t=F.current)||void 0===t||t.clearPin(e)},clearPins:function(){var e;null===(e=F.current)||void 0===e||e.clearPins()},fitViewToPins:function(e,t){var n;void 0===t&&(t=50),ye()&&(null===(n=F.current)||void 0===n||n.fitViewToPins(e,t))},fitViewToFeatures:function(e,t){var n;if(void 0===t&&(t=50),ye())if(0!==e.length){for(var r=e[0].coordinates,i=new Md(r[0],r[1]),o=new Md(r[0],r[1]),a=new Cd(i,o),s=0;s<e.length;s++){var l=e[s];a.extend(l.coordinates)}var u=a.toArray();null===(n=c.current)||void 0===n||n.fitBounds([u[0][0],u[0][1],u[1][0],u[1][1]],{padding:{top:t,right:t,bottom:t,left:t},duration:1e3})}else console.warn("No pins to fit on the map.")},changeTerminalInFocusToUserViewpoint:function(e){var t;return void 0===e&&(e={}),x(this,void 0,void 0,function(){var n;return S(this,function(r){switch(r.label){case 0:return ye()?[4,null===(t=u.current)||void 0===t?void 0:t.getCenter()]:[2];case 1:return(n=r.sent())?(s.focusManager.changeToUserViewpoint(n,e),[2]):[2]}})})},computeRoute:function(e,t,n){return x(this,void 0,void 0,function(){return S(this,function(r){switch(r.label){case 0:return[4,ve.computeRoute(e,t,n)];case 1:return[2,r.sent()]}})})},computeRoutes:function(e,t){return x(this,void 0,void 0,function(){return S(this,function(n){switch(n.label){case 0:return[4,ve.computeRoutes(e,t)];case 1:return[2,n.sent()]}})})},computeRoutesFromLocation:function(e,t,n,r){return void 0===r&&(r=!1),x(this,void 0,void 0,function(){return S(this,function(i){switch(i.label){case 0:return[4,ve.computeRoutesFromLocation(e,t,n,{wheelChairAccessible:r})];case 1:return[2,i.sent()]}})})},computeRouteFromCoordinates:function(e,t,n){return x(this,void 0,void 0,function(){return S(this,function(r){switch(r.label){case 0:return[4,ve.computeRouteFromCoordinates(e,t,n)];case 1:return[2,r.sent()]}})})},setRoutingMode:ve.setRoutingMode,startNavigation:ve.startNavigation,startNavigationFromCoordinates:ve.startNavigationFromCoordinates,stopNavigation:ve.stopNavigation,recenter:function(e){var t;return null===(t=d.current)||void 0===t?void 0:t.recenter(e)},setActiveRoute:function(e){ve.setActiveRoute(e)},getActiveRoute:function(){return ve.getActiveRoute()},highlightRouteSegment:function(e){return x(this,void 0,void 0,function(){return S(this,function(t){switch(t.label){case 0:return[4,ve.highlightRouteSegment(e)];case 1:return t.sent(),[2]}})})},isPositionWithinBounds:function(e){var t,n;return null!==(n=null===(t=d.current)||void 0===t?void 0:t.isPositionWithinBounds(e))&&void 0!==n&&n},clearRoute:function(){ve.clearRoute()},getRoutingStatus:function(){return l.current.getRoutingStatus()},getRoutingParameters:function(){return ve.getRoutingParameters()},requestGPSPermission:function(){var e,t;return x(this,void 0,void 0,function(){return S(this,function(n){switch(n.label){case 0:return[4,null===(t=null===(e=d.current)||void 0===e?void 0:e.requestGPSPermission)||void 0===t?void 0:t.call(e)];case 1:return[2,n.sent()]}})})},isGPSPermissionGranted:function(){var e,t;return x(this,void 0,void 0,function(){return S(this,function(n){switch(n.label){case 0:return[4,null===(t=null===(e=d.current)||void 0===e?void 0:e.isGPSPermissionGranted)||void 0===t?void 0:t.call(e)];case 1:return[2,n.sent()]}})})},enableGPS:function(e){var t,n;return x(this,void 0,void 0,function(){return S(this,function(r){switch(r.label){case 0:return[4,null===(n=null===(t=d.current)||void 0===t?void 0:t.enableGPS)||void 0===n?void 0:n.call(t,e)];case 1:return[2,r.sent()]}})})},disableGPS:function(){var e,t;null===(t=null===(e=d.current)||void 0===e?void 0:e.disableGPS)||void 0===t||t.call(e)},destroyGPS:function(){var e,t;null===(t=null===(e=d.current)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e)},getCameraFollowState:function(){var e,t;return null!==(t=null===(e=d.current)||void 0===e?void 0:e.getCameraFollowState())&&void 0!==t?t:{mode:"normal",owner:"gps",isFollowing:!1}},setNormalModeHeadingCameraFollow:function(e){var t,n;null===(n=null===(t=d.current)||void 0===t?void 0:t.setNormalHeadingCameraFollow)||void 0===n||n.call(t,e)},isNormalModeHeadingCameraFollowEnabled:function(){var e,t,n;return null!==(n=null===(t=null===(e=d.current)||void 0===e?void 0:e.isNormalHeadingCameraFollowEnabled)||void 0===t?void 0:t.call(e))&&void 0!==n&&n},getGPSPosition:function(e){var t,n;return x(this,void 0,void 0,function(){return S(this,function(r){switch(r.label){case 0:return[4,null===(n=null===(t=d.current)||void 0===t?void 0:t.getGPSPosition)||void 0===n?void 0:n.call(t,e)];case 1:return[2,r.sent()]}})})},isGPSEnabled:function(){var e,t;return null===(t=null===(e=d.current)||void 0===e?void 0:e.isGPSEnabled)||void 0===t?void 0:t.call(e)},isFollowing:function(){var e=d.current;if(e)return e.getCameraFollowState().isFollowing},getCurrentGPSPosition:function(){var e,t;return null===(t=null===(e=d.current)||void 0===e?void 0:e.getCurrentPosition)||void 0===t?void 0:t.call(e)},triggerGPSUpdate:function(e){var t,n;null===(n=null===(t=d.current)||void 0===t?void 0:t.triggerGPSUpdate)||void 0===n||n.call(t,e)},onWhereTaxonomyUpdateProposed:function(e){s.autoFocusManager.addWhereTaxonomyUpdateProposedListener(e)},onWhereTaxonomyUpdated:function(e){s.autoFocusManager.addWhereTaxonomyUpdatedListener(e)},onWhereTaxonomyAutoRejected:function(e){s.autoFocusManager.addAutoRejectionListener(e)},acceptProposal:function(e){s.autoFocusManager.acceptProposal(e)},rejectProposal:function(e){s.autoFocusManager.rejectProposal(e)},manualOverride:function(e,t){s.autoFocusManager.manualOverride(e,t)},notifyManualFloorChange:function(e){s.autoFocusManager.notifyManualFloorChange(e,!1)},isNavigating:function(){return s.navigationEngine.getIsNavigating()},getAutoFocusLastAcceptedWhereTaxonomyPath:function(){return s.autoFocusManager.getLastAcceptedTaxonomyPath()},getAutoFocusManager:function(){return s.autoFocusManager},getTaxonomyUpdateStore:function(){return s.taxonomyUpdateStore},requestCompassPermission:function(){var e,t;return x(this,void 0,void 0,function(){return S(this,function(n){switch(n.label){case 0:return[4,null===(t=null===(e=p.current)||void 0===e?void 0:e.requestCompassPermission)||void 0===t?void 0:t.call(e)];case 1:return[2,n.sent()]}})})},enableCompass:function(e){var t,n;return x(this,void 0,void 0,function(){return S(this,function(r){switch(r.label){case 0:return[4,null===(n=null===(t=p.current)||void 0===t?void 0:t.enableCompass)||void 0===n?void 0:n.call(t,e)];case 1:return[2,r.sent()]}})})},disableCompass:function(){var e,t;null===(t=null===(e=p.current)||void 0===e?void 0:e.disableCompass)||void 0===t||t.call(e)},destroyCompass:function(){var e,t;null===(t=null===(e=p.current)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e)},isCompassEnabled:function(){var e,t;return null===(t=null===(e=p.current)||void 0===e?void 0:e.isCompassEnabled)||void 0===t?void 0:t.call(e)},getCurrentCompassData:function(){var e,t;return null===(t=null===(e=p.current)||void 0===e?void 0:e.getCurrentCompassData)||void 0===t?void 0:t.call(e)},getCompassHeading:function(){var e,t;return null===(t=null===(e=p.current)||void 0===e?void 0:e.getCompassHeading)||void 0===t?void 0:t.call(e)},isCompassCalibrated:function(){var e,t;return null===(t=null===(e=p.current)||void 0===e?void 0:e.isCompassCalibrated)||void 0===t?void 0:t.call(e)}};return t},[z,L]);var we=function(){!0===C.current&&!0===k.current&&!1===T.current&&e.onLoad&&(T.current=!0,e.onLoad())},be=function(t){!1===E.current&&(E.current=!0,e.onLoadFail&&e.onLoadFail(t))},_e={sw:[j.center[0]-.05,j.center[1]-.05],ne:[j.center[0]+.05,j.center[1]+.05]},xe=r.useCallback(function(e){c.current=e,e&&me()},[]),Se=r.useCallback(function(e){if(g.current=e,me(),e)return function(){var e;null===(e=a.current)||void 0===e||e.userLocation.detachMarker()}},[]);return f.default.createElement(t.View,{style:o.page,onLayout:function(e){_.current=e.nativeEvent.layout.height,A.current=e.nativeEvent.layout.width}},""!==z?f.default.createElement(i.MapView,{onPress:function(t){return x(n,void 0,void 0,function(){var n,r,i,o,a,s,c,h;return S(this,function(d){switch(d.label){case 0:if(!ye())return[2];n=t.nativeEvent.point,d.label=1;case 1:return d.trys.push([1,4,,5]),[4,null===(c=u.current)||void 0===c?void 0:c.project(t.nativeEvent.lngLat)];case 2:return r=d.sent(),i=r||n,[4,null===(h=u.current)||void 0===h?void 0:h.queryRenderedFeatures(i)];case 3:return function(e){for(var t,n,r,i,o,a,s=e[0],u=0;u<e.length;u++){var c=e[u];l.current.isClickableFeature(c)&&(s=c)}if((null===(t=s.properties)||void 0===t?void 0:t.center)||s.geometry&&s.geometry.coordinates){var h=(null===(n=s.properties)||void 0===n?void 0:n.center)?s.properties.center:s.geometry.coordinates,d={mapObjectId:null===(r=s.properties)||void 0===r?void 0:r.myMapObjectId,coordinates:h,name:null===(i=s.properties)||void 0===i?void 0:i.title,whatDimension:null===(o=s.properties)||void 0===o?void 0:o.dimension_what,whereDimension:null===(a=s.properties)||void 0===a?void 0:a.dimension_where,geometry:s.geometry,properties:s.properties};l.current.setLastClickedFeature(l.current.hydrateClickedFeature(d))}}(o=d.sent()),e.onPress&&((a=null==o?void 0:o[0])?e.onPress(a):e.onPress(t.nativeEvent)),[3,5];case 4:return s=d.sent(),console.error("[onMapClicked] Error querying rendered features:",s),[3,5];case 5:return[2]}})})},onRegionWillChange:function(t){var n,r;M(t),t.nativeEvent.userInteraction&&(null===(n=d.current)||void 0===n||n.notifyUserGesture()),null===(r=e.onMoveStart)||void 0===r||r.call(e,t)},onRegionIsChanging:function(t){var n;M(t),null===(n=e.onMove)||void 0===n||n.call(e,t)},onRegionDidChange:function(t){return x(n,void 0,void 0,function(){var n;return S(this,function(r){return M(t),null===(n=e.onMoveEnd)||void 0===n||n.call(e,t),[2]})})},onDidFinishLoadingMap:function(){var e;!1===C.current&&(C.current=!0,null===(e=a.current)||void 0===e||e.notifyMapLoaded(),we())},onDidFailLoadingMap:function(){C.current=!1,be("Failed to load map style")},style:o.map,logo:!1,ref:u,mapStyle:z||null,attribution:!1,compass:!1},f.default.createElement(i.Camera,{ref:xe,duration:2e3,easing:"ease",initialViewState:{center:j.center,zoom:j.zoom,bearing:j.bearing,bounds:[_e.sw[0],_e.sw[1],_e.ne[0],_e.ne[1]]},maxZoom:22,minZoom:12}),f.default.createElement(Ep,{isOffline:ne,tileServer:he,props:e}),f.default.createElement(Us,{ref:m,metaAtlasCoreRef:l,triggerRender:function(){return D(!L)}}),f.default.createElement(i.ShapeSource,{id:"boundary",data:kd}),f.default.createElement(i.Images,{images:{"arrow-marker":"".concat(ce,"assets/gps-arrow.png")}}),f.default.createElement(G,{ref:Se,position:null,showAccuracy:!0,pulse:!1}),f.default.createElement(Tp,{ref:F,cameraRef:c,metaAtlasCoreRef:l}),e.children):null)},exports.NavigationStartError=yd,exports.ROUTE_MODE_REQUIRED_SENSORS=Cu,exports.resolveRequiredSensors=ku;
30
30
  //# sourceMappingURL=index.js.map