(this.webpackJsonpapp=this.webpackJsonpapp||[]).push([[2],[function(t,e,n){"use strict";t.exports=n(167)},function(t,e,n){t.exports=n(172)()},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){for(var n=0;n=-90&&i<=90,"invalid latitude");var o=i*L;return[(e*=F)*(r*L+z)/(2*z),e*(z-Math.log(Math.tan(R+.5*o)))/(2*z)]}function q(t,e){var n=_(t,2),r=n[0],i=n[1],o=r/(e*=F)*(2*z)-z,a=2*(Math.atan(Math.exp(z-i/e*(2*z)))-R);return[o*D,a*D]}function W(t){var e=t.latitude,n=t.longitude,r=t.zoom,i=t.scale,o=t.highPrecision,a=void 0!==o&&o;i=void 0!==i?i:N(r),A(Number.isFinite(e)&&Number.isFinite(n)&&Number.isFinite(i));var s={},u=F*i,l=Math.cos(e*L),c=u/360,p=c/l,h=u/j/l;if(s.pixelsPerMeter=[h,-h,h],s.metersPerPixel=[1/h,-1/h,1/h],s.pixelsPerDegree=[c,-p,h],s.degreesPerPixel=[1/c,-1/p,1/h],a){var f=L*Math.tan(e*L)/l,d=c*f/2,m=u/j*f,y=m/p*h;s.pixelsPerDegree2=[0,-d,m],s.pixelsPerMeter2=[y,0,y]}return s}function Z(t){var e,n,r=t.height,i=t.pitch,o=t.bearing,a=t.altitude,s=t.center,u=void 0===s?null:s,l=t.flipY,c=void 0!==l&&l,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return k(p,p,[0,0,-a]),T(p,p,[1,1,1/r]),function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],p=e[10],h=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+l*r,t[5]=a*i+c*r,t[6]=s*i+p*r,t[7]=u*i+h*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=p*i-s*r,t[11]=h*i-u*r}(p,p,-i*L),function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],p=e[6],h=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+l*r,t[1]=a*i+c*r,t[2]=s*i+p*r,t[3]=u*i+h*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=p*i-s*r,t[7]=h*i-u*r}(p,p,o*L),c&&T(p,p,[1,-1,1]),u&&k(p,p,((e=[])[0]=-(n=u)[0],e[1]=-n[1],e[2]=-n[2],e)),p}function G(t){var e=t.width,n=t.height,r=t.pitch,i=function(t){var e=t.width,n=t.height,r=t.altitude,i=void 0===r?B:r,o=t.pitch,a=void 0===o?0:o,s=t.nearZMultiplier,u=void 0===s?1:s,l=t.farZMultiplier,c=void 0===l?1:l,p=a*L,h=Math.atan(.5/i),f=Math.sin(h)*i/Math.sin(Math.PI/2-p-h),d=Math.cos(Math.PI/2-p)*f+i;return{fov:2*Math.atan(n/2/i),aspect:e/n,focalDistance:i,near:u,far:d*c}}({width:e,height:n,altitude:t.altitude,pitch:r,nearZMultiplier:t.nearZMultiplier,farZMultiplier:t.farZMultiplier});return function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}([],i.fov,i.aspect,i.near,i.far)}function H(t,e){var n=_(t,3),r=n[0],i=n[1],o=n[2],a=void 0===o?0:o;return A(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(a)),w(e,[r,i,a,1])}function K(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=_(t,3),i=r[0],o=r[1],a=r[2];if(A(Number.isFinite(i)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(a))return w(e,[i,o,a,1]);var s=w(e,[i,o,0,1]),u=w(e,[i,o,1,1]),l=s[2],c=u[2];return function(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}([],s,u,l===c?0:((n||0)-l)/(c-l))}var X=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function Y(t){var e=t.width,n=t.height,r=t.bounds,i=t.minExtent,o=void 0===i?0:i,a=t.maxZoom,s=void 0===a?24:a,u=t.padding,l=void 0===u?0:u,c=t.offset,p=void 0===c?[0,0]:c,h=_(r,2),f=_(h[0],2),d=f[0],m=f[1],y=_(h[1],2),v=y[0],g=y[1];if(Number.isFinite(l)){l={top:l,bottom:l,left:l,right:l}}else A(Number.isFinite(l.top)&&Number.isFinite(l.bottom)&&Number.isFinite(l.left)&&Number.isFinite(l.right));var b=new $({width:e,height:n,longitude:0,latitude:0,zoom:0}),x=b.project([d,g]),w=b.project([v,m]),S=[Math.max(Math.abs(w[0]-x[0]),o),Math.max(Math.abs(w[1]-x[1]),o)],E=[e-l.left-l.right-2*Math.abs(p[0]),n-l.top-l.bottom-2*Math.abs(p[1])];A(E[0]>0&&E[1]>0);var k=E[0]/S[0],T=E[1]/S[1],C=(l.right-l.left)/2/k,O=(l.bottom-l.top)/2/T,P=[(w[0]+x[0])/2+C,(w[1]+x[1])/2+O],M=b.unproject(P),I=b.zoom+Math.log2(Math.abs(Math.min(k,T)));return{longitude:M[0],latitude:M[1],zoom:Math.min(I,s)}}var $=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.width,o=n.height,a=n.latitude,c=void 0===a?0:a,p=n.longitude,h=void 0===p?0:p,f=n.zoom,d=void 0===f?0:f,m=n.pitch,y=void 0===m?0:m,v=n.bearing,g=void 0===v?0:v,_=n.altitude,b=void 0===_?1.5:_,x=n.nearZMultiplier,w=n.farZMultiplier;Object(i.a)(this,e),r=r||1,o=o||1;var S=N(d);b=Math.max(.75,b);var E=V([h,c],S);E[2]=0;var k=G({width:r,height:o,pitch:y,bearing:g,altitude:b,nearZMultiplier:x||1/o,farZMultiplier:w||1.01}),T=Z({height:o,center:E,pitch:y,bearing:g,altitude:b,flipY:!0});return(t=u(this,l(e).call(this,{width:r,height:o,viewMatrix:T,projectionMatrix:k}))).latitude=c,t.longitude=h,t.zoom=d,t.pitch=y,t.bearing=g,t.altitude=b,t.scale=S,t.center=E,t.pixelsPerMeter=W(s(s(t))).pixelsPerMeter[2],Object.freeze(s(s(t))),t}return h(e,t),Object(c.a)(e,[{key:"projectFlat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return V(t,e)}},{key:"unprojectFlat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return q(t,e)}},{key:"getMapCenterByLngLatPosition",value:function(t){var e,n,r=t.lngLat,i=K(t.pos,this.pixelUnprojectionMatrix),o=O([],V(r,this.scale),((e=[])[0]=-(n=i)[0],e[1]=-n[1],e));return q(O([],this.center,o),this.scale)}},{key:"getLocationAtPoint",value:function(t){var e=t.lngLat,n=t.pos;return this.getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"fitBounds",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,o=Y(Object.assign({width:r,height:i,bounds:t},n)),a=o.longitude,s=o.latitude,u=o.zoom;return new e({width:r,height:i,longitude:a,latitude:s,zoom:u})}}]),e}(function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width,r=e.height,o=e.viewMatrix,a=void 0===o?X:o,s=e.projectionMatrix,u=void 0===s?X:s;Object(i.a)(this,t),this.width=n||1,this.height=r||1,this.scale=1,this.pixelsPerMeter=1,this.viewMatrix=a,this.projectionMatrix=u;var l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];E(l,l,this.projectionMatrix),E(l,l,this.viewMatrix),this.viewProjectionMatrix=l;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];T(c,c,[this.width/2,-this.height/2,1]),k(c,c,[1,-1,0]),E(c,c,this.viewProjectionMatrix);var p=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],y=e[14],v=e[15],g=n*s-r*a,_=n*u-i*a,b=n*l-o*a,x=r*u-i*s,w=r*l-o*s,S=i*l-o*u,E=c*m-p*d,k=c*y-h*d,T=c*v-f*d,C=p*y-h*m,O=p*v-f*m,P=h*v-f*y,M=g*P-_*O+b*C+x*T-w*k+S*E;return M?(M=1/M,t[0]=(s*P-u*O+l*C)*M,t[1]=(i*O-r*P-o*C)*M,t[2]=(m*S-y*w+v*x)*M,t[3]=(h*w-p*S-f*x)*M,t[4]=(u*T-a*P-l*k)*M,t[5]=(n*P-i*T+o*k)*M,t[6]=(y*b-d*S-v*_)*M,t[7]=(c*S-h*b+f*_)*M,t[8]=(a*O-s*T+l*E)*M,t[9]=(r*T-n*O-o*E)*M,t[10]=(d*w-m*b+v*g)*M,t[11]=(p*b-c*w-f*g)*M,t[12]=(s*k-a*C-u*E)*M,t[13]=(n*C-r*k+i*E)*M,t[14]=(m*_-d*x-y*g)*M,t[15]=(c*x-p*_+h*g)*M,t):null}([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],c);if(!p)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=c,this.pixelUnprojectionMatrix=p,this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return Object(c.a)(t,[{key:"equals",value:function(e){return e instanceof t&&(e.width===this.width&&e.height===this.height&&C(e.projectionMatrix,this.projectionMatrix)&&C(e.viewMatrix,this.viewMatrix))}},{key:"project",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,i=this.projectPosition(t),o=H(i,this.pixelProjectionMatrix),a=_(o,2),s=a[0],u=a[1],l=r?u:this.height-u;return 2===t.length?[s,l]:[s,l,o[2]]}},{key:"unproject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,i=e.targetZ,o=_(t,3),a=o[0],s=o[1],u=o[2],l=r?s:this.height-s,c=i&&i*this.pixelsPerMeter,p=K([a,l,u],this.pixelUnprojectionMatrix,c),h=this.unprojectPosition(p),f=_(h,3),d=f[0],m=f[1],y=f[2];return Number.isFinite(u)?[d,m,y]:Number.isFinite(i)?[d,m,i]:[d,m]}},{key:"projectPosition",value:function(t){var e=_(this.projectFlat(t),2);return[e[0],e[1],(t[2]||0)*this.pixelsPerMeter]}},{key:"unprojectPosition",value:function(t){var e=_(this.unprojectFlat(t),2);return[e[0],e[1],(t[2]||0)/this.pixelsPerMeter]}},{key:"projectFlat",value:function(t){arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return t}},{key:"unprojectFlat",value:function(t){arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return t}}]),t}()),J=n(135),Q=n(57),tt=n(94),et=n.n(tt),nt=85.05113,rt=-85.05113;var it=1e-9;function ot(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function at(t,e){if(t===e)return!0;if(ot(t)&&ot(e)){if(t.length!==e.length)return!1;for(var n=0;n180&&(n=n<0?n+360:n-360),n}var gt=["longitude","latitude","zoom","bearing","pitch"],_t=["latitude","longitude","zoom","width","height"],bt=["bearing","pitch"],xt=function(t){function e(){var t,n;Object(i.a)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a3&&void 0!==arguments[3]?arguments[3]:{}),a=o.startZoom,s=o.startCenterXY,u=o.uDelta,l=o.w0,c=o.u1,p=o.S,h=o.rho,f=o.rho2,d=o.r0;if(Math.abs(c)0&&void 0!==arguments[0]?arguments[0]:{};return Object(i.a)(this,e),t=u(this,l(e).call(this)),Object(f.a)(s(t),"around",void 0),Array.isArray(n)&&(n={transitionProps:n}),t.propNames=n.transitionProps||wt,n.around&&(t.around=n.around),t}return h(e,t),Object(c.a)(e,[{key:"initializeProps",value:function(t,e){var n={},r={};if(this.around){n.around=this.around;var i=new $(t).unproject(this.around);Object.assign(r,e,{around:new $(e).project(i),aroundLngLat:i})}var o=!0,a=!1,s=void 0;try{for(var u,l=this.propNames[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value,p=t[c],h=e[c];lt(yt(p)&&yt(h),"".concat(c," must be supplied for transition")),n[c]=p,r[c]=vt(c,p,h)}}catch(f){a=!0,s=f}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}return{start:n,end:r}}},{key:"interpolateProps",value:function(t,e,n){var r={},i=!0,o=!1,a=void 0;try{for(var s,u=this.propNames[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=s.value;r[l]=ut(t[l],e[l],n)}}catch(f){o=!0,a=f}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}if(e.around){var c=_(new $(Object.assign({},e,r)).getMapCenterByLngLatPosition({lngLat:e.aroundLngLat,pos:ut(t.around,e.around,n)}),2),p=c[0],h=c[1];r.longitude=p,r.latitude=h}return r}}]),e}(ct),Et={minZoom:0,maxZoom:24,minPitch:0,maxPitch:60},kt={pitch:0,bearing:0,altitude:1.5},Tt=function(){function t(e){var n=e.width,r=e.height,o=e.latitude,a=e.longitude,s=e.zoom,u=e.bearing,l=void 0===u?kt.bearing:u,c=e.pitch,p=void 0===c?kt.pitch:c,h=e.altitude,d=void 0===h?kt.altitude:h,m=e.maxZoom,y=void 0===m?Et.maxZoom:m,v=e.minZoom,g=void 0===v?Et.minZoom:v,_=e.maxPitch,b=void 0===_?Et.maxPitch:_,x=e.minPitch,w=void 0===x?Et.minPitch:x,S=e.transitionDuration,E=e.transitionEasing,k=e.transitionInterpolator,T=e.transitionInterruption,C=e.startPanLngLat,O=e.startZoomLngLat,P=e.startBearing,M=e.startPitch,I=e.startZoom;Object(i.a)(this,t),Object(f.a)(this,"_viewportProps",void 0),Object(f.a)(this,"_interactiveState",void 0),lt(Number.isFinite(n),"`width` must be supplied"),lt(Number.isFinite(r),"`height` must be supplied"),lt(Number.isFinite(a),"`longitude` must be supplied"),lt(Number.isFinite(o),"`latitude` must be supplied"),lt(Number.isFinite(s),"`zoom` must be supplied"),this._viewportProps=this._applyConstraints({width:n,height:r,latitude:o,longitude:a,zoom:s,bearing:l,pitch:p,altitude:d,maxZoom:y,minZoom:g,maxPitch:b,minPitch:w,transitionDuration:S,transitionEasing:E,transitionInterpolator:k,transitionInterruption:T}),this._interactiveState={startPanLngLat:C,startZoomLngLat:O,startBearing:P,startPitch:M,startZoom:I}}return Object(c.a)(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"panStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startPanLngLat:this._unproject(e)})}},{key:"pan",value:function(t){var e=t.pos,n=t.startPos,r=this._interactiveState.startPanLngLat||this._unproject(n);if(!r)return this;var i=_(this._calculateNewLngLat({startPanLngLat:r,pos:e}),2),o=i[0],a=i[1];return this._getUpdatedMapState({longitude:o,latitude:a})}},{key:"panEnd",value:function(){return this._getUpdatedMapState({startPanLngLat:null})}},{key:"rotateStart",value:function(t){t.pos;return this._getUpdatedMapState({startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(t){var e=t.deltaScaleX,n=void 0===e?0:e,r=t.deltaScaleY,i=void 0===r?0:r,o=this._interactiveState,a=o.startBearing,s=o.startPitch;if(!Number.isFinite(a)||!Number.isFinite(s))return this;var u=this._calculateNewPitchAndBearing({deltaScaleX:n,deltaScaleY:i,startBearing:a||0,startPitch:s||0}),l=u.pitch,c=u.bearing;return this._getUpdatedMapState({bearing:c,pitch:l})}},{key:"rotateEnd",value:function(){return this._getUpdatedMapState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startZoomLngLat:this._unproject(e),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.pos,n=t.startPos,r=t.scale;lt(r>0,"`scale` must be a positive number");var i=this._interactiveState,o=i.startZoom,a=i.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,a=this._unproject(n)||this._unproject(e)),lt(a,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var s=this._calculateNewZoom({scale:r,startZoom:o||0}),u=_(new $(Object.assign({},this._viewportProps,{zoom:s})).getMapCenterByLngLatPosition({lngLat:a,pos:e}),2),l=u[0],c=u[1];return this._getUpdatedMapState({zoom:s,longitude:l,latitude:c})}},{key:"zoomEnd",value:function(){return this._getUpdatedMapState({startZoomLngLat:null,startZoom:null})}},{key:"_getUpdatedMapState",value:function(e){return new t(Object.assign({},this._viewportProps,this._interactiveState,e))}},{key:"_applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom;t.zoom=st(r,n,e);var i=t.maxPitch,o=t.minPitch,a=t.pitch;return t.pitch=st(a,o,i),Object.assign(t,function(t){var e=t.width,n=t.height,r=t.longitude,i=t.latitude,o=t.zoom,a=t.pitch,s=void 0===a?0:a,u=t.bearing,l=void 0===u?0:u;(r<-180||r>180)&&(r=S(r+180,360)-180),(l<-180||l>180)&&(l=S(l+180,360)-180);var c=new $({width:e,height:n,longitude:r,latitude:i,zoom:o}),p=c.project([r,nt])[1],h=c.project([r,rt])[1],f=0;return h-p0?f=p:h0?u=i+n*(s-i):n<0&&(u=i-n*(a-i)),{pitch:u,bearing:r+180*e}}}]),t}();var Ct=Object(d.createContext)({viewport:null,map:null,mapContainer:null,onViewportChange:null,onViewStateChange:null,eventManager:null,isDragging:!1});function Ot(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pt(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};return n._map.queryRenderedFeatures(t,e)})),Object(f.a)(s(n),"_mapboxMapError",(function(t){(t.error&&t.error.status||t.status)!==It||n.state.accessTokenInvalid||(console.error(Mt),n.setState({accessTokenInvalid:!0})),n.props.onError(t)})),n}return h(e,t),Object(c.a)(e,[{key:"componentDidMount",value:function(){if(e.supported()){var t=this.props.mapStyle;this._mapbox=new Q.a(Object.assign({},this.props,{mapboxgl:et.a,width:this._width,height:this._height,container:this._mapboxMapRef.current,onError:this._mapboxMapError,mapStyle:g(t)})),this._map=this._mapbox.getMap()}}},{key:"componentDidUpdate",value:function(t){this._mapbox&&(this._updateMapStyle(t,this.props),this._updateMapProps(this.props))}},{key:"componentWillUnmount",value:function(){this._mapbox&&(this._mapbox.finalize(),this._mapbox=null,this._map=null)}},{key:"_updateMapSize",value:function(t,e){this._width===t&&this._height===e||(this._width=t,this._height=e,this._updateMapProps(this.props))}},{key:"_updateMapStyle",value:function(t,e){var n=e.mapStyle;n!==t.mapStyle&&this._map.setStyle(g(n),{diff:!this.props.preventStyleDiffing})}},{key:"_updateMapProps",value:function(t){this._mapbox&&this._mapbox.setProps(Object.assign({},t,{width:this._width,height:this._height}))}},{key:"_renderNoTokenWarning",value:function(){if(this.state.accessTokenInvalid&&!this.props.disableTokenWarning){return m.a.createElement("div",{key:"warning",id:"no-token-warning",style:{position:"absolute",left:0,top:0}},m.a.createElement("h3",{key:"header"},"NO_TOKEN_WARNING"),m.a.createElement("div",{key:"text"},"For information on setting up your basemap, read"),m.a.createElement("a",{key:"link",href:"https://uber.github.io/react-map-gl/#/Documentation/getting-started/about-mapbox-tokens"},"Note on Map Tokens"))}return null}},{key:"_renderOverlays",value:function(t){var e=this,n=t.width,r=void 0===n?Number(this.props.width):n,i=t.height,o=void 0===i?Number(this.props.height):i;return this._updateMapSize(r,o),m.a.createElement(Ct.Consumer,null,(function(t){var n=Pt({},t,{viewport:new $(Pt({},e.props,{},e.props.viewState,{width:r,height:o})),map:e._map,mapContainer:t.mapContainer||e._mapContainerRef.current});return m.a.createElement(Ct.Provider,{value:n},m.a.createElement("div",{key:"map-overlays",className:"overlays",style:At},e.props.children))}))}},{key:"render",value:function(){var t=this.props,e=t.className,n=t.width,r=t.height,i=t.style,o=t.visibilityConstraints,a=Object.assign({position:"relative"},i,{width:n,height:r}),s=this.props.visible&&function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Et;for(var r in n){var i=r.slice(0,3),o=(e=r.slice(3))[0].toLowerCase()+e.slice(1);if("min"===i&&t[o]n[r])return!1}return!0}(this.props.viewState||this.props,o),u=Object.assign({},At,{visibility:s?"inherit":"hidden"});return m.a.createElement("div",{key:"map-container",style:a,ref:this._mapContainerRef},m.a.createElement("div",{key:"map-mapbox",ref:this._mapboxMapRef,style:u,className:e}),m.a.createElement(J.a,{key:"autosizer",disableWidth:Number.isFinite(n),disableHeight:Number.isFinite(r),onResize:this.props.onResize},this._renderOverlays.bind(this)),this._renderNoTokenWarning())}}],[{key:"supported",value:function(){return et.a&&et.a.supported()}}]),e}(d.PureComponent);Object(f.a)(Lt,"propTypes",zt),Object(f.a)(Lt,"defaultProps",Rt);var Dt=function(){};var Ft=1,jt=2,Bt=3,Nt=4,Ut={transitionDuration:0,transitionEasing:function(t){return t},transitionInterpolator:new St,transitionInterruption:Ft,onTransitionStart:Dt,onTransitionInterrupt:Dt,onTransitionEnd:Dt,onViewportChange:Dt,onStateChange:Dt},Vt=function(){function t(e,n){var r=this;Object(i.a)(this,t),Object(f.a)(this,"props",void 0),Object(f.a)(this,"state",void 0),Object(f.a)(this,"time",void 0),Object(f.a)(this,"_animationFrame",null),Object(f.a)(this,"_onTransitionFrame",(function(){r._animationFrame=requestAnimationFrame(r._onTransitionFrame),r._updateViewport()})),e&&(this.props=e),this.time=n||Date.now}return Object(c.a)(t,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(t){var e=this.props;if(this.props=t,this._shouldIgnoreViewportChange(e,t))return!1;if(this._isTransitionEnabled(t)){var n=Object.assign({},e),r=Object.assign({},t);if(this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this.state.interruption===jt?Object.assign(n,this.state.endProps):Object.assign(n,this.state.propsInTransition),this.state.interruption===Nt)){var i=this.time(),o=(i-this.state.startTime)/this.state.duration;r.transitionDuration=this.state.duration-(i-this.state.startTime),r.transitionEasing=function(t,e){var n=t(e);return function(r){return 1/(1-n)*(t(r*(1-e)+e)-n)}}(this.state.easing,o),r.transitionInterpolator=n.transitionInterpolator}return r.onTransitionStart(),this._triggerTransition(n,r),!0}return this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return Boolean(this._animationFrame)}},{key:"_isTransitionEnabled",value:function(t){return t.transitionDuration>0&&Boolean(t.transitionInterpolator)}},{key:"_isUpdateDueToCurrentTransition",value:function(t){return!!this.state.propsInTransition&&this.state.interpolator.arePropsEqual(t,this.state.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(t,e){return!t||(this._isTransitionInProgress()?this.state.interruption===Bt||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e))}},{key:"_triggerTransition",value:function(t,e){lt(this._isTransitionEnabled(e),"Transition is not enabled"),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var n=e.transitionInterpolator.initializeProps(t,e),r={inTransition:!0,isZooming:t.zoom!==e.zoom,isPanning:t.longitude!==e.longitude||t.latitude!==e.latitude,isRotating:t.bearing!==e.bearing||t.pitch!==e.pitch};this.state={duration:e.transitionDuration,easing:e.transitionEasing,interpolator:e.transitionInterpolator,interruption:e.transitionInterruption,startTime:this.time(),startProps:n.start,endProps:n.end,animation:null,propsInTransition:{},interactionState:r},this._onTransitionFrame(),this.props.onStateChange(r)}},{key:"_endTransition",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this.props.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1})}},{key:"_updateViewport",value:function(){var t=this.time(),e=this.state,n=e.startTime,r=e.duration,i=e.easing,o=e.interpolator,a=e.startProps,s=e.endProps,u=!1,l=(t-n)/r;l>=1&&(l=1,u=!0),l=i(l);var c=o.interpolateProps(a,s,l),p=new Tt(Object.assign({},this.props,c));this.state.propsInTransition=p.getViewportProps(),this.props.onViewportChange(this.state.propsInTransition,this.state.interactionState,this.props),u&&(this._endTransition(),this.props.onTransitionEnd())}}]),t}();Object(f.a)(Vt,"defaultProps",Ut);var qt=n(49),Wt=n.n(qt),Zt=1,Gt=2,Ht=4,Kt={mousedown:Zt,mousemove:Gt,mouseup:Ht};!function(t){var e=t.prototype.handler;t.prototype.handler=function(t){var n=this.store;t.button>0&&(function(t,e){for(var n=0;n=0&&(this.pressed=!0),e&Gt&&0===t.which&&(e=Ht),this.pressed&&(e&Ht&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))};var Xt=Wt.a.Manager,Yt=Wt.a,$t=Yt?[[Yt.Rotate,{enable:!1}],[Yt.Pinch,{enable:!1}],[Yt.Swipe,{enable:!1}],[Yt.Pan,{threshold:0,enable:!1}],[Yt.Press,{enable:!1}],[Yt.Tap,{event:"doubletap",taps:2,enable:!1}],[Yt.Tap,{event:"anytap",enable:!1}],[Yt.Tap,{enable:!1}]]:null,Jt={rotate:["pinch"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},Qt={doubletap:["tap"]},te={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},ee=["keydown","keyup"],ne=["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],re=["wheel","mousewheel","DOMMouseScroll"],ie={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},oe={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},ae=n(37),se=-1!==ae.b.indexOf("firefox"),ue=re,le=function(){function t(e,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,t),this.element=e,this.callback=n,this.options=Object.assign({enable:!0},o),this.events=ue.concat(o.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((function(t){return e.addEventListener(t,r.handleEvent,!!ae.a&&{passive:!1})}))}return Object(c.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"wheel"===t&&(this.options.enable=e)}},{key:"handleEvent",value:function(t){if(this.options.enable){var e=t.deltaY;ae.c.WheelEvent&&(se&&t.deltaMode===ae.c.WheelEvent.DOM_DELTA_PIXEL&&(e/=ae.c.devicePixelRatio),t.deltaMode===ae.c.WheelEvent.DOM_DELTA_LINE&&(e*=40));var n={x:t.clientX,y:t.clientY};0!==e&&e%4.000244140625===0&&(e=Math.floor(e/4.000244140625)),t.shiftKey&&e&&(e*=.25),this._onWheel(t,-e,n)}}},{key:"_onWheel",value:function(t,e,n){this.callback({type:"wheel",center:n,delta:e,srcEvent:t,pointerType:"mouse",target:t.target})}}]),t}(),ce=ne,pe=function(){function t(e,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,t),this.element=e,this.callback=n,this.pressed=!1,this.options=Object.assign({enable:!0},o),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=ce.concat(o.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((function(t){return e.addEventListener(t,r.handleEvent)}))}return Object(c.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"pointermove"===t&&(this.enableMoveEvent=e),"pointerover"===t&&(this.enableOverEvent=e),"pointerout"===t&&(this.enableOutEvent=e),"pointerleave"===t&&(this.enableLeaveEvent=e)}},{key:"handleEvent",value:function(t){this.handleOverEvent(t),this.handleOutEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)}},{key:"handleOverEvent",value:function(t){this.enableOverEvent&&"mouseover"===t.type&&this.callback({type:"pointerover",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleOutEvent",value:function(t){this.enableOutEvent&&"mouseout"===t.type&&this.callback({type:"pointerout",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleLeaveEvent",value:function(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this.callback({type:"pointerleave",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleMoveEvent",value:function(t){if(this.enableMoveEvent)switch(t.type){case"mousedown":t.button>=0&&(this.pressed=!0);break;case"mousemove":0===t.which&&(this.pressed=!1),this.pressed||this.callback({type:"pointermove",srcEvent:t,pointerType:"mouse",target:t.target});break;case"mouseup":this.pressed=!1}}}]),t}(),he=ee,fe=function(){function t(e,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,t),this.element=e,this.callback=n,this.options=Object.assign({enable:!0},o),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=he.concat(o.events||[]),this.handleEvent=this.handleEvent.bind(this),e.tabIndex=1,e.style.outline="none",this.events.forEach((function(t){return e.addEventListener(t,r.handleEvent)}))}return Object(c.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"keydown"===t&&(this.enableDownEvent=e),"keyup"===t&&(this.enableUpEvent=e)}},{key:"handleEvent",value:function(t){var e=t.target||t.srcElement;"INPUT"===e.tagName&&"text"===e.type||"TEXTAREA"===e.tagName||(this.enableDownEvent&&"keydown"===t.type&&this.callback({type:"keydown",srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:"keyup",srcEvent:t,key:t.key,target:t.target}))}}]),t}(),de=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,t),this.element=e,this.callback=n,this.options=Object.assign({enable:!0},r),this.handleEvent=this.handleEvent.bind(this),e.addEventListener("contextmenu",this.handleEvent)}return Object(c.a)(t,[{key:"destroy",value:function(){this.element.removeEventListener("contextmenu",this.handleEvent)}},{key:"enableEventType",value:function(t,e){"contextmenu"===t&&(this.options.enable=e)}},{key:"handleEvent",value:function(t){this.options.enable&&this.callback({type:"contextmenu",center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}]),t}(),me=1,ye=2,ve=4,ge={pointerdown:me,pointermove:ye,pointerup:ve,mousedown:me,mousemove:ye,mouseup:ve},_e=1,be=2,xe=3,we=0,Se=1,Ee=2,ke=1,Te=2,Ce=4;var Oe=function(){function t(e){Object(i.a)(this,t),this.eventManager=e,this.handlers=[],this.handlersByElement=new Map,this.handleEvent=this.handleEvent.bind(this)}return Object(c.a)(t,[{key:"isEmpty",value:function(){return 0===this.handlers.length}},{key:"add",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"root",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.handlers,o=this.handlersByElement;o.has(n)||o.set(n,[]);var a={type:t,handler:e,srcElement:n,once:r};i.push(a),o.get(n).push(a)}},{key:"remove",value:function(t,e){for(var n=this.handlers,r=this.handlersByElement,i=n.length-1;i>=0;i--){var o=n[i];if(o.type===t&&o.handler===e){n.splice(i,1);var a=r.get(o.srcElement);a.splice(a.indexOf(o),1),0===a.length&&r.delete(o.srcElement)}}}},{key:"handleEvent",value:function(t){if(!this.isEmpty()){for(var e=this._normalizeEvent(t),n=t.srcEvent.target;n&&n!==e.rootElement;){if(this._emit(e,n),e.handled)return;n=n.parentNode}this._emit(e,"root")}}},{key:"_emit",value:function(t,e){var n=this.handlersByElement.get(e);if(n){for(var r=!1,i=function(){t.handled=!0},o=function(){t.handled=!0,r=!0},a=[],s=0;s0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,t),this.options=Object.assign({},Pe,n),this.events=new Map,this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(e);var r=n.events;r&&this.on(r)}return Object(c.a)(t,[{key:"setElement",value:function(t){var e=this;if(this.element&&this.destroy(),this.element=t,t){var n=this.options,r=n.Manager;for(var i in this.manager=new r(t,{touchAction:n.touchAction,recognizers:n.recognizers||$t}).on("hammer.input",this._onBasicInput),n.recognizers||Object.keys(Jt).forEach((function(t){var n=e.manager.get(t);n&&Jt[t].forEach((function(t){n.recognizeWith(t)}))})),n.recognizerOptions){var o=this.manager.get(i);if(o){var a=n.recognizerOptions[i];delete a.enable,o.set(a)}}this.wheelInput=new le(t,this._onOtherEvent,{enable:!1}),this.moveInput=new pe(t,this._onOtherEvent,{enable:!1}),this.keyInput=new fe(t,this._onOtherEvent,{enable:!1}),this.contextmenuInput=new de(t,this._onOtherEvent,{enable:!1});var s=!0,u=!1,l=void 0;try{for(var c,p=this.events[Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var h=_(c.value,2),f=h[0],d=h[1];d.isEmpty()||(this._toggleRecognizer(d.recognizerName,!0),this.manager.on(f,d.handleEvent))}}catch(m){u=!0,l=m}finally{try{s||null==p.return||p.return()}finally{if(u)throw l}}}}},{key:"destroy",value:function(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}},{key:"on",value:function(t,e,n){this._addEventHandler(t,e,n,!1)}},{key:"once",value:function(t,e,n){this._addEventHandler(t,e,n,!0)}},{key:"off",value:function(t,e){this._removeEventHandler(t,e)}},{key:"_toggleRecognizer",value:function(t,e){var n=this.manager;if(n){var r=n.get(t);if(r&&r.options.enable!==e){r.set({enable:e});var i=Qt[t];i&&!this.options.recognizers&&i.forEach((function(i){var o=n.get(i);e?(o.requireFailure(t),r.dropRequireFailure(i)):o.dropRequireFailure(t)}))}this.wheelInput.enableEventType(t,e),this.moveInput.enableEventType(t,e),this.keyInput.enableEventType(t,e),this.contextmenuInput.enableEventType(t,e)}}},{key:"_addEventHandler",value:function(t,e,n,r){if("string"===typeof t){var i=this.manager,o=this.events,a=oe[t]||t,s=o.get(a);s||(s=new Oe(this),o.set(a,s),s.recognizerName=ie[a]||a,i&&i.on(a,s.handleEvent)),this._toggleRecognizer(s.recognizerName,!0),s.add(t,e,n,r)}else for(var u in n=e,t)this._addEventHandler(u,t[u],n,r)}},{key:"_removeEventHandler",value:function(t,e){if("string"===typeof t){var n=this.events,r=oe[t]||t,i=n.get(r);if(i&&(i.remove(t,e),i.isEmpty())){var o=i.recognizerName,a=!1,s=!0,u=!1,l=void 0;try{for(var c,p=n.values()[Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var h=c.value;if(h.recognizerName===o&&!h.isEmpty()){a=!0;break}}}catch(d){u=!0,l=d}finally{try{s||null==p.return||p.return()}finally{if(u)throw l}}a||this._toggleRecognizer(o,!1)}}else for(var f in t)this._removeEventHandler(f,t[f])}},{key:"_onBasicInput",value:function(t){var e=t.srcEvent,n=te[e.type];n&&this.manager.emit(n,t)}},{key:"_onOtherEvent",value:function(t){this.manager.emit(t.type,t)}}]),t}();var Ie={transitionDuration:0},Ae={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new St,transitionInterruption:Ft},ze=["wheel"],Re=["panstart","panmove","panend"],Le=["pinchstart","pinchmove","pinchend","pinchcancel"],De=["doubletap"],Fe=["keydown"],je=function(){function t(){var e=this;Object(i.a)(this,t),Object(f.a)(this,"events",[]),Object(f.a)(this,"mapState",void 0),Object(f.a)(this,"onViewportChange",void 0),Object(f.a)(this,"onStateChange",void 0),Object(f.a)(this,"mapStateProps",void 0),Object(f.a)(this,"eventManager",void 0),Object(f.a)(this,"scrollZoom",!0),Object(f.a)(this,"dragPan",!0),Object(f.a)(this,"dragRotate",!0),Object(f.a)(this,"doubleClickZoom",!0),Object(f.a)(this,"touchZoom",!0),Object(f.a)(this,"touchRotate",!1),Object(f.a)(this,"keyboard",!0),Object(f.a)(this,"_state",{isDragging:!1}),Object(f.a)(this,"_events",{}),Object(f.a)(this,"_transitionManager",new Vt),Object(f.a)(this,"setState",(function(t){Object.assign(e._state,t),e.onStateChange&&e.onStateChange(e._state)})),this.handleEvent=this.handleEvent.bind(this),this._onWheelEnd=function(t,e){var n,r,i,o=function(){return i=null,t.apply(n,r)};return function(){n=this,r=arguments,i&&clearTimeout(i),i=setTimeout(o,e)}}(this._onWheelEnd,100)}return Object(c.a)(t,[{key:"handleEvent",value:function(t){switch(this.mapState=this.getMapState(),t.type){case"panstart":return this._onPanStart(t);case"panmove":return this._onPan(t);case"panend":return this._onPanEnd(t);case"pinchstart":return this._onPinchStart(t);case"pinchmove":return this._onPinch(t);case"pinchcancel":case"pinchend":return this._onPinchEnd(t);case"doubletap":return this._onDoubleTap(t);case"wheel":return this._onWheel(t);case"keydown":return this._onKeyDown(t);default:return!1}}},{key:"getCenter",value:function(t){var e=t.offsetCenter;return[e.x,e.y]}},{key:"isFunctionKeyPressed",value:function(t){var e=t.srcEvent;return Boolean(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}},{key:"updateViewport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.mapState?this.mapState.getViewportProps():{},i=Object.assign({},t.getViewportProps(),e),o=Object.keys(i).some((function(t){return r[t]!==i[t]}));o&&this.onViewportChange(i,n,r),this.setState(Object.assign({},t.getInteractiveState(),n))}},{key:"getMapState",value:function(t){return new Tt(Object.assign({},this.mapStateProps,this._state,t))}},{key:"setOptions",value:function(t){var e=t.onViewportChange,n=t.onStateChange,r=t.eventManager,i=void 0===r?this.eventManager:r,o=t.isInteractive,a=void 0===o||o,s=t.scrollZoom,u=void 0===s?this.scrollZoom:s,l=t.dragPan,c=void 0===l?this.dragPan:l,p=t.dragRotate,h=void 0===p?this.dragRotate:p,f=t.doubleClickZoom,d=void 0===f?this.doubleClickZoom:f,m=t.touchZoom,y=void 0===m?this.touchZoom:m,v=t.touchRotate,g=void 0===v?this.touchRotate:v,_=t.keyboard,b=void 0===_?this.keyboard:_;this.onViewportChange=e,this.onStateChange=n,this.mapStateProps&&this.mapStateProps.height===t.height||this.updateViewport(new Tt(t)),this.mapStateProps=t,this._transitionManager.processViewportChange(Object.assign({},t,{onStateChange:this.setState})),this.eventManager!==i&&(this.eventManager=i,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(ze,a&&u),this.toggleEvents(Re,a&&(c||h)),this.toggleEvents(Le,a&&(y||g)),this.toggleEvents(De,a&&d),this.toggleEvents(Fe,a&&b),this.scrollZoom=u,this.dragPan=c,this.dragRotate=h,this.doubleClickZoom=d,this.touchZoom=y,this.touchRotate=g,this.keyboard=b}},{key:"toggleEvents",value:function(t,e){var n=this;this.eventManager&&t.forEach((function(t){n._events[t]!==e&&(n._events[t]=e,e?n.eventManager.on(t,n.handleEvent):n.eventManager.off(t,n.handleEvent))}))}},{key:"_onPanStart",value:function(t){var e=this.getCenter(t),n=this.mapState.panStart({pos:e}).rotateStart({pos:e});return this.updateViewport(n,Ie,{isDragging:!0}),!0}},{key:"_onPan",value:function(t){return this.isFunctionKeyPressed(t)||t.rightButton?this._onPanRotate(t):this._onPanMove(t)}},{key:"_onPanEnd",value:function(t){var e=this.mapState.panEnd().rotateEnd();return this.updateViewport(e,null,{isDragging:!1,isPanning:!1,isRotating:!1}),!0}},{key:"_onPanMove",value:function(t){if(!this.dragPan)return!1;var e=this.getCenter(t),n=this.mapState.pan({pos:e});return this.updateViewport(n,Ie,{isPanning:!0}),!0}},{key:"_onPanRotate",value:function(t){if(!this.dragRotate)return!1;var e=t.deltaX,n=t.deltaY,r=_(this.getCenter(t),2)[1],i=r-n,o=this.mapState.getViewportProps(),a=o.width,s=o.height,u=e/a,l=0;n>0?Math.abs(s-i)>5&&(l=n/(i-s)*1.2):n<0&&i>5&&(l=1-r/i),l=Math.min(1,Math.max(-1,l));var c=this.mapState.rotate({deltaScaleX:u,deltaScaleY:l});return this.updateViewport(c,Ie,{isRotating:!0}),!0}},{key:"_onWheel",value:function(t){if(!this.scrollZoom)return!1;t.preventDefault();var e=this.getCenter(t),n=t.delta,r=2/(1+Math.exp(-Math.abs(.01*n)));n<0&&0!==r&&(r=1/r);var i=this.mapState.zoom({pos:e,scale:r});return this.updateViewport(i,Ie,{isZooming:!0}),this._onWheelEnd(),!0}},{key:"_onWheelEnd",value:function(){this.setState({isZooming:!1})}},{key:"_onPinchStart",value:function(t){var e=this.getCenter(t),n=this.mapState.zoomStart({pos:e}).rotateStart({pos:e});return this._state.startPinchRotation=t.rotation,this.updateViewport(n,Ie,{isDragging:!0}),!0}},{key:"_onPinch",value:function(t){if(!this.touchZoom&&!this.touchRotate)return!1;var e=this.mapState;if(this.touchZoom){var n=t.scale,r=this.getCenter(t);e=e.zoom({pos:r,scale:n})}if(this.touchRotate){var i=t.rotation,o=this._state.startPinchRotation;e=e.rotate({deltaScaleX:-(i-o)/180})}return this.updateViewport(e,Ie,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),!0}},{key:"_onPinchEnd",value:function(t){var e=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(e,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(t){if(!this.doubleClickZoom)return!1;var e=this.getCenter(t),n=this.isFunctionKeyPressed(t),r=this.mapState.zoom({pos:e,scale:n?.5:2});return this.updateViewport(r,Object.assign({},Ae,{transitionInterpolator:new St({around:e})})),!0}},{key:"_onKeyDown",value:function(t){if(!this.keyboard)return!1;var e,n=this.isFunctionKeyPressed(t),r=this.mapStateProps;switch(t.srcEvent.keyCode){case 189:e=n?this.getMapState({zoom:r.zoom-2}):this.getMapState({zoom:r.zoom-1});break;case 187:e=n?this.getMapState({zoom:r.zoom+2}):this.getMapState({zoom:r.zoom+1});break;case 37:e=n?this.getMapState({bearing:r.bearing-15}):this.mapState.pan({pos:[100,0],startPos:[0,0]});break;case 39:e=n?this.getMapState({bearing:r.bearing+15}):this.mapState.pan({pos:[-100,0],startPos:[0,0]});break;case 38:e=n?this.getMapState({pitch:r.pitch+10}):this.mapState.pan({pos:[0,100],startPos:[0,0]});break;case 40:e=n?this.getMapState({pitch:r.pitch-10}):this.mapState.pan({pos:[0,-100],startPos:[0,0]});break;default:return!1}return this.updateViewport(e,Ae)}}]),t}(),Be=[{old:"onChangeViewport",new:"onViewportChange"},{old:"perspectiveEnabled",new:"dragRotate"},{old:"onHoverFeatures",new:"onHover"},{old:"onClickFeatures",new:"onClick"},{old:"touchZoomRotate",new:"touchZoom, touchRotate"},{old:"mapControls",new:"controller"}];function Ne(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Be.forEach((function(e){if(t.hasOwnProperty(e.old)){var n=(r=e.old,"react-map-gl: `".concat(r,"` is removed."));e.new&&(n="".concat(n," ").concat(function(t){return"Use `".concat(t,"` instead.")}(e.new))),console.warn(n)}var r}))}var Ue=Object.assign({},Lt.propTypes,{maxZoom:v.a.number,minZoom:v.a.number,maxPitch:v.a.number,minPitch:v.a.number,onViewStateChange:v.a.func,onViewportChange:v.a.func,onInteractionStateChange:v.a.func,transitionDuration:v.a.number,transitionInterpolator:v.a.object,transitionInterruption:v.a.number,transitionEasing:v.a.func,onTransitionStart:v.a.func,onTransitionInterrupt:v.a.func,onTransitionEnd:v.a.func,scrollZoom:v.a.bool,dragPan:v.a.bool,dragRotate:v.a.bool,doubleClickZoom:v.a.bool,touchZoom:v.a.bool,touchRotate:v.a.bool,keyboard:v.a.bool,onHover:v.a.func,onClick:v.a.func,onDblClick:v.a.func,onContextMenu:v.a.func,onMouseDown:v.a.func,onMouseMove:v.a.func,onMouseUp:v.a.func,onTouchStart:v.a.func,onTouchMove:v.a.func,onTouchEnd:v.a.func,onMouseEnter:v.a.func,onMouseLeave:v.a.func,onMouseOut:v.a.func,onWheel:v.a.func,touchAction:v.a.string,clickRadius:v.a.number,interactiveLayerIds:v.a.array,getCursor:v.a.func,controller:v.a.instanceOf(je)}),Ve=Object.assign({},Lt.defaultProps,Et,Vt.defaultProps,{onViewStateChange:null,onViewportChange:null,onClick:null,onNativeClick:null,onHover:null,onContextMenu:function(t){return t.preventDefault()},scrollZoom:!0,dragPan:!0,dragRotate:!0,doubleClickZoom:!0,touchZoom:!0,touchRotate:!1,keyboard:!0,touchAction:"none",clickRadius:0,getCursor:function(t){var e=t.isDragging,n=t.isHovering;return e?"grabbing":n?"pointer":"grab"}}),qe=function(t){function e(t){var n;return Object(i.a)(this,e),n=u(this,l(e).call(this,t)),Object(f.a)(s(n),"state",{isLoaded:!1,isDragging:!1,isHovering:!1}),Object(f.a)(s(n),"_controller",void 0),Object(f.a)(s(n),"_eventManager",void 0),Object(f.a)(s(n),"_interactiveContext",void 0),Object(f.a)(s(n),"_width",0),Object(f.a)(s(n),"_height",0),Object(f.a)(s(n),"_eventCanvasRef",Object(d.createRef)()),Object(f.a)(s(n),"_staticMapRef",Object(d.createRef)()),Object(f.a)(s(n),"getMap",(function(){return n._staticMapRef.current?n._staticMapRef.current.getMap():null})),Object(f.a)(s(n),"queryRenderedFeatures",(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.getMap();return r&&r.queryRenderedFeatures(t,e)})),Object(f.a)(s(n),"_onInteractionStateChange",(function(t){var e=t.isDragging,r=void 0!==e&&e;r!==n.state.isDragging&&(n._updateInteractiveContext({isDragging:r}),n.setState({isDragging:r}));var i=n.props.onInteractionStateChange;i&&i(t)})),Object(f.a)(s(n),"_onResize",(function(t){var e=t.width,r=t.height;n._width=e,n._height=r,n._setControllerProps(n.props),n.props.onResize({width:e,height:r})})),Object(f.a)(s(n),"_onViewportChange",(function(t,e,r){var i=n.props,o=i.onViewStateChange,a=i.onViewportChange;o&&o({viewState:t,interactionState:e,oldViewState:r}),a&&a(t,e,r)})),Object(f.a)(s(n),"_onLoad",(function(t){n.setState({isLoaded:!0}),n.props.onLoad(t)})),Object(f.a)(s(n),"_onEvent",(function(t,e){var r=n.props[t];r&&r(n._normalizeEvent(e))})),Object(f.a)(s(n),"_onPointerDown",(function(t){switch(t.pointerType){case"touch":n._onEvent("onTouchStart",t);break;default:n._onEvent("onMouseDown",t)}})),Object(f.a)(s(n),"_onPointerUp",(function(t){switch(t.pointerType){case"touch":n._onEvent("onTouchEnd",t);break;default:n._onEvent("onMouseUp",t)}})),Object(f.a)(s(n),"_onPointerMove",(function(t){switch(t.pointerType){case"touch":n._onEvent("onTouchMove",t);break;default:n._onEvent("onMouseMove",t)}if(!n.state.isDragging){var e,r=n.props,i=r.onHover,o=r.interactiveLayerIds;t=n._normalizeEvent(t),n.state.isLoaded&&(o||i)&&(e=n._getFeatures({pos:t.point,radius:n.props.clickRadius})),i&&(t.features=e,i(t));var a=Boolean(o&&e&&e.length>0),s=a&&!n.state.isHovering,u=!a&&n.state.isHovering;s&&n._onEvent("onMouseEnter",t),u&&n._onEvent("onMouseLeave",t),(s||u)&&n.setState({isHovering:a})}})),Object(f.a)(s(n),"_onClick",(function(t){var e=n.props,r=e.onClick,i=e.onNativeClick,o=e.onDblClick,a=e.doubleClickZoom,s=[],u=o||a;switch(t.type){case"anyclick":s.push(i),u||s.push(r);break;case"click":u&&s.push(r)}(s=s.filter(Boolean)).length&&((t=n._normalizeEvent(t)).features=n._getFeatures({pos:t.point,radius:n.props.clickRadius}),s.forEach((function(e){return e(t)})))})),Ne(t),n._controller=t.controller||new je,n._eventManager=new Me(null,{touchAction:t.touchAction}),n._updateInteractiveContext({isDragging:!1,eventManager:n._eventManager}),n}return h(e,t),Object(c.a)(e,null,[{key:"supported",value:function(){return Lt.supported()}}]),Object(c.a)(e,[{key:"componentDidMount",value:function(){var t=this._eventManager,e=this._eventCanvasRef.current;t.setElement(e),t.on({pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerup:this._onPointerUp,pointerleave:this._onEvent.bind(this,"onMouseOut"),click:this._onClick,anyclick:this._onClick,dblclick:this._onEvent.bind(this,"onDblClick"),wheel:this._onEvent.bind(this,"onWheel"),contextmenu:this._onEvent.bind(this,"onContextMenu")}),this._setControllerProps(this.props),this._updateInteractiveContext({mapContainer:e})}},{key:"componentWillUnmount",value:function(){this._eventManager.destroy()}},{key:"_setControllerProps",value:function(t){t=Object.assign({},t,t.viewState,{isInteractive:Boolean(t.onViewStateChange||t.onViewportChange),onViewportChange:this._onViewportChange,onStateChange:this._onInteractionStateChange,eventManager:this._eventManager,width:this._width,height:this._height}),this._controller.setOptions(t);var e=this._interactiveContext;e.onViewportChange=t.onViewportChange,e.onViewStateChange=t.onViewStateChange}},{key:"_getFeatures",value:function(t){var e,n=t.pos,r=t.radius,i={},o=this.getMap();if(this.props.interactiveLayerIds&&(i.layers=this.props.interactiveLayerIds),r){var a=r,s=[[n[0]-a,n[1]+a],[n[0]+a,n[1]-a]];e=o&&o.queryRenderedFeatures(s,i)}else e=o&&o.queryRenderedFeatures(n,i);return e}},{key:"_updateInteractiveContext",value:function(t){this._interactiveContext=Object.assign({},this._interactiveContext,t)}},{key:"_normalizeEvent",value:function(t){if(t.lngLat)return t;var e=t.offsetCenter,n=[e.x,e.y],r=new $(Object.assign({},this.props,{width:this._width,height:this._height}));return t.point=n,t.lngLat=r.unproject(n),t}},{key:"render",value:function(){this._setControllerProps(this.props);var t=this.props,e=t.width,n=t.height,i=t.style,o=t.getCursor,a=Object.assign({position:"relative"},i,{width:e,height:n,cursor:o(this.state)});return m.a.createElement(Ct.Provider,{value:this._interactiveContext},m.a.createElement("div",{key:"event-canvas",ref:this._eventCanvasRef,style:a},m.a.createElement(Lt,Object(r.a)({},this.props,{width:"100%",height:"100%",style:null,onResize:this._onResize,onLoad:this._onLoad,ref:this._staticMapRef}),this.props.children)))}}]),e}(d.PureComponent);Object(f.a)(qe,"propTypes",Ue),Object(f.a)(qe,"defaultProps",Ve);var We={type:v.a.string.isRequired,id:v.a.string},Ze=0,Ge=function(t){function e(t){var n;return Object(i.a)(this,e),n=u(this,l(e).call(this,t)),Object(f.a)(s(n),"id",void 0),Object(f.a)(s(n),"type",void 0),Object(f.a)(s(n),"_map",null),Object(f.a)(s(n),"_sourceOptions",{}),n.id=t.id||"jsx-source-".concat(Ze++),n.type=t.type,n}return h(e,t),Object(c.a)(e,[{key:"componentWillUnmount",value:function(){this._map.removeSource(this.id)}},{key:"getSource",value:function(){return this._map.getSource(this.id)}},{key:"_createSource",value:function(){var t=this,e=this._map;e.style._loaded?e.addSource(this.id,this._sourceOptions):e.once("styledata",(function(){return t.forceUpdate()}))}},{key:"_updateSource",value:function(){var t=this._sourceOptions,e=this.props;lt(!e.id||e.id===this.id,"source id changed"),lt(e.type===this.type,"source type changed");var n=null,r=0;for(var i in e)"children"!==i&&"id"!==i&&t[i]!==e[i]&&(t[i]=e[i],n=i,r++);var o=this.type,a=this._map,s=this.getSource();s?r&&("geojson"===o?s.setData(t.data):"image"===o?s.updateImage({url:t.url,coordinates:t.coordinates}):"canvas"!==o&&"video"!==o||1!==r||"coordinates"!==n?(a.removeSource(this.id),a.addSource(t)):s.setCoordinates(t.coordinates)):this._createSource()}},{key:"_render",value:function(t){var e=this;return this._map=t.map,this._updateSource(),m.a.Children.map(this.props.children,(function(t){return Object(d.cloneElement)(t,{source:e.id})}))}},{key:"render",value:function(){return m.a.createElement(Ct.Consumer,null,this._render.bind(this))}}]),e}(d.PureComponent);Object(f.a)(Ge,"propTypes",We);var He=n(24);function Ke(t,e){if(t===e)return!0;if(!t||!e)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(n,["layout","paint","filter","minzoom","maxzoom","beforeId"]);if(p!==r.beforeId&&t.moveLayer(e,p),o!==r.layout)for(var f in o)Ke(o[f],r.layout[f])||t.setLayoutProperty(e,f,o[f]);if(s!==r.paint)for(var d in s)Ke(s[d],r.paint[d])||t.setPaintProperty(e,d,s[d]);for(var m in Ke(u,r.filter)||t.setFilter(e,u),l===r.minzoom&&c===r.maxzoom||t.setLayerZoomRange(e,l,c),h)Ke(h[m],r[m])||t.setLayerProperty(e,m,h[m])}var $e=0,Je=function(t){function e(t){var n;return Object(i.a)(this,e),n=u(this,l(e).call(this,t)),Object(f.a)(s(n),"id",void 0),Object(f.a)(s(n),"type",void 0),Object(f.a)(s(n),"_map",null),n.id=t.id||"jsx-layer-".concat($e++),n.type=t.type,n}return h(e,t),Object(c.a)(e,[{key:"componentDidMount",value:function(){this._createLayer()}},{key:"componentDidUpdate",value:function(t){this._updateLayer(t)}},{key:"componentWillUnmount",value:function(){this._map.removeLayer(this.id)}},{key:"_createLayer",value:function(){var t=this,e=this._map,n=Object.assign({},this.props);n.id=this.id,delete n.beforeId,e.style._loaded?e.addLayer(n,this.props.beforeId):e.once("styledata",(function(){return t.forceUpdate()}))}},{key:"_updateLayer",value:function(t){var e=this.props;lt(!e.id||e.id===this.id,"layer id changed"),lt(e.type===this.type,"layer type changed");var n=this._map;if(n.getLayer(this.id))try{Ye(n,this.id,e,t)}catch(r){console.warn(r)}else this._createLayer()}},{key:"_render",value:function(t){return this._map=t.map,null}},{key:"render",value:function(){return m.a.createElement(Ct.Consumer,null,this._render.bind(this))}}]),e}(d.PureComponent);Object(f.a)(Je,"propTypes",Xe);var Qe={captureScroll:v.a.bool,captureDrag:v.a.bool,captureClick:v.a.bool,captureDoubleClick:v.a.bool},tn=function(t){function e(){var t,n;Object(i.a)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a=.5;)h-=.5,f+=.5*a;else if(d>i-l)for(;d>i-l&&h<=.5;)h+=.5,d-=.5*a;var m=e-p*o,y=m+o,v=.5;if(.5===h&&(p=Math.floor(p),v=1),m=v;)p-=v,m+=v*o;else if(y>r-l)for(;y>r-l&&p<=1-v;)p+=v,y-=v*o;return cn.find((function(t){var e=ln[t];return e.x===p&&e.y===h}))||s}({x:t,y:e,anchor:i,padding:a,width:n.width,height:n.height,selfWidth:s.clientWidth,selfHeight:s.clientHeight}):i}},{key:"_getContainerStyle",value:function(t,e,n,r){var i=this._context.viewport,o=this.props,a=o.offsetLeft,s=o.offsetTop,u=o.sortByDepth,l=ln[r],c=t+a,p=e+s,h={position:"absolute",transform:"\n translate(".concat(100*-l.x,"%, ").concat(100*-l.y,"%)\n translate(").concat(c,"px, ").concat(p,"px)\n "),display:void 0,zIndex:void 0};return u?(n>1||n<-1||t<0||t>i.width||e<0||e>i.height?h.display="none":h.zIndex=Math.floor((1-n)/2*1e5),h):h}},{key:"_renderTip",value:function(t){var e=this.props.tipSize;return m.a.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:e}})}},{key:"_renderContent",value:function(){var t=this.props,e=t.closeButton,n=t.children,r=this._context.eventManager?null:this._onClick;return m.a.createElement("div",{key:"content",ref:this._contentRef,className:"mapboxgl-popup-content",onClick:r},e&&m.a.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button"},"\xd7"),n)}},{key:"_render",value:function(){var t=this.props,e=t.className,n=t.longitude,r=t.latitude,i=t.altitude,o=_(this._context.viewport.project([n,r,i]),3),a=o[0],s=o[1],u=o[2],l=this._getPosition(a,s),c=this._getContainerStyle(a,s,u,l);return m.a.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(l," ").concat(e),style:c,ref:this._containerRef},this._renderTip(l),this._renderContent())}}]),e}(tn);Object(f.a)(fn,"propTypes",pn),Object(f.a)(fn,"defaultProps",hn);var dn,mn=n(14),yn=Object.assign({},tn.propTypes,{className:v.a.string,container:v.a.object}),vn=Object.assign({},tn.defaultProps,{className:"",container:null}),gn=function(t){function e(){var t,n;Object(i.a)(this,e);for(var r=arguments.length,o=new Array(r),a=0;a=0;h--){var f=a[h];"."===f?o(a,h):".."===f?(o(a,h),p++):p&&(o(a,h),p--)}if(!l)for(;p--;p)a.unshift("..");!l||""===a[0]||a[0]&&i(a[0])||a.unshift("");var d=a.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function s(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var u=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"===typeof e||"object"===typeof n){var r=s(e),i=s(n);return r!==e||i!==n?t(r,i):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1},l=n(15);function c(t){return"/"===t.charAt(0)?t:"/"+t}function p(t){return"/"===t.charAt(0)?t.substr(1):t}function h(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function f(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function d(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function m(t,e,n,i){var o;"string"===typeof t?(o=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=Object(r.a)({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function y(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&u(t.state,e.state)}function v(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"===typeof t?t(e,n):t;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;re?n.splice(e,n.length-e,r):n.push(r),p({action:"PUSH",location:r,index:e,entries:n})}}))},replace:function(t,e){var r=m(t,e,h(),b.location);c.confirmTransitionTo(r,"REPLACE",n,(function(t){t&&(b.entries[b.index]=r,p({action:"REPLACE",location:r}))}))},go:_,goBack:function(){_(-1)},goForward:function(){_(1)},canGo:function(t){var e=b.index+t;return e>=0&&e=0||(i[n]=t[n]);return i}n.d(e,"a",(function(){return r}))},,function(t,e,n){var r=n(22),i=n(104),o=n(63),a=Object.defineProperty;e.f=n(23)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bpfrpt_proptype_VisibleCellRange=e.bpfrpt_proptype_Alignment=e.bpfrpt_proptype_OverscanIndicesGetter=e.bpfrpt_proptype_OverscanIndices=e.bpfrpt_proptype_OverscanIndicesGetterParams=e.bpfrpt_proptype_RenderedSection=e.bpfrpt_proptype_ScrollbarPresenceChange=e.bpfrpt_proptype_Scroll=e.bpfrpt_proptype_NoContentRenderer=e.bpfrpt_proptype_CellSize=e.bpfrpt_proptype_CellSizeGetter=e.bpfrpt_proptype_CellRangeRenderer=e.bpfrpt_proptype_CellRangeRendererParams=e.bpfrpt_proptype_StyleCache=e.bpfrpt_proptype_CellCache=e.bpfrpt_proptype_CellRenderer=e.bpfrpt_proptype_CellRendererParams=e.bpfrpt_proptype_CellPosition=void 0;(function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);e.default=t})(n(0)),r(n(78)),r(n(1));function r(t){return t&&t.__esModule?t:{default:t}}e.bpfrpt_proptype_CellPosition=null,e.bpfrpt_proptype_CellRendererParams=null,e.bpfrpt_proptype_CellRenderer=null,e.bpfrpt_proptype_CellCache=null,e.bpfrpt_proptype_StyleCache=null,e.bpfrpt_proptype_CellRangeRendererParams=null,e.bpfrpt_proptype_CellRangeRenderer=null,e.bpfrpt_proptype_CellSizeGetter=null,e.bpfrpt_proptype_CellSize=null,e.bpfrpt_proptype_NoContentRenderer=null,e.bpfrpt_proptype_Scroll=null,e.bpfrpt_proptype_ScrollbarPresenceChange=null,e.bpfrpt_proptype_RenderedSection=null,e.bpfrpt_proptype_OverscanIndicesGetterParams=null,e.bpfrpt_proptype_OverscanIndices=null,e.bpfrpt_proptype_OverscanIndicesGetter=null,e.bpfrpt_proptype_Alignment=null,e.bpfrpt_proptype_VisibleCellRange=null},function(t,e,n){"use strict";var r=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function i(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function o(){}var a="\\s*([+-]?\\d+)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",l=/^#([0-9a-f]{3,8})$/,c=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),p=new RegExp("^rgb\\("+[u,u,u]+"\\)$"),h=new RegExp("^rgba\\("+[a,a,a,s]+"\\)$"),f=new RegExp("^rgba\\("+[u,u,u,s]+"\\)$"),d=new RegExp("^hsl\\("+[s,u,u]+"\\)$"),m=new RegExp("^hsla\\("+[s,u,u,s]+"\\)$"),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(){return this.rgb().formatHex()}function g(){return this.rgb().formatRgb()}function _(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=l.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?b(e):3===n?new E(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new E(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new E(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=c.exec(t))?new E(e[1],e[2],e[3],1):(e=p.exec(t))?new E(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h.exec(t))?x(e[1],e[2],e[3],e[4]):(e=f.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=d.exec(t))?O(e[1],e[2]/100,e[3]/100,1):(e=m.exec(t))?O(e[1],e[2]/100,e[3]/100,e[4]):y.hasOwnProperty(t)?b(y[t]):"transparent"===t?new E(NaN,NaN,NaN,0):null}function b(t){return new E(t>>16&255,t>>8&255,255&t,1)}function x(t,e,n,r){return r<=0&&(t=e=n=NaN),new E(t,e,n,r)}function w(t){return t instanceof o||(t=_(t)),t?new E((t=t.rgb()).r,t.g,t.b,t.opacity):new E}function S(t,e,n,r){return 1===arguments.length?w(t):new E(t,e,n,null==r?1:r)}function E(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function k(){return"#"+C(this.r)+C(this.g)+C(this.b)}function T(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function C(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function O(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new I(t,e,n,r)}function P(t){if(t instanceof I)return new I(t.h,t.s,t.l,t.opacity);if(t instanceof o||(t=_(t)),!t)return new I;if(t instanceof I)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),s=NaN,u=a-i,l=(a+i)/2;return u?(s=e===a?(n-r)/u+6*(n0&&l<1?0:s,new I(s,u,l,t.opacity)}function M(t,e,n,r){return 1===arguments.length?P(t):new I(t,e,n,null==r?1:r)}function I(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function A(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function z(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}r(o,_,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:v,formatHex:v,formatHsl:function(){return P(this).formatHsl()},formatRgb:g,toString:g}),r(E,S,i(o,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new E(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new E(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:k,formatHex:k,formatRgb:T,toString:T})),r(I,M,i(o,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new I(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new I(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new E(A(t>=240?t-240:t+120,i,r),A(t,i,r),A(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var R=function(t){return function(){return t}};function L(t,e){return function(n){return t+n*e}}function D(t,e){var n=e-t;return n?L(t,n>180||n<-180?n-360*Math.round(n/360):n):R(isNaN(t)?e:t)}function F(t){return 1===(t=+t)?j:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):R(isNaN(e)?n:e)}}function j(t,e){var n=e-t;return n?L(t,n):R(isNaN(t)?e:t)}var B=function t(e){var n=F(e);function r(t,e){var r=n((t=S(t)).r,(e=S(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=j(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function N(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=ro&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:q(n,r)})),o=G.lastIndex;return o180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:q(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:q(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:q(t,n)},{i:s-2,x:q(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++nft?Math.pow(t,1/3):t/ht+ct}function gt(t){return t>pt?t*t*t:ht*(t-ct)}function _t(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function bt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xt(t){if(t instanceof St)return new St(t.h,t.c,t.l,t.opacity);if(t instanceof yt||(t=dt(t)),0===t.a&&0===t.b)return new St(NaN,0\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}u="function"!==typeof Object.assign?function(t){if(t===s||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function P(t){return t.trim().split(/\s+/g)}function M(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;rn[e]})):r.sort()),r}function z(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=nt(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,u=a?a.center:o.center,l=e.center=rt(r);e.timeStamp=d(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=st(u,l),e.distance=at(u,l),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==N&&o.eventType!==V||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y});e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=ot(e.deltaX,e.deltaY);var c=it(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=f(c.x)>f(c.y)?c.x:c.y,e.scale=a?(p=a.pointers,h=r,at(h[0],h[1],Q)/at(p[0],p[1],Q)):1,e.rotation=a?function(t,e){return st(e[1],e[0],Q)+st(t[1],t[0],Q)}(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,a=t.lastInterval||e,u=e.timeStamp-a.timeStamp;if(e.eventType!=q&&(u>B||a.velocity===s)){var l=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,p=it(u,l,c);r=p.x,i=p.y,n=f(p.x)>f(p.y)?p.x:p.y,o=ot(l,c),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var p,h;var m=t.element;C(e.srcEvent.target,m)&&(m=e.srcEvent.target);e.target=m}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function nt(t){for(var e=[],n=0;n=f(e)?t<0?Z:G:e<0?H:K}function at(t,e,n){n||(n=J);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function st(t,e,n){n||(n=J);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}tt.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(L(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&T(this.element,this.evEl,this.domHandler),this.evTarget&&T(this.target,this.evTarget,this.domHandler),this.evWin&&T(L(this.element),this.evWin,this.domHandler)}};var ut={mousedown:N,mousemove:U,mouseup:V},lt="mousedown",ct="mousemove mouseup";function pt(){this.evEl=lt,this.evWin=ct,this.pressed=!1,tt.apply(this,arguments)}x(pt,tt,{handler:function(t){var e=ut[t.type];e&N&&0===t.button&&(this.pressed=!0),e&U&&1!==t.which&&(e=V),this.pressed&&(e&V&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var ht={pointerdown:N,pointermove:U,pointerup:V,pointercancel:q,pointerout:q},ft={2:"touch",3:"pen",4:"mouse",5:"kinect"},dt="pointerdown",mt="pointermove pointerup pointercancel";function yt(){this.evEl=dt,this.evWin=mt,tt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(dt="MSPointerDown",mt="MSPointerMove MSPointerUp MSPointerCancel"),x(yt,tt,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=ht[r],o=ft[t.pointerType]||t.pointerType,a="touch"==o,s=M(e,t.pointerId,"pointerId");i&N&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):i&(V|q)&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var vt={touchstart:N,touchmove:U,touchend:V,touchcancel:q},gt="touchstart",_t="touchstart touchmove touchend touchcancel";function bt(){this.evTarget=gt,this.evWin=_t,this.started=!1,tt.apply(this,arguments)}function xt(t,e){var n=I(t.touches),r=I(t.changedTouches);return e&(V|q)&&(n=A(n.concat(r),"identifier",!0)),[n,r]}x(bt,tt,{handler:function(t){var e=vt[t.type];if(e===N&&(this.started=!0),this.started){var n=xt.call(this,t,e);e&(V|q)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var wt={touchstart:N,touchmove:U,touchend:V,touchcancel:q},St="touchstart touchmove touchend touchcancel";function Et(){this.evTarget=St,this.targetIds={},tt.apply(this,arguments)}function kt(t,e){var n=I(t.touches),r=this.targetIds;if(e&(N|U)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=I(t.changedTouches),s=[],u=this.target;if(o=n.filter((function(t){return C(t.target,u)})),e===N)for(i=0;i-1&&r.splice(t,1)}),Tt)}}function It(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n=Wt&&r(e.options.event+Kt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&i&e.direction},attrTest:function(t){return $t.prototype.attrTest.call(this,t)&&(this.state&Vt||!(this.state&Vt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Xt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),x(Qt,$t,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Dt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Vt)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),x(te,Ht,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Rt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distancee.time;if(this._input=t,!r||!n||t.eventType&(V|q)&&!i)this.reset();else if(t.eventType&N)this.reset(),this._timer=m((function(){this.state=Zt,this.tryEmit()}),e.time,this);else if(t.eventType&V)return Zt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===Zt&&(t&&t.eventType&V?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),x(ee,$t,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Dt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Vt)}}),x(ne,$t,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:X|Y,pointers:1},getTouchAction:function(){return Jt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(X|Y)?e=t.overallVelocity:n&X?e=t.overallVelocityX:n&Y&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&t.eventType&V},emit:function(t){var e=Xt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),x(re,Ht,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Lt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance1&&void 0!==arguments[1]?arguments[1]:"component";t.debug&&s.a.checkPropTypes(l,t,"prop",e)}var h=function(){function t(e){var n=this;if(Object(r.a)(this,t),Object(o.a)(this,"mapboxgl",void 0),Object(o.a)(this,"props",c),Object(o.a)(this,"_map",null),Object(o.a)(this,"width",0),Object(o.a)(this,"height",0),Object(o.a)(this,"_fireLoadEvent",(function(){n.props.onLoad({type:"load",target:n._map})})),!e.mapboxgl)throw new Error("Mapbox not available");this.mapboxgl=e.mapboxgl,t.initialized||(t.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(e)}return Object(i.a)(t,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(t){return this._update(this.props,t),this}},{key:"resize",value:function(){return this._map.resize(),this}},{key:"redraw",value:function(){var t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(e){this._map=t.savedMap;var n=this._map.getContainer(),r=e.container;for(r.classList.add("mapboxgl-map");n.childNodes.length>0;)r.appendChild(n.childNodes[0]);this._map._container=r,t.savedMap=null,e.mapStyle&&this._map.setStyle(e.mapStyle,{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(e){if(e.reuseMaps&&t.savedMap)this._reuse(e);else{if(e.gl){var n=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=n,e.gl}}var r={container:e.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:e.mapStyle,interactive:!1,trackResize:!1,attributionControl:e.attributionControl,preserveDrawingBuffer:e.preserveDrawingBuffer};e.transformRequest&&(r.transformRequest=e.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},r,e.mapOptions)),this._map.once("load",e.onLoad),this._map.on("error",e.onError)}return this}},{key:"_destroy",value:function(){this._map&&(t.savedMap?this._map.remove():(t.savedMap=this._map,this._map.off("load",this.props.onLoad),this._map.off("error",this.props.onError),this._map.off("styledata",this._fireLoadEvent)),this._map=null)}},{key:"_initialize",value:function(t){var e=this;p(t=Object.assign({},c,t),"Mapbox"),this.mapboxgl.accessToken=t.mapboxApiAccessToken||c.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=t.mapboxApiUrl,this._create(t);var n=t.container;Object.defineProperty(n,"offsetWidth",{get:function(){return e.width}}),Object.defineProperty(n,"clientWidth",{get:function(){return e.width}}),Object.defineProperty(n,"offsetHeight",{get:function(){return e.height}}),Object.defineProperty(n,"clientHeight",{get:function(){return e.height}});var r=this._map.getCanvas();r&&(r.style.outline="none"),this._updateMapViewport({},t),this._updateMapSize({},t),this.props=t}},{key:"_update",value:function(t,e){if(this._map){p(e=Object.assign({},this.props,e),"Mapbox");var n=this._updateMapViewport(t,e),r=this._updateMapSize(t,e);e.asyncRender||!n&&!r||this.redraw(),this.props=e}}},{key:"_updateMapSize",value:function(t,e){var n=t.width!==e.width||t.height!==e.height;return n&&(this.width=e.width,this.height=e.height,this.resize()),n}},{key:"_updateMapViewport",value:function(t,e){var n=this._getViewState(t),r=this._getViewState(e),i=r.latitude!==n.latitude||r.longitude!==n.longitude||r.zoom!==n.zoom||r.pitch!==n.pitch||r.bearing!==n.bearing||r.altitude!==n.altitude;return i&&(this._map.jumpTo(this._viewStateToMapboxProps(r)),r.altitude!==n.altitude&&(this._map.transform.altitude=r.altitude)),i}},{key:"_getViewState",value:function(t){var e=t.viewState||t,n=e.longitude,r=e.latitude,i=e.zoom,o=e.pitch,a=void 0===o?0:o,s=e.bearing,u=void 0===s?0:s,l=e.altitude;return{longitude:n,latitude:r,zoom:i,pitch:a,bearing:u,altitude:void 0===l?1.5:l}}},{key:"_checkStyleSheet",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.47.0";if("undefined"!==typeof u.a)try{var e=u.a.createElement("div");e.className="mapboxgl-map",e.style.display="none",u.a.body.append(e);var n="static"!==window.getComputedStyle(e).position;if(!n){var r=u.a.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(t,"/mapbox-gl.css")),u.a.head.append(r)}}catch(i){}}},{key:"_viewStateToMapboxProps",value:function(t){return{center:[t.longitude,t.latitude],zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}}}]),t}();Object(o.a)(h,"initialized",!1),Object(o.a)(h,"propTypes",l),Object(o.a)(h,"defaultProps",c),Object(o.a)(h,"savedMap",null)}).call(this,n(93))},function(t,e,n){"use strict";n.d(e,"a",(function(){return pr}));var r=5,i=1<>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?l(t)+e:e}function p(){return!0}function h(t,e,n){return(0===t&&!y(t)||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function f(t,e){return m(t,e,0)}function d(t,e){return m(t,e,e)}function m(t,e,n){return void 0===t?n:y(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function y(t){return t<0||0===t&&1/t===-1/0}var v="@@__IMMUTABLE_ITERABLE__@@";function g(t){return Boolean(t&&t[v])}var _="@@__IMMUTABLE_KEYED__@@";function b(t){return Boolean(t&&t[_])}var x="@@__IMMUTABLE_INDEXED__@@";function w(t){return Boolean(t&&t[x])}function S(t){return b(t)||w(t)}var E=function(t){return g(t)?t:Y(t)},k=function(t){function e(t){return b(t)?t:$(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(E),T=function(t){function e(t){return w(t)?t:J(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(E),C=function(t){function e(t){return g(t)&&!S(t)?t:Q(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(E);E.Keyed=k,E.Indexed=T,E.Set=C;var O="@@__IMMUTABLE_SEQ__@@";function P(t){return Boolean(t&&t[O])}var M="@@__IMMUTABLE_RECORD__@@";function I(t){return Boolean(t&&t[M])}function A(t){return g(t)||I(t)}var z="@@__IMMUTABLE_ORDERED__@@";function R(t){return Boolean(t&&t[z])}var L=0,D=1,F=2,j="function"===typeof Symbol&&Symbol.iterator,B="@@iterator",N=j||B,U=function(t){this.next=t};function V(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function q(){return{value:void 0,done:!0}}function W(t){return!!H(t)}function Z(t){return t&&"function"===typeof t.next}function G(t){var e=H(t);return e&&e.call(t)}function H(t){var e=t&&(j&&t[j]||t[B]);if("function"===typeof e)return e}U.prototype.toString=function(){return"[Iterator]"},U.KEYS=L,U.VALUES=D,U.ENTRIES=F,U.prototype.inspect=U.prototype.toSource=function(){return this.toString()},U.prototype[N]=function(){return this};var K=Object.prototype.hasOwnProperty;function X(t){return!(!Array.isArray(t)&&"string"!==typeof t)||t&&"object"===typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var Y=function(t){function e(t){return null===t||void 0===t?it():A(t)?t.toSeq():function(t){var e=st(t);if(e)return e;if("object"===typeof t)return new et(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[e?r-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var n=this._cache;if(n){var r=n.length,i=0;return new U((function(){if(i===r)return{value:void 0,done:!0};var o=n[e?r-++i:i++];return V(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(E),$=function(t){function e(t){return null===t||void 0===t?it().toKeyedSeq():g(t)?b(t)?t.toSeq():t.fromEntrySeq():I(t)?t.toSeq():ot(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(Y),J=function(t){function e(t){return null===t||void 0===t?it():g(t)?b(t)?t.entrySeq():t.toIndexedSeq():I(t)?t.toSeq().entrySeq():at(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(Y),Q=function(t){function e(t){return(g(t)&&!S(t)?t:J(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(Y);Y.isSeq=P,Y.Keyed=$,Y.Set=Q,Y.Indexed=J,Y.prototype[O]=!0;var tt=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[c(this,t)]:e},e.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length,i=0;i!==r;){var o=e?r-++i:i++;if(!1===t(n[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var n=this._array,r=n.length,i=0;return new U((function(){if(i===r)return{value:void 0,done:!0};var o=e?r-++i:i++;return V(t,o,n[o])}))},e}(J),et=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return K.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[e?i-++o:o++];if(!1===t(n[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length,o=0;return new U((function(){if(o===i)return{value:void 0,done:!0};var a=r[e?i-++o:o++];return V(t,a,n[a])}))},e}($);et.prototype[z]=!0;var nt,rt=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=G(this._collection),r=0;if(Z(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=G(this._collection);if(!Z(n))return new U(q);var r=0;return new U((function(){var e=n.next();return e.done?e:V(t,r++,e.value)}))},e}(J);function it(){return nt||(nt=new tt([]))}function ot(t){var e=Array.isArray(t)?new tt(t):W(t)?new rt(t):void 0;if(e)return e.fromEntrySeq();if("object"===typeof t)return new et(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function at(t){var e=st(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function st(t){return X(t)?new tt(t):W(t)?new rt(t):void 0}var ut="@@__IMMUTABLE_MAP__@@";function lt(t){return Boolean(t&&t[ut])}function ct(t){return lt(t)&&R(t)}function pt(t){return Boolean(t&&"function"===typeof t.equals&&"function"===typeof t.hashCode)}function ht(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"===typeof t.valueOf&&"function"===typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!!(pt(t)&&pt(e)&&t.equals(e))}var ft="function"===typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function dt(t){return t>>>1&1073741824|3221225471&t}var mt=Object.prototype.valueOf;function yt(t){switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":return function(t){if(t!==t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return dt(e)}(t);case"string":return t.length>Et?function(t){var e=Ct[t];void 0===e&&(e=vt(t),Tt===kt&&(Tt=0,Ct={}),Tt++,Ct[t]=e);return e}(t):vt(t);case"object":case"function":return null===t?1108378658:"function"===typeof t.hashCode?dt(t.hashCode(t)):(t.valueOf!==mt&&"function"===typeof t.valueOf&&(t=t.valueOf(t)),function(t){var e;if(xt&&void 0!==(e=bt.get(t)))return e;if(void 0!==(e=t[St]))return e;if(!_t){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[St]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}e=++wt,1073741824&wt&&(wt=0);if(xt)bt.set(t,e);else{if(void 0!==gt&&!1===gt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(_t)Object.defineProperty(t,St,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[St]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[St]=e}}return e}(t));case"undefined":return 1108378659;default:if("function"===typeof t.toString)return vt(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function vt(t){for(var e=0,n=0;n=0&&(l.get=function(e,n){return(e=c(this,e))>=0&&es)return{value:void 0,done:!0};var t=i.next();return r||e===D||t.done?t:V(e,u-1,e===L?void 0:t.value[1],t)}))},l}function Ft(t,e,n,r){var i=Ht(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,l){if(!s||!(s=e.call(n,t,o,l)))return u++,i(t,r?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(F,o),u=!0,l=0;return new U((function(){var t,o,c;do{if((t=s.next()).done)return r||i===D?t:V(i,l++,i===L?void 0:t.value[1],t);var p=t.value;o=p[0],c=p[1],u&&(u=e.call(n,c,o,a))}while(u);return i===F?t:V(i,o,c,t)}))},i}function jt(t,e){var n=b(t),r=[t].concat(e).map((function(t){return g(t)?n&&(t=k(t)):t=n?ot(t):at(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&b(i)||w(t)&&w(i))return i}var o=new tt(r);return n?o=o.toKeyedSeq():w(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=r.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),o}function Bt(t,e,n){var r=Ht(t);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function t(u,l){u.__iterate((function(o,u){return(!e||l0}function qt(t,e,n,r){var i=Ht(t),o=new tt(n).map((function(t){return t.size}));return i.size=r?o.max():o.min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(D,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=n.map((function(t){return t=E(t),G(i?t.reverse():t)})),a=0,s=!1;return new U((function(){var n;return s||(n=o.map((function(t){return t.next()})),s=r?n.every((function(t){return t.done})):n.some((function(t){return t.done}))),s?{value:void 0,done:!0}:V(t,a++,e.apply(null,n.map((function(t){return t.value}))))}))},i}function Wt(t,e){return t===e?t:P(t)?e:t.constructor(e)}function Zt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Gt(t){return b(t)?k:w(t)?T:C}function Ht(t){return Object.create((b(t)?$:w(t)?J:Q).prototype)}function Kt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Y.prototype.cacheResult.call(this)}function Xt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t0;)e[n]=arguments[n+1];if("function"!==typeof t)throw new TypeError("Invalid merger function: "+t);return ge(this,e,t)}function ge(t,e,n){for(var r=[],i=0;i0;)e[n]=arguments[n+1];return _e(this,e,t)}function Se(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return ue(this,t,Ue(),(function(t){return be(t,e)}))}function Ee(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return ue(this,t,Ue(),(function(t){return _e(t,e)}))}function ke(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Te(){return this.__ownerID?this:this.__ensureOwner(new u)}function Ce(){return this.__ensureOwner()}function Oe(){return this.__altered}Pt.prototype.cacheResult=Ot.prototype.cacheResult=Mt.prototype.cacheResult=It.prototype.cacheResult=Kt;var Pe=function(t){function e(e){return null===e||void 0===e?Ue():lt(e)&&!R(e)?e:Ue().withMutations((function(n){var r=t(e);Jt(r.size),r.forEach((function(t,e){return n.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Ue().withMutations((function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return Ve(this,t,e)},e.prototype.remove=function(t){return Ve(this,t,a)},e.prototype.deleteAll=function(t){var e=E(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ue()},e.prototype.sort=function(t){return dn(Nt(this,t))},e.prototype.sortBy=function(t,e){return dn(Nt(this,e,t))},e.prototype.map=function(t,e){return this.withMutations((function(n){n.forEach((function(r,i){n.set(i,t.call(e,r,i,n))}))}))},e.prototype.__iterator=function(t,e){return new Fe(this,t,e)},e.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate((function(e){return r++,t(e[1],e[0],n)}),e),r},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ne(this.size,this._root,t,this.__hash):0===this.size?Ue():(this.__ownerID=t,this.__altered=!1,this)},e}(k);Pe.isMap=lt;var Me=Pe.prototype;Me[ut]=!0,Me.delete=Me.remove,Me.removeAll=Me.deleteAll,Me.setIn=ce,Me.removeIn=Me.deleteIn=he,Me.update=de,Me.updateIn=me,Me.merge=Me.concat=ye,Me.mergeWith=ve,Me.mergeDeep=xe,Me.mergeDeepWith=we,Me.mergeIn=Se,Me.mergeDeepIn=Ee,Me.withMutations=ke,Me.wasAltered=Oe,Me.asImmutable=Ce,Me["@@transducer/init"]=Me.asMutable=Te,Me["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},Me["@@transducer/result"]=function(t){return t.asImmutable()};var Ie=function(t,e){this.ownerID=t,this.entries=e};Ie.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;o=Ke)return function(t,e,n,r){t||(t=new u);for(var i=new Le(t,yt(n),[n,r]),o=0;o>>t)&o),s=this.bitmap;return 0===(s&a)?i:this.nodes[Ge(s&a-1)].get(t+r,e,n,i)},Ae.prototype.update=function(t,e,n,s,u,l,c){void 0===n&&(n=yt(s));var p=(0===e?n:n>>>e)&o,h=1<=Xe)return function(t,e,n,r,o){for(var a=0,s=new Array(i),u=0;0!==n;u++,n>>>=1)s[u]=1&n?e[a++]:void 0;return s[r]=o,new ze(t,a+1,s)}(t,y,f,p,g);if(d&&!g&&2===y.length&&We(y[1^m]))return y[1^m];if(d&&g&&1===y.length&&We(g))return g;var _=t&&t===this.ownerID,b=d?g?f:f^h:f|h,x=d?g?He(y,m,g,_):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,a=0;a>>t)&o,s=this.nodes[a];return s?s.get(t+r,e,n,i):i},ze.prototype.update=function(t,e,n,i,s,u,l){void 0===n&&(n=yt(i));var c=(0===e?n:n>>>e)&o,p=s===a,h=this.nodes,f=h[c];if(p&&!f)return this;var d=qe(f,t,e+r,n,i,s,u,l);if(d===f)return this;var m=this.count;if(f){if(!d&&--m>>n)&o,l=(0===n?i:i>>>n)&o,c=u===l?[Ze(t,e,n+r,i,a)]:(s=new Le(e,i,a),u>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function He(t,e,n,r){var i=r?t:Yt(t);return i[e]=n,i}var Ke=i/4,Xe=i/2,Ye=i/4,$e="@@__IMMUTABLE_LIST__@@";function Je(t){return Boolean(t&&t[$e])}var Qe=function(t){function e(e){var n=sn();if(null===e||void 0===e)return n;if(Je(e))return e;var o=t(e),a=o.size;return 0===a?n:(Jt(a),a>0&&a=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?pn(t,e).set(0,n):pn(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,i=t._root,o={value:!1};e>=hn(t._capacity)?r=un(r,t.__ownerID,0,e,n,o):i=un(i,t.__ownerID,t._level,e,n,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t;return an(t._origin,t._capacity,t._level,i,r)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=r,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):sn()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){pn(n,0,e+t.length);for(var r=0;r>>e&o;if(i>=this.array.length)return new en([],t);var a,s=0===i;if(e>0){var u=this.array[i];if((a=u&&u.removeBefore(t,e-r,n))===u&&s)return this}if(s&&!a)return this;var l=ln(this,t);if(!s)for(var c=0;c>>e&o;if(a>=this.array.length)return this;if(e>0){var s=this.array[a];if((i=s&&s.removeAfter(t,e-r,n))===s&&a===this.array.length-1)return this}var u=ln(this,t);return u.array.splice(a+1),i&&(u.array[a]=i),u};var nn,rn={};function on(t,e){var n=t._origin,o=t._capacity,a=hn(o),s=t._tail;return u(t._root,t._level,0);function u(t,l,c){return 0===l?function(t,r){var u=r===a?s&&s.array:t&&t.array,l=r>n?0:n-r,c=o-r;c>i&&(c=i);return function(){if(l===c)return rn;var t=e?--c:l++;return u&&u[t]}}(t,c):function(t,a,s){var l,c=t&&t.array,p=s>n?0:n-s>>a,h=1+(o-s>>a);h>i&&(h=i);return function(){for(;;){if(l){var t=l();if(t!==rn)return t;l=null}if(p===h)return rn;var n=e?--h:p++;l=u(c&&c[n],a-r,s+(n<>>n&o,p=t&&c0){var h=t&&t.array[c],f=un(h,e,n-r,i,a,u);return f===h?t:((l=ln(t,e)).array[c]=f,l)}return p&&t.array[c]===a?t:(u&&s(u),l=ln(t,e),void 0===a&&c===l.array.length-1?l.array.pop():l.array[c]=a,l)}function ln(t,e){return e&&t&&e===t.ownerID?t:new en(t?t.array.slice():[],e)}function cn(t,e){if(e>=hn(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>i&o],i-=r;return n}}function pn(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var i=t.__ownerID||new u,a=t._origin,s=t._capacity,l=a+e,c=void 0===n?s:n<0?s+n:a+n;if(l===a&&c===s)return t;if(l>=c)return t.clear();for(var p=t._level,h=t._root,f=0;l+f<0;)h=new en(h&&h.array.length?[void 0,h]:[],i),f+=1<<(p+=r);f&&(l+=f,a+=f,c+=f,s+=f);for(var d=hn(s),m=hn(c);m>=1<d?new en([],i):y;if(y&&m>d&&lr;_-=r){var b=d>>>_&o;g=g.array[b]=ln(g.array[b],i)}g.array[d>>>r&o]=y}if(c=m)l-=m,c-=m,p=r,h=null,v=v&&v.removeBefore(i,0,l);else if(l>a||m>>p&o;if(x!==m>>>p&o)break;x&&(f+=(1<a&&(h=h.removeBefore(i,p,l-f)),h&&m>>r<=i&&u.size>=2*s.size?(r=(o=u.filter((function(t,e){return void 0!==t&&l!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(r.__ownerID=o.__ownerID=t.__ownerID)):(r=s.remove(e),o=l===u.size-1?u.pop():u.set(l,void 0))}else if(c){if(n===u.get(l)[1])return t;r=s,o=u.set(l,[e,n])}else r=s.set(e,u.size),o=u.set(u.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=o,t.__hash=void 0,t):mn(r,o)}dn.isOrderedMap=ct,dn.prototype[z]=!0,dn.prototype.delete=dn.prototype.remove;var gn="@@__IMMUTABLE_STACK__@@";function _n(t){return Boolean(t&&t[gn])}var bn=function(t){function e(t){return null===t||void 0===t?En():_n(t)?t:En().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var n=this._head;for(t=c(this,t);n&&t--;)n=n.next;return n?n.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:t[r],next:n};return this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Sn(e,n)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&_n(e))return e;Jt(e.size);var n=this.size,r=this._head;return e.__iterate((function(t){n++,r={value:t,next:r}}),!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):Sn(n,r)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):En()},e.prototype.slice=function(e,n){if(h(e,n,this.size))return this;var r=f(e,this.size);if(d(n,this.size)!==this.size)return t.prototype.slice.call(this,e,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Sn(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Sn(this.size,this._head,t,this.__hash):0===this.size?En():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var n=this;if(e)return new tt(this.toArray()).__iterate((function(e,r){return t(e,r,n)}),e);for(var r=0,i=this._head;i&&!1!==t(i.value,r++,this);)i=i.next;return r},e.prototype.__iterator=function(t,e){if(e)return new tt(this.toArray()).__iterator(t,e);var n=0,r=this._head;return new U((function(){if(r){var e=r.value;return r=r.next,V(t,n++,e)}return{value:void 0,done:!0}}))},e}(T);bn.isStack=_n;var xn,wn=bn.prototype;function Sn(t,e,n,r){var i=Object.create(wn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function En(){return xn||(xn=Sn(0))}wn[gn]=!0,wn.shift=wn.pop,wn.unshift=wn.push,wn.unshiftAll=wn.pushAll,wn.withMutations=ke,wn.wasAltered=Oe,wn.asImmutable=Ce,wn["@@transducer/init"]=wn.asMutable=Te,wn["@@transducer/step"]=function(t,e){return t.unshift(e)},wn["@@transducer/result"]=function(t){return t.asImmutable()};var kn="@@__IMMUTABLE_SET__@@";function Tn(t){return Boolean(t&&t[kn])}function Cn(t){return Tn(t)&&R(t)}function On(t,e){if(t===e)return!0;if(!g(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||b(t)!==b(e)||w(t)!==w(e)||R(t)!==R(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!S(t);if(R(t)){var r=t.entries();return e.every((function(t,e){var i=r.next().value;return i&&ht(i[1],t)&&(n||ht(i[0],e))}))&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"===typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var s=!0,u=e.__iterate((function(e,r){if(n?!t.has(e):i?!ht(e,t.get(r,a)):!ht(t.get(r,a),e))return s=!1,!1}));return s&&t.size===u}function Pn(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Mn(t){if(!t||"object"!==typeof t)return t;if(!g(t)){if(!ee(t))return t;t=Y(t)}if(b(t)){var e={};return t.__iterate((function(t,n){e[n]=Mn(t)})),e}var n=[];return t.__iterate((function(t){n.push(Mn(t))})),n}var In=function(t){function e(e){return null===e||void 0===e?Dn():Tn(e)&&!R(e)?e:Dn().withMutations((function(n){var r=t(e);Jt(r.size),r.forEach((function(t){return n.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(k(t).keySeq())},e.intersect=function(t){return(t=E(t).toArray()).length?zn.intersect.apply(e(t.pop()),t):Dn()},e.union=function(t){return(t=E(t).toArray()).length?zn.union.apply(e(t.pop()),t):Dn()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Rn(this,this._map.set(t,t))},e.prototype.remove=function(t){return Rn(this,this._map.remove(t))},e.prototype.clear=function(){return Rn(this,this._map.clear())},e.prototype.map=function(t,e){var n=this,r=[],i=[];return this.forEach((function(o){var a=t.call(e,o,o,n);a!==o&&(r.push(o),i.push(a))})),this.withMutations((function(t){r.forEach((function(e){return t.remove(e)})),i.forEach((function(e){return t.add(e)}))}))},e.prototype.union=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(n){for(var r=0;r=0&&e=0&&n>>-15,461845907),e=ft(e<<13|e>>>-13,5),e=ft((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=dt((e=ft(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+Qn(yt(t),yt(e))|0}:function(t,e){r=r+Qn(yt(t),yt(e))|0}:e?function(t){r=31*r+yt(t)|0}:function(t){r=r+yt(t)|0}),r)}(this))}});var qn=E.prototype;qn[v]=!0,qn[N]=qn.values,qn.toJSON=qn.toArray,qn.__toStringMapper=ne,qn.inspect=qn.toSource=function(){return this.toString()},qn.chain=qn.flatMap,qn.contains=qn.includes,Pn(k,{flip:function(){return Wt(this,At(this))},mapEntries:function(t,e){var n=this,r=0;return Wt(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Wt(this,this.toSeq().flip().map((function(r,i){return t.call(e,r,i,n)})).flip())}});var Wn=k.prototype;Wn[_]=!0,Wn[N]=qn.entries,Wn.toJSON=Vn,Wn.__toStringMapper=function(t,e){return ne(e)+": "+ne(t)},Pn(T,{toKeyedSeq:function(){return new Ot(this,!1)},filter:function(t,e){return Wt(this,Lt(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Wt(this,Rt(this,!1))},slice:function(t,e){return Wt(this,Dt(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(e||0,0),0===n||2===n&&!e)return this;t=f(t,t<0?this.count():this.size);var r=this.slice(0,t);return Wt(this,1===n?r:r.concat(Yt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Wt(this,Bt(this,t,!1))},get:function(t,e){return(t=c(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,n){return n===t}),void 0,e)},has:function(t){return(t=c(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function Qn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Zn[x]=!0,Zn[z]=!0,Pn(C,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),C.prototype.has=qn.includes,C.prototype.contains=C.prototype.includes,Pn($,k.prototype),Pn(J,T.prototype),Pn(Q,C.prototype);var tr=function(t){function e(t){return null===t||void 0===t?ir():Cn(t)?t:ir().withMutations((function(e){var n=C(t);Jt(n.size),n.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(k(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(In);tr.isOrderedSet=Cn;var er,nr=tr.prototype;function rr(t,e){var n=Object.create(nr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function ir(){return er||(er=rr(yn()))}nr[z]=!0,nr.zip=Zn.zip,nr.zipWith=Zn.zipWith,nr.__empty=ir,nr.__make=rr;var or=function(t,e){var n,r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(t),u=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var l=0;l2?[]:void 0,{"":t})}function hr(t,e){return b(e)?e.toMap():e.toList()}ar[M]=!0,ar.delete=ar.remove,ar.deleteIn=ar.removeIn=he,ar.getIn=Nn,ar.hasIn=qn.hasIn,ar.merge=ye,ar.mergeWith=ve,ar.mergeIn=Se,ar.mergeDeep=xe,ar.mergeDeepWith=we,ar.mergeDeepIn=Ee,ar.setIn=ce,ar.update=de,ar.updateIn=me,ar.withMutations=ke,ar.asMutable=Te,ar.asImmutable=Ce,ar[N]=ar.entries,ar.toJSON=ar.toObject=qn.toObject,ar.inspect=ar.toSource=function(){return this.toString()}},function(t,e,n){"use strict";var r;e.__esModule=!0,e.default=void 0;var i=((r=n(294))&&r.__esModule?r:{default:r}).default;e.default=i},,function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(103),o=(r=i)&&r.__esModule?r:{default:r};e.default=o.default||function(t){for(var e=1;e0?r:n)(t)}},function(t,e,n){var r=n(67)("keys"),i=n(53);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(8),i=n(11),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(44)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){t.exports={default:n(200),__esModule:!0}},function(t,e,n){var r=n(20),i=n(8),o=n(38);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(109),o=(r=i)&&r.__esModule?r:{default:r};e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"===typeof e?"undefined":(0,o.default)(e))&&"function"!==typeof e?t:e}},function(t,e,n){var r=n(22),i=n(209),o=n(68),a=n(66)("IE_PROTO"),s=function(){},u=function(){var t,e=n(62)("iframe"),r=o.length;for(e.style.display="none",n(113).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("