@twinmatrix/spatialverse-sdk-rn 0.2.0 → 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/README.md +2 -0
- package/lib/cjs/index.js +5 -5
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.js +5 -5
- package/lib/esm/index.js.map +1 -1
- package/package.json +24 -15
- package/typings/index.d.ts +475 -68
package/lib/esm/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import e from"react-native-geolocation-service";import{PermissionsAndroid as t,Platform as r,Animated as n,View as i,StyleSheet as o,Easing as a}from"react-native";import l,{useState as s,useRef as c,useEffect as u,useMemo as h,forwardRef as f,useImperativeHandle as p,isValidElement as d}from"react";import{ShapeSource as g,CircleLayer as m,MapView as y,Camera as v,Animated as w,VectorSource as b,LineLayer as _,SymbolLayer as x}from"@maplibre/maplibre-react-native";import P from"axios";import{MMKV as S}from"react-native-mmkv";import j from"react-native-aes-crypto";import k from"react-native-fs";import{unzip as A,unzipWithPassword as E}from"react-native-zip-archive";import z from"@react-native-community/netinfo";var M=function(){return M=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},M.apply(this,arguments)};function O(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 F(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 L(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 C(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 T(e,t,r){return t=N(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,G()?Reflect.construct(t,r||[],N(e).constructor):t.apply(e,r))}function R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B(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,J(n.key),n)}}function I(e,t,r){return t&&B(e.prototype,t),r&&B(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function D(e,t,r){return(t=J(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function U(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&&V(e,t)}function G(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(G=function(){return!!e})()}function W(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 q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?W(Object(r),!0).forEach(function(t){D(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}function $(e){return function(e){if(Array.isArray(e))return C(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 C(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)?C(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 J(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 Y(e){return Y="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},Y(e)}"function"==typeof SuppressedError&&SuppressedError;var X=function(){function n(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 n.prototype.requestGPSPermission=function(){return O(this,void 0,void 0,function(){var n,i,o,a,l;return F(this,function(s){switch(s.label){case 0:return s.trys.push([0,9,,10]),"android"!==r.OS?[3,4]:(n=t.PERMISSIONS.ACCESS_FINE_LOCATION,i=t.PERMISSIONS.ACCESS_COARSE_LOCATION,[4,t.check(n)]);case 1:return o=s.sent(),[4,t.check(i)];case 2:return a=s.sent(),o||a?[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}]:[4,t.request(n)];case 3:return(l=s.sent())===t.RESULTS.GRANTED?[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}]:l===t.RESULTS.DENIED?[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}]:[2,{granted:!1,denied:!0,prompt:!1,state:"denied"}];case 4:if(!e.requestAuthorization)return[3,8];s.label=5;case 5:return s.trys.push([5,7,,8]),[4,e.requestAuthorization("whenInUse")];case 6:switch(l=s.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 s.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 s.sent(),[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}];case 10:return[2]}})})},n.prototype.isGPSPermissionGranted=function(){return O(this,void 0,void 0,function(){return F(this,function(e){switch(e.label){case 0:return[4,this.requestGPSPermission()];case 1:return[2,e.sent().granted]}})})},n.prototype.enableGPS=function(e){return void 0===e&&(e={}),O(this,void 0,void 0,function(){var t,r,n;return F(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]}})})},n.prototype.focusToGPS=function(e){return void 0===e&&(e={}),O(this,void 0,void 0,function(){var t,r,n,i,o,a,l;return F(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}]})})},n.prototype.disableGPS=function(){var t;if(null!==this.gpsWatchId){try{e.clearWatch(this.gpsWatchId)}catch(e){}this.gpsWatchId=null}this.gpsEnabled=!1,this.outOfFocus=!1,this.trackUserLocation=!0,this.currentGPSPosition=null,this.onGPSUpdate(null),(null===(t=this.gpsCallbacks)||void 0===t?void 0:t.onToggle)&&this.gpsCallbacks.onToggle(!1)},n.prototype.destroyGPS=function(){this.disableGPS(),this.gpsCallbacks={}},n.prototype.startGPS=function(t){var r=this;void 0===t&&(t={});var n=t.flyToLocation,i=void 0===n||n,o=t.zoom,a=void 0===o?18:o,l=t.enableHighAccuracy,s=void 0===l||l,c=t.timeout,u=void 0===c?1e4:c,h=t.maximumAge,f=void 0===h?0:h,p=t.trackUserLocation,d=void 0===p||p;if(!e||!e.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:s,timeout:u,maximumAge:f,distanceFilter:0,interval:100,fastestInterval:10};this.gpsWatchId=e.watchPosition(function(e){r.handleGPSLocationUpdate(e,{flyToLocation:!!r.trackUserLocation&&(i&&!r.outOfFocus),zoom:a})},function(e){r.handleGPSError(e)},m)},n.prototype.stopGPS=function(){if(this.gpsEnabled=!1,null!==this.gpsWatchId){try{e.clearWatch(this.gpsWatchId)}catch(e){}this.gpsWatchId=null}},n.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)},n.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)},n.prototype.isPositionWithinCAGBounds=function(e){var t,r=this.getFocusTree();if(!r||"object"!==Y(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 c=s[0],u=s[1];if(n>=c[0]&&n<=u[0]&&i>=c[1]&&i<=u[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},n.prototype.getGPSPosition=function(t){var r=this;void 0===t&&(t={});var n=t.enableHighAccuracy,i=void 0===n||n,o=t.timeout,a=void 0===o?1e4:o,l=t.maximumAge,s=void 0===l?15e3:l;return new Promise(function(t,n){e&&e.getCurrentPosition?e.getCurrentPosition(function(e){var n,i,o={coordinates:[e.coords.longitude,e.coords.latitude],accuracy:e.coords.accuracy,timestamp:e.timestamp||Date.now(),heading:null!==(n=e.coords.heading)&&void 0!==n?n:void 0,speed:null!==(i=e.coords.speed)&&void 0!==i?i:void 0};r.onGPSUpdate(o),t(o)},function(e){return n(e)},{enableHighAccuracy:i,timeout:a,maximumAge:s}):n(new Error("Geolocation is not supported by this runtime."))})},n.prototype.isGPSEnabled=function(){return this.gpsEnabled},n.prototype.isGPSAutoFocusEnabled=function(){return this.gpsEnabled&&!this.outOfFocus},n.prototype.isOutOfFocus=function(){return this.outOfFocus},n.prototype.setOutOfFocus=function(e){var t;this.outOfFocus=e,(null===(t=this.gpsCallbacks)||void 0===t?void 0:t.onToggle)&&this.gpsCallbacks.onToggle(!e)},n.prototype.getCurrentGPSPosition=function(){return this.currentGPSPosition},n}(),H=function(e){var t=e.position,r=e.showAccuracy,n=void 0===r||r,i=e.pulse,o=void 0===i||i,a=s(0),f=a[0],p=a[1],d=c(null);u(function(){if(o){var e=Date.now(),t=function(){var r=(Date.now()-e)%2e3,n=.5*Math.sin(r/2e3*Math.PI*2)+.5;p(n),d.current=requestAnimationFrame(t)};return d.current=requestAnimationFrame(t),function(){d.current&&cancelAnimationFrame(d.current),d.current=null}}},[o]);var y=h(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 v=o?8+9.6*f:8,w=o?function(e,t,r){return Math.max(t,Math.min(r,e))}(.9*(1-.7*f),.2,.9):.95;return l.createElement(l.Fragment,null,l.createElement(g,{id:"gps-source",shape:y},n?l.createElement(m,{id:"gps-accuracy",style:{circleColor:"#1E90FF",circleOpacity:.2,circleRadius:["*",["get","accuracy"],.6],circleStrokeColor:"#1E90FF",circleStrokeWidth:1}}):null,l.createElement(m,{id:"gps-pulse",style:{circleColor:"#b7d8f7",circleOpacity:w,circleRadius:v,circleStrokeColor:"#b7d8f7",circleStrokeWidth:2}}),l.createElement(m,{id:"gps-dot",style:{circleColor:"#1E90FF",circleOpacity:.95,circleRadius:6,circleStrokeColor:"#ffffff",circleStrokeWidth:2}})))},Z=6371008.8,K={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:Z,metres:Z,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function Q(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 ee(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(!ie(e[0])||!ie(e[1]))throw new Error("coordinates must contain numbers");return Q({type:"Point",coordinates:e},t,r)}function te(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 Q({type:"LineString",coordinates:e},t,r)}function re(e,t,r){return void 0===r&&(r={}),Q({type:"MultiPoint",coordinates:e},t,r)}function ne(e){return e%360*Math.PI/180}function ie(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function oe(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 ae(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 le(e,t,r){void 0===r&&(r={});var n=oe(e),i=oe(t),o=ne(i[1]-n[1]),a=ne(i[0]-n[0]),l=ne(n[1]),s=ne(i[1]),c=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=K[t];if(!r)throw new Error(t+" units is invalid");return e*r}(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),r.units)}function se(e,t,r){if(null!==e)for(var n,i,o,a,l,s,c,u,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=(u=!!(c=d?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v<l;v++){var w=0,b=0;if(null!==(a=u?c.geometries[v]:c)){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===se(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ce(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return ue(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 ue(e)}),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return fe(e);default:throw new Error("unknown GeoJSON type")}}function ue(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=he(e.properties),t.geometry=fe(e.geometry),t}function he(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]=he(n):t[r]=n}),t):t}function fe(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map(function(e){return fe(e)}),t):(t.coordinates=pe(e.coordinates),t)}function pe(e){var t=e;return"object"!=typeof t[0]?t.slice():t.map(function(e){return pe(e)})}var de=6371008.8,ge={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:de,metres:de,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function me(e){return e%360*Math.PI/180}function ye(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=ge[t];if(!r)throw new Error(t+" units is invalid");return e*r}(function(e,t){void 0===t&&(t="kilometers");var r=ge[t];if(!r)throw new Error(t+" units is invalid");return e/r}(e,t),r)}function ve(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function we(e,t,r,n){void 0===n&&(n={});var i=t<0,o=ye(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?de:Number(n);var i=t/n,o=e[0]*Math.PI/180,a=me(e[1]),l=me(r),s=i*Math.cos(l),c=a+s;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var u=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(u)>1e-11?s/u:Math.cos(a),f=i*Math.sin(l)/h;return[(180*(o+f)/Math.PI+540)%360-180,180*c/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(!ve(e[0])||!ve(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 be(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=ce(e)),se(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")}(we(e,t,r,{units:o}));e[0]=n[0],e[1]=n[1],a&&3===e.length&&(e[2]+=a)}),e}var _e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pe=function(){this.__data__=[],this.size=0};var Se=function(e,t){return e===t||e!=e&&t!=t},je=Se;var ke=function(e,t){for(var r=e.length;r--;)if(je(e[r][0],t))return r;return-1},Ae=ke,Ee=Array.prototype.splice;var ze=ke;var Me=ke;var Oe=ke;var Fe=Pe,Le=function(e){var t=this.__data__,r=Ae(t,e);return!(r<0)&&(r==t.length-1?t.pop():Ee.call(t,r,1),--this.size,!0)},Ce=function(e){var t=this.__data__,r=ze(t,e);return r<0?void 0:t[r][1]},Te=function(e){return Me(this.__data__,e)>-1},Re=function(e,t){var r=this.__data__,n=Oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Be(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])}}Be.prototype.clear=Fe,Be.prototype.delete=Le,Be.prototype.get=Ce,Be.prototype.has=Te,Be.prototype.set=Re;var Ie=Be,De=Ie;var Ne=function(){this.__data__=new De,this.size=0};var Ue=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var Ge=function(e){return this.__data__.get(e)};var We=function(e){return this.__data__.has(e)},qe="object"==typeof _e&&_e&&_e.Object===Object&&_e,Ve=qe,$e="object"==typeof self&&self&&self.Object===Object&&self,Je=Ve||$e||Function("return this")(),Ye=Je.Symbol,Xe=Ye,He=Object.prototype,Ze=He.hasOwnProperty,Ke=He.toString,Qe=Xe?Xe.toStringTag:void 0;var et=function(e){var t=Ze.call(e,Qe),r=e[Qe];try{e[Qe]=void 0;var n=!0}catch(e){}var i=Ke.call(e);return n&&(t?e[Qe]=r:delete e[Qe]),i},tt=Object.prototype.toString;var rt=et,nt=function(e){return tt.call(e)},it=Ye?Ye.toStringTag:void 0;var ot=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":it&&it in Object(e)?rt(e):nt(e)};var at=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},lt=ot,st=at;var ct,ut=function(e){if(!st(e))return!1;var t=lt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},ht=Je["__core-js_shared__"],ft=(ct=/[^.]+$/.exec(ht&&ht.keys&&ht.keys.IE_PROTO||""))?"Symbol(src)_1."+ct:"";var pt=function(e){return!!ft&&ft in e},dt=Function.prototype.toString;var gt=function(e){if(null!=e){try{return dt.call(e)}catch(e){}try{return e+""}catch(e){}}return""},mt=ut,yt=pt,vt=at,wt=gt,bt=/^\[object .+?Constructor\]$/,_t=Function.prototype,xt=Object.prototype,Pt=_t.toString,St=xt.hasOwnProperty,jt=RegExp("^"+Pt.call(St).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var kt=function(e){return!(!vt(e)||yt(e))&&(mt(e)?jt:bt).test(wt(e))},At=function(e,t){return null==e?void 0:e[t]};var Et=function(e,t){var r=At(e,t);return kt(r)?r:void 0},zt=Et(Je,"Map"),Mt=Et(Object,"create"),Ot=Mt;var Ft=function(){this.__data__=Ot?Ot(null):{},this.size=0};var Lt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ct=Mt,Tt=Object.prototype.hasOwnProperty;var Rt=function(e){var t=this.__data__;if(Ct){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Tt.call(t,e)?t[e]:void 0},Bt=Mt,It=Object.prototype.hasOwnProperty;var Dt=Mt;var Nt=Ft,Ut=Lt,Gt=Rt,Wt=function(e){var t=this.__data__;return Bt?void 0!==t[e]:It.call(t,e)},qt=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Dt&&void 0===t?"__lodash_hash_undefined__":t,this};function Vt(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])}}Vt.prototype.clear=Nt,Vt.prototype.delete=Ut,Vt.prototype.get=Gt,Vt.prototype.has=Wt,Vt.prototype.set=qt;var $t=Vt,Jt=Ie,Yt=zt;var Xt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Ht=function(e,t){var r=e.__data__;return Xt(t)?r["string"==typeof t?"string":"hash"]:r.map},Zt=Ht;var Kt=Ht;var Qt=Ht;var er=Ht;var tr=function(){this.size=0,this.__data__={hash:new $t,map:new(Yt||Jt),string:new $t}},rr=function(e){var t=Zt(this,e).delete(e);return this.size-=t?1:0,t},nr=function(e){return Kt(this,e).get(e)},ir=function(e){return Qt(this,e).has(e)},or=function(e,t){var r=er(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function ar(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])}}ar.prototype.clear=tr,ar.prototype.delete=rr,ar.prototype.get=nr,ar.prototype.has=ir,ar.prototype.set=or;var lr=Ie,sr=zt,cr=ar;var ur=Ie,hr=Ne,fr=Ue,pr=Ge,dr=We,gr=function(e,t){var r=this.__data__;if(r instanceof lr){var n=r.__data__;if(!sr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new cr(n)}return r.set(e,t),this.size=r.size,this};function mr(e){var t=this.__data__=new ur(e);this.size=t.size}mr.prototype.clear=hr,mr.prototype.delete=fr,mr.prototype.get=pr,mr.prototype.has=dr,mr.prototype.set=gr;var yr=mr;var vr=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},wr=Et,br=function(){try{var e=wr(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var _r=function(e,t,r){"__proto__"==t&&br?br(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},xr=_r,Pr=Se,Sr=Object.prototype.hasOwnProperty;var jr=function(e,t,r){var n=e[t];Sr.call(e,t)&&Pr(n,r)&&(void 0!==r||t in e)||xr(e,t,r)},kr=jr,Ar=_r;var Er=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?Ar(r,l,s):kr(r,l,s)}return r};var zr=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var Mr=function(e){return null!=e&&"object"==typeof e},Or=ot,Fr=Mr;var Lr=function(e){return Fr(e)&&"[object Arguments]"==Or(e)},Cr=Mr,Tr=Object.prototype,Rr=Tr.hasOwnProperty,Br=Tr.propertyIsEnumerable,Ir=Lr(function(){return arguments}())?Lr:function(e){return Cr(e)&&Rr.call(e,"callee")&&!Br.call(e,"callee")},Dr=Array.isArray,Nr={};var Ur=function(){return!1};!function(e,t){var r=Je,n=Ur,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 Nr},set exports(e){Nr=e}},Nr);var Gr=/^(?:0|[1-9]\d*)$/;var Wr=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Gr.test(e))&&e>-1&&e%1==0&&e<t};var qr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Vr=ot,$r=qr,Jr=Mr,Yr={};Yr["[object Float32Array]"]=Yr["[object Float64Array]"]=Yr["[object Int8Array]"]=Yr["[object Int16Array]"]=Yr["[object Int32Array]"]=Yr["[object Uint8Array]"]=Yr["[object Uint8ClampedArray]"]=Yr["[object Uint16Array]"]=Yr["[object Uint32Array]"]=!0,Yr["[object Arguments]"]=Yr["[object Array]"]=Yr["[object ArrayBuffer]"]=Yr["[object Boolean]"]=Yr["[object DataView]"]=Yr["[object Date]"]=Yr["[object Error]"]=Yr["[object Function]"]=Yr["[object Map]"]=Yr["[object Number]"]=Yr["[object Object]"]=Yr["[object RegExp]"]=Yr["[object Set]"]=Yr["[object String]"]=Yr["[object WeakMap]"]=!1;var Xr=function(e){return Jr(e)&&$r(e.length)&&!!Yr[Vr(e)]};var Hr=function(e){return function(t){return e(t)}},Zr={};!function(e,t){var r=qe,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 Zr},set exports(e){Zr=e}},Zr);var Kr=Xr,Qr=Hr,en=Zr&&Zr.isTypedArray,tn=en?Qr(en):Kr,rn=zr,nn=Ir,on=Dr,an=Nr,ln=Wr,sn=tn,cn=Object.prototype.hasOwnProperty;var un=function(e,t){var r=on(e),n=!r&&nn(e),i=!r&&!n&&an(e),o=!r&&!n&&!i&&sn(e),a=r||n||i||o,l=a?rn(e.length,String):[],s=l.length;for(var c in e)!t&&!cn.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ln(c,s))||l.push(c);return l},hn=Object.prototype;var fn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||hn)};var pn=function(e,t){return function(r){return e(t(r))}},dn=pn(Object.keys,Object),gn=fn,mn=dn,yn=Object.prototype.hasOwnProperty;var vn=ut,wn=qr;var bn=function(e){return null!=e&&wn(e.length)&&!vn(e)},_n=un,xn=function(e){if(!gn(e))return mn(e);var t=[];for(var r in Object(e))yn.call(e,r)&&"constructor"!=r&&t.push(r);return t},Pn=bn;var Sn=function(e){return Pn(e)?_n(e):xn(e)},jn=Er,kn=Sn;var An=function(e,t){return e&&jn(t,kn(t),e)};var En=at,zn=fn,Mn=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},On=Object.prototype.hasOwnProperty;var Fn=un,Ln=function(e){if(!En(e))return Mn(e);var t=zn(e),r=[];for(var n in e)("constructor"!=n||!t&&On.call(e,n))&&r.push(n);return r},Cn=bn;var Tn=function(e){return Cn(e)?Fn(e,!0):Ln(e)},Rn=Er,Bn=Tn;var In=function(e,t){return e&&Rn(t,Bn(t),e)},Dn={};!function(e,t){var r=Je,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 Dn},set exports(e){Dn=e}},Dn);var Nn=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var Un=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 Gn=function(){return[]},Wn=Un,qn=Gn,Vn=Object.prototype.propertyIsEnumerable,$n=Object.getOwnPropertySymbols,Jn=$n?function(e){return null==e?[]:(e=Object(e),Wn($n(e),function(t){return Vn.call(e,t)}))}:qn,Yn=Er,Xn=Jn;var Hn=function(e,t){return Yn(e,Xn(e),t)};var Zn=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e},Kn=pn(Object.getPrototypeOf,Object),Qn=Zn,ei=Kn,ti=Jn,ri=Gn,ni=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Qn(t,ti(e)),e=ei(e);return t}:ri,ii=Er,oi=ni;var ai=function(e,t){return ii(e,oi(e),t)},li=Zn,si=Dr;var ci=function(e,t,r){var n=t(e);return si(e)?n:li(n,r(e))},ui=ci,hi=Jn,fi=Sn;var pi=function(e){return ui(e,fi,hi)},di=ci,gi=ni,mi=Tn;var yi=function(e){return di(e,mi,gi)},vi=Et(Je,"DataView"),wi=zt,bi=Et(Je,"Promise"),_i=Et(Je,"Set"),xi=Et(Je,"WeakMap"),Pi=ot,Si=gt,ji="[object Map]",ki="[object Promise]",Ai="[object Set]",Ei="[object WeakMap]",zi="[object DataView]",Mi=Si(vi),Oi=Si(wi),Fi=Si(bi),Li=Si(_i),Ci=Si(xi),Ti=Pi;(vi&&Ti(new vi(new ArrayBuffer(1)))!=zi||wi&&Ti(new wi)!=ji||bi&&Ti(bi.resolve())!=ki||_i&&Ti(new _i)!=Ai||xi&&Ti(new xi)!=Ei)&&(Ti=function(e){var t=Pi(e),r="[object Object]"==t?e.constructor:void 0,n=r?Si(r):"";if(n)switch(n){case Mi:return zi;case Oi:return ji;case Fi:return ki;case Li:return Ai;case Ci:return Ei}return t});var Ri=Ti,Bi=Object.prototype.hasOwnProperty;var Ii=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Bi.call(e,"index")&&(r.index=e.index,r.input=e.input),r},Di=Je.Uint8Array;var Ni=function(e){var t=new e.constructor(e.byteLength);return new Di(t).set(new Di(e)),t},Ui=Ni;var Gi=function(e,t){var r=t?Ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},Wi=/\w*$/;var qi=function(e){var t=new e.constructor(e.source,Wi.exec(e));return t.lastIndex=e.lastIndex,t},Vi=Ye?Ye.prototype:void 0,$i=Vi?Vi.valueOf:void 0;var Ji=Ni;var Yi=function(e,t){var r=t?Ji(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},Xi=Ni,Hi=Gi,Zi=qi,Ki=function(e){return $i?Object($i.call(e)):{}},Qi=Yi;var eo=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Xi(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return Hi(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 Qi(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 Zi(e);case"[object Symbol]":return Ki(e)}},to=at,ro=Object.create,no=function(){function e(){}return function(t){if(!to(t))return{};if(ro)return ro(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),io=Kn,oo=fn;var ao=function(e){return"function"!=typeof e.constructor||oo(e)?{}:no(io(e))},lo=Ri,so=Mr;var co=function(e){return so(e)&&"[object Map]"==lo(e)},uo=Hr,ho=Zr&&Zr.isMap,fo=ho?uo(ho):co,po=Ri,go=Mr;var mo=function(e){return go(e)&&"[object Set]"==po(e)},yo=Hr,vo=Zr&&Zr.isSet,wo=vo?yo(vo):mo,bo=yr,_o=vr,xo=jr,Po=An,So=In,jo=Dn,ko=Nn,Ao=Hn,Eo=ai,zo=pi,Mo=yi,Oo=Ri,Fo=Ii,Lo=eo,Co=ao,To=Dr,Ro=Nr,Bo=fo,Io=at,Do=wo,No=Sn,Uo=Tn,Go="[object Arguments]",Wo="[object Function]",qo="[object Object]",Vo={};Vo[Go]=Vo["[object Array]"]=Vo["[object ArrayBuffer]"]=Vo["[object DataView]"]=Vo["[object Boolean]"]=Vo["[object Date]"]=Vo["[object Float32Array]"]=Vo["[object Float64Array]"]=Vo["[object Int8Array]"]=Vo["[object Int16Array]"]=Vo["[object Int32Array]"]=Vo["[object Map]"]=Vo["[object Number]"]=Vo[qo]=Vo["[object RegExp]"]=Vo["[object Set]"]=Vo["[object String]"]=Vo["[object Symbol]"]=Vo["[object Uint8Array]"]=Vo["[object Uint8ClampedArray]"]=Vo["[object Uint16Array]"]=Vo["[object Uint32Array]"]=!0,Vo["[object Error]"]=Vo[Wo]=Vo["[object WeakMap]"]=!1;var $o=function e(t,r,n,i,o,a){var l,s=1&r,c=2&r,u=4&r;if(n&&(l=o?n(t,i,o,a):n(t)),void 0!==l)return l;if(!Io(t))return t;var h=To(t);if(h){if(l=Fo(t),!s)return ko(t,l)}else{var f=Oo(t),p=f==Wo||"[object GeneratorFunction]"==f;if(Ro(t))return jo(t,s);if(f==qo||f==Go||p&&!o){if(l=c||p?{}:Co(t),!s)return c?Eo(t,So(l,t)):Ao(t,Po(l,t))}else{if(!Vo[f])return o?t:{};l=Lo(t,f,s)}}a||(a=new bo);var d=a.get(t);if(d)return d;a.set(t,l),Do(t)?t.forEach(function(i){l.add(e(i,r,n,i,t,a))}):Bo(t)&&t.forEach(function(i,o){l.set(o,e(i,r,n,o,t,a))});var g=h?void 0:(u?c?Mo:zo:c?Uo:No)(t);return _o(g||t,function(i,o){g&&(i=t[o=i]),xo(l,o,e(i,r,n,o,t,a))}),l},Jo=$o;var Yo=function(e){return Jo(e,5)},Xo=Object.getPrototypeOf(n.ValueXY);__DEV__&&"AnimatedWithChildren"!==Xo.name&&console.error("AnimatedCoordinatesArray could not obtain AnimatedWithChildren base class");var Ho={useNativeDriver:!1},Zo=function(){function e(){var t,r;return R(this,e),(r=T(this,e)).state=(t=r).onInitialState.apply(t,arguments),r}return U(e,Xo),I(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],c=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),$(c)),targetCoords:n}}if(r.length>n.length){var u=n.length>0?n[n.length-1]:r[0],h=r.slice(a,r.length).map(function(e){return[e[0]*o+u[0]*i,e[1]*o+u[1]*i]});return{coords:[].concat($(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 q(q({},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 t=new n.Value(1);return this.animate(t,n.loop(n.timing(t,q(q(q({},Ho),e),{},{toValue:0}))),e)}},{key:"spring",value:function(e){var t=new n.Value(0);return this.animate(t,n.spring(t,q(q(q({},Ho),e),{},{toValue:1})),e)}},{key:"decay",value:function(e){var t=new n.Value(0);return this.animate(t,n.decay(this.progressValue,q(q(q({},Ho),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 Ko(e){return e%360*Math.PI/180}function Qo(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 ea(e,t,r){if(void 0===r&&(r={}),!0===r.final)return function(e,t){var r=ea(t,e);return r=(r+180)%360}(e,t);var n=Qo(e),i=Qo(t),o=Ko(n[0]),a=Ko(i[0]),l=Ko(n[1]),s=Ko(i[1]),c=Math.sin(a-o)*Math.cos(s),u=Math.cos(l)*Math.sin(s)-Math.sin(l)*Math.cos(s)*Math.cos(a-o);return Math.atan2(c,u)%(2*Math.PI)*180/Math.PI}var ta=6371008.8,ra={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:ta,metres:ta,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function na(e){return 180*(e%(2*Math.PI))/Math.PI}function ia(e){return e%360*Math.PI/180}function oa(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function aa(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=ia(i[0]),a=ia(i[1]),l=ia(r),s=function(e,t){void 0===t&&(t="kilometers");var r=ra[t];if(!r)throw new Error(t+" units is invalid");return e/r}(t,n.units),c=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(!oa(e[0])||!oa(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)}([na(o+Math.atan2(Math.sin(l)*Math.sin(s)*Math.cos(a),Math.cos(s)-Math.sin(a)*Math.sin(c))),na(c)],n.properties)}function la(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 sa(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 ca(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function ua(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 ha(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 fa(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 pa(e,t){!function(e,t){var r,n,i,o,a,l,s,c,u,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,c=p?e.features[r].properties:d?e.properties:{},u=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,c,u,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,c,u,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(ha(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 c=e.coordinates[s];if(!1===t(ha({type:a,coordinates:c},n),r,s))return!1}})}function da(e){if(!e)throw new Error("geojson is required");var t=[];return pa(e,function(e){!function(e,t){var r=[],n=e.geometry;if(null!==n){switch(n.type){case"Polygon":r=fa(n);break;case"LineString":r=[fa(n)]}r.forEach(function(r){var n=function(e,t){var r=[];return e.reduce(function(e,n){var i,o,a,l,s,c,u=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 ha({type:"LineString",coordinates:e},t,r)}([e,n],t);return u.bbox=(o=n,a=(i=e)[0],l=i[1],s=o[0],c=o[1],[a<s?a:s,l<c?l:c,a>s?a:s,l>c?l:c]),r.push(u),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 ga(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 ma={},ya={get exports(){return ma},set exports(e){ma=e}};function va(e,t,r,n,i){wa(e,t,r||0,n||e.length-1,i||_a)}function wa(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),c=.5*Math.sqrt(l*s*(o-s)/o)*(a-o/2<0?-1:1);wa(e,t,Math.max(r,Math.floor(t-a*s/o+c)),Math.min(n,Math.floor(t+(o-a)*s/o+c)),i)}var u=e[t],h=r,f=n;for(ba(e,r,t),i(e[n],u)>0&&ba(e,r,n);h<f;){for(ba(e,h,f),h++,f--;i(e[h],u)<0;)h++;for(;i(e[f],u)>0;)f--}0===i(e[r],u)?ba(e,r,f):ba(e,++f,n),f<=t&&(r=f+1),t<=f&&(n=f-1)}}function ba(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function _a(e,t){return e<t?-1:e>t?1:0}function xa(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 Pa(e,t){Sa(e,0,e.children.length,t,e)}function Sa(e,t,r,n,i){i||(i=Ca(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];ja(i,e.leaf?n(t):t)}return i}function ja(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 ka(e,t){return e.minX-t.minX}function Aa(e,t){return e.minY-t.minY}function Ea(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function za(e){return e.maxX-e.minX+(e.maxY-e.minY)}function Ma(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 Oa(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 Fa(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function La(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function Ca(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Ta(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;va(e,a,t,r,i),o.push(t,a,a,r)}}var Ra={};!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 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 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 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=c,e.lengthToRadians=u,e.lengthToDegrees=function(e,t){return h(u(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 c(u(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")}}(Ra);var Ba={};Object.defineProperty(Ba,"__esModule",{value:!0});var Ia=Ra;function Da(e,t,r){if(null!==e)for(var n,i,o,a,l,s,c,u,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=(u=!!(c=d?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v<l;v++){var w=0,b=0;if(null!==(a=u?c.geometries[v]:c)){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===Da(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Na(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 Ua(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 Ga(e,t){var r,n,i,o,a,l,s,c,u,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,c=p?e.features[r].properties:d?e.properties:{},u=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,c,u,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,c,u,h))return!1;f++}}function Wa(e,t){Ga(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(Ia.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 c={type:a,coordinates:e.coordinates[s]};if(!1===t(Ia.feature(c,n),r,s))return!1}})}function qa(e,t){Wa(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,c=0;return!1!==Da(e,function(o,u,h,f,p){if(void 0===a||r>l||f>s||p>c)return a=o,l=r,s=f,c=p,void(i=0);var d=Ia.lineString([a,o],e.properties);if(!1===t(d,r,n,p,i))return!1;i++,a=o})&&void 0}}})}function Va(e,t){if(!e)throw new Error("geojson is required");Wa(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(Ia.lineString(o[a],e.properties),r,n,a))return!1}}})}Ba.coordAll=function(e){var t=[];return Da(e,function(e){t.push(e)}),t},Ba.coordEach=Da,Ba.coordReduce=function(e,t,r,n){var i=r;return Da(e,function(e,n,o,a,l){i=0===n&&void 0===r?e:t(i,e,n,o,a,l)},n),i},Ba.featureEach=Ua,Ba.featureReduce=function(e,t,r){var n=r;return Ua(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n},Ba.findPoint=function(e,t){if(t=t||{},!Ia.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 Ia.point(s,l,t);case"MultiPoint":return i<0&&(i=s.length+i),Ia.point(s[i],l,t);case"LineString":return a<0&&(a=s.length+a),Ia.point(s[a],l,t);case"Polygon":return o<0&&(o=s.length+o),a<0&&(a=s[o].length+a),Ia.point(s[o][a],l,t);case"MultiLineString":return i<0&&(i=s.length+i),a<0&&(a=s[i].length+a),Ia.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),Ia.point(s[i][o][a],l,t)}throw new Error("geojson is invalid")},Ba.findSegment=function(e,t){if(t=t||{},!Ia.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),Ia.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),Ia.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),Ia.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),Ia.lineString([s[i][o][a],s[i][o][a+1]],l,t)}throw new Error("geojson is invalid")},Ba.flattenEach=Wa,Ba.flattenReduce=function(e,t,r){var n=r;return Wa(e,function(e,i,o){n=0===i&&0===o&&void 0===r?e:t(n,e,i,o)}),n},Ba.geomEach=Ga,Ba.geomReduce=function(e,t,r){var n=r;return Ga(e,function(e,i,o,a,l){n=0===i&&void 0===r?e:t(n,e,i,o,a,l)}),n},Ba.lineEach=Va,Ba.lineReduce=function(e,t,r){var n=r;return Va(e,function(e,i,o,a){n=0===i&&void 0===r?e:t(n,e,i,o,a)}),n},Ba.propEach=Na,Ba.propReduce=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},Ba.segmentEach=qa,Ba.segmentReduce=function(e,t,r){var n=r,i=!1;return qa(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 $a={},Ja={},Ya={};!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 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 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 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=c,e.lengthToRadians=u,e.lengthToDegrees=function(e,t){return h(u(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 c(u(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")}}(Ya),Object.defineProperty(Ja,"__esModule",{value:!0});var Xa=Ya;function Ha(e,t,r){if(null!==e)for(var n,i,o,a,l,s,c,u,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=(u=!!(c=d?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v<l;v++){var w=0,b=0;if(null!==(a=u?c.geometries[v]:c)){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===Ha(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Za(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 Ka(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 Qa(e,t){var r,n,i,o,a,l,s,c,u,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,c=p?e.features[r].properties:d?e.properties:{},u=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,c,u,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,c,u,h))return!1;f++}}function el(e,t){Qa(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(Xa.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 c={type:a,coordinates:e.coordinates[s]};if(!1===t(Xa.feature(c,n),r,s))return!1}})}function tl(e,t){el(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,c=0;return!1!==Ha(e,function(o,u,h,f,p){if(void 0===a||r>l||f>s||p>c)return a=o,l=r,s=f,c=p,void(i=0);var d=Xa.lineString([a,o],e.properties);if(!1===t(d,r,n,p,i))return!1;i++,a=o})&&void 0}}})}function rl(e,t){if(!e)throw new Error("geojson is required");el(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(Xa.lineString(o[a],e.properties),r,n,a))return!1}}})}Ja.coordAll=function(e){var t=[];return Ha(e,function(e){t.push(e)}),t},Ja.coordEach=Ha,Ja.coordReduce=function(e,t,r,n){var i=r;return Ha(e,function(e,n,o,a,l){i=0===n&&void 0===r?e:t(i,e,n,o,a,l)},n),i},Ja.featureEach=Ka,Ja.featureReduce=function(e,t,r){var n=r;return Ka(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n},Ja.findPoint=function(e,t){if(t=t||{},!Xa.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 Xa.point(s,l,t);case"MultiPoint":return i<0&&(i=s.length+i),Xa.point(s[i],l,t);case"LineString":return a<0&&(a=s.length+a),Xa.point(s[a],l,t);case"Polygon":return o<0&&(o=s.length+o),a<0&&(a=s[o].length+a),Xa.point(s[o][a],l,t);case"MultiLineString":return i<0&&(i=s.length+i),a<0&&(a=s[i].length+a),Xa.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),Xa.point(s[i][o][a],l,t)}throw new Error("geojson is invalid")},Ja.findSegment=function(e,t){if(t=t||{},!Xa.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),Xa.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),Xa.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),Xa.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),Xa.lineString([s[i][o][a],s[i][o][a+1]],l,t)}throw new Error("geojson is invalid")},Ja.flattenEach=el,Ja.flattenReduce=function(e,t,r){var n=r;return el(e,function(e,i,o){n=0===i&&0===o&&void 0===r?e:t(n,e,i,o)}),n},Ja.geomEach=Qa,Ja.geomReduce=function(e,t,r){var n=r;return Qa(e,function(e,i,o,a,l){n=0===i&&void 0===r?e:t(n,e,i,o,a,l)}),n},Ja.lineEach=rl,Ja.lineReduce=function(e,t,r){var n=r;return rl(e,function(e,i,o,a){n=0===i&&void 0===r?e:t(n,e,i,o,a)}),n},Ja.propEach=Za,Ja.propReduce=function(e,t,r){var n=r;return Za(e,function(e,i){n=0===i&&void 0===r?e:t(n,e,i)}),n},Ja.segmentEach=tl,Ja.segmentReduce=function(e,t,r){var n=r,i=!1;return tl(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($a,"__esModule",{value:!0});var nl=Ja;function il(e){var t=[1/0,1/0,-1/0,-1/0];return nl.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}il.default=il,$a.default=il;var ol=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(!La(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;La(e,l)&&(t.leaf?r.push(a):Fa(e,l)?this._all(a,r):i.push(a))}t=i.pop()}return r}collides(e){let t=this.data;if(!La(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(La(e,o)){if(t.leaf||Fa(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=Ca([]),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=xa(e,r.children,t);if(-1!==n)return r.children.splice(n,1),i.push(r),this._condense(i),this}s||r.leaf||!Fa(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=Ca(e.slice(t,r+1)),Pa(o,this.toBBox),o;n||(n=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,n-1))),o=Ca([]),o.leaf=!1,o.height=n;const l=Math.ceil(i/a),s=l*Math.ceil(Math.sqrt(a));Ta(e,t,r,s,this.compareMinX);for(let i=t;i<=r;i+=s){const t=Math.min(i+s-1,r);Ta(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 Pa(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=Ea(a),s=Ma(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),ja(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=Ca(r.children.splice(o,r.children.length-o));a.height=r.height,a.leaf=r.leaf,Pa(r,this.toBBox),Pa(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this.data=Ca([e,t]),this.data.height=e.height+1,this.data.leaf=!1,Pa(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=Sa(e,0,a,this.toBBox),l=Sa(e,a,r,this.toBBox),s=Oa(t,l),c=Ea(t)+Ea(l);s<i?(i=s,n=a,o=c<o?c:o):s===i&&c<o&&(o=c,n=a)}return n||r-t}_chooseSplitAxis(e,t,r){const n=e.leaf?this.compareMinX:ka,i=e.leaf?this.compareMinY:Aa;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=Sa(e,0,t,i),a=Sa(e,r-t,r,i);let l=za(o)+za(a);for(let n=t;n<r-t;n++){const t=e.children[n];ja(o,e.leaf?i(t):t),l+=za(o)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];ja(a,e.leaf?i(t):t),l+=za(a)}return l}_adjustParentBBoxes(e,t,r){for(let n=r;n>=0;n--)ja(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():Pa(e[r],this.toBBox)}},al=Ra,ll=Ba,sl=$a.default,cl=ll.featureEach;ll.coordEach;var ul=al.featureCollection;function hl(e){var t=new ol(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:sl(e),ol.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:sl(e),t.push(e)}):cl(e,function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:sl(e),t.push(e)}),ol.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:sl(e),ol.prototype.remove.call(this,e,t)},t.clear=function(){return ol.prototype.clear.call(this)},t.search=function(e){var t=ol.prototype.search.call(this,this.toBBox(e));return ul(t)},t.collides=function(e){return ol.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=ol.prototype.all.call(this);return ul(e)},t.toJSON=function(){return ol.prototype.toJSON.call(this)},t.fromJSON=function(e){return ol.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=sl(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=sl(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}function fl(e,t){var r={},n=[];if("LineString"===e.type&&(e=la(e)),"LineString"===t.type&&(t=la(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=pl(e,t);return i&&n.push(i),sa(n)}var o=ma();return o.load(da(t)),ga(da(e),function(e){ga(o.search(e),function(t){var i=pl(e,t);if(i){var o=ua(i).join(",");r[o]||(r[o]=!0,n.push(i))}})}),sa(n)}function pl(e,t){var r=ua(e),n=ua(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],c=n[0][1],u=n[1][0],h=n[1][1],f=(h-c)*(a-i)-(u-s)*(l-o),p=(u-s)*(o-c)-(h-c)*(i-s),d=(a-i)*(o-c)-(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(!ca(e[0])||!ca(e[1]))throw new Error("coordinates must contain numbers");return la({type:"Point",coordinates:e},t,r)}([i+g*(a-i),o+g*(l-o)]):null}function dl(e,t,r){if(null!==e)for(var n,i,o,a,l,s,c,u,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=(u=!!(c=d?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v<l;v++){var w=0,b=0;if(null!==(a=u?c.geometries[v]:c)){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===dl(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function gl(e,t){!function(e,t){var r,n,i,o,a,l,s,c,u,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,c=p?e.features[r].properties:d?e.properties:{},u=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,c,u,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,c,u,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(Q(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 c=e.coordinates[s];if(!1===t(Q({type:a,coordinates:c},n),r,s))return!1}})}function ml(e,t,r){var n=r,i=!1;return function(e,t){gl(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,c=0;return!1!==dl(e,function(o,u,h,f,p){if(void 0===a||r>l||f>s||p>c)return a=o,l=r,s=f,c=p,void(i=0);var d=te([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 yl(e,t,r){void 0===r&&(r={});var n=ee([1/0,1/0],{dist:1/0}),i=0;return gl(e,function(e){for(var o=ae(e),a=0;a<o.length-1;a++){var l=ee(o[a]);l.properties.dist=le(t,l,r);var s=ee(o[a+1]);s.properties.dist=le(t,s,r);var c=le(l,s,r),u=Math.max(l.properties.dist,s.properties.dist),h=ea(l,s),f=aa(t,u,h+90,r),p=aa(t,u,h-90,r),d=fl(te([f.geometry.coordinates,p.geometry.coordinates]),te([l.geometry.coordinates,s.geometry.coordinates])),g=null;d.features.length>0&&((g=d.features[0]).properties.dist=le(t,g,r),g.properties.location=i+le(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+c),g&&g.properties.dist<n.properties.dist&&((n=g).properties.index=a),i+=c}}),n}function vl(e,t){return void 0===t&&(t={}),ml(e,function(e,r){var n=r.geometry.coordinates;return e+le(n[0],n[1],t)},0)}ya.exports=hl,ma.default=hl;var wl=function(){function e(){return R(this,e),T(this,e,arguments)}return U(e,Zo),I(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,c=n.length-1;s<r&&c>0;)l=s,s+=le(ee(n[c]),ee(n[c-1])),c-=1;if(t>.5){var u=(r-l)/(s-l),h=1-u,f=[].concat($(n.slice(0,c+1)),[[n[c][0]*u+n[c+1][0]*h,n[c][1]*u+n[c+1][1]*h]]);return{fullRoute:n,end:q(q({},i),{},{current:r}),actRoute:f}}if(s<=r){var p=$(n.slice(n.length-2,n.length));return{fullRoute:n,end:q(q({},i),{},{current:r}),actRoute:p}}var d=(r-l)/(s-l),g=1-d,m=[[n[c][0]*d+n[c+1][0]*g,n[c][1]*d+n[c+1][1]*g]].concat($(n.slice(c+1,n.length)));return{fullRoute:n,end:q(q({},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=te(n),a=yl(o,t.end.point);r=vl(o)-a.properties.location}else console.warn("RouteCoordinatesArray: toValue.end: should have either along or point");return{fullRoute:n,end:q(q({},i),{},{from:null!=i.current?i.current:i.from,to:r})}}},{key:"originalRoute",get:function(){return this.state.fullRoute}}])}(),bl={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},_l=[{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"}],xl=[{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}}],Pl=[{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 Sl(e,t,r){if(null!==e)for(var n,i,o,a,l,s,c,u,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=(u=!!(c=d?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v<l;v++){var w=0,b=0;if(null!==(a=u?c.geometries[v]:c)){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===Sl(a.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function jl(e){var t=[1/0,1/0,-1/0,-1/0];return Sl(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 kl(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Al(e,t){void 0===t&&(t={});var r=jl(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(!kl(e[0])||!kl(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)}jl.default=jl;var El=6371008.8,zl={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:El,metres:El,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function Ml(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 Ol(e){return e%360*Math.PI/180}function Fl(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 Ll(e,t,r){void 0===r&&(r={});var n=Fl(e),i=Fl(t),o=Ol(i[1]-n[1]),a=Ol(i[0]-n[0]),l=Ol(n[1]),s=Ol(i[1]),c=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=zl[t];if(!r)throw new Error(t+" units is invalid");return e*r}(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),r.units)}function Cl(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,c,u=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]),Ml(a);s=ea(o[f],o[f-1])-180,c=aa(o[f],l,s,n),a.push(c.geometry.coordinates)}if(h>=r)return(l=r-h)?(s=ea(o[f],o[f-1])-180,c=aa(o[f],l,s,n),a.push(c.geometry.coordinates),Ml(a)):(a.push(o[f]),Ml(a));if(h>=t&&a.push(o[f]),f===o.length-1)return Ml(a);h+=Ll(o[f],o[f+1],n)}if(h<t&&o.length===u)throw new Error("Start position is beyond line");var p=o[o.length-1];return Ml([p,p])}function Tl(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 c=!1,u=0;u<s.length&&!c;u++)if(Rl(i,s[u][0],r.ignoreBoundary)){for(var h=!1,f=1;f<s[u].length&&!h;)Rl(i,s[u][f],!r.ignoreBoundary)&&(h=!0),f++;h||(c=!0)}return c}function Rl(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],c=t[o][1];if(e[1]*(a-s)+l*(s-e[0])+c*(e[0]-a)===0&&(a-e[0])*(s-e[0])<=0&&(l-e[1])*(c-e[1])<=0)return!r;l>e[1]!=c>e[1]&&e[0]<(s-a)*(e[1]-l)/(c-l)+a&&(n=!n)}return n}for(var Bl=function(){function e(){this.localStoarge=new S}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}(),Il={},Dl={byteLength:function(e){var t=Vl(e),r=t[0],n=t[1];return 3*(r+n)/4-n},toByteArray:function(e){var t,r,n=Vl(e),i=n[0],o=n[1],a=new Gl(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=Ul[e.charCodeAt(r)]<<18|Ul[e.charCodeAt(r+1)]<<12|Ul[e.charCodeAt(r+2)]<<6|Ul[e.charCodeAt(r+3)],a[l++]=t>>16&255,a[l++]=t>>8&255,a[l++]=255&t;2===o&&(t=Ul[e.charCodeAt(r)]<<2|Ul[e.charCodeAt(r+1)]>>4,a[l++]=255&t);1===o&&(t=Ul[e.charCodeAt(r)]<<10|Ul[e.charCodeAt(r+1)]<<4|Ul[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(Jl(e,a,a+o>l?l:a+o));1===n?(t=e[r-1],i.push(Nl[t>>2]+Nl[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(Nl[t>>10]+Nl[t>>4&63]+Nl[t<<2&63]+"="));return i.join("")}},Nl=[],Ul=[],Gl="undefined"!=typeof Uint8Array?Uint8Array:Array,Wl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ql=0;ql<64;++ql)Nl[ql]=Wl[ql],Ul[Wl.charCodeAt(ql)]=ql;function Vl(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 $l(e){return Nl[e>>18&63]+Nl[e>>12&63]+Nl[e>>6&63]+Nl[63&e]}function Jl(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($l(n));return i.join("")}Ul["-".charCodeAt(0)]=62,Ul["_".charCodeAt(0)]=63;var Yl={
|
|
1
|
+
import e from"react-native-geolocation-service";import{PermissionsAndroid as t,Platform as n,Animated as r,Easing as i,StyleSheet as o,View as a}from"react-native";import s from"react-native-compass-heading";import l,{useState as u,useRef as c,useEffect as h,useImperativeHandle as d,useMemo as p,forwardRef as f,isValidElement as g,useCallback as m}from"react";import{ShapeSource as v,CircleLayer as y,SymbolLayer as w,Animated as b,LineLayer as _,FillLayer as x,MarkerView as S,MapView as A,Camera as P,Images as M,VectorSource as C}from"@maplibre/maplibre-react-native";export{Animated,CircleLayer,FillLayer,ShapeSource as GeoJSONSource,ImageSource,Images,LineLayer,MarkerView as Marker,MarkerView,RasterSource,ShapeSource,SymbolLayer,VectorSource}from"@maplibre/maplibre-react-native";import k from"axios";import{MMKV as E}from"react-native-mmkv";import T from"react-native-aes-crypto";import L from"react-native-fs";import{unzip as R,unzipWithPassword as D}from"react-native-zip-archive";import F from"@react-native-community/netinfo";var O=function(e,t){return O=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])},O(e,t)};function N(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}O(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var j=function(){return j=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},j.apply(this,arguments)};function I(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 z(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 B(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 U(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 H(e,t,n){return t=Z(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,$()?Reflect.construct(t,n||[],Z(e).constructor):t.apply(e,n))}function G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(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,ee(r.key),r)}}function V(e,t,n){return t&&W(e.prototype,t),n&&W(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function q(e,t,n){return(t=ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}function Y(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&&X(e,t)}function $(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($=function(){return!!e})()}function J(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 K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach(function(t){q(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}function Q(e){return function(e){if(Array.isArray(e))return U(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 U(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)?U(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 ee(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 te(e){return te="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},te(e)}"function"==typeof SuppressedError&&SuppressedError;var ne=function(){function r(){this.gpsEnabled=!1,this.gpsWatchId=null,this.currentGPSPosition=null,this.gpsCallbacks={}}return r.prototype.requestGPSPermission=function(){return I(this,void 0,void 0,function(){var r,i,o,a,s;return z(this,function(l){switch(l.label){case 0:return l.trys.push([0,9,,10]),"android"!==n.OS?[3,4]:(r=t.PERMISSIONS.ACCESS_FINE_LOCATION,i=t.PERMISSIONS.ACCESS_COARSE_LOCATION,[4,t.check(r)]);case 1:return o=l.sent(),[4,t.check(i)];case 2:return a=l.sent(),o||a?[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}]:[4,t.request(r)];case 3:return(s=l.sent())===t.RESULTS.GRANTED?[2,{granted:!0,denied:!1,prompt:!1,state:"granted"}]:s===t.RESULTS.DENIED?[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}]:[2,{granted:!1,denied:!0,prompt:!1,state:"denied"}];case 4:if(!e.requestAuthorization)return[3,8];l.label=5;case 5:return l.trys.push([5,7,,8]),[4,e.requestAuthorization("whenInUse")];case 6:switch(s=l.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 l.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 l.sent(),[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}];case 10:return[2]}})})},r.prototype.isGPSPermissionGranted=function(){return I(this,void 0,void 0,function(){return z(this,function(e){switch(e.label){case 0:return[4,this.requestGPSPermission()];case 1:return[2,e.sent().granted]}})})},r.prototype.enableGPS=function(e){return void 0===e&&(e={}),I(this,void 0,void 0,function(){var t;return z(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]}})})},r.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)},r.prototype.destroyGPS=function(){this.disableGPS(),this.gpsCallbacks={}},r.prototype.startGPS=function(t){var n=this;void 0===t&&(t={});var r=t.enableHighAccuracy,i=void 0===r||r,o=t.timeout,a=void 0===o?1e4:o,s=t.maximumAge,l=void 0===s?0:s;if(!e||!e.watchPosition){var u=new Error("Geolocation is not supported by this runtime.");throw u.code=0,u}this.gpsEnabled=!0;var c={enableHighAccuracy:i,timeout:a,maximumAge:l,distanceFilter:0,interval:100,fastestInterval:10};this.gpsWatchId=e.watchPosition(function(e){var t=n.mapNativePosition(e);n.currentGPSPosition=t,n.gpsCallbacks.onLocationUpdate&&n.gpsCallbacks.onLocationUpdate(t)},function(e){n.handleGPSError(e)},c)},r.prototype.stopGPS=function(){if(this.gpsEnabled=!1,null!==this.gpsWatchId){try{e.clearWatch(this.gpsWatchId)}catch(e){}this.gpsWatchId=null}},r.prototype.getGPSPosition=function(t){var n=this;void 0===t&&(t={});var r=t.enableHighAccuracy,i=void 0===r||r,o=t.timeout,a=void 0===o?1e4:o,s=t.maximumAge,l=void 0===s?15e3:s;return new Promise(function(t,r){e&&e.getCurrentPosition?e.getCurrentPosition(function(e){var r=n.mapNativePosition(e);n.currentGPSPosition=r,t(r)},function(e){return r(e)},{enableHighAccuracy:i,timeout:a,maximumAge:l}):r(new Error("Geolocation is not supported by this runtime."))})},r.prototype.isGPSEnabled=function(){return this.gpsEnabled},r.prototype.getCurrentGPSPosition=function(){return this.currentGPSPosition},r.prototype.handleGPSError=function(e){var t="Unknown GPS error occurred.",n=e&&"object"===te(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)},r.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}},r}(),re=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 I(this,void 0,void 0,function(){var e;return z(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 I(this,void 0,void 0,function(){return z(this,function(e){try{return[2,new Promise(function(e){var t=!1,n=setTimeout(function(){t||(t=!0,e(!1))},500);try{s.start(1,function(r){r.heading,r.accuracy;t||(t=!0,clearTimeout(n),s.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 I(this,void 0,void 0,function(){var t,n;return z(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{s.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{s.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 ie(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(j(j(j({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 oe(e){var t,n=e.position,r=e.showAccuracy,i=void 0===r||r,o=e.pulse,a=void 0===o||o,s=e.color,f=void 0===s?"#1E90FF":s,g=e.pulseColor,m=void 0===g?"#b7d8f7":g,b=e.showArrow,_=void 0===b||b,x=e.ref,S=u(!0),A=S[0],P=S[1],M=u(!0),C=M[0],k=M[1],E=u(n),T=E[0],L=E[1],R=u(0),D=R[0],F=R[1],O=c(null),N=c({});h(function(){L(n)},[n]),h(function(){if(a){var e=Date.now(),t=function(){var n=(Date.now()-e)%2e3,r=.5*Math.sin(n/2e3*Math.PI*2)+.5;F(r),O.current=requestAnimationFrame(t)};return O.current=requestAnimationFrame(t),function(){O.current&&cancelAnimationFrame(O.current),O.current=null}}},[a]),d(x,function(){return Object.assign(N.current,{update:function(e,t,n){var r=null!=n&&Number.isFinite(n);L({coordinates:e,accuracy:t,timestamp:Date.now(),heading:r?n:void 0}),k(!r)},updateHeading:function(e){var t=null!=e&&Number.isFinite(e);L(function(n){return n?j(j({},n),{heading:t?e:void 0}):n}),k(!t)},show:function(){P(!0)},hide:function(){P(!1)},remove:function(){P(!1),L(null)}}),N.current});var I=p(function(){var e;return T&&A?{type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:T.coordinates},properties:{radius:8,accuracy:T.accuracy,heading:null!==(e=T.heading)&&void 0!==e?e:0}}]}:{type:"FeatureCollection",features:[]}},[T,A]);if(!T||!A)return null;var z=a?8+9.6*D:8,B=a?Math.max(Math.min(.9*(1-.7*D),.9),.2):.95;return l.createElement(l.Fragment,null,l.createElement(v,{id:"gps-source",data:I},l.createElement(y,{id:"gps-accuracy",style:{circleColor:f,circleOpacity:.2,circleRadius:["*",["get","accuracy"],.6],circleStrokeColor:f,circleStrokeWidth:1,visibility:i?"visible":"none"}}),l.createElement(y,{id:"gps-pulse",style:{circleColor:m,circleOpacity:B,circleRadius:z,circleStrokeColor:m,circleStrokeWidth:2,visibility:C&&a?"visible":"none"}}),l.createElement(y,{id:"gps-dot",style:{circleColor:f,circleOpacity:.95,circleRadius:6,circleStrokeColor:"#ffffff",circleStrokeWidth:2,visibility:C?"visible":"none"}}),l.createElement(w,{id:"gps-arrow",style:{iconImage:"arrow-marker",iconSize:.05,iconAllowOverlap:!0,iconRotate:null!==(t=T.heading)&&void 0!==t?t:0,iconRotationAlignment:"map",iconIgnorePlacement:!0,visibility:!C&&null!=T.heading&&Number.isFinite(T.heading)&&_?"visible":"none"}})))}function ae(){var e;try{return null!==(e=require("expo-sensors").DeviceMotion)&&void 0!==e?e:null}catch(e){return null}}function se(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 le(){var e=null;return{isSupported:function(){return null!=ae()},requestPermission:function(){return I(this,void 0,void 0,function(){var e,t;return z(this,function(n){switch(n.label){case 0:if(!(e=ae()))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=ae();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:se(e.accelerationIncludingGravity),acceleration:se(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 ue(){return globalThis.DeviceMotionEvent}var ce,he,de=(ce=le(),he=null,{isSupported:function(){return ce.isSupported()||!!ue()},requestPermission:function(){return I(this,void 0,void 0,function(){var e;return z(this,function(t){switch(t.label){case 0:if(ce.isSupported())return[2,ce.requestPermission()];if(!(null==(e=ue())?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){ce.isSupported()?ce.start(e):(null==he||he(),he=function(e){if("undefined"==typeof window||!ue())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(){ce.stop(),null==he||he(),he=null}}),pe=function(){function e(e){void 0===e&&(e=de),this.handler=null,this.listening=!1,this.source=e}return e.prototype.requestPermission=function(){return I(this,void 0,void 0,function(){return z(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}(),fe=6371008.8,ge={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:fe,metres:fe,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function me(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 ve(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(!_e(e[0])||!_e(e[1]))throw new Error("coordinates must contain numbers");return me({type:"Point",coordinates:e},t,n)}function ye(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 me({type:"LineString",coordinates:e},t,n)}function we(e,t,n){return void 0===n&&(n={}),me({type:"MultiPoint",coordinates:e},t,n)}function be(e){return e%360*Math.PI/180}function _e(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}var xe="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 Ae=function(){this.__data__=[],this.size=0};var Pe=function(e,t){return e===t||e!=e&&t!=t},Me=Pe;var Ce=function(e,t){for(var n=e.length;n--;)if(Me(e[n][0],t))return n;return-1},ke=Ce,Ee=Array.prototype.splice;var Te=Ce;var Le=Ce;var Re=Ce;var De=Ae,Fe=function(e){var t=this.__data__,n=ke(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ee.call(t,n,1),--this.size,!0)},Oe=function(e){var t=this.__data__,n=Te(t,e);return n<0?void 0:t[n][1]},Ne=function(e){return Le(this.__data__,e)>-1},je=function(e,t){var n=this.__data__,r=Re(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Ie(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])}}Ie.prototype.clear=De,Ie.prototype.delete=Fe,Ie.prototype.get=Oe,Ie.prototype.has=Ne,Ie.prototype.set=je;var ze=Ie,Be=ze;var Ue=function(){this.__data__=new Be,this.size=0};var He=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Ge=function(e){return this.__data__.get(e)};var We=function(e){return this.__data__.has(e)},Ve="object"==typeof xe&&xe&&xe.Object===Object&&xe,qe=Ve,Ze="object"==typeof self&&self&&self.Object===Object&&self,Ye=qe||Ze||Function("return this")(),$e=Ye.Symbol,Je=$e,Ke=Object.prototype,Xe=Ke.hasOwnProperty,Qe=Ke.toString,et=Je?Je.toStringTag:void 0;var tt=function(e){var t=Xe.call(e,et),n=e[et];try{e[et]=void 0;var r=!0}catch(e){}var i=Qe.call(e);return r&&(t?e[et]=n:delete e[et]),i},nt=Object.prototype.toString;var rt=tt,it=function(e){return nt.call(e)},ot=$e?$e.toStringTag:void 0;var at=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ot&&ot in Object(e)?rt(e):it(e)};var st=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},lt=at,ut=st;var ct,ht=function(e){if(!ut(e))return!1;var t=lt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},dt=Ye["__core-js_shared__"],pt=(ct=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||""))?"Symbol(src)_1."+ct:"";var ft=function(e){return!!pt&&pt in e},gt=Function.prototype.toString;var mt=function(e){if(null!=e){try{return gt.call(e)}catch(e){}try{return e+""}catch(e){}}return""},vt=ht,yt=ft,wt=st,bt=mt,_t=/^\[object .+?Constructor\]$/,xt=Function.prototype,St=Object.prototype,At=xt.toString,Pt=St.hasOwnProperty,Mt=RegExp("^"+At.call(Pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ct=function(e){return!(!wt(e)||yt(e))&&(vt(e)?Mt:_t).test(bt(e))},kt=function(e,t){return null==e?void 0:e[t]};var Et=function(e,t){var n=kt(e,t);return Ct(n)?n:void 0},Tt=Et(Ye,"Map"),Lt=Et(Object,"create"),Rt=Lt;var Dt=function(){this.__data__=Rt?Rt(null):{},this.size=0};var Ft=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ot=Lt,Nt=Object.prototype.hasOwnProperty;var jt=function(e){var t=this.__data__;if(Ot){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Nt.call(t,e)?t[e]:void 0},It=Lt,zt=Object.prototype.hasOwnProperty;var Bt=Lt;var Ut=Dt,Ht=Ft,Gt=jt,Wt=function(e){var t=this.__data__;return It?void 0!==t[e]:zt.call(t,e)},Vt=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Bt&&void 0===t?"__lodash_hash_undefined__":t,this};function qt(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])}}qt.prototype.clear=Ut,qt.prototype.delete=Ht,qt.prototype.get=Gt,qt.prototype.has=Wt,qt.prototype.set=Vt;var Zt=qt,Yt=ze,$t=Tt;var Jt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Kt=function(e,t){var n=e.__data__;return Jt(t)?n["string"==typeof t?"string":"hash"]:n.map},Xt=Kt;var Qt=Kt;var en=Kt;var tn=Kt;var nn=function(){this.size=0,this.__data__={hash:new Zt,map:new($t||Yt),string:new Zt}},rn=function(e){var t=Xt(this,e).delete(e);return this.size-=t?1:0,t},on=function(e){return Qt(this,e).get(e)},an=function(e){return en(this,e).has(e)},sn=function(e,t){var n=tn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function ln(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])}}ln.prototype.clear=nn,ln.prototype.delete=rn,ln.prototype.get=on,ln.prototype.has=an,ln.prototype.set=sn;var un=ze,cn=Tt,hn=ln;var dn=ze,pn=Ue,fn=He,gn=Ge,mn=We,vn=function(e,t){var n=this.__data__;if(n instanceof un){var r=n.__data__;if(!cn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new hn(r)}return n.set(e,t),this.size=n.size,this};function yn(e){var t=this.__data__=new dn(e);this.size=t.size}yn.prototype.clear=pn,yn.prototype.delete=fn,yn.prototype.get=gn,yn.prototype.has=mn,yn.prototype.set=vn;var wn=yn;var bn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},_n=Et,xn=function(){try{var e=_n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Sn=function(e,t,n){"__proto__"==t&&xn?xn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},An=Sn,Pn=Pe,Mn=Object.prototype.hasOwnProperty;var Cn=function(e,t,n){var r=e[t];Mn.call(e,t)&&Pn(r,n)&&(void 0!==n||t in e)||An(e,t,n)},kn=Cn,En=Sn;var Tn=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?En(n,s,l):kn(n,s,l)}return n};var Ln=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Rn=function(e){return null!=e&&"object"==typeof e},Dn=at,Fn=Rn;var On=function(e){return Fn(e)&&"[object Arguments]"==Dn(e)},Nn=Rn,jn=Object.prototype,In=jn.hasOwnProperty,zn=jn.propertyIsEnumerable,Bn=On(function(){return arguments}())?On:function(e){return Nn(e)&&In.call(e,"callee")&&!zn.call(e,"callee")},Un=Array.isArray,Hn={};var Gn=function(){return!1};!function(e,t){var n=Ye,r=Gn,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 Hn},set exports(e){Hn=e}},Hn);var Wn=/^(?:0|[1-9]\d*)$/;var Vn=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Wn.test(e))&&e>-1&&e%1==0&&e<t};var qn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Zn=at,Yn=qn,$n=Rn,Jn={};Jn["[object Float32Array]"]=Jn["[object Float64Array]"]=Jn["[object Int8Array]"]=Jn["[object Int16Array]"]=Jn["[object Int32Array]"]=Jn["[object Uint8Array]"]=Jn["[object Uint8ClampedArray]"]=Jn["[object Uint16Array]"]=Jn["[object Uint32Array]"]=!0,Jn["[object Arguments]"]=Jn["[object Array]"]=Jn["[object ArrayBuffer]"]=Jn["[object Boolean]"]=Jn["[object DataView]"]=Jn["[object Date]"]=Jn["[object Error]"]=Jn["[object Function]"]=Jn["[object Map]"]=Jn["[object Number]"]=Jn["[object Object]"]=Jn["[object RegExp]"]=Jn["[object Set]"]=Jn["[object String]"]=Jn["[object WeakMap]"]=!1;var Kn=function(e){return $n(e)&&Yn(e.length)&&!!Jn[Zn(e)]};var Xn=function(e){return function(t){return e(t)}},Qn={};!function(e,t){var n=Ve,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 Qn},set exports(e){Qn=e}},Qn);var er=Kn,tr=Xn,nr=Qn&&Qn.isTypedArray,rr=nr?tr(nr):er,ir=Ln,or=Bn,ar=Un,sr=Hn,lr=Vn,ur=rr,cr=Object.prototype.hasOwnProperty;var hr=function(e,t){var n=ar(e),r=!n&&or(e),i=!n&&!r&&sr(e),o=!n&&!r&&!i&&ur(e),a=n||r||i||o,s=a?ir(e.length,String):[],l=s.length;for(var u in e)!t&&!cr.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||lr(u,l))||s.push(u);return s},dr=Object.prototype;var pr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||dr)};var fr=function(e,t){return function(n){return e(t(n))}},gr=fr(Object.keys,Object),mr=pr,vr=gr,yr=Object.prototype.hasOwnProperty;var wr=ht,br=qn;var _r=function(e){return null!=e&&br(e.length)&&!wr(e)},xr=hr,Sr=function(e){if(!mr(e))return vr(e);var t=[];for(var n in Object(e))yr.call(e,n)&&"constructor"!=n&&t.push(n);return t},Ar=_r;var Pr=function(e){return Ar(e)?xr(e):Sr(e)},Mr=Tn,Cr=Pr;var kr=function(e,t){return e&&Mr(t,Cr(t),e)};var Er=st,Tr=pr,Lr=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Rr=Object.prototype.hasOwnProperty;var Dr=hr,Fr=function(e){if(!Er(e))return Lr(e);var t=Tr(e),n=[];for(var r in e)("constructor"!=r||!t&&Rr.call(e,r))&&n.push(r);return n},Or=_r;var Nr=function(e){return Or(e)?Dr(e,!0):Fr(e)},jr=Tn,Ir=Nr;var zr=function(e,t){return e&&jr(t,Ir(t),e)},Br={};!function(e,t){var n=Ye,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 Br},set exports(e){Br=e}},Br);var Ur=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var Hr=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 Gr=function(){return[]},Wr=Hr,Vr=Gr,qr=Object.prototype.propertyIsEnumerable,Zr=Object.getOwnPropertySymbols,Yr=Zr?function(e){return null==e?[]:(e=Object(e),Wr(Zr(e),function(t){return qr.call(e,t)}))}:Vr,$r=Tn,Jr=Yr;var Kr=function(e,t){return $r(e,Jr(e),t)};var Xr=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Qr=fr(Object.getPrototypeOf,Object),ei=Xr,ti=Qr,ni=Yr,ri=Gr,ii=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)ei(t,ni(e)),e=ti(e);return t}:ri,oi=Tn,ai=ii;var si=function(e,t){return oi(e,ai(e),t)},li=Xr,ui=Un;var ci=function(e,t,n){var r=t(e);return ui(e)?r:li(r,n(e))},hi=ci,di=Yr,pi=Pr;var fi=function(e){return hi(e,pi,di)},gi=ci,mi=ii,vi=Nr;var yi=function(e){return gi(e,vi,mi)},wi=Et(Ye,"DataView"),bi=Tt,_i=Et(Ye,"Promise"),xi=Et(Ye,"Set"),Si=Et(Ye,"WeakMap"),Ai=at,Pi=mt,Mi="[object Map]",Ci="[object Promise]",ki="[object Set]",Ei="[object WeakMap]",Ti="[object DataView]",Li=Pi(wi),Ri=Pi(bi),Di=Pi(_i),Fi=Pi(xi),Oi=Pi(Si),Ni=Ai;(wi&&Ni(new wi(new ArrayBuffer(1)))!=Ti||bi&&Ni(new bi)!=Mi||_i&&Ni(_i.resolve())!=Ci||xi&&Ni(new xi)!=ki||Si&&Ni(new Si)!=Ei)&&(Ni=function(e){var t=Ai(e),n="[object Object]"==t?e.constructor:void 0,r=n?Pi(n):"";if(r)switch(r){case Li:return Ti;case Ri:return Mi;case Di:return Ci;case Fi:return ki;case Oi:return Ei}return t});var ji=Ni,Ii=Object.prototype.hasOwnProperty;var zi=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ii.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Bi=Ye.Uint8Array;var Ui=function(e){var t=new e.constructor(e.byteLength);return new Bi(t).set(new Bi(e)),t},Hi=Ui;var Gi=function(e,t){var n=t?Hi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},Wi=/\w*$/;var Vi=function(e){var t=new e.constructor(e.source,Wi.exec(e));return t.lastIndex=e.lastIndex,t},qi=$e?$e.prototype:void 0,Zi=qi?qi.valueOf:void 0;var Yi=Ui;var $i=function(e,t){var n=t?Yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},Ji=Ui,Ki=Gi,Xi=Vi,Qi=function(e){return Zi?Object(Zi.call(e)):{}},eo=$i;var to=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Ji(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return Ki(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 eo(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 Xi(e);case"[object Symbol]":return Qi(e)}},no=st,ro=Object.create,io=function(){function e(){}return function(t){if(!no(t))return{};if(ro)return ro(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),oo=Qr,ao=pr;var so=function(e){return"function"!=typeof e.constructor||ao(e)?{}:io(oo(e))},lo=ji,uo=Rn;var co=function(e){return uo(e)&&"[object Map]"==lo(e)},ho=Xn,po=Qn&&Qn.isMap,fo=po?ho(po):co,go=ji,mo=Rn;var vo=function(e){return mo(e)&&"[object Set]"==go(e)},yo=Xn,wo=Qn&&Qn.isSet,bo=wo?yo(wo):vo,_o=wn,xo=bn,So=Cn,Ao=kr,Po=zr,Mo=Br,Co=Ur,ko=Kr,Eo=si,To=fi,Lo=yi,Ro=ji,Do=zi,Fo=to,Oo=so,No=Un,jo=Hn,Io=fo,zo=st,Bo=bo,Uo=Pr,Ho=Nr,Go="[object Arguments]",Wo="[object Function]",Vo="[object Object]",qo={};qo[Go]=qo["[object Array]"]=qo["[object ArrayBuffer]"]=qo["[object DataView]"]=qo["[object Boolean]"]=qo["[object Date]"]=qo["[object Float32Array]"]=qo["[object Float64Array]"]=qo["[object Int8Array]"]=qo["[object Int16Array]"]=qo["[object Int32Array]"]=qo["[object Map]"]=qo["[object Number]"]=qo[Vo]=qo["[object RegExp]"]=qo["[object Set]"]=qo["[object String]"]=qo["[object Symbol]"]=qo["[object Uint8Array]"]=qo["[object Uint8ClampedArray]"]=qo["[object Uint16Array]"]=qo["[object Uint32Array]"]=!0,qo["[object Error]"]=qo[Wo]=qo["[object WeakMap]"]=!1;var Zo=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(!zo(t))return t;var h=No(t);if(h){if(s=Do(t),!l)return Co(t,s)}else{var d=Ro(t),p=d==Wo||"[object GeneratorFunction]"==d;if(jo(t))return Mo(t,l);if(d==Vo||d==Go||p&&!o){if(s=u||p?{}:Oo(t),!l)return u?Eo(t,Po(s,t)):ko(t,Ao(s,t))}else{if(!qo[d])return o?t:{};s=Fo(t,d,l)}}a||(a=new _o);var f=a.get(t);if(f)return f;a.set(t,s),Bo(t)?t.forEach(function(i){s.add(e(i,n,r,i,t,a))}):Io(t)&&t.forEach(function(i,o){s.set(o,e(i,n,r,o,t,a))});var g=h?void 0:(c?u?Lo:To:u?Ho:Uo)(t);return xo(g||t,function(i,o){g&&(i=t[o=i]),So(s,o,e(i,n,r,o,t,a))}),s},Yo=Zo;var $o=function(e){return Yo(e,5)},Jo=Object.getPrototypeOf(r.ValueXY);__DEV__&&"AnimatedWithChildren"!==Jo.name&&console.error("AnimatedCoordinatesArray could not obtain AnimatedWithChildren base class");var Ko={useNativeDriver:!1},Xo=function(){function e(){var t,n;return G(this,e),(n=H(this,e)).state=(t=n).onInitialState.apply(t,arguments),n}return Y(e,Jo),V(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(Q(s),Q(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(Q(s),Q(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 K(K({},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 t=new r.Value(1);return this.animate(t,r.loop(r.timing(t,K(K(K({},Ko),e),{},{toValue:0}))),e)}},{key:"spring",value:function(e){var t=new r.Value(0);return this.animate(t,r.spring(t,K(K(K({},Ko),e),{},{toValue:1})),e)}},{key:"decay",value:function(e){var t=new r.Value(0);return this.animate(t,r.decay(this.progressValue,K(K(K({},Ko),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 Qo(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 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,n){void 0===n&&(n={});var r=Qo(e),i=Qo(t),o=be(i[1]-r[1]),a=be(i[0]-r[0]),s=be(r[1]),l=be(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=ge[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 na(e){return e%360*Math.PI/180}function ra(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 ia(e,t,n){if(void 0===n&&(n={}),!0===n.final)return function(e,t){var n=ia(t,e);return n=(n+180)%360}(e,t);var r=ra(e),i=ra(t),o=na(r[0]),a=na(i[0]),s=na(r[1]),l=na(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 oa=6371008.8,aa={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:oa,metres:oa,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function sa(e){return 180*(e%(2*Math.PI))/Math.PI}function la(e){return e%360*Math.PI/180}function ua(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function ca(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=la(i[0]),a=la(i[1]),s=la(n),l=function(e,t){void 0===t&&(t="kilometers");var n=aa[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(!ua(e[0])||!ua(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)}([sa(o+Math.atan2(Math.sin(s)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(u))),sa(u)],r.properties)}function ha(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 da(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 pa(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function fa(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 ga(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 ma(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 va(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(ga(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(ga({type:a,coordinates:u},r),n,l))return!1}})}function ya(e){if(!e)throw new Error("geojson is required");var t=[];return va(e,function(e){!function(e,t){var n=[],r=e.geometry;if(null!==r){switch(r.type){case"Polygon":n=ma(r);break;case"LineString":n=[ma(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 ga({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 wa(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 ba={},_a={get exports(){return ba},set exports(e){ba=e}};function xa(e,t,n,r,i){Sa(e,t,n||0,r||e.length-1,i||Pa)}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(Aa(e,n,t),i(e[r],c)>0&&Aa(e,n,r);h<d;){for(Aa(e,h,d),h++,d--;i(e[h],c)<0;)h++;for(;i(e[d],c)>0;)d--}0===i(e[n],c)?Aa(e,n,d):Aa(e,++d,r),d<=t&&(n=d+1),t<=d&&(r=d-1)}}function Aa(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Pa(e,t){return e<t?-1:e>t?1:0}function Ma(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 Ca(e,t){ka(e,0,e.children.length,t,e)}function ka(e,t,n,r,i){i||(i=Ia(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];Ea(i,e.leaf?r(t):t)}return i}function Ea(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 Ta(e,t){return e.minX-t.minX}function La(e,t){return e.minY-t.minY}function Ra(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function Da(e){return e.maxX-e.minX+(e.maxY-e.minY)}function Fa(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 Oa(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 Na(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function ja(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function Ia(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function za(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;xa(e,a,t,n,i),o.push(t,a,a,n)}}var Ba={};!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")}}(Ba);var Ua={};Object.defineProperty(Ua,"__esModule",{value:!0});var Ha=Ba;function Ga(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===Ga(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Wa(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 Va(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 qa(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 Za(e,t){qa(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(Ha.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(Ha.feature(u,r),n,l))return!1}})}function Ya(e,t){Za(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!==Ga(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=Ha.lineString([a,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,a=o})&&void 0}}})}function $a(e,t){if(!e)throw new Error("geojson is required");Za(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(Ha.lineString(o[a],e.properties),n,r,a))return!1}}})}Ua.coordAll=function(e){var t=[];return Ga(e,function(e){t.push(e)}),t},Ua.coordEach=Ga,Ua.coordReduce=function(e,t,n,r){var i=n;return Ga(e,function(e,r,o,a,s){i=0===r&&void 0===n?e:t(i,e,r,o,a,s)},r),i},Ua.featureEach=Va,Ua.featureReduce=function(e,t,n){var r=n;return Va(e,function(e,i){r=0===i&&void 0===n?e:t(r,e,i)}),r},Ua.findPoint=function(e,t){if(t=t||{},!Ha.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 Ha.point(l,s,t);case"MultiPoint":return i<0&&(i=l.length+i),Ha.point(l[i],s,t);case"LineString":return a<0&&(a=l.length+a),Ha.point(l[a],s,t);case"Polygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),Ha.point(l[o][a],s,t);case"MultiLineString":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),Ha.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),Ha.point(l[i][o][a],s,t)}throw new Error("geojson is invalid")},Ua.findSegment=function(e,t){if(t=t||{},!Ha.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),Ha.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),Ha.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),Ha.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),Ha.lineString([l[i][o][a],l[i][o][a+1]],s,t)}throw new Error("geojson is invalid")},Ua.flattenEach=Za,Ua.flattenReduce=function(e,t,n){var r=n;return Za(e,function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)}),r},Ua.geomEach=qa,Ua.geomReduce=function(e,t,n){var r=n;return qa(e,function(e,i,o,a,s){r=0===i&&void 0===n?e:t(r,e,i,o,a,s)}),r},Ua.lineEach=$a,Ua.lineReduce=function(e,t,n){var r=n;return $a(e,function(e,i,o,a){r=0===i&&void 0===n?e:t(r,e,i,o,a)}),r},Ua.propEach=Wa,Ua.propReduce=function(e,t,n){var r=n;return Wa(e,function(e,i){r=0===i&&void 0===n?e:t(r,e,i)}),r},Ua.segmentEach=Ya,Ua.segmentReduce=function(e,t,n){var r=n,i=!1;return Ya(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 Ja={},Ka={},Xa={};!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")}}(Xa),Object.defineProperty(Ka,"__esModule",{value:!0});var Qa=Xa;function es(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===es(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ts(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 ns(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 rs(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 is(e,t){rs(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(Qa.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(Qa.feature(u,r),n,l))return!1}})}function os(e,t){is(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!==es(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=Qa.lineString([a,o],e.properties);if(!1===t(f,n,r,p,i))return!1;i++,a=o})&&void 0}}})}function as(e,t){if(!e)throw new Error("geojson is required");is(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(Qa.lineString(o[a],e.properties),n,r,a))return!1}}})}Ka.coordAll=function(e){var t=[];return es(e,function(e){t.push(e)}),t},Ka.coordEach=es,Ka.coordReduce=function(e,t,n,r){var i=n;return es(e,function(e,r,o,a,s){i=0===r&&void 0===n?e:t(i,e,r,o,a,s)},r),i},Ka.featureEach=ns,Ka.featureReduce=function(e,t,n){var r=n;return ns(e,function(e,i){r=0===i&&void 0===n?e:t(r,e,i)}),r},Ka.findPoint=function(e,t){if(t=t||{},!Qa.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 Qa.point(l,s,t);case"MultiPoint":return i<0&&(i=l.length+i),Qa.point(l[i],s,t);case"LineString":return a<0&&(a=l.length+a),Qa.point(l[a],s,t);case"Polygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),Qa.point(l[o][a],s,t);case"MultiLineString":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),Qa.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),Qa.point(l[i][o][a],s,t)}throw new Error("geojson is invalid")},Ka.findSegment=function(e,t){if(t=t||{},!Qa.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),Qa.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),Qa.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),Qa.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),Qa.lineString([l[i][o][a],l[i][o][a+1]],s,t)}throw new Error("geojson is invalid")},Ka.flattenEach=is,Ka.flattenReduce=function(e,t,n){var r=n;return is(e,function(e,i,o){r=0===i&&0===o&&void 0===n?e:t(r,e,i,o)}),r},Ka.geomEach=rs,Ka.geomReduce=function(e,t,n){var r=n;return rs(e,function(e,i,o,a,s){r=0===i&&void 0===n?e:t(r,e,i,o,a,s)}),r},Ka.lineEach=as,Ka.lineReduce=function(e,t,n){var r=n;return as(e,function(e,i,o,a){r=0===i&&void 0===n?e:t(r,e,i,o,a)}),r},Ka.propEach=ts,Ka.propReduce=function(e,t,n){var r=n;return ts(e,function(e,i){r=0===i&&void 0===n?e:t(r,e,i)}),r},Ka.segmentEach=os,Ka.segmentReduce=function(e,t,n){var r=n,i=!1;return os(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(Ja,"__esModule",{value:!0});var ss=Ka;function ls(e){var t=[1/0,1/0,-1/0,-1/0];return ss.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}ls.default=ls,Ja.default=ls;var us=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(!ja(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;ja(e,s)&&(t.leaf?n.push(a):Na(e,s)?this._all(a,n):i.push(a))}t=i.pop()}return n}collides(e){let t=this.data;if(!ja(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(ja(e,o)){if(t.leaf||Na(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=Ia([]),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=Ma(e,n.children,t);if(-1!==r)return n.children.splice(r,1),i.push(n),this._condense(i),this}l||n.leaf||!Na(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=Ia(e.slice(t,n+1)),Ca(o,this.toBBox),o;r||(r=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,r-1))),o=Ia([]),o.leaf=!1,o.height=r;const s=Math.ceil(i/a),l=s*Math.ceil(Math.sqrt(a));za(e,t,n,l,this.compareMinX);for(let i=t;i<=n;i+=l){const t=Math.min(i+l-1,n);za(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 Ca(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=Ra(a),l=Fa(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),Ea(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=Ia(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,Ca(n,this.toBBox),Ca(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this.data=Ia([e,t]),this.data.height=e.height+1,this.data.leaf=!1,Ca(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=ka(e,0,a,this.toBBox),s=ka(e,a,n,this.toBBox),l=Oa(t,s),u=Ra(t)+Ra(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:Ta,i=e.leaf?this.compareMinY:La;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=ka(e,0,t,i),a=ka(e,n-t,n,i);let s=Da(o)+Da(a);for(let r=t;r<n-t;r++){const t=e.children[r];Ea(o,e.leaf?i(t):t),s+=Da(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];Ea(a,e.leaf?i(t):t),s+=Da(a)}return s}_adjustParentBBoxes(e,t,n){for(let r=n;r>=0;r--)Ea(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():Ca(e[n],this.toBBox)}},cs=Ba,hs=Ua,ds=Ja.default,ps=hs.featureEach;hs.coordEach;var fs=cs.featureCollection;function gs(e){var t=new us(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:ds(e),us.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:ds(e),t.push(e)}):ps(e,function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:ds(e),t.push(e)}),us.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:ds(e),us.prototype.remove.call(this,e,t)},t.clear=function(){return us.prototype.clear.call(this)},t.search=function(e){var t=us.prototype.search.call(this,this.toBBox(e));return fs(t)},t.collides=function(e){return us.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=us.prototype.all.call(this);return fs(e)},t.toJSON=function(){return us.prototype.toJSON.call(this)},t.fromJSON=function(e){return us.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=ds(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=ds(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}function ms(e,t){var n={},r=[];if("LineString"===e.type&&(e=ha(e)),"LineString"===t.type&&(t=ha(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=vs(e,t);return i&&r.push(i),da(r)}var o=ba();return o.load(ya(t)),wa(ya(e),function(e){wa(o.search(e),function(t){var i=vs(e,t);if(i){var o=fa(i).join(",");n[o]||(n[o]=!0,r.push(i))}})}),da(r)}function vs(e,t){var n=fa(e),r=fa(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(!pa(e[0])||!pa(e[1]))throw new Error("coordinates must contain numbers");return ha({type:"Point",coordinates:e},t,n)}([i+g*(a-i),o+g*(s-o)]):null}function ys(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===ys(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ws(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(me(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(me({type:a,coordinates:u},r),n,l))return!1}})}function bs(e,t,n){var r=n,i=!1;return function(e,t){ws(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!==ys(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=ye([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 _s(e,t,n){void 0===n&&(n={});var r=ve([1/0,1/0],{dist:1/0}),i=0;return ws(e,function(e){for(var o=ea(e),a=0;a<o.length-1;a++){var s=ve(o[a]);s.properties.dist=ta(t,s,n);var l=ve(o[a+1]);l.properties.dist=ta(t,l,n);var u=ta(s,l,n),c=Math.max(s.properties.dist,l.properties.dist),h=ia(s,l),d=ca(t,c,h+90,n),p=ca(t,c,h-90,n),f=ms(ye([d.geometry.coordinates,p.geometry.coordinates]),ye([s.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=ta(t,g,n),g.properties.location=i+ta(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 xs(e,t){return void 0===t&&(t={}),bs(e,function(e,n){var r=n.geometry.coordinates;return e+ta(r[0],r[1],t)},0)}_a.exports=gs,ba.default=gs;var Ss=function(){function e(){return G(this,e),H(this,e,arguments)}return Y(e,Xo),V(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+=ta(ve(r[u]),ve(r[u-1])),u-=1;if(t>.5){var c=(n-s)/(l-s),h=1-c,d=[].concat(Q(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:K(K({},i),{},{current:n}),actRoute:d}}if(l<=n){var p=Q(r.slice(r.length-2,r.length));return{fullRoute:r,end:K(K({},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(Q(r.slice(u+1,r.length)));return{fullRoute:r,end:K(K({},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=ye(r),a=_s(o,t.end.point);n=xs(o)-a.properties.location}else console.warn("RouteCoordinatesArray: toValue.end: should have either along or point");return{fullRoute:r,end:K(K({},i),{},{from:null!=i.current?i.current:i.from,to:n})}}},{key:"originalRoute",get:function(){return this.state.fullRoute}}])}(),As=["match",["get","isNonHighlightedOverview"],"1","#A7A6BA","0",["match",["get","zone"],"transit","#4F7EF8","public","#CF9FFF","#CF9FFF"],["match",["get","zone"],"transit","#4F7EF8","public","#CF9FFF","#CF9FFF"]],Ps=["match",["get","isNonHighlightedOverview"],"1",.4,"0",1,1],Ms=[{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:As,lineWidth:5},paint:{"line-color":As,"line-width":5,"line-opacity":Ps},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:As,lineWidth:6},paint:{"line-color":As,"line-width":6,"line-opacity":Ps},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":Ps},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}}],Cs=[{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 ks,Es={};function Ts(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 j(j({},n),{name:e.name,taxonomyPath:e.taxonomyPath,children:(null!=t?t:[]).map(Ts)})}function Ls(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++){Ls(i[r],t)}}function Rs(e,t){if(!t||"object"!==te(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"===te(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)&&Ls(o,n)}return r}function Ds(e,t){if(!e||"object"!==te(e)||0===Object.keys(e).length)return console.error("[focus-core] Focus tree data is missing or empty"),void(Es={});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]=Ts(r))}),t}(e);t&&(n=Rs(n,t)),Es=n}function Fs(){return Es}function Os(e){var t;return null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]}function Ns(e){return 0===Os(e).length}function js(e,t,n,r,i){if(void 0===r&&(r=0),void 0===i&&(i=null),n)return t(n,r,i),void Os(n).forEach(function(i){return js(e,t,i,r+1,n)});for(var o in e){var a=e[o];(null==a?void 0:a.taxonomyPath)&&js(e,t,a,0,null)}}function Is(){var e=Fs(),t=[];for(var n in e){var r=e[n];(null==r?void 0:r.taxonomyPath)&&t.push(r)}return t}function zs(e){if(!e)return null;var t=null;return js(Fs(),function(n){n.taxonomyPath===e&&(t=n)}),t}function Bs(e){if(!zs(e))return[];for(var t=[],n=e;;){var r=Us(n);if(!r)break;t.unshift(r),n=r.taxonomyPath}return t}function Us(e){if(!e)return null;var t=null;return js(Fs(),function(n){Os(n).some(function(t){return t.taxonomyPath===e})&&(t=n)}),t}function Hs(e,t){if(t<0)return[];if(null===e||""===e)return 0===t?Is():Is().flatMap(function(e){return Hs(e.taxonomyPath,t)});var n=zs(e);return n?0===t?[n]:1===t?Os(n):Os(n).flatMap(function(e){return Hs(e.taxonomyPath,t-1)}):[]}function Gs(e){var t=zs(e);if(!t)return 0;var n=Os(t);return 0===n.length?0:1+Math.max.apply(Math,n.map(function(e){return Gs(e.taxonomyPath)}))}function Ws(e){var t=Os(e);return 0===t.length?e.taxonomyPath?[e.taxonomyPath]:[]:t.flatMap(function(e){return Ws(e)})}!function(e){e.Name="title",e.LocalRef="localRef",e.WhatTaxonomy="dimension_what"}(ks||(ks={}));var Vs=["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 qs(e){var t=[e],n=zs(e);if(n){var r=Ws(n);t=r.length>0&&!Ns(n)?r:(Ns(n),[n.taxonomyPath])}return t}function Zs(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 Ys(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=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]===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 $s(e,t,n){return function e(r){if(Array.isArray(r)&&"match"===r[0]){var i=B([],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 Js={lineColor:"line-color",lineWidth:"line-width",lineOpacity:"line-opacity",lineGapWidth:"line-gap-width"},Ks=new Set(Ms.filter(function(e){return"line"===e.type}).map(function(e){return e.id})),Xs=new Set(Ms.filter(function(e){return"line"===e.type&&e.id.toLowerCase().includes("outline")}).map(function(e){return e.id})),Qs=function(e,t){var n,r,i=j({},null!==(n=e.style)&&void 0!==n?n:{}),o=j({},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=Js[t];r&&(o[r]=n)}),j(j({},e),{style:i,paint:o})},el={line:_,circle:y,symbol:w,fill:x},tl={line:b.LineLayer,circle:b.CircleLayer,symbol:b.SymbolLayer,fill:b.FillLayer},nl=function(e){var t=e.isAnimationLayer?tl[e.type]:el[e.type];return t?l.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 rl(e){var t=e.metaAtlasCoreRef,n=e.triggerRender,r=c({}),o=u(Ms),a=o[0],s=o[1],p=c({type:"FeatureCollection",features:[]}),f=c(null),g=c(Cs),m=c(new Ss([])),y=function(e){m.current.destroy(),m.current=new Ss(e)};h(function(){!function(){if(m.current.__getValue().length>2){var e=ve(m.current.originalRoute[0]);m.current.timing({toValue:{end:{point:e}},duration:2e3,easing:i.linear}).start()}}()},[m.current]),d(e.ref,function(){return Object.assign(r.current,{setDisplayRoute:function(e){f.current=e},getDisplayRoute:function(){return f.current},setPatchFeatures:function(e){p.current=e,n()},setAnimatedCoordinates:function(e){y(e),n()},clear:function(){p.current={type:"FeatureCollection",features:[]},f.current=null,y([]),n()},filterRoutingLayersWhereDimension:function(e){var t=function(e,t){if(t){for(var n=[t],r=0;r<e.length;r+=1)Zs(e[r],n);return e}}($o(a),e);s(t),n()},styleRouteLineLayer:function(e){var t=e.color,r=e.width,i=e.opacity,o=Math.max(r,0),l=Math.min(Math.max(i,0),1),u=a.map(function(e){return Ks.has(e.id)?Xs.has(e.id)?Qs(e,{lineColor:"#FFFFFF",lineGapWidth:o>0?o+1:0,lineOpacity:l}):Qs(e,{lineColor:t,lineWidth:o,lineOpacity:l}):e});s(u),n()}}),r.current},[a,n,t]);var w=a.map(nl).filter(Boolean);return l.createElement(l.Fragment,null,l.createElement(v,{id:"mapPinsSource",data:p.current},w),m.current.__getValue().length>2?l.createElement(b.ShapeSource,{id:"route",data:new b.Shape({type:"LineString",coordinates:m.current})},l.createElement(b.LineLayer,{id:"lineroute",style:g.current[0].style})):null)}var il={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},ol=[{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"}],al=[{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}}],sl=[{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 ll(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(ul(i,l[c][0],n.ignoreBoundary)){for(var h=!1,d=1;d<l[c].length&&!h;)ul(i,l[c][d],!n.ignoreBoundary)&&(h=!0),d++;h||(u=!0)}return u}function ul(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 cl(){var e=this;return{enableGPS:function(){return I(e,void 0,void 0,function(){return z(this,function(e){return[2,{success:!0}]})})},disableGPS:function(){},destroyGPS:function(){},requestGPSPermission:function(){return I(e,void 0,void 0,function(){return z(this,function(e){return[2,{granted:!1,denied:!1,prompt:!0,state:"prompt"}]})})},isGPSPermissionGranted:function(){return I(e,void 0,void 0,function(){return z(this,function(e){return[2,!1]})})},getGPSPosition:function(){return I(e,void 0,void 0,function(){return z(this,function(e){return[2,{coordinates:[0,0],accuracy:0,timestamp:0}]})})},isGPSEnabled:function(){return!1}}}function hl(){var e=this;return{enableCompass:function(){return I(e,void 0,void 0,function(){return z(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 dl(){var e=this;return{start:function(){},stop:function(){},requestPermission:function(){return I(e,void 0,void 0,function(){return z(this,function(e){return[2,!1]})})}}}const pl=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},fl=e=>e?pl(e):pl;var gl={ready:!0,missing:[]};function ml(e){return{ready:0===e.length,missing:B([],e,!0)}}var vl=function(e){function t(t,n){var r=this,i=B([],t,!0);return(r=e.call(this,null!=n?n:"Not ready: missing ".concat(i.join(", ")))||this).name="NotReadyError",r.missing=i,r}return N(t,e),t}(Error),yl={ready:!1,missing:[]},wl={ready:!1,missing:[],modules:{mapDataService:yl,focusManager:yl,cameraDirector:yl,userLocation:yl,routingManager:yl,navigationEngine:yl}},bl=["mapDataService","focusManager","cameraDirector","userLocation","routingManager","navigationEngine"];function _l(){var e=new xl;return e.notifyMapLoaded(),e}var xl=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?gl:ml(["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 me({type:"Polygon",coordinates:e},t,n)}(r)}catch(e){return null}}var Al,Pl=function(){function e(){this.defaultFocusedTaxonomy="",this.currentFocus="",this.stylePort={readLayers:function(){return[]},commitLayers:function(){}},this.styleAttached=!1,this.cameraDirector=_l(),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=_l()},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?gl:ml(["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=qs(t);if(e.length>0)for(var r=0;r<e.length;r+=1){var i=e[r].id;Vs.includes(i)||Zs(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=zs(this.currentFocus);return e?Ns(e)?Us(this.currentFocus):e:null},e.prototype.getCurrentFocusFloor=function(){var e=zs(this.currentFocus);return e&&Ns(e)?e:null},e.prototype.getUserViewportBuilding=function(e){var t,n=ve(e),r=null;return t=function(e){if(!r&&!Ns(e)&&e.bounds){var t=Sl(e.bounds);t&&ll(n,t)&&(r=e)}},js(Fs(),t),r},e.prototype.checkUserViewport=function(e,t,n){var r=ve(e);if(null==t)return!1;if(!Object.prototype.hasOwnProperty.call(t,"bounds"))return!1;var i=Sl(t.bounds),o=!!i&&ll(r,i);if(null==n)return o;if(!Object.prototype.hasOwnProperty.call(n,"bounds"))return o;var a=Sl(n.bounds),s=!!a&&ll(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=zs(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=Bs(e),c=u.length-1;c>=0;c-=1){var h=i(u[c]);if(h)return h}if(!Ns(o))for(var d=0,p=Os(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=zs(e);if(!t)return[];for(var n=[],r=0,i=Os(t);r<i.length;r++){var o=i[r];if(Ns(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=zs(e);if(!t)return null;var n=Sl(t.bounds);if(n)return n;var r=Us(e);return Sl(null==r?void 0:r.bounds)}(t);if(!n)return!1;try{return ll(ve(e),n)}catch(e){return!1}},e}();function Ml(){return Al||(Al=new Pl),Al}var Cl=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=B([],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}(),kl=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=B([],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=Ml().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}(),El={pendingWhere:"",proposalId:null,proposalKind:null,portalMeta:null,isAwaitingDecision:!1,showTaxonomyUpdatePopup:!1,autoAcceptCooldownMs:0};function Tl(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===Tl(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Ll(e){var t=[1/0,1/0,-1/0,-1/0];return Tl(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 Rl(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Dl(e,t){void 0===t&&(t={});var n=Ll(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(!Rl(e[0])||!Rl(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)}Ll.default=Ll;var Fl=6371008.8,Ol={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:Fl,metres:Fl,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function Nl(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 jl(e){return e%360*Math.PI/180}function Il(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 zl(e,t,n){void 0===n&&(n={});var r=Il(e),i=Il(t),o=jl(i[1]-r[1]),a=jl(i[0]-r[0]),s=jl(r[1]),l=jl(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=Ol[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 Bl(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]),Nl(a);l=ia(o[d],o[d-1])-180,u=ca(o[d],s,l,r),a.push(u.geometry.coordinates)}if(h>=n)return(s=n-h)?(l=ia(o[d],o[d-1])-180,u=ca(o[d],s,l,r),a.push(u.geometry.coordinates),Nl(a)):(a.push(o[d]),Nl(a));if(h>=t&&a.push(o[d]),d===o.length-1)return Nl(a);h+=zl(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 Nl([p,p])}for(var Ul=function(){function e(){this.localStoarge=new E}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}(),Hl={},Gl={byteLength:function(e){var t=$l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},toByteArray:function(e){var t,n,r=$l(e),i=r[0],o=r[1],a=new ql(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=Vl[e.charCodeAt(n)]<<18|Vl[e.charCodeAt(n+1)]<<12|Vl[e.charCodeAt(n+2)]<<6|Vl[e.charCodeAt(n+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;2===o&&(t=Vl[e.charCodeAt(n)]<<2|Vl[e.charCodeAt(n+1)]>>4,a[s++]=255&t);1===o&&(t=Vl[e.charCodeAt(n)]<<10|Vl[e.charCodeAt(n+1)]<<4|Vl[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(Kl(e,a,a+o>s?s:a+o));1===r?(t=e[n-1],i.push(Wl[t>>2]+Wl[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(Wl[t>>10]+Wl[t>>4&63]+Wl[t<<2&63]+"="));return i.join("")}},Wl=[],Vl=[],ql="undefined"!=typeof Uint8Array?Uint8Array:Array,Zl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yl=0;Yl<64;++Yl)Wl[Yl]=Zl[Yl],Vl[Zl.charCodeAt(Yl)]=Yl;function $l(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 Jl(e){return Wl[e>>18&63]+Wl[e>>12&63]+Wl[e>>6&63]+Wl[63&e]}function Kl(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(Jl(r));return i.join("")}Vl["-".charCodeAt(0)]=62,Vl["_".charCodeAt(0)]=63;var Xl={
|
|
2
2
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
3
|
-
read:function(e,t,r,
|
|
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=Dl,r=Yl,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 c(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(D(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return u(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(D(e,ArrayBuffer)||e&&D(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(D(e,SharedArrayBuffer)||e&&D(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||N(e.length)?o(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(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 c(e){return s(e),o(e<0?0:0|f(e))}function u(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)||D(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 S(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return P(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),N(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 c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;o<l;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===s)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(r+s>l&&(r=l-s),o=r;o>=0;o--){for(var h=!0,f=0;f<s;f++)if(c(e,o+f)!==c(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(N(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 P(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,l,s,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(s=(31&c)<<6|63&o)>127&&(u=s);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(u=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&c)<<18|(63&o)<<12|(63&a)<<6|63&l)>65535&&s<1114112&&(u=s)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),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 c(e)},a.allocUnsafeSlow=function(e){return c(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(D(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),D(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(D(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?S(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(D(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),c=this.slice(n,i),u=e.slice(t,r),h=0;h<s;++h)if(c[h]!==u[h]){o=c[h],l=u[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 D(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function N(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}()}(Il);let Xl=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)}},c=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)))}},u=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.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=u.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){u.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=Xl,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=Xl,a=(s=o.lib).WordArray,l=s.Hasher,s=o.algo,c=[],u=0;64>u;u++)c[u]=4294967296*e.abs(e.sin(u+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],u=(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],P=e[o+15],S=t(S=a[0],A=a[1],k=a[2],j=a[3],s,7,c[0]),j=t(j,S,A,k,l,12,c[1]),k=t(k,j,S,A,u,17,c[2]),A=t(A,k,j,S,h,22,c[3]);S=t(S,A,k,j,f,7,c[4]),j=t(j,S,A,k,p,12,c[5]),k=t(k,j,S,A,d,17,c[6]),A=t(A,k,j,S,g,22,c[7]),S=t(S,A,k,j,m,7,c[8]),j=t(j,S,A,k,y,12,c[9]),k=t(k,j,S,A,v,17,c[10]),A=t(A,k,j,S,w,22,c[11]),S=t(S,A,k,j,b,7,c[12]),j=t(j,S,A,k,_,12,c[13]),k=t(k,j,S,A,x,17,c[14]),S=r(S,A=t(A,k,j,S,P,22,c[15]),k,j,l,5,c[16]),j=r(j,S,A,k,d,9,c[17]),k=r(k,j,S,A,w,14,c[18]),A=r(A,k,j,S,s,20,c[19]),S=r(S,A,k,j,p,5,c[20]),j=r(j,S,A,k,v,9,c[21]),k=r(k,j,S,A,P,14,c[22]),A=r(A,k,j,S,f,20,c[23]),S=r(S,A,k,j,y,5,c[24]),j=r(j,S,A,k,x,9,c[25]),k=r(k,j,S,A,h,14,c[26]),A=r(A,k,j,S,m,20,c[27]),S=r(S,A,k,j,_,5,c[28]),j=r(j,S,A,k,u,9,c[29]),k=r(k,j,S,A,g,14,c[30]),S=n(S,A=r(A,k,j,S,b,20,c[31]),k,j,p,4,c[32]),j=n(j,S,A,k,m,11,c[33]),k=n(k,j,S,A,w,16,c[34]),A=n(A,k,j,S,x,23,c[35]),S=n(S,A,k,j,l,4,c[36]),j=n(j,S,A,k,f,11,c[37]),k=n(k,j,S,A,g,16,c[38]),A=n(A,k,j,S,v,23,c[39]),S=n(S,A,k,j,_,4,c[40]),j=n(j,S,A,k,s,11,c[41]),k=n(k,j,S,A,h,16,c[42]),A=n(A,k,j,S,d,23,c[43]),S=n(S,A,k,j,y,4,c[44]),j=n(j,S,A,k,b,11,c[45]),k=n(k,j,S,A,P,16,c[46]),S=i(S,A=n(A,k,j,S,u,23,c[47]),k,j,s,6,c[48]),j=i(j,S,A,k,g,10,c[49]),k=i(k,j,S,A,x,15,c[50]),A=i(A,k,j,S,p,21,c[51]),S=i(S,A,k,j,b,6,c[52]),j=i(j,S,A,k,h,10,c[53]),k=i(k,j,S,A,v,15,c[54]),A=i(A,k,j,S,l,21,c[55]),S=i(S,A,k,j,m,6,c[56]),j=i(j,S,A,k,P,10,c[57]),k=i(k,j,S,A,d,15,c[58]),A=i(A,k,j,S,_,21,c[59]),S=i(S,A,k,j,f,6,c[60]),j=i(j,S,A,k,w,10,c[61]),k=i(k,j,S,A,u,15,c[62]),A=i(A,k,j,S,y,21,c[63]);a[0]=a[0]+S|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=Xl,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 c=1;c<l;c++)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)}}(),Xl.lib.Cipher||function(){var e=(f=Xl).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]},c=(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();c.Encryptor=c.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)}}),c.Decryptor=c.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=c,c=(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:c}),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 u=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 u.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,u.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,u.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=Xl,t=e.lib.BlockCipher,r=e.algo,n=[],i=[],o=[],a=[],l=[],s=[],c=[],u=[],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,c[y]=_<<24|_>>>8,u[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:c[n[a>>>24]]^u[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,c,u,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,c=e[t]^r[0],u=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[c>>>24]^i[u>>>16&255]^o[h>>>8&255]^a[255&f]^r[p++],m=n[u>>>24]^i[h>>>16&255]^o[f>>>8&255]^a[255&c]^r[p++],y=n[h>>>24]^i[f>>>16&255]^o[c>>>8&255]^a[255&u]^r[p++];f=n[f>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&h]^r[p++],c=g,u=m,h=y}g=(l[c>>>24]<<24|l[u>>>16&255]<<16|l[h>>>8&255]<<8|l[255&f])^r[p++],m=(l[u>>>24]<<24|l[h>>>16&255]<<16|l[f>>>8&255]<<8|l[255&c])^r[p++],y=(l[h>>>24]<<24|l[f>>>16&255]<<16|l[c>>>8&255]<<8|l[255&u])^r[p++],f=(l[f>>>24]<<24|l[c>>>16&255]<<16|l[u>>>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 Hl=Xl,Zl=function(e,t,r){return O(void 0,void 0,void 0,function(){var n,i,o,a,l;return F(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n="string"==typeof(c=e)&&c.length>0&&c.length%2==0&&/^[0-9a-fA-F]+$/.test(c)?Il.Buffer.from(e,"hex").toString("base64"):e,i=Il.Buffer.from(t,"base64").toString("hex"),o=Il.Buffer.from(r,"utf8").toString("hex"),[4,j.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 c})})};var Kl=function(e,t){return O(void 0,void 0,void 0,function(){var r,n,i,o;return F(this,function(a){switch(a.label){case 0:r="".concat(k.DocumentDirectoryPath+"/"+e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,k.readFile(r,"utf8")];case 2:return n=a.sent(),i=Hl.AES.decrypt(n,t),[2,JSON.parse(i.toString(Hl.enc.Utf8))];case 3:return o=a.sent(),console.error("Failed to read file:",o.message),[2,[]];case 4:return[2]}})})},Ql=function(e){return O(void 0,void 0,void 0,function(){var t,r,n,i,o;return F(this,function(a){switch(a.label){case 0:return a.trys.push([0,9,,10]),[4,k.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,k.unlink(i.path)]:[3,4]:[3,8];case 3:return a.sent(),[3,7];case 4:return i.isDirectory()?[4,Ql(i.path)]:[3,7];case 5:return a.sent(),[4,k.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 es=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 ts={},rs={get exports(){return ts},set exports(e){ts=e}},ns={},is={},os={get exports(){return is},set exports(e){is=e}},as={},ls=l;var ss="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},cs=ls.useState,us=ls.useEffect,hs=ls.useLayoutEffect,fs=ls.useDebugValue;function ps(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ss(e,r)}catch(e){return!0}}var ds="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=cs({inst:{value:r,getSnapshot:t}}),i=n[0].inst,o=n[1];return hs(function(){i.value=r,i.getSnapshot=t,ps(i)&&o({inst:i})},[e,r,t]),us(function(){return ps(i)&&o({inst:i}),e(function(){ps(i)&&o({inst:i})})},[e]),fs(r),r};as.useSyncExternalStore=void 0!==ls.useSyncExternalStore?ls.useSyncExternalStore:ds,os.exports=as;
|
|
10
|
+
!function(e){var t=Gl,n=Xl,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 N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(e).length;default:if(i)return r?-1:N(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 E(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(N(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(j(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 E(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 T(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 L(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 R(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||R(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||R(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||T(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||T(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||T(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(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||T(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||T(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||T(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||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||T(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||T(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||T(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||T(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||T(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(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)||L(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)||L(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||L(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||L(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||L(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||L(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||L(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);L(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);L(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||L(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||L(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||L(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||L(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||L(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 N(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 j(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}()}(Hl);let Ql=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=Ql,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=Ql,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=Ql,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)}}(),Ql.lib.Cipher||function(){var e=(d=Ql).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=Ql,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 eu=Ql,tu=function(e,t,n){return I(void 0,void 0,void 0,function(){var r,i,o,a,s;return z(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)?Hl.Buffer.from(e,"hex").toString("base64"):e,i=Hl.Buffer.from(t,"base64").toString("hex"),o=Hl.Buffer.from(n,"utf8").toString("hex"),[4,T.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 nu=function(e,t){return I(void 0,void 0,void 0,function(){var n,r,i,o;return z(this,function(a){switch(a.label){case 0:n="".concat(L.DocumentDirectoryPath+"/"+e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,L.readFile(n,"utf8")];case 2:return r=a.sent(),i=eu.AES.decrypt(r,t),[2,JSON.parse(i.toString(eu.enc.Utf8))];case 3:return o=a.sent(),console.error("Failed to read file:",o.message),[2,[]];case 4:return[2]}})})},ru=function(e){return I(void 0,void 0,void 0,function(){var t,n,r,i,o;return z(this,function(a){switch(a.label){case 0:return a.trys.push([0,9,,10]),[4,L.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,L.unlink(i.path)]:[3,4]:[3,8];case 3:return a.sent(),[3,7];case 4:return i.isDirectory()?[4,ru(i.path)]:[3,7];case 5:return a.sent(),[4,L.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]}})})},iu={},ou={get exports(){return iu},set exports(e){iu=e}},au={},su={},lu={get exports(){return su},set exports(e){su=e}},uu={},cu=l;var hu="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},du=cu.useState,pu=cu.useEffect,fu=cu.useLayoutEffect,gu=cu.useDebugValue;function mu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hu(e,n)}catch(e){return!0}}var vu="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=du({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return fu(function(){i.value=n,i.getSnapshot=t,mu(i)&&o({inst:i})},[e,n,t]),pu(function(){return mu(i)&&o({inst:i}),e(function(){mu(i)&&o({inst:i})})},[e]),gu(n),n};uu.useSyncExternalStore=void 0!==cu.useSyncExternalStore?cu.useSyncExternalStore:vu,lu.exports=uu;
|
|
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,c=s>>1,u=-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
|
|
20
|
+
var yu=l,wu=su;var bu="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},_u=wu.useSyncExternalStore,xu=yu.useRef,Su=yu.useEffect,Au=yu.useMemo,Pu=yu.useDebugValue;au.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=xu(null);if(null===o.current){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Au(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,bu(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=_u(e,o[0],o[1]);return Su(function(){a.hasValue=!0,a.value=s},[s]),Pu(s),s},ou.exports=au;var Mu=Se(iu);const{useDebugValue:Cu}=l,{useSyncExternalStoreWithSelector:ku}=Mu;const Eu=e=>e;const Tu=e=>{const t="function"==typeof e?fl(e):e,n=(e,n)=>function(e,t=Eu,n){const r=ku(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Cu(r),r}(t,e,n);return Object.assign(n,t),n},Lu=e=>e?Tu(e):Tu;var Ru,Du,Fu,Ou,Nu,ju,Iu,zu,Bu,Uu,Hu,Gu,Wu={};
|
|
21
21
|
/**
|
|
22
22
|
* @license
|
|
23
23
|
* Lodash <https://lodash.com/>
|
|
@@ -26,5 +26,5 @@ var gs=l,ms=is;var ys="function"==typeof Object.is?Object.is:function(e,t){retur
|
|
|
26
26
|
* Based on Underscore.js <http://underscorejs.org/LICENSE>
|
|
27
27
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
28
28
|
*/
|
|
29
|
-
zs={get exports(){return Os},set exports(e){Os=e}},Ms=Os,function(){var e,t="Expected a function",r="__lodash_hash_undefined__",n="__lodash_placeholder__",i=16,o=32,a=64,l=128,s=256,c=1/0,u=9007199254740991,h=NaN,f=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",o],["partialRight",a],["rearg",s]],d="[object Arguments]",g="[object Array]",m="[object Boolean]",y="[object Date]",v="[object Error]",w="[object Function]",b="[object GeneratorFunction]",_="[object Map]",x="[object Number]",P="[object Object]",S="[object Promise]",j="[object RegExp]",k="[object Set]",A="[object String]",E="[object Symbol]",z="[object WeakMap]",M="[object ArrayBuffer]",O="[object DataView]",F="[object Float32Array]",L="[object Float64Array]",C="[object Int8Array]",T="[object Int16Array]",R="[object Int32Array]",B="[object Uint8Array]",I="[object Uint8ClampedArray]",D="[object Uint16Array]",N="[object Uint32Array]",U=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,$=RegExp(q.source),J=RegExp(V.source),Y=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),re=/^\s+/,ne=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,se=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,ue=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,de=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,we=/['\n\r\u2028\u2029\\]/g,be="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Pe="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",je="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\ufe0e\\ufe0f",Ae="\\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="['’]",ze="["+be+"]",Me="["+Ae+"]",Oe="["+xe+"]",Fe="\\d+",Le="["+Pe+"]",Ce="["+Se+"]",Te="[^"+be+Ae+Fe+Pe+Se+je+"]",Re="\\ud83c[\\udffb-\\udfff]",Be="[^"+be+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Ne="["+je+"]",Ue="\\u200d",Ge="(?:"+Ce+"|"+Te+")",We="(?:"+Ne+"|"+Te+")",qe="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",$e="(?:"+Oe+"|"+Re+")?",Je="["+ke+"]?",Ye=Je+$e+"(?:"+Ue+"(?:"+[Be,Ie,De].join("|")+")"+Je+$e+")*",Xe="(?:"+[Le,Ie,De].join("|")+")"+Ye,He="(?:"+[Be+Oe+"?",Oe,Ie,De,ze].join("|")+")",Ze=RegExp(Ee,"g"),Ke=RegExp(Oe,"g"),Qe=RegExp(Re+"(?="+Re+")|"+He+Ye,"g"),et=RegExp([Ne+"?"+Ce+"+"+qe+"(?="+[Me,Ne,"$"].join("|")+")",We+"+"+Ve+"(?="+[Me,Ne+Ge,"$"].join("|")+")",Ne+"?"+Ge+"+"+qe,Ne+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fe,Xe].join("|"),"g"),tt=RegExp("["+Ue+be+xe+ke+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["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"],it=-1,ot={};ot[F]=ot[L]=ot[C]=ot[T]=ot[R]=ot[B]=ot[I]=ot[D]=ot[N]=!0,ot[d]=ot[g]=ot[M]=ot[m]=ot[O]=ot[y]=ot[v]=ot[w]=ot[_]=ot[x]=ot[P]=ot[j]=ot[k]=ot[A]=ot[z]=!1;var at={};at[d]=at[g]=at[M]=at[O]=at[m]=at[y]=at[F]=at[L]=at[C]=at[T]=at[R]=at[_]=at[x]=at[P]=at[j]=at[k]=at[A]=at[E]=at[B]=at[I]=at[D]=at[N]=!0,at[v]=at[w]=at[z]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,ct=parseInt,ut="object"==typeof _e&&_e&&_e.Object===Object&&_e,ht="object"==typeof self&&self&&self.Object===Object&&self,ft=ut||ht||Function("return this")(),pt=Ms&&!Ms.nodeType&&Ms,dt=pt&&zs&&!zs.nodeType&&zs,gt=dt&&dt.exports===pt,mt=gt&&ut.process,yt=function(){try{var e=dt&&dt.require&&dt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),vt=yt&&yt.isArrayBuffer,wt=yt&&yt.isDate,bt=yt&&yt.isMap,_t=yt&&yt.isRegExp,xt=yt&&yt.isSet,Pt=yt&&yt.isTypedArray;function St(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 jt(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 kt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function At(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Et(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 zt(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 Mt(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Ot(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 Ft(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 Lt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Ct(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 Tt(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 Rt(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 Bt=qt("length");function It(e,t,r){var n;return r(e,function(e,r,i){if(t(e,r,i))return n=r,!1}),n}function Dt(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 Nt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Dt(e,Gt,r)}function Ut(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Gt(e){return e!=e}function Wt(e,t){var r=null==e?0:e.length;return r?Jt(e,t)/r:h}function qt(t){return function(r){return null==r?e:r[t]}}function Vt(t){return function(r){return null==t?e:t[r]}}function $t(e,t,r,n,i){return i(e,function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)}),r}function Jt(t,r){for(var n,i=-1,o=t.length;++i<o;){var a=r(t[i]);a!==e&&(n=n===e?a:n+a)}return n}function Yt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Xt(e){return e?e.slice(0,fr(e)+1).replace(re,""):e}function Ht(e){return function(t){return e(t)}}function Zt(e,t){return Ft(t,function(t){return e[t]})}function Kt(e,t){return e.has(t)}function Qt(e,t){for(var r=-1,n=e.length;++r<n&&Nt(t,e[r],0)>-1;);return r}function er(e,t){for(var r=e.length;r--&&Nt(t,e[r],0)>-1;);return r}var tr=Vt({"À":"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"}),rr=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nr(e){return"\\"+lt[e]}function ir(e){return tt.test(e)}function or(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function ar(e,t){return function(r){return e(t(r))}}function lr(e,t){for(var r=-1,i=e.length,o=0,a=[];++r<i;){var l=e[r];l!==t&&l!==n||(e[r]=n,a[o++]=r)}return a}function sr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function cr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}function ur(e){return ir(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):Bt(e)}function hr(e){return ir(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function fr(e){for(var t=e.length;t--&&ne.test(e.charAt(t)););return t}var pr=Vt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),dr=function ne(be){var _e=(be=null==be?ft:dr.defaults(ft.Object(),be,dr.pick(ft,nt))).Array,xe=be.Date,Pe=be.Error,Se=be.Function,je=be.Math,ke=be.Object,Ae=be.RegExp,Ee=be.String,ze=be.TypeError,Me=_e.prototype,Oe=Se.prototype,Fe=ke.prototype,Le=be["__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,De=Ce.call(ke),Ne=ft._,Ue=Ae("^"+Ce.call(Te).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=gt?be.Buffer:e,We=be.Symbol,qe=be.Uint8Array,Ve=Ge?Ge.allocUnsafe:e,$e=ar(ke.getPrototypeOf,ke),Je=ke.create,Ye=Fe.propertyIsEnumerable,Xe=Me.splice,He=We?We.isConcatSpreadable:e,Qe=We?We.iterator:e,tt=We?We.toStringTag:e,lt=function(){try{var e=ho(ke,"defineProperty");return e({},"",{}),e}catch(e){}}(),ut=be.clearTimeout!==ft.clearTimeout&&be.clearTimeout,ht=xe&&xe.now!==ft.Date.now&&xe.now,pt=be.setTimeout!==ft.setTimeout&&be.setTimeout,dt=je.ceil,mt=je.floor,yt=ke.getOwnPropertySymbols,Bt=Ge?Ge.isBuffer:e,Vt=be.isFinite,gr=Me.join,mr=ar(ke.keys,ke),yr=je.max,vr=je.min,wr=xe.now,br=be.parseInt,_r=je.random,xr=Me.reverse,Pr=ho(be,"DataView"),Sr=ho(be,"Map"),jr=ho(be,"Promise"),kr=ho(be,"Set"),Ar=ho(be,"WeakMap"),Er=ho(ke,"create"),zr=Ar&&new Ar,Mr={},Or=Io(Pr),Fr=Io(Sr),Lr=Io(jr),Cr=Io(kr),Tr=Io(Ar),Rr=We?We.prototype:e,Br=Rr?Rr.valueOf:e,Ir=Rr?Rr.toString:e;function Dr(e){if(tl(e)&&!qa(e)&&!(e instanceof Wr)){if(e instanceof Gr)return e;if(Te.call(e,"__wrapped__"))return Do(e)}return new Gr(e)}var Nr=function(){function t(){}return function(r){if(!el(r))return{};if(Je)return Je(r);t.prototype=r;var n=new t;return t.prototype=e,n}}();function Ur(){}function Gr(t,r){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=e}function Wr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,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&&cl(e),a=r||n||i||o,l=a?Yt(e.length,Ee):[],s=l.length;for(var c in e)!t&&!Te.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wo(c,s))||l.push(c);return l}function Hr(t){var r=t.length;return r?t[Yn(0,r-1)]:e}function Zr(e,t){return To(zi(e),ln(t,0,e.length))}function Kr(e){return To(zi(e))}function Qr(t,r,n){(n!==e&&!Na(t[r],n)||n===e&&!(r in t))&&on(t,r,n)}function en(t,r,n){var i=t[r];Te.call(t,r)&&Na(i,n)&&(n!==e||r in t)||on(t,r,n)}function tn(e,t){for(var r=e.length;r--;)if(Na(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&<?lt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function an(t,r){for(var n=-1,i=r.length,o=_e(i),a=null==t;++n<i;)o[n]=a?e:kl(t,r[n]);return o}function ln(t,r,n){return t==t&&(n!==e&&(t=t<=n?t:n),r!==e&&(t=t>=r?t:r)),t}function sn(t,r,n,i,o,a){var l,s=1&r,c=2&r,u=4&r;if(n&&(l=o?n(t,i,o,a):n(t)),l!==e)return l;if(!el(t))return t;var h=qa(t);if(h){if(l=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Te.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(t),!s)return zi(t,l)}else{var f=go(t),p=f==w||f==b;if(Ya(t))return Pi(t,s);if(f==P||f==d||p&&!o){if(l=c||p?{}:yo(t),!s)return c?function(e,t){return Mi(e,po(e),t)}(t,function(e,t){return e&&Mi(t,Fl(t),e)}(l,t)):function(e,t){return Mi(e,fo(e),t)}(t,nn(l,t))}else{if(!at[f])return o?t:{};l=function(e,t,r){var n,i=e.constructor;switch(t){case M:return Si(e);case m:case y:return new i(+e);case O:return function(e,t){var r=t?Si(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case F:case L:case C:case T:case R:case B:case I:case D:case N:return ji(e,r);case _:return new i;case x:case A:return new i(e);case j:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new i;case E:return n=e,Br?ke(Br.call(n)):{}}}(t,f,s)}}a||(a=new Yr);var g=a.get(t);if(g)return g;a.set(t,l),al(t)?t.forEach(function(e){l.add(sn(e,r,n,e,t,a))}):rl(t)&&t.forEach(function(e,i){l.set(i,sn(e,r,n,i,t,a))});var v=h?e:(u?c?io:no:c?Fl:Ol)(t);return kt(v||t,function(e,i){v&&(e=t[i=e]),en(l,i,sn(e,r,n,i,t,a))}),l}function cn(t,r,n){var i=n.length;if(null==t)return!i;for(t=ke(t);i--;){var o=n[i],a=r[o],l=t[o];if(l===e&&!(o in t)||!a(l))return!1}return!0}function un(r,n,i){if("function"!=typeof r)throw new ze(t);return Oo(function(){r.apply(e,i)},n)}function hn(e,t,r,n){var i=-1,o=Mt,a=!0,l=e.length,s=[],c=t.length;if(!l)return s;r&&(t=Ft(t,Ht(r))),n?(o=Ot,a=!1):t.length>=200&&(o=Kt,a=!1,t=new Jr(t));e:for(;++i<l;){var u=e[i],h=null==r?u:r(u);if(u=n||0!==u?u:0,a&&h==h){for(var f=c;f--;)if(t[f]===h)continue e;s.push(u)}else o(t,h,n)||s.push(u)}return s}Dr.templateSettings={escape:Y,evaluate:X,interpolate:H,variable:"",imports:{_:Dr}},Dr.prototype=Ur.prototype,Dr.prototype.constructor=Dr,Gr.prototype=Nr(Ur.prototype),Gr.prototype.constructor=Gr,Wr.prototype=Nr(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(t){var n=this.__data__;if(Er){var i=n[t];return i===r?e:i}return Te.call(n,t)?n[t]:e},qr.prototype.has=function(t){var r=this.__data__;return Er?r[t]!==e:Te.call(r,t)},qr.prototype.set=function(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Er&&n===e?r:n,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(t){var r=this.__data__,n=tn(r,t);return n<0?e:r[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(Sr||Vr),string:new qr}},$r.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},$r.prototype.get=function(e){return co(this,e).get(e)},$r.prototype.has=function(e){return co(this,e).has(e)},$r.prototype.set=function(e,t){var r=co(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,r),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(!Sr||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(t,r,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],l=r(a);if(null!=l&&(s===e?l==l&&!sl(l):n(l,s)))var s=l,c=a}return c}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):Lt(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 zt(t,function(t){return Za(e[t])})}function Pn(t,r){for(var n=0,i=(r=wi(r,t)).length;null!=t&&n<i;)t=t[Bo(r[n++])];return n&&n==i?t:e}function Sn(e,t,r){var n=t(e);return qa(e)?n:Lt(n,r(e))}function jn(t){return null==t?t===e?"[object Undefined]":"[object Null]":tt&&tt in ke(t)?function(t){var r=Te.call(t,tt),n=t[tt];try{t[tt]=e;var i=!0}catch(e){}var o=Ie.call(t);return i&&(r?t[tt]=n:delete t[tt]),o}(t):function(e){return Ie.call(e)}(t)}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(t,r,n){for(var i=n?Ot:Mt,o=t[0].length,a=t.length,l=a,s=_e(a),c=1/0,u=[];l--;){var h=t[l];l&&r&&(h=Ft(h,Ht(r))),c=vr(h.length,c),s[l]=!n&&(r||o>=120&&h.length>=120)?new Jr(l&&h):e}h=t[0];var f=-1,p=s[0];e:for(;++f<o&&u.length<c;){var d=h[f],g=r?r(d):d;if(d=n||0!==d?d:0,!(p?Kt(p,g):i(u,g,n))){for(l=a;--l;){var m=s[l];if(!(m?Kt(m,g):i(t[l],g,n)))continue e}p&&p.push(g),u.push(d)}}return u}function Mn(t,r,n){var i=null==(t=Eo(t,r=wi(r,t)))?t:t[Bo(Ho(r))];return null==i?e:St(i,t,n)}function On(e){return tl(e)&&jn(e)==d}function Fn(t,r,n,i,o){return t===r||(null==t||null==r||!tl(t)&&!tl(r)?t!=t&&r!=r:function(t,r,n,i,o,a){var l=qa(t),s=qa(r),c=l?g:go(t),u=s?g:go(r),h=(c=c==d?P:c)==P,f=(u=u==d?P:u)==P,p=c==u;if(p&&Ya(t)){if(!Ya(r))return!1;l=!0,h=!1}if(p&&!h)return a||(a=new Yr),l||cl(t)?to(t,r,n,i,o,a):function(e,t,r,n,i,o,a){switch(r){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!o(new qe(e),new qe(t)));case m:case y:case x:return Na(+e,+t);case v:return e.name==t.name&&e.message==t.message;case j:case A:return e==t+"";case _:var l=or;case k:var s=1&n;if(l||(l=sr),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var u=to(l(e),l(t),n,i,o,a);return a.delete(e),u;case E:if(Br)return Br.call(e)==Br.call(t)}return!1}(t,r,c,n,i,o,a);if(!(1&n)){var w=h&&Te.call(t,"__wrapped__"),b=f&&Te.call(r,"__wrapped__");if(w||b){var S=w?t.value():t,z=b?r.value():r;return a||(a=new Yr),o(S,z,n,i,a)}}return!!p&&(a||(a=new Yr),function(t,r,n,i,o,a){var l=1&n,s=no(t),c=s.length,u=no(r),h=u.length;if(c!=h&&!l)return!1;for(var f=c;f--;){var p=s[f];if(!(l?p in r:Te.call(r,p)))return!1}var d=a.get(t),g=a.get(r);if(d&&g)return d==r&&g==t;var m=!0;a.set(t,r),a.set(r,t);for(var y=l;++f<c;){var v=t[p=s[f]],w=r[p];if(i)var b=l?i(w,v,p,r,t,a):i(v,w,p,t,r,a);if(!(b===e?v===w||o(v,w,n,i,a):b)){m=!1;break}y||(y="constructor"==p)}if(m&&!y){var _=t.constructor,x=r.constructor;_==x||!("constructor"in t)||!("constructor"in r)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(m=!1)}return a.delete(t),a.delete(r),m}(t,r,n,i,o,a))}(t,r,n,i,Fn,o))}function Ln(t,r,n,i){var o=n.length,a=o,l=!i;if(null==t)return!a;for(t=ke(t);o--;){var s=n[o];if(l&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<a;){var c=(s=n[o])[0],u=t[c],h=s[1];if(l&&s[2]){if(u===e&&!(c in t))return!1}else{var f=new Yr;if(i)var p=i(u,h,c,t,r,f);if(!(p===e?Fn(h,u,3,i,f):p))return!1}}return!0}function Cn(e){return!(!el(e)||(t=e,Be&&Be in t))&&(Za(e)?Ue:de).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]):Nn(e):fs(e)}function Rn(e){if(!So(e))return mr(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=So(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 Dn(e,t){var r=-1,n=$a(e)?_e(e.length):[];return fn(e,function(e,i,o){n[++r]=t(e,i,o)}),n}function Nn(e){var t=uo(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(t,r){return _o(t)&&jo(r)?ko(Bo(t),r):function(n){var i=kl(n,t);return i===e&&i===r?Al(n,t):Fn(r,i,3)}}function Gn(t,r,n,i,o){t!==r&&vn(r,function(a,l){if(o||(o=new Yr),el(a))!function(t,r,n,i,o,a,l){var s=zo(t,n),c=zo(r,n),u=l.get(c);if(u)Qr(t,n,u);else{var h=a?a(s,c,n+"",t,r,l):e,f=h===e;if(f){var p=qa(c),d=!p&&Ya(c),g=!p&&!d&&cl(c);h=c,p||d||g?qa(s)?h=s:Ja(s)?h=zi(s):d?(f=!1,h=Pi(c,!0)):g?(f=!1,h=ji(c,!0)):h=[]:il(c)||Wa(c)?(h=s,Wa(s)?h=yl(s):el(s)&&!Za(s)||(h=yo(c))):f=!1}f&&(l.set(c,h),o(h,c,i,a,l),l.delete(c)),Qr(t,n,h)}}(t,r,l,n,Gn,i,o);else{var s=i?i(zo(t,l),a,l+"",t,r,o):e;s===e&&(s=a),Qr(t,l,s)}},Fl)}function Wn(t,r){var n=t.length;if(n)return wo(r+=r<0?n:0,n)?t[r]:e}function qn(e,t,r){t=t.length?Ft(t,function(e){return qa(e)?function(t){return Pn(t,1===e.length?e[0]:e)}:e}):[ns];var n=-1;t=Ft(t,Ht(so()));var i=Dn(e,function(e,r,i){var o=Ft(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){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,l=r.length;++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=Pn(e,a);r(l,a)&&Qn(o,wi(a,e),l)}return o}function $n(e,t,r,n){var i=n?Ut:Nt,o=-1,a=t.length,l=e;for(e===t&&(t=zi(t)),r&&(l=Ft(e,Ht(r)));++o<a;)for(var s=0,c=t[o],u=r?r(c):c;(s=i(l,u,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+mt(_r()*(t-e+1))}function Xn(e,t){var r="";if(!e||t<1||t>u)return r;do{t%2&&(r+=e),(t=mt(t/2))&&(e+=e)}while(t);return r}function Hn(e,t){return Fo(Ao(e,t,ns),e+"")}function Zn(e){return Hr(Nl(e))}function Kn(e,t){var r=Nl(e);return To(r,ln(t,0,r.length))}function Qn(t,r,n,i){if(!el(t))return t;for(var o=-1,a=(r=wi(r,t)).length,l=a-1,s=t;null!=s&&++o<a;){var c=Bo(r[o]),u=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=l){var h=s[c];(u=i?i(h,c,s):e)===e&&(u=el(h)?h:wo(r[o+1])?[]:{})}en(s,c,u),s=s[c]}return t}var ei=zr?function(e,t){return zr.set(e,t),e}:ns,ti=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:es(t),writable:!0})}:ns;function ri(e){return To(Nl(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=_e(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(t,r,n,i){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var l=(r=n(r))!=r,s=null===r,c=sl(r),u=r===e;o<a;){var h=mt((o+a)/2),f=n(t[h]),p=f!==e,d=null===f,g=f==f,m=sl(f);if(l)var y=i||g;else y=u?g&&(i||p):s?g&&p&&(i||!d):c?g&&p&&!d&&(i||!m):!d&&!m&&(i?f<=r:f<r);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||!Na(l,s)){var s=l;o[i++]=0===a?0:a}}return o}function si(e){return"number"==typeof e?e:sl(e)?h:+e}function ci(e){if("string"==typeof e)return e;if(qa(e))return Ft(e,ci)+"";if(sl(e))return Ir?Ir.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,r){var n=-1,i=Mt,o=e.length,a=!0,l=[],s=l;if(r)a=!1,i=Ot;else if(o>=200){var c=t?null:Xi(e);if(c)return sr(c);a=!1,i=Kt,s=new Jr}else s=t?[]:l;e:for(;++n<o;){var u=e[n],h=t?t(u):u;if(u=r||0!==u?u:0,a&&h==h){for(var f=s.length;f--;)if(s[f]===h)continue e;t&&s.push(h),l.push(u)}else i(s,h,r)||(s!==l&&s.push(h),l.push(u))}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(Pn(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()),Ct(t,function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))},r)}function gi(e,t,r){var n=e.length;if(n<2)return n?ui(e[0]):[];for(var i=-1,o=_e(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 ui(yn(o,1),t,r)}function mi(t,r,n){for(var i=-1,o=t.length,a=r.length,l={};++i<o;){var s=i<a?r[i]:e;n(l,t[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(t,r,n){var i=t.length;return n=n===e?i:n,!r&&n>=i?t:ni(t,r,n)}var xi=ut||function(e){return ft.clearTimeout(e)};function Pi(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 Si(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function ji(e,t){var r=t?Si(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function ki(t,r){if(t!==r){var n=t!==e,i=null===t,o=t==t,a=sl(t),l=r!==e,s=null===r,c=r==r,u=sl(r);if(!s&&!u&&!a&&t>r||a&&l&&c&&!s&&!u||i&&l&&c||!n&&c||!o)return 1;if(!i&&!a&&!u&&t<r||u&&n&&o&&!i&&!a||s&&n&&o||!l&&o||!c)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,c=yr(o-a,0),u=_e(s+c),h=!n;++l<s;)u[l]=t[l];for(;++i<a;)(h||i<o)&&(u[r[i]]=e[i]);for(;c--;)u[l++]=e[i++];return u}function Ei(e,t,r,n){for(var i=-1,o=e.length,a=-1,l=r.length,s=-1,c=t.length,u=yr(o-l,0),h=_e(u+c),f=!n;++i<u;)h[i]=e[i];for(var p=i;++s<c;)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=_e(n));++r<n;)t[r]=e[r];return t}function Mi(t,r,n,i){var o=!n;n||(n={});for(var a=-1,l=r.length;++a<l;){var s=r[a],c=i?i(n[s],t[s],s,n,t):e;c===e&&(c=t[s]),o?on(n,s,c):en(n,s,c)}return n}function Oi(e,t){return function(r,n){var i=qa(r)?jt:rn,o=t?t():{};return i(r,e,so(n,2),o)}}function Fi(t){return Hn(function(r,n){var i=-1,o=n.length,a=o>1?n[o-1]:e,l=o>2?n[2]:e;for(a=t.length>3&&"function"==typeof a?(o--,a):e,l&&bo(n[0],n[1],l)&&(a=o<3?e:a,o=1),r=ke(r);++i<o;){var s=n[i];s&&t(r,s,i,a)}return r})}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(t){return function(r){var n=ir(r=vl(r))?hr(r):e,i=n?n[0]:r.charAt(0),o=n?_i(n,1).join(""):r.slice(1);return i[t]()+o}}function Ri(e){return function(t){return Ct(Zl(Wl(t).replace(Ze,"")),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=Nr(e.prototype),n=e.apply(r,t);return el(n)?n:r}}function Ii(t){return function(r,n,i){var o=ke(r);if(!$a(r)){var a=so(n,3);r=Ol(r),n=function(e){return a(o[e],e,o)}}var l=t(r,n,i);return l>-1?o[a?r[l]:l]:e}}function Di(r){return ro(function(n){var i=n.length,o=i,a=Gr.prototype.thru;for(r&&n.reverse();o--;){var l=n[o];if("function"!=typeof l)throw new ze(t);if(a&&!s&&"wrapper"==ao(l))var s=new Gr([],!0)}for(o=s?o:i;++o<i;){var c=ao(l=n[o]),u="wrapper"==c?oo(l):e;s=u&&xo(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?s[ao(u[0])].apply(s,u[3]):1==l.length&&xo(l)?s[c]():s.thru(l)}return function(){var e=arguments,t=e[0];if(s&&1==e.length&&qa(t))return s.plant(t).value();for(var r=0,o=i?n[r].apply(this,e):t;++r<i;)o=n[r].call(this,o);return o}})}function Ni(t,r,n,i,o,a,s,c,u,h){var f=r&l,p=1&r,d=2&r,g=24&r,m=512&r,y=d?e:Bi(t);return function l(){for(var v=arguments.length,w=_e(v),b=v;b--;)w[b]=arguments[b];if(g)var _=lo(l),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,s,g)),v-=x,g&&v<h){var P=lr(w,_);return Ji(t,r,Ni,l.placeholder,n,w,P,c,u,h-v)}var S=p?n:this,j=d?S[t]:t;return v=w.length,c?w=function(t,r){for(var n=t.length,i=vr(r.length,n),o=zi(t);i--;){var a=r[i];t[i]=wo(a,n)?o[a]:e}return t}(w,c):m&&v>1&&w.reverse(),f&&u<v&&(w.length=u),this&&this!==ft&&this instanceof l&&(j=y||Bi(j)),j.apply(S,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(t,r){return function(n,i){var o;if(n===e&&i===e)return r;if(n!==e&&(o=n),i!==e){if(o===e)return i;"string"==typeof n||"string"==typeof i?(n=ci(n),i=ci(i)):(n=si(n),i=si(i)),o=t(n,i)}return o}}function Wi(e){return ro(function(t){return t=Ft(t,Ht(so())),Hn(function(r){var n=this;return e(t,function(e){return St(e,n,r)})})})}function qi(t,r){var n=(r=r===e?" ":ci(r)).length;if(n<2)return n?Xn(r,t):r;var i=Xn(r,dt(t/ur(r)));return ir(r)?_i(hr(i),0,t).join(""):i.slice(0,t)}function Vi(t){return function(r,n,i){return i&&"number"!=typeof i&&bo(r,n,i)&&(n=i=e),r=pl(r),n===e?(n=r,r=0):n=pl(n),function(e,t,r,n){for(var i=-1,o=yr(dt((t-e)/(r||1)),0),a=_e(o);o--;)a[n?o:++i]=e,e+=r;return a}(r,n,i=i===e?r<n?1:-1:pl(i),t)}}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(t,r,n,i,l,s,c,u,h,f){var p=8&r;r|=p?o:a,4&(r&=~(p?a:o))||(r&=-4);var d=[t,r,l,p?s:e,p?c:e,p?e:s,p?e:c,u,h,f],g=n.apply(e,d);return xo(t)&&Mo(g,d),g.placeholder=i,Lo(g,t,r)}function Yi(e){var t=je[e];return function(e,r){if(e=ml(e),(r=null==r?0:vr(dl(r),292))&&Vt(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/sr(new kr([,-0]))[1]==c?function(e){return new kr(e)}:ss;function Hi(e){return function(t){var r=go(t);return r==_?or(t):r==k?cr(t):function(e,t){return Ft(t,function(t){return[t,e[t]]})}(t,e(t))}}function Zi(r,c,u,h,f,p,d,g){var m=2&c;if(!m&&"function"!=typeof r)throw new ze(t);var y=h?h.length:0;if(y||(c&=-97,h=f=e),d=d===e?d:yr(dl(d),0),g=g===e?g:dl(g),y-=f?f.length:0,c&a){var v=h,w=f;h=f=e}var b=m?e:oo(r),_=[r,c,u,h,f,v,w,p,d,g];if(b&&function(e,t){var r=e[1],i=t[1],o=r|i,a=o<131,c=i==l&&8==r||i==l&&r==s&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==r;if(!a&&!c)return e;1&i&&(e[2]=t[2],o|=1&r?0:4);var u=t[3];if(u){var h=e[3];e[3]=h?Ai(h,u,t[4]):u,e[4]=h?lr(e[3],n):t[4]}(u=t[5])&&(h=e[5],e[5]=h?Ei(h,u,t[6]):u,e[6]=h?lr(e[5],n):t[6]),(u=t[7])&&(e[7]=u),i&l&&(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]=o}(_,b),r=_[0],c=_[1],u=_[2],h=_[3],f=_[4],!(g=_[9]=_[9]===e?m?0:r.length:yr(_[9]-y,0))&&24&c&&(c&=-25),c&&1!=c)x=8==c||c==i?function(t,r,n){var i=Bi(t);return function o(){for(var a=arguments.length,l=_e(a),s=a,c=lo(o);s--;)l[s]=arguments[s];var u=a<3&&l[0]!==c&&l[a-1]!==c?[]:lr(l,c);return(a-=u.length)<n?Ji(t,r,Ni,o.placeholder,e,l,u,e,e,n-a):St(this&&this!==ft&&this instanceof o?i:t,this,l)}}(r,c,g):c!=o&&33!=c||f.length?Ni.apply(e,_):function(e,t,r,n){var i=1&t,o=Bi(e);return function t(){for(var a=-1,l=arguments.length,s=-1,c=n.length,u=_e(c+l),h=this&&this!==ft&&this instanceof t?o:e;++s<c;)u[s]=n[s];for(;l--;)u[s++]=arguments[++a];return St(h,i?r:this,u)}}(r,c,u,h);else var x=function(e,t,r){var n=1&t,i=Bi(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(r,c,u);return Lo((b?ei:Mo)(x,_),r,c)}function Ki(t,r,n,i){return t===e||Na(t,Fe[n])&&!Te.call(i,n)?r:t}function Qi(t,r,n,i,o,a){return el(t)&&el(r)&&(a.set(r,t),Gn(t,r,e,Qi,a),a.delete(r)),t}function eo(t){return il(t)?e:t}function to(t,r,n,i,o,a){var l=1&n,s=t.length,c=r.length;if(s!=c&&!(l&&c>s))return!1;var u=a.get(t),h=a.get(r);if(u&&h)return u==r&&h==t;var f=-1,p=!0,d=2&n?new Jr:e;for(a.set(t,r),a.set(r,t);++f<s;){var g=t[f],m=r[f];if(i)var y=l?i(m,g,f,r,t,a):i(g,m,f,t,r,a);if(y!==e){if(y)continue;p=!1;break}if(d){if(!Rt(r,function(e,t){if(!Kt(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(t),a.delete(r),p}function ro(t){return Fo(Ao(t,e,Vo),t+"")}function no(e){return Sn(e,Ol,fo)}function io(e){return Sn(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(Dr,"placeholder")?Dr:e).placeholder}function so(){var e=Dr.iteratee||is;return e=e===is?Tn:e,arguments.length?e(arguments[0],arguments[1]):e}function co(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 uo(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(t,r){var n=function(t,r){return null==t?e:t[r]}(t,r);return Cn(n)?n:e}var fo=yt?function(e){return null==e?[]:(e=ke(e),zt(yt(e),function(t){return Ye.call(e,t)}))}:gs,po=yt?function(e){for(var t=[];e;)Lt(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||So(e)?{}:Nr($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?u:t)&&("number"==r||"symbol"!=r&&me.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)&&Na(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))||K.test(e)||!Z.test(e)||null!=t&&e in ke(t)}function xo(e){var t=ao(e),r=Dr[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]}(Pr&&go(new Pr(new ArrayBuffer(1)))!=O||Sr&&go(new Sr)!=_||jr&&go(jr.resolve())!=S||kr&&go(new kr)!=k||Ar&&go(new Ar)!=z)&&(go=function(t){var r=jn(t),n=r==P?t.constructor:e,i=n?Io(n):"";if(i)switch(i){case Or:return O;case Fr:return _;case Lr:return S;case Cr:return k;case Tr:return z}return r});var Po=Le?Za:ms;function So(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function jo(e){return e==e&&!el(e)}function ko(t,r){return function(n){return null!=n&&n[t]===r&&(r!==e||t in ke(n))}}function Ao(t,r,n){return r=yr(r===e?t.length-1:r,0),function(){for(var e=arguments,i=-1,o=yr(e.length-r,0),a=_e(o);++i<o;)a[i]=e[r+i];i=-1;for(var l=_e(r+1);++i<r;)l[i]=e[i];return l[r]=n(a),St(t,this,l)}}function Eo(e,t){return t.length<2?e:Pn(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=pt||function(e,t){return ft.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(ie,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return kt(p,function(r){var n="_."+r[0];t&r[1]&&!Mt(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(n),r)))}function Co(t){var r=0,n=0;return function(){var i=wr(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(e,arguments)}}function To(t,r){var n=-1,i=t.length,o=i-1;for(r=r===e?i:r;++n<r;){var a=Yn(n,o),l=t[a];t[a]=t[n],t[n]=l}return t.length=r,t}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(Q,function(e,r,n,i){t.push(n?i.replace(ce,"$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 Do(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 No=Hn(function(e,t){return Ja(e)?hn(e,yn(t,1,Ja,!0)):[]}),Uo=Hn(function(t,r){var n=Ho(r);return Ja(n)&&(n=e),Ja(t)?hn(t,yn(r,1,Ja,!0),so(n,2)):[]}),Go=Hn(function(t,r){var n=Ho(r);return Ja(n)&&(n=e),Ja(t)?hn(t,yn(r,1,Ja,!0),e,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)),Dt(e,so(t,3),i)}function qo(t,r,n){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return n!==e&&(o=dl(n),o=n<0?yr(i+o,0):vr(o,i-1)),Dt(t,so(r,3),o,!0)}function Vo(e){return null!=e&&e.length?yn(e,1):[]}function $o(t){return t&&t.length?t[0]:e}var Jo=Hn(function(e){var t=Ft(e,yi);return t.length&&t[0]===e[0]?zn(t):[]}),Yo=Hn(function(t){var r=Ho(t),n=Ft(t,yi);return r===Ho(n)?r=e:n.pop(),n.length&&n[0]===t[0]?zn(n,so(r,2)):[]}),Xo=Hn(function(t){var r=Ho(t),n=Ft(t,yi);return(r="function"==typeof r?r:e)&&n.pop(),n.length&&n[0]===t[0]?zn(n,e,r):[]});function Ho(t){var r=null==t?0:t.length;return r?t[r-1]:e}var Zo=Hn(Ko);function Ko(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,Ft(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 ui(yn(e,1,Ja,!0))}),ra=Hn(function(t){var r=Ho(t);return Ja(r)&&(r=e),ui(yn(t,1,Ja,!0),so(r,2))}),na=Hn(function(t){var r=Ho(t);return r="function"==typeof r?r:e,ui(yn(t,1,Ja,!0),e,r)});function ia(e){if(!e||!e.length)return[];var t=0;return e=zt(e,function(e){if(Ja(e))return t=yr(e.length,t),!0}),Yt(t,function(t){return Ft(e,qt(t))})}function oa(t,r){if(!t||!t.length)return[];var n=ia(t);return null==r?n:Ft(n,function(t){return St(r,e,t)})}var aa=Hn(function(e,t){return Ja(e)?hn(e,t):[]}),la=Hn(function(e){return gi(zt(e,Ja))}),sa=Hn(function(t){var r=Ho(t);return Ja(r)&&(r=e),gi(zt(t,Ja),so(r,2))}),ca=Hn(function(t){var r=Ho(t);return r="function"==typeof r?r:e,gi(zt(t,Ja),e,r)}),ua=Hn(ia),ha=Hn(function(t){var r=t.length,n=r>1?t[r-1]:e;return n="function"==typeof n?(t.pop(),n):e,oa(t,n)});function fa(e){var t=Dr(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var da=ro(function(t){var r=t.length,n=r?t[0]:0,i=this.__wrapped__,o=function(e){return an(e,t)};return!(r>1||this.__actions__.length)&&i instanceof Wr&&wo(n)?((i=i.slice(n,+n+(r?1:0))).__actions__.push({func:pa,args:[o],thisArg:e}),new Gr(i,this.__chain__).thru(function(t){return r&&!t.length&&t.push(e),t})):this.thru(o)}),ga=Oi(function(e,t,r){Te.call(e,r)?++e[r]:on(e,r,1)}),ma=Ii(Wo),ya=Ii(qo);function va(e,t){return(qa(e)?kt:fn)(e,so(t,3))}function wa(e,t){return(qa(e)?At:pn)(e,so(t,3))}var ba=Oi(function(e,t,r){Te.call(e,r)?e[r].push(t):on(e,r,[t])}),_a=Hn(function(e,t,r){var n=-1,i="function"==typeof t,o=$a(e)?_e(e.length):[];return fn(e,function(e){o[++n]=i?St(t,e,r):Mn(e,t,r)}),o}),xa=Oi(function(e,t,r){on(e,r,t)});function Pa(e,t){return(qa(e)?Ft:Dn)(e,so(t,3))}var Sa=Oi(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]}),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=ht||function(){return ft.Date.now()};function Aa(t,r,n){return r=n?e:r,r=t&&null==r?t.length:r,Zi(t,l,e,e,e,e,r)}function Ea(r,n){var i;if("function"!=typeof n)throw new ze(t);return r=dl(r),function(){return--r>0&&(i=n.apply(this,arguments)),r<=1&&(n=e),i}}var za=Hn(function(e,t,r){var n=1;if(r.length){var i=lr(r,lo(za));n|=o}return Zi(e,n,t,r,i)}),Ma=Hn(function(e,t,r){var n=3;if(r.length){var i=lr(r,lo(Ma));n|=o}return Zi(t,n,e,r,i)});function Oa(r,n,i){var o,a,l,s,c,u,h=0,f=!1,p=!1,d=!0;if("function"!=typeof r)throw new ze(t);function g(t){var n=o,i=a;return o=a=e,h=t,s=r.apply(i,n)}function m(t){var r=t-u;return u===e||r>=n||r<0||p&&t-h>=l}function y(){var e=ka();if(m(e))return v(e);c=Oo(y,function(e){var t=n-(e-u);return p?vr(t,l-(e-h)):t}(e))}function v(t){return c=e,d&&o?g(t):(o=a=e,s)}function w(){var t=ka(),r=m(t);if(o=arguments,a=this,u=t,r){if(c===e)return function(e){return h=e,c=Oo(y,n),f?g(e):s}(u);if(p)return xi(c),c=Oo(y,n),g(u)}return c===e&&(c=Oo(y,n)),s}return n=ml(n)||0,el(i)&&(f=!!i.leading,l=(p="maxWait"in i)?yr(ml(i.maxWait)||0,n):l,d="trailing"in i?!!i.trailing:d),w.cancel=function(){c!==e&&xi(c),h=0,o=u=a=c=e},w.flush=function(){return c===e?s:v(ka())},w}var Fa=Hn(function(e,t){return un(e,1,t)}),La=Hn(function(e,t,r){return un(e,ml(t)||0,r)});function Ca(e,r){if("function"!=typeof e||null!=r&&"function"!=typeof r)throw new ze(t);var n=function(){var t=arguments,i=r?r.apply(this,t):t[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,t);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ca.Cache||$r),n}function Ta(e){if("function"!=typeof e)throw new ze(t);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])?Ft(t[0],Ht(so())):Ft(yn(t,1),Ht(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 St(e,this,n)})}),Ba=Hn(function(t,r){var n=lr(r,lo(Ba));return Zi(t,o,e,r,n)}),Ia=Hn(function(t,r){var n=lr(r,lo(Ia));return Zi(t,a,e,r,n)}),Da=ro(function(t,r){return Zi(t,s,e,e,e,r)});function Na(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=_e.isArray,Va=vt?Ht(vt):function(e){return tl(e)&&jn(e)==M};function $a(e){return null!=e&&Qa(e.length)&&!Za(e)}function Ja(e){return tl(e)&&$a(e)}var Ya=Bt||ms,Xa=wt?Ht(wt):function(e){return tl(e)&&jn(e)==y};function Ha(e){if(!tl(e))return!1;var t=jn(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!il(e)}function Za(e){if(!el(e))return!1;var t=jn(e);return t==w||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ka(e){return"number"==typeof e&&e==dl(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=u}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=bt?Ht(bt):function(e){return tl(e)&&go(e)==_};function nl(e){return"number"==typeof e||tl(e)&&jn(e)==x}function il(e){if(!tl(e)||jn(e)!=P)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)==De}var ol=_t?Ht(_t):function(e){return tl(e)&&jn(e)==j},al=xt?Ht(xt):function(e){return tl(e)&&go(e)==k};function ll(e){return"string"==typeof e||!qa(e)&&tl(e)&&jn(e)==A}function sl(e){return"symbol"==typeof e||tl(e)&&jn(e)==E}var cl=Pt?Ht(Pt):function(e){return tl(e)&&Qa(e.length)&&!!ot[jn(e)]},ul=$i(In),hl=$i(function(e,t){return e<=t});function fl(e){if(!e)return[];if($a(e))return ll(e)?hr(e):zi(e);if(Qe&&e[Qe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Qe]());var t=go(e);return(t==_?or:t==k?sr:Nl)(e)}function pl(e){return e?(e=ml(e))===c||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,f):0}function ml(e){if("number"==typeof e)return e;if(sl(e))return h;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=Xt(e);var r=pe.test(e);return r||ge.test(e)?ct(e.slice(2),r?2:8):fe.test(e)?h:+e}function yl(e){return Mi(e,Fl(e))}function vl(e){return null==e?"":ci(e)}var wl=Fi(function(e,t){if(So(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)}),Pl=ro(an),Sl=Hn(function(t,r){t=ke(t);var n=-1,i=r.length,o=i>2?r[2]:e;for(o&&bo(r[0],r[1],o)&&(i=1);++n<i;)for(var a=r[n],l=Fl(a),s=-1,c=l.length;++s<c;){var u=l[s],h=t[u];(h===e||Na(h,Fe[u])&&!Te.call(t,u))&&(t[u]=a[u])}return t}),jl=Hn(function(t){return t.push(e,Qi),St(Cl,e,t)});function kl(t,r,n){var i=null==t?e:Pn(t,r);return i===e?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=Ft(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}),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=Ft(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),Dl=Hi(Fl);function Nl(e){return null==e?[]:Zt(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(ye,tr).replace(Ke,"")}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"),Jl=Ri(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),Yl=Ri(function(e,t,r){return e+(r?" ":"")+Hl(t)}),Xl=Ri(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Hl=Ti("toUpperCase");function Zl(t,r,n){return t=vl(t),(r=n?e:r)===e?function(e){return rt.test(e)}(t)?function(e){return e.match(et)||[]}(t):function(e){return e.match(le)||[]}(t):t.match(r)||[]}var Kl=Hn(function(t,r){try{return St(t,e,r)}catch(e){return Ha(e)?e:new Pe(e)}}),Ql=ro(function(e,t){return kt(t,function(t){t=Bo(t),on(e,t,za(e[t],e))}),e});function es(e){return function(){return e}}var ts=Di(),rs=Di(!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=Za(e);return kt(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,Lt([this.value()],arguments))})}),e}function ss(){}var cs=Wi(Ft),us=Wi(Et),hs=Wi(Rt);function fs(e){return _o(e)?qt(Bo(e)):function(e){return function(t){return Pn(t,e)}}(e)}var ps=Vi(),ds=Vi(!0);function gs(){return[]}function ms(){return!1}var ys,vs=Gi(function(e,t){return e+t},0),ws=Yi("ceil"),bs=Gi(function(e,t){return e/t},1),_s=Yi("floor"),xs=Gi(function(e,t){return e*t},1),Ps=Yi("round"),Ss=Gi(function(e,t){return e-t},0);return Dr.after=function(e,r){if("function"!=typeof r)throw new ze(t);return e=dl(e),function(){if(--e<1)return r.apply(this,arguments)}},Dr.ary=Aa,Dr.assign=wl,Dr.assignIn=bl,Dr.assignInWith=_l,Dr.assignWith=xl,Dr.at=Pl,Dr.before=Ea,Dr.bind=za,Dr.bindAll=Ql,Dr.bindKey=Ma,Dr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qa(e)?e:[e]},Dr.chain=fa,Dr.chunk=function(t,r,n){r=(n?bo(t,r,n):r===e)?1:yr(dl(r),0);var i=null==t?0:t.length;if(!i||r<1)return[];for(var o=0,a=0,l=_e(dt(i/r));o<i;)l[a++]=ni(t,o,o+=r);return l},Dr.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},Dr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=_e(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Lt(qa(r)?zi(r):[r],yn(t,1))},Dr.cond=function(e){var r=null==e?0:e.length,n=so();return e=r?Ft(e,function(e){if("function"!=typeof e[1])throw new ze(t);return[n(e[0]),e[1]]}):[],Hn(function(t){for(var n=-1;++n<r;){var i=e[n];if(St(i[0],this,t))return St(i[1],this,t)}})},Dr.conforms=function(e){return function(e){var t=Ol(e);return function(r){return cn(r,e,t)}}(sn(e,1))},Dr.constant=es,Dr.countBy=ga,Dr.create=function(e,t){var r=Nr(e);return null==t?r:nn(r,t)},Dr.curry=function t(r,n,i){var o=Zi(r,8,e,e,e,e,e,n=i?e:n);return o.placeholder=t.placeholder,o},Dr.curryRight=function t(r,n,o){var a=Zi(r,i,e,e,e,e,e,n=o?e:n);return a.placeholder=t.placeholder,a},Dr.debounce=Oa,Dr.defaults=Sl,Dr.defaultsDeep=jl,Dr.defer=Fa,Dr.delay=La,Dr.difference=No,Dr.differenceBy=Uo,Dr.differenceWith=Go,Dr.drop=function(t,r,n){var i=null==t?0:t.length;return i?ni(t,(r=n||r===e?1:dl(r))<0?0:r,i):[]},Dr.dropRight=function(t,r,n){var i=null==t?0:t.length;return i?ni(t,0,(r=i-(r=n||r===e?1:dl(r)))<0?0:r):[]},Dr.dropRightWhile=function(e,t){return e&&e.length?pi(e,so(t,3),!0,!0):[]},Dr.dropWhile=function(e,t){return e&&e.length?pi(e,so(t,3),!0):[]},Dr.fill=function(t,r,n,i){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&bo(t,r,n)&&(n=0,i=o),function(t,r,n,i){var o=t.length;for((n=dl(n))<0&&(n=-n>o?0:o+n),(i=i===e||i>o?o:dl(i))<0&&(i+=o),i=n>i?0:gl(i);n<i;)t[n++]=r;return t}(t,r,n,i)):[]},Dr.filter=function(e,t){return(qa(e)?zt:mn)(e,so(t,3))},Dr.flatMap=function(e,t){return yn(Pa(e,t),1)},Dr.flatMapDeep=function(e,t){return yn(Pa(e,t),c)},Dr.flatMapDepth=function(t,r,n){return n=n===e?1:dl(n),yn(Pa(t,r),n)},Dr.flatten=Vo,Dr.flattenDeep=function(e){return null!=e&&e.length?yn(e,c):[]},Dr.flattenDepth=function(t,r){return null!=t&&t.length?yn(t,r=r===e?1:dl(r)):[]},Dr.flip=function(e){return Zi(e,512)},Dr.flow=ts,Dr.flowRight=rs,Dr.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},Dr.functions=function(e){return null==e?[]:xn(e,Ol(e))},Dr.functionsIn=function(e){return null==e?[]:xn(e,Fl(e))},Dr.groupBy=ba,Dr.initial=function(e){return null!=e&&e.length?ni(e,0,-1):[]},Dr.intersection=Jo,Dr.intersectionBy=Yo,Dr.intersectionWith=Xo,Dr.invert=El,Dr.invertBy=zl,Dr.invokeMap=_a,Dr.iteratee=is,Dr.keyBy=xa,Dr.keys=Ol,Dr.keysIn=Fl,Dr.map=Pa,Dr.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},Dr.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},Dr.matches=function(e){return Nn(sn(e,1))},Dr.matchesProperty=function(e,t){return Un(e,sn(t,1))},Dr.memoize=Ca,Dr.merge=Ll,Dr.mergeWith=Cl,Dr.method=os,Dr.methodOf=as,Dr.mixin=ls,Dr.negate=Ta,Dr.nthArg=function(e){return e=dl(e),Hn(function(t){return Wn(t,e)})},Dr.omit=Tl,Dr.omitBy=function(e,t){return Bl(e,Ta(so(t)))},Dr.once=function(e){return Ea(2,e)},Dr.orderBy=function(t,r,n,i){return null==t?[]:(qa(r)||(r=null==r?[]:[r]),qa(n=i?e:n)||(n=null==n?[]:[n]),qn(t,r,n))},Dr.over=cs,Dr.overArgs=Ra,Dr.overEvery=us,Dr.overSome=hs,Dr.partial=Ba,Dr.partialRight=Ia,Dr.partition=Sa,Dr.pick=Rl,Dr.pickBy=Bl,Dr.property=fs,Dr.propertyOf=function(t){return function(r){return null==t?e:Pn(t,r)}},Dr.pull=Zo,Dr.pullAll=Ko,Dr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?$n(e,t,so(r,2)):e},Dr.pullAllWith=function(t,r,n){return t&&t.length&&r&&r.length?$n(t,r,e,n):t},Dr.pullAt=Qo,Dr.range=ps,Dr.rangeRight=ds,Dr.rearg=Da,Dr.reject=function(e,t){return(qa(e)?zt:mn)(e,Ta(so(t,3)))},Dr.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},Dr.rest=function(r,n){if("function"!=typeof r)throw new ze(t);return Hn(r,n=n===e?n:dl(n))},Dr.reverse=ea,Dr.sampleSize=function(t,r,n){return r=(n?bo(t,r,n):r===e)?1:dl(r),(qa(t)?Zr:Kn)(t,r)},Dr.set=function(e,t,r){return null==e?e:Qn(e,t,r)},Dr.setWith=function(t,r,n,i){return i="function"==typeof i?i:e,null==t?t:Qn(t,r,n,i)},Dr.shuffle=function(e){return(qa(e)?Kr:ri)(e)},Dr.slice=function(t,r,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&bo(t,r,n)?(r=0,n=i):(r=null==r?0:dl(r),n=n===e?i:dl(n)),ni(t,r,n)):[]},Dr.sortBy=ja,Dr.sortedUniq=function(e){return e&&e.length?li(e):[]},Dr.sortedUniqBy=function(e,t){return e&&e.length?li(e,so(t,2)):[]},Dr.split=function(t,r,n){return n&&"number"!=typeof n&&bo(t,r,n)&&(r=n=e),(n=n===e?f:n>>>0)?(t=vl(t))&&("string"==typeof r||null!=r&&!ol(r))&&!(r=ci(r))&&ir(t)?_i(hr(t),0,n):t.split(r,n):[]},Dr.spread=function(e,r){if("function"!=typeof e)throw new ze(t);return r=null==r?0:yr(dl(r),0),Hn(function(t){var n=t[r],i=_i(t,0,r);return n&&Lt(i,n),St(e,this,i)})},Dr.tail=function(e){var t=null==e?0:e.length;return t?ni(e,1,t):[]},Dr.take=function(t,r,n){return t&&t.length?ni(t,0,(r=n||r===e?1:dl(r))<0?0:r):[]},Dr.takeRight=function(t,r,n){var i=null==t?0:t.length;return i?ni(t,(r=i-(r=n||r===e?1:dl(r)))<0?0:r,i):[]},Dr.takeRightWhile=function(e,t){return e&&e.length?pi(e,so(t,3),!1,!0):[]},Dr.takeWhile=function(e,t){return e&&e.length?pi(e,so(t,3)):[]},Dr.tap=function(e,t){return t(e),e},Dr.throttle=function(e,r,n){var i=!0,o=!0;if("function"!=typeof e)throw new ze(t);return el(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Oa(e,r,{leading:i,maxWait:r,trailing:o})},Dr.thru=pa,Dr.toArray=fl,Dr.toPairs=Il,Dr.toPairsIn=Dl,Dr.toPath=function(e){return qa(e)?Ft(e,Bo):sl(e)?[e]:zi(Ro(vl(e)))},Dr.toPlainObject=yl,Dr.transform=function(e,t,r){var n=qa(e),i=n||Ya(e)||cl(e);if(t=so(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:el(e)&&Za(o)?Nr($e(e)):{}}return(i?kt:bn)(e,function(e,n,i){return t(r,e,n,i)}),r},Dr.unary=function(e){return Aa(e,1)},Dr.union=ta,Dr.unionBy=ra,Dr.unionWith=na,Dr.uniq=function(e){return e&&e.length?ui(e):[]},Dr.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},Dr.uniqWith=function(t,r){return r="function"==typeof r?r:e,t&&t.length?ui(t,e,r):[]},Dr.unset=function(e,t){return null==e||hi(e,t)},Dr.unzip=ia,Dr.unzipWith=oa,Dr.update=function(e,t,r){return null==e?e:fi(e,t,vi(r))},Dr.updateWith=function(t,r,n,i){return i="function"==typeof i?i:e,null==t?t:fi(t,r,vi(n),i)},Dr.values=Nl,Dr.valuesIn=function(e){return null==e?[]:Zt(e,Fl(e))},Dr.without=aa,Dr.words=Zl,Dr.wrap=function(e,t){return Ba(vi(t),e)},Dr.xor=la,Dr.xorBy=sa,Dr.xorWith=ca,Dr.zip=ua,Dr.zipObject=function(e,t){return mi(e||[],t||[],en)},Dr.zipObjectDeep=function(e,t){return mi(e||[],t||[],Qn)},Dr.zipWith=ha,Dr.entries=Il,Dr.entriesIn=Dl,Dr.extend=bl,Dr.extendWith=_l,ls(Dr,Dr),Dr.add=vs,Dr.attempt=Kl,Dr.camelCase=Ul,Dr.capitalize=Gl,Dr.ceil=ws,Dr.clamp=function(t,r,n){return n===e&&(n=r,r=e),n!==e&&(n=(n=ml(n))==n?n:0),r!==e&&(r=(r=ml(r))==r?r:0),ln(ml(t),r,n)},Dr.clone=function(e){return sn(e,4)},Dr.cloneDeep=function(e){return sn(e,5)},Dr.cloneDeepWith=function(t,r){return sn(t,5,r="function"==typeof r?r:e)},Dr.cloneWith=function(t,r){return sn(t,4,r="function"==typeof r?r:e)},Dr.conformsTo=function(e,t){return null==t||cn(e,t,Ol(t))},Dr.deburr=Wl,Dr.defaultTo=function(e,t){return null==e||e!=e?t:e},Dr.divide=bs,Dr.endsWith=function(t,r,n){t=vl(t),r=ci(r);var i=t.length,o=n=n===e?i:ln(dl(n),0,i);return(n-=r.length)>=0&&t.slice(n,o)==r},Dr.eq=Na,Dr.escape=function(e){return(e=vl(e))&&J.test(e)?e.replace(V,rr):e},Dr.escapeRegExp=function(e){return(e=vl(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Dr.every=function(t,r,n){var i=qa(t)?Et:dn;return n&&bo(t,r,n)&&(r=e),i(t,so(r,3))},Dr.find=ma,Dr.findIndex=Wo,Dr.findKey=function(e,t){return It(e,so(t,3),bn)},Dr.findLast=ya,Dr.findLastIndex=qo,Dr.findLastKey=function(e,t){return It(e,so(t,3),_n)},Dr.floor=_s,Dr.forEach=va,Dr.forEachRight=wa,Dr.forIn=function(e,t){return null==e?e:vn(e,so(t,3),Fl)},Dr.forInRight=function(e,t){return null==e?e:wn(e,so(t,3),Fl)},Dr.forOwn=function(e,t){return e&&bn(e,so(t,3))},Dr.forOwnRight=function(e,t){return e&&_n(e,so(t,3))},Dr.get=kl,Dr.gt=Ua,Dr.gte=Ga,Dr.has=function(e,t){return null!=e&&mo(e,t,An)},Dr.hasIn=Al,Dr.head=$o,Dr.identity=ns,Dr.includes=function(e,t,r,n){e=$a(e)?e:Nl(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&&Nt(e,t,r)>-1},Dr.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)),Nt(e,t,i)},Dr.inRange=function(t,r,n){return r=pl(r),n===e?(n=r,r=0):n=pl(n),function(e,t,r){return e>=vr(t,r)&&e<yr(t,r)}(t=ml(t),r,n)},Dr.invoke=Ml,Dr.isArguments=Wa,Dr.isArray=qa,Dr.isArrayBuffer=Va,Dr.isArrayLike=$a,Dr.isArrayLikeObject=Ja,Dr.isBoolean=function(e){return!0===e||!1===e||tl(e)&&jn(e)==m},Dr.isBuffer=Ya,Dr.isDate=Xa,Dr.isElement=function(e){return tl(e)&&1===e.nodeType&&!il(e)},Dr.isEmpty=function(e){if(null==e)return!0;if($a(e)&&(qa(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||cl(e)||Wa(e)))return!e.length;var t=go(e);if(t==_||t==k)return!e.size;if(So(e))return!Rn(e).length;for(var r in e)if(Te.call(e,r))return!1;return!0},Dr.isEqual=function(e,t){return Fn(e,t)},Dr.isEqualWith=function(t,r,n){var i=(n="function"==typeof n?n:e)?n(t,r):e;return i===e?Fn(t,r,e,n):!!i},Dr.isError=Ha,Dr.isFinite=function(e){return"number"==typeof e&&Vt(e)},Dr.isFunction=Za,Dr.isInteger=Ka,Dr.isLength=Qa,Dr.isMap=rl,Dr.isMatch=function(e,t){return e===t||Ln(e,t,uo(t))},Dr.isMatchWith=function(t,r,n){return n="function"==typeof n?n:e,Ln(t,r,uo(r),n)},Dr.isNaN=function(e){return nl(e)&&e!=+e},Dr.isNative=function(e){if(Po(e))throw new Pe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Cn(e)},Dr.isNil=function(e){return null==e},Dr.isNull=function(e){return null===e},Dr.isNumber=nl,Dr.isObject=el,Dr.isObjectLike=tl,Dr.isPlainObject=il,Dr.isRegExp=ol,Dr.isSafeInteger=function(e){return Ka(e)&&e>=-9007199254740991&&e<=u},Dr.isSet=al,Dr.isString=ll,Dr.isSymbol=sl,Dr.isTypedArray=cl,Dr.isUndefined=function(t){return t===e},Dr.isWeakMap=function(e){return tl(e)&&go(e)==z},Dr.isWeakSet=function(e){return tl(e)&&"[object WeakSet]"==jn(e)},Dr.join=function(e,t){return null==e?"":gr.call(e,t)},Dr.kebabCase=ql,Dr.last=Ho,Dr.lastIndexOf=function(t,r,n){var i=null==t?0:t.length;if(!i)return-1;var o=i;return n!==e&&(o=(o=dl(n))<0?yr(i+o,0):vr(o,i-1)),r==r?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(t,r,o):Dt(t,Gt,o,!0)},Dr.lowerCase=Vl,Dr.lowerFirst=$l,Dr.lt=ul,Dr.lte=hl,Dr.max=function(t){return t&&t.length?gn(t,ns,kn):e},Dr.maxBy=function(t,r){return t&&t.length?gn(t,so(r,2),kn):e},Dr.mean=function(e){return Wt(e,ns)},Dr.meanBy=function(e,t){return Wt(e,so(t,2))},Dr.min=function(t){return t&&t.length?gn(t,ns,In):e},Dr.minBy=function(t,r){return t&&t.length?gn(t,so(r,2),In):e},Dr.stubArray=gs,Dr.stubFalse=ms,Dr.stubObject=function(){return{}},Dr.stubString=function(){return""},Dr.stubTrue=function(){return!0},Dr.multiply=xs,Dr.nth=function(t,r){return t&&t.length?Wn(t,dl(r)):e},Dr.noConflict=function(){return ft._===this&&(ft._=Ne),this},Dr.noop=ss,Dr.now=ka,Dr.pad=function(e,t,r){e=vl(e);var n=(t=dl(t))?ur(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return qi(mt(i),r)+e+qi(dt(i),r)},Dr.padEnd=function(e,t,r){e=vl(e);var n=(t=dl(t))?ur(e):0;return t&&n<t?e+qi(t-n,r):e},Dr.padStart=function(e,t,r){e=vl(e);var n=(t=dl(t))?ur(e):0;return t&&n<t?qi(t-n,r)+e:e},Dr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(vl(e).replace(re,""),t||0)},Dr.random=function(t,r,n){if(n&&"boolean"!=typeof n&&bo(t,r,n)&&(r=n=e),n===e&&("boolean"==typeof r?(n=r,r=e):"boolean"==typeof t&&(n=t,t=e)),t===e&&r===e?(t=0,r=1):(t=pl(t),r===e?(r=t,t=0):r=pl(r)),t>r){var i=t;t=r,r=i}if(n||t%1||r%1){var o=_r();return vr(t+o*(r-t+st("1e-"+((o+"").length-1))),r)}return Yn(t,r)},Dr.reduce=function(e,t,r){var n=qa(e)?Ct:$t,i=arguments.length<3;return n(e,so(t,4),r,i,fn)},Dr.reduceRight=function(e,t,r){var n=qa(e)?Tt:$t,i=arguments.length<3;return n(e,so(t,4),r,i,pn)},Dr.repeat=function(t,r,n){return r=(n?bo(t,r,n):r===e)?1:dl(r),Xn(vl(t),r)},Dr.replace=function(){var e=arguments,t=vl(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dr.result=function(t,r,n){var i=-1,o=(r=wi(r,t)).length;for(o||(o=1,t=e);++i<o;){var a=null==t?e:t[Bo(r[i])];a===e&&(i=o,a=n),t=Za(a)?a.call(t):a}return t},Dr.round=Ps,Dr.runInContext=ne,Dr.sample=function(e){return(qa(e)?Hr:Zn)(e)},Dr.size=function(e){if(null==e)return 0;if($a(e))return ll(e)?ur(e):e.length;var t=go(e);return t==_||t==k?e.size:Rn(e).length},Dr.snakeCase=Jl,Dr.some=function(t,r,n){var i=qa(t)?Rt:ii;return n&&bo(t,r,n)&&(r=e),i(t,so(r,3))},Dr.sortedIndex=function(e,t){return oi(e,t)},Dr.sortedIndexBy=function(e,t,r){return ai(e,t,so(r,2))},Dr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=oi(e,t);if(n<r&&Na(e[n],t))return n}return-1},Dr.sortedLastIndex=function(e,t){return oi(e,t,!0)},Dr.sortedLastIndexBy=function(e,t,r){return ai(e,t,so(r,2),!0)},Dr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=oi(e,t,!0)-1;if(Na(e[r],t))return r}return-1},Dr.startCase=Yl,Dr.startsWith=function(e,t,r){return e=vl(e),r=null==r?0:ln(dl(r),0,e.length),t=ci(t),e.slice(r,r+t.length)==t},Dr.subtract=Ss,Dr.sum=function(e){return e&&e.length?Jt(e,ns):0},Dr.sumBy=function(e,t){return e&&e.length?Jt(e,so(t,2)):0},Dr.template=function(t,r,n){var i=Dr.templateSettings;n&&bo(t,r,n)&&(r=e),t=vl(t),r=_l({},r,i,Ki);var o,a,l=_l({},r.imports,i.imports,Ki),s=Ol(l),c=Zt(l,s),u=0,h=r.interpolate||ve,f="__p += '",p=Ae((r.escape||ve).source+"|"+h.source+"|"+(h===H?ue:ve).source+"|"+(r.evaluate||ve).source+"|$","g"),d="//# sourceURL="+(Te.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";t.replace(p,function(e,r,n,i,l,s){return n||(n=i),f+=t.slice(u,s).replace(we,nr),r&&(o=!0,f+="' +\n__e("+r+") +\n'"),l&&(a=!0,f+="';\n"+l+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=s+e.length,e}),f+="';\n";var g=Te.call(r,"variable")&&r.variable;if(g){if(se.test(g))throw new Pe("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(U,""):f).replace(G,"$1").replace(W,"$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=Kl(function(){return Se(s,d+"return "+f).apply(e,c)});if(m.source=f,Ha(m))throw m;return m},Dr.times=function(e,t){if((e=dl(e))<1||e>u)return[];var r=f,n=vr(e,f);t=so(t),e-=f;for(var i=Yt(n,t);++r<e;)t(r);return i},Dr.toFinite=pl,Dr.toInteger=dl,Dr.toLength=gl,Dr.toLower=function(e){return vl(e).toLowerCase()},Dr.toNumber=ml,Dr.toSafeInteger=function(e){return e?ln(dl(e),-9007199254740991,u):0===e?e:0},Dr.toString=vl,Dr.toUpper=function(e){return vl(e).toUpperCase()},Dr.trim=function(t,r,n){if((t=vl(t))&&(n||r===e))return Xt(t);if(!t||!(r=ci(r)))return t;var i=hr(t),o=hr(r);return _i(i,Qt(i,o),er(i,o)+1).join("")},Dr.trimEnd=function(t,r,n){if((t=vl(t))&&(n||r===e))return t.slice(0,fr(t)+1);if(!t||!(r=ci(r)))return t;var i=hr(t);return _i(i,0,er(i,hr(r))+1).join("")},Dr.trimStart=function(t,r,n){if((t=vl(t))&&(n||r===e))return t.replace(re,"");if(!t||!(r=ci(r)))return t;var i=hr(t);return _i(i,Qt(i,hr(r))).join("")},Dr.truncate=function(t,r){var n=30,i="...";if(el(r)){var o="separator"in r?r.separator:o;n="length"in r?dl(r.length):n,i="omission"in r?ci(r.omission):i}var a=(t=vl(t)).length;if(ir(t)){var l=hr(t);a=l.length}if(n>=a)return t;var s=n-ur(i);if(s<1)return i;var c=l?_i(l,0,s).join(""):t.slice(0,s);if(o===e)return c+i;if(l&&(s+=c.length-s),ol(o)){if(t.slice(s).search(o)){var u,h=c;for(o.global||(o=Ae(o.source,vl(he.exec(o))+"g")),o.lastIndex=0;u=o.exec(h);)var f=u.index;c=c.slice(0,f===e?s:f)}}else if(t.indexOf(ci(o),s)!=s){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+i},Dr.unescape=function(e){return(e=vl(e))&&$.test(e)?e.replace(q,pr):e},Dr.uniqueId=function(e){var t=++Re;return vl(e)+t},Dr.upperCase=Xl,Dr.upperFirst=Hl,Dr.each=va,Dr.eachRight=wa,Dr.first=$o,ls(Dr,(ys={},bn(Dr,function(e,t){Te.call(Dr.prototype,t)||(ys[t]=e)}),ys),{chain:!1}),Dr.VERSION="4.17.21",kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Dr[e].placeholder=Dr}),kt(["drop","take"],function(t,r){Wr.prototype[t]=function(n){n=n===e?1:yr(dl(n),0);var i=this.__filtered__&&!r?new Wr(this):this.clone();return i.__filtered__?i.__takeCount__=vr(n,i.__takeCount__):i.__views__.push({size:vr(n,f),type:t+(i.__dir__<0?"Right":"")}),i},Wr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),kt(["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}}),kt(["head","last"],function(e,t){var r="take"+(t?"Right":"");Wr.prototype[e]=function(){return this[r](1).value()[0]}}),kt(["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(t,r){t=dl(t);var n=this;return n.__filtered__&&(t>0||r<0)?new Wr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),r!==e&&(n=(r=dl(r))<0?n.dropRight(-r):n.take(r-t)),n)},Wr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wr.prototype.toArray=function(){return this.take(f)},bn(Wr.prototype,function(t,r){var n=/^(?:filter|find|map|reject)|While$/.test(r),i=/^(?:head|last)$/.test(r),o=Dr[i?"take"+("last"==r?"Right":""):r],a=i||/^find/.test(r);o&&(Dr.prototype[r]=function(){var r=this.__wrapped__,l=i?[1]:arguments,s=r instanceof Wr,c=l[0],u=s||qa(r),h=function(e){var t=o.apply(Dr,Lt([e],l));return i&&f?t[0]:t};u&&n&&"function"==typeof c&&1!=c.length&&(s=u=!1);var f=this.__chain__,p=!!this.__actions__.length,d=a&&!f,g=s&&!p;if(!a&&u){r=g?r:new Wr(this);var m=t.apply(r,l);return m.__actions__.push({func:pa,args:[h],thisArg:e}),new Gr(m,f)}return d&&g?t.apply(this,l):(m=this.thru(h),d?i?m.value()[0]:m.value():m)})}),kt(["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);Dr.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=Dr[t];if(r){var n=r.name+"";Te.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}}),Mr[Ni(e,2).name]=[{name:"wrapper",func:e}],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){for(var n=-1,i=r.length;++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,c=n?l:a-1,u=this.__iteratees__,h=u.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[c+=t];++g<h;){var y=u[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},Dr.prototype.at=da,Dr.prototype.chain=function(){return fa(this)},Dr.prototype.commit=function(){return new Gr(this.value(),this.__chain__)},Dr.prototype.next=function(){this.__values__===e&&(this.__values__=fl(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},Dr.prototype.plant=function(t){for(var r,n=this;n instanceof Ur;){var i=Do(n);i.__index__=0,i.__values__=e,r?o.__wrapped__=i:r=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,r},Dr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Wr){var r=t;return this.__actions__.length&&(r=new Wr(this)),(r=r.reverse()).__actions__.push({func:pa,args:[ea],thisArg:e}),new Gr(r,this.__chain__)}return this.thru(ea)},Dr.prototype.toJSON=Dr.prototype.valueOf=Dr.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},Dr.prototype.first=Dr.prototype.head,Qe&&(Dr.prototype[Qe]=function(){return this}),Dr}();dt?((dt.exports=dr)._=dr,pt._=dr):ft._=dr}.call(_e);var Fs,Ls,Cs,Ts,Rs="meters";function Bs(e){var t=Hs.getState().data;if("string"==typeof e){if(!e||!t.hasOwnProperty(Cs.Edge)||!t[Cs.Edge].edges.hasOwnProperty(e))return;return Os.cloneDeep(t[Cs.Edge].edges[e])}var r=Is(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=ma();n.load(t);var i,o,a=jl(ee(e)),l=[a[0]-r,a[1]-r,a[2]+r,a[3]+r],s=n.search(l),c=1/0;s.features.forEach(function(t){var r=yl(t,e),n=le(r.geometry.coordinates,e);n<c&&(c=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=yl(t,e),n=le(r.geometry.coordinates,e);n<c&&(c=n,i=r,o=t)}));return{nearestPoint:i,closestLine:o,minDistance:c}}(e.sourceCoords,r),i=n.nearestPoint,o=n.closestLine;Hs.getState().updateNetworkWithIntersection(o,i.geometry.coordinates);var a=[te([e.sourceCoords,i.geometry.coordinates],{title:"user_edgeLine",zone:o.properties.zone,wheelchair:1,direction:Fs.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 Hs.getState().upsertEdge(l),l}function Is(e,t){void 0===t&&(t=!0);var r=Hs.getState().data;if(!r.hasOwnProperty(Cs.Network))return[];for(var n=r[Cs.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 Os.cloneDeep(i)}function Ds(e,t){return void 0===t&&(t=!0),Is(e,t)}function Ns(e){return Bs(e)}function Us(e){var t;return(t=Hs.getState().data).hasOwnProperty("portal")?t.portal:{edgeData:{},lines:[]}}function Gs(e){return function(e){var t=Hs.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"}(Fs||(Fs={})),function(e){e.Transit="transit",e.Public="public"}(Ls||(Ls={})),function(e){e.Edge="what.route_edge",e.Network="what.route_network",e.PortalNetwork="what.link"}(Cs||(Cs={})),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=""}(Ts||(Ts={}));function Ws(e,t,r){void 0===r&&(r=!0);var n=function(r,n){var i=yl(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 dl(e,function(e,n,i,o,a){if(-1===r){var l=ee(e);le(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 qs(e){var t=e.split("."),r=t[t.length-1];return e.replace(".".concat(r),"")}var Vs="where.changi";function $s(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 Js(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 Ys,Xs,Hs=Es(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[Cs.Network]||[];if(0!==a.length){var l=!1,s=a.map(function(e){Os.isEqual(e,r)&&(Ws(ee(n),e,!1),l=!0);return e});l&&e({data:M(M({},o),(i={},i[Cs.Network]=s,i))})}}},upsertEdge:function(r){var n,i,o;if(r&&r.id){var a=t().data,l=M(M({},a),((n={})[Cs.Edge]=M(M({},a[Cs.Edge]),{edges:M(M({},(null===(o=a[Cs.Edge])||void 0===o?void 0:o.edges)||{}),(i={},i[r.id]=r,i))}),n));e({data:l})}}}}),Zs=Es(function(e){return{data:{},setMapObjectsData:function(t){return e({data:t})}}}),Ks=Es(function(e){return{data:{},setRoute:function(t){return e({data:t})}}}),Qs=Es(function(e){return{data:{},setRoute:function(t){return e({data:t})}}});function ec(e){return e===Ys.Routing?"generate-route-json-per-role":e===Ys.MapObjects?"generate-map-objects-per-role":e===Ys.MBTiles?"generate-vector-tiles":e===Ys.Fonts?"generate-font-sprites":void 0}function tc(e,t){return t.valueOf()+e}!function(e){e.Routing="routing",e.MapObjects="mapObjects",e.MBTiles="mbtiles",e.Fonts="fonts"}(Ys||(Ys={})),function(e){e.Ready="Ready",e.Awaiting="Awaiting",e.DownloadingResources="DownloadingResources",e.Unavailable="Unavailable"}(Xs||(Xs={}));var rc=Hs.setState,nc=Zs.setState,ic=Ks.setState,oc=Qs.setState;function ac(e,t,r){var n,i;return O(this,void 0,void 0,function(){var o,a,l,s,c,u,h,f,p,d,g,m,y,v,w,b,_,x,S,j,A,E,z,M=this;return F(this,function(L){switch(L.label){case 0:o=e.publishedDataType,a=tc("version",o),l=tc("roleName",o),s=null==e?void 0:e.roleName,c=Xs.Awaiting,u=function(e){return e===Ys.Routing?rc:e===Ys.MapObjects?nc:e===Ys.MBTiles?ic:e===Ys.Fonts?oc:void 0}(o),h=e.secretKey,f="".concat(k.DocumentDirectoryPath,"/extracted/"),p=function(){return O(M,void 0,void 0,function(){var r;return F(this,function(n){return r=t.contains(a)?t.getString(a):"0.0.0",[2,new Promise(function(n,i){P({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:ec(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},u=t.getString(a),h=t.getString(l),f=u;if(r.hasOwnProperty("version")&&(f=r.version),i.currentVersion=u,i.remoteVersion=f,u){var p=t.getString(tc("data",o));if(o===Ys.MBTiles||o===Ys.Fonts)p&&(i.data=p);else t.getString(tc("encryptionTag",o))&&p&&(i.data=p)}if(s&&(i.roleName=s,h!==s))return r.hasOwnProperty("downloadUrl")&&(i.URL=r.downloadUrl),c=Xs.DownloadingResources,console.log("Role mismatch. Setting status to DownloadingResources: ",i.roleName,h),void n(i);f&&(r.hasOwnProperty("downloadUrl")&&(i.URL=r.downloadUrl),(u&&f>u||!u||!i.data)&&(c=i.URL?Xs.DownloadingResources:c)),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)})})]})})},d=function(e,r,n,i){try{return t.set(tc("data",o),e),t.set(a,r),t.set(tc("roleName",o),n),i&&t.set(tc("encryptionTag",o),i),!0}catch(e){return console.log("error storing routing file from local storage",e),!1}},g=function(){return O(M,void 0,void 0,function(){var r,n,i,a;return F(this,function(l){switch(l.label){case 0:return r=t.getString(tc("data",o)),o!==Ys.MBTiles&&o!==Ys.Fonts?[3,2]:[4,lc(o,r,f,h)];case 1:return(n=l.sent())?(u({data:n}),c=Xs.Ready,[2,!0]):[2,!1];case 2:return i=t.getString(tc("encryptionTag",o)),r&&i?[4,Zl(r,i,e.secretKey)]:[3,4];case 3:return a=l.sent(),u({data:a}),c=Xs.Ready,[2,!0];case 4:return[2,!1];case 5:return[2]}})})},m=function(){return O(M,void 0,void 0,function(){return F(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,g()];case 1:return e.sent()||(console.log("metaAtlasSDK: failed to load data",o),c=Xs.Unavailable),[3,3];case 2:return e.sent(),console.log("metaAtlasSDK: erro while loading data",o),c=Xs.Unavailable,t.clearAll(),[3,3];case 3:return[2]}})})},L.label=1;case 1:return L.trys.push([1,26,,28]),[4,p()];case 2:if(y=L.sent(),c!==Xs.DownloadingResources||!y.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!==Ys.MBTiles&&o!==Ys.Fonts?[3,7]:(v="".concat(k.DocumentDirectoryPath,"/").concat(o,".zip"),[4,k.downloadFile({fromUrl:y.URL,toFile:v,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 w=L.sent(),[4,k.mkdir(f)];case 5:if(L.sent(),200!==w.statusCode)throw r&&(null==r?void 0:r.onError)&&(null===(n=null==r?void 0:r.onError)||void 0===n||n.call(r,w.statusCode.toString())),new Error("Download failed with status ".concat(w.statusCode));return r&&(null==r?void 0:r.onSuccess)&&(null===(i=null==r?void 0:r.onSuccess)||void 0===i||i.call(r,v)),console.log("File downloaded to: ".concat(v)),k.stat(v).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)}),x=d(v,y.remoteVersion,s),[4,lc(o,v,f,h)];case 6:if(!(A=L.sent()))throw new Error("No MBTiles file found in the archive");return x&&(console.log("Loaded file"),u({data:A}),c=Xs.Ready),[3,11];case 7:return[4,fetch(y.URL)];case 8:if(!(w=L.sent()).ok)throw new Error("HTTP error! Status: ".concat(w.status));return[4,w.json()];case 9:return b=L.sent(),_=b.data,E=b.tag,[4,Zl(_,E,e.secretKey)];case 10:z=L.sent(),(x=d(_,y.remoteVersion,s,E))&&(console.log("loaded file"),u({data:z}),c=Xs.Ready),L.label=11;case 11:return[3,14];case 12:return S=L.sent(),console.error("Error fetching and decrypting data:",S),[4,m()];case 13:return L.sent(),[3,14];case 14:return[3,25];case 15:return o!==Ys.MBTiles&&o!==Ys.Fonts?[3,21]:(j=t.getString(tc("data",o)),[4,k.exists(j)]);case 16:return L.sent()?console.log("File exists at: ".concat(j)):(console.log("File does not exist at: ".concat(j)),d("","","")),[4,lc(o,j,f,h)];case 17:return A=L.sent(),j?(u({data:A}),c=Xs.Ready,[3,20]):[3,18];case 18:return[4,m()];case 19:L.sent(),L.label=20;case 20:return[3,25];case 21:return E=t.getString("encryptionTag"),y.data&&E?(console.log("loaded local file"),[4,Zl(y.data,E,e.secretKey)]):[3,23];case 22:return z=L.sent(),u({data:z}),c=Xs.Ready,[3,25];case 23:return[4,m()];case 24:L.sent(),L.label=25;case 25:return[3,28];case 26:return L.sent(),[4,m()];case 27:return L.sent(),[3,28];case 28:return[2,c]}})})}function lc(e,t,r,n){return O(this,void 0,void 0,function(){var i,o,a,l,s,c,u,h,f,p,d,g,m,y,v,w,b,_,x,P,S;return F(this,function(j){switch(j.label){case 0:return j.trys.push([0,30,,31]),i="",[4,k.exists(r)];case 1:return j.sent()?[3,3]:[4,k.mkdir(r)];case 2:return j.sent(),console.log("Directory created at: ".concat(r)),[3,4];case 3:console.log("Directory already exists at: ".concat(r)),j.label=4;case 4:return e!==Ys.MBTiles?[3,24]:[4,E(t,r,n)];case 5:return j.sent(),[4,k.readDir(r)];case 6:o=j.sent(),a=o.filter(function(e){return e.name.endsWith(".mbtiles")}),l=0,s=a,j.label=7;case 7:return l<s.length?(c=s[l],[4,k.unlink(c.path)]):[3,10];case 8:j.sent(),j.label=9;case 9:return l++,[3,7];case 10:return[4,k.readDir(r)];case 11:return v=j.sent(),u=v.find(function(e){return e.name.endsWith(".zip")}),u?[4,A("".concat(r).concat(u.name),r)]:[3,15];case 12:return j.sent(),h="".concat(r).concat(u.name),[4,k.exists(h)];case 13:return j.sent()?[4,sc(h)]:[3,15];case 14:j.sent(),j.label=15;case 15:return[4,k.readDir(r)];case 16:return f=j.sent(),p=f.find(function(e){return e.name.endsWith(".mbtiles")}),p?(d="geojson_".concat(performance.now().toFixed(0),".mbtiles"),g="".concat(r).concat(d),[4,k.moveFile(p.path,g)]):[3,22];case 17:return j.sent(),[4,k.exists(p.path)];case 18:return j.sent()?[4,k.unlink(p.path)]:[3,20];case 19:j.sent(),j.label=20;case 20:return[4,k.readDir(r)];case 21:return m=j.sent(),console.log("All files in unzip destination:",m),i=g,[3,23];case 22:throw new Error("MBTiles file not found.");case 23:return[3,29];case 24:return e!==Ys.Fonts?[3,28]:[4,A(t,r)];case 25:return y=j.sent(),[4,k.readDir(y)];case 26:return v=j.sent(),w=v.map(function(e){return e.name}),[4,k.readDir("".concat(y,"sprites"))];case 27:if(b=j.sent(),_=b.map(function(e){return e.name}),console.log("Sprites Files:",_),x=w.includes("fonts"),P=w.includes("sprites"),!x||!P)throw new Error("Missing required directories: fonts or sprites.");return i=y,[3,29];case 28:throw new Error("Unsupported data type.");case 29:return[2,i];case 30:throw S=j.sent(),console.error("Error extracting offline file path:",S),S;case 31:return[2]}})})}var sc=function(e){return O(void 0,void 0,void 0,function(){var t;return F(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,k.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 cc,uc,hc={};function fc(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 M(M({},r),{name:e.name,taxonomyPath:e.taxonomyPath,children:(null!=t?t:[]).map(fc)})}function pc(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++){pc(i[n],t)}}function dc(e,t){if(!t||"object"!==Y(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"===Y(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)&&pc(o,r)}return n}function gc(e,t){if(!e||"object"!==Y(e)||0===Object.keys(e).length)return console.error("[focus-core] Focus tree data is missing or empty"),void(hc={});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]=fc(n))}),t}(e);t&&(r=dc(r,t)),hc=r}function mc(){return hc}function yc(e){var t;return null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]}function vc(e){return 0===yc(e).length}function wc(e,t,r,n,i){if(void 0===n&&(n=0),void 0===i&&(i=null),r)return t(r,n,i),void yc(r).forEach(function(i){return wc(e,t,i,n+1,r)});for(var o in e){var a=e[o];(null==a?void 0:a.taxonomyPath)&&wc(e,t,a,0,null)}}function bc(){var e=mc(),t=[];for(var r in e){var n=e[r];(null==n?void 0:n.taxonomyPath)&&t.push(n)}return t}function _c(e){if(!e)return null;var t=null;return wc(mc(),function(r){r.taxonomyPath===e&&(t=r)}),t}function xc(e){if(!e)return null;var t=null;return wc(mc(),function(r){yc(r).some(function(t){return t.taxonomyPath===e})&&(t=r)}),t}function Pc(e){var t=yc(e);return 0===t.length?e.taxonomyPath?[e.taxonomyPath]:[]:t.flatMap(function(e){return Pc(e)})}!function(e){e.Name="Name",e.WhereDimension="WhereDimension",e.Relevance="Relevance",e.RelevanceStrict="RelevanceStrict"}(cc||(cc={})),function(e){e.Name="title",e.LocalRef="localRef",e.WhatTaxonomy="dimension_what"}(uc||(uc={}));var Sc=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=Xs.Awaiting,this.searchStatus=Xs.Awaiting,this.offlineMapStatus=Xs.Awaiting,this.storage=new Bl,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(n).then(function(r){return O(t,void 0,void 0,function(){var t;return F(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 O(this,void 0,void 0,function(){var e,t,r,n;return F(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.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?(gc(t.data),(r=bc()).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"),gc({})),[3,3];case 2:return n=i.sent(),console.error("[focus-core] Failed to load focus tree from ATOMS API",n),gc({}),[3,3];case 3:return[2]}})})},e.prototype.hasPublishedDataVersion=function(e){return function(e,t){var r=tc("version",e);return null!=t.getString(r)}(e,this.storage)},e.prototype.setupOfflineMaps=function(e,t){return O(this,void 0,void 0,function(){var r,n,i,o;return F(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,ac({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:Ys.MBTiles,roleName:this.tileserverRoleName},this.storage,t)];case 1:return r=a.sent(),[4,ac({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:Ys.Fonts,roleName:this.tileserverRoleName},this.storage,t)];case 2:return n=a.sent(),console.log("Offline Map & fonts status:",r,n),i=r===Xs.Ready&&n===Xs.Ready,this.offlineMapStatus=i?Xs.Ready:Xs.Unavailable,e&&e(this.offlineMapStatus===Xs.Ready),[2,i];case 3:return o=a.sent(),console.error("Error setting up offline maps:",o),this.offlineMapStatus=Xs.Unavailable,e&&e(!1),[3,4];case 4:return[2]}})})},e.prototype.getOfflineMapStatus=function(){return this.offlineMapStatus},e.prototype.setupRouting=function(e){return O(this,void 0,void 0,function(){var t;return F(this,function(r){switch(r.label){case 0:return[4,ac({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:Ys.Routing,roleName:this.tileserverRoleName},this.storage)];case 1:return t=r.sent(),this.routingStatus=t,console.log("routing status: ",t),e&&e(t===Xs.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=Q(e.geometry);if("LineString"===t.geometry.type||"MultiLineString"===t.geometry.type&&1==t.geometry.coordinates.length){var r=vl(t=te(e.geometry.coordinates));return Cl(t,r/2,r).geometry.coordinates[0]}return Al(t).geometry.coordinates},e.prototype.getFocusTree=function(){return mc()},e.prototype.getWhatTaxonomies=function(){if(this.searchStatus===Xs.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=_c(this.currentFocus);return e?vc(e)?xc(this.currentFocus):e:null},e.prototype.getCurrentFocusFloor=function(){var e=_c(this.currentFocus);return e&&vc(e)?e:null},e.prototype.getUserViewportBuilding=function(e){var t,r=this,n=ee(e),i=null;return t=function(e){if(!i&&!vc(e)&&e.bounds){var t=r.normalizeBoundsToPolygon(e.bounds);t&&Tl(n,t)&&(i=e)}},wc(mc(),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 Q({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=ee(e);if(null==t)return!1;if(!t.hasOwnProperty("bounds"))return!1;var i=this.normalizeBoundsToPolygon(t.bounds),o=!!i&&Tl(n,i);if(null==r)return o;if(!r.hasOwnProperty("bounds"))return o;var a=this.normalizeBoundsToPolygon(r.bounds),l=!!a&&Tl(n,a);return o||l},e.prototype.filterBaseMapWhereDimension=function(e,t){var r=t;if(r){this.currentFocus=r;var n=[r],i=_c(r);if(i){var o=Pc(i);n=o.length>0&&!vc(i)?o:(vc(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=_c(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 c=function(e){if(!_c(e))return[];for(var t=[],r=e;;){var n=xc(r);if(!n)break;t.unshift(n),r=n.taxonomyPath}return t}(e),u=c.length-1;u>=0;u-=1){var h=i(c[u]);if(h)return h}if(!vc(o))for(var f=0,p=yc(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:c.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 c=a[s];if(n){if("case"===c[0]&&Array.isArray(c[1])&&Array.isArray(c[3])&&Array.isArray(c[3][1])&&Array.isArray(c[3][1])&&Array.isArray(c[3][1][1])&&Array.isArray(c[3][1][2])&&Array.isArray(c[3][2])&&c[3][1][1][1]===t&&c[3][2][2]===n){c[1][1][2]=["literal",r],c[1][1][1]=["get",t],c[3][1][2]=["literal",r],c[3][1][1]=["get",t],c[3][2][2]=n,l=!0;break}}else if(Array.isArray(c[1])&&Array.isArray(c[1][1])&&"!"===c[0]&&c[1][1][1]===t){c[0]="!",c[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=L([],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 c=l[n];if(c){var u=this.createFilterForStyle(c,t,r,i);l[n]=u}}}return e}},e.prototype.createFilterForClearStyle=function(e,t,r){return function e(n){if(Array.isArray(n)&&"match"===n[0]){var i=L([],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 c=this.createFilterForClearStyle(s,t,r);a[n]=c}}}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===cc.Name?e.sort(function(e,t){return n(e.name,t.name)}):t===cc.WhereDimension?e.sort(function(e,t){var r=n(e.whereDimension,t.whereDimension);return 0===r?n(e.name,t.name):r}):t===cc.Relevance?this.relevanceSort(e,r):t===cc.RelevanceStrict?this.relevanceSort(e,r,!0):void 0},e.prototype.setupMapObjectSearch=function(e){return O(this,void 0,void 0,function(){var t,r,n,i,o;return F(this,function(a){switch(a.label){case 0:return[4,ac({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:Ys.MapObjects,roleName:this.tileserverRoleName},this.storage)];case 1:for(t=a.sent(),this.searchStatus=t,console.log("search status: ",t),r=Zs.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===Xs.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],c=null===(t=s.properties)||void 0===t?void 0:t.myMapObjectId;if(null!=c&&!i.has(c)){i.add(c);var u=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,u,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),c=0,u=this.searchableGeoJsonFeatures;c<u.length;c++){var h=u[c],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 c=this.createMetaFeature(a.properties.myMapObjectId,a.lngLat,a.properties.title,a.properties.dimension_what,a.properties.dimension_where,a.geometry,a.properties);n.push(c)}}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 c=this.createMetaFeature(a.properties.myMapObjectId,a.lngLat,a.properties.title,a.properties.dimension_what,a.properties.dimension_where,a.geometry,a.properties);n.push(c)}}r(n)},e.prototype.geofence=function(e,t,r){var n=this;void 0===t&&(t=2),P({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 O(n,void 0,void 0,function(){var t;return F(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 jc(e,t){if(!new.target)return new jc(e,t);if(Array.isArray(e)||(t=e,e=[]),t=t||{},this.data=e||[],this.length=this.data.length,this.compare=t.compare||Ac,this.setNodeId=t.setNodeId||kc,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 kc(){}function Ac(e,t){return e-t}function Ec(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}jc.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 zc=[];"function"==typeof Object.freeze&&Object.freeze(zc);const Mc={heuristic:function(){return 0},distance:function(){return 1},blocked:function(){return!1},compareFScore:function(e,t){return e.fScore-t.fScore},NO_PATH:zc,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 Oc=Mc.NO_PATH;function Fc(e,t){var r=(t=t||{}).oriented,n=t.blocked;n||(n=Mc.blocked);var i=t.heuristic;i||(i=Mc.heuristic);var o=t.distance;o||(o=Mc.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 Ec(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 c=e.getNode(l);if(!c)throw new Error("toId is not defined in this graph: "+l);a.reset();var u,h=new Map,f=new jc({compare:Mc.compareFScore,setNodeId:Mc.setHeapIndex}),p=a.createNewState(s);for(h.set(t,p),p.fScore=i(s,c),p.distanceToSource=0,f.push(p),p.open=1;f.length>0;){if(Lc(u=f.pop(),c))return Cc(u);u.closed=!0,e.forEachLinkedNode(u.node.id,d,r)}return Oc;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,u.node,t))){var l=u.distanceToSource+o(e,u.node,t);l>=r.distanceToSource||(r.parent=u,r.distanceToSource=l,r.fScore=l+i(r.node,c),f.updateItem(r.heapIndex))}}}}}function Lc(e,t){return e.node===t}function Cc(e){for(var t=[e.node],r=e.parent;r;)t.push(r.node),r=r.parent;return t}function Tc(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 Rc(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=Nc(e,t),o=i.hasOwnProperty(n);if(o||_(e,t)){o||(i[n]=0);var a="@"+ ++i[n];n=Nc(e+a,t+a)}return new Dc(e,t,r,n)}:function(e,t,r){var i=Nc(e,t),o=n.get(i);if(o)return o.data=r,o;return new Dc(e,t,r,i)},l=[],s=x,c=x,u=x,h=x,f={version:20,addNode:g,addLink:function(e,t,r){u();var i=m(e)||g(e),o=m(t)||g(t),l=a(e,t,r),c=n.has(l.id);n.set(l.id,l),Ic(i,l),e!==t&&Ic(o,l);return s(l,c?"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:u,endUpdate:h,clear:function(){u(),j(function(e){y(e.id)}),h()},hasLink:_,hasNode:m,getLink:_,getLinkById:function(e){return void 0===e?void 0:n.get(e)}};return Tc(f),t=f.on,f.on=function(){return f.beginUpdate=u=P,f.endUpdate=h=S,s=p,c=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");u();var n=m(e);return n?(n.data=t,c(n,"update")):(n=new Bc(e,t),c(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;u();var n=t.links;return n&&(n.forEach(b),t.links=null),r.delete(e),c(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;u(),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(Nc(e,t))}function x(){}function P(){o+=1}function S(){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 Bc(e,t){this.id=e,this.links=null,this.data=t}function Ic(e,t){e.links?e.links.add(t):e.links=new Set([t])}function Dc(e,t,r,n){this.fromId=e,this.toId=t,this.data=r,this.id=n}function Nc(e,t){return e.toString()+"👉 "+t.toString()}Fc.l2=function(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.sqrt(r*r+n*n)},Fc.l1=function(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.abs(r)+Math.abs(n)};var Uc,Gc,Wc,qc=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 c={mapObjectId:r,coords:t,where:n,what:i,zone:o,zoneUnionVertex:!1};s=e.addNode(l,c)}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 le(ee(e),ee(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],c=ae(s),u=0;u<c.length-1;u+=1){var h=o(e,c[u],"vertex",r.where,Cs.Edge,s.properties.zone),f=o(e,c[u+1],"vertex",r.where,Cs.Edge,s.properties.zone);if(h.id!==f.id){var p=l(c[u],c[u+1]);s.properties.direction!==Fs.Forward&&s.properties.direction!==Fs.TwoWay||a(e,h,f,{wheelChairAccesible:s.properties.wheelchair,cost:p,isPortal:!1,description:null}),s.properties.direction!==Fs.Backward&&s.properties.direction!==Fs.TwoWay||a(e,f,h,{wheelChairAccesible:s.properties.wheelchair,cost:p,isPortal:!1,description:null})}}return n}}function c(e,t){var r=t;if(void 0!==r)return o(e,r.coords,r.id,r.where,r.what,r.zone,!0)}function u(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=Rc(),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=Os.toInteger(l);var u=o.direction,h=o.wheelchair,f=o.description,p=c(e,n),d=c(e,o);void 0!==p&&void 0!==d&&p.id!==d.id&&(u!==Fs.Forward&&u!==Fs.TwoWay||a(e,p,d,{wheelChairAccesible:h,cost:l,description:f,isPortal:!0}),u!==Fs.Backward&&u!==Fs.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=ae(n);if(n.properties)for(var s=n.properties.dimension_where,c=Cs.Network,u=n.properties.zone,h=0;h<i.length-1;h+=1){var f=o(e,i[h],"vertex",s,c,u,!0),p=o(e,i[h+1],"vertex",s,c,u,!0);if(f.id!==p.id){var d=l(i[h],i[h+1]);n.properties.direction!==Fs.Forward&&n.properties.direction!==Fs.TwoWay||a(e,f,p,{wheelChairAccesible:n.properties.wheelchair,cost:d,isPortal:!1,description:null}),n.properties.direction!==Fs.Backward&&n.properties.direction!==Fs.TwoWay||a(e,p,f,{wheelChairAccesible:n.properties.wheelchair,cost:d,isPortal:!1,description:null})}}}}}(p,f);var m=function(t,r,i){return Fc(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=qs(t.data.where),a=qs(e.where),l=qs(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,c=[u(r[0])],h=1;h<r.length;h+=1){var f,p=r[h],d=r[h-1],g=c[c.length-1];if("vertex"!==p.data.mapObjectId||p.data.zoneUnionVertex){var m=void 0;if(Su(d.data.what)&&Su(p.data.what)){d.data.zone!==p.data.zone&&console.warn("A portal is triggering a change in zone");var y=void 0;if(xu(d.data.what)){var v=function(e,t,r,n){void 0===n&&(n=!1);var i=r.data.mapObjectId,o=Js(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 c=s.pathFeatures[0],u=!1===n?r.data.coords:t.data.coords,h=!1===n?t.data.coords:r.data.coords;return te(le(u,c.geometry.coordinates[0])<le(h,c.geometry.coordinates[0])?c.geometry.coordinates:c.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:re([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(Su(d.data.what)&&Su(p.data.what))g.geometry.coordinates.length<2&&c.pop(),c.push(u(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 P=Os.cloneDeep(p);P.data.zone=_.data.zone,c.push(u(P))}else c.push(u(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=Ds(Vs),c=Js(i.edgeData,n);console.log("time load: ",(performance.now()-l)/1e3),l=performance.now(),e.lines.concat(t.lines,c.lines);var u=s;return console.log("time network: ",(performance.now()-l)/1e3,s.length),h(e,t,c.edgeData,u)}return{getRoute:function(o,a,l){if(r=l,o===a)return{};var s=Ns(o),c=Ns(a);e=s,t=c;var u=performance.now();if(i=Us(),console.log("time portal load with extrapolation: ",(performance.now()-u)/1e3),u=performance.now(),e&&t){n=!0;var p=function(){var r=function(e,t){var r=performance.now(),n=Ds(qs(e.where)),o=Ds(qs(t.where)),a=$s(i.edgeData,qs(e.where)),l=$s(i.edgeData,qs(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,M(M({},a.edgeData),l.edgeData),s)}(e,t);if(console.log("Direct route",r),Os.isEmpty(r)){var n=function(e,t){var r=performance.now(),n=Ds(Vs);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 Os.isEmpty(d)&&(n=!1,d=p()),console.log("time total: ",(performance.now()-u)/1e3),d}return{}}}}(),Vc=6371008.8,$c={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:Vc,metres:Vc,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function Jc(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 Yc(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(!Zc(e[0])||!Zc(e[1]))throw new Error("coordinates must contain numbers");return Jc({type:"Point",coordinates:e},t,r)}function Xc(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 Jc({type:"LineString",coordinates:e},t,r)}function Hc(e){return e%360*Math.PI/180}function Zc(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Kc(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 Qc(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 eu(e,t,r){void 0===r&&(r={});var n=Kc(e),i=Kc(t),o=Hc(i[1]-n[1]),a=Hc(i[0]-n[0]),l=Hc(n[1]),s=Hc(i[1]),c=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=$c[t];if(!r)throw new Error(t+" units is invalid");return e*r}(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),r.units)}function tu(e,t){!function(e,t){var r,n,i,o,a,l,s,c,u,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,c=p?e.features[r].properties:d?e.properties:{},u=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,c,u,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,c,u,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(Jc(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 c=e.coordinates[s];if(!1===t(Jc({type:a,coordinates:c},n),r,s))return!1}})}function ru(e,t,r){void 0===r&&(r={});var n=Yc([1/0,1/0],{dist:1/0}),i=0;return tu(e,function(e){for(var o=Qc(e),a=0;a<o.length-1;a++){var l=Yc(o[a]);l.properties.dist=eu(t,l,r);var s=Yc(o[a+1]);s.properties.dist=eu(t,s,r);var c=eu(l,s,r),u=Math.max(l.properties.dist,s.properties.dist),h=ea(l,s),f=aa(t,u,h+90,r),p=aa(t,u,h-90,r),d=fl(Xc([f.geometry.coordinates,p.geometry.coordinates]),Xc([l.geometry.coordinates,s.geometry.coordinates])),g=null;d.features.length>0&&((g=d.features[0]).properties.dist=eu(t,g,r),g.properties.location=i+eu(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+c),g&&g.properties.dist<n.properties.dist&&((n=g).properties.index=a),i+=c}}),n}function nu(e,t,r){var n,i=Qc(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=ru(r,e),l=ru(r,t),s=[(o=a.properties.index<=l.properties.index?[a,l]:[l,a])[0].geometry.coordinates],c=o[0].properties.index+1;c<o[1].properties.index+1;c++)s.push(i[c]);return s.push(o[1].geometry.coordinates),Xc(s,r.properties)}function iu(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 ou(e,t){!function(e,t){var r,n,i,o,a,l,s,c,u,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,c=p?e.features[r].properties:d?e.properties:{},u=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,c,u,h))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],f,c,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,c,u,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(iu(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 c=e.coordinates[s];if(!1===t(iu({type:a,coordinates:c},n),r,s))return!1}})}function au(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){return"Feature"===e.type?e.geometry:e}function su(e,t){void 0===t&&(t={});var r=lu(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=lu(e),n=r.coordinates,i=t.properties?t.properties:"Feature"===e.type?e.properties:{};return cu(n,i)}(r,t);case"MultiPolygon":return function(e,t){void 0===t&&(t={});var r=lu(e),n=r.coordinates,i=t.properties?t.properties:"Feature"===e.type?e.properties:{},o=[];return n.forEach(function(e){o.push(cu(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 cu(e,t){return e.length>1?function(e,t,r){return void 0===r&&(r={}),au({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 au({type:"LineString",coordinates:e},t,r)}(e[0],t)}function uu(e,t){var r=!0;return ou(e,function(e){ou(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!Tl(e,t)}break;case"LineString":switch(t.type){case"Point":return!hu(e,t);case"LineString":return!function(e,t){if(fl(e,t).features.length>0)return!0;return!1}(e,t);case"Polygon":return!fu(t,e)}break;case"Polygon":switch(t.type){case"Point":return!Tl(t,e);case"LineString":return!fu(e,t);case"Polygon":return!function(e,t){for(var r=0,n=e.coordinates[0];r<n.length;r++){if(Tl(n[r],t))return!0}for(var i=0,o=t.coordinates[0];i<o.length;i++){if(Tl(o[i],e))return!0}var a=fl(su(e),su(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(pu(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}function fu(e,t){for(var r=0,n=t.coordinates;r<n.length;r++){if(Tl(n[r],e))return!0}return fl(t,su(e)).features.length>0}function pu(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 du(e){var t=Ns(e.edges[0]),r=Ns(e.edges[1]);return{maneuverType:Uc.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 gu(e){return e.maneuverType===Uc.RouteOverview||e.maneuverType===Uc.SectionOverview}function mu(e,t){for(var r=0;r<e.length;r+=1){var n=e[r];n.properties.highlight=!!t}return e}function yu(e,t,r,n,i){if(void 0===i&&(i=""),0===e.length)return[];var o=[ee(e,{segmentNumber:t,dimension_where:i,patchNumber:n,isNode:!0})];return mu(o,r),o}function vu(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=te(e,M(M({},a),{featureBelongsToLineString:!0})),s=ee(e[0],M(M({},a),{featureBelongsToLineString:!1})),c=ee(e[e.length-1],M(M({},a),{featureBelongsToLineString:!1})),u=[];return u.push(s,l,c),mu(u,r),u}function wu(e,t){void 0===t&&(t=0);var r=Os.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=Uc.RouteOverview,r.patchNumber=t,r.instructions=["Overview"];for(var i=1;i<e.segments.length;i+=1)if(e.segments[i].maneuverType!==Uc.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=Os.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=Os.cloneDeep(e.segments[e.segments.length-1].endEdge),r.time=e.walkingTime+e.transportTime,r.distance=e.walkingDistance+e.transportDistance,r}function bu(e,t,r,n,i){return void 0===n&&(n=!0),void 0===i&&(i=0),O(this,void 0,void 0,function(){var o,a,l,s,c,u,h,f,p,d,g,m,y,v,w,b,_,x,P,S,j,k,A,E,z,O,L,C,T,R,B,I,D,N,U,G,W,q,V,$,J,Y,X,H,Z,K,Q,ee,re,ne,ie,le,se,ce,ue,he,fe,pe,de;return F(this,function(F){for(o=qc.getRoute(e,t,r),a=o.routes,l=[],c=0;a&&c<a.length;c+=1)if(u=a[c],h=u.geojson.properties.zone,u.isPortal)s=M(M({},du(u)),{maneuverType:Uc.Static,coordinates:[u.geojson.geometry.coordinates[1]],zone:h,isPortal:!1}),U=M(M({},du(u)),{maneuverType:Uc.EnterPortal,coordinates:[u.geojson.geometry.coordinates[0]]}),l.push(U),G=M(M({},du(u)),{maneuverType:Uc.ExitPortal,coordinates:[u.geojson.geometry.coordinates[1]]}),l.push(G),(W=l.length>0?l[l.length-1]:void 0)&&W.maneuverType===Uc.ExitPortal&&(l.pop(),u.portalPath&&(q=M(M({},du(u)),{maneuverType:Uc.TravelPortal,coordinates:u.portalPath.geometry.coordinates,zone:h}),l.push(q)),l.push(G));else{if(f=u.geojson.geometry.coordinates,p=Uc.Static,0===l.length&&(d=M(M({},du(u)),{maneuverType:Uc.Static,coordinates:[f[0]]}),l.push(d)),c>0&&l.length>0&&(g=a[c-1],m=g.geojson.properties.zone,h!==m&&(y=g.geojson.geometry.coordinates,x=M(M({},du(g)),{maneuverType:Uc.ChangeZone,zone:h,coordinates:[y[y.length-1]]}),l.push(x),p=Uc.ChangeZone)),f.length>2)for(Z=0;Z<f.length-2;Z+=1)v=f[Z],w=f[Z+1],b=f[Z+2],s=M(M({},du(u)),{maneuverType:Uc.Static,coordinates:[b],zone:h}),void 0,_=Uc.ContinueStraight,x=M(M({},du(u)),{maneuverType:_,zone:h}),p===Uc.ContinueStraight?(Z+3===f.length?l[l.length-1].coordinates.push(w,b):l[l.length-1].coordinates.push(w),l[l.length-1].maneuverType=_):(x.coordinates.push(v,w),l.push(x),Z+3===f.length&&(_===Uc.ContinueStraight?l[l.length-1].coordinates.push(b):l.push(M(M({},du(u)),{maneuverType:Uc.ContinueStraight,coordinates:[w,b],zone:h})))),p=_;else x=M(M({},du(u)),{maneuverType:Uc.ContinueStraight,coordinates:f,zone:h}),l.push(x);if(P=function(){if(l.length>0){var e=l[l.length-1];e.maneuverType===Uc.ChangeZone&&e.zone===Ls.Transit&&l.pop()}},(W=l.length>0?l[l.length-1]:void 0)&&W.maneuverType===Uc.ContinueStraight)for(S=Gs(W.startEdge.whereDimension),j=te(W.coordinates),Z=0;Z<S.length;Z+=1)k=S[Z],uu(j,k)||((A=fl(j,k)).features.length>1?(l.pop(),E=nu(ae(j)[0],oe(A.features[0]),j),vl(E,{units:"meters"})>=10?(z=M(M({},du(u)),{maneuverType:Uc.ContinueStraight,zone:h,coordinates:ae(E)}),l.push(z)):l.length>0&&((W=l[l.length-1]).maneuverType===Uc.ChangeZone?(O=ae(E),W.coordinates=[O[O.length-1]],l.length>1&&((R=l[l.length-2]).coordinates=R.coordinates.concat(ae(E)))):W.coordinates.concat(ae(E))),L=nu(oe(A.features[0]),oe(A.features[1]),j),C=M(M({},du(u)),{maneuverType:Uc.PassThroughImmigration,zone:h,coordinates:ae(L)}),0===l.length&&(C.coordinates=E.geometry.coordinates.concat(C.coordinates)),P(),l.push(C),I=ae(j),D=nu(oe(A.features[1]),I[I.length-1],j),N=M(M({},du(u)),{maneuverType:Uc.ContinueStraight,zone:h,coordinates:ae(D)}),l.push(N)):A.features.length>0&&(Tl(ae(j)[0],k)?(l.pop(),L=nu(ae(j)[0],oe(A.features[0]),j),C=M(M({},du(u)),{maneuverType:Uc.PassThroughImmigration,zone:h,coordinates:ae(L)}),(W=l.length>0?l[l.length-1]:void 0)&&W.maneuverType===Uc.ChangeZone&&(T=l.pop(),l.length>1&&(R=l[l.length-1]).maneuverType===Uc.PassThroughImmigration&&(l.pop(),T.coordinates=[R.coordinates[0]],l.push(T),C.coordinates=R.coordinates.concat(C.coordinates))),P(),l.push(C),I=ae(j),D=nu(oe(A.features[0]),I[I.length-1],j),N=M(M({},du(u)),{maneuverType:Uc.ContinueStraight,zone:h,coordinates:ae(D)}),l.push(N)):(B=nu(ae(j)[0],oe(A.features[0]),j),W.coordinates=ae(B),I=ae(j),D=nu(oe(A.features[0]),I[I.length-1],j),N=M(M({},du(u)),{maneuverType:Uc.PassThroughImmigration,zone:h,coordinates:ae(D)}),l.push(N))))}if(s&&l.push(s),(V={segments:l,walkingDistance:0,transportDistance:0,walkingTime:0,transportTime:0,distanceUnit:Rs,speed:1}).segments.length>0){for(J=0,($=n)&&((Y=Os.cloneDeep(V.segments[0])).maneuverType=Uc.RouteOverview,V.segments.unshift(Y),J=1),X=i+J,H=V.segments.length>J?V.segments[J].startEdge.whereDimension:"",Z=J;Z<V.segments.length;Z+=1){if(K=!1,Q=V.segments[Z],ee=i+Z,Q.isPortal){if(Q.maneuverType===Uc.EnterPortal){for(ne=yu(Q.coordinates[0],ee,K,X,Q.startEdge.whereDimension),ie=[],le=0,se=ne;le<se.length;le++)ce=se[le],ie.push(ce);Q.features=ie,Q.patchNumber=X,Q.whereDimension=H,(ue=V.segments.length>=Z+2?V.segments[Z+1]:void 0)&&ue.maneuverType!==Uc.TravelPortal?(he=Q.cost,Q.time=he||0):Q.time=0,Q.distance=0}Q.maneuverType===Uc.TravelPortal&&(Q.features=vu(Q.coordinates,ee,K,X,Q.zone,Q.startEdge.whereDimension),Q.patchNumber=X,Q.whereDimension=H,he=Q.cost,Q.time=he||0,fe=void 0,fe=Q.coordinates.length>1?vl(te(Q.coordinates),{units:V.distanceUnit}):0,Q.distance=fe,Z>0&&(V.segments[Z-1].time=0)),Q.maneuverType===Uc.ExitPortal&&(X+=1,H=Q.endEdge.whereDimension,V.segments.splice(Z,1),Z-=1),(pe=V.segments.length>=Z+2?V.segments[Z+1]:void 0)&&pe.maneuverType===Uc.TravelPortal&&(X+=1)}else Q.maneuverType===Uc.Static||Q.maneuverType===Uc.ChangeZone?(Q.features=yu(Q.coordinates[0],ee,K,X,Q.endEdge.whereDimension),Q.patchNumber=X,Q.whereDimension=H):(Q.features=vu(Q.coordinates,ee,K,X,Q.zone,Q.startEdge.whereDimension),Q.patchNumber=X,Q.whereDimension=H),re=Q.coordinates,fe=void 0,fe=re.length>1?vl(te(re),{units:V.distanceUnit}):0,Q.distance=fe,Q.maneuverType!==Uc.PassThroughImmigration?Q.time=Q.distance/V.speed:Q.time=0;Q.maneuverType===Uc.TravelPortal?(V.transportDistance+=Q.distance,V.transportTime+=Q.time):(V.walkingDistance+=Q.distance,V.walkingTime+=Q.time)}$&&(de=wu(V,i),V.segments[0]=de)}return[2,V]})})}function _u(e,t,r){for(var n,i=[],o=0;o<e.segments.length;o+=1){var a=e.segments[o];if(r.includeOverviewFeatures){if(gu(a)){for(var l=[],s=[],c=0;c<a.features.length;c++){var u=a.features[c];void 0!==(null===(n=u.properties)||void 0===n?void 0:n.patchNumber)&&u.properties.patchNumber===r.patchNumberForOverviewFeatures&&void 0!==u.properties.isNonHighlightedOverview&&("1"===u.properties.isNonHighlightedOverview?l.push(u):s.push(u))}var h=l.concat(s);i=i.concat(h)}}else a.patchNumber===t&&(gu(a)||(i=i.concat(a.features)))}return i}function xu(e){return!!Object.values(Gc).includes(e)}function Pu(e){return!!Object.values(Wc).includes(e)}function Su(e){return!(!xu(e)&&!Pu(e))}function ju(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 ku(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)===Gc.Skytrain||r===Gc.Bus)return n.Terminal;if(e===Gc.Escalator||e===Gc.Lift)return n.Level;if(Pu(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"}(Uc||(Uc={})),function(e){e.Skytrain="what.transport.skytrain",e.Bus="what.service.airport_transfer",e.Escalator="what.infra.escalator",e.Lift="what.infra.lift"}(Gc||(Gc={})),function(e){e.Entrance="what.infra.entrance",e.Exit="what.infra.exit"}(Wc||(Wc={}));var Au=["match",["get","isNonHighlightedOverview"],"1","#A7A6BA","0",["match",["get","zone"],"transit","#4F7EF8","public","#CF9FFF","#CF9FFF"],["match",["get","zone"],"transit","#4F7EF8","public","#CF9FFF","#CF9FFF"]],Eu=[{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:Au,lineWidth:5},paint:{"line-color":Au,"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:Au,lineWidth:6},paint:{"line-color":Au,"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}}],zu=[{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 Mu=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"===Y(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}(),Ou=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 Mu?new Mu(e.lng,e.lat):Mu.convert(e),this},e.prototype.setSouthWest=function(e){return this._sw=e instanceof Mu?new Mu(e.lng,e.lat):Mu.convert(e),this},e.prototype.extend=function(t){var r,n,i=this._sw,o=this._ne;if(t instanceof Mu)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(Mu.convert(l))}return t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(Mu.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 Mu(r.lng,r.lat),this._ne=new Mu(n.lng,n.lat)),this},e.prototype.getCenter=function(){return new Mu((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 Mu(this.getWest(),this.getNorth())},e.prototype.getSouthEast=function(){return new Mu(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=Mu.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 Mu(t.lng-i,t.lat-n),new Mu(t.lng+i,t.lat+n))},e}(),Fu={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:{}}]},Lu={},Cu={},Tu={};Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.bytesToString=Tu.stringToBytes=Tu.NIL=Tu.X500=Tu.OID=Tu.URL=Tu.DNS=Tu.hexToByte=Tu.byteToHex=void 0;let Ru=[],Bu={};for(var Iu=0;Iu<256;Iu++)Ru[Iu]=(Iu+256).toString(16).substr(1),Bu[Ru[Iu]]=Iu;Tu.byteToHex=Ru,Tu.hexToByte=Bu,Tu.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Tu.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",Tu.OID="6ba7b812-9dad-11d1-80b4-00c04fd430c8",Tu.X500="6ba7b814-9dad-11d1-80b4-00c04fd430c8",Tu.NIL="00000000-0000-0000-0000-000000000000";Tu.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};Tu.bytesToString=e=>{const t=new Uint8Array(e,0,e.byteLength);return String.fromCharCode.apply(null,Array.from(t))},Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.parse=void 0;const Du=Tu;Cu.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++]=Du.hexToByte[e]),""));i<16;)t[n+i++]=0;return t};var Nu={};Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.unparse=void 0;const Uu=Tu;Nu.unparse=(e,t)=>{let r=t||0,n=Uu.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 Gu={},Wu={};Object.defineProperty(Wu,"__esModule",{value:!0});Wu.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 qu=_e&&_e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.validate=void 0;const Vu=qu(Wu);Gu.validate=e=>"string"==typeof e&&Vu.default.test(e);var $u={};Object.defineProperty($u,"__esModule",{value:!0}),$u.version=void 0;const Ju=Gu;$u.version=e=>{if(!(0,Ju.validate)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)};var Yu={},Xu={};Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.stringify=void 0;const Hu=Gu,Zu=[];for(let e=0;e<256;++e)Zu.push((e+256).toString(16).substr(1));Xu.stringify=(e,t=0)=>{const r=(Zu[e[t+0]]+Zu[e[t+1]]+Zu[e[t+2]]+Zu[e[t+3]]+"-"+Zu[e[t+4]]+Zu[e[t+5]]+"-"+Zu[e[t+6]]+Zu[e[t+7]]+"-"+Zu[e[t+8]]+Zu[e[t+9]]+"-"+Zu[e[t+10]]+Zu[e[t+11]]+Zu[e[t+12]]+Zu[e[t+13]]+Zu[e[t+14]]+Zu[e[t+15]]).toLowerCase();if(!(0,Hu.validate)(r))throw TypeError("Stringified UUID is invalid");return r};var Ku={};Object.defineProperty(Ku,"__esModule",{value:!0}),Ku.rng=void 0;Ku.rng=()=>{let e=new Uint8Array(16);for(let t=0;t<16;t++)e[t]=255&256*Math.random()+0;return e},Object.defineProperty(Yu,"__esModule",{value:!0}),Yu.v1=void 0;const Qu=Xu,eh=Ku;let th,rh,nh=0,ih=0;Yu.v1=(e,t,r=0)=>{let n=t&&r||0;const i=t||new Uint8Array(16);let o=e&&e.node?e.node:th,a=e&&e.clockseq?e.clockseq:rh;if(null==o||null==a){const t=e&&e.random?e.random:e&&e.rng?e.rng():(0,eh.rng)();null==o&&(o=th=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==a&&(a=rh=16383&(t[6]<<8|t[7]))}let l=e&&e.msecs?e.msecs:Date.now(),s=e&&e.nsecs?e.nsecs:ih+1;const c=l-nh+(s-ih)/1e4;if(c<0&&e&&!e.clockseq&&(a=a+1&16383),(c<0||l>nh)&&e&&!e.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");nh=l,ih=s,rh=a,l+=122192928e5;const u=(1e4*(268435455&l)+s)%4294967296;i[n++]=u>>>24&255,i[n++]=u>>>16&255,i[n++]=u>>>8&255,i[n++]=255&u;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,Qu.stringify)(i)};var oh={},ah={};Object.defineProperty(ah,"__esModule",{value:!0}),ah.v35=void 0;const lh=Xu,sh=Cu,ch=Tu;ah.v35=(e,t,r)=>(e,n,i,o=0)=>{if("string"==typeof e&&(e=(0,ch.stringToBytes)(e)),"string"==typeof n&&(n=(0,sh.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,ch.stringToBytes)(r((0,ch.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,lh.stringify)(a)};var uh={};!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=>u(h(c(e),8*e.length)),i=(e,t)=>{var r=c(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(c(t)),512+8*t.length);return u(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 c=Math.ceil(8*e.length/(Math.log(t.length)/Math.log(2))),u=Array(c);for(n=0;n<c;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);u[n]=o,s=a}var h="";for(r=u.length-1;r>=0;r--)h+=t.charAt(u[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},c=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},u=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,c=i,u=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,c),o=y(o,u)}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}(uh);var hh=_e&&_e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oh,"__esModule",{value:!0}),oh.v3=void 0;const fh=ah,ph=hh(uh);oh.v3=(0,fh.v35)("v3",48,ph.default);var dh={};Object.defineProperty(dh,"__esModule",{value:!0}),dh.v4=void 0;const gh=Nu,mh=Ku;dh.v4=function(e,t,r){let n=t&&r||0,i=(0,mh.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,gh.unparse)(i)};var yh={},vh={};!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=>u(h(c(e),8*e.length)),i=(e,t)=>{let r=c(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(c(t)),512+8*t.length);return u(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 c="";for(r=l.length-1;r>=0;r--)c+=t.charAt(l[r]);var u=Math.ceil(8*e.length/(Math.log(t.length)/Math.log(2)));for(r=c.length;r<u;r++)c=t[0]+c;return c},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},c=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},u=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 c=n,u=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,c),i=d(i,u),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}(vh);var wh=_e&&_e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yh,"__esModule",{value:!0}),yh.v5=void 0;const bh=ah,_h=wh(vh);yh.v5=(0,bh.v35)("v5",80,_h.default),Object.defineProperty(Lu,"__esModule",{value:!0});const xh=Cu,Ph=Nu,Sh=Gu,jh=$u,kh=Yu,Ah=oh,Eh=dh,zh=yh,Mh=Tu;var Oh,Fh=Lu.default={parse:xh.parse,unparse:Ph.unparse,validate:Sh.validate,version:jh.version,v1:kh.v1,v3:Ah.v3,v4:Eh.v4,v5:zh.v5,NIL:Mh.NIL,DNS:Mh.DNS,URL:Mh.URL,OID:Mh.OID,X500:Mh.X500},Lh=function(e){var t=e.pin,n=e.wrapperStyle,o=e.mapRef,a=e.mapLoadedRef,c=e.regionChangeTrigger,h=s(null),f=h[0],p=h[1],d=s(0),g=d[0],m=d[1],y=s(0),v=y[0],w=y[1],b=s(!1),_=b[0],x=b[1],P=function(e){return"ios"===r.OS?[e[1],e[0]]:e},S=function(e){return O(void 0,void 0,void 0,function(){var t,r;return F(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(P(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]}})})};u(function(){t.coordinates&&a.current&&S(t.coordinates).then(function(e){e&&p(e)})},[t.coordinates,a.current]),u(function(){t.coordinates&&a.current&&void 0!==c&&S(t.coordinates).then(function(e){e&&p(e)})},[c,t.coordinates,a.current]);return f?l.createElement(i,{onLayout:function(e){var t=e.nativeEvent.layout,r=t.width,n=-t.height/2;_||(m(-r/2),w(n),x(!0))},style:[n,{left:f.x+g,top:f.y+v,opacity:_?1:0}]},t.customElement):null},Ch=f(function(e,t){var r=e.mapRef,n=e.mapLoadedRef,a=e.cameraRef,u=e.metaAtlasCoreRef,h=c([]),f=s(0),g=f[0],m=f[1],y=o.create({overlayContainer:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"box-none",zIndex:1},popupWrapper:{position:"absolute",pointerEvents:"auto"}}),v=function(){m(function(e){return e+1})};return p(t,function(){return{dropPin:function(e,t,r){return void 0===r&&(r=!0),O(this,void 0,void 0,function(){var n,i,o;return F(this,function(a){return n=function(e){return u.current.getMidPointOfFeature(e)}(e),d(t)?(i="",r&&h.current.length>0?(h.current[h.current.length-1]=M(M({},h.current[h.current.length-1]),{coordinates:n,customElement:t,isVisible:!0}),i=h.current[h.current.length-1].id):(o={id:Fh.v4(),coordinates:n,customElement:t,isVisible:!0},i=o.id,h.current.push(o)),v(),[2,i]):(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=h.current[h.current.length-1];if(!r)return void console.warn("No pins available to hide.");t=r.id}else t=e;var n=h.current.findIndex(function(e){return e.id===t});-1!==n?(h.current[n]=M(M({},h.current[n]),{isVisible:!1}),v()):console.warn("Pin with ID: ".concat(t," not found."))},hidePins:function(){h.current=h.current.map(function(e){return M(M({},e),{isVisible:!1})}),v()},showPin:function(e){return void 0===e&&(e="-1"),O(this,void 0,void 0,function(){var t,r,n;return F(this,function(i){if("-1"===e){if(!(r=h.current[h.current.length-1]))return console.warn("No pins available to show."),[2];t=r.id}else t=e;return-1===(n=h.current.findIndex(function(e){return e.id===t}))?(console.warn("Pin with ID: ".concat(t," not found.")),[2]):(h.current[n]=M(M({},h.current[n]),{isVisible:!0}),v(),[2])})})},showPins:function(){h.current=h.current.map(function(e){return M(M({},e),{isVisible:!0})}),v()},clearPin:function(e){var t;if(void 0===e&&(e="-1"),"-1"===e){if((t=h.current.length-1)<0)return void console.warn("No pins available to clear.")}else if(-1===(t=h.current.findIndex(function(t){return t.id===e})))return void console.warn("Pin with ID: ".concat(e," not found."));h.current.splice(t,1),v()},clearPins:function(){h.current=[],v()},fitViewToPins:function(e,t){var r;if(void 0===t&&(t=50),0!==h.current.length){var n=h.current.filter(function(t){return!!e.includes(t.id)});if(0!==n.length){for(var i=n[0].coordinates,o=new Mu(i[0],i[1]),l=new Mu(i[0],i[1]),s=new Ou(o,l),c=0;c<n.length;c++){var u=n[c];s.extend(u.coordinates)}var f=s.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(){m(function(e){return e+1})}}}),l.createElement(l.Fragment,null,n.current&&l.createElement(i,{style:y.overlayContainer},h.current.map(function(e){return e.isVisible&&d(e.customElement)&&l.createElement(Lh,{key:e.id,pin:e,wrapperStyle:y.popupWrapper,mapRef:r,mapLoadedRef:n,regionChangeTrigger:g})})))});function Th(e){var t=this,r=o.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}}),n=c(new Sc),h=c(null),f=c(null),d=c(null),b=c(!1),P=c(!1),S=c(!1),j=c(!1),A=s(!1),E=A[0],M=A[1],C=s(null),T=C[0],R=C[1],B=c(null),I=c(new Set),D=c(!1),N=s({center:[103.8218,1.2564],zoom:15.5,bearing:0}),U=N[0],G=N[1],W=s(""),q=W[0],V=W[1],$=function(e){V(JSON.stringify(e))},J=c(bl),Y=c(_l),Z=c(xl),K=c(Pl),Q=s(!1),te=Q[0],re=Q[1],ne=s(!1),ie=ne[0],oe=ne[1],ae=s(null),se=ae[0],ce=ae[1],ue=s(!0),he=ue[0],fe=ue[1],pe="https://atoms-sdk.sandbox.spatialverse.online/",de="https://atoms-map-tiles-middleware.sandbox.spatialverse.online/".concat(e.tileserverRoleName,"/latest/geojson?accessToken=").concat(e.accessToken),ge=e.onNetworkModeUpdate?e.onNetworkModeUpdate:function(){},me=function(){return O(t,void 0,void 0,function(){var t,r,i=this;return F(this,function(o){switch(o.label){case 0:return t=function(){return O(i,void 0,void 0,function(){var e;return F(this,function(t){switch(t.label){case 0:return[4,ve()];case 1:return e=t.sent(),oe(e),ge(e?Oh.Offline:Oh.Online),[2]}})})},n.current.getOfflineMapStatus()===Xs.Ready?[3,2]:(r=function(r){return O(i,void 0,void 0,function(){return F(this,function(n){return e.onOfflineMapsStatusUpdate(r),r&&t(),[2]})})},[4,n.current.setupOfflineMaps(r)]);case 1:return o.sent(),[3,3];case 2:t(),o.label=3;case 3:return[2]}})})},ye=function(){return O(t,void 0,void 0,function(){var e,t,r=this;return F(this,function(i){switch(i.label){case 0:return e=function(){return O(r,void 0,void 0,function(){var e,t;return F(this,function(r){switch(r.label){case 0:e="".concat(k.DocumentDirectoryPath,"/extracted/"),r.label=1;case 1:return r.trys.push([1,5,,6]),[4,k.exists(e)];case 2:return r.sent()?[4,Ql(e)]:[3,4];case 3:r.sent(),ge(Oh.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 i.sent(),t=JSON.parse(q),bl.sprite&&bl.glyphs&&(t.glyphs=J.current.glyphs,t.sprite=J.current.sprite),$(t),oe(!1),Ks.setState({data:""}),n.current.offlineMapStatus=Xs.Awaiting,ge(Oh.Online),[2]}})})},ve=function(){return O(t,void 0,void 0,function(){var e,t,r,n,i,o,a,l,s;return F(this,function(c){switch(c.label){case 0:e=Ks.getState().data,t=Qs.getState().data,r=JSON.parse(q),c.label=1;case 1:return c.trys.push([1,8,,9]),console.log("Paths Here:",e,t),(n=e)?[4,k.exists(e)]:[3,3];case 2:n=c.sent(),c.label=3;case 3:return n?(console.log("MBTiles path set:",e),i="".concat(t,"fonts"),(o=t)?[4,k.exists(i)]:[3,5]):(console.error("MBTiles file not found:",e),[2,!1]);case 4:o=c.sent(),c.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,k.exists(a)]:[3,7]):(console.error("Fonts directory not found:",i),[2,!1]);case 6:l=c.sent(),c.label=7;case 7:return l?(console.log("Sprites path set:",a),r.sprite="file://".concat(a,"/sprites"),$(r),[2,!0]):(console.error("Sprites directory not found:",a),[2,!1]);case 8:return s=c.sent(),console.error("Error setting up MBTiles, Fonts, and Sprites:",s),[2,!1];case 9:return[2]}})})};u(function(){return d.current||(d.current=new X(f,function(){return n.current.getFocusTree()},function(e){return R(e)})),function(){var e,t;try{null===(t=null===(e=d.current)||void 0===e?void 0:e.destroyGPS)||void 0===t||t.call(e)}catch(e){}b.current=!1}},[]),u(function(){D.current&&b.current&&f.current&&(D.current=!1,f.current.setStop({center:U.center,zoom:U.zoom,bearing:U.bearing,duration:1200,easing:"ease"}))},[U]),u(function(){var e=z.addEventListener(function(e){ce(e.isConnected)});return function(){try{e&&e()}catch(e){}}},[]),u(function(){var r=function(){return O(t,void 0,void 0,function(){var t,r,n=this;return F(this,function(i){switch(i.label){case 0:return t=function(t){return O(n,void 0,void 0,function(){var r,n,i,o,a;return F(this,function(l){switch(l.label){case 0:return l.trys.push([0,5,,6]),r="".concat(pe+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,c=e.secretKey,function(e,t){O(void 0,void 0,void 0,function(){var r;return F(this,function(n){switch(n.label){case 0:r="".concat(k.DocumentDirectoryPath+"/"+t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,k.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]}})})}(Hl.AES.encrypt(JSON.stringify(s),c).toString(),t),[2,o];case 3:return console.warn("Invalid Content-Type: expected JSON but received ".concat(i," for URL: ").concat(r)),[2,Kl(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,Kl(t,e.secretKey)];case 6:return[2]}var s,c})})},r=function(){return O(n,void 0,void 0,function(){var r,n,i,o,a;return F(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(),J.current=null!==r?r:J.current,[4,t("customerLayer.json")];case 2:return n=l.sent(),Y.current=n.length>0?n:Y.current,"firealarmteam"!==e.tileserverRoleName?[3,4]:[4,t("firealarmstyles.json")];case 3:i=l.sent(),Z.current=i.length>0?i:Z.current,l.label=4;case 4:return"airside"!==e.tileserverRoleName?[3,6]:[4,t("airsideLayers.json")];case 5:o=l.sent(),K.current=o.length>0?o:K.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]}})})},n=!1;z.addEventListener(function(e){return O(t,void 0,void 0,function(){return F(this,function(t){switch(t.label){case 0:return n?[3,3]:(n=!0,e.isConnected?[4,r()]:[3,2]);case 1:t.sent(),t.label=2;case 2:re(!0),t.label=3;case 3:return[2]}})})})},[e.secretKey,e.tileserverRoleName]),u(function(){if(te){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=Yo(J.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)&&K.current&&K.current.length>0){for(var n=0;n<Y.current.length;n++){(i=Yo(Y.current[n]))["source-layer"]="geojson",r.layers.push(i)}for(n=0;n<K.current.length;n++){(i=Yo(K.current[n]))["source-layer"]="geojson",r.layers.push(i)}}else if("airside"===e.tileserverRoleName&&K.current&&K.current.length>0)for(n=0;n<K.current.length;n++){(i=Yo(K.current[n]))["source-layer"]="geojson",r.layers.push(i)}else if("firealarmteam"===e.tileserverRoleName&&Z.current&&Z.current.length>0){for(n=0;n<Y.current.length;n++){(i=Yo(Y.current[n]))["source-layer"]="geojson",r.layers.push(i)}for(n=0;n<Z.current.length;n++){(i=Yo(Z.current[n]))["source-layer"]="geojson",r.layers.push(i)}}else for(n=0;n<Y.current.length;n++){var i;(i=Yo(Y.current[n]))["source-layer"]="geojson",r.layers.push(i)}$(r)}},[e.tileserverRoleName,te]),u(function(){n.current.init("https://atoms-api.sandbox.spatialverse.online",e.accessToken,e.secretKey,pe,e.tileserverRoleName)},[e.accessToken]),u(function(){console.log(se,"isNetworkConnected");var r,i=e.onRoutingStatusUpdate?e.onRoutingStatusUpdate:function(){},o=e.onSearchStatusUpdate?e.onSearchStatusUpdate:function(){};null!==se&&(se?n.current.getAtomsAPIAccessToken(function(r){return O(t,void 0,void 0,function(){var t,a,l,s;return F(this,function(c){switch(c.label){case 0:return P.current=!0,r.authenticated?[4,n.current.setupFocusTree()]:[3,4];case 1:return c.sent(),(t=bc()).length>0&&(null==(a=n.current.getFlyToLocation(t[0].taxonomyPath,!0))?void 0:a.center)&&(D.current=!0,G({center:a.center,zoom:null!==(l=a.zoom)&&void 0!==l?l:15.5,bearing:null!==(s=a.bearing)&&void 0!==s?s:0})),n.current.getRoutingStatus()!==Xs.Ready&&n.current.setupRouting(i),n.current.getSearchStatus()!==Xs.Ready&&n.current.setupMapObjectSearch(o),n.current.hasPublishedDataVersion(Ys.MBTiles)?n.current.getOfflineMapStatus()===Xs.Ready?[3,3]:[4,n.current.setupOfflineMaps(e.onOfflineMapsStatusUpdate)]:[3,3];case 2:c.sent(),c.label=3;case 3:return Fe(),[3,5];case 4:Le("Failed to authenticate token"),c.label=5;case 5:return[2]}})})}):(n.current.getRoutingStatus()!==Xs.Ready&&n.current.setupRouting(i),n.current.getSearchStatus()!==Xs.Ready&&n.current.setupMapObjectSearch(o),Fe()),he&&(r=se,O(t,void 0,void 0,function(){return F(this,function(e){return r?ie&&ye():me(),[2]})})))},[se,he]);var we=s(Eu),_e=we[0],xe=we[1],Pe=c({type:"FeatureCollection",features:[]}),Se=c(null),je=c(-1),ke=c(-1),Ae=c(zu),Ee=c(new wl([])),ze=function(e){Ee.current.destroy(),Ee.current=e},Me=function(e,t){if(Se.current&&Se.current.segments.length>e){var r=Se.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]),ze(new wl(n[0].geometry.coordinates))}else ze(new wl([]));M(!E)}}};u(function(){var e;Ee.current.__getValue().length>2&&(e=ee(Ee.current.originalRoute[0]),Ee.current.timing({toValue:{end:{point:e}},duration:2e3,easing:a.linear}).start())},[Ee.current]);var Oe=function(){return!0===b.current&&null!==h.current};p(e.ref,function(){return{requestGPSPermission:function(){var e,t;return O(this,void 0,void 0,function(){return F(this,function(r){switch(r.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,r.sent()]}})})},isGPSPermissionGranted:function(){var e,t;return O(this,void 0,void 0,function(){return F(this,function(r){switch(r.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,r.sent()]}})})},enableGPS:function(e){var t,r;return O(this,void 0,void 0,function(){return F(this,function(n){switch(n.label){case 0:return[4,null===(r=null===(t=d.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=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.destroyGPS)||void 0===t||t.call(e)},focusToGPS:function(e){var t,r;return O(this,void 0,void 0,function(){return F(this,function(n){switch(n.label){case 0:return[4,null===(r=null===(t=d.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 O(this,void 0,void 0,function(){return F(this,function(n){switch(n.label){case 0:return[4,null===(r=null===(t=d.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=d.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=d.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=d.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=d.current)||void 0===e?void 0:e.getCurrentGPSPosition)||void 0===t?void 0:t.call(e)},getZoom:function(){var e;return O(this,void 0,void 0,function(){return F(this,function(t){switch(t.label){case 0:return Oe()?[4,null===(e=h.current)||void 0===e?void 0:e.getZoom()]:[2,null];case 1:return[2,t.sent()]}})})},getCenter:function(){var e;return O(this,void 0,void 0,function(){return F(this,function(t){switch(t.label){case 0:return Oe()?[4,null===(e=h.current)||void 0===e?void 0:e.getCenter()]:[2,null];case 1:return[2,t.sent()]}})})},moveTo:function(e,t){var r;Oe()&&(null===(r=f.current)||void 0===r||r.easeTo({center:e,easing:"ease",duration:t}))},zoomTo:function(e,t){var r;Oe()&&(null===(r=f.current)||void 0===r||r.zoomTo(e,{duration:t,easing:"ease"}))},filterWhereDimension:function(e){var t=JSON.parse(q),r=t.layers,i=n.current.filterBaseMapWhereDimension(r,e);t.layers=i,$(t);var o=n.current.filterLayersWhereDimension(Yo(_e),e);xe(o),Me(je.current,e),M(!E)},setupOfflineMaps:function(t){return O(this,void 0,void 0,function(){return F(this,function(r){switch(r.label){case 0:return n.current.getOfflineMapStatus()===Xs.Ready?[3,2]:[4,n.current.setupOfflineMaps(e.onOfflineMapsStatusUpdate,t)];case 1:r.sent(),r.label=2;case 2:return[2]}})})},toggleMapMode:function(e){return O(this,void 0,void 0,function(){return F(this,function(t){return fe(!1),e===Oh.Offline?me():e===Oh.Online&&ye(),[2]})})},focusTo:function(e,t){var r,i;if(void 0===t&&(t=!0),e){if(this.filterWhereDimension(e),t){var o=n.current.getFlyToLocation(e,!0);(null==o?void 0:o.center)&&(this.flyTo({center:o.center,zoomLevel:o.zoom,bearing:o.bearing}),null===(i=null===(r=d.current)||void 0===r?void 0:r.setOutOfFocus)||void 0===i||i.call(r,!0))}I.current.forEach(function(t){try{t(e)}catch(e){}})}},subscribeToFocusChange:function(e){return I.current.add(e),function(){I.current.delete(e)}},filterLayersByType:function(e,t,r){void 0===e&&(e=[]),void 0===r&&(r="");var i=JSON.parse(q),o=i.layers,a=n.current.filterLayersByType(o,t,e,r);i.layers=a,$(i)},styleLayersByType:function(e,t,r,i){var o=JSON.parse(q),a=o.layers,l=n.current.styleLayersByType(a,t,e,r,i);o.layers=l,$(o)},clearStyleLayersByType:function(e,t,r){var i=JSON.parse(q),o=i.layers,a=n.current.clearStyleLayersByType(o,e,t,r);i.layers=a,$(i)},flyTo:function(e,t){var r,n,i,o;return void 0===t&&(t=!0),O(this,void 0,void 0,function(){var a,l,s,c,u;return F(this,function(p){switch(p.label){case 0:return Oe()?(t||this.clearPins(),[4,null===(r=h.current)||void 0===r?void 0:r.getCenter()]):[2];case 1:return(a=p.sent())?(l=e.center?e.center:a,e.zoomLevel?(c=e.zoomLevel,[3,4]):[3,2]):[2];case 2:return[4,null===(n=h.current)||void 0===n?void 0:n.getZoom()];case 3:c=p.sent(),p.label=4;case 4:return s=c,u=2*le(a,l,{units:"meters"}),null!==e.bearing?null===(i=f.current)||void 0===i||i.setStop({center:l,zoom:s,duration:u,bearing:e.bearing,easing:"fly"}):null===(o=f.current)||void 0===o||o.setStop({center:l,zoom:s,duration:u,easing:"fly"}),[2]}})})},getFocusTree:function(){return n.current.getFocusTree()},getWhatTaxonomies:function(){return n.current.getWhatTaxonomies()},getCurrentFocus:function(){return n.current.getCurrentFocus()},getCurrentFocusBuilding:function(){return n.current.getCurrentFocusBuilding()},getCurrentFocusFloor:function(){return n.current.getCurrentFocusFloor()},getLastClickedFeature:function(){return n.current.getLastClickedFeature()},getAllMapObjects:function(){var e;return(e=n.current).getAllMapObjects.apply(e,arguments)},getMapObjectsByName:function(){var e;return(e=n.current).getMapObjectsByName.apply(e,arguments)},getMapObjectById:function(){var e;return(e=n.current).getMapObjectById.apply(e,arguments)},getMapObjectByLocalRef:function(){var e;return(e=n.current).getMapObjectByLocalRef.apply(e,arguments)},getMapObjectsByWhatTaxonomy:function(){var e;return(e=n.current).getMapObjectsByWhatTaxonomy.apply(e,arguments)},getMapObjectsByWhereTaxonomy:function(){var e;return(e=n.current).getMapObjectsByWhereTaxonomy.apply(e,arguments)},getMapObjectsByWhatAndWhereTaxonomy:function(){var e;return(e=n.current).getMapObjectsByWhatAndWhereTaxonomy.apply(e,arguments)},getMapObjectsInWhatTaxonomy:function(){var e;return(e=n.current).getMapObjectsInWhatTaxonomy.apply(e,arguments)},getMapObjectsInWhereTaxonomy:function(){var e;return(e=n.current).getMapObjectsInWhereTaxonomy.apply(e,arguments)},getMapObjectsInWhatAndWhereTaxonomy:function(){var e;return(e=n.current).getMapObjectsInWhatAndWhereTaxonomy.apply(e,arguments)},getMidPointOfFeature:function(e){return n.current.getMidPointOfFeature(e)},dropPin:function(e,t,r){var n;return void 0===r&&(r=!0),O(this,void 0,void 0,function(){return F(this,function(i){switch(i.label){case 0:return[4,null===(n=B.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=B.current)||void 0===t||t.hidePin(e)},hidePins:function(){var e;null===(e=B.current)||void 0===e||e.hidePins()},showPin:function(e){var t;return void 0===e&&(e="-1"),O(this,void 0,void 0,function(){return F(this,function(r){switch(r.label){case 0:return[4,null===(t=B.current)||void 0===t?void 0:t.showPin(e)];case 1:return r.sent(),[2]}})})},showPins:function(){var e;null===(e=B.current)||void 0===e||e.showPins()},clearPin:function(e){var t;void 0===e&&(e="-1"),null===(t=B.current)||void 0===t||t.clearPin(e)},clearPins:function(){var e;null===(e=B.current)||void 0===e||e.clearPins()},fitViewToPins:function(e,t){var r;void 0===t&&(t=50),null===(r=B.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 Mu(n[0],n[1]),o=new Mu(n[0],n[1]),a=new Ou(i,o),l=0;l<e.length;l++){var s=e[l];a.extend(s.coordinates)}var c=a.toArray();null===(r=f.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={}),O(this,void 0,void 0,function(){var r,i,o;return F(this,function(a){switch(a.label){case 0:return Oe()?[4,null===(t=h.current)||void 0===t?void 0:t.getCenter()]:[2];case 1:return(r=a.sent())?n.current.checkUserViewport(r,n.current.getCurrentFocusBuilding(),n.current.getCurrentFocusFloor())?[2]:(i=n.current.getUserViewportBuilding(r))?(o=null!=e?e:{},i.taxonomyPath&&i.taxonomyPath in o?(this.focusTo(o[i.taxonomyPath],!1),[2]):i.name&&i.name in o?(this.focusTo(o[i.name],!1),[2]):i.defaultFloorPath?(this.focusTo(i.defaultFloorPath,!1),[2]):[2]):[2]:[2]}})})},computeRoute:function(e,t,r,i,o){return void 0===r&&(r=!1),void 0===i&&(i=!0),void 0===o&&(o=0),O(this,void 0,void 0,function(){var a;return F(this,function(l){switch(l.label){case 0:return n.current.getRoutingStatus()!==Xs.Ready?[3,2]:(ke.current=-1,[4,bu(e,t,r,i,o)]);case 1:return function(e){for(var t=function(t){return 0===t||1===t&&e.segments[t-1].maneuverType===Uc.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===Uc.RouteOverview){var o="Overview";i.instructions.push(o)}if(n>0&&i.maneuverType===Uc.ChangeZone)o="",e.segments[n-1].zone===Ls.Public&&i.zone===Ls.Transit?o=r(i):e.segments[n-1].zone===Ls.Transit&&i.zone===Ls.Public&&(o="Exit Baggage Claim Hall"),i.instructions.push(o);else if(i.maneuverType===Uc.ContinueStraight||i.maneuverType===Uc.PassThroughImmigration){var a=i.maneuverType===Uc.ContinueStraight?"Walk for ".concat(Math.ceil(i.distance)," ").concat(e.distanceUnit):r(i);o=void 0,e.segments[n-1].maneuverType===Uc.ChangeZone||(e.segments[n-1].maneuverType,Uc.PassThroughImmigration),o=a,i.instructions.push(o)}else if(i.maneuverType===Uc.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===Uc.EnterPortal)if(o="Enter ".concat(i.startEdge.name," at ").concat(i.startEdge.whereDimension.split(".").slice(-2).join(" ").toUpperCase()),Pu(i.startEdge.whatDimension))o="Continue to ".concat(ku(i.startEdge.whatDimension,i.endEdge.whereDimension)),i.instructions.push(o);else if(xu(i.startEdge.whatDimension)){var l=n+1<=e.segments.length-1?e.segments[n+1]:void 0;if(l&&l.maneuverType===Uc.TravelPortal){i.instructions.push(o),n+=1;var s=ju(l.startEdge.whatDimension);o="Take ".concat(s," to ").concat(ku(i.startEdge.whatDimension,i.endEdge.whereDimension)),l.instructions.push(o),i.description&&l.instructions.push(i.description)}else{var c=ju(i.startEdge.whatDimension);o="Take ".concat(c," to ").concat(ku(i.startEdge.whatDimension,i.endEdge.whereDimension)),i.instructions.push(o)}}}}(a=l.sent()),[2,a];case 2:return[2,null]}})})},computeRoutes:function(e,t){return void 0===t&&(t=!1),O(this,void 0,void 0,function(){var r,n,i,o,a,l,s,c,u,h,f;return F(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:Rs,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&&((c=s.segments[0]).maneuverType=Uc.SectionOverview,c.instructions=["".concat(c.startEdge.name," to ").concat(c.endEdge.name)]),u=0;u<s.segments.length;u+=1)h=s.segments[u],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=wu(r),r.segments[0]=f):r.segments.length=0,Se.current=r,[2,r]}})})},computeRoutesFromLocation:function(e,t,r,n){return void 0===n&&(n=!1),O(this,void 0,void 0,function(){var i;return F(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(L([i],r,!0),n)]);case 1:return[2,o.sent()]}})})},setActiveRoute:function(e){Se.current=e},getActiveRoute:function(){return Se.current},highlightRouteSegment:function(e){var t,r;return O(this,void 0,void 0,function(){var n,i,o,a,l,s,c,u,h,p,d,g,m,y,v,w,b,_,x,P,S;return F(this,function(j){if(Se.current&&Se.current.segments.length>e){if(Se.current.segments[e].coordinates.length>0){if(je.current=e,n=Se.current.segments[e],i=n.maneuverType===Uc.ExitPortal||n.maneuverType===Uc.Static?n.endEdge.whereDimension:n.startEdge.whereDimension,o=Pe.current.features,a=n.features[0].properties.patchNumber,ke.current!==a&&(ke.current=a,l={type:"FeatureCollection",features:_u(Se.current,a,{includeOverviewFeatures:gu(n),patchNumberForOverviewFeatures:a})},o=l.features),i&&i!==this.getCurrentFocus()&&this.filterWhereDimension(i),s=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&&mu([i],!0):mu([i],!0):mu([i],!1)}return e}(o,e),Pe.current={type:"FeatureCollection",features:s},Me(e,i),gu(n)?ze(new wl([])):Me(e,i),M(!E),n)if(c=function(e){return"Point"===e.geometry.type?e.geometry.coordinates:e.geometry.coordinates[0]},n.coordinates.length>1){for(u=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}(Se.current,n.patchNumber),h=c(u[0]),p=new Mu(h[0],h[1]),d=new Mu(h[0],h[1]),g=new Ou(p,d),m=0;m<u.length;m++)if("Point"===(y=u[m]).geometry.type)g.extend(y.geometry.coordinates);else for(v=0,w=y.geometry.coordinates;v<w.length;v++)b=w[v],g.extend(b);_=g.toArray(),null===(t=f.current)||void 0===t||t.fitBounds([_[0][0],_[0][1],_[1][0],_[1][1]],{padding:{top:50,right:50,bottom:50,left:50},duration:1e3})}else x={type:"FeatureCollection",features:[ee(n.coordinates[0])]},P=be(x,.025,3).features[0].geometry.coordinates,S=be(x,-.025,-3).features[0].geometry.coordinates,null===(r=f.current)||void 0===r||r.fitBounds([S[0],S[1],P[0],P[1]],{padding:{top:50,right:50,bottom:50,left:50},duration:1e3})}else console.log("at vertical portal segment, ignoring!");console.log(Se.current.segments[e].instructions)}else console.warn("Invalid segment number passed to highlightRouteSegment");return[2]})})},clearRoute:function(){Pe.current={type:"FeatureCollection",features:[]},Se.current=null,ze(new wl([])),M(!E)},getRoutingStatus:function(){return n.current.getRoutingStatus()}}},[q,_e,E,T]);var Fe=function(){!0===b.current&&!0===P.current&&!1===S.current&&e.onLoad&&(S.current=!0,e.onLoad())},Le=function(t){!1===j.current&&(j.current=!0,e.onLoadFail&&e.onLoadFail(t))},Ce=function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r],i=_;"line"===n.type?i=n.isAnimationLayer?w.LineLayer:_:"circle"===n.type?i=n.isAnimationLayer?w.CircleLayer:m:"symbol"===n.type&&(i=n.isAnimationLayer?w.SymbolLayer:x);var o=(n.belowLayerID,l.createElement(i,{key:n.id,id:n.id,filter:n.filter,style:n.style}));t.push(o)}return t}(_e),Te={sw:[U.center[0]-.05,U.center[1]-.05],ne:[U.center[0]+.05,U.center[1]+.05]};return l.createElement(i,{style:r.page},""!==q?l.createElement(y,{onPress:function(r){return O(t,void 0,void 0,function(){var t,i,o,a,l,s,c,u;return F(this,function(f){switch(f.label){case 0:t=r.nativeEvent.point,f.label=1;case 1:return f.trys.push([1,4,,5]),[4,null===(c=h.current)||void 0===c?void 0:c.project(r.nativeEvent.lngLat)];case 2:return i=f.sent(),d=t,o=(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=i)?p:g(d)?d:[0,0],[4,null===(u=h.current)||void 0===u?void 0:u.queryRenderedFeatures(o)];case 3:return function(e){for(var t,r,i,o,a,l,s=e[0],c=0;c<e.length;c++){var u=e[c];n.current.isClickableFeature(u)&&(s=u)}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;n.current.setLastClickedFeature({mapObjectId:null===(i=s.properties)||void 0===i?void 0:i.myMapObjectId,coordinates:h,name:null===(o=s.properties)||void 0===o?void 0:o.title,whatDimension:null===(a=s.properties)||void 0===a?void 0:a.dimension_what,whereDimension:null===(l=s.properties)||void 0===l?void 0:l.dimension_where,geometry:s.geometry,properties:s.properties})}}(a=f.sent()),e.onPress&&((l=null==a?void 0:a[0])?e.onPress(l):e.onPress(r.nativeEvent)),[3,5];case 4:return s=f.sent(),console.error("[onMapClicked] Error querying rendered features:",s),[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=d.current)||void 0===r?void 0:r.isGPSEnabled)||void 0===n?void 0:n.call(r))&&(null===(o=(i=d.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=B.current)||void 0===r||r.notifyRegionChange(),null===(n=e.onMove)||void 0===n||n.call(e,t)},onRegionDidChange:function(r){return O(t,void 0,void 0,function(){var t;return F(this,function(n){return null===(t=e.onMoveEnd)||void 0===t||t.call(e,r),[2]})})},onDidFinishLoadingMap:function(){!1===b.current&&(b.current=!0,D.current&&f.current&&(D.current=!1,f.current.setStop({center:U.center,zoom:U.zoom,bearing:U.bearing,duration:1200,easing:"ease"})),Fe())},onDidFailLoadingMap:function(){b.current=!1,Le("Failed to load map style")},style:r.map,logo:!1,ref:h,mapStyle:q||null,attribution:!1,compass:!1},l.createElement(v,{ref:f,duration:2e3,easing:"ease",initialViewState:{center:U.center,zoom:U.zoom,bearing:U.bearing,bounds:[Te.sw[0],Te.sw[1],Te.ne[0],Te.ne[1]]},maxZoom:22,minZoom:12}),l.createElement(Rh,{isOffline:ie,tileServer:de,props:e}),l.createElement(g,{id:"mapPinsSource",shape:Pe.current},Ce),Ee.current.__getValue().length>2?l.createElement(w.ShapeSource,{id:"route",shape:new w.Shape({type:"LineString",coordinates:Ee.current})},l.createElement(w.LineLayer,{id:"lineroute",style:Ae.current[0].style,aboveLayerID:"route-line-active"})):null,l.createElement(g,{id:"boundary",shape:Fu}),l.createElement(H,{position:T,showAccuracy:!0,pulse:!0}),e.children):null,l.createElement(Ch,{ref:B,mapRef:h,mapLoadedRef:b,cameraRef:f,metaAtlasCoreRef:n}))}Ch.displayName="MarkerOverlayContainer",function(e){e.Offline="offline",e.Online="online"}(Oh||(Oh={}));var Rh=function(e){var t=e.isOffline,r=e.tileServer,n=e.props,i=s(""),o=i[0],a=i[1];return u(function(){var e;try{if(!Ks||"function"!=typeof Ks.getState)return void console.error("Invalid useMBTilesDataStore provided");var n=null===(e=Ks.getState())||void 0===e?void 0:e.data;if(t&&!n)return void console.warn("Offline mode enabled but no MBTiles data available");var i=t&&n?"mbtiles://".concat(n):r;if(!i||"string"!=typeof i)return void console.error("Invalid source URL");a(i)}catch(e){console.error("Error setting up vector source:",e)}},[t,n]),l.createElement(b,{id:"custom",key:t?"offline":"online",url:o})};export{Th as MetaAtlasSDK,Oh as NetworkMode};
|
|
29
|
+
Ru={get exports(){return Wu},set exports(e){Wu=e}},Du=Wu,function(){var e,t="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",i=16,o=32,a=64,s=128,l=256,u=1/0,c=9007199254740991,h=NaN,d=4294967295,p=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",o],["partialRight",a],["rearg",l]],f="[object Arguments]",g="[object Array]",m="[object Boolean]",v="[object Date]",y="[object Error]",w="[object Function]",b="[object GeneratorFunction]",_="[object Map]",x="[object Number]",S="[object Object]",A="[object Promise]",P="[object RegExp]",M="[object Set]",C="[object String]",k="[object Symbol]",E="[object WeakMap]",T="[object ArrayBuffer]",L="[object DataView]",R="[object Float32Array]",D="[object Float64Array]",F="[object Int8Array]",O="[object Int16Array]",N="[object Int32Array]",j="[object Uint8Array]",I="[object Uint8ClampedArray]",z="[object Uint16Array]",B="[object Uint32Array]",U=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,q=RegExp(W.source),Z=RegExp(V.source),Y=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,K=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ne=/^\s+/,re=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,fe=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,we=/['\n\r\u2028\u2029\\]/g,be="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Me="\\ufe0e\\ufe0f",Ce="\\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",ke="['’]",Ee="["+be+"]",Te="["+Ce+"]",Le="["+_e+"]",Re="\\d+",De="["+Se+"]",Fe="["+Ae+"]",Oe="[^"+be+Ce+Re+Se+Ae+Pe+"]",Ne="\\ud83c[\\udffb-\\udfff]",je="[^"+be+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Pe+"]",Ue="\\u200d",He="(?:"+Fe+"|"+Oe+")",Ge="(?:"+Be+"|"+Oe+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Le+"|"+Ne+")?",Ze="["+Me+"]?",Ye=Ze+qe+"(?:"+Ue+"(?:"+[je,Ie,ze].join("|")+")"+Ze+qe+")*",$e="(?:"+[De,Ie,ze].join("|")+")"+Ye,Je="(?:"+[je+Le+"?",Le,Ie,ze,Ee].join("|")+")",Ke=RegExp(ke,"g"),Xe=RegExp(Le,"g"),Qe=RegExp(Ne+"(?="+Ne+")|"+Je+Ye,"g"),et=RegExp([Be+"?"+Fe+"+"+We+"(?="+[Te,Be,"$"].join("|")+")",Ge+"+"+Ve+"(?="+[Te,Be+He,"$"].join("|")+")",Be+"?"+He+"+"+We,Be+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,$e].join("|"),"g"),tt=RegExp("["+Ue+be+_e+Me+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["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"],it=-1,ot={};ot[R]=ot[D]=ot[F]=ot[O]=ot[N]=ot[j]=ot[I]=ot[z]=ot[B]=!0,ot[f]=ot[g]=ot[T]=ot[m]=ot[L]=ot[v]=ot[y]=ot[w]=ot[_]=ot[x]=ot[S]=ot[P]=ot[M]=ot[C]=ot[E]=!1;var at={};at[f]=at[g]=at[T]=at[L]=at[m]=at[v]=at[R]=at[D]=at[F]=at[O]=at[N]=at[_]=at[x]=at[S]=at[P]=at[M]=at[C]=at[k]=at[j]=at[I]=at[z]=at[B]=!0,at[y]=at[w]=at[E]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ut=parseInt,ct="object"==typeof xe&&xe&&xe.Object===Object&&xe,ht="object"==typeof self&&self&&self.Object===Object&&self,dt=ct||ht||Function("return this")(),pt=Du&&!Du.nodeType&&Du,ft=pt&&Ru&&!Ru.nodeType&&Ru,gt=ft&&ft.exports===pt,mt=gt&&ct.process,vt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),yt=vt&&vt.isArrayBuffer,wt=vt&&vt.isDate,bt=vt&&vt.isMap,_t=vt&&vt.isRegExp,xt=vt&&vt.isSet,St=vt&&vt.isTypedArray;function At(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 Pt(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 Mt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ct(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function kt(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 Et(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 Tt(e,t){return!(null==e||!e.length)&&Bt(e,t,0)>-1}function Lt(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 Rt(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 Dt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(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 Ot(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 Nt(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 jt=Wt("length");function It(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function zt(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 Bt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):zt(e,Ht,n)}function Ut(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Ht(e){return e!=e}function Gt(e,t){var n=null==e?0:e.length;return n?Zt(e,t)/n:h}function Wt(t){return function(n){return null==n?e:n[t]}}function Vt(t){return function(n){return null==t?e:t[n]}}function qt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function Zt(t,n){for(var r,i=-1,o=t.length;++i<o;){var a=n(t[i]);a!==e&&(r=r===e?a:r+a)}return r}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function $t(e){return e?e.slice(0,pn(e)+1).replace(ne,""):e}function Jt(e){return function(t){return e(t)}}function Kt(e,t){return Rt(t,function(t){return e[t]})}function Xt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&Bt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&Bt(t,e[n],0)>-1;);return n}var tn=Vt({"À":"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"}),nn=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(e){return"\\"+st[e]}function on(e){return tt.test(e)}function an(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function sn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,i=e.length,o=0,a=[];++n<i;){var s=e[n];s!==t&&s!==r||(e[n]=r,a[o++]=n)}return a}function un(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function hn(e){return on(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):jt(e)}function dn(e){return on(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var fn=Vt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),gn=function re(be){var _e=(be=null==be?dt:gn.defaults(dt.Object(),be,gn.pick(dt,rt))).Array,xe=be.Date,Se=be.Error,Ae=be.Function,Pe=be.Math,Me=be.Object,Ce=be.RegExp,ke=be.String,Ee=be.TypeError,Te=_e.prototype,Le=Ae.prototype,Re=Me.prototype,De=be["__core-js_shared__"],Fe=Le.toString,Oe=Re.hasOwnProperty,Ne=0,je=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ie=Re.toString,ze=Fe.call(Me),Be=dt._,Ue=Ce("^"+Fe.call(Oe).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=gt?be.Buffer:e,Ge=be.Symbol,We=be.Uint8Array,Ve=He?He.allocUnsafe:e,qe=sn(Me.getPrototypeOf,Me),Ze=Me.create,Ye=Re.propertyIsEnumerable,$e=Te.splice,Je=Ge?Ge.isConcatSpreadable:e,Qe=Ge?Ge.iterator:e,tt=Ge?Ge.toStringTag:e,st=function(){try{var e=ho(Me,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=be.clearTimeout!==dt.clearTimeout&&be.clearTimeout,ht=xe&&xe.now!==dt.Date.now&&xe.now,pt=be.setTimeout!==dt.setTimeout&&be.setTimeout,ft=Pe.ceil,mt=Pe.floor,vt=Me.getOwnPropertySymbols,jt=He?He.isBuffer:e,Vt=be.isFinite,mn=Te.join,vn=sn(Me.keys,Me),yn=Pe.max,wn=Pe.min,bn=xe.now,_n=be.parseInt,xn=Pe.random,Sn=Te.reverse,An=ho(be,"DataView"),Pn=ho(be,"Map"),Mn=ho(be,"Promise"),Cn=ho(be,"Set"),kn=ho(be,"WeakMap"),En=ho(Me,"create"),Tn=kn&&new kn,Ln={},Rn=Io(An),Dn=Io(Pn),Fn=Io(Mn),On=Io(Cn),Nn=Io(kn),jn=Ge?Ge.prototype:e,In=jn?jn.valueOf:e,zn=jn?jn.toString:e;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 t(){}return function(n){if(!es(n))return{};if(Ze)return Ze(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function Hn(){}function Gn(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,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 Jn(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?Yt(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 Kn(t){var n=t.length;return n?t[Yr(0,n-1)]:e}function Xn(e,t){return Oo(Ei(e),sr(t,0,e.length))}function Qn(e){return Oo(Ei(e))}function er(t,n,r){(r!==e&&!Ba(t[n],r)||r===e&&!(n in t))&&or(t,n,r)}function tr(t,n,r){var i=t[n];Oe.call(t,n)&&Ba(i,r)&&(r!==e||n in t)||or(t,n,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&&Ti(t,Ls(t),e)}function or(e,t,n){"__proto__"==t&&st?st(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(t,n){for(var r=-1,i=n.length,o=_e(i),a=null==t;++r<i;)o[r]=a?e:Ms(t,n[r]);return o}function sr(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function lr(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)),s!==e)return s;if(!es(t))return t;var h=Wa(t);if(h){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!l)return Ei(t,s)}else{var d=go(t),p=d==w||d==b;if(Ya(t))return Si(t,l);if(d==S||d==f||p&&!o){if(s=u||p?{}:vo(t),!l)return u?function(e,t){return Ti(e,fo(e),t)}(t,function(e,t){return e&&Ti(t,Rs(t),e)}(s,t)):function(e,t){return Ti(e,po(e),t)}(t,ir(s,t))}else{if(!at[d])return o?t:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case T:return Ai(e);case m:case v:return new i(+e);case L:return function(e,t){var n=t?Ai(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case R:case D:case F:case O:case N:case j:case I:case z:case B:return Pi(e,n);case _:return new i;case x:case C:return new i(e);case P:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case M:return new i;case k:return r=e,In?Me(In.call(r)):{}}}(t,d,l)}}a||(a=new $n);var g=a.get(t);if(g)return g;a.set(t,s),as(t)?t.forEach(function(e){s.add(lr(e,n,r,e,t,a))}):ns(t)&&t.forEach(function(e,i){s.set(i,lr(e,n,r,i,t,a))});var y=h?e:(c?u?io:ro:u?Rs:Ls)(t);return Mt(y||t,function(e,i){y&&(e=t[i=e]),tr(s,i,lr(e,n,r,i,t,a))}),s}function ur(t,n,r){var i=r.length;if(null==t)return!i;for(t=Me(t);i--;){var o=r[i],a=n[o],s=t[o];if(s===e&&!(o in t)||!a(s))return!1}return!0}function cr(n,r,i){if("function"!=typeof n)throw new Ee(t);return Lo(function(){n.apply(e,i)},r)}function hr(e,t,n,r){var i=-1,o=Tt,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Rt(t,Jt(n))),r?(o=Lt,a=!1):t.length>=200&&(o=Xt,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:Y,evaluate:$,interpolate:J,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__=En?En(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(t){var r=this.__data__;if(En){var i=r[t];return i===n?e:i}return Oe.call(r,t)?r[t]:e},Vn.prototype.has=function(t){var n=this.__data__;return En?n[t]!==e:Oe.call(n,t)},Vn.prototype.set=function(t,r){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=En&&r===e?n:r,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(t){var n=this.__data__,r=nr(n,t);return r<0?e:n[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,n),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(t,n,r){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=n(a);if(null!=s&&(l===e?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):Dt(i,s):r||(i[i.length]=s)}return i}var yr=Fi(),wr=Fi(!0);function br(e,t){return e&&yr(e,t,Ls)}function _r(e,t){return e&&wr(e,t,Ls)}function xr(e,t){return Et(t,function(t){return Ka(e[t])})}function Sr(t,n){for(var r=0,i=(n=wi(n,t)).length;null!=t&&r<i;)t=t[jo(n[r++])];return r&&r==i?t:e}function Ar(e,t,n){var r=t(e);return Wa(e)?r:Dt(r,n(e))}function Pr(t){return null==t?t===e?"[object Undefined]":"[object Null]":tt&&tt in Me(t)?function(t){var n=Oe.call(t,tt),r=t[tt];try{t[tt]=e;var i=!0}catch(e){}var o=Ie.call(t);return i&&(n?t[tt]=r:delete t[tt]),o}(t):function(e){return Ie.call(e)}(t)}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 Er(t,n,r){for(var i=r?Lt:Tt,o=t[0].length,a=t.length,s=a,l=_e(a),u=1/0,c=[];s--;){var h=t[s];s&&n&&(h=Rt(h,Jt(n))),u=wn(h.length,u),l[s]=!r&&(n||o>=120&&h.length>=120)?new Yn(s&&h):e}h=t[0];var d=-1,p=l[0];e:for(;++d<o&&c.length<u;){var f=h[d],g=n?n(f):f;if(f=r||0!==f?f:0,!(p?Xt(p,g):i(c,g,r))){for(s=a;--s;){var m=l[s];if(!(m?Xt(m,g):i(t[s],g,r)))continue e}p&&p.push(g),c.push(f)}}return c}function Tr(t,n,r){var i=null==(t=ko(t,n=wi(n,t)))?t:t[jo(Jo(n))];return null==i?e:At(i,t,r)}function Lr(e){return ts(e)&&Pr(e)==f}function Rr(t,n,r,i,o){return t===n||(null==t||null==n||!ts(t)&&!ts(n)?t!=t&&n!=n:function(t,n,r,i,o,a){var s=Wa(t),l=Wa(n),u=s?g:go(t),c=l?g:go(n),h=(u=u==f?S:u)==S,d=(c=c==f?S:c)==S,p=u==c;if(p&&Ya(t)){if(!Ya(n))return!1;s=!0,h=!1}if(p&&!h)return a||(a=new $n),s||us(t)?to(t,n,r,i,o,a):function(e,t,n,r,i,o,a){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case T:return!(e.byteLength!=t.byteLength||!o(new We(e),new We(t)));case m:case v:case x:return Ba(+e,+t);case y:return e.name==t.name&&e.message==t.message;case P:case C:return e==t+"";case _:var s=an;case M:var l=1&r;if(s||(s=un),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 k:if(In)return In.call(e)==In.call(t)}return!1}(t,n,u,r,i,o,a);if(!(1&r)){var w=h&&Oe.call(t,"__wrapped__"),b=d&&Oe.call(n,"__wrapped__");if(w||b){var A=w?t.value():t,E=b?n.value():n;return a||(a=new $n),o(A,E,r,i,a)}}return!!p&&(a||(a=new $n),function(t,n,r,i,o,a){var s=1&r,l=ro(t),u=l.length,c=ro(n),h=c.length;if(u!=h&&!s)return!1;for(var d=u;d--;){var p=l[d];if(!(s?p in n:Oe.call(n,p)))return!1}var f=a.get(t),g=a.get(n);if(f&&g)return f==n&&g==t;var m=!0;a.set(t,n),a.set(n,t);for(var v=s;++d<u;){var y=t[p=l[d]],w=n[p];if(i)var b=s?i(w,y,p,n,t,a):i(y,w,p,t,n,a);if(!(b===e?y===w||o(y,w,r,i,a):b)){m=!1;break}v||(v="constructor"==p)}if(m&&!v){var _=t.constructor,x=n.constructor;_==x||!("constructor"in t)||!("constructor"in n)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(m=!1)}return a.delete(t),a.delete(n),m}(t,n,r,i,o,a))}(t,n,r,i,Rr,o))}function Dr(t,n,r,i){var o=r.length,a=o,s=!i;if(null==t)return!a;for(t=Me(t);o--;){var l=r[o];if(s&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++o<a;){var u=(l=r[o])[0],c=t[u],h=l[1];if(s&&l[2]){if(c===e&&!(u in t))return!1}else{var d=new $n;if(i)var p=i(c,h,u,t,n,d);if(!(p===e?Rr(h,c,3,i,d):p))return!1}}return!0}function Fr(e){return!(!es(e)||(t=e,je&&je in t))&&(Ka(e)?Ue:fe).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 Nr(e){if(!Ao(e))return vn(e);var t=[];for(var n in Me(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(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)?_e(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(t,n){return _o(t)&&Po(n)?Mo(jo(t),n):function(r){var i=Ms(r,t);return i===e&&i===n?Cs(r,t):Rr(n,i,3)}}function Hr(t,n,r,i,o){t!==n&&yr(n,function(a,s){if(o||(o=new $n),es(a))!function(t,n,r,i,o,a,s){var l=Eo(t,r),u=Eo(n,r),c=s.get(u);if(c)er(t,r,c);else{var h=a?a(l,u,r+"",t,n,s):e,d=h===e;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=Ei(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)&&!Ka(l)||(h=vo(u))):d=!1}d&&(s.set(u,h),o(h,u,i,a,s),s.delete(u)),er(t,r,h)}}(t,n,s,r,Hr,i,o);else{var l=i?i(Eo(t,s),a,s+"",t,n,o):e;l===e&&(l=a),er(t,s,l)}},Rs)}function Gr(t,n){var r=t.length;if(r)return wo(n+=n<0?r:0,r)?t[n]:e}function Wr(e,t,n){t=t.length?Rt(t,function(e){return Wa(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e}):[rl];var r=-1;t=Rt(t,Jt(lo()));var i=zr(e,function(e,n,i){var o=Rt(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){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++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?Ut:Bt,o=-1,a=t.length,s=e;for(e===t&&(t=Ei(t)),n&&(s=Rt(e,Jt(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+mt(xn()*(t-e+1))}function $r(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=mt(t/2))&&(e+=e)}while(t);return n}function Jr(e,t){return Ro(Co(e,t,rl),e+"")}function Kr(e){return Kn(Bs(e))}function Xr(e,t){var n=Bs(e);return Oo(n,sr(t,0,n.length))}function Qr(t,n,r,i){if(!es(t))return t;for(var o=-1,a=(n=wi(n,t)).length,s=a-1,l=t;null!=l&&++o<a;){var u=jo(n[o]),c=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(o!=s){var h=l[u];(c=i?i(h,u,l):e)===e&&(c=es(h)?h:wo(n[o+1])?[]:{})}tr(l,u,c),l=l[u]}return t}var ei=Tn?function(e,t){return Tn.set(e,t),e}:rl,ti=st?function(e,t){return st(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=_e(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(t,n,r,i){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(n=r(n))!=n,l=null===n,u=ls(n),c=n===e;o<a;){var h=mt((o+a)/2),d=r(t[h]),p=d!==e,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<=n:d<n);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)?h:+e}function ui(e){if("string"==typeof e)return e;if(Wa(e))return Rt(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=Tt,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Lt;else if(o>=200){var u=t?null:$i(e);if(u)return un(u);a=!1,i=Xt,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[jo(Jo(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()),Ft(t,function(e,t){return t.func.apply(t.thisArg,Dt([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=_e(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(t,n,r){for(var i=-1,o=t.length,a=n.length,s={};++i<o;){var l=i<a?n[i]:e;r(s,t[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]:No(ys(e))}var bi=Jr;function _i(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:ri(t,n,r)}var xi=ct||function(e){return dt.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(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,a=ls(t),s=n!==e,l=null===n,u=n==n,c=ls(n);if(!l&&!c&&!a&&t>n||a&&s&&u&&!l&&!c||i&&s&&u||!r&&u||!o)return 1;if(!i&&!a&&!c&&t<n||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=_e(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=_e(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 Ei(e,t){var n=-1,r=e.length;for(t||(t=_e(r));++n<r;)t[n]=e[n];return t}function Ti(t,n,r,i){var o=!r;r||(r={});for(var a=-1,s=n.length;++a<s;){var l=n[a],u=i?i(r[l],t[l],l,r,t):e;u===e&&(u=t[l]),o?or(r,l,u):tr(r,l,u)}return r}function Li(e,t){return function(n,r){var i=Wa(n)?Pt:rr,o=t?t():{};return i(n,e,lo(r,2),o)}}function Ri(t){return Jr(function(n,r){var i=-1,o=r.length,a=o>1?r[o-1]:e,s=o>2?r[2]:e;for(a=t.length>3&&"function"==typeof a?(o--,a):e,s&&bo(r[0],r[1],s)&&(a=o<3?e:a,o=1),n=Me(n);++i<o;){var l=r[i];l&&t(n,l,i,a)}return n})}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(t){return function(n){var r=on(n=ys(n))?dn(n):e,i=r?r[0]:n.charAt(0),o=r?_i(r,1).join(""):n.slice(1);return i[t]()+o}}function Ni(e){return function(t){return Ft(Ks(Gs(t).replace(Ke,"")),e,"")}}function ji(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(t){return function(n,r,i){var o=Me(n);if(!qa(n)){var a=lo(r,3);n=Ls(n),r=function(e){return a(o[e],e,o)}}var s=t(n,r,i);return s>-1?o[a?n[s]:s]:e}}function zi(n){return no(function(r){var i=r.length,o=i,a=Gn.prototype.thru;for(n&&r.reverse();o--;){var s=r[o];if("function"!=typeof s)throw new Ee(t);if(a&&!l&&"wrapper"==ao(s))var l=new Gn([],!0)}for(o=l?o:i;++o<i;){var u=ao(s=r[o]),c="wrapper"==u?oo(s):e;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,t=e[0];if(l&&1==e.length&&Wa(t))return l.plant(t).value();for(var n=0,o=i?r[n].apply(this,e):t;++n<i;)o=r[n].call(this,o);return o}})}function Bi(t,n,r,i,o,a,l,u,c,h){var d=n&s,p=1&n,f=2&n,g=24&n,m=512&n,v=f?e:ji(t);return function s(){for(var y=arguments.length,w=_e(y),b=y;b--;)w[b]=arguments[b];if(g)var _=so(s),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,l,g)),y-=x,g&&y<h){var S=ln(w,_);return Zi(t,n,Bi,s.placeholder,r,w,S,u,c,h-y)}var A=p?r:this,P=f?A[t]:t;return y=w.length,u?w=function(t,n){for(var r=t.length,i=wn(n.length,r),o=Ei(t);i--;){var a=n[i];t[i]=wo(a,r)?o[a]:e}return t}(w,u):m&&y>1&&w.reverse(),d&&c<y&&(w.length=c),this&&this!==dt&&this instanceof s&&(P=v||ji(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(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=ui(r),i=ui(i)):(r=li(r),i=li(i)),o=t(r,i)}return o}}function Gi(e){return no(function(t){return t=Rt(t,Jt(lo())),Jr(function(n){var r=this;return e(t,function(e){return At(e,r,n)})})})}function Wi(t,n){var r=(n=n===e?" ":ui(n)).length;if(r<2)return r?$r(n,t):n;var i=$r(n,ft(t/hn(n)));return on(n)?_i(dn(i),0,t).join(""):i.slice(0,t)}function Vi(t){return function(n,r,i){return i&&"number"!=typeof i&&bo(n,r,i)&&(r=i=e),n=ps(n),r===e?(r=n,n=0):r=ps(r),function(e,t,n,r){for(var i=-1,o=yn(ft((t-e)/(n||1)),0),a=_e(o);o--;)a[r?o:++i]=e,e+=n;return a}(n,r,i=i===e?n<r?1:-1:ps(i),t)}}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(t,n,r,i,s,l,u,c,h,d){var p=8&n;n|=p?o:a,4&(n&=~(p?a:o))||(n&=-4);var f=[t,n,s,p?l:e,p?u:e,p?e:l,p?e:u,c,h,d],g=r.apply(e,f);return xo(t)&&To(g,f),g.placeholder=i,Do(g,t,n)}function Yi(e){var t=Pe[e];return function(e,n){if(e=ms(e),(n=null==n?0:wn(fs(n),292))&&Vt(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/un(new Cn([,-0]))[1]==u?function(e){return new Cn(e)}:ll;function Ji(e){return function(t){var n=go(t);return n==_?an(t):n==M?cn(t):function(e,t){return Rt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Ki(n,u,c,h,d,p,f,g){var m=2&u;if(!m&&"function"!=typeof n)throw new Ee(t);var v=h?h.length:0;if(v||(u&=-97,h=d=e),f=f===e?f:yn(fs(f),0),g=g===e?g:fs(g),v-=d?d.length:0,u&a){var y=h,w=d;h=d=e}var b=m?e:oo(n),_=[n,u,c,h,d,y,w,p,f,g];if(b&&function(e,t){var n=e[1],i=t[1],o=n|i,a=o<131,u=i==s&&8==n||i==s&&n==l&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!a&&!u)return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var h=e[3];e[3]=h?Ci(h,c,t[4]):c,e[4]=h?ln(e[3],r):t[4]}(c=t[5])&&(h=e[5],e[5]=h?ki(h,c,t[6]):c,e[6]=h?ln(e[5],r):t[6]),(c=t[7])&&(e[7]=c),i&s&&(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]=o}(_,b),n=_[0],u=_[1],c=_[2],h=_[3],d=_[4],!(g=_[9]=_[9]===e?m?0:n.length:yn(_[9]-v,0))&&24&u&&(u&=-25),u&&1!=u)x=8==u||u==i?function(t,n,r){var i=ji(t);return function o(){for(var a=arguments.length,s=_e(a),l=a,u=so(o);l--;)s[l]=arguments[l];var c=a<3&&s[0]!==u&&s[a-1]!==u?[]:ln(s,u);return(a-=c.length)<r?Zi(t,n,Bi,o.placeholder,e,s,c,e,e,r-a):At(this&&this!==dt&&this instanceof o?i:t,this,s)}}(n,u,g):u!=o&&33!=u||d.length?Bi.apply(e,_):function(e,t,n,r){var i=1&t,o=ji(e);return function t(){for(var a=-1,s=arguments.length,l=-1,u=r.length,c=_e(u+s),h=this&&this!==dt&&this instanceof t?o:e;++l<u;)c[l]=r[l];for(;s--;)c[l++]=arguments[++a];return At(h,i?n:this,c)}}(n,u,c,h);else var x=function(e,t,n){var r=1&t,i=ji(e);return function t(){return(this&&this!==dt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(n,u,c);return Do((b?ei:To)(x,_),n,u)}function Xi(t,n,r,i){return t===e||Ba(t,Re[r])&&!Oe.call(i,r)?n:t}function Qi(t,n,r,i,o,a){return es(t)&&es(n)&&(a.set(n,t),Hr(t,n,e,Qi,a),a.delete(n)),t}function eo(t){return is(t)?e:t}function to(t,n,r,i,o,a){var s=1&r,l=t.length,u=n.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(t),h=a.get(n);if(c&&h)return c==n&&h==t;var d=-1,p=!0,f=2&r?new Yn:e;for(a.set(t,n),a.set(n,t);++d<l;){var g=t[d],m=n[d];if(i)var v=s?i(m,g,d,n,t,a):i(g,m,d,t,n,a);if(v!==e){if(v)continue;p=!1;break}if(f){if(!Nt(n,function(e,t){if(!Xt(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(t),a.delete(n),p}function no(t){return Ro(Co(t,e,Vo),t+"")}function ro(e){return Ar(e,Ls,po)}function io(e){return Ar(e,Rs,fo)}var oo=Tn?function(e){return Tn.get(e)}:ll;function ao(e){for(var t=e.name+"",n=Ln[t],r=Oe.call(Ln,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=Ls(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Po(i)]}return t}function ho(t,n){var r=function(t,n){return null==t?e:t[n]}(t,n);return Fr(r)?r:e}var po=vt?function(e){return null==e?[]:(e=Me(e),Et(vt(e),function(t){return Ye.call(e,t)}))}:gl,fo=vt?function(e){for(var t=[];e;)Dt(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=jo(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)||!!(Je&&e&&e[Je])}function wo(e,t){var n=typeof e;return!!(t=null==t?c:t)&&("number"==n||"symbol"!=n&&me.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))||X.test(e)||!K.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)))!=L||Pn&&go(new Pn)!=_||Mn&&go(Mn.resolve())!=A||Cn&&go(new Cn)!=M||kn&&go(new kn)!=E)&&(go=function(t){var n=Pr(t),r=n==S?t.constructor:e,i=r?Io(r):"";if(i)switch(i){case Rn:return L;case Dn:return _;case Fn:return A;case On:return M;case Nn:return E}return n});var So=De?Ka:ml;function Ao(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Po(e){return e==e&&!es(e)}function Mo(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in Me(r))}}function Co(t,n,r){return n=yn(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=yn(e.length-n,0),a=_e(o);++i<o;)a[i]=e[n+i];i=-1;for(var s=_e(n+1);++i<n;)s[i]=e[i];return s[n]=r(a),At(t,this,s)}}function ko(e,t){return t.length<2?e:Sr(e,ri(t,0,-1))}function Eo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var To=Fo(ei),Lo=pt||function(e,t){return dt.setTimeout(e,t)},Ro=Fo(ti);function Do(e,t,n){var r=t+"";return Ro(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(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Mt(p,function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(r),n)))}function Fo(t){var n=0,r=0;return function(){var i=bn(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Oo(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var a=Yr(r,o),s=t[a];t[a]=t[r],t[r]=s}return t.length=n,t}var No=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(Q,function(e,n,r,i){t.push(r?i.replace(ue,"$1"):n||e)}),t});function jo(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__=Ei(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bo=Jr(function(e,t){return Za(e)?hr(e,vr(t,1,Za,!0)):[]}),Uo=Jr(function(t,n){var r=Jo(n);return Za(r)&&(r=e),Za(t)?hr(t,vr(n,1,Za,!0),lo(r,2)):[]}),Ho=Jr(function(t,n){var r=Jo(n);return Za(r)&&(r=e),Za(t)?hr(t,vr(n,1,Za,!0),e,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)),zt(e,lo(t,3),i)}function Wo(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=fs(r),o=r<0?yn(i+o,0):wn(o,i-1)),zt(t,lo(n,3),o,!0)}function Vo(e){return null!=e&&e.length?vr(e,1):[]}function qo(t){return t&&t.length?t[0]:e}var Zo=Jr(function(e){var t=Rt(e,vi);return t.length&&t[0]===e[0]?Er(t):[]}),Yo=Jr(function(t){var n=Jo(t),r=Rt(t,vi);return n===Jo(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Er(r,lo(n,2)):[]}),$o=Jr(function(t){var n=Jo(t),r=Rt(t,vi);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Er(r,e,n):[]});function Jo(t){var n=null==t?0:t.length;return n?t[n-1]:e}var Ko=Jr(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,Rt(t,function(e){return wo(e,n)?+e:e}).sort(Mi)),r});function ea(e){return null==e?e:Sn.call(e)}var ta=Jr(function(e){return ci(vr(e,1,Za,!0))}),na=Jr(function(t){var n=Jo(t);return Za(n)&&(n=e),ci(vr(t,1,Za,!0),lo(n,2))}),ra=Jr(function(t){var n=Jo(t);return n="function"==typeof n?n:e,ci(vr(t,1,Za,!0),e,n)});function ia(e){if(!e||!e.length)return[];var t=0;return e=Et(e,function(e){if(Za(e))return t=yn(e.length,t),!0}),Yt(t,function(t){return Rt(e,Wt(t))})}function oa(t,n){if(!t||!t.length)return[];var r=ia(t);return null==n?r:Rt(r,function(t){return At(n,e,t)})}var aa=Jr(function(e,t){return Za(e)?hr(e,t):[]}),sa=Jr(function(e){return gi(Et(e,Za))}),la=Jr(function(t){var n=Jo(t);return Za(n)&&(n=e),gi(Et(t,Za),lo(n,2))}),ua=Jr(function(t){var n=Jo(t);return n="function"==typeof n?n:e,gi(Et(t,Za),e,n)}),ca=Jr(ia),ha=Jr(function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,oa(t,r)});function da(e){var t=Bn(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var fa=no(function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return ar(e,t)};return!(n>1||this.__actions__.length)&&i instanceof Wn&&wo(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:pa,args:[o],thisArg:e}),new Gn(i,this.__chain__).thru(function(t){return n&&!t.length&&t.push(e),t})):this.thru(o)}),ga=Li(function(e,t,n){Oe.call(e,n)?++e[n]:or(e,n,1)}),ma=Ii(Go),va=Ii(Wo);function ya(e,t){return(Wa(e)?Mt:dr)(e,lo(t,3))}function wa(e,t){return(Wa(e)?Ct:pr)(e,lo(t,3))}var ba=Li(function(e,t,n){Oe.call(e,n)?e[n].push(t):or(e,n,[t])}),_a=Jr(function(e,t,n){var r=-1,i="function"==typeof t,o=qa(e)?_e(e.length):[];return dr(e,function(e){o[++r]=i?At(t,e,n):Tr(e,t,n)}),o}),xa=Li(function(e,t,n){or(e,n,t)});function Sa(e,t){return(Wa(e)?Rt:zr)(e,lo(t,3))}var Aa=Li(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Pa=Jr(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=ht||function(){return dt.Date.now()};function Ca(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,Ki(t,s,e,e,e,e,n)}function ka(n,r){var i;if("function"!=typeof r)throw new Ee(t);return n=fs(n),function(){return--n>0&&(i=r.apply(this,arguments)),n<=1&&(r=e),i}}var Ea=Jr(function(e,t,n){var r=1;if(n.length){var i=ln(n,so(Ea));r|=o}return Ki(e,r,t,n,i)}),Ta=Jr(function(e,t,n){var r=3;if(n.length){var i=ln(n,so(Ta));r|=o}return Ki(t,r,e,n,i)});function La(n,r,i){var o,a,s,l,u,c,h=0,d=!1,p=!1,f=!0;if("function"!=typeof n)throw new Ee(t);function g(t){var r=o,i=a;return o=a=e,h=t,l=n.apply(i,r)}function m(t){var n=t-c;return c===e||n>=r||n<0||p&&t-h>=s}function v(){var e=Ma();if(m(e))return y(e);u=Lo(v,function(e){var t=r-(e-c);return p?wn(t,s-(e-h)):t}(e))}function y(t){return u=e,f&&o?g(t):(o=a=e,l)}function w(){var t=Ma(),n=m(t);if(o=arguments,a=this,c=t,n){if(u===e)return function(e){return h=e,u=Lo(v,r),d?g(e):l}(c);if(p)return xi(u),u=Lo(v,r),g(c)}return u===e&&(u=Lo(v,r)),l}return r=ms(r)||0,es(i)&&(d=!!i.leading,s=(p="maxWait"in i)?yn(ms(i.maxWait)||0,r):s,f="trailing"in i?!!i.trailing:f),w.cancel=function(){u!==e&&xi(u),h=0,o=c=a=u=e},w.flush=function(){return u===e?l:y(Ma())},w}var Ra=Jr(function(e,t){return cr(e,1,t)}),Da=Jr(function(e,t,n){return cr(e,ms(t)||0,n)});function Fa(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new Ee(t);var r=function(){var t=arguments,i=n?n.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,t);return r.cache=o.set(i,a)||o,a};return r.cache=new(Fa.Cache||Zn),r}function Oa(e){if("function"!=typeof e)throw new Ee(t);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 Na=bi(function(e,t){var n=(t=1==t.length&&Wa(t[0])?Rt(t[0],Jt(lo())):Rt(vr(t,1),Jt(lo()))).length;return Jr(function(r){for(var i=-1,o=wn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return At(e,this,r)})}),ja=Jr(function(t,n){var r=ln(n,so(ja));return Ki(t,o,e,n,r)}),Ia=Jr(function(t,n){var r=ln(n,so(Ia));return Ki(t,a,e,n,r)}),za=no(function(t,n){return Ki(t,l,e,e,e,n)});function Ba(e,t){return e===t||e!=e&&t!=t}var Ua=qi(Mr),Ha=qi(function(e,t){return e>=t}),Ga=Lr(function(){return arguments}())?Lr:function(e){return ts(e)&&Oe.call(e,"callee")&&!Ye.call(e,"callee")},Wa=_e.isArray,Va=yt?Jt(yt):function(e){return ts(e)&&Pr(e)==T};function qa(e){return null!=e&&Qa(e.length)&&!Ka(e)}function Za(e){return ts(e)&&qa(e)}var Ya=jt||ml,$a=wt?Jt(wt):function(e){return ts(e)&&Pr(e)==v};function Ja(e){if(!ts(e))return!1;var t=Pr(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Ka(e){if(!es(e))return!1;var t=Pr(e);return t==w||t==b||"[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<=c}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=bt?Jt(bt):function(e){return ts(e)&&go(e)==_};function rs(e){return"number"==typeof e||ts(e)&&Pr(e)==x}function is(e){if(!ts(e)||Pr(e)!=S)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=_t?Jt(_t):function(e){return ts(e)&&Pr(e)==P},as=xt?Jt(xt):function(e){return ts(e)&&go(e)==M};function ss(e){return"string"==typeof e||!Wa(e)&&ts(e)&&Pr(e)==C}function ls(e){return"symbol"==typeof e||ts(e)&&Pr(e)==k}var us=St?Jt(St):function(e){return ts(e)&&Qa(e.length)&&!!ot[Pr(e)]},cs=qi(Ir),hs=qi(function(e,t){return e<=t});function ds(e){if(!e)return[];if(qa(e))return ss(e)?dn(e):Ei(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=go(e);return(t==_?an:t==M?un:Bs)(e)}function ps(e){return e?(e=ms(e))===u||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,d):0}function ms(e){if("number"==typeof e)return e;if(ls(e))return h;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=$t(e);var n=pe.test(e);return n||ge.test(e)?ut(e.slice(2),n?2:8):de.test(e)?h:+e}function vs(e){return Ti(e,Rs(e))}function ys(e){return null==e?"":ui(e)}var ws=Ri(function(e,t){if(Ao(t)||qa(t))Ti(t,Ls(t),e);else for(var n in t)Oe.call(t,n)&&tr(e,n,t[n])}),bs=Ri(function(e,t){Ti(t,Rs(t),e)}),_s=Ri(function(e,t,n,r){Ti(t,Rs(t),e,r)}),xs=Ri(function(e,t,n,r){Ti(t,Ls(t),e,r)}),Ss=no(ar),As=Jr(function(t,n){t=Me(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&bo(n[0],n[1],o)&&(i=1);++r<i;)for(var a=n[r],s=Rs(a),l=-1,u=s.length;++l<u;){var c=s[l],h=t[c];(h===e||Ba(h,Re[c])&&!Oe.call(t,c))&&(t[c]=a[c])}return t}),Ps=Jr(function(t){return t.push(e,Qi),At(Fs,e,t)});function Ms(t,n,r){var i=null==t?e:Sr(t,n);return i===e?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)),Es=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),Ts=Jr(Tr);function Ls(e){return qa(e)?Jn(e):Nr(e)}function Rs(e){return qa(e)?Jn(e,!0):jr(e)}var Ds=Ri(function(e,t,n){Hr(e,t,n)}),Fs=Ri(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=Rt(t,function(t){return t=wi(t,e),r||(r=t.length>1),t}),Ti(e,io(e),n),r&&(n=lr(n,7,eo));for(var i=t.length;i--;)hi(n,t[i]);return n}),Ns=no(function(e,t){return null==e?{}:function(e,t){return Vr(e,t,function(t,n){return Cs(e,n)})}(e,t)});function js(e,t){if(null==e)return{};var n=Rt(io(e),function(e){return[e]});return t=lo(t),Vr(e,n,function(e,n){return t(e,n[0])})}var Is=Ji(Ls),zs=Ji(Rs);function Bs(e){return null==e?[]:Kt(e,Ls(e))}var Us=Ni(function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)});function Hs(e){return Js(ys(e).toLowerCase())}function Gs(e){return(e=ys(e))&&e.replace(ve,tn).replace(Xe,"")}var Ws=Ni(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Vs=Ni(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),qs=Oi("toLowerCase"),Zs=Ni(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Ys=Ni(function(e,t,n){return e+(n?" ":"")+Js(t)}),$s=Ni(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Js=Oi("toUpperCase");function Ks(t,n,r){return t=ys(t),(n=r?e:n)===e?function(e){return nt.test(e)}(t)?function(e){return e.match(et)||[]}(t):function(e){return e.match(se)||[]}(t):t.match(n)||[]}var Xs=Jr(function(t,n){try{return At(t,e,n)}catch(e){return Ja(e)?e:new Se(e)}}),Qs=no(function(e,t){return Mt(t,function(t){t=jo(t),or(e,t,Ea(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=Jr(function(e,t){return function(n){return Tr(n,e,t)}}),al=Jr(function(e,t){return function(n){return Tr(e,n,t)}});function sl(e,t,n){var r=Ls(t),i=xr(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=xr(t,Ls(t)));var o=!(es(n)&&"chain"in n&&!n.chain),a=Ka(e);return Mt(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__=Ei(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Dt([this.value()],arguments))})}),e}function ll(){}var ul=Gi(Rt),cl=Gi(kt),hl=Gi(Nt);function dl(e){return _o(e)?Wt(jo(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,yl=Hi(function(e,t){return e+t},0),wl=Yi("ceil"),bl=Hi(function(e,t){return e/t},1),_l=Yi("floor"),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,n){if("function"!=typeof n)throw new Ee(t);return e=fs(e),function(){if(--e<1)return n.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=Ea,Bn.bindAll=Qs,Bn.bindKey=Ta,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Bn.chain=da,Bn.chunk=function(t,n,r){n=(r?bo(t,n,r):n===e)?1:yn(fs(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,a=0,s=_e(ft(i/n));o<i;)s[a++]=ri(t,o,o+=n);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=_e(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Dt(Wa(n)?Ei(n):[n],vr(t,1))},Bn.cond=function(e){var n=null==e?0:e.length,r=lo();return e=n?Rt(e,function(e){if("function"!=typeof e[1])throw new Ee(t);return[r(e[0]),e[1]]}):[],Jr(function(t){for(var r=-1;++r<n;){var i=e[r];if(At(i[0],this,t))return At(i[1],this,t)}})},Bn.conforms=function(e){return function(e){var t=Ls(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 t(n,r,i){var o=Ki(n,8,e,e,e,e,e,r=i?e:r);return o.placeholder=t.placeholder,o},Bn.curryRight=function t(n,r,o){var a=Ki(n,i,e,e,e,e,e,r=o?e:r);return a.placeholder=t.placeholder,a},Bn.debounce=La,Bn.defaults=As,Bn.defaultsDeep=Ps,Bn.defer=Ra,Bn.delay=Da,Bn.difference=Bo,Bn.differenceBy=Uo,Bn.differenceWith=Ho,Bn.drop=function(t,n,r){var i=null==t?0:t.length;return i?ri(t,(n=r||n===e?1:fs(n))<0?0:n,i):[]},Bn.dropRight=function(t,n,r){var i=null==t?0:t.length;return i?ri(t,0,(n=i-(n=r||n===e?1:fs(n)))<0?0:n):[]},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(t,n,r,i){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&bo(t,n,r)&&(r=0,i=o),function(t,n,r,i){var o=t.length;for((r=fs(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:fs(i))<0&&(i+=o),i=r>i?0:gs(i);r<i;)t[r++]=n;return t}(t,n,r,i)):[]},Bn.filter=function(e,t){return(Wa(e)?Et: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),u)},Bn.flatMapDepth=function(t,n,r){return r=r===e?1:fs(r),vr(Sa(t,n),r)},Bn.flatten=Vo,Bn.flattenDeep=function(e){return null!=e&&e.length?vr(e,u):[]},Bn.flattenDepth=function(t,n){return null!=t&&t.length?vr(t,n=n===e?1:fs(n)):[]},Bn.flip=function(e){return Ki(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,Ls(e))},Bn.functionsIn=function(e){return null==e?[]:xr(e,Rs(e))},Bn.groupBy=ba,Bn.initial=function(e){return null!=e&&e.length?ri(e,0,-1):[]},Bn.intersection=Zo,Bn.intersectionBy=Yo,Bn.intersectionWith=$o,Bn.invert=ks,Bn.invertBy=Es,Bn.invokeMap=_a,Bn.iteratee=il,Bn.keyBy=xa,Bn.keys=Ls,Bn.keysIn=Rs,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),Jr(function(t){return Gr(t,e)})},Bn.omit=Os,Bn.omitBy=function(e,t){return js(e,Oa(lo(t)))},Bn.once=function(e){return ka(2,e)},Bn.orderBy=function(t,n,r,i){return null==t?[]:(Wa(n)||(n=null==n?[]:[n]),Wa(r=i?e:r)||(r=null==r?[]:[r]),Wr(t,n,r))},Bn.over=ul,Bn.overArgs=Na,Bn.overEvery=cl,Bn.overSome=hl,Bn.partial=ja,Bn.partialRight=Ia,Bn.partition=Aa,Bn.pick=Ns,Bn.pickBy=js,Bn.property=dl,Bn.propertyOf=function(t){return function(n){return null==t?e:Sr(t,n)}},Bn.pull=Ko,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(t,n,r){return t&&t.length&&n&&n.length?qr(t,n,e,r):t},Bn.pullAt=Qo,Bn.range=pl,Bn.rangeRight=fl,Bn.rearg=za,Bn.reject=function(e,t){return(Wa(e)?Et: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(n,r){if("function"!=typeof n)throw new Ee(t);return Jr(n,r=r===e?r:fs(r))},Bn.reverse=ea,Bn.sampleSize=function(t,n,r){return n=(r?bo(t,n,r):n===e)?1:fs(n),(Wa(t)?Xn:Xr)(t,n)},Bn.set=function(e,t,n){return null==e?e:Qr(e,t,n)},Bn.setWith=function(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Qr(t,n,r,i)},Bn.shuffle=function(e){return(Wa(e)?Qn:ni)(e)},Bn.slice=function(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&bo(t,n,r)?(n=0,r=i):(n=null==n?0:fs(n),r=r===e?i:fs(r)),ri(t,n,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(t,n,r){return r&&"number"!=typeof r&&bo(t,n,r)&&(n=r=e),(r=r===e?d:r>>>0)?(t=ys(t))&&("string"==typeof n||null!=n&&!os(n))&&!(n=ui(n))&&on(t)?_i(dn(t),0,r):t.split(n,r):[]},Bn.spread=function(e,n){if("function"!=typeof e)throw new Ee(t);return n=null==n?0:yn(fs(n),0),Jr(function(t){var r=t[n],i=_i(t,0,n);return r&&Dt(i,r),At(e,this,i)})},Bn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Bn.take=function(t,n,r){return t&&t.length?ri(t,0,(n=r||n===e?1:fs(n))<0?0:n):[]},Bn.takeRight=function(t,n,r){var i=null==t?0:t.length;return i?ri(t,(n=i-(n=r||n===e?1:fs(n)))<0?0:n,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,n,r){var i=!0,o=!0;if("function"!=typeof e)throw new Ee(t);return es(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),La(e,n,{leading:i,maxWait:n,trailing:o})},Bn.thru=pa,Bn.toArray=ds,Bn.toPairs=Is,Bn.toPairsIn=zs,Bn.toPath=function(e){return Wa(e)?Rt(e,jo):ls(e)?[e]:Ei(No(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)&&Ka(o)?Un(qe(e)):{}}return(i?Mt: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(t,n){return n="function"==typeof n?n:e,t&&t.length?ci(t,e,n):[]},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(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:di(t,n,yi(r),i)},Bn.values=Bs,Bn.valuesIn=function(e){return null==e?[]:Kt(e,Rs(e))},Bn.without=aa,Bn.words=Ks,Bn.wrap=function(e,t){return ja(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=yl,Bn.attempt=Xs,Bn.camelCase=Us,Bn.capitalize=Hs,Bn.ceil=wl,Bn.clamp=function(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=ms(r))==r?r:0),n!==e&&(n=(n=ms(n))==n?n:0),sr(ms(t),n,r)},Bn.clone=function(e){return lr(e,4)},Bn.cloneDeep=function(e){return lr(e,5)},Bn.cloneDeepWith=function(t,n){return lr(t,5,n="function"==typeof n?n:e)},Bn.cloneWith=function(t,n){return lr(t,4,n="function"==typeof n?n:e)},Bn.conformsTo=function(e,t){return null==t||ur(e,t,Ls(t))},Bn.deburr=Gs,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=bl,Bn.endsWith=function(t,n,r){t=ys(t),n=ui(n);var i=t.length,o=r=r===e?i:sr(fs(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n},Bn.eq=Ba,Bn.escape=function(e){return(e=ys(e))&&Z.test(e)?e.replace(V,nn):e},Bn.escapeRegExp=function(e){return(e=ys(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Bn.every=function(t,n,r){var i=Wa(t)?kt:fr;return r&&bo(t,n,r)&&(n=e),i(t,lo(n,3))},Bn.find=ma,Bn.findIndex=Go,Bn.findKey=function(e,t){return It(e,lo(t,3),br)},Bn.findLast=va,Bn.findLastIndex=Wo,Bn.findLastKey=function(e,t){return It(e,lo(t,3),_r)},Bn.floor=_l,Bn.forEach=ya,Bn.forEachRight=wa,Bn.forIn=function(e,t){return null==e?e:yr(e,lo(t,3),Rs)},Bn.forInRight=function(e,t){return null==e?e:wr(e,lo(t,3),Rs)},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&&Bt(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)),Bt(e,t,i)},Bn.inRange=function(t,n,r){return n=ps(n),r===e?(r=n,n=0):r=ps(r),function(e,t,n){return e>=wn(t,n)&&e<yn(t,n)}(t=ms(t),n,r)},Bn.invoke=Ts,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)==m},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==_||t==M)return!e.size;if(Ao(e))return!Nr(e).length;for(var n in e)if(Oe.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Rr(e,t)},Bn.isEqualWith=function(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Rr(t,n,e,r):!!i},Bn.isError=Ja,Bn.isFinite=function(e){return"number"==typeof e&&Vt(e)},Bn.isFunction=Ka,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(t,n,r){return r="function"==typeof r?r:e,Dr(t,n,co(n),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<=c},Bn.isSet=as,Bn.isString=ss,Bn.isSymbol=ls,Bn.isTypedArray=us,Bn.isUndefined=function(t){return t===e},Bn.isWeakMap=function(e){return ts(e)&&go(e)==E},Bn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Pr(e)},Bn.join=function(e,t){return null==e?"":mn.call(e,t)},Bn.kebabCase=Ws,Bn.last=Jo,Bn.lastIndexOf=function(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=fs(r))<0?yn(i+o,0):wn(o,i-1)),n==n?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(t,n,o):zt(t,Ht,o,!0)},Bn.lowerCase=Vs,Bn.lowerFirst=qs,Bn.lt=cs,Bn.lte=hs,Bn.max=function(t){return t&&t.length?gr(t,rl,Mr):e},Bn.maxBy=function(t,n){return t&&t.length?gr(t,lo(n,2),Mr):e},Bn.mean=function(e){return Gt(e,rl)},Bn.meanBy=function(e,t){return Gt(e,lo(t,2))},Bn.min=function(t){return t&&t.length?gr(t,rl,Ir):e},Bn.minBy=function(t,n){return t&&t.length?gr(t,lo(n,2),Ir):e},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(t,n){return t&&t.length?Gr(t,fs(n)):e},Bn.noConflict=function(){return dt._===this&&(dt._=Be),this},Bn.noop=ll,Bn.now=Ma,Bn.pad=function(e,t,n){e=ys(e);var r=(t=fs(t))?hn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Wi(mt(i),n)+e+Wi(ft(i),n)},Bn.padEnd=function(e,t,n){e=ys(e);var r=(t=fs(t))?hn(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))?hn(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(ne,""),t||0)},Bn.random=function(t,n,r){if(r&&"boolean"!=typeof r&&bo(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=ps(t),n===e?(n=t,t=0):n=ps(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=xn();return wn(t+o*(n-t+lt("1e-"+((o+"").length-1))),n)}return Yr(t,n)},Bn.reduce=function(e,t,n){var r=Wa(e)?Ft:qt,i=arguments.length<3;return r(e,lo(t,4),n,i,dr)},Bn.reduceRight=function(e,t,n){var r=Wa(e)?Ot:qt,i=arguments.length<3;return r(e,lo(t,4),n,i,pr)},Bn.repeat=function(t,n,r){return n=(r?bo(t,n,r):n===e)?1:fs(n),$r(ys(t),n)},Bn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(t,n,r){var i=-1,o=(n=wi(n,t)).length;for(o||(o=1,t=e);++i<o;){var a=null==t?e:t[jo(n[i])];a===e&&(i=o,a=r),t=Ka(a)?a.call(t):a}return t},Bn.round=Sl,Bn.runInContext=re,Bn.sample=function(e){return(Wa(e)?Kn:Kr)(e)},Bn.size=function(e){if(null==e)return 0;if(qa(e))return ss(e)?hn(e):e.length;var t=go(e);return t==_||t==M?e.size:Nr(e).length},Bn.snakeCase=Zs,Bn.some=function(t,n,r){var i=Wa(t)?Nt:ii;return r&&bo(t,n,r)&&(n=e),i(t,lo(n,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&&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?Zt(e,rl):0},Bn.sumBy=function(e,t){return e&&e.length?Zt(e,lo(t,2)):0},Bn.template=function(t,n,r){var i=Bn.templateSettings;r&&bo(t,n,r)&&(n=e),t=ys(t),n=_s({},n,i,Xi);var o,a,s=_s({},n.imports,i.imports,Xi),l=Ls(s),u=Kt(s,l),c=0,h=n.interpolate||ye,d="__p += '",p=Ce((n.escape||ye).source+"|"+h.source+"|"+(h===J?ce:ye).source+"|"+(n.evaluate||ye).source+"|$","g"),f="//# sourceURL="+(Oe.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";t.replace(p,function(e,n,r,i,s,l){return r||(r=i),d+=t.slice(c,l).replace(we,rn),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+e.length,e}),d+="';\n";var g=Oe.call(n,"variable")&&n.variable;if(g){if(le.test(g))throw new Se("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(U,""):d).replace(H,"$1").replace(G,"$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(e,u)});if(m.source=d,Ja(m))throw m;return m},Bn.times=function(e,t){if((e=fs(e))<1||e>c)return[];var n=d,r=wn(e,d);t=lo(t),e-=d;for(var i=Yt(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,c):0===e?e:0},Bn.toString=ys,Bn.toUpper=function(e){return ys(e).toUpperCase()},Bn.trim=function(t,n,r){if((t=ys(t))&&(r||n===e))return $t(t);if(!t||!(n=ui(n)))return t;var i=dn(t),o=dn(n);return _i(i,Qt(i,o),en(i,o)+1).join("")},Bn.trimEnd=function(t,n,r){if((t=ys(t))&&(r||n===e))return t.slice(0,pn(t)+1);if(!t||!(n=ui(n)))return t;var i=dn(t);return _i(i,0,en(i,dn(n))+1).join("")},Bn.trimStart=function(t,n,r){if((t=ys(t))&&(r||n===e))return t.replace(ne,"");if(!t||!(n=ui(n)))return t;var i=dn(t);return _i(i,Qt(i,dn(n))).join("")},Bn.truncate=function(t,n){var r=30,i="...";if(es(n)){var o="separator"in n?n.separator:o;r="length"in n?fs(n.length):r,i="omission"in n?ui(n.omission):i}var a=(t=ys(t)).length;if(on(t)){var s=dn(t);a=s.length}if(r>=a)return t;var l=r-hn(i);if(l<1)return i;var u=s?_i(s,0,l).join(""):t.slice(0,l);if(o===e)return u+i;if(s&&(l+=u.length-l),os(o)){if(t.slice(l).search(o)){var c,h=u;for(o.global||(o=Ce(o.source,ys(he.exec(o))+"g")),o.lastIndex=0;c=o.exec(h);)var d=c.index;u=u.slice(0,d===e?l:d)}}else if(t.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))&&q.test(e)?e.replace(W,fn):e},Bn.uniqueId=function(e){var t=++Ne;return ys(e)+t},Bn.upperCase=$s,Bn.upperFirst=Js,Bn.each=ya,Bn.eachRight=wa,Bn.first=qo,sl(Bn,(vl={},br(Bn,function(e,t){Oe.call(Bn.prototype,t)||(vl[t]=e)}),vl),{chain:!1}),Bn.VERSION="4.17.21",Mt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Bn[e].placeholder=Bn}),Mt(["drop","take"],function(t,n){Wn.prototype[t]=function(r){r=r===e?1:yn(fs(r),0);var i=this.__filtered__&&!n?new Wn(this):this.clone();return i.__filtered__?i.__takeCount__=wn(r,i.__takeCount__):i.__views__.push({size:wn(r,d),type:t+(i.__dir__<0?"Right":"")}),i},Wn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Mt(["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}}),Mt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}}),Mt(["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=Jr(function(e,t){return"function"==typeof e?new Wn(this):this.map(function(n){return Tr(n,e,t)})}),Wn.prototype.reject=function(e){return this.filter(Oa(lo(e)))},Wn.prototype.slice=function(t,n){t=fs(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Wn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=fs(n))<0?r.dropRight(-n):r.take(n-t)),r)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(d)},br(Wn.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Bn[i?"take"+("last"==n?"Right":""):n],a=i||/^find/.test(n);o&&(Bn.prototype[n]=function(){var n=this.__wrapped__,s=i?[1]:arguments,l=n instanceof Wn,u=s[0],c=l||Wa(n),h=function(e){var t=o.apply(Bn,Dt([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){n=g?n:new Wn(this);var m=t.apply(n,s);return m.__actions__.push({func:pa,args:[h],thisArg:e}),new Gn(m,d)}return f&&g?t.apply(this,s):(m=this.thru(h),f?i?m.value()[0]:m.value():m)})}),Mt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Te[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(Ln,r)||(Ln[r]=[]),Ln[r].push({name:t,func:n})}}),Ln[Bi(e,2).name]=[{name:"wrapper",func:e}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Ei(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ei(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ei(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){for(var r=-1,i=n.length;++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__===e&&(this.__values__=ds(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}},Bn.prototype.plant=function(t){for(var n,r=this;r instanceof Hn;){var i=zo(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n},Bn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Wn){var n=t;return this.__actions__.length&&(n=new Wn(this)),(n=n.reverse()).__actions__.push({func:pa,args:[ea],thisArg:e}),new Gn(n,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,Qe&&(Bn.prototype[Qe]=function(){return this}),Bn}();ft?((ft.exports=gn)._=gn,pt._=gn):dt._=gn}.call(xe),function(e){e[e.TwoWay=2]="TwoWay",e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(Ou||(Ou={})),function(e){e.Transit="transit",e.Public="public"}(Nu||(Nu={})),function(e){e.MapObject="map-object",e.Coordinate="coordinate"}(ju||(ju={})),function(e){e.Edge="what.route_edge",e.Network="what.route_network",e.PortalNetwork="what.link",e.AirsideNetwork="what.route.network"}(Iu||(Iu={})),function(e){e.Vehicle="vehicle",e.Plane="plane",e.Pedestrian="pedestrian"}(zu||(zu={})),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=""}(Bu||(Bu={})),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"}(Uu||(Uu={})),function(e){e.Internal="Internal",e.External="External"}(Hu||(Hu={})),function(e){e.WithinTerminal="WithinTerminal",e.ToTerminal="ToTerminal",e.FromTerminal="FromTerminal",e.Airside="Airside"}(Gu||(Gu={}));var Vu=((Fu={})[Gu.WithinTerminal]=["gps","compass","motion"],Fu[Gu.Airside]=["gps","compass"],Fu[Gu.ToTerminal]=[],Fu[Gu.FromTerminal]=[],Fu);function qu(e,t){var n;return(null==t?void 0:t.requiredSensors)?t.requiredSensors:null!==(n=Vu[e])&&void 0!==n?n:[]}var Zu=6371008.8,Yu={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:Zu,metres:Zu,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function $u(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(!Ku(e[0])||!Ku(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 Ju(e){return e%360*Math.PI/180}function Ku(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Xu(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 Qu(e,t,n){void 0===n&&(n={});var r=Xu(e),i=Xu(t),o=Ju(i[1]-r[1]),a=Ju(i[0]-r[0]),s=Ju(r[1]),l=Ju(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=Yu[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 ec(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=ia(i[a],i[a-1])-180;return ca(i[a],s,l,n)}return $u(i[a])}o+=Qu(i[a],i[a+1],n)}return $u(i[i.length-1])}var tc="where.changi.airside",nc="meters",rc="Custom Location",ic="custom_location",oc="user_position";function ac(e,t){var n,r=null!=t?t:{},i=r.vehicleTemplateType,o=r.distanceThreshold,a=void 0===o?30:o,s=bc.getState().data;if(e.type===ju.MapObject){var l=e.mapObjectId;if(!l||!s.hasOwnProperty(Iu.Edge)||!s[Iu.Edge].edges.hasOwnProperty(l))return;return Wu.cloneDeep(s[Iu.Edge].edges[l])}if(e.type!==ju.Coordinate);else{var u=sc(e.whereDimension,!1,Iu.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:ta(_s(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!!pc(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=_s(d,h,{units:"meters"});bc.getState().updateNetworkWithIntersection(d,p.geometry.coordinates);var f=ye([h,p.geometry.coordinates],{center:[h[0],h[1]],dimension_what:"what.route_edge",dimension_where:"where.changi.airside",direction:Ou.TwoWay,mapObjectId:"",modified:1,myMapObjectId:"",title:rc,uniqueId:"",zone:Nu.Public});return{id:oc,where:e.whereDimension,what:null===(n=f.properties)||void 0===n?void 0:n.dimension_what,name:rc,coords:h,lines:[f],localRef:ic,zone:Nu.Public}}var g,m=function(){var e=Object.values(bc.getState().data[Iu.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:_s(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=ve(e.geometry.coordinates.at(-1)),i=1/0;return t.forEach(function(e){var t=_s(e,r,{units:"meters"}).properties.dist;t<i&&(i=t,n=e)}),i<=1?n:void 0}(e.feature,u);return!(!t||!pc(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=ea(e),n=t[0],r=ye(t,{center:[n[0],n[1]],dimension_what:"what.route_edge",dimension_where:"where.changi.airside",direction:Ou.TwoWay,mapObjectId:"",modified:1,myMapObjectId:"",title:rc,uniqueId:"",zone:Nu.Public}),i={id:oc,where:tc,what:Iu.Edge,name:rc,coords:n,lines:[r],localRef:ic,zone:Nu.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=ba();r.load(t);var i,o,a=Ll(ve(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=_s(t,e,{units:"meters"}),r=ta(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=_s(t,e,{units:"meters"}),r=ta(n.geometry.coordinates,e,{units:"meters"});r<u&&(u=r,i=n,o=t)}));return{nearestPoint:i,closestLine:o,minDistance:u}}(h,B(B([],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 sc(e,t,n,r){void 0===t&&(t=!0),void 0===r&&(r=!1);var i=bc.getState().data;if(!i.hasOwnProperty(Iu.Network))return[];for(var o=i[Iu.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 Wu.cloneDeep(a)}function lc(e,t,n,r){return void 0===t&&(t=!0),void 0===r&&(r=!1),sc(e,t,n,r)}function uc(e,t){return ac(e,t)}function cc(e){var t;return(t=bc.getState().data).hasOwnProperty("portal")?t.portal:{edgeData:{},lines:[]}}function hc(e){return function(e){var t=bc.getState().data;return e&&t.hasOwnProperty("what.service.immigration")&&t["what.service.immigration"].hasOwnProperty(e)?t["what.service.immigration"][e]:[]}(e)}function dc(e,t,n){void 0===n&&(n=!0);var r=function(n,r){var i=_s(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 ys(e,function(e,r){if(-1===n){var i=ve(e);ta(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 pc(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 fc(e){var t=e.split("."),n=t[t.length-1];return e.replace(".".concat(n),"")}var gc="where";function mc(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 vc(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 yc,wc,bc=Lu(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[Iu.Network]||[];if(0!==a.length){var s=!1,l=a.map(function(e){Wu.isEqual(e,n)&&(dc(ve(r),e,!1),s=!0);return e});s&&e({data:j(j({},o),(i={},i[Iu.Network]=l,i))})}}},upsertEdge:function(n){var r,i,o;if(n&&n.id){var a=t().data,s=j(j({},a),((r={})[Iu.Edge]=j(j({},a[Iu.Edge]),{edges:j(j({},(null===(o=a[Iu.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}}}),_c=Lu(function(e){return{data:{},setMapObjectsData:function(t){return e({data:t})}}}),xc=Lu(function(e){return{data:{},setRoute:function(t){return e({data:t})}}}),Sc=Lu(function(e){return{data:{},setRoute:function(t){return e({data:t})}}});function Ac(e){return e===yc.Routing?"generate-route-json-per-role":e===yc.MapObjects?"generate-map-objects-per-role":e===yc.MBTiles?"generate-vector-tiles":e===yc.Fonts?"generate-font-sprites":void 0}function Pc(e,t){return t.valueOf()+e}!function(e){e.Routing="routing",e.MapObjects="mapObjects",e.MBTiles="mbtiles",e.Fonts="fonts"}(yc||(yc={})),function(e){e.Ready="Ready",e.Awaiting="Awaiting",e.DownloadingResources="DownloadingResources",e.Unavailable="Unavailable"}(wc||(wc={}));var Mc=bc.setState,Cc=_c.setState,kc=xc.setState,Ec=Sc.setState;function Tc(e,t,n){var r,i;return I(this,void 0,void 0,function(){var o,a,s,l,u,c,h,d,p,f,g,m,v,y,w,b,_,x,S,A,P,M,C,E=this;return z(this,function(T){switch(T.label){case 0:o=e.publishedDataType,a=Pc("version",o),s=Pc("roleName",o),l=null==e?void 0:e.roleName,u=wc.Awaiting,c=function(e){return e===yc.Routing?Mc:e===yc.MapObjects?Cc:e===yc.MBTiles?kc:e===yc.Fonts?Ec:void 0}(o),h=e.secretKey,d="".concat(L.DocumentDirectoryPath,"/extracted/"),p=function(){return I(E,void 0,void 0,function(){var n;return z(this,function(r){return n=t.contains(a)?t.getString(a):"0.0.0",[2,new Promise(function(r,i){k({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(Pc("data",o));if(o===yc.MBTiles||o===yc.Fonts)p&&(i.data=p);else t.getString(Pc("encryptionTag",o))&&p&&(i.data=p)}if(l&&(i.roleName=l,h!==l))return n.hasOwnProperty("downloadUrl")&&(i.URL=n.downloadUrl),u=wc.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?wc.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(Pc("data",o),e),t.set(a,n),t.set(Pc("roleName",o),r),i&&t.set(Pc("encryptionTag",o),i),!0}catch(e){return console.log("error storing routing file from local storage",e),!1}},g=function(){return I(E,void 0,void 0,function(){var n,r,i,a;return z(this,function(s){switch(s.label){case 0:return n=t.getString(Pc("data",o)),o!==yc.MBTiles&&o!==yc.Fonts?[3,2]:[4,Lc(o,n,d,h)];case 1:return(r=s.sent())?(c({data:r}),u=wc.Ready,[2,!0]):[2,!1];case 2:return i=t.getString(Pc("encryptionTag",o)),n&&i?[4,tu(n,i,e.secretKey)]:[3,4];case 3:return a=s.sent(),c({data:a}),u=wc.Ready,[2,!0];case 4:return[2,!1];case 5:return[2]}})})},m=function(){return I(E,void 0,void 0,function(){return z(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,g()];case 1:return e.sent()||(console.log("metaAtlasSDK: failed to load data",o),u=wc.Unavailable),[3,3];case 2:return e.sent(),console.log("metaAtlasSDK: erro while loading data",o),u=wc.Unavailable,t.clearAll(),[3,3];case 3:return[2]}})})},T.label=1;case 1:return T.trys.push([1,26,,28]),[4,p()];case 2:if(v=T.sent(),u!==wc.DownloadingResources||!v.URL)return[3,15];console.log("metaAtlasSDK: downloading file from server",o),T.label=3;case 3:return T.trys.push([3,12,,14]),o!==yc.MBTiles&&o!==yc.Fonts?[3,7]:(y="".concat(L.DocumentDirectoryPath,"/").concat(o,".zip"),[4,L.downloadFile({fromUrl:v.URL,toFile:y,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 w=T.sent(),[4,L.mkdir(d)];case 5:if(T.sent(),200!==w.statusCode)throw n&&(null==n?void 0:n.onError)&&(null===(r=null==n?void 0:n.onError)||void 0===r||r.call(n,w.statusCode.toString())),new Error("Download failed with status ".concat(w.statusCode));return n&&(null==n?void 0:n.onSuccess)&&(null===(i=null==n?void 0:n.onSuccess)||void 0===i||i.call(n,y)),console.log("File downloaded to: ".concat(y)),L.stat(y).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)}),x=f(y,v.remoteVersion,l),[4,Lc(o,y,d,h)];case 6:if(!(P=T.sent()))throw new Error("No MBTiles file found in the archive");return x&&(console.log("Loaded file"),c({data:P}),u=wc.Ready),[3,11];case 7:return[4,fetch(v.URL)];case 8:if(!(w=T.sent()).ok)throw new Error("HTTP error! Status: ".concat(w.status));return[4,w.json()];case 9:return b=T.sent(),_=b.data,M=b.tag,[4,tu(_,M,e.secretKey)];case 10:C=T.sent(),(x=f(_,v.remoteVersion,l,M))&&(console.log("loaded file"),c({data:C}),u=wc.Ready),T.label=11;case 11:return[3,14];case 12:return S=T.sent(),console.error("Error fetching and decrypting data:",S),[4,m()];case 13:return T.sent(),[3,14];case 14:return[3,25];case 15:return o!==yc.MBTiles&&o!==yc.Fonts?[3,21]:(A=t.getString(Pc("data",o)),[4,L.exists(A)]);case 16:return T.sent()?console.log("File exists at: ".concat(A)):(console.log("File does not exist at: ".concat(A)),f("","","")),[4,Lc(o,A,d,h)];case 17:return P=T.sent(),A?(c({data:P}),u=wc.Ready,[3,20]):[3,18];case 18:return[4,m()];case 19:T.sent(),T.label=20;case 20:return[3,25];case 21:return M=t.getString("encryptionTag"),v.data&&M?(console.log("loaded local file"),[4,tu(v.data,M,e.secretKey)]):[3,23];case 22:return C=T.sent(),c({data:C}),u=wc.Ready,[3,25];case 23:return[4,m()];case 24:T.sent(),T.label=25;case 25:return[3,28];case 26:return T.sent(),[4,m()];case 27:return T.sent(),[3,28];case 28:return[2,u]}})})}function Lc(e,t,n,r){return I(this,void 0,void 0,function(){var i,o,a,s,l,u,c,h,d,p,f,g,m,v,y,w,b,_,x,S,A;return z(this,function(P){switch(P.label){case 0:return P.trys.push([0,30,,31]),i="",[4,L.exists(n)];case 1:return P.sent()?[3,3]:[4,L.mkdir(n)];case 2:return P.sent(),console.log("Directory created at: ".concat(n)),[3,4];case 3:console.log("Directory already exists at: ".concat(n)),P.label=4;case 4:return e!==yc.MBTiles?[3,24]:[4,D(t,n,r)];case 5:return P.sent(),[4,L.readDir(n)];case 6:o=P.sent(),a=o.filter(function(e){return e.name.endsWith(".mbtiles")}),s=0,l=a,P.label=7;case 7:return s<l.length?(u=l[s],[4,L.unlink(u.path)]):[3,10];case 8:P.sent(),P.label=9;case 9:return s++,[3,7];case 10:return[4,L.readDir(n)];case 11:return y=P.sent(),c=y.find(function(e){return e.name.endsWith(".zip")}),c?[4,R("".concat(n).concat(c.name),n)]:[3,15];case 12:return P.sent(),h="".concat(n).concat(c.name),[4,L.exists(h)];case 13:return P.sent()?[4,Dc(h)]:[3,15];case 14:P.sent(),P.label=15;case 15:return[4,L.readDir(n)];case 16:return d=P.sent(),p=d.find(function(e){return e.name.endsWith(".mbtiles")}),p?(f="geojson_".concat(performance.now().toFixed(0),".mbtiles"),g="".concat(n).concat(f),[4,L.moveFile(p.path,g)]):[3,22];case 17:return P.sent(),[4,L.exists(p.path)];case 18:return P.sent()?[4,L.unlink(p.path)]:[3,20];case 19:P.sent(),P.label=20;case 20:return[4,L.readDir(n)];case 21:return m=P.sent(),console.log("All files in unzip destination:",m),i=g,[3,23];case 22:throw new Error("MBTiles file not found.");case 23:return[3,29];case 24:return e!==yc.Fonts?[3,28]:[4,R(t,n)];case 25:return v=P.sent(),[4,L.readDir(v)];case 26:return y=P.sent(),w=y.map(function(e){return e.name}),[4,L.readDir("".concat(v,"sprites"))];case 27:if(b=P.sent(),_=b.map(function(e){return e.name}),console.log("Sprites Files:",_),x=w.includes("fonts"),S=w.includes("sprites"),!x||!S)throw new Error("Missing required directories: fonts or sprites.");return i=v,[3,29];case 28:throw new Error("Unsupported data type.");case 29:return[2,i];case 30:throw A=P.sent(),console.error("Error extracting offline file path:",A),A;case 31:return[2]}})})}var Rc,Dc=function(e){return I(void 0,void 0,void 0,function(){var t;return z(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,L.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 Fc(e){if(e&&"object"===te(e)&&!Array.isArray(e))return e}function Oc(e,t){var n=Fc(e),r=Fc(t);if(n||r)return j(j({},null!=n?n:{}),null!=r?r:{})}function Nc(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=Fc(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=Fc(o[i]),s=Fc(null==a?void 0:a.properties);if(s&&(r||(r=j({},s)),s.booth_info||s.metadata))return j({},s)}return r?j({},r):void 0}}(e.property_geojson),m=Fc(e.properties),v=function(e){var t,n,r,i,o,a,s,l,u=Fc(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 j(j(j(j(j(j(j({},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=j(j(j({},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=Oc(function(e){if(null!=e){if("object"===te(e)&&!Array.isArray(e))return e;if("string"==typeof e&&e.trim())try{return Fc(JSON.parse(e))}catch(e){return}}}(e.metaData),Oc(e.metadata,Oc(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"}(Rc||(Rc={}));var jc=function(){function e(){this.searchableGeoJsonFeatures=[],this.token="",this.empApi="",this.HOST="",this.atomsAPIAccessToken="",this.apiRequestLimit=5e3,this.secretKeyForDecryption="",this.routingStatus=wc.Awaiting,this.searchStatus=wc.Awaiting,this.offlineMapStatus=wc.Awaiting,this.storage=new Ul,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 Ml().getDefaultFocusedTaxonomy()},set:function(e){Ml().setDefaultFocusedTaxonomy(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentFocus",{get:function(){return Ml().getCurrentFocus()},set:function(e){Ml().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};k(r).then(function(n){return I(t,void 0,void 0,function(){var t;return z(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 I(this,void 0,void 0,function(){var e,t,n,r;return z(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e="".concat(this.empApi,"/role-based-camera-properties"),[4,k.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?(Ds(t.data),(n=Is()).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"),Ds({})),[3,3];case 2:return r=i.sent(),console.error("[focus-core] Failed to load focus tree from ATOMS API",r),Ds({}),[3,3];case 3:return[2]}})})},e.prototype.hasPublishedDataVersion=function(e){return function(e,t){var n=Pc("version",e);return null!=t.getString(n)}(e,this.storage)},e.prototype.setupOfflineMaps=function(e,t){return I(this,void 0,void 0,function(){var n,r,i,o;return z(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,Tc({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:yc.MBTiles,roleName:this.tileserverRoleName},this.storage,t)];case 1:return n=a.sent(),[4,Tc({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:yc.Fonts,roleName:this.tileserverRoleName},this.storage,t)];case 2:return r=a.sent(),console.log("Offline Map & fonts status:",n,r),i=n===wc.Ready&&r===wc.Ready,this.offlineMapStatus=i?wc.Ready:wc.Unavailable,this.emitReadinessChange(),e&&e(this.offlineMapStatus===wc.Ready),[2,i];case 3:return o=a.sent(),console.error("Error setting up offline maps:",o),this.offlineMapStatus=wc.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 I(this,void 0,void 0,function(){var t;return z(this,function(n){switch(n.label){case 0:return[4,Tc({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:yc.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===wc.Ready),[2]}})})},e.prototype.getRoutingStatus=function(){return this.routingStatus},e.prototype.getReadiness=function(){var e=[];return this.routingStatus!==wc.Ready&&e.push(yc.Routing),this.searchStatus!==wc.Ready&&e.push(yc.MapObjects),this.offlineMapStatus!==wc.Ready&&e.push(yc.MBTiles),ml(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=Oc(e.metadata,t.metadata);return j(j(j(j({},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=me(e.geometry);if("LineString"===t.geometry.type||"MultiLineString"===t.geometry.type&&1==t.geometry.coordinates.length){var n=xs(t=ye(e.geometry.coordinates));return Bl(t,n/2,n).geometry.coordinates[0]}return Dl(t).geometry.coordinates},e.prototype.getFocusTree=function(){return Fs()},e.prototype.getWhatTaxonomies=function(){if(this.searchStatus===wc.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 Ml().getCurrentFocus()},e.prototype.getCurrentFocusBuilding=function(){return Ml().getCurrentFocusBuilding()},e.prototype.getCurrentFocusFloor=function(){return Ml().getCurrentFocusFloor()},e.prototype.getUserViewportBuilding=function(e){return Ml().getUserViewportBuilding(e)},e.prototype.checkUserViewport=function(e,t,n){return Ml().checkUserViewport(e,t,n)},e.prototype.getFlyToLocation=function(e,t){return void 0===t&&(t=!0),Ml().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===Rc.Name?e.sort(function(e,t){return r(e.name,t.name)}):t===Rc.WhereDimension?e.sort(function(e,t){var n=r(e.whereDimension,t.whereDimension);return 0===n?r(e.name,t.name):n}):t===Rc.Relevance?this.relevanceSort(e,n):t===Rc.RelevanceStrict?this.relevanceSort(e,n,!0):void 0},e.prototype.setupMapObjectSearch=function(e){return I(this,void 0,void 0,function(){var t,n,r,i,o,a,s;return z(this,function(l){switch(l.label){case 0:return[4,Tc({URL:this.empApi,accessToken:this.atomsAPIAccessToken,secretKey:this.secretKeyForDecryption,publishedDataType:yc.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=_c.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:Nc(o)},this.searchableGeoJsonFeatures.push(s));return e&&e(t===wc.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),k({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 I(r,void 0,void 0,function(){var t;return z(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}(),Ic=function(){function e(e){void 0===e&&(e={});var t,n,r,i,o=this;this.onCompassSensorUpdate=function(e){o.handleCompassUpdate(e)},this.cameraDirector=_l(),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:cl(),this.compass=null!==(n=e.compass)&&void 0!==n?n:hl(),this.motion=null!==(r=e.motion)&&void 0!==r?r:dl(),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:cl(),compass:hl(),motion:dl()}),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=_l()},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"),ml(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 I(this,void 0,void 0,function(){var i,o,a;return z(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={}),I(this,void 0,void 0,function(){var o,a,s,l,u,c=this;return z(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(j(j({},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 I(this,void 0,void 0,function(){var i,o,a,s,l,u,c,h,d=this;return z(this,function(p){switch(p.label){case 0:if(!this.sensorsAttached)throw new vl(["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 I(this,void 0,void 0,function(){return z(this,function(e){return[2,this.gps.requestGPSPermission()]})})},e.prototype.isGPSPermissionGranted=function(){return I(this,void 0,void 0,function(){return z(this,function(e){return[2,this.gps.isGPSPermissionGranted()]})})},e.prototype.focusToGPS=function(e){var t,n,r;return void 0===e&&(e={}),I(this,void 0,void 0,function(){var i,o,a,s,l,u,c,h;return z(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 I(this,void 0,void 0,function(){var t;return z(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&&zc(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||zc(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||zc(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(j(j({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"!==te(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 zc(e,t){var n=Math.abs(e-t)%360;return n>180?360-n:n}function Bc(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"!==te(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 Uc(e,t,n){if(!n.length)return null;for(var r=ve(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(ll(r,a.geometry))return a}catch(e){continue}}return null}var Hc=function(e,t){for(var n=t-e;n>180;)n-=360;for(;n<-180;)n+=360;return n},Gc=function(e){for(var t=e;t<0;)t+=360;for(;t>=360;)t-=360;return t};function Wc(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]+ta(r,i,{units:"meters"}))}return t}(e),s=e.length,l=[],u=1;u<s-1;u+=1){var c=ia(e[u-1],e[u]),h=ia(e[u],e[u+1]);Math.abs(Hc(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],_=ia(y,w);d.push({type:"straight",lengthM:b,bearingDeg:Gc(_),startAlongM:a[p],endAlongM:a[v]});c=ia(e[m-1],e[m]),h=ia(e[m],e[m+1]);var x=Hc(c,h);d.push({type:"turn",atAlongM:a[m],entryBearingDeg:Gc(c),exitBearingDeg:Gc(h),turnAngleDeg:x}),p=m}}if(p<s-1){y=e[p],w=e[s-1],b=a[s-1]-a[p],_=ia(y,w);d.push({type:"straight",bearingDeg:Gc(_),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 Vc(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 qc(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 Zc=new Map;function Yc(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=Zc.get(o);return a||(a=Wc(t,n),Zc.set(o,a)),a}function $c(e){return e.length<2?0:xs(ye(e),{units:"meters"})}function Jc(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 Kc(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!==Uu.RouteOverview&&d.maneuverType!==Uu.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=ye(u,{});return xs(v,{units:"meters"})<=0?null:{line:v}}var Xc=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=B([],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=xs(c,{units:"meters"}),d=_s(c,ve(e),{units:"meters"}),p=null!==(r=d.properties.dist)&&void 0!==r?r:1/0;this.lightSmoothRaw=B([],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=ec(c,v,{units:"meters"}).geometry.coordinates,b=ia(w,ec(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=Jc(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=xs(f,{units:"meters"}),m=_s(f,ve(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=B([],e,!0);var y=null!==(i=_s(f,ve(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=ta(this.lastRawFix.coords,e,{units:"meters"}),A=Math.max(0,n-this.lastRawFix.t);S<.85&&A<8e3&&(x=!0)}this.lastRawFix={coords:e,t:n};var P=null;if(w){var M=m.properties.location,C=void 0;if(x)C=this.lastAlongM;else{var k=Math.max(this.lastAlongM-3,M);C=Math.min(k,g),this.lastAlongM=C}var E=Math.max(0,Math.min(C,g)),T=ec(f,E,{units:"meters"}).geometry.coordinates,L=ia(T,ec(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=Jc(this.lastDisplayHeadingDeg,L,.22+.12*(1-o)),P=this.lastDisplayHeadingDeg;var R=1+.2*(1-o);if(_=this.lastDisplay?[this.lastDisplay[0]*(1-R)+T[0]*R,this.lastDisplay[1]*(1-R)+T[1]*R]:T,this.transitionBlend>0&&this.lastDisplay&&!this.snapped){var D=.35;_=[_[0]*(1-D)+this.lastDisplay[0]*D,_[1]*(1-D)+this.lastDisplay[1]*D],this.transitionBlend=Math.max(0,this.transitionBlend-.25)}}else if(this.lastDisplayHeadingDeg=null,_=this.smoothUnsnapped(e,t),P=null,this.transitionBlend>0&&this.lastDisplay&&this.snapped){D=.35;_=[_[0]*(1-D)+this.lastDisplay[0]*D,_[1]*(1-D)+this.lastDisplay[1]*D],this.transitionBlend=Math.max(0,this.transitionBlend-.25)}this.snapped=w,this.lastDisplay=_;var F=Math.max(t,5);return this.lastDebugSnapshot={hasTrackingLine:!0,trackingLineLengthM:g,snapped:this.snapped,reportedAccuracyM:t,accuracyForScalingM:F,enterThresholdM:s,exitThresholdM:l,rawDistanceToRouteM:v,smoothedDistanceForEnterM:y,lastAlongRouteM:this.lastAlongM,standstill:x,confidence:o,routeHeadingDeg:P},{displayCoords:_,snapped:this.snapped,rawDistanceToRouteM:v,displayHeadingDeg:P,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=ta(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}(),Qc=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=qc(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=Vc(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=Jc(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=qc(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}(),eh=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 Xc,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 Qc,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=B([],r.deadZones,!0)),this.unsubscribeFocus=Ml().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 gl},e.prototype.focusedWhere=function(){return Ml().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?B([],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 I(this,void 0,void 0,function(){var e=this;return z(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 I(this,void 0,void 0,function(){var t,n;return z(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=Bc,[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=ta(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=$c(p);if(!(f>0))return!1;var g=_s(d,ve(c),{units:"meters"}),m=Math.max(0,Math.min(f,g.properties.location)),v=Yc(h,p),y=Vc(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=ec(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=$c(l);if(!(u>0))return this.leavePdrMode(),!1;var c=_s(s,ve(e),{units:"meters"}),h=Math.max(0,Math.min(u,c.properties.location)),d=Yc(a,l),p=Vc(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=ec(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)?ec(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+=ta(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=B([],a,!0),this.lerpedCoords=B([],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=ec(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+=ta(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!==Uu.RouteOverview&&s.maneuverType!==Uu.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=ia(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=Kc(n,{whereDimension:this.focusedWhere(),forwardFloor:r,requireWhereDimensionMatch:!0}),a=o?xs(o.line,{units:"meters"}):0;return(!o||a<=0)&&(a=(o=Kc(n,{whereDimension:this.focusedWhere(),forwardFloor:r,requireWhereDimensionMatch:!1}))?xs(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!==Uu.RouteOverview&&r.maneuverType!==Uu.SectionOverview)return n}return null},e.prototype.isPortalRouteSegment=function(e){if(e.isPortal)return!0;var t=e.maneuverType;return t===Uu.EnterPortal||t===Uu.TravelPortal||t===Uu.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!==Uu.RouteOverview&&e.maneuverType!==Uu.SectionOverview&&d&&"LineString"===d.geometry.type&&(!r||e.whereDimension===i.focusedWhere())){var p=_s(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=ve(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 j(i?j(j({},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!==Uu.RouteOverview&&u.maneuverType!==Uu.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=Uc(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!==Uu.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):ye(i,{dimension_where:t,isNode:!1,featureBelongsToLineString:!0,isNonHighlightedOverview:"0"})},e.prototype.generateRouteArcFromPath=function(e){if("LineString"===e.geometry.type){var t=e,n=xs(t,{units:"meters"});this.routeArc=[];for(var r=0;r<=this.routeSteps;r++){var i=ec(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=xs(i,{units:"meters"}),a=_s(i,ve(n),{units:"meters"}).properties.location;this.routeArc=[];for(var s=0;s<=this.routeSteps;s++){var l=ec(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 I(this,void 0,void 0,function(){var a,s,l,u;return z(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=B([],u,!0),this.lastNavAccuracy=null!==(r=l.accuracy)&&void 0!==r?r:10,this.targetNavHeadingDeg=null,this.visualNavHeadingDeg=null,this.lerpedCoords=B([],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=Uc(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=Uc(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=ta(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=ia(ec(t,i,{units:"meters"}).geometry.coordinates,ec(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:_s(e,ve(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=_s(t,ve(r),{units:"meters"});this.targetAlongMOnTrackingLine=c.properties.location,this.targetAlongMCacheKey=i}if(this.visualAlongMCacheKey!==i||null===this.visualAlongMOnTrackingLine){var h=_s(t,ve(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=ec(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?xs(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?xs(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=Jc(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(),E=this.routeVisualProgressMinMs(l),T=this.routeVisualSliceMinDeltaM(),L=null,R=!1,D=!1;if(this.navigationSnapped){var F=k-this.lastRouteProgressVisualMs>=E,O=(null===this.lastAppliedVisualNavCoords?1/0:e.approxMetersBetween(this.lastAppliedVisualNavCoords,this.visualNavCoords))>=T;F&&O&&(L=this.computeRouteSliceGateSnapshot(this.visualNavCoords,T)),D=R=F&&O&&!!L}else{O=(null===this.lastRouteSliceVisualNavCoords?1/0:e.approxMetersBetween(this.lastRouteSliceVisualNavCoords,this.visualNavCoords))>=T;(F=k-this.lastRouteProgressVisualMs>=E)&&O&&(L=this.computeRouteSliceGateSnapshot(this.visualNavCoords,T)),R=F&&O&&!!L;var N=l?e.ROUTE_PROGRESS_VISUAL_MIN_INTERVAL_MS_ANCHOR_BLEND:e.ROUTE_PROGRESS_VISUAL_MIN_INTERVAL_MS,j=e.NAV_VISUAL_APPLY_MIN_DELTA_M,I=null===this.lastAppliedVisualNavCoords?1/0:e.approxMetersBetween(this.lastAppliedVisualNavCoords,this.visualNavCoords),z=k-this.lastBlueDotProgressVisualMs>=N,B=I>=j;D=R||null===this.lastAppliedVisualNavCoords||z&&B}if(R&&L&&(this.lastRouteProgressVisualMs=k,this.lastRouteSliceVisualNavCoords=[this.visualNavCoords[0],this.visualNavCoords[1]],this.updateRouteProgress(this.visualNavCoords,L)),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=ve([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=_s(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=_s(x,ve(A),{units:"meters"}).properties.location,M=xs(x,{units:"meters"}),C=Math.max(0,M-P),k=this.lastRouteSliceVisualNavCoords,E=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||E>=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=B([h],Bl(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]=j(j({},w),{geometry:j(j({},w.geometry),{coordinates:m})})}var b=j(j({},u),{features:y}),_=a.segments.slice();_[s]=b;var x=j(j({},a),{segments:_});this.routingManager.setActiveRoute(x),this.routingManager.highlightRouteSegment(s,!0,!0,!1,!1),this.lastAppliedRouteSliceSegmentIndex=s,this.lastAppliedRouteSliceAlongM=d}try{for(var S=0,A=0,P=s;P<a.segments.length;P+=1)S+=a.segments[P].distance||0,A+=a.segments[P].time||0;var M=u.distance||0,C=u.time||0;if(p>0&&M>0){var k=Math.max(0,Math.min(1,f/p));S-=M,A-=C,S+=M*k,A+=C*k}this.lastKnownRemainingDistanceM=S,this.maybeEnterArrivalLockAndFrame([t[0],t[1]],S,a),this.uiHandlers.onProgressUpdate&&this.uiHandlers.onProgressUpdate({remainingTime:A,remainingDistance:S,segmentRemainingDistance:f})}catch(e){}if(this.uiHandlers.onBearingUpdate&&m&&m.length>=2){var E=ia(m[0],m[1]);this.uiHandlers.onBearingUpdate(E)}this.maybeAdvanceLastEmittedSegmentIndex(s);var T=-1===s||l>this.OFF_ROUTE_THRESHOLD_METERS,L=null!=this.lastKnownRemainingDistanceM&&this.lastKnownRemainingDistanceM<e.SUPPRESS_REROUTE_BELOW_REMAINING_M;if(T&&!L&&!this.arrivalLockActive&&!this.startAnchorLockActive&&!this.qualityBlendRerouteSuppressed){var R=Date.now();R-this.lastRerouteTime>=this.REROUTE_COOLDOWN_MS&&(this.lastRerouteTime=R,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 th(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===th(a.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function nh(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return rh(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 rh(e)}),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return oh(e);default:throw new Error("unknown GeoJSON type")}}function rh(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=ih(e.properties),t.geometry=oh(e.geometry),t}function ih(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]=ih(r):t[n]=r}),t):t}function oh(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map(function(e){return oh(e)}),t):(t.coordinates=ah(e.coordinates),t)}function ah(e){var t=e;return"object"!=typeof t[0]?t.slice():t.map(function(e){return ah(e)})}var sh=6371008.8,lh={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:sh,metres:sh,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:3440.069546436285,radians:1,yards:6967335.223679999};function uh(e){return e%360*Math.PI/180}function ch(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=lh[t];if(!n)throw new Error(t+" units is invalid");return e*n}(function(e,t){void 0===t&&(t="kilometers");var n=lh[t];if(!n)throw new Error(t+" units is invalid");return e/n}(e,t),n)}function hh(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function dh(e,t,n,r){void 0===r&&(r={});var i=t<0,o=ch(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?sh:Number(r);var i=t/r,o=e[0]*Math.PI/180,a=uh(e[1]),s=uh(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(!hh(e[0])||!hh(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 ph(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=nh(e)),th(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")}(dh(e,t,n,{units:o}));e[0]=r[0],e[1]=r[1],a&&3===e.length&&(e[2]+=a)}),e}function fh(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 gh(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(fh(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(fh({type:a,coordinates:u},r),n,l))return!1}})}function mh(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 vh(e){return"Feature"===e.type?e.geometry:e}function yh(e,t){void 0===t&&(t={});var n=vh(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=vh(e),r=n.coordinates,i=t.properties?t.properties:"Feature"===e.type?e.properties:{};return wh(r,i)}(n,t);case"MultiPolygon":return function(e,t){void 0===t&&(t={});var n=vh(e),r=n.coordinates,i=t.properties?t.properties:"Feature"===e.type?e.properties:{},o=[];return r.forEach(function(e){o.push(wh(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 wh(e,t){return e.length>1?function(e,t,n){return void 0===n&&(n={}),mh({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 mh({type:"LineString",coordinates:e},t,n)}(e[0],t)}function bh(e,t){var n=!0;return gh(e,function(e){gh(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!_h(t,e);case"Polygon":return!ll(e,t)}break;case"LineString":switch(t.type){case"Point":return!_h(e,t);case"LineString":return!function(e,t){if(ms(e,t).features.length>0)return!0;return!1}(e,t);case"Polygon":return!xh(t,e)}break;case"Polygon":switch(t.type){case"Point":return!ll(t,e);case"LineString":return!xh(e,t);case"Polygon":return!function(e,t){for(var n=0,r=e.coordinates[0];n<r.length;n++){if(ll(r[n],t))return!0}for(var i=0,o=t.coordinates[0];i<o.length;i++){if(ll(o[i],e))return!0}var a=ms(yh(e),yh(t));if(a.features.length>0)return!0;return!1}(t,e)}}var n,r;return!1}(e.geometry,t.geometry)})}),n}function _h(e,t){for(var n=0;n<e.coordinates.length-1;n++)if(Sh(e.coordinates[n],e.coordinates[n+1],t.coordinates))return!0;return!1}function xh(e,t){for(var n=0,r=t.coordinates;n<r.length;n++){if(ll(r[n],e))return!0}return ms(t,yh(e)).features.length>0}function Sh(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,Ph={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 Mh(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 Ch(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(!Th(e[0])||!Th(e[1]))throw new Error("coordinates must contain numbers");return Mh({type:"Point",coordinates:e},t,n)}function kh(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 Mh({type:"LineString",coordinates:e},t,n)}function Eh(e){return e%360*Math.PI/180}function Th(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function Lh(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 Rh(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 Dh(e,t,n){void 0===n&&(n={});var r=Lh(e),i=Lh(t),o=Eh(i[1]-r[1]),a=Eh(i[0]-r[0]),s=Eh(r[1]),l=Eh(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=Ph[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 Fh(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(Mh(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(Mh({type:a,coordinates:u},r),n,l))return!1}})}function Oh(e,t,n){void 0===n&&(n={});var r=Ch([1/0,1/0],{dist:1/0}),i=0;return Fh(e,function(e){for(var o=Rh(e),a=0;a<o.length-1;a++){var s=Ch(o[a]);s.properties.dist=Dh(t,s,n);var l=Ch(o[a+1]);l.properties.dist=Dh(t,l,n);var u=Dh(s,l,n),c=Math.max(s.properties.dist,l.properties.dist),h=ia(s,l),d=ca(t,c,h+90,n),p=ca(t,c,h-90,n),f=ms(kh([d.geometry.coordinates,p.geometry.coordinates]),kh([s.geometry.coordinates,l.geometry.coordinates])),g=null;f.features.length>0&&((g=f.features[0]).properties.dist=Dh(t,g,n),g.properties.location=i+Dh(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 Nh(e,t,n){var r,i=Rh(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=Oh(n,e),s=Oh(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),kh(l,n.properties)}function jh(e,t){if(!new.target)return new jh(e,t);if(Array.isArray(e)||(t=e,e=[]),t=t||{},this.data=e||[],this.length=this.data.length,this.compare=t.compare||zh,this.setNodeId=t.setNodeId||Ih,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 Ih(){}function zh(e,t){return e-t}function Bh(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}jh.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 Uh=[];"function"==typeof Object.freeze&&Object.freeze(Uh);const Hh={heuristic:function(){return 0},distance:function(){return 1},blocked:function(){return!1},compareFScore:function(e,t){return e.fScore-t.fScore},NO_PATH:Uh,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 Gh=Hh.NO_PATH;function Wh(e,t){var n=(t=t||{}).oriented,r=t.blocked;r||(r=Hh.blocked);var i=t.heuristic;i||(i=Hh.heuristic);var o=t.distance;o||(o=Hh.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 Bh(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 jh({compare:Hh.compareFScore,setNodeId:Hh.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(Vh(c=d.pop(),u))return qh(c);c.closed=!0,e.forEachLinkedNode(c.node.id,f,n)}return Gh;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 Vh(e,t){return e.node===t}function qh(e){for(var t=[e.node],n=e.parent;n;)t.push(n.node),n=n.parent;return t}function Zh(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 Yh(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=Xh(e,t),o=i.hasOwnProperty(r);if(o||_(e,t)){o||(i[r]=0);var a="@"+ ++i[r];r=Xh(e+a,t+a)}return new Kh(e,t,n,r)}:function(e,t,n){var i=Xh(e,t),o=r.get(i);if(o)return o.data=n,o;return new Kh(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),Jh(i,s),e!==t&&Jh(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 Zh(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 $h(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(Xh(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 $h(e,t){this.id=e,this.links=null,this.data=t}function Jh(e,t){e.links?e.links.add(t):e.links=new Set([t])}function Kh(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function Xh(e,t){return e.toString()+"👉 "+t.toString()}Wh.l2=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)},Wh.l1=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.abs(n)+Math.abs(r)};var Qh,ed,td=function(){var e,t,n="custom_",r=Nu.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=j(j({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 ta(ve(e),ve(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=ea(u),g=0;g<f.length-1;g+=1){var m=c(e,f[g],"vertex",i.where,Iu.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,Iu.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!==Ou.Forward&&u.properties.direction!==Ou.TwoWay||h(e,m,v,w),u.properties.direction!==Ou.Backward&&u.properties.direction!==Ou.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 _(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===Iu.Network){h=d;break}var p=-1;for(d=0;d<n.length;d+=1)n[d].data.what===Iu.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(hd(P.data.what)&&hd(A.data.what)){P.data.zone!==A.data.zone&&console.warn("A portal is triggering a change in zone");var k=void 0;if(ud(P.data.what)){var E=function(e,t,n,r){void 0===r&&(r=!1);var i=n.data.mapObjectId,o=vc(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 ye(ta(c,u.geometry.coordinates[0])<ta(h,u.geometry.coordinates[0])?u.geometry.coordinates:u.geometry.coordinates.slice().reverse())}}return null};(k=E(u.edgeData,A,P,!1))||(k=E(u.edgeData,P,A,!0))}var T=(D=r.getLink(P.id,A.id))&&D.data.cost?D.data.cost:void 0,L=D&&D.data.description?D.data.description:void 0;C={geojson:we([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:T,description:L},c.push(C),_=A.data}else{var R=S+1<n.length?n[S+1]:void 0;A.data.zoneUnionVertex&&P&&R&&(null==P?void 0:P.data.zone)===(null==R?void 0:R.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(hd(P.data.what)&&hd(A.data.what))M.geometry.coordinates.length<2&&x.pop(),x.push(m(A));else{var D;T=(D=r.getLink(P.id,A.id))&&D.data.cost?D.data.cost:void 0;l&&p>=0&&S>p&&A.data.what!==Iu.Network||(M.geometry.coordinates.push(A.data.coords),M.properties.cost+=T)}if(A.data.zoneUnionVertex&&!s){var F=S>0?n[S-1]:void 0;R=S+1<n.length?n[S+1]:void 0;if(F&&R&&(null==F?void 0:F.data.zone)===(null==R?void 0:R.data.zone))console.log("ignore zoneUnionVertex");else if(R){var O=Wu.cloneDeep(A);O.data.zone=R.data.zone,x.push(m(O))}else x.push(m(A))}}if(l&&null===s){var N=x[x.length-1];if(N.geometry.coordinates.length>1){var j=c[c.length-1];if(!j||j.geojson!==N){var I=n[p>=0?p:n.length-1];c.push({geojson:N,edges:[_.mapObjectId,I.data.mapObjectId],startFloor:_.where,endFloor:I.data.where,isPortal:!1,portalPath:void 0,cost:N.properties.cost,description:null})}}}return{startNode:i,endNode:o,routes:c,distance:0}}function x(t,i,l,u){var m=Yh(),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=Wu.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!==Ou.Forward&&s!==Ou.TwoWay||h(e,c,d,{wheelChairAccesible:l,cost:a,description:u,isPortal:!0}),s!==Ou.Backward&&s!==Ou.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=ea(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!==Ou.Forward&&l.properties.direction!==Ou.TwoWay||h(e,b,_,S),l.properties.direction!==Ou.Backward&&l.properties.direction!==Ou.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=Wh(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=fc(i.data.where),d=fc(e.where),f=fc(u.data.where);if(h!==d&&f!==d)return!0}if(a&&c.data.dimension_what&&c.data.dimension_what.includes(Iu.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 _(t,i,w,m)}catch(e){throw e}}return{}}function S(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=lc(gc,!0,Iu.Network,!1),l=vc(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),x(e,t,l.edgeData,c)}function A(e,t,n){var r=performance.now();if(n){console.log("getDirectRoute() called for Airside Roadways Routing"),e.lines.concat(t.lines);var i=lc("where.changi.airside",!1,Iu.AirsideNetwork,!0);return console.log("Network Features:",i),console.log("time network: ",(performance.now()-r)/1e3),x(e,t,{},i)}console.log("getDirectRoute() called for In-Airport Routing");var o=lc(fc(e.where),!0,Iu.Network,!1),a=lc(fc(t.where),!0,Iu.Network,!1),s=mc(u.edgeData,fc(e.where)),l=mc(u.edgeData,fc(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),x(e,t,j(j({},s.edgeData),l.edgeData),c)}return{getRoute:function(n,r,c){var h=function(e){var t;return e.mode===Gu.WithinTerminal&&null!==(t=e.config.wheelChairAccessible)&&void 0!==t&&t}(c),d=function(e){return e.mode===Gu.Airside?e.config.vehicleType:null}(c),p=function(e){if(e.mode===Gu.Airside)return e.config.distanceThreshold}(c);if(i=h,s=d,a=function(e){return e.mode===Gu.Airside}(c),l=function(e){return Boolean(e.config.forRealtime)}(c),n.type===ju.MapObject&&r.type===ju.MapObject&&n.mapObjectId===r.mapObjectId)return console.warn("Start and end locations are the same for mode ".concat(c.mode)),{};if(n.type===ju.Coordinate&&r.type===ju.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=uc(n,{distanceThreshold:p,vehicleTemplateType:s}),m=uc(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[Gu.WithinTerminal,Gu.ToTerminal,Gu.FromTerminal].includes(e.mode)}(c)&&(u=cc(),console.log("time portal load with extrapolation: ",(performance.now()-v)/1e3)),v=performance.now(),e&&t){var y=function(){var n=A(e,t,d);if(console.log("Direct route",n),Wu.isEmpty(n)){var r=function(e,t){var n=performance.now(),r=lc(gc,!0,Iu.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),x(e,t,u.edgeData,i)}(e,t);return S(e,t,r)}return S(e,t,n)},w=void 0;if(c.mode===Gu.Airside){o=!1;var b=A(e,t,d);return console.log("Airside direct route",b),b}return o=function(e){return e.mode===Gu.WithinTerminal}(c),w=y(),Wu.isEmpty(w)&&(o=!1,w=y()),console.log("time total: ",(performance.now()-v)/1e3),w}return{}}}}(),nd={getRoute:td.getRoute};function rd(e){var t,n,r,i,o,a,s,l,u,c,h,d=uc({type:ju.MapObject,mapObjectId:e.edges[0]}),p=uc({type:ju.MapObject,mapObjectId:e.edges[1]});return j(j(j({maneuverType:Uu.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:Hu.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 id(e){return e.maneuverType===Uu.RouteOverview||e.maneuverType===Uu.SectionOverview}function od(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];r.properties.highlight=!!t}return e}function ad(e,t,n,r,i){if(void 0===i&&(i=""),0===e.length)return[];var o=[ve(e,{segmentNumber:t,dimension_where:i,patchNumber:r,isNode:!0})];return od(o,n),o}function sd(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=j(j(j({segmentNumber:t,dimension_where:o,patchNumber:r,isNode:!1,zone:i},l?{localRef:l}:{}),a?{whatTaxonomy:a}:{}),s?{name:s}:{}),c=ye(e,j(j({},u),{featureBelongsToLineString:!0})),h=ve(e[0],j(j({},u),{featureBelongsToLineString:!1})),d=ve(e[e.length-1],j(j({},u),{featureBelongsToLineString:!1})),p=[];return p.push(h,c,d),od(p,n),p}function ld(e,t,n){var r,i,o,a,s,l;return I(this,void 0,void 0,function(){var u,c,h,d,p,f,g,m,v,y,w,b,_,x,S,A,P,M,C,k,E,T,L,R,D,F,O,N,I,B,U,H,G,W,V,q,Z,Y,$,J,K,X,Q,ee,te,ne,re,ie,oe,ae,se,le,ue,ce,he,de,pe,fe,ge,me,ve,we,be,_e,xe;return z(this,function(z){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===Gu.Airside,g=nd.getRoute(e,t,n),m=g.routes,console.log("PathSegments:",m),v=[],w=0;m&&w<m.length;w+=1)if(b=m[w],_=b.geojson.properties.zone,b.isPortal)y=j(j({},rd(b)),{maneuverType:Uu.Static,coordinates:[b.geojson.geometry.coordinates[1]],zone:_,isPortal:!1}),K=j(j({},rd(b)),{maneuverType:Uu.EnterPortal,coordinates:[b.geojson.geometry.coordinates[0]]}),v.push(K),X=j(j({},rd(b)),{maneuverType:Uu.ExitPortal,coordinates:[b.geojson.geometry.coordinates[1]]}),v.push(X),(Q=v.length>0?v[v.length-1]:void 0)&&Q.maneuverType===Uu.ExitPortal&&(v.pop(),b.portalPath&&(ee=j(j({},rd(b)),{maneuverType:Uu.TravelPortal,coordinates:b.portalPath.geometry.coordinates,zone:_}),v.push(ee)),v.push(X));else{if(x=b.geojson.geometry.coordinates,S=Uu.Static,0===v.length&&h&&(A=j(j({},rd(b)),{maneuverType:Uu.Static,coordinates:[x[0]]}),v.push(A)),w>0&&v.length>0&&(P=m[w-1],M=P.geojson.properties.zone,_===M||f||(C=P.geojson.geometry.coordinates,R=j(j({},rd(P)),{maneuverType:Uu.ChangeZone,zone:_,coordinates:[C[C.length-1]]}),v.push(R),S=Uu.ChangeZone)),x.length>2)for(se=0;se<x.length-2;se+=1)k=x[se],E=x[se+1],T=x[se+2],y=j(j({},rd(b)),{maneuverType:Uu.Static,coordinates:[T],zone:_||""}),L=Uu.ContinueStraight,R=j(j({},rd(b)),{maneuverType:L,zone:_}),S===Uu.ContinueStraight?(se+3===x.length?v[v.length-1].coordinates.push(E,T):v[v.length-1].coordinates.push(E),v[v.length-1].maneuverType=L):(R.coordinates.push(k,E),v.push(R),se+3===x.length&&(L===Uu.ContinueStraight?v[v.length-1].coordinates.push(T):v.push(j(j({},rd(b)),{maneuverType:Uu.ContinueStraight,coordinates:[E,T],zone:_||""})))),S=L;else R=j(j({},rd(b)),{maneuverType:Uu.ContinueStraight,coordinates:x,zone:_}),v.push(R),y=j(j({},rd(b)),{maneuverType:Uu.Static,coordinates:[x[x.length-1]],zone:_||""});if(D=function(){if(v.length>0){var e=v[v.length-1];e.maneuverType===Uu.ChangeZone&&e.zone===Nu.Transit&&v.pop()}},(Q=v.length>0?v[v.length-1]:void 0)&&Q.maneuverType===Uu.ContinueStraight)for(F=hc(Q.startEdge.whereDimension),O=ye(Q.coordinates),se=0;se<F.length;se+=1)N=F[se],bh(O,N)||((I=ms(O,N)).features.length>1?(v.pop(),B=Nh(ea(O)[0],Qo(I.features[0]),O),xs(B,{units:"meters"})>=10?(U=j(j({},rd(b)),{maneuverType:Uu.ContinueStraight,zone:_,coordinates:ea(B)}),v.push(U)):v.length>0&&((Q=v[v.length-1]).maneuverType===Uu.ChangeZone?(H=ea(B),Q.coordinates=[H[H.length-1]],v.length>1&&((q=v[v.length-2]).coordinates=q.coordinates.concat(ea(B)))):Q.coordinates.concat(ea(B))),G=Nh(Qo(I.features[0]),Qo(I.features[1]),O),W=j(j({},rd(b)),{maneuverType:Uu.PassThroughImmigration,zone:_,coordinates:ea(G)}),0===v.length&&(W.coordinates=B.geometry.coordinates.concat(W.coordinates)),D(),v.push(W),Y=ea(O),$=Nh(Qo(I.features[1]),Y[Y.length-1],O),J=j(j({},rd(b)),{maneuverType:Uu.ContinueStraight,zone:_,coordinates:ea($)}),v.push(J)):I.features.length>0&&(ll(ea(O)[0],N)?(v.pop(),G=Nh(ea(O)[0],Qo(I.features[0]),O),W=j(j({},rd(b)),{maneuverType:Uu.PassThroughImmigration,zone:_,coordinates:ea(G)}),(Q=v.length>0?v[v.length-1]:void 0)&&Q.maneuverType===Uu.ChangeZone&&(V=v.pop(),v.length>1&&(q=v[v.length-1]).maneuverType===Uu.PassThroughImmigration&&(v.pop(),V.coordinates=[q.coordinates[0]],v.push(V),W.coordinates=q.coordinates.concat(W.coordinates))),D(),v.push(W),Y=ea(O),$=Nh(Qo(I.features[0]),Y[Y.length-1],O),J=j(j({},rd(b)),{maneuverType:Uu.ContinueStraight,zone:_,coordinates:ea($)}),v.push(J)):(Z=Nh(ea(O)[0],Qo(I.features[0]),O),Q.coordinates=ea(Z),Y=ea(O),$=Nh(Qo(I.features[0]),Y[Y.length-1],O),J=j(j({},rd(b)),{maneuverType:Uu.PassThroughImmigration,zone:_,coordinates:ea($)}),v.push(J))))}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===Uu.ContinueStraight||n.maneuverType===Uu.RoadChangeContinueStraight||n.maneuverType===Uu.TurnLeftAndContinue||n.maneuverType===Uu.TurnSlightLeftAndContinue||n.maneuverType===Uu.TurnRightAndContinue||n.maneuverType===Uu.TurnSlightRightAndContinue||n.maneuverType===Uu.UTurnAndContinue)&&r.maneuverType===Uu.ContinueStraight&&n.localRef!==r.localRef){var i=n.coordinates,o=r.coordinates;if(i.length>=2&&o.length>=2){var a=ia(i[i.length-2],i[i.length-1]),s=ia(o[0],o[1])-a;s>180&&(s-=360),s<-180&&(s+=360),r.maneuverType=s>-30&&s<30?Uu.RoadChangeContinueStraight:s>=30&&s<60?Uu.TurnSlightRightAndContinue:s>=60&&s<120?Uu.TurnRightAndContinue:s<=-30&&s>-60?Uu.TurnSlightLeftAndContinue:s<=-60&&s>-120?Uu.TurnLeftAndContinue:Uu.UTurnAndContinue}else r.maneuverType=Uu.RoadChangeContinueStraight}}}}(v),te={segments:v,walkingDistance:0,transportDistance:0,walkingTime:0,transportTime:0,distanceUnit:nc,speed:1},f&&(te.speed=8.33),te.segments.length>0){for(re=0,(ne=c)&&((ie=Wu.cloneDeep(te.segments[0])).maneuverType=Uu.RouteOverview,te.segments.unshift(ie),re=1),oe=p+re,ae=te.segments.length>re?te.segments[re].startEdge.whereDimension:"",se=re;se<te.segments.length;se+=1){if(le=!1,ue=te.segments[se],ce=p+se,ue.isPortal){if(ue.maneuverType===Uu.EnterPortal){for(de=ad(ue.coordinates[0],ce,le,oe,ue.startEdge.whereDimension),pe=[],fe=0,ge=de;fe<ge.length;fe++)me=ge[fe],pe.push(me);ue.features=pe,ue.patchNumber=oe,ue.whereDimension=ae,(ve=te.segments.length>=se+2?te.segments[se+1]:void 0)&&ve.maneuverType!==Uu.TravelPortal?(we=ue.cost,ue.time=we||0):ue.time=0,ue.distance=0}ue.maneuverType===Uu.TravelPortal&&(ue.features=sd(ue.coordinates,ce,le,oe,ue.zone,ue.startEdge.whereDimension),ue.patchNumber=oe,ue.whereDimension=ae,we=ue.cost,ue.time=we||0,be=void 0,be=ue.coordinates.length>1?xs(ye(ue.coordinates),{units:te.distanceUnit}):0,ue.distance=be,se>0&&(te.segments[se-1].time=0)),ue.maneuverType===Uu.ExitPortal&&(oe+=1,ae=ue.endEdge.whereDimension,te.segments.splice(se,1),se-=1),(_e=te.segments.length>=se+2?te.segments[se+1]:void 0)&&_e.maneuverType===Uu.TravelPortal&&(oe+=1)}else ue.maneuverType===Uu.Static||ue.maneuverType===Uu.ChangeZone?(ue.features=ad(ue.coordinates[0],ce,le,oe,ue.endEdge.whereDimension),ue.patchNumber=oe,ue.whereDimension=ae):(ue.features=sd(ue.coordinates,ce,le,oe,ue.zone,ue.startEdge.whereDimension,null!==(o=null===(i=null===(r=ue.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=ue.features[0])||void 0===a?void 0:a.properties)||void 0===s?void 0:s.name)&&void 0!==l?l:"",ue.localRef),ue.patchNumber=oe,ue.whereDimension=ae),he=ue.coordinates,be=void 0,be=he.length>1?xs(ye(he),{units:te.distanceUnit}):0,ue.distance=be,ue.maneuverType!==Uu.PassThroughImmigration?ue.time=ue.distance/te.speed:ue.time=0;f||ue.maneuverType===Uu.TravelPortal?(te.transportDistance+=ue.distance,te.transportTime+=ue.time):(te.walkingDistance+=ue.distance,te.walkingTime+=ue.time)}ne&&(xe=Pd(te,p),te.segments[0]=xe)}return[2,te]})})}function ud(e){return!!Object.values(Qh).includes(e)}function cd(e){return!!Object.values(ed).includes(e)}function hd(e){return!(!ud(e)&&!cd(e))}function dd(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 pd(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)===Qh.Skytrain||n===Qh.Bus)return r.Terminal;if(e===Qh.Escalator||e===Qh.Lift)return r.Level;if(cd(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"}(Qh||(Qh={})),function(e){e.Entrance="what.infra.entrance",e.Exit="what.infra.exit"}(ed||(ed={}));var fd=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},gd={encode:function(e,t){t=fd(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])}),gd.encodeDeltas(n,t)},decode:function(e,t){t=fd(t);for(var n=gd.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=fd(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}),gd.encodeFloats(e,t)},decodeDeltas:function(e,t){t=fd(t);var n=[],r=gd.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=fd(t),gd.encodeSignedIntegers(e.map(function(e){return Math.round(e*t.factor)}))},decodeFloats:function(e,t){return t=fd(t),gd.decodeSignedIntegers(e).map(function(e){return e/t.factor})},encodeSignedIntegers:function(e){return gd.encodeUnsignedIntegers(e.map(function(e){return e<0?~(e<<1):e<<1}))},decodeSignedIntegers:function(e){return gd.decodeUnsignedIntegers(e).map(function(e){return 1&e?~(e>>1):e>>1})},encodeUnsignedIntegers:function(e){return e.reduce(function(e,t){return e+gd.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 gd.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 md(e,t,n,r){return I(this,void 0,void 0,function(){return z(this,function(e){return[2,null]})})}function vd(e){return I(this,void 0,void 0,function(){return z(this,function(e){return[2,null]})})}function yd(e){var t={maneuverType:Uu.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:Hu.External,instructions:[],patchNumber:-1,whereDimension:"where.external",zone:""};return"WALK"!==e.mode&&(t.portalName=e.routeLongName),t}function wd(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),I(this,void 0,void 0,function(){var a,s,l,u,c,h,d,p,f,g,m,v,y,w,b,_,x,S,A,P,M,C,k,E;return z(this,function(T){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=j(j({},yd(a[0])),{maneuverType:Uu.Static,coordinates:[gd.decode(a[0].legGeometry.points,5)[0]],distance:0,isPortal:!1,features:[],time:0}),l.push(u)),a.map(function(e){var t=gd.decode(e.legGeometry.points,5);if("WALK"===e.mode){var n=j(j({},yd(e)),{maneuverType:Uu.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=j(j({},yd(e)),{maneuverType:Uu.EnterPortal,coordinates:r.length>1?[r]:[t[0]],isPortal:!0,distance:0,time:0}),a=j(j({},yd(e)),{maneuverType:Uu.TravelPortal,coordinates:t,isPortal:!0,distance:e.distance,time:e.duration}),s=j(j({},yd(e)),{maneuverType:Uu.ExitPortal,coordinates:[t[t.length-1]],distance:0,time:0,isPortal:!0});l.push(o,a,s)}}),r&&(c=gd.decode(a[s-1].legGeometry.points,5),h=j(j({},yd(a[s-1])),{maneuverType:Uu.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:nc,speed:1}).segments.length>0){for(f=0,(p=t)&&((g=Wu.cloneDeep(d.segments[0])).maneuverType=Uu.SectionOverview,d.segments.unshift(g),(g=Wu.cloneDeep(d.segments[0])).maneuverType=Uu.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],_=i+y,b.isPortal){if(b.maneuverType===Uu.EnterPortal){for(x=Sd(b.coordinates[0],_,w,m,b.startEdge.whereDimension),S=[],A=0,P=x;A<P.length;A++)M=P[A],S.push(M);b.features=S,b.patchNumber=m,b.whereDimension=v}b.maneuverType===Uu.TravelPortal&&(b.features=Ad(b.coordinates,_,w,m,b.zone,b.startEdge.whereDimension),b.patchNumber=m,b.whereDimension=v),b.maneuverType===Uu.ExitPortal&&(d.segments.splice(y,1),y-=1)}else b.maneuverType===Uu.Static?(b.features=Sd(b.coordinates[0],_,w,m,b.endEdge.whereDimension),b.patchNumber=m,b.whereDimension=v):(b.features=Ad(b.coordinates,_,w,m,b.zone,b.startEdge.whereDimension),b.patchNumber=m,b.whereDimension=v),C=b.coordinates,k=void 0,k=C.length>1?xs(ye(C),{units:d.distanceUnit}):0,b.distance=k;b.maneuverType===Uu.ContinueStraight?(d.walkingDistance+=b.distance,d.walkingTime+=b.time):(d.transportDistance+=b.distance,d.transportTime+=b.time)}p&&(E=Pd(d,i),d.segments[0]=E,E=Pd(d,i+1),d.segments[1]=E)}return[2,d]}catch(e){return console.log("Error:",e),[2,void 0]}return[2]})})}function bd(e,t,n,r,i){return I(this,void 0,void 0,function(){var i,o,a,s,l,u,c,h,d;return z(this,function(p){switch(p.label){case 0:if(!e)return console.error("ExternalTransitionPoint not received"),[2,void 0];if(t.type!==ju.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:ju.MapObject,mapObjectId:a[s].id},u=void 0,c=void 0,"Inside"===r?(u=l,c=t):(u=t,c=l),[4,Md(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 _d(e,t,n,r){return void 0===r&&(r="Inside"),I(this,void 0,void 0,function(){var i,o,a,s,l,u,c,h,d,p,f,g,m,v;return z(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,bd(p,t,n,r)])):[3,7];case 2:return f=y.sent(),[3,5];case 3:return[4,bd(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 xd(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];r.properties.highlight=!!t}return e}function Sd(e,t,n,r,i){if(void 0===i&&(i=""),0===e.length)return[];var o=[ve(e,{segmentNumber:t,dimension_where:i,patchNumber:r,isNode:!0})];return xd(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=ye(e,j(j({},a),{featureBelongsToLineString:!0})),l=ve(e[0],j(j({},a),{featureBelongsToLineString:!1})),u=ve(e[e.length-1],j(j({},a),{featureBelongsToLineString:!1})),c=[];return c.push(l,s,u),xd(c,n),c}function Pd(e,t){void 0===t&&(t=0);var n=Wu.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=Uu.RouteOverview,n.patchNumber=t,n.instructions=["Overview"];for(var i=1;i<e.segments.length;i+=1)if(e.segments[i].maneuverType!==Uu.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=Wu.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=Wu.cloneDeep(e.segments[e.segments.length-1].endEdge),n.time=e.walkingTime+e.transportTime,n.distance=e.walkingDistance+e.transportDistance,n}function Md(e,t,n){return I(this,void 0,void 0,function(){var r;return z(this,function(i){switch(i.label){case 0:return[4,ld(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===Uu.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===Uu.RouteOverview){var a="Overview";o.instructions.push(a)}if(i>0&&o.maneuverType===Uu.ChangeZone)a="",e.segments[i-1].zone===Nu.Public&&o.zone===Nu.Transit?a=n(o):e.segments[i-1].zone===Nu.Transit&&o.zone===Nu.Public&&(a="Exit Baggage Claim Hall"),o.instructions.push(a);else if(o.maneuverType===Uu.ContinueStraight||o.maneuverType===Uu.PassThroughImmigration){var s=o.maneuverType===Uu.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===Uu.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!==Uu.ChangeZone&&(e.segments[i-1].maneuverType,Uu.PassThroughImmigration),a=s,o.instructions.push(a)}else if(o.maneuverType===Uu.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===Uu.EnterPortal){if(a="Enter ".concat(o.startEdge.name," at ").concat(o.startEdge.whereDimension.split(".").slice(-2).join(" ").toUpperCase()),cd(o.startEdge.whatDimension))a="Continue to ".concat(pd(o.startEdge.whatDimension,o.endEdge.whereDimension)),o.instructions.push(a);else if(ud(o.startEdge.whatDimension)){var l=i+1<=e.segments.length-1?e.segments[i+1]:void 0;if(l&&l.maneuverType===Uu.TravelPortal){o.instructions.push(a),i+=1;var u=dd(l.startEdge.whatDimension);a="Take ".concat(u," to ").concat(pd(o.startEdge.whatDimension,o.endEdge.whereDimension)),l.instructions.push(a),o.description&&l.instructions.push(o.description)}else{var c=dd(o.startEdge.whatDimension);a="Take ".concat(c," to ").concat(pd(o.startEdge.whatDimension,o.endEdge.whereDimension)),o.instructions.push(a)}}}else o.maneuverType===Uu.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===Uu.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===Uu.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===Uu.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===Uu.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===Uu.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 Cd(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),I(this,void 0,void 0,function(){var o;return z(this,function(a){switch(a.label){case 0:return[4,wd(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===Uu.RouteOverview){var r="Overview";n.instructions.push(r)}n.maneuverType===Uu.SectionOverview&&(r="",n.instructions.push(r)),t>0&&n.maneuverType===Uu.ContinueStraight?(r="Walk for ".concat(Math.ceil(n.distance)," ").concat(e.distanceUnit),n.instructions.push(r)):t>0&&n.maneuverType===Uu.TravelPortal?(r="Take ".concat(null==n?void 0:n.portalName," to ").concat(n.endEdge.name),n.instructions.push(r)):t>0&&n.maneuverType===Uu.EnterPortal?(r="Enter ".concat(null==n?void 0:n.portalName," at ").concat(n.startEdge.name),n.instructions.push(r)):t>0&&n.maneuverType===Uu.Static?t===e.segments.length-1?(r="Arrive at ".concat(n.endEdge.name),n.instructions.push(r)):1===t&&e.segments[t-1].maneuverType===Uu.RouteOverview&&(r="Start at ".concat(n.startEdge.name),n.instructions.push(r)):0===t&&e.segments[t].maneuverType===Uu.Static&&(r="Start at ".concat(n.startEdge.name),n.instructions.push(r))}}(o),[2,o]}})})}var kd=new Map;function Ed(e){return I(this,void 0,void 0,function(){var e;return z(this,function(t){switch(t.label){case 0:return[4,vd()];case 1:return(e=t.sent())?[2,e.GeocodeInfo]:[2,void 0]}})})}function Td(e){return I(this,void 0,void 0,function(){var t,n,r,i;return z(this,function(o){switch(o.label){case 0:return e.type===ju.MapObject?(t=uc(e))?[2,t.name||"Unknown Location"]:[2,"Unknown Location"]:e.type!==ju.Coordinate?[3,3]:(n="".concat(e.coordinates[0],",").concat(e.coordinates[1]),"where.external"!==e.whereDimension?[3,2]:kd.has(n)?[2,kd.get(n)]:[4,Ed()]);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))),kd.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 Ld(){return{segments:[],walkingDistance:0,transportDistance:0,walkingTime:0,transportTime:0,distanceUnit:nc,speed:1}}function Rd(e,t,n,r,i){var o;return I(this,void 0,void 0,function(){var a,s,l,u,c,h,d,p,f,g,m,v,y;return z(this,function(w){switch(w.label){case 0:console.log("Case: Within Terminal (Pedestrian)"),a=null!==(o=t.wheelChairAccessible)&&void 0!==o&&o,s=Ld(),l=Ld(),s.segments.push({}),u=1,c=0,h=0,w.label=1;case 1:return h<e.length-1?(d={mode:Gu.WithinTerminal,config:{wheelChairAccessible:a,shouldAddOverviewSegment:n,shouldAddStartSegment:r,shouldAddEndSegment:i,forRealtime:t.forRealtime},indexOffset:u},[4,Md(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=Uu.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=Pd(l,c),s.segments[c]=v,l.segments.unshift(v),s.segments.length>1?(y=Pd(s),s.segments[0]=y):s.segments.length=0,console.log("Within-terminal route:",s),[2,s]}})})}function Dd(e,t,n,r,i){var o,a,s;return I(this,void 0,void 0,function(){var r,i,l,u,c,h,d,p,f,g,m,v,y,w,b,_,x,S,A,P,M,C,k,E,T,L,R,D,F,O;return z(this,function(N){switch(N.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=Ld(),h=Ld(),d=Ld(),c.segments.push({}),p=1,f=0,e.length>2&&(f=c.segments.length,p+=1,c.segments.push({})),g=0,N.label=1;case 1:return g<e.length-1?(m=e[g],e[g+1],m.type!==ju.Coordinate?(console.error("ToTerminal mode: first location must be coordinate type"),[2,void 0]):(v=performance.now(),[4,md()])):[3,8];case 2:return(y=N.sent())?(w={mode:Gu.ToTerminal,config:{departureDate:r,departureTime:i,shouldAddOverviewSegment:!0,shouldAddStartSegment:!0,shouldAddEndSegment:!0,forRealtime:t.forRealtime},indexOffset:p},[4,_d(y,e[g+1],w,"Inside")]):(console.error("External route not found"),[2,void 0]);case 3:return(b=N.sent())?(console.log("ShortestCompleteRoute:",b),_=performance.now(),console.log("EXECUTION_TIME:",_-v),[4,Cd(b.shortestExternalRoute,n,!0,!0,p)]):[2,void 0];case 4:return(x=N.sent()).segments.length?[4,Td(e[g])]:(console.error("Something went wrong in computing external route"),[2,void 0]);case 5:return S=N.sent(),x.segments[2].instructions=["Start at ".concat(S)],p+=x.segments.length,p+=1,(A=null===(o=b.shortestInternalRoute)||void 0===o?void 0:o.segments)?(P={mode:Gu.WithinTerminal,config:{wheelChairAccessible:u,shouldAddOverviewSegment:!0,shouldAddStartSegment:!0,shouldAddEndSegment:!0,forRealtime:t.forRealtime},indexOffset:p},M={type:ju.MapObject,mapObjectId:A[0].startEdge.mapObjectId},C={type:ju.MapObject,mapObjectId:A[A.length-1].endEdge.mapObjectId},[4,Md(M,C,P)]):(console.error("Internal route segments empty"),[2,void 0]);case 6:if(!((k=N.sent()).segments.length>0))return console.error("Internal route not found"),[2,void 0];for((L=k.segments[0]).maneuverType=Uu.SectionOverview,L.instructions=["".concat(L.startEdge.name," to ").concat(L.endEdge.name)],E=k.segments[1].startEdge.whereDimension.split("."),x.segments[x.segments.length-1].instructions=["Arrive at ".concat(k.segments[1].startEdge.name," at ").concat(E[3].toUpperCase()," ").concat(E[4].toUpperCase())],x.segments[x.segments.length-1].whereDimension=k.segments[1].startEdge.whereDimension,x.segments[x.segments.length-1].endEdge.whereDimension=k.segments[1].startEdge.whereDimension,x.segments[x.segments.length-1].features[0].geometry.coordinates=k.segments[1].coordinates,x.segments[x.segments.length-1].coordinates=k.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&&((T=x.segments[0]).maneuverType=Uu.RouteOverview,T.instructions=["Overview"],(L=x.segments[1]).maneuverType=Uu.SectionOverview,L.instructions=["".concat(S," to ").concat(null===(a=b.shortestInternalRoute)||void 0===a?void 0:a.segments[0].startEdge.name)],L.startEdge.name=S,L.endEdge.name=null===(s=b.shortestInternalRoute)||void 0===s?void 0:s.segments[0].startEdge.name),R=0;R<x.segments.length;R+=1)D=x.segments[R],c.segments.push(D),h.segments.push(D);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({}),k){for(R=0;R<k.segments.length;R+=1)D=null==k?void 0:k.segments[R],c.segments.push(D),d.segments.push(D);c.walkingDistance+=k.walkingDistance,c.transportDistance+=k.transportDistance,c.walkingTime+=k.walkingTime,c.transportTime+=k.transportTime,d.walkingDistance+=k.walkingDistance,d.transportDistance+=k.transportDistance,d.walkingTime+=k.walkingTime,d.transportTime+=k.transportTime,p+=k.segments.length}N.label=7;case 7:return g+=1,[3,1];case 8:return console.log("MergedExternalRoute:",h),console.log("MergedInternalRoute:",d),F=Pd(d,f),c.segments[f]=F,d.segments.unshift(F),c.segments.length>1?(O=Pd(c),c.segments[0]=O):c.segments.length=0,console.log("To-terminal route:",c),[2,{fullRoute:c,internalRoute:d,externalRoute:h}]}})})}function Fd(e,t,n,r,i){var o,a;return I(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,S,A,P;return z(this,function(M){switch(M.label){case 0:console.log("Case: From Terminal (Internal → External)"),n=t.departureDate,r=t.departureTime,t.wheelChairAccessible,i=Ld(),s=Ld(),l=Ld(),i.segments.push({}),u=1,c=0,h=0,M.label=1;case 1:return h<e.length-1?(e[h],e[h+1].type!==ju.Coordinate?(console.error("FromTerminal mode: last location must be coordinate type"),[2,void 0]):[4,md()]):[3,8];case 2:return(d=M.sent())?(2===e.length&&(u+=1),p={mode:Gu.FromTerminal,config:{departureDate:n,departureTime:r,shouldAddOverviewSegment:!0,shouldAddStartSegment:!0,shouldAddEndSegment:!0,forRealtime:t.forRealtime},indexOffset:u},[4,_d(d,e[h],p,"Outside")]):(console.error("External route not found"),[2,void 0]);case 3:return(f=M.sent())&&(g=f.shortestInternalRoute)?(u+=g.segments.length,[4,Cd(f.shortestExternalRoute,!0,!0,!0,u)]):[2,void 0];case 4:return(m=M.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,Td(e[h+1])]):(console.error("Something went wrong in computing external route"),[2,void 0]);case 5:return v=M.sent(),m.segments[m.segments.length-1].instructions=["Arrive at ".concat(v)],m.segments[m.segments.length-1].endEdge.name=v,[4,Td(e[h])];case 6:if(y=M.sent(),!(g&&g.segments.length>0))return console.log("Route not found"),[2,void 0];for((w=g.segments[0]).maneuverType=Uu.SectionOverview,w.instructions=["".concat(y," to ").concat(g.segments[g.segments.length-1].endEdge.name)],m.segments.length>0&&((b=m.segments[0]).maneuverType=Uu.RouteOverview,b.instructions=["Overview"],(_=m.segments[1]).maneuverType=Uu.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)S=g.segments[x],i.segments.push(S),l.segments.push(S);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)S=m.segments[x],i.segments.push(S),s.segments.push(S);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,M.label=7;case 7:return h+=1,[3,1];case 8:return console.log("MergedExternalRoute:",s),console.log("MergedInternalRoute:",l),A=Pd(l,c),i.segments[c]=A,l.segments.unshift(A),i.segments.length>1?(P=Pd(i),i.segments[0]=P):i.segments.length=0,console.log("From-terminal route:",i),[2,{fullRoute:i,internalRoute:l,externalRoute:s}]}})})}function Od(e,t,n,r,i){return I(this,void 0,void 0,function(){var o,a,s,l,u,c,h,d,p,f,g,m,v,y,w;return z(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=Ld(),u=Ld(),l.segments.push({}),c=1,h=0,d=0,b.label=1;case 1:return d<e.length-1?(p={mode:Gu.Airside,config:{vehicleType:o,distanceThreshold:s,shouldAddOverviewSegment:n,shouldAddStartSegment:r,shouldAddEndSegment:i,forRealtime:t.forRealtime},indexOffset:c},[4,Md(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=Uu.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=Pd(u,h),l.segments[h]=y,u.segments.unshift(y),l.segments.length>1?(w=Pd(l),l.segments[0]=w):l.segments.length=0,console.log("Airside route:",l),[2,l]}})})}var Nd=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 N(t,e),t}(Error);function jd(e,t){if("string"!=typeof e||""===e.trim())throw new Error("".concat(t," is required to start navigation"));return e}function Id(e){if(null==e)throw new Error("Routing mode is not set. Call setRoutingMode before startNavigation.");if(e===Gu.ToTerminal||e===Gu.FromTerminal)throw new Nd("UNSUPPORTED_ROUTE_MODE",e);if(e===Gu.Airside&&!function(e){if(!e||"object"!==te(e))return!1;var t=e[Iu.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(Iu.AirsideNetwork)})}(bc.getState().data))throw new Nd("MISSING_ROUTING_DATA",e);return e}function zd(e){return j(j({wheelChairAccessible:!1,shouldAddOverviewSegment:!0,shouldAddStartSegment:!0,shouldAddEndSegment:!0},e),{forRealtime:!0})}function Bd(e){return e.startAnchorLngLat?e.startAnchorLngLat:e.useStartPositionAsAnchor?e.startLngLat:void 0}function Ud(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 Nd("NOT_READY",e,void 0,t)},h=function(e,t){if(t instanceof vl)throw new Nd("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 I(t,void 0,void 0,function(){var t,r,i,o,a,s;return z(this,function(l){switch(l.label){case 0:return t=!1!==n.useInternalGPS,r=qu(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===Gu.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 I(t,void 0,void 0,function(){var t,i,a,s,l,u,c,h,d;return z(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 Gu.Airside:t.vehicleType||n.push("vehicleType is required for Airside routing mode");break;case Gu.ToTerminal:case Gu.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 Gu.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 Gu.WithinTerminal:return e.every(function(e){return e.type===ju.MapObject||e.type===ju.Coordinate&&"string"==typeof e.whereDimension&&""!==e.whereDimension.trim()&&"where.external"!==e.whereDimension});case Gu.ToTerminal:return e[0].type===ju.Coordinate&&"where.external"===e[0].whereDimension&&e.slice(1).every(function(e){return e.type===ju.MapObject});case Gu.FromTerminal:var n=e.length-1;return e[n].type===ju.Coordinate&&"where.external"===e[n].whereDimension&&e.slice(0,-1).every(function(e){return e.type===ju.MapObject});case Gu.Airside:return e.every(function(e){return e.type===ju.MapObject||e.type===ju.Coordinate&&e.whereDimension.includes("airside")});default:return!1}}(e,n)?(i=j({},r),n===Gu.Airside&&(a=i).vehicleType&&(a.vehicleType=j(j({},a.vehicleType),{defaults:bc.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 Gu.WithinTerminal:return Rd;case Gu.ToTerminal:return Dd;case Gu.FromTerminal:return Fd;case Gu.Airside:return Od;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 I(t,void 0,void 0,function(){var t,o;return z(this,function(a){return 2!==e.length||""===n||r.length<1?(console.warn("Invalid input parameters passed to computeRoutesFromLocation"),[2,void 0]):(t={type:ju.Coordinate,coordinates:e,whereDimension:n},o=r.map(function(e){return{type:ju.MapObject,mapObjectId:e}}),[2,y(B([t],o,!0),null!=i?i:{})])})})},b=function(e,n,r,i){return I(t,void 0,void 0,function(){var t;return z(this,function(o){return 2!==e.length||""===n||r.type!==ju.Coordinate?(console.warn("Invalid input parameters passed to computeRouteFromLocationToCoordinates"),[2,void 0]):(t={type:ju.Coordinate,coordinates:e,whereDimension:n},[2,y([t,r],null!=i?i:{})])})})},_=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=Ll({type:"FeatureCollection",features:e});return[t[0],t[1],t[2],t[3]]}(i),r)}else{var o={type:"FeatureCollection",features:[ve(n.coordinates[0])]},a=ph(o,.025,3).features[0].geometry.coordinates,s=ph(o,-.025,-3).features[0].geometry.coordinates;e.fitBounds([s[0],s[1],a[0],a[1]],r)}},x=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),I(t,void 0,void 0,function(){var t,u,c,h,d;return z(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===Uu.ExitPortal||u.maneuverType===Uu.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(id(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&&(id(s)||(o=o.concat(s.features)))}return o}(t,h,{includeOverviewFeatures:id(u),patchNumberForOverviewFeatures:h},n)),c&&c!==Ml().getCurrentFocus()&&r&&Ml().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&&xd([i],!0):xd([i],!0):xd([i],!1)}return e}(a,n),a=d,e.display.setPatchFeatures({type:"FeatureCollection",features:d}),l&&!id(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&&_(t,u),[2]):(console.log("at vertical portal segment, ignoring!"),[2])})})},S=function(){i=null,o=-1,a=[],e.display.clear()},A=function(){r&&(null==s||s.stopNavigation(),e.enterNormalMode(),r=!1),S()},P=function(n){return I(t,void 0,void 0,function(){var t,i;return z(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:Bd(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]}})})},M={attachEngine:function(e){s=e},attachDisplay:function(){l=!0},detachDisplay:function(){l=!1},getReadiness:function(){return ml(u())},requestRerouteFromPosition:function(e){return I(t,void 0,void 0,function(){var t,n,o,a;return z(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=Ml().getCurrentFocus(),[4,w(e,n,[t],zd())]):[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,x(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:x,setRoutingMode:function(t){var r;n=t,null===(r=e.onRoutingModeChange)||void 0===r||r.call(e,t)},getRoutingParameters:function(){return n===Gu.Airside?{vehicleType:bc.getState().getTemplateTypes()}:n===Gu.WithinTerminal?{wheelChairAccessible:[!1,!0]}:void 0},computeRoute:function(e,t,n){return I(this,void 0,void 0,function(){return z(this,function(r){return[2,y([{type:ju.MapObject,mapObjectId:e},{type:ju.MapObject,mapObjectId:t}],n)]})})},computeRoutes:function(e,t){return I(this,void 0,void 0,function(){return z(this,function(n){return[2,y(e.map(function(e){return{type:ju.MapObject,mapObjectId:e}}),t)]})})},computeRoutesFromLocation:w,computeRouteFromCoordinates:function(e,t,r){return I(this,void 0,void 0,function(){var i;return z(this,function(o){return n!==Gu.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:ju.Coordinate,coordinates:e,whereDimension:"where.changi.airside"},{type:ju.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 I(this,void 0,void 0,function(){var a,s,l,u,f,g,m;return z(this,function(y){switch(y.label){case 0:a=jd(null==o?void 0:o.userWhereDimension,"userWhereDimension"),s=Id(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!==Gu.Airside?[3,6]:[4,w(f,a,[e],r)];case 5:return g=y.sent(),[2,(b={route:g,handlers:i},I(t,void 0,void 0,function(){return z(this,function(e){if(!b.route)throw A(),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],zd(r))];case 7:if(!(m=y.sent()))throw new Error("Failed to compute route from GPS location to destination");return[2,P({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 I(this,void 0,void 0,function(){var o,a,s,l,u,d;return z(this,function(p){switch(p.label){case 0:o=jd(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===Gu.ToTerminal||e===Gu.FromTerminal)throw new Nd("UNSUPPORTED_ROUTE_MODE",e);if(e===Gu.Airside)throw new Nd("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,zd(t))];case 5:if(!(d=p.sent()))throw new Error("Failed to compute route from GPS location to destination");return[2,P({route:d,handlers:r,startLngLat:u,startAnchorLngLat:null==i?void 0:i.startAnchorLngLat,useStartPositionAsAnchor:null==i?void 0:i.useStartPositionAsAnchor,lockWhereTaxonomyPath:o})]}})})},stopNavigation:A,clearRoute:function(){S()}};return M}var Hd=new Set;var Gd=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 Pl,this.cameraDirector=new xl,this.focusManager.attachCameraDirector(this.cameraDirector),e=this.focusManager,Al=e,this.mapDataService=new jc,this.userLocation=new Ic({getFocusTree:function(){return n.mapDataService.getFocusTree()}}),this.userLocation.attachCameraDirector(this.cameraDirector),this.autoFocusManager=new kl(this.userLocation,new Cl),this.autoFocusManager.addWhereTaxonomyUpdateAcceptedListener(function(e,t){n.focusManager.commit(e,{moveCamera:t})}),this.taxonomyUpdateStore=(t=function(){return n.autoFocusManager},fl(function(e,n){return j(j({},El),{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(j({},El))},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=Ud({ensureRequiredSensors:function(e){return I(n,void 0,void 0,function(){return z(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 I(n,void 0,void 0,function(){var e,t;return z(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 eh(this.routingManager,this.userLocation,this.autoFocusManager),this.routingManager.attachEngine(this.navigationEngine),this.readinessStore=fl(function(e){return j(j({},wl),{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||(Hd.size>0&&"boolean"==typeof(e=globalThis.__DEV__)&&e&&console.warn("MetaAtlasRuntime: a second concurrent bootstrap was attempted. Multi-map support is not available."),Hd.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,Hd.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(j(j({},function(e){for(var t=[],n=new Set,r=0,i=bl;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 Wd=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"===te(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}(),Vd=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 Wd?new Wd(e.lng,e.lat):Wd.convert(e),this},e.prototype.setSouthWest=function(e){return this._sw=e instanceof Wd?new Wd(e.lng,e.lat):Wd.convert(e),this},e.prototype.extend=function(t){var n,r,i=this._sw,o=this._ne;if(t instanceof Wd)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(Wd.convert(s))}return t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(Wd.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 Wd(n.lng,n.lat),this._ne=new Wd(r.lng,r.lat)),this},e.prototype.getCenter=function(){return new Wd((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 Wd(this.getWest(),this.getNorth())},e.prototype.getSouthEast=function(){return new Wd(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=Wd.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 Wd(t.lng-i,t.lat-r),new Wd(t.lng+i,t.lat+r))},e}(),qd={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:{}}]},Zd={},Yd={},$d={};Object.defineProperty($d,"__esModule",{value:!0}),$d.bytesToString=$d.stringToBytes=$d.NIL=$d.X500=$d.OID=$d.URL=$d.DNS=$d.hexToByte=$d.byteToHex=void 0;let Jd=[],Kd={};for(var Xd=0;Xd<256;Xd++)Jd[Xd]=(Xd+256).toString(16).substr(1),Kd[Jd[Xd]]=Xd;$d.byteToHex=Jd,$d.hexToByte=Kd,$d.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",$d.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",$d.OID="6ba7b812-9dad-11d1-80b4-00c04fd430c8",$d.X500="6ba7b814-9dad-11d1-80b4-00c04fd430c8",$d.NIL="00000000-0000-0000-0000-000000000000";$d.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};$d.bytesToString=e=>{const t=new Uint8Array(e,0,e.byteLength);return String.fromCharCode.apply(null,Array.from(t))},Object.defineProperty(Yd,"__esModule",{value:!0}),Yd.parse=void 0;const Qd=$d;Yd.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++]=Qd.hexToByte[e]),""));i<16;)t[r+i++]=0;return t};var ep={};Object.defineProperty(ep,"__esModule",{value:!0}),ep.unparse=void 0;const tp=$d;ep.unparse=(e,t)=>{let n=t||0,r=tp.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 np={},rp={};Object.defineProperty(rp,"__esModule",{value:!0});rp.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 ip=xe&&xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(np,"__esModule",{value:!0}),np.validate=void 0;const op=ip(rp);np.validate=e=>"string"==typeof e&&op.default.test(e);var ap={};Object.defineProperty(ap,"__esModule",{value:!0}),ap.version=void 0;const sp=np;ap.version=e=>{if(!(0,sp.validate)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)};var lp={},up={};Object.defineProperty(up,"__esModule",{value:!0}),up.stringify=void 0;const cp=np,hp=[];for(let e=0;e<256;++e)hp.push((e+256).toString(16).substr(1));up.stringify=(e,t=0)=>{const n=(hp[e[t+0]]+hp[e[t+1]]+hp[e[t+2]]+hp[e[t+3]]+"-"+hp[e[t+4]]+hp[e[t+5]]+"-"+hp[e[t+6]]+hp[e[t+7]]+"-"+hp[e[t+8]]+hp[e[t+9]]+"-"+hp[e[t+10]]+hp[e[t+11]]+hp[e[t+12]]+hp[e[t+13]]+hp[e[t+14]]+hp[e[t+15]]).toLowerCase();if(!(0,cp.validate)(n))throw TypeError("Stringified UUID is invalid");return n};var dp={};Object.defineProperty(dp,"__esModule",{value:!0}),dp.rng=void 0;dp.rng=()=>{let e=new Uint8Array(16);for(let t=0;t<16;t++)e[t]=255&256*Math.random()+0;return e},Object.defineProperty(lp,"__esModule",{value:!0}),lp.v1=void 0;const pp=up,fp=dp;let gp,mp,vp=0,yp=0;lp.v1=(e,t,n=0)=>{let r=t&&n||0;const i=t||new Uint8Array(16);let o=e&&e.node?e.node:gp,a=e&&e.clockseq?e.clockseq:mp;if(null==o||null==a){const t=e&&e.random?e.random:e&&e.rng?e.rng():(0,fp.rng)();null==o&&(o=gp=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==a&&(a=mp=16383&(t[6]<<8|t[7]))}let s=e&&e.msecs?e.msecs:Date.now(),l=e&&e.nsecs?e.nsecs:yp+1;const u=s-vp+(l-yp)/1e4;if(u<0&&e&&!e.clockseq&&(a=a+1&16383),(u<0||s>vp)&&e&&!e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");vp=s,yp=l,mp=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,pp.stringify)(i)};var wp={},bp={};Object.defineProperty(bp,"__esModule",{value:!0}),bp.v35=void 0;const _p=up,xp=Yd,Sp=$d;bp.v35=(e,t,n)=>(e,r,i,o=0)=>{if("string"==typeof e&&(e=(0,Sp.stringToBytes)(e)),"string"==typeof r&&(r=(0,xp.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,Sp.stringToBytes)(n((0,Sp.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,_p.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 Pp=xe&&xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wp,"__esModule",{value:!0}),wp.v3=void 0;const Mp=bp,Cp=Pp(Ap);wp.v3=(0,Mp.v35)("v3",48,Cp.default);var kp={};Object.defineProperty(kp,"__esModule",{value:!0}),kp.v4=void 0;const Ep=ep,Tp=dp;kp.v4=function(e,t,n){let r=t&&n||0,i=(0,Tp.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,Ep.unparse)(i)};var Lp={},Rp={};!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}(Rp);var Dp=xe&&xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lp,"__esModule",{value:!0}),Lp.v5=void 0;const Fp=bp,Op=Dp(Rp);Lp.v5=(0,Fp.v35)("v5",80,Op.default),Object.defineProperty(Zd,"__esModule",{value:!0});const Np=Yd,jp=ep,Ip=np,zp=ap,Bp=lp,Up=wp,Hp=kp,Gp=Lp,Wp=$d;var Vp,qp=Zd.default={parse:Np.parse,unparse:jp.unparse,validate:Ip.validate,version:zp.version,v1:Bp.v1,v3:Up.v3,v4:Hp.v4,v5:Gp.v5,NIL:Wp.NIL,DNS:Wp.DNS,URL:Wp.URL,OID:Wp.OID,X500:Wp.X500},Zp=f(function(e,t){var n=e.cameraRef,r=e.metaAtlasCoreRef,i=c([]),o=u(0)[1],a=function(){o(function(e){return e+1})};return d(t,function(){return{dropPin:function(e,t,n){return void 0===n&&(n=!0),I(this,void 0,void 0,function(){var o,s,l;return z(this,function(u){return o=function(e){return r.current.getMidPointOfFeature(e)}(e),g(t)?(s="",n&&i.current.length>0?(i.current[i.current.length-1]=j(j({},i.current[i.current.length-1]),{coordinates:o,customElement:t,isVisible:!0}),s=i.current[i.current.length-1].id):(l={id:qp.v4(),coordinates:o,customElement:t,isVisible:!0},s=l.id,i.current.push(l)),a(),[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=i.current[i.current.length-1];if(!n)return void console.warn("No pins available to hide.");t=n.id}else t=e;var r=i.current.findIndex(function(e){return e.id===t});-1!==r?(i.current[r]=j(j({},i.current[r]),{isVisible:!1}),a()):console.warn("Pin with ID: ".concat(t," not found."))},hidePins:function(){i.current=i.current.map(function(e){return j(j({},e),{isVisible:!1})}),a()},showPin:function(e){return void 0===e&&(e="-1"),I(this,void 0,void 0,function(){var t,n,r;return z(this,function(o){if("-1"===e){if(!(n=i.current[i.current.length-1]))return console.warn("No pins available to show."),[2];t=n.id}else t=e;return-1===(r=i.current.findIndex(function(e){return e.id===t}))?(console.warn("Pin with ID: ".concat(t," not found.")),[2]):(i.current[r]=j(j({},i.current[r]),{isVisible:!0}),a(),[2])})})},showPins:function(){i.current=i.current.map(function(e){return j(j({},e),{isVisible:!0})}),a()},clearPin:function(e){var t;if(void 0===e&&(e="-1"),"-1"===e){if((t=i.current.length-1)<0)return void console.warn("No pins available to clear.")}else if(-1===(t=i.current.findIndex(function(t){return t.id===e})))return void console.warn("Pin with ID: ".concat(e," not found."));i.current.splice(t,1),a()},clearPins:function(){i.current=[],a()},fitViewToPins:function(e,t){var r;if(void 0===t&&(t=50),0!==i.current.length){var o=i.current.filter(function(t){return!!e.includes(t.id)});if(0!==o.length){for(var a=o[0].coordinates,s=new Wd(a[0],a[1]),l=new Wd(a[0],a[1]),u=new Vd(s,l),c=0;c<o.length;c++){var h=o[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.")}}}),l.createElement(l.Fragment,null,i.current.map(function(e){return e.isVisible&&g(e.customElement)&&l.createElement(S,{key:e.id,coordinate:e.coordinates},e.customElement)}))});function Yp(e){var t=this,n=o.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}}),r=c(null);r.current||(r.current=new Gd);var i=r.current,s=c(i.mapDataService),p=c(null),f=c(null),g=c(null),y=c(i.userLocation),w=c(null),b=c(null),_=c(null),x=c(null),S=c(15.5),C=c(0),k=c(0),E=c(null);E.current||(E.current=ie({getCamera:function(){return f.current},getZoom:function(){return S.current},getViewport:function(){return{width:k.current,height:C.current}}}));var T=function(e){var t,n=null===(t=e.nativeEvent)||void 0===t?void 0:t.zoom;"number"==typeof n&&Number.isFinite(n)&&(S.current=n)},R=c(!1),D=c(!1),O=c(!1),N=c(!1),j=u(!1),B=j[0],U=j[1],H=c(null),G=u({center:[103.8218,1.2564],zoom:15.5,bearing:0}),W=G[0],V=G[1],q=u(""),Z=q[0],Y=q[1],$=c(""),J=function(e){var t=JSON.stringify(e);$.current=t,Y(t)},K=c(il),X=c(ol),Q=c(al),ee=c(sl),te=u(!1),ae=te[0],se=te[1],le=u(!1),ue=le[0],ce=le[1],he=u(null),de=he[0],fe=he[1],ge=u(!1),me=ge[0],ve=ge[1],ye="https://atoms.sandbox.spatialverse.online/sdk/2.1.2-sandbox/",we="https://atoms-map-tiles-middleware.sandbox.spatialverse.online/".concat(e.tileserverRoleName,"/latest/geojson?accessToken=").concat(e.accessToken),be=e.onNetworkModeUpdate?e.onNetworkModeUpdate:function(){},_e=function(){return I(t,void 0,void 0,function(){var t,n,r=this;return z(this,function(i){switch(i.label){case 0:return t=function(){return I(r,void 0,void 0,function(){var e;return z(this,function(t){switch(t.label){case 0:return[4,Se()];case 1:return e=t.sent(),ce(e),be(e?Vp.Offline:Vp.Online),[2]}})})},s.current.getOfflineMapStatus()===wc.Ready?[3,2]:(n=function(n){return I(r,void 0,void 0,function(){return z(this,function(r){return e.onOfflineMapsStatusUpdate(n),n&&t(),[2]})})},[4,s.current.setupOfflineMaps(n)]);case 1:return i.sent(),[3,3];case 2:t(),i.label=3;case 3:return[2]}})})},xe=function(){return I(t,void 0,void 0,function(){var e,t,n=this;return z(this,function(r){switch(r.label){case 0:return e=function(){return I(n,void 0,void 0,function(){var e,t;return z(this,function(n){switch(n.label){case 0:e="".concat(L.DocumentDirectoryPath,"/extracted/"),n.label=1;case 1:return n.trys.push([1,5,,6]),[4,L.exists(e)];case 2:return n.sent()?[4,ru(e)]:[3,4];case 3:n.sent(),be(Vp.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),il.sprite&&il.glyphs&&(t.glyphs=K.current.glyphs,t.sprite=K.current.sprite),J(t),ce(!1),xc.setState({data:""}),s.current.offlineMapStatus=wc.Awaiting,be(Vp.Online),[2]}})})},Se=function(){return I(t,void 0,void 0,function(){var e,t,n,r,i,o,a,s,l;return z(this,function(u){switch(u.label){case 0:e=xc.getState().data,t=Sc.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,L.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,L.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,L.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"),J(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]}})})},Ae=function(){var e,t,n;null===(e=r.current)||void 0===e||e.attach({style:{readLayers:function(){var e=$.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=$.current;try{t=n?JSON.parse(n):{layers:[]}}catch(e){t={layers:[]}}t.layers=e,J(t)}},camera:null!==(t=E.current)&&void 0!==t?t:void 0,sensors:g.current&&w.current?{gps:g.current,compass:w.current,motion:x.current}:void 0,marker:null!==(n=b.current)&&void 0!==n?n:void 0,routingDisplay:{setDisplayRoute:function(e){var t;null===(t=_.current)||void 0===t||t.setDisplayRoute(e)},getDisplayRoute:function(){var e,t;return null!==(t=null===(e=_.current)||void 0===e?void 0:e.getDisplayRoute())&&void 0!==t?t:null},setPatchFeatures:function(e){var t;null===(t=_.current)||void 0===t||t.setPatchFeatures(e)},setAnimatedCoordinates:function(e){var t;null===(t=_.current)||void 0===t||t.setAnimatedCoordinates(e)},clear:function(){var e;null===(e=_.current)||void 0===e||e.clear()}}})};h(function(){var e,t;null===(e=r.current)||void 0===e||e.bootstrap(),g.current||(g.current=new ne),w.current||(w.current=new re),x.current||(x.current=new pe),Ae();var n=null===(t=r.current)||void 0===t?void 0:t.focusManager.subscribeToFocusChange(function(e){var t;null===(t=_.current)||void 0===t||t.filterRoutingLayersWhereDimension(e)});return function(){var e,t,i,o,a;null==n||n(),R.current=!1;try{null===(t=null===(e=g.current)||void 0===e?void 0:e.destroyGPS)||void 0===t||t.call(e)}catch(e){}try{null===(o=null===(i=w.current)||void 0===i?void 0:i.destroy)||void 0===o||o.call(i)}catch(e){}try{null===(a=r.current)||void 0===a||a.detach()}catch(e){}}},[]),h(function(){var e=F.addEventListener(function(e){fe(e.isConnected)});return function(){try{e&&e()}catch(e){}}},[]),h(function(){var n=function(){return I(t,void 0,void 0,function(){var t,n,r=this;return z(this,function(i){switch(i.label){case 0:return t=function(t){return I(r,void 0,void 0,function(){var n,r,i,o,a;return z(this,function(s){switch(s.label){case 0:return s.trys.push([0,5,,6]),n="".concat(ye+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){I(void 0,void 0,void 0,function(){var n;return z(this,function(r){switch(r.label){case 0:n="".concat(L.DocumentDirectoryPath+"/"+t),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,L.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]}})})}(eu.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,nu(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,nu(t,e.secretKey)];case 6:return[2]}var l,u})})},n=function(){return I(r,void 0,void 0,function(){var n,r,i,o,a;return z(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(),K.current=null!==n?n:K.current,[4,t("customerLayer.json")];case 2:return r=s.sent(),X.current=r.length>0?r:X.current,"firealarmteam"!==e.tileserverRoleName?[3,4]:[4,t("firealarmstyles.json")];case 3:i=s.sent(),Q.current=i.length>0?i:Q.current,s.label=4;case 4:return"airside"!==e.tileserverRoleName?[3,6]:[4,t("airsideLayers.json")];case 5:o=s.sent(),ee.current=o.length>0?o:ee.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;F.addEventListener(function(e){return I(t,void 0,void 0,function(){return z(this,function(t){switch(t.label){case 0:return r?[3,3]:(r=!0,e.isConnected?[4,n()]:[3,2]);case 1:t.sent(),t.label=2;case 2:se(!0),t.label=3;case 3:return[2]}})})})},[e.secretKey,e.tileserverRoleName]),h(function(){if(ae){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=$o(K.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)&&ee.current&&ee.current.length>0){for(var r=0;r<X.current.length;r++){(i=$o(X.current[r]))["source-layer"]="geojson",n.layers.push(i)}for(r=0;r<ee.current.length;r++){(i=$o(ee.current[r]))["source-layer"]="geojson",n.layers.push(i)}}else if("airside"===e.tileserverRoleName&&ee.current&&ee.current.length>0)for(r=0;r<ee.current.length;r++){(i=$o(ee.current[r]))["source-layer"]="geojson",n.layers.push(i)}else if("firealarmteam"===e.tileserverRoleName&&Q.current&&Q.current.length>0){for(r=0;r<X.current.length;r++){(i=$o(X.current[r]))["source-layer"]="geojson",n.layers.push(i)}for(r=0;r<Q.current.length;r++){(i=$o(Q.current[r]))["source-layer"]="geojson",n.layers.push(i)}}else for(r=0;r<X.current.length;r++){var i;(i=$o(X.current[r]))["source-layer"]="geojson",n.layers.push(i)}J(n)}},[e.tileserverRoleName,ae]),h(function(){s.current.init("https://atoms-api.sandbox.spatialverse.online",e.accessToken,e.secretKey,ye,e.tileserverRoleName)},[e.accessToken]),h(function(){console.log(de,"isNetworkConnected");var n,i=e.onRoutingStatusUpdate?e.onRoutingStatusUpdate:function(){},o=e.onSearchStatusUpdate?e.onSearchStatusUpdate:function(){};null!==de&&(de?s.current.getAtomsAPIAccessToken(function(e){return I(t,void 0,void 0,function(){var t,n,a,l,u,c;return z(this,function(h){switch(h.label){case 0:return D.current=!0,e.authenticated?[4,s.current.setupFocusTree()]:[3,2];case 1:return h.sent(),(t=Is()).length>0&&(n=t[0].taxonomyPath,(null==(a=s.current.getFlyToLocation(n,!0))?void 0:a.center)&&V({center:a.center,zoom:null!==(l=a.zoom)&&void 0!==l?l:15.5,bearing:null!==(u=a.bearing)&&void 0!==u?u:0}),null===(c=r.current)||void 0===c||c.focusManager.commit(n,{moveCamera:!0})),s.current.getRoutingStatus()!==wc.Ready&&s.current.setupRouting(i),s.current.getSearchStatus()!==wc.Ready&&s.current.setupMapObjectSearch(o),Ce(),[3,3];case 2:ke("Failed to authenticate token"),h.label=3;case 3:return[2]}})})}):(s.current.getRoutingStatus()!==wc.Ready&&s.current.setupRouting(i),s.current.getSearchStatus()!==wc.Ready&&s.current.setupMapObjectSearch(o),Ce()),me&&(n=de,I(t,void 0,void 0,function(){return z(this,function(e){return n?ue&&xe():_e(),[2]})})))},[de,me]);var Pe=i.routingManager,Me=function(){return!0===R.current&&null!==p.current};d(e.ref,function(){var t={getZoom:function(){var e;return I(this,void 0,void 0,function(){return z(this,function(t){switch(t.label){case 0:return Me()?[4,null===(e=p.current)||void 0===e?void 0:e.getZoom()]:[2,null];case 1:return[2,t.sent()]}})})},getCenter:function(){var e;return I(this,void 0,void 0,function(){return z(this,function(t){switch(t.label){case 0:return Me()?[4,null===(e=p.current)||void 0===e?void 0:e.getCenter()]:[2,null];case 1:return[2,t.sent()]}})})},getBearing:function(){var e;return I(this,void 0,void 0,function(){return z(this,function(t){switch(t.label){case 0:return Me()?[4,null===(e=p.current)||void 0===e?void 0:e.getBearing()]:[2,null];case 1:return[2,t.sent()]}})})},moveTo:function(e,t){var n;Me()&&(null===(n=f.current)||void 0===n||n.easeTo({center:e,easing:"ease",duration:t}))},zoomTo:function(e,t){var n;Me()&&(null===(n=f.current)||void 0===n||n.zoomTo(e,{duration:t,easing:"ease"}))},setupOfflineMaps:function(t){return I(this,void 0,void 0,function(){return z(this,function(n){switch(n.label){case 0:return s.current.getOfflineMapStatus()===wc.Ready?[3,2]:[4,s.current.setupOfflineMaps(e.onOfflineMapsStatusUpdate,t)];case 1:n.sent(),n.label=2;case 2:return[2]}})})},toggleMapMode:function(e){return I(this,void 0,void 0,function(){return z(this,function(t){return ve(!1),e===Vp.Offline?_e():e===Vp.Online&&xe(),[2]})})},focusTo:function(e,t){var n;void 0===t&&(t=!0),e&&(null===(n=r.current)||void 0===n||n.focusManager.commit(e,{moveCamera:t}))},subscribeToFocusChange:function(e){var t,n;return null!==(n=null===(t=r.current)||void 0===t?void 0:t.focusManager.subscribeToFocusChange(e))&&void 0!==n?n:function(){}},styleRouteLineLayer:function(e){var t;null===(t=_.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,J(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=Ys(u,t,n,i);s[r]=c}}}return e}}(i.layers,t,e,n,r);i.layers=o,J(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=$s(l,t,n);a[r]=u}}}return e}(r.layers,e,t,n);r.layers=i,J(r)},flyTo:function(e,t){var n,r,i,o;return void 0===t&&(t=!0),I(this,void 0,void 0,function(){var a,s,l,u,c;return z(this,function(h){switch(h.label){case 0:return Me()?(t||this.clearPins(),[4,null===(n=p.current)||void 0===n?void 0:n.getCenter()]):[2];case 1:return(a=h.sent())?(s=e.center?e.center:a,e.zoomLevel?(u=e.zoomLevel,[3,4]):[3,2]):[2];case 2:return[4,null===(r=p.current)||void 0===r?void 0:r.getZoom()];case 3:u=h.sent(),h.label=4;case 4:return l=u,c=2*ta(a,s,{units:"meters"}),null!==e.bearing?null===(i=f.current)||void 0===i||i.setStop({center:s,zoom:l,duration:c,bearing:e.bearing,easing:"fly"}):null===(o=f.current)||void 0===o||o.setStop({center:s,zoom:l,duration:c,easing:"fly"}),[2]}})})},getFocusTree:function(){return s.current.getFocusTree()},getWhatTaxonomies:function(){return s.current.getWhatTaxonomies()},getCurrentFocus:function(){return s.current.getCurrentFocus()},getCurrentFocusBuilding:function(){return s.current.getCurrentFocusBuilding()},getCurrentFocusFloor:function(){return s.current.getCurrentFocusFloor()},getRootNodes:function(){return Is()},getChildNodes:function(e){return function(e){return Hs(e,1)}(e)},getNodesAtDepth:function(e,t){return Hs(e,t)},getNodeDepth:function(e){return function(e){if(!e)return null;var t=null;return js(Fs(),function(n,r){n.taxonomyPath===e&&(t=r)}),t}(e)},getSubtreeMaxRelativeDepth:function(e){return Gs(e)},getSelectorTierCount:function(e){return function(e){return Gs(e)+1}(e)},findNodeByTaxonomy:function(e){return zs(e)},getAncestors:function(e){return Bs(e)},getLastClickedFeature:function(){return s.current.getLastClickedFeature()},getAllMapObjects:function(){var e;return(e=s.current).getAllMapObjects.apply(e,arguments)},getMapObjectsByName:function(){var e;return(e=s.current).getMapObjectsByName.apply(e,arguments)},getMapObjectById:function(){var e;return(e=s.current).getMapObjectById.apply(e,arguments)},getMapObjectByLocalRef:function(){var e;return(e=s.current).getMapObjectByLocalRef.apply(e,arguments)},getMapObjectsByWhatTaxonomy:function(){var e;return(e=s.current).getMapObjectsByWhatTaxonomy.apply(e,arguments)},getMapObjectsByWhereTaxonomy:function(){var e;return(e=s.current).getMapObjectsByWhereTaxonomy.apply(e,arguments)},getMapObjectsByWhatAndWhereTaxonomy:function(){var e;return(e=s.current).getMapObjectsByWhatAndWhereTaxonomy.apply(e,arguments)},getMapObjectsInWhatTaxonomy:function(){var e;return(e=s.current).getMapObjectsInWhatTaxonomy.apply(e,arguments)},getMapObjectsInWhereTaxonomy:function(){var e;return(e=s.current).getMapObjectsInWhereTaxonomy.apply(e,arguments)},getMapObjectsInWhatAndWhereTaxonomy:function(){var e;return(e=s.current).getMapObjectsInWhatAndWhereTaxonomy.apply(e,arguments)},getMidPointOfFeature:function(e){return s.current.getMidPointOfFeature(e)},dropPin:function(e,t,n){var r;return void 0===n&&(n=!0),I(this,void 0,void 0,function(){return z(this,function(i){switch(i.label){case 0:return[4,null===(r=H.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=H.current)||void 0===t||t.hidePin(e)},hidePins:function(){var e;null===(e=H.current)||void 0===e||e.hidePins()},showPin:function(e){var t;return void 0===e&&(e="-1"),I(this,void 0,void 0,function(){return z(this,function(n){switch(n.label){case 0:return[4,null===(t=H.current)||void 0===t?void 0:t.showPin(e)];case 1:return n.sent(),[2]}})})},showPins:function(){var e;null===(e=H.current)||void 0===e||e.showPins()},clearPin:function(e){var t;void 0===e&&(e="-1"),null===(t=H.current)||void 0===t||t.clearPin(e)},clearPins:function(){var e;null===(e=H.current)||void 0===e||e.clearPins()},fitViewToPins:function(e,t){var n;void 0===t&&(t=50),Me()&&(null===(n=H.current)||void 0===n||n.fitViewToPins(e,t))},fitViewToFeatures:function(e,t){var n;if(void 0===t&&(t=50),Me())if(0!==e.length){for(var r=e[0].coordinates,i=new Wd(r[0],r[1]),o=new Wd(r[0],r[1]),a=new Vd(i,o),s=0;s<e.length;s++){var l=e[s];a.extend(l.coordinates)}var u=a.toArray();null===(n=f.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={}),I(this,void 0,void 0,function(){var n;return z(this,function(r){switch(r.label){case 0:return Me()?[4,null===(t=p.current)||void 0===t?void 0:t.getCenter()]:[2];case 1:return(n=r.sent())?(i.focusManager.changeToUserViewpoint(n,e),[2]):[2]}})})},computeRoute:function(e,t,n){return I(this,void 0,void 0,function(){return z(this,function(r){switch(r.label){case 0:return[4,Pe.computeRoute(e,t,n)];case 1:return[2,r.sent()]}})})},computeRoutes:function(e,t){return I(this,void 0,void 0,function(){return z(this,function(n){switch(n.label){case 0:return[4,Pe.computeRoutes(e,t)];case 1:return[2,n.sent()]}})})},computeRoutesFromLocation:function(e,t,n,r){return void 0===r&&(r=!1),I(this,void 0,void 0,function(){return z(this,function(i){switch(i.label){case 0:return[4,Pe.computeRoutesFromLocation(e,t,n,{wheelChairAccessible:r})];case 1:return[2,i.sent()]}})})},computeRouteFromCoordinates:function(e,t,n){return I(this,void 0,void 0,function(){return z(this,function(r){switch(r.label){case 0:return[4,Pe.computeRouteFromCoordinates(e,t,n)];case 1:return[2,r.sent()]}})})},setRoutingMode:Pe.setRoutingMode,startNavigation:Pe.startNavigation,startNavigationFromCoordinates:Pe.startNavigationFromCoordinates,stopNavigation:Pe.stopNavigation,recenter:function(e){var t;return null===(t=y.current)||void 0===t?void 0:t.recenter(e)},setActiveRoute:function(e){Pe.setActiveRoute(e)},getActiveRoute:function(){return Pe.getActiveRoute()},highlightRouteSegment:function(e){return I(this,void 0,void 0,function(){return z(this,function(t){switch(t.label){case 0:return[4,Pe.highlightRouteSegment(e)];case 1:return t.sent(),[2]}})})},isPositionWithinBounds:function(e){var t,n;return null!==(n=null===(t=y.current)||void 0===t?void 0:t.isPositionWithinBounds(e))&&void 0!==n&&n},clearRoute:function(){Pe.clearRoute()},getRoutingStatus:function(){return s.current.getRoutingStatus()},getRoutingParameters:function(){return Pe.getRoutingParameters()},requestGPSPermission:function(){var e,t;return I(this,void 0,void 0,function(){return z(this,function(n){switch(n.label){case 0:return[4,null===(t=null===(e=y.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 I(this,void 0,void 0,function(){return z(this,function(n){switch(n.label){case 0:return[4,null===(t=null===(e=y.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 I(this,void 0,void 0,function(){return z(this,function(r){switch(r.label){case 0:return[4,null===(n=null===(t=y.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=y.current)||void 0===e?void 0:e.disableGPS)||void 0===t||t.call(e)},destroyGPS:function(){var e,t;null===(t=null===(e=y.current)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e)},getCameraFollowState:function(){var e,t;return null!==(t=null===(e=y.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=y.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=y.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 I(this,void 0,void 0,function(){return z(this,function(r){switch(r.label){case 0:return[4,null===(n=null===(t=y.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=y.current)||void 0===e?void 0:e.isGPSEnabled)||void 0===t?void 0:t.call(e)},isFollowing:function(){var e=y.current;if(e)return e.getCameraFollowState().isFollowing},getCurrentGPSPosition:function(){var e,t;return null===(t=null===(e=y.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=y.current)||void 0===t?void 0:t.triggerGPSUpdate)||void 0===n||n.call(t,e)},onWhereTaxonomyUpdateProposed:function(e){i.autoFocusManager.addWhereTaxonomyUpdateProposedListener(e)},onWhereTaxonomyUpdated:function(e){i.autoFocusManager.addWhereTaxonomyUpdatedListener(e)},onWhereTaxonomyAutoRejected:function(e){i.autoFocusManager.addAutoRejectionListener(e)},acceptProposal:function(e){i.autoFocusManager.acceptProposal(e)},rejectProposal:function(e){i.autoFocusManager.rejectProposal(e)},manualOverride:function(e,t){i.autoFocusManager.manualOverride(e,t)},notifyManualFloorChange:function(e){i.autoFocusManager.notifyManualFloorChange(e,!1)},isNavigating:function(){return i.navigationEngine.getIsNavigating()},getAutoFocusLastAcceptedWhereTaxonomyPath:function(){return i.autoFocusManager.getLastAcceptedTaxonomyPath()},getAutoFocusManager:function(){return i.autoFocusManager},getTaxonomyUpdateStore:function(){return i.taxonomyUpdateStore},requestCompassPermission:function(){var e,t;return I(this,void 0,void 0,function(){return z(this,function(n){switch(n.label){case 0:return[4,null===(t=null===(e=w.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 I(this,void 0,void 0,function(){return z(this,function(r){switch(r.label){case 0:return[4,null===(n=null===(t=w.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=w.current)||void 0===e?void 0:e.disableCompass)||void 0===t||t.call(e)},destroyCompass:function(){var e,t;null===(t=null===(e=w.current)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e)},isCompassEnabled:function(){var e,t;return null===(t=null===(e=w.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=w.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=w.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=w.current)||void 0===e?void 0:e.isCompassCalibrated)||void 0===t?void 0:t.call(e)}};return t},[Z,B]);var Ce=function(){!0===R.current&&!0===D.current&&!1===O.current&&e.onLoad&&(O.current=!0,e.onLoad())},ke=function(t){!1===N.current&&(N.current=!0,e.onLoadFail&&e.onLoadFail(t))},Ee={sw:[W.center[0]-.05,W.center[1]-.05],ne:[W.center[0]+.05,W.center[1]+.05]},Te=m(function(e){f.current=e,e&&Ae()},[]),Le=m(function(e){if(b.current=e,Ae(),e)return function(){var e;null===(e=r.current)||void 0===e||e.userLocation.detachMarker()}},[]);return l.createElement(a,{style:n.page,onLayout:function(e){C.current=e.nativeEvent.layout.height,k.current=e.nativeEvent.layout.width}},""!==Z?l.createElement(A,{onPress:function(n){return I(t,void 0,void 0,function(){var t,r,i,o,a,l,u,c;return z(this,function(h){switch(h.label){case 0:if(!Me())return[2];t=n.nativeEvent.point,h.label=1;case 1:return h.trys.push([1,4,,5]),[4,null===(u=p.current)||void 0===u?void 0:u.project(n.nativeEvent.lngLat)];case 2:return r=h.sent(),i=r||t,[4,null===(c=p.current)||void 0===c?void 0:c.queryRenderedFeatures(i)];case 3:return function(e){for(var t,n,r,i,o,a,l=e[0],u=0;u<e.length;u++){var c=e[u];s.current.isClickableFeature(c)&&(l=c)}if((null===(t=l.properties)||void 0===t?void 0:t.center)||l.geometry&&l.geometry.coordinates){var h=(null===(n=l.properties)||void 0===n?void 0:n.center)?l.properties.center:l.geometry.coordinates,d={mapObjectId:null===(r=l.properties)||void 0===r?void 0:r.myMapObjectId,coordinates:h,name:null===(i=l.properties)||void 0===i?void 0:i.title,whatDimension:null===(o=l.properties)||void 0===o?void 0:o.dimension_what,whereDimension:null===(a=l.properties)||void 0===a?void 0:a.dimension_where,geometry:l.geometry,properties:l.properties};s.current.setLastClickedFeature(s.current.hydrateClickedFeature(d))}}(o=h.sent()),e.onPress&&((a=null==o?void 0:o[0])?e.onPress(a):e.onPress(n.nativeEvent)),[3,5];case 4:return l=h.sent(),console.error("[onMapClicked] Error querying rendered features:",l),[3,5];case 5:return[2]}})})},onRegionWillChange:function(t){var n,r;T(t),t.nativeEvent.userInteraction&&(null===(n=y.current)||void 0===n||n.notifyUserGesture()),null===(r=e.onMoveStart)||void 0===r||r.call(e,t)},onRegionIsChanging:function(t){var n;T(t),null===(n=e.onMove)||void 0===n||n.call(e,t)},onRegionDidChange:function(n){return I(t,void 0,void 0,function(){var t;return z(this,function(r){return T(n),null===(t=e.onMoveEnd)||void 0===t||t.call(e,n),[2]})})},onDidFinishLoadingMap:function(){var e;!1===R.current&&(R.current=!0,null===(e=r.current)||void 0===e||e.notifyMapLoaded(),Ce())},onDidFailLoadingMap:function(){R.current=!1,ke("Failed to load map style")},style:n.map,logo:!1,ref:p,mapStyle:Z||null,attribution:!1,compass:!1},l.createElement(P,{ref:Te,duration:2e3,easing:"ease",initialViewState:{center:W.center,zoom:W.zoom,bearing:W.bearing,bounds:[Ee.sw[0],Ee.sw[1],Ee.ne[0],Ee.ne[1]]},maxZoom:22,minZoom:12}),l.createElement($p,{isOffline:ue,tileServer:we,props:e}),l.createElement(rl,{ref:_,metaAtlasCoreRef:s,triggerRender:function(){return U(!B)}}),l.createElement(v,{id:"boundary",data:qd}),l.createElement(M,{images:{"arrow-marker":"".concat(ye,"assets/gps-arrow.png")}}),l.createElement(oe,{ref:Le,position:null,showAccuracy:!0,pulse:!1}),l.createElement(Zp,{ref:H,cameraRef:f,metaAtlasCoreRef:s}),e.children):null)}Zp.displayName="MarkerOverlayContainer",function(e){e.Offline="offline",e.Online="online"}(Vp||(Vp={}));var $p=function(e){var t=e.isOffline,n=e.tileServer,r=e.props,i=u(""),o=i[0],a=i[1];return h(function(){var e;try{if(!xc||"function"!=typeof xc.getState)return void console.error("Invalid useMBTilesDataStore provided");var r=null===(e=xc.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");a(i)}catch(e){console.error("Error setting up vector source:",e)}},[t,r]),""===o?null:l.createElement(C,{id:"custom",key:t?"offline":"online",url:o})};export{ju as LocationType,Yp as MetaAtlasSDK,Nd as NavigationStartError,Vu as ROUTE_MODE_REQUIRED_SENSORS,Gu as RouteMode,qu as resolveRequiredSensors};
|
|
30
30
|
//# sourceMappingURL=index.js.map
|