@arcgis/core 4.25.0-next.20221021 → 4.25.0-next.20221022

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/WebMap.js +1 -1
  2. package/arcade.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{0b0f3e93f658a012d5f0.js → 00df1053d3a8761fc0a3.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0de7eca7acf74947cf2e.js +1 -0
  6. package/assets/esri/core/workers/chunks/{2474f0e8b8abc1387106.js → 2600954826b42f2b70c4.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{af3f30f968363bb3930c.js → 353c4a51be72c4a77e1f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{2d8201f0f33ba66bb96b.js → 5f46751fa500a9dfacf9.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{b9e93d9ea80361716f1d.js → 64190294f3dc9237b420.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{883cfe319b15ebabf71e.js → 73ad8f3d3feff5882988.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{177c8d5e2531c6f64581.js → 796504f93100aea7c6f5.js} +1 -1
  12. package/assets/esri/core/workers/chunks/8435ae4fe5a5332b1076.js +1 -0
  13. package/assets/esri/core/workers/chunks/{c8c0f091aab41e4effa5.js → 85690fabbfe60681f5e7.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{942da417257f8fd8e4cf.js → 858970a88406562a26cc.js} +1 -1
  15. package/assets/esri/core/workers/chunks/a17d20ffaa47d430d98c.js +1 -0
  16. package/assets/esri/core/workers/chunks/ac2903c5f1587dec2f80.js +1 -0
  17. package/assets/esri/core/workers/chunks/{7ba0cfe4d1c214f44fc7.js → b6d9750b16bbf8ce5307.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{7f40f4ac6e2af4b333f5.js → c4e5b929b152f8d36cc3.js} +1 -1
  19. package/assets/esri/core/workers/chunks/c7de993c0a85594a1969.js +1 -0
  20. package/assets/esri/core/workers/chunks/ca92022f53080fda75fe.js +1 -0
  21. package/assets/esri/core/workers/chunks/d7668e81467833a5a53d.js +1 -0
  22. package/assets/esri/core/workers/chunks/de83b062359c0459585f.js +1 -0
  23. package/assets/esri/core/workers/chunks/f57c3343f93d87423856.js +1 -0
  24. package/assets/esri/core/workers/chunks/f704ed07c514a0f436ec.js +1 -0
  25. package/assets/esri/themes/base/_color.scss +1 -0
  26. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +58 -14
  27. package/assets/esri/themes/base/widgets/_LayerList.scss +57 -13
  28. package/assets/esri/themes/dark/main.css +1 -1
  29. package/assets/esri/themes/light/main.css +1 -1
  30. package/assets/esri/themes/light/view.css +1 -1
  31. package/geometry/support/normalizeUtils.js +1 -1
  32. package/interfaces.d.ts +109 -6
  33. package/package.json +1 -1
  34. package/support/revision.js +1 -1
  35. package/symbols/cim/CIMSymbolHelper.js +1 -1
  36. package/symbols/cim/Rasterizer.js +1 -1
  37. package/symbols/cim/rasterizingUtils.js +5 -0
  38. package/views/2d/engine/brushes.js +1 -1
  39. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  40. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  41. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  42. package/views/2d/engine/vtlBrushes.js +5 -0
  43. package/views/2d/engine/webgl/mesh/bufcut.js +1 -1
  44. package/views/2d/layers/features/schemaUtils.js +1 -1
  45. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  46. package/widgets/BasemapLayerList.js +1 -1
  47. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  48. package/widgets/FeatureForm/FormExpressionArcadeExecutor.js +1 -1
  49. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  50. package/widgets/FeatureForm.js +1 -1
  51. package/widgets/LayerList/LayerListViewModel.js +1 -1
  52. package/widgets/LayerList/ListItem.js +1 -1
  53. package/widgets/LayerList.js +1 -1
  54. package/widgets/UtilityNetworkTrace.js +1 -1
  55. package/assets/esri/core/workers/chunks/0cfb97b9f38c31b3b33a.js +0 -1
  56. package/assets/esri/core/workers/chunks/2a63949c3aad9ace1b44.js +0 -1
  57. package/assets/esri/core/workers/chunks/3b5be512567d9c1c6fe6.js +0 -1
  58. package/assets/esri/core/workers/chunks/4450f17444947fe2f27f.js +0 -1
  59. package/assets/esri/core/workers/chunks/5abda500f5d5607155ab.js +0 -1
  60. package/assets/esri/core/workers/chunks/81139c01e8016cbbe324.js +0 -1
  61. package/assets/esri/core/workers/chunks/94027976cfca4ad5789b.js +0 -1
  62. package/assets/esri/core/workers/chunks/9d410721f42259efe666.js +0 -1
  63. package/assets/esri/core/workers/chunks/b17ff3dfdc638f9f5705.js +0 -1
  64. package/assets/esri/core/workers/chunks/d6eb078d94171fb9d3d4.js +0 -1
  65. package/rest/geometry/cut.js +0 -5
  66. package/rest/geometry/simplify.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9956,4202,8694,3492],{3920:(e,t,n)=>{n.d(t,{p:()=>p,r:()=>u});var r=n(43697),i=n(15923),o=n(61247),s=n(5600),l=n(52011),a=n(72762);const p=e=>{let t=class extends e{destroy(){this.destroyed||(this._get("handles")?.destroy(),this._get("updatingHandles")?.destroy())}get handles(){return this._get("handles")||new o.Z}get updatingHandles(){return this._get("updatingHandles")||new a.t}};return(0,r._)([(0,s.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,r._)([(0,s.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,r._)([(0,l.j)("esri.core.HandleOwner")],t),t};let u=class extends(p(i.Z)){};u=(0,r._)([(0,l.j)("esri.core.HandleOwner")],u)},17445:(e,t,n)=>{n.d(t,{N1:()=>c,YP:()=>a,Z_:()=>h,gx:()=>p,nn:()=>m,on:()=>y,tX:()=>g});var r=n(91460),i=n(50758),o=n(70586),s=n(95330),l=n(26258);function a(e,t,n={}){return u(e,t,n,d)}function p(e,t,n={}){return u(e,t,n,f)}function u(e,t,n={},r){let i=null;const s=n.once?(e,n)=>{r(e)&&((0,o.hw)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,l.aQ)(e,s,n.sync,n.equals),n.initial){const t=e();s(t,t)}return i}function y(e,t,n,s={}){let l=null,p=null,u=null;function y(){l&&p&&(p.remove(),s.onListenerRemove?.(l),l=null,p=null)}function c(e){s.once&&s.once&&(0,o.hw)(u),n(e)}const d=a(e,((e,n)=>{y(),(0,r.vT)(e)&&(l=e,p=(0,r.on)(e,t,c),s.onListenerAdd?.(e))}),{sync:s.sync,initial:!0});return u=(0,i.kB)((()=>{d.remove(),y()})),u}function c(e,t){return function(e,t,n){if((0,s.Hc)(n))return Promise.reject((0,s.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function a(){l=(0,o.hw)(l)}return new Promise(((r,o)=>{l=(0,i.AL)([(0,s.fu)(n,(()=>{a(),o((0,s.zE)())})),u(e,(e=>{a(),r(e)}),{sync:!1,once:!0},t??d)])}))}(e,f,t)}function d(e){return!0}function f(e){return!!e}n(87538);const h={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},42033:(e,t,n)=>{n.d(t,{E:()=>i,_:()=>o});var r=n(70586);async function i(e,t){const{WhereClause:r}=await n.e(1534).then(n.bind(n,41534));return r.create(e,t)}function o(e,t){return(0,r.pC)(e)?(0,r.pC)(t)?`(${e}) AND (${t})`:e:t}},72762:(e,t,n)=>{n.d(t,{t:()=>y});var r=n(43697),i=n(15923),o=n(61247),s=n(70586),l=n(17445),a=n(1654),p=n(5600),u=n(52011);let y=class extends i.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new o.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,n={}){return this._installWatch(e,t,n,l.YP)}addWhen(e,t,n={}){return this._installWatch(e,t,n,l.gx)}addOnCollectionChange(e,t,{initial:n=!1,final:r=!1}={}){const i=++this._handleId;return this._handles.add([(0,l.on)(e,"after-changes",this._createSyncUpdatingCallback(),l.Z_),(0,l.on)(e,"change",t,{onListenerAdd:n?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:r?e=>t({added:[],removed:e.toArray()}):void 0})],i),{remove:()=>this._handles.remove(i)}}addPromise(e){if((0,s.Wi)(e))return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(c)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const n=()=>this._handles.remove(t);return e.then(n,n),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,n={},r){const i=++this._handleId;n.sync||this._installSyncUpdatingWatch(e,i);const o=r(e,t,n);return this._handles.add(o,i),{remove:()=>this._handles.remove(i)}}_installSyncUpdatingWatch(e,t){const n=this._createSyncUpdatingCallback(),r=(0,l.YP)(e,n,{sync:!0,equals:()=>!1});return this._handles.add(r,t),r}_createSyncUpdatingCallback(){return()=>{this._handles.remove(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,a.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(c))})),c)}}};(0,r._)([(0,p.Cb)({readOnly:!0})],y.prototype,"updating",void 0),y=(0,r._)([(0,u.j)("esri.core.support.WatchUpdatingTracking")],y);const c=-42},51806:(e,t,n)=>{n.d(t,{aX:()=>N});var r=n(68773),i=n(20102),o=n(92604),s=n(70586),l=n(38913),a=n(58901),p=n(82971),u=n(33955);const y={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new a.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:p.Z.WebMercator}),minus180Line:new a.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:p.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new a.Z({paths:[[[180,-180],[180,180]]],spatialReference:p.Z.WGS84}),minus180Line:new a.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:p.Z.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function d(e,t){const n=f(e);for(const e of n)for(const n of e)n[0]+=t;return e}function f(e){return(0,u.oU)(e)?e.rings:e.paths}var h=n(8744),m=n(40488),g=(n(66577),n(3172)),S=n(11282),b=n(17452);const _=o.Z.getLogger("esri.geometry.support.normalizeUtils");function w(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function C(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof l.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw _.error(e),new i.Z(e)}const n=f(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const i=e[r][0],o=e[r][1],s=e[r+1][0],l=e[r+1][1],a=Math.sqrt((s-i)*(s-i)+(l-o)*(l-o)),p=(l-o)/a,u=(s-i)/a,y=a/t;if(y>1){for(let e=1;e<=y-1;e++){const r=e*t,s=u*r+i,l=p*r+o;n.push([s,l])}const e=(a+Math.floor(y-1)*t)/2,r=u*e+i,s=p*e+o;n.push([r,s])}n.push([s,l])}}return function(e){return"polygon"===e.type}(e)?new l.Z({rings:r,spatialReference:e.spatialReference}):new a.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,m.Sx)(t,!0)}return n&&(e=d(e,n)),e}function x(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=c(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=c(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=c(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=c(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function O(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const i=t.cutIndexes[r],o=t.geometries[r],s=f(o);for(let e=0;e<s.length;e++){const t=s[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*c(n,180);for(let n=0;n<t.length;n++){const t=o.getPoint(e,n);o.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(i===n){if(w(e))for(const t of f(o))e[i]=e[i].addRing(t);else if(v(e))for(const t of f(o))e[i]=e[i].addPath(t)}else n=i,e[i]=o}return e}async function N(e,t,n){if(!Array.isArray(e))return N([e],t);t&&"string"!=typeof t&&_.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??r.Z.geometryServiceUrl;let o,p,f,w,v,T,L,Z,I=0;const J=[],M=[];for(const t of e)if((0,s.Wi)(t))M.push(t);else if(o||(o=t.spatialReference,p=(0,h.C5)(o),f=o.isWebMercator,T=f?102100:4326,w=y[T].maxX,v=y[T].minX,L=y[T].plus180Line,Z=y[T].minus180Line),p)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(x(t.clone(),w,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>x(e,w,v))),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,p);M.push(e.rings?new l.Z(e):e)}else if(t.extent){const e=t.extent,n=c(e.xmin,v)*(2*w);let r=0===n?t.clone():d(t.clone(),n);e.offset(n,0),e.intersects(L)&&e.xmax!==w?(I=e.xmax>I?e.xmax:I,r=C(r,f),J.push(r),M.push("cut")):e.intersects(Z)&&e.xmin!==v?(I=e.xmax*(2*w)>I?e.xmax*(2*w):I,r=C(r,f,360),J.push(r),M.push("cut")):M.push(r)}else M.push(t.clone());else M.push(t);let j=c(I,w),R=-90;const A=j,E=new a.Z;for(;j>0;){const e=360*j-180;E.addPath([[e,R],[e,-1*R]]),R*=-1,j--}if(J.length>0&&A>0){const t=O(J,await async function(e,t,n,r){const i=(0,S.en)(e),o=t[0].spatialReference,s={...r,query:{...i.query,f:"json",sr:JSON.stringify(o),target:JSON.stringify({geometryType:(0,u.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},l=await(0,g.default)(i.path+"/cut",s),{cutIndexes:a,geometries:p=[]}=l.data;return{cutIndexes:a,geometries:p.map((e=>{const t=(0,u.im)(e);return t.spatialReference=o,t}))}}(i,J,E,n)),r=[],o=[];for(let n=0;n<M.length;n++){const i=M[n];if("cut"!==i)o.push(i);else{const i=t.shift(),l=e[n];(0,s.pC)(l)&&"polygon"===l.type&&l.rings&&l.rings.length>1&&i.rings.length>=l.rings.length?(r.push(i),o.push("simplify")):o.push(f?(0,m.$)(i):i)}}if(!r.length)return o;const l=await async function(e,t,n){const r="string"==typeof e?(0,b.mN)(e):e,i=t[0].spatialReference,o=(0,u.Ji)(t[0]),s={...n,query:{...r.query,f:"json",sr:i.wkid?i.wkid:JSON.stringify(i),geometries:JSON.stringify((a=t,{geometryType:(0,u.Ji)(a[0]),geometries:a.map((e=>e.toJSON()))}))}},{data:l}=await(0,g.default)(r.path+"/simplify",s);var a;return function(e,t,n){const r=(0,u.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}(l.geometries,o,i)}(i,r,n),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(f?(0,m.$)(l.shift()):l.shift())}return a}const F=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)F.push(t);else{const e=J.shift();F.push(!0===f?(0,m.$)(e):e)}}return F}},69285:(e,t,n)=>{n.d(t,{k:()=>s});var r=n(70586),i=n(67900),o=n(8744);function s(e,t,n){if((0,r.Wi)(t)||(0,r.Wi)(n)||n.vcsWkid||(0,o.fS)(t,n))return null;const s=(0,i._R)(t)/(0,i._R)(n);if(1===s)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,s);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,s);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,s);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,s);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,s);default:return null}}},62128:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Q});var r=n(43697),i=(n(66577),n(38171)),o=(n(9790),n(46791)),s=n(20102),l=n(22974),a=n(70586),p=n(16453),u=n(78286),y=n(20941),c=n(5600),d=n(75215),f=n(71715),h=n(52011),m=n(30556),g=n(44547),S=n(24470),b=n(51806),_=n(8744),w=n(19238),v=(n(67676),n(70921)),C=n(3920);n(80442),n(92604);let x=class extends((0,C.p)(o.Z)){constructor(e){super(e),this.handles.add([this.on("before-add",(e=>{(0,a.Wi)(e.item)&&e.preventDefault()})),this.on("after-add",(e=>this._own(e.item))),this.on("after-remove",(e=>this._release(e.item)))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(o.Z.ofType(this.itemType.Type))(e):new o.Z(e)}};(0,r._)([(0,c.Cb)()],x.prototype,"owner",null),x=(0,r._)([(0,h.j)("esri.core.support.OwningCollection")],x);var O=n(87085),N=n(71612),T=n(72965),L=n(52421);let Z=class extends x{_own(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}_release(e){e.layer===this.owner&&(e.layer=null)}};(0,r._)([(0,L.c)({Type:i.Z,ensureType:(0,d.se)(i.Z)})],Z.prototype,"itemType",void 0),Z=(0,r._)([(0,h.j)("esri.support.GraphicsCollection")],Z);var I=n(86787);let J=class extends((0,N.h)((0,T.M)(O.Z))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new Z,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var M,j;(0,r._)([(0,c.Cb)({type:I.Z})],J.prototype,"elevationInfo",void 0),(0,r._)([(0,c.Cb)((M=Z,j="graphics",{type:M,cast:v.R,set(e){const t=(0,v.Z)(e,this._get(j),M);t.owner=this,this._set(j,t)}}))],J.prototype,"graphics",void 0),(0,r._)([(0,c.Cb)({type:["show","hide"]})],J.prototype,"listMode",void 0),(0,r._)([(0,c.Cb)()],J.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],J.prototype,"type",void 0),(0,r._)([(0,c.Cb)({constructOnly:!0})],J.prototype,"internal",void 0),J=(0,r._)([(0,h.j)("esri.layers.GraphicsLayer")],J);const R=J;var A=n(92908),E=n(38009),F=n(16859),P=n(1231),z=n(20256),W=n(4095),k=n(77987),D=n(78724),G=n(82971),q=n(6570);function U(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!H(e)))}function H({layerDefinition:e,featureSet:t}){const n=e.geometryType??t.geometryType;return $.find((t=>n===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function X(){return new q.Z({xmin:-180,ymin:-90,xmax:180,ymax:90})}const K=new P.Z({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),B=new P.Z({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0});let V=class extends R{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer.spatialReference,t=this.fullBounds;return(0,a.Wi)(t)?(0,g.dz)(X(),e).geometry:(0,S.HH)(t,e)}get fullBounds(){const e=this.layer.spatialReference,t=(0,S.cS)();return this.graphics.forEach((n=>{const r=(0,a.pC)(n.geometry)?(0,g.dz)(n.geometry,e).geometry:null;(0,a.pC)(r)&&(0,S.jn)(t,"point"===r.type?r:r.extent,t)})),(0,S.fS)(t,S.Gv)?null:t}get sublayers(){return this.graphics}};(0,r._)([(0,c.Cb)({readOnly:!0})],V.prototype,"fullExtent",null),(0,r._)([(0,c.Cb)({readOnly:!0})],V.prototype,"fullBounds",null),(0,r._)([(0,c.Cb)({readOnly:!0})],V.prototype,"sublayers",null),(0,r._)([(0,c.Cb)()],V.prototype,"layer",void 0),(0,r._)([(0,c.Cb)()],V.prototype,"layerId",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],V.prototype,"visibilityMode",void 0),V=(0,r._)([(0,h.j)("esri.layers.MapNotesLayer.MapNotesSublayer")],V);const $=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new z.Z).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new W.Z).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new k.Z).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new k.Z).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new D.Z).toJSON()}];let Y=class extends((0,N.h)((0,T.M)((0,E.q)((0,F.I)((0,p.R)(O.Z)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=G.Z.WGS84,this.sublayers=new o.Z($.map((e=>new V({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,n){return{operations:{supportsMapNotesEditing:!U(t)&&"portal-item"!==n?.origin}}}readFeatureCollections(e,t,n){if(!U(t))return null;const r=t.layers.map((e=>{const t=new w.default;return t.read(e,n),t}));return new o.Z({items:r})}readLegacyfeatureCollectionJSON(e,t){return U(t)?(0,l.d9)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,S.cS)();return(0,a.pC)(this.sublayers)?this.sublayers.forEach((({fullBounds:e})=>(0,a.pC)(e)?(0,S.jn)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((n=>{const r=(0,g.dz)(n.layerDefinition.extent,e).geometry;(0,a.pC)(r)&&(0,S.jn)(t,r,t)})),(0,S.fS)(t,S.Gv)?(0,g.dz)(X(),e).geometry:(0,S.HH)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?G.Z.fromJSON(t.layers[0].layerDefinition.spatialReference):G.Z.WGS84}readSublayers(e,t,n){if(U(t))return null;const r=[];let s=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:n}=e,o=t.id??s++,l=H(e);if((0,a.pC)(l)){const e=new V({id:l.id,title:t.name,layerId:o,layer:this,graphics:n.features.map((({geometry:e,symbol:t,attributes:n,popupInfo:r})=>i.Z.fromJSON({attributes:n,geometry:e,symbol:t,popupTemplate:r})))});r.push(e)}}return new o.Z(r)}writeSublayers(e,t,n,r){const{minScale:i,maxScale:o}=this;if((0,a.Wi)(e))return;const l=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(l&&r?.messages?.push(new s.Z("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const p=[];let y=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if((0,a.pC)(e.geometry)){y=e.geometry.spatialReference.toJSON();break e}for(const t of $){const n=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(p,n,t,i,o,y,r)}(0,u.RB)("featureCollection.layers",p,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,l.d9)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if((0,a.Wi)(this.sublayers))return;let e=null;const t=[];for(const n of this.sublayers)for(const r of n.graphics)if((0,a.pC)(r.geometry)){const n=r.geometry;e?(0,_.fS)(n.spatialReference,e)||((0,g.Up)(n.spatialReference,e)||(0,g.kR)()||await(0,g.zD)(),r.geometry=(0,g.iV)(n,e)):e=n.spatialReference,t.push(r)}const n=await(0,b.aX)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=n[t]))}_findSublayer(e){return(0,a.Wi)(this.sublayers)?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,n,r,i,o,s){const p=[];if(!(0,a.Wi)(t)){for(const e of t.graphics)this._writeMapNote(p,e,n.geometryType,s);this._normalizeObjectIds(p,K),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,l.d9)(n.identifyingSymbol)}},id:t.layerId,geometryType:n.geometryTypeJSON,minScale:r,maxScale:i,objectIdField:"OBJECTID",fields:[K.toJSON(),B.toJSON()],spatialReference:o},featureSet:{features:p,geometryType:n.geometryTypeJSON}})}}_writeMapNote(e,t,n,r){if((0,a.Wi)(t))return;const{geometry:i,symbol:o,popupTemplate:s}=t;if((0,a.Wi)(i))return;if(i.type!==n)return void r?.messages?.push(new y.Z("map-notes-layer:invalid-geometry-type",`Geometry "${i.type}" cannot be saved in "${n}" layer`,{graphic:t}));if((0,a.Wi)(o))return void r?.messages?.push(new y.Z("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const l={attributes:{...t.attributes},geometry:i.toJSON(),symbol:o.toJSON()};(0,a.pC)(s)&&(l.popupInfo=s.toJSON()),e.push(l)}_normalizeObjectIds(e,t){const n=t.name;let r=(0,A.S)(n,e)+1;const i=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[n]||i.has(e[n]))&&(e[n]=r++),i.add(e[n])}}};(0,r._)([(0,c.Cb)({readOnly:!0})],Y.prototype,"capabilities",void 0),(0,r._)([(0,f.r)(["portal-item","web-map"],"capabilities",["layers"])],Y.prototype,"readCapabilities",null),(0,r._)([(0,c.Cb)({readOnly:!0})],Y.prototype,"featureCollections",void 0),(0,r._)([(0,f.r)(["web-map","portal-item"],"featureCollections",["layers"])],Y.prototype,"readFeatureCollections",null),(0,r._)([(0,c.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],Y.prototype,"featureCollectionJSON",void 0),(0,r._)([(0,f.r)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],Y.prototype,"readLegacyfeatureCollectionJSON",null),(0,r._)([(0,c.Cb)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],Y.prototype,"featureCollectionType",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],Y.prototype,"fullExtent",null),(0,r._)([(0,c.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],Y.prototype,"legendEnabled",void 0),(0,r._)([(0,c.Cb)({type:["show","hide","hide-children"]})],Y.prototype,"listMode",void 0),(0,r._)([(0,c.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],Y.prototype,"minScale",void 0),(0,r._)([(0,f.r)(["web-map","portal-item"],"minScale",["layers"])],Y.prototype,"readMinScale",null),(0,r._)([(0,c.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],Y.prototype,"maxScale",void 0),(0,r._)([(0,f.r)(["web-map","portal-item"],"maxScale",["layers"])],Y.prototype,"readMaxScale",null),(0,r._)([(0,c.Cb)({readOnly:!0})],Y.prototype,"multipointLayer",null),(0,r._)([(0,c.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Y.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],Y.prototype,"pointLayer",null),(0,r._)([(0,c.Cb)({readOnly:!0})],Y.prototype,"polygonLayer",null),(0,r._)([(0,c.Cb)({readOnly:!0})],Y.prototype,"polylineLayer",null),(0,r._)([(0,c.Cb)({type:G.Z})],Y.prototype,"spatialReference",void 0),(0,r._)([(0,f.r)(["web-map","portal-item"],"spatialReference",["layers"])],Y.prototype,"readSpatialReference",null),(0,r._)([(0,c.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],Y.prototype,"sublayers",void 0),(0,r._)([(0,f.r)("web-map","sublayers",["layers"])],Y.prototype,"readSublayers",null),(0,r._)([(0,m.c)("web-map","sublayers")],Y.prototype,"writeSublayers",null),(0,r._)([(0,c.Cb)({readOnly:!0})],Y.prototype,"textLayer",null),(0,r._)([(0,c.Cb)()],Y.prototype,"title",void 0),(0,r._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],Y.prototype,"type",void 0),Y=(0,r._)([(0,h.j)("esri.layers.MapNotesLayer")],Y);const Q=Y},92908:(e,t,n)=>{n.d(t,{S:()=>i,X:()=>r});const r=1;function i(e,t){let n=0;for(const r of t){const t=r.attributes?.[e];"number"==typeof t&&isFinite(t)&&(n=Math.max(n,t))}return n}},54295:(e,t,n)=>{n.d(t,{V:()=>s});var r=n(43697),i=n(5600),o=(n(67676),n(75215),n(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,i.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,n)=>{n.d(t,{Y:()=>p});var r=n(43697),i=n(92604),o=n(70586),s=n(5600),l=(n(67676),n(75215),n(52011)),a=n(66677);const p=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if((0,o.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,i.Z.getLogger(this.declaredClass)))}};return(0,r._)([(0,s.Cb)()],t.prototype,"title",null),(0,r._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,l.j)("esri.layers.mixins.ArcGISService")],t),t}},70082:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(43697),i=n(2368),o=n(35454),s=n(96674),l=n(5600),a=(n(67676),n(75215),n(52011));const p=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.J)(s.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,r._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,r._)([(0,l.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,r._)([(0,a.j)("esri.layers.support.FeatureTemplate")],u);const y=u},16451:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),l=(n(67676),n(75215),n(71715)),a=n(52011),p=n(30556),u=n(72729),y=n(70082);let c=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const n of Object.keys(e))t[n]=(0,u.im)(e[n]);return t}writeDomains(e,t){const n={};for(const t of Object.keys(e))e[t]&&(n[t]=e[t]?.toJSON());t.domains=n}};(0,r._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"id",void 0),(0,r._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,r._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"domains",void 0),(0,r._)([(0,l.r)("domains")],c.prototype,"readDomains",null),(0,r._)([(0,p.c)("domains")],c.prototype,"writeDomains",null),(0,r._)([(0,s.Cb)({type:[y.Z],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,r._)([(0,a.j)("esri.layers.support.FeatureType")],c);const d=c},56765:(e,t,n)=>{n.d(t,{Z:()=>u});var r,i=n(43697),o=n(46791),s=n(96674),l=n(5600),a=(n(67676),n(75215),n(52011));let p=r=class extends s.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.Z}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,i._)([(0,l.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,i._)([(0,l.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=r=(0,i._)([(0,a.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},51706:(e,t,n)=>{var r,i;function o(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function s(e){return null!=e&&!isNaN(e)&&isFinite(e)}function l(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function a(e,t){const n=t||l(e),o=e.valueUnit||"unknown";return n===r.Unknown?i.Constant:e.stops?i.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?i.ClampedLinear:"unknown"===o?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?i.Proportional:i.Additive:i.Identity:i.RealWorldSize}n.d(t,{PS:()=>l,QW:()=>a,RY:()=>r,hL:()=>i,iY:()=>o,qh:()=>s}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(i||(i={}))},28694:(e,t,n)=>{n.d(t,{p:()=>o});var r=n(70586),i=n(69285);function o(e,t,n){if(!n||!n.features||!n.hasZ)return;const o=(0,i.k)(n.geometryType,t,e.outSpatialReference);if(!(0,r.Wi)(o))for(const e of n.features)o(e.geometry)}},11282:(e,t,n)=>{n.d(t,{cv:()=>l,en:()=>s,lA:()=>o});var r=n(22974),i=n(17452);function o(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.mN)(e):(0,r.d9)(e)}function l(e,t,n){const r={};for(const i in e){if("declaredClass"===i)continue;const o=e[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){r[i]=[];for(let e=0;e<o.length;e++)r[i][e]=l(o[e])}else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(n&&n[i]);r[i]=t?e:JSON.stringify(e)}else r[i]=t?o:JSON.stringify(o);else r[i]=o}return r}},58333:(e,t,n)=>{n.d(t,{ET:()=>o,I4:()=>i,eG:()=>a,lF:()=>s,lj:()=>u,qP:()=>l,wW:()=>p});const r=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1785],{3892:(t,e,r)=>{function n(t){return"h"in t&&"s"in t&&"v"in t}function i(t){return"l"in t&&"a"in t&&"b"in t}function a(t){return"l"in t&&"c"in t&&"h"in t}r.d(e,{Y3:()=>g,_Y:()=>f,sJ:()=>m,xr:()=>y});const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],o=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(t,e){const r=[];let n,i;if(t[0].length!==e.length)throw"dimensions do not match";const a=t.length,s=t[0].length;let o=0;for(n=0;n<a;n++){for(o=0,i=0;i<s;i++)o+=t[n][i]*e[i];r.push(o)}return r}function u(t){const e=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),r=l(s,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function c(t){const e=l(o,[t.x/100,t.y/100,t.z/100]).map((t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))}));return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function h(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function p(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function y(t){return"r"in(e=t)&&"g"in e&&"b"in e?t:a(t)?function(t){return c(p(function(t){const e=t.l,r=t.c,n=t.h;return{l:e,a:r*Math.cos(n),b:r*Math.sin(n)}}(t)))}(t):i(t)?function(t){return c(p(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?c(t):n(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,n=t.v/100*255,i=n*r,a=i*(1-Math.abs(e%2-1));let s;switch(Math.floor(e)){case 0:s={r:i,g:a,b:0};break;case 1:s={r:a,g:i,b:0};break;case 2:s={r:0,g:i,b:a};break;case 3:s={r:0,g:a,b:i};break;case 4:s={r:a,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:a};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-i),s.g=Math.round(s.g+n-i),s.b=Math.round(s.b+n-i),s}(t):t;var e}function f(t){return n(t)?t:function(t){const e=t.r,r=t.g,n=t.b,i=Math.max(e,r,n),a=i-Math.min(e,r,n);let s=i,o=0===a?0:i===e?(r-n)/a%6:i===r?(n-e)/a+2:(e-r)/a+4,l=0===a?0:a/s;return o<0&&(o+=6),o*=60,l*=100,s*=100/255,{h:o,s:l,v:s}}(y(t))}function g(t){return i(t)?t:function(t){return h(u(t))}(y(t))}function m(t){return a(t)?t:function(t){return function(t){const e=t.l,r=t.a,n=t.b,i=Math.sqrt(r*r+n*n);let a=Math.atan2(n,r);return a=a>0?a:a+2*Math.PI,{l:e,c:i,h:a}}(h(u(t)))}(y(t))}},31363:(t,e,r)=>{r.d(e,{B1:()=>n,DQ:()=>u,DT:()=>o,JJ:()=>i,Or:()=>c,_U:()=>a,k3:()=>h,sX:()=>p});const n=Number.POSITIVE_INFINITY,i=Math.PI,a=2*i,s=128/i,o=i/180,l=1/Math.LN2;function u(t,e){return(t%=e)>=0?t:t+e}function c(t){return u(t*s,256)}function h(t){return Math.log(t)*l}function p(t,e,r){return t*(1-r)+e*r}},26084:(t,e,r)=>{r.d(e,{Z:()=>n});class n{constructor(t){this._array=[],t<=0&&console.error("strideInBytes must be positive!"),this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}static i1616to32(t,e){return 65535&t|e<<16}static i8888to32(t,e,r,n){return 255&t|(255&e)<<8|(255&r)<<16|n<<24}static i8816to32(t,e,r){return 255&t|(255&e)<<8|r<<16}}},4215:(t,e,r)=>{var n,i,a,s,o;r.d(e,{Fr:()=>o,_K:()=>s,al:()=>i}),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.FILL_VERTEX=1]="FILL_VERTEX",t[t.FILL_DD_VERTEX=2]="FILL_DD_VERTEX",t[t.FILL_INDEX=3]="FILL_INDEX",t[t.OUTLINE_VERTEX=4]="OUTLINE_VERTEX",t[t.OUTLINE_DD_VERTEX=5]="OUTLINE_DD_VERTEX",t[t.OUTLINE_INDEX=6]="OUTLINE_INDEX",t[t.LINE_VERTEX=7]="LINE_VERTEX",t[t.LINE_DD_VERTEX=8]="LINE_DD_VERTEX",t[t.LINE_INDEX=9]="LINE_INDEX",t[t.ICON_VERTEX=10]="ICON_VERTEX",t[t.ICON_DD_VERTEX=11]="ICON_DD_VERTEX",t[t.ICON_INDEX=12]="ICON_INDEX",t[t.TEXT_VERTEX=13]="TEXT_VERTEX",t[t.TEXT_DD_VERTEX=14]="TEXT_DD_VERTEX",t[t.TEXT_INDEX=15]="TEXT_INDEX",t[t.CIRCLE_VERTEX=16]="CIRCLE_VERTEX",t[t.CIRCLE_INDEX=17]="CIRCLE_INDEX"}(n||(n={})),function(t){t[t.FILL=1]="FILL",t[t.LINE=2]="LINE",t[t.SYMBOL=3]="SYMBOL",t[t.CIRCLE=4]="CIRCLE"}(i||(i={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.OPAQUE=1]="OPAQUE",t[t.TRANSLUCENT=2]="TRANSLUCENT",t[t.SYMBOLS=3]="SYMBOLS",t[t.HITTEST=4]="HITTEST"}(a||(a={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.FILL=1]="FILL",t[t.OUTLINE=2]="OUTLINE",t[t.LINE=3]="LINE",t[t.ICON=4]="ICON",t[t.CIRCLE=5]="CIRCLE",t[t.TEXT=6]="TEXT",t[t.TILEINFO=7]="TILEINFO"}(s||(s={})),function(t){t[t.PAINTER_CHANGED=0]="PAINTER_CHANGED",t[t.LAYOUT_CHANGED=1]="LAYOUT_CHANGED",t[t.LAYER_CHANGED=2]="LAYER_CHANGED",t[t.LAYER_REMOVED=3]="LAYER_REMOVED",t[t.SPRITES_CHANGED=4]="SPRITES_CHANGED"}(o||(o={}))},21315:(t,e,r)=>{r.d(e,{R:()=>a,_5:()=>u,aF:()=>s,f2:()=>f,fR:()=>n,nR:()=>l,r1:()=>h,vL:()=>o});var n,i,a,s,o,l,u,c,h,p,y=r(95648);(p=n||(n={}))[p.BACKGROUND=0]="BACKGROUND",p[p.FILL=1]="FILL",p[p.LINE=2]="LINE",p[p.SYMBOL=3]="SYMBOL",p[p.CIRCLE=4]="CIRCLE",function(t){t[t.VISIBLE=0]="VISIBLE",t[t.NONE=1]="NONE"}(i||(i={})),function(t){t[t.POINT=0]="POINT",t[t.LINE=1]="LINE",t[t.LINE_CENTER=2]="LINE_CENTER"}(a||(a={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT",t[t.AUTO=2]="AUTO"}(s||(s={})),function(t){t[t.AUTO=0]="AUTO",t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT"}(o||(o={})),function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.TOP=3]="TOP",t[t.BOTTOM=4]="BOTTOM",t[t.TOP_LEFT=5]="TOP_LEFT",t[t.TOP_RIGHT=6]="TOP_RIGHT",t[t.BOTTOM_LEFT=7]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"}(l||(l={})),function(t){t[t.NONE=0]="NONE",t[t.UPPERCASE=1]="UPPERCASE",t[t.LOWERCASE=2]="LOWERCASE"}(u||(u={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT"}(c||(c={})),function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(h||(h={}));class f{}f.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.fillLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE},"line-cap":{type:"enum",values:["butt","round","square"],default:y.RL.BUTT},"line-join":{type:"enum",values:["bevel","round","miter"],default:y.AH.MITER},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}},f.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE},"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:a.POINT},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"icon-ignore-placement":{type:"boolean",default:!1},"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:s.AUTO},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:o.CENTER},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0},"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:s.AUTO},"text-size":{type:"number",minimum:0,default:16},"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:u.NONE},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[h.HORIZONTAL]}},f.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}},f.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}},f.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color",default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP},"line-width":{type:"number",minimum:0,default:1}},f.symbolPaintDefinition={"icon-color":{type:"color",default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0},"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}},f.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number",minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}},f.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number",minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}}},7333:(t,e,r)=>{r.d(e,{Et:()=>Pt,sj:()=>Gt,Le:()=>Ot,_L:()=>Bt,gf:()=>St,jG:()=>Ut,nj:()=>kt});var n,i,a=r(4215),s=r(70586),o=r(26084);!function(t){t[t.R8_SIGNED=0]="R8_SIGNED",t[t.R8_UNSIGNED=1]="R8_UNSIGNED",t[t.R16_SIGNED=2]="R16_SIGNED",t[t.R16_UNSIGNED=3]="R16_UNSIGNED",t[t.R8G8_SIGNED=4]="R8G8_SIGNED",t[t.R8G8_UNSIGNED=5]="R8G8_UNSIGNED",t[t.R16G16_SIGNED=6]="R16G16_SIGNED",t[t.R16G16_UNSIGNED=7]="R16G16_UNSIGNED",t[t.R8G8B8A8_SIGNED=8]="R8G8B8A8_SIGNED",t[t.R8G8B8A8_UNSIGNED=9]="R8G8B8A8_UNSIGNED",t[t.R8G8B8A8_COLOR=10]="R8G8B8A8_COLOR",t[t.R16G16B16A16_DASHARRAY=11]="R16G16B16A16_DASHARRAY",t[t.R16G16B16A16_PATTERN=12]="R16G16B16A16_PATTERN"}(n||(n={})),function(t){t[t.UNIFORM=0]="UNIFORM",t[t.DATA_DRIVEN=1]="DATA_DRIVEN",t[t.INTERPOLATED_DATA_DRIVEN=2]="INTERPOLATED_DATA_DRIVEN",t[t.UNUSED=3]="UNUSED"}(i||(i={}));var l=r(35371),u=r(21968);class c{constructor(t){this._locations=new Map,this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._layoutInfo||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return 0===this._locations.size&&this._buildAttributesInfo(),this._locations}getLayoutInfo(){return this._layoutInfo||this._buildAttributesInfo(),this._layoutInfo}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,r,n,i){const a=this.getUniforms();for(const s of a){const{name:a,type:o,getValue:l}=s,u=l(r,e,n,i);if(null!==u)switch(o){case"float":t.setUniform1f(a,u);break;case"vec2":t.setUniform2fv(a,u);break;case"vec4":t.setUniform4fv(a,u)}}}encodeAttributes(t,e,r,i){const a=this.attributesInfo(),s=this.getEncodingInfos(),o=[];let l=0,u=0;for(const c of Object.keys(s)){const h=s[c],{type:p,precisionFactor:y,isLayout:f}=a[c],g=f?r.getLayoutProperty(c):r.getPaintProperty(c),m=g.interpolator?.getInterpolationRange(e);let _=0;for(const r of h){const{offset:a,bufferElementsToAdd:s}=r;if(s>0){for(let t=0;t<s;t++)o.push(0);l+=u,u=r.bufferElementsToAdd}const c=i??g.getValue(m?m[_]:e,t);switch(p){case n.R8_SIGNED:case n.R8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a);break;case n.R16_SIGNED:case n.R16_UNSIGNED:o[l]|=this._encodeShort(c*(y||1),8*a);break;case n.R8G8_SIGNED:case n.R8G8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a),o[l]|=this._encodeByte(c*(y||1),8*a+8);break;case n.R16G16_SIGNED:case n.R16G16_UNSIGNED:o[l]|=this._encodeShort(c*(y||1),8*a),o[l]|=this._encodeShort(c*(y||1),8*a+16);break;case n.R8G8B8A8_SIGNED:case n.R8G8B8A8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a),o[l]|=this._encodeByte(c*(y||1),8*a+8),o[l]|=this._encodeByte(c*(y||1),8*a+16),o[l]|=this._encodeByte(c*(y||1),8*a+24);break;case n.R8G8B8A8_COLOR:o[l]=this._encodeColor(c);break;case n.R16G16B16A16_DASHARRAY:case n.R16G16B16A16_PATTERN:this._encodePattern(l,o,c);break;default:throw new Error("Unsupported encoding type")}_++}}return o}getAtributeState(t){let e=0;const r=3+2*t;return e|=this._bit(r),e|=this._bit(r+1)<<1,e}_buildAttributesInfo(){const t=[],e={},r={};let n=-1;const a=this.attributesInfo(),s=this.attributes();let o=-1;for(const l of s){o++;const s=this.getAtributeState(o);if(s===i.UNIFORM||s===i.UNUSED)continue;const u=a[l],h=[];e[l]=h;const p=u.type;for(let e=0;e<s;e++){const{dataType:e,bytesPerElement:i,count:a,normalized:s}=c._encodingInfo[p],o=i*a,l=`${e}-${!0===s}`;let u=r[l],y=0;if(!u||u.count+a>4)n++,u={dataIndex:n,count:0,offset:0},4!==a&&(r[l]=u),t.push({location:-1,name:"a_data_"+n,count:a,type:e,normalized:s}),y=Math.ceil(Math.max(o/4,1));else{const e=t[u.dataIndex];e.count+=a,y=Math.ceil(Math.max(e.count*i/4,1))-Math.ceil(Math.max(u.offset/4,1))}h.push({dataIndex:u.dataIndex,offset:u.offset,bufferElementsToAdd:y}),u.offset+=o,u.count+=a}}for(const e of t)switch(e.type){case l.g.BYTE:case l.g.UNSIGNED_BYTE:e.count=4;break;case l.g.SHORT:case l.g.UNSIGNED_SHORT:e.count+=e.count%2}this._buildVertexBufferLayout(t);let u=0;const h=this._layoutInfo.geometry;for(const t of h)this._locations.set(t.name,u++);const p=this._layoutInfo.opacity;if(p)for(const t of p)this._locations.set(t.name,u++);this._buildShaderInfo(t,e),this._propertyEncodingInfo=e}_buildVertexBufferLayout(t){const e={},r=this.geometryInfo();let n=r[0].stride;if(0===t.length)e.geometry=r;else{const i=[];let a=n;for(const e of t)n+=h(e.type)*e.count;for(const t of r)i.push(new u.G(t.name,t.count,t.type,t.offset,n,t.normalized));for(const e of t)i.push(new u.G(e.name,e.count,e.type,a,n,e.normalized)),a+=h(e.type)*e.count;e.geometry=i}this.opacityInfo()&&(e.opacity=this.opacityInfo()),this._layoutInfo=e,this._stride=n}_buildShaderInfo(t,e){let r="\n",a="\n";const o=[];for(const e of t)r+=`attribute ${this._getType(e.count)} ${e.name};\n`;const l=this.attributes(),u=this.attributesInfo();let h=-1;for(const t of l){h++;const{name:l,type:y,precisionFactor:f,isLayout:g}=u[t],m=f&&1!==f?" * "+1/f:"",{bytesPerElement:_,count:d}=c._encodingInfo[y],E=t=>`a_data_${t.dataIndex}${p(d,t.offset,_)}`;switch(this.getAtributeState(h)){case i.UNIFORM:{const e=this._getType(d),i=`u_${l}`;o.push({name:i,type:e,getValue:(e,r,i,a)=>{const o=g?e.getLayoutValue(t,r):e.getPaintValue(t,r);if(y===n.R16G16B16A16_DASHARRAY){const t=e.getDashKey(o,e.getLayoutValue("line-cap",r)),n=a.getMosaicItemPosition(t,!1);if((0,s.Wi)(n))return null;const{tl:i,br:l}=n;return[i[0],l[1],l[0],i[1]]}if(y===n.R16G16B16A16_PATTERN){const e=a.getMosaicItemPosition(o,!t.includes("line-"));if((0,s.Wi)(e))return null;const{tl:r,br:n}=e;return[r[0],n[1],n[0],r[1]]}if(y===n.R8G8B8A8_COLOR){const t=o[3];return[t*o[0],t*o[1],t*o[2],t]}return o}}),r+=`uniform ${e} ${i};\n`,a+=`${e} ${l} = ${i};\n`}break;case i.DATA_DRIVEN:{const r=E(e[t][0]);a+=`${this._getType(d)} ${l} = ${r}${m};\n`}break;case i.INTERPOLATED_DATA_DRIVEN:{const n=`u_t_${l}`;o.push({name:n,type:"float",getValue:(e,r,n,i)=>(g?e.getLayoutProperty(t):e.getPaintProperty(t)).interpolator.interpolationUniformValue(n,r)}),r+=`uniform float ${n};\n`;const i=E(e[t][0]),s=E(e[t][1]);a+=`${this._getType(d)} ${l} = mix(${i}${m}, ${s}${m}, ${n});\n`}}}this._shaderHeader=r,this._shaderMain=a,this._uniforms=o}_bit(t){return(this._key&1<<t)>>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(t){const e=255*t[3];return o.Z.i8888to32(t[0]*e,t[1]*e,t[2]*e,e)}_encodePattern(t,e,r){if(!r||!r.rect)return;const n=r.rect,i=r.width,a=r.height;e[t]=this._encodeShort(n.x+2,0),e[t]|=this._encodeShort(n.y+2+a,16),e[t+1]=this._encodeShort(n.x+2+i,0),e[t+1]|=this._encodeShort(n.y+2,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}c._encodingInfo={[n.R8_SIGNED]:{dataType:l.g.BYTE,bytesPerElement:1,count:1,normalized:!1},[n.R8_UNSIGNED]:{dataType:l.g.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},[n.R16_SIGNED]:{dataType:l.g.SHORT,bytesPerElement:2,count:1,normalized:!1},[n.R16_UNSIGNED]:{dataType:l.g.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},[n.R8G8_SIGNED]:{dataType:l.g.BYTE,bytesPerElement:1,count:2,normalized:!1},[n.R8G8_UNSIGNED]:{dataType:l.g.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},[n.R16G16_SIGNED]:{dataType:l.g.SHORT,bytesPerElement:2,count:2,normalized:!1},[n.R16G16_UNSIGNED]:{dataType:l.g.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},[n.R8G8B8A8_SIGNED]:{dataType:l.g.BYTE,bytesPerElement:1,count:4,normalized:!1},[n.R8G8B8A8_UNSIGNED]:{dataType:l.g.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},[n.R8G8B8A8_COLOR]:{dataType:l.g.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},[n.R16G16B16A16_DASHARRAY]:{dataType:l.g.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},[n.R16G16B16A16_PATTERN]:{dataType:l.g.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}};const h=t=>{switch(t){case l.g.FLOAT:case l.g.INT:case l.g.UNSIGNED_INT:return 4;case l.g.SHORT:case l.g.UNSIGNED_SHORT:return 2;case l.g.BYTE:case l.g.UNSIGNED_BYTE:return 1}},p=(t,e,r)=>{const n=e/r;if(1===t)switch(n){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2===t)switch(n){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===t)switch(n){case 0:return".xyz";case 1:return".yzw"}return""};class y extends c{constructor(t){super(t)}geometryInfo(){return y.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return y.ATTRIBUTES}attributesInfo(){return y.ATTRIBUTES_INFO}}y.ATTRIBUTES=[],y.GEOMETRY_LAYOUT=[new u.G("a_pos",2,l.g.BYTE,0,2)],y.ATTRIBUTES_INFO={};class f extends c{constructor(t){super(t)}geometryInfo(){return f.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return f.ATTRIBUTES}attributesInfo(){return f.ATTRIBUTES_INFO}}f.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"],f.GEOMETRY_LAYOUT=[new u.G("a_pos",2,l.g.SHORT,0,4)],f.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:n.R8_UNSIGNED},"circle-color":{name:"color",type:n.R8G8B8A8_COLOR},"circle-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:n.R8_UNSIGNED,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:n.R8G8B8A8_COLOR},"circle-stroke-opacity":{name:"stroke_opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:32}};class g extends c{constructor(t){super(t)}geometryInfo(){return g.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return g.ATTRIBUTES}attributesInfo(){return g.ATTRIBUTES_INFO}}g.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"],g.GEOMETRY_LAYOUT=[new u.G("a_pos",2,l.g.SHORT,0,4)],g.ATTRIBUTES_INFO={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"fill-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0}};class m extends c{constructor(t,e){super(t),this._usefillColor=e}geometryInfo(){return m.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return this._usefillColor?m.ATTRIBUTES_FILL:m.ATTRIBUTES_OUTLINE}attributesInfo(){return this._usefillColor?m.ATTRIBUTES_INFO_FILL:m.ATTRIBUTES_INFO_OUTLINE}}m.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"],m.ATTRIBUTES_FILL=["fill-color","fill-opacity"],m.GEOMETRY_LAYOUT=[new u.G("a_pos",2,l.g.SHORT,0,8),new u.G("a_offset",2,l.g.BYTE,4,8),new u.G("a_xnormal",2,l.g.BYTE,6,8)],m.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}},m.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}};class _ extends c{constructor(t){super(t)}geometryInfo(){return _.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return _.ATTRIBUTES}attributesInfo(){return _.ATTRIBUTES_INFO}}_.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"],_.GEOMETRY_LAYOUT=[new u.G("a_pos",2,l.g.SHORT,0,16),new u.G("a_extrude_offset",4,l.g.BYTE,4,16),new u.G("a_dir_normal",4,l.g.BYTE,8,16),new u.G("a_accumulatedDistance",2,l.g.UNSIGNED_SHORT,12,16)],_.ATTRIBUTES_INFO={"line-width":{name:"width",type:n.R8_UNSIGNED,precisionFactor:2},"line-gap-width":{name:"gap_width",type:n.R8_UNSIGNED,precisionFactor:2},"line-offset":{name:"offset",type:n.R8_SIGNED,precisionFactor:2},"line-color":{name:"color",type:n.R8G8B8A8_COLOR},"line-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"line-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:4},"line-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0},"line-dasharray":{name:"tlbr",type:n.R16G16B16A16_DASHARRAY,isOptional:!0}};const d=[new u.G("a_pos",2,l.g.SHORT,0,16),new u.G("a_vertexOffset",2,l.g.SHORT,4,16),new u.G("a_texAngleRange",4,l.g.UNSIGNED_BYTE,8,16),new u.G("a_levelInfo",4,l.g.UNSIGNED_BYTE,12,16)],E=[new u.G("a_opacityInfo",1,l.g.UNSIGNED_BYTE,0,1)];class b extends c{constructor(t){super(t)}geometryInfo(){return d}opacityInfo(){return E}attributes(){return b.ATTRIBUTES}attributesInfo(){return b.ATTRIBUTES_INFO}}b.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"],b.ATTRIBUTES_INFO={"icon-color":{name:"color",type:n.R8G8B8A8_COLOR},"icon-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"icon-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"icon-size":{name:"size",type:n.R8_UNSIGNED,precisionFactor:32,isLayout:!0}};class T extends c{constructor(t){super(t)}geometryInfo(){return d}opacityInfo(){return E}attributes(){return T.ATTRIBUTES}attributesInfo(){return T.ATTRIBUTES_INFO}}T.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"],T.ATTRIBUTES_INFO={"text-color":{name:"color",type:n.R8G8B8A8_COLOR},"text-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"text-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"text-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"text-size":{name:"size",type:n.R8_UNSIGNED,isLayout:!0}};var I=r(22303),w=r(3892);function R(t,e,r,n){const i=3*t,a=3*(r-t)-i,s=1-i-a,o=3*e,l=3*(n-e)-o,u=1-o-l;function c(t){return((s*t+a)*t+i)*t}function h(t){return(3*s*t+2*a)*t+i}return function(t,e=1e-6){return function(t){return((u*t+l)*t+o)*t}(function(t,e){let r,n,i,a,s,o;for(i=t,o=0;o<8;o++){if(a=c(i)-t,Math.abs(a)<e)return i;if(s=h(i),Math.abs(s)<1e-6)break;i-=a/s}if(r=0,n=1,i=t,i<r)return r;if(i>n)return n;for(;r<n;){if(a=c(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i}(t,e))}}const v={};v.ease=R(.25,.1,.25,1),v.linear=R(0,0,1,1),v.easeIn=v["ease-in"]=R(.42,0,1,1),v.easeOut=v["ease-out"]=R(0,0,.58,1),v.easeInOut=v["ease-in-out"]=R(.42,0,.58,1);var N=r(31363);const D={kind:"null"},L={kind:"number"},x={kind:"string"},A={kind:"boolean"},P={kind:"color"},O={kind:"object"},S={kind:"value"};function U(t,e){return{kind:"array",itemType:t,n:e}}const G=[D,L,x,A,P,O,U(S)];function B(t){if("array"===t.kind){const e=B(t.itemType);return"number"==typeof t.n?`array<${e}, ${t.n}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}function k(t){if(null===t)return D;if("string"==typeof t)return x;if("boolean"==typeof t)return A;if("number"==typeof t)return L;if(t instanceof I.Z)return P;if(Array.isArray(t)){let e;for(const r of t){const t=k(r);if(e){if(e!==t){e=S;break}}else e=t}return U(e||S,t.length)}return"object"==typeof t?O:S}function M(t,e){if("array"===e.kind)return"array"===t.kind&&(0===t.n&&"value"===t.itemType.kind||M(t.itemType,e.itemType))&&("number"!=typeof e.n||e.n===t.n);if("value"===e.kind)for(const e of G)if(M(t,e))return!0;return e.kind===t.kind}function C(t){if(null===t)return"";const e=typeof t;return"string"===e?t:"number"===e||"boolean"===e?String(t):t instanceof I.Z?t.toString():JSON.stringify(t)}var V=r(35362);class F{constructor(t){this._parent=t,this._vars={}}add(t,e){this._vars[t]=e}get(t){return this._vars[t]?this._vars[t]:this._parent?this._parent.get(t):null}}class z{constructor(){this.type=S}static parse(t){if(t.length>1)throw new Error('"id" does not expect arguments');return new z}evaluate(t,e){return t?.id}}class ${constructor(){this.type=x}static parse(t){if(t.length>1)throw new Error('"geometry-type" does not expect arguments');return new $}evaluate(t,e){if(!t)return null;switch(t.type){case V.V.Point:return"Point";case V.V.LineString:return"LineString";case V.V.Polygon:return"Polygon";default:return null}}}class Y{constructor(){this.type=O}static parse(t){if(t.length>1)throw new Error('"properties" does not expect arguments');return new Y}evaluate(t,e){return t?.values}}class X{constructor(){this.type=L}static parse(t){if(t.length>1)throw new Error('"zoom" does not expect arguments');return new X}evaluate(t,e){return e}}class H{constructor(t,e,r){this._lhs=t,this._rhs=e,this._compare=r,this.type=A}static parse(t,e,r){if(3!==t.length&&4!==t.length)throw new Error(`"${t[0]}" expects 2 or 3 arguments`);if(4===t.length)throw new Error(`"${t[0]}" collator not supported`);return new H(wt(t[1],e),wt(t[2],e),r)}evaluate(t,e){return this._compare(this._lhs.evaluate(t,e),this._rhs.evaluate(t,e))}}class K{constructor(t){this._arg=t,this.type=A}static parse(t,e){if(2!==t.length)throw new Error('"!" expects 1 argument');return new K(wt(t[1],e))}evaluate(t,e){return!this._arg.evaluate(t,e)}}class Z{constructor(t){this._args=t,this.type=A}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(wt(t[n],e));return new Z(r)}evaluate(t,e){for(const r of this._args)if(!r.evaluate(t,e))return!1;return!0}}class j{constructor(t){this._args=t,this.type=A}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(wt(t[n],e));return new j(r)}evaluate(t,e){for(const r of this._args)if(r.evaluate(t,e))return!0;return!1}}class q{constructor(t){this._args=t,this.type=A}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(wt(t[n],e));return new q(r)}evaluate(t,e){for(const r of this._args)if(r.evaluate(t,e))return!1;return!0}}class W{constructor(t,e,r){this.type=t,this._args=e,this._fallback=r}static parse(t,e,r){if(t.length<4)throw new Error('"case" expects at least 3 arguments');if(t.length%2==1)throw new Error('"case" expects an odd number of arguments');let n;const i=[];for(let a=1;a<t.length-1;a+=2){const s=wt(t[a],e),o=wt(t[a+1],e,r);n||(n=o.type),i.push({condition:s,output:o})}const a=wt(t[t.length-1],e,r);return n||(n=a.type),new W(n,i,a)}evaluate(t,e){for(const r of this._args)if(r.condition.evaluate(t,e))return r.output.evaluate(t,e);return this._fallback.evaluate(t,e)}}class J{constructor(t,e){this.type=t,this._args=e}static parse(t,e){if(t.length<2)throw new Error('"coalesce" expects at least 1 argument');let r;const n=[];for(let i=1;i<t.length;i++){const a=wt(t[i],e);r||(r=a.type),n.push(a)}return new J(r,n)}evaluate(t,e){for(const r of this._args){const n=r.evaluate(t,e);if(null!==n)return n}return null}}class Q{constructor(t,e,r,n,i){this.type=t,this._input=e,this._labels=r,this._outputs=n,this._fallback=i}static parse(t,e){if(t.length<3)throw new Error('"match" expects at least 3 arguments');if(t.length%2==0)throw new Error('"case" expects an even number of arguments');let r;const n=wt(t[1],e),i=[],a={};let s;for(let n=2;n<t.length-1;n+=2){let o=t[n];Array.isArray(o)||(o=[o]);for(const t of o){const e=typeof t;if("string"!==e&&"number"!==e)throw new Error('"match" requires string or number literal as labels');if(s){if(e!==s)throw new Error('"match" requires labels to have the same type')}else s=e;a[t]=i.length}const l=wt(t[n+1],e);r||(r=l.type),i.push(l)}return new Q(r,n,a,i,wt(t[t.length-1],e))}evaluate(t,e){const r=this._input.evaluate(t,e);return(this._outputs[this._labels[r]]||this._fallback).evaluate(t,e)}}class tt{constructor(t,e,r,n,i){this._operator=t,this.type=e,this.interpolation=r,this.input=n,this._stops=i}static parse(t,e,r){const n=t[0];if(t.length<5)throw new Error(`"${n}" expects at least 4 arguments`);const i=t[1];if(!Array.isArray(i)||0===i.length)throw new Error(`"${i}" is not a valid interpolation`);switch(i[0]){case"linear":if(1!==i.length)throw new Error("Linear interpolation cannot have parameters");break;case"exponential":if(2!==i.length||"number"!=typeof i[1])throw new Error("Exponential interpolation requires one numeric argument");break;case"cubic-bezier":if(5!==i.length)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1");for(let t=1;t<5;t++){const e=i[t];if("number"!=typeof e||e<0||e>1)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1")}break;default:throw new Error(`"${t[0]}" unknown interpolation type "${i[0]}"`)}if(t.length%2!=1)throw new Error(`"${n}" expects an even number of arguments`);const a=wt(t[2],e,L);let s;"interpolate-hcl"===n||"interpolate-lab"===n?s=P:r&&"value"!==r.kind&&(s=r);const o=[];for(let r=3;r<t.length;r+=2){const i=t[r];if("number"!=typeof i)throw new Error(`"${n}" requires stop inputs as literal numbers`);if(o.length&&o[o.length-1][0]>=i)throw new Error(`"${n}" requires strictly ascending stop inputs`);const a=wt(t[r+1],e,s);s||(s=a.type),o.push([i,a])}if(s&&s!==P&&s!==L&&("array"!==s.kind||s.itemType!==L))throw new Error(`"${n}" cannot interpolate type ${B(s)}`);return new tt(n,s,i,a,o)}evaluate(t,e){const r=this._stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this.input.evaluate(t,e);if(n<=r[0][0])return r[0][1].evaluate(t,e);if(n>=r[r.length-1][0])return r[r.length-1][1].evaluate(t,e);let i=0;for(;++i<r.length&&!(n<r[i][0]););const a=r[i-1][0],s=r[i][0],o=tt.interpolationRatio(this.interpolation,n,a,s),l=r[i-1][1].evaluate(t,e),u=r[i][1].evaluate(t,e);if("interpolate"===this._operator){if("array"===this.type.kind&&Array.isArray(l)&&Array.isArray(u))return l.map(((t,e)=>(0,N.sX)(t,u[e],o)));if("color"===this.type.kind&&l instanceof I.Z&&u instanceof I.Z){const t=new I.Z(l),e=new I.Z(u);return new I.Z([(0,N.sX)(t.r,e.r,o),(0,N.sX)(t.g,e.g,o),(0,N.sX)(t.b,e.b,o),(0,N.sX)(t.a,e.a,o)])}if("number"===this.type.kind&&"number"==typeof l&&"number"==typeof u)return(0,N.sX)(l,u,o);throw new Error(`"${this._operator}" cannot interpolate type ${B(this.type)}`)}if("interpolate-hcl"===this._operator){const t=(0,w.sJ)(l),e=(0,w.sJ)(u),r=e.h-t.h,n=(0,w.xr)({h:t.h+o*(r>180||r<-180?r-360*Math.round(r/360):r),c:(0,N.sX)(t.c,e.c,o),l:(0,N.sX)(t.l,e.l,o)});return new I.Z({a:(0,N.sX)(l.a,u.a,o),...n})}if("interpolate-lab"===this._operator){const t=(0,w.Y3)(l),e=(0,w.Y3)(u),r=(0,w.xr)({l:(0,N.sX)(t.l,e.l,o),a:(0,N.sX)(t.a,e.a,o),b:(0,N.sX)(t.b,e.b,o)});return new I.Z({a:(0,N.sX)(l.a,u.a,o),...r})}throw new Error(`Unexpected operator "${this._operator}"`)}interpolationUniformValue(t,e){const r=this._stops;if(1===r.length)return 0;if(t>=r[r.length-1][0])return 0;let n=0;for(;++n<r.length&&!(t<r[n][0]););const i=r[n-1][0],a=r[n][0];return tt.interpolationRatio(this.interpolation,e,i,a)}getInterpolationRange(t){const e=this._stops;if(1===e.length){const t=e[0][0];return[t,t]}const r=e[e.length-1][0];if(t>=r)return[r,r];let n=0;for(;++n<e.length&&!(t<e[n][0]););return[e[n-1][0],e[n][0]]}static interpolationRatio(t,e,r,n){let i=0;return"linear"===t[0]?i=tt._exponentialInterpolationRatio(e,1,r,n):"exponential"===t[0]?i=tt._exponentialInterpolationRatio(e,t[1],r,n):"cubic-bezier"===t[0]&&(i=R(t[1],t[2],t[3],t[4])(tt._exponentialInterpolationRatio(e,1,r,n),1e-5)),i<0?i=0:i>1&&(i=1),i}static _exponentialInterpolationRatio(t,e,r,n){const i=n-r;if(0===i)return 0;const a=t-r;return 1===e?a/i:(e**a-1)/(e**i-1)}}class et{constructor(t,e,r){this.type=t,this._input=e,this._stops=r}static parse(t,e){if(t.length<5)throw new Error('"step" expects at least 4 arguments');if(t.length%2!=1)throw new Error('"step" expects an even number of arguments');const r=wt(t[1],e,L);let n;const i=[];i.push([-1/0,wt(t[2],e)]);for(let r=3;r<t.length;r+=2){const a=t[r];if("number"!=typeof a)throw new Error('"step" requires stop inputs as literal numbers');if(i.length&&i[i.length-1][0]>=a)throw new Error('"step" requires strictly ascending stop inputs');const s=wt(t[r+1],e);n||(n=s.type),i.push([a,s])}return new et(n,r,i)}evaluate(t,e){const r=this._stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this._input.evaluate(t,e);let i=0;for(;++i<r.length&&!(n<r[i][0]););return this._stops[i-1][1].evaluate(t,e)}}class rt{constructor(t,e){this.type=t,this._output=e}static parse(t,e,r){if(t.length<4)throw new Error('"let" expects at least 3 arguments');if(t.length%2==1)throw new Error('"let" expects an odd number of arguments');const n=new F(e);for(let r=1;r<t.length-1;r+=2){const i=t[r];if("string"!=typeof i)throw new Error(`"let" requires a string to define variable names - found ${i}`);n.add(i,wt(t[r+1],e))}const i=wt(t[t.length-1],n,r);return new rt(i.type,i)}evaluate(t,e){return this._output.evaluate(t,e)}}class nt{constructor(t,e){this.type=t,this.output=e}static parse(t,e,r){if(2!==t.length||"string"!=typeof t[1])throw new Error('"var" requires just one literal string argument');const n=e.get(t[1]);if(!n)throw new Error(`${t[1]} must be defined before being used in a "var" expression`);return new nt(r||S,n)}evaluate(t,e){return this.output.evaluate(t,e)}}class it{constructor(t,e,r){this.type=t,this._index=e,this._array=r}static parse(t,e){if(3!==t.length)throw new Error('"at" expects 2 arguments');const r=wt(t[1],e,L),n=wt(t[2],e);return new it(n.type.itemType,r,n)}evaluate(t,e){const r=this._index.evaluate(t,e),n=this._array.evaluate(t,e);if(r<0||r>=n.length)throw new Error('"at" index out of bounds');if(r!==Math.floor(r))throw new Error('"at" index must be an integer');return n[r]}}class at{constructor(t,e){this._key=t,this._obj=e,this.type=S}static parse(t,e){let r,n;switch(t.length){case 2:return r=wt(t[1],e),new at(r);case 3:return r=wt(t[1],e),n=wt(t[2],e),new at(r,n);default:throw new Error('"get" expects 1 or 2 arguments')}}evaluate(t,e){const r=this._key.evaluate(t,e);return this._obj?this._obj.evaluate(t,e)[r]:t?.values[r]}}class st{constructor(t,e){this._key=t,this._obj=e,this.type=A}static parse(t,e){let r,n;switch(t.length){case 2:return r=wt(t[1],e),new st(r);case 3:return r=wt(t[1],e),n=wt(t[2],e),new st(r,n);default:throw new Error('"has" expects 1 or 2 arguments')}}evaluate(t,e){const r=this._key.evaluate(t,e);return this._obj?r in this._obj.evaluate(t,e):!!t?.values[r]}}class ot{constructor(t,e){this._key=t,this._vals=e,this.type=A}static parse(t,e){if(3!==t.length)throw new Error('"in" expects 2 arguments');return new ot(wt(t[1],e),wt(t[2],e))}evaluate(t,e){const r=this._key.evaluate(t,e);return this._vals.evaluate(t,e).includes(r)}}class lt{constructor(t,e,r){this._item=t,this._array=e,this._from=r,this.type=L}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"index-of" expects 3 or 4 arguments');const r=wt(t[1],e),n=wt(t[2],e);if(4===t.length){const i=wt(t[3],e,L);return new lt(r,n,i)}return new lt(r,n)}evaluate(t,e){const r=this._item.evaluate(t,e),n=this._array.evaluate(t,e);if(this._from){const i=this._from.evaluate(t,e);if(i!==Math.floor(i))throw new Error('"index-of" index must be an integer');return n.indexOf(r,i)}return n.indexOf(r)}}class ut{constructor(t){this._arg=t,this.type=L}static parse(t,e){if(2!==t.length)throw new Error('"length" expects 2 arguments');const r=wt(t[1],e);return new ut(r)}evaluate(t,e){const r=this._arg.evaluate(t,e);if("string"==typeof r)return r.length;if(Array.isArray(r))return r.length;throw new Error('"length" expects string or array')}}class ct{constructor(t,e,r,n){this.type=t,this._array=e,this._from=r,this._to=n}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"slice" expects 2 or 3 arguments');const r=wt(t[1],e),n=wt(t[2],e,L);if(n.type!==L)throw new Error('"slice" index must return a number');if(4===t.length){const i=wt(t[3],e,L);if(i.type!==L)throw new Error('"slice" index must return a number');return new ct(r.type,r,n,i)}return new ct(r.type,r,n)}evaluate(t,e){const r=this._array.evaluate(t,e);if(!Array.isArray(r)&&"string"!=typeof r)throw new Error('"slice" input must be an array or a string');const n=this._from.evaluate(t,e);if(n<0||n>=r.length)throw new Error('"slice" index out of bounds');if(n!==Math.floor(n))throw new Error('"slice" index must be an integer');if(this._to){const i=this._to.evaluate(t,e);if(i<0||i>=r.length)throw new Error('"slice" index out of bounds');if(i!==Math.floor(i))throw new Error('"slice" index must be an integer');return r.slice(n,i)}return r.slice(n)}}class ht{constructor(){this.type=A}static parse(t){if(1!==t.length)throw new Error('"has-id" expects no arguments');return new ht}evaluate(t,e){return t&&void 0!==t.id}}class pt{constructor(t,e){this._args=t,this._calculate=e,this.type=L}static parse(t,e,r){const n=t.slice(1).map((t=>wt(t,e)));return new pt(n,r)}evaluate(t,e){let r;return this._args&&(r=this._args.map((r=>r.evaluate(t,e)))),this._calculate(r)}}class yt{constructor(t,e){this._args=t,this._calculate=e,this.type=L}static parse(t,e){const r=t.slice(1).map((t=>wt(t,e)));return new yt(r,yt.ops[t[0]])}evaluate(t,e){let r;return this._args&&(r=this._args.map((r=>r.evaluate(t,e)))),this._calculate(r)}}yt.ops={abs:t=>Math.abs(t[0]),acos:t=>Math.acos(t[0]),asin:t=>Math.asin(t[0]),atan:t=>Math.atan(t[0]),ceil:t=>Math.ceil(t[0]),cos:t=>Math.cos(t[0]),e:()=>Math.E,floor:t=>Math.floor(t[0]),ln:t=>Math.log(t[0]),ln2:()=>Math.LN2,log10:t=>Math.log(t[0])/Math.LN10,log2:t=>Math.log(t[0])/Math.LN2,max:t=>Math.max(...t),min:t=>Math.min(...t),pi:()=>Math.PI,round:t=>Math.round(t[0]),sin:t=>Math.sin(t[0]),sqrt:t=>Math.sqrt(t[0]),tan:t=>Math.tan(t[0])};class ft{constructor(t){this._args=t,this.type=x}static parse(t,e){return new ft(t.slice(1).map((t=>wt(t,e))))}evaluate(t,e){return this._args.map((r=>r.evaluate(t,e))).join("")}}class gt{constructor(t,e){this._arg=t,this._calculate=e,this.type=x}static parse(t,e){if(2!==t.length)throw new Error(`${t[0]} expects 1 argument`);const r=wt(t[1],e);return new gt(r,gt.ops[t[0]])}evaluate(t,e){return this._calculate(this._arg.evaluate(t,e))}}gt.ops={downcase:t=>t.toLowerCase(),upcase:t=>t.toUpperCase()};class mt{constructor(t){this._args=t,this.type=P}static parse(t,e){if(4!==t.length)throw new Error('"rgb" expects 3 arguments');const r=t.slice(1).map((t=>wt(t,e)));return new mt(r)}evaluate(t,e){const r=this._validate(this._args[0].evaluate(t,e)),n=this._validate(this._args[1].evaluate(t,e)),i=this._validate(this._args[2].evaluate(t,e));return new I.Z({r,g:n,b:i})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}}class _t{constructor(t){this._args=t,this.type=P}static parse(t,e){if(5!==t.length)throw new Error('"rgba" expects 4 arguments');const r=t.slice(1).map((t=>wt(t,e)));return new _t(r)}evaluate(t,e){const r=this._validate(this._args[0].evaluate(t,e)),n=this._validate(this._args[1].evaluate(t,e)),i=this._validate(this._args[2].evaluate(t,e)),a=this._validateAlpha(this._args[3].evaluate(t,e));return new I.Z({r,g:n,b:i,a})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}_validateAlpha(t){if("number"!=typeof t||t<0||t>1)throw new Error(`${t}: invalid alpha color component`);return t}}class dt{constructor(t){this._color=t,this.type=U(L,4)}static parse(t,e){if(2!==t.length)throw new Error('"to-rgba" expects 1 argument');const r=wt(t[1],e);return new dt(r)}evaluate(t,e){return new I.Z(this._color.evaluate(t,e)).toRgba()}}class Et{constructor(t,e){this.type=t,this._args=e}static parse(t,e){const r=t[0];if(t.length<2)throw new Error(`${r} expects at least one argument`);let n,i=1;if("array"===r){if(t.length>2){switch(t[1]){case"string":n=x;break;case"number":n=L;break;case"boolean":n=A;break;default:throw new Error('"array" type argument must be string, number or boolean')}i++}else n=S;let e;if(t.length>3){if(e=t[2],null!==e&&("number"!=typeof e||e<0||e!==Math.floor(e)))throw new Error('"array" length argument must be a positive integer literal');i++}n=U(n,e)}else switch(r){case"string":n=x;break;case"number":n=L;break;case"boolean":n=A;break;case"object":n=O}const a=[];for(;i<t.length;i++){const r=wt(t[i],e);a.push(r)}return new Et(n,a)}evaluate(t,e){let r;for(const n of this._args){const i=n.evaluate(t,e);if(r=k(i),M(r,this.type))return i}throw new Error(`Expected ${B(this.type)} but got ${B(r)}`)}}class bt{constructor(t,e){this.type=t,this._args=e}static parse(t,e){const r=t[0],n=bt.types[r];if(n===A||n===x){if(2!==t.length)throw new Error(`${r} expects one argument`)}else if(t.length<2)throw new Error(`${r} expects at least one argument`);const i=[];for(let r=1;r<t.length;r++){const n=wt(t[r],e);i.push(n)}return new bt(n,i)}evaluate(t,e){if(this.type===A)return Boolean(this._args[0].evaluate(t,e));if(this.type===x)return C(this._args[0].evaluate(t,e));if(this.type===L){for(const r of this._args){const n=Number(r.evaluate(t,e));if(!isNaN(n))return n}return null}if(this.type===P){for(const r of this._args)try{const n=bt.toColor(r.evaluate(t,e));if(n instanceof I.Z)return n}catch{}return null}}static toBoolean(t){return Boolean(t)}static toString(t){return C(t)}static toNumber(t){const e=Number(t);if(isNaN(e))throw new Error(`"${t}" is not a number`);return e}static toColor(t){if(t instanceof I.Z)return t;if("string"==typeof t){const e=I.Z.fromString(t);if(e)return e;throw new Error(`"${t}" is not a color`)}if(Array.isArray(t))return I.Z.fromArray(t);throw new Error(`"${t}" is not a color`)}}bt.types={"to-boolean":A,"to-color":P,"to-number":L,"to-string":x};class Tt{constructor(t){this._val=t,this.type=k(t)}static parse(t){if(2!==t.length)throw new Error('"literal" expects 1 argument');return new Tt(t[1])}evaluate(t,e){return this._val}}class It{constructor(t){this._arg=t,this.type=x}static parse(t,e){if(2!==t.length)throw new Error('"typeof" expects 1 argument');return new It(wt(t[1],e))}evaluate(t,e){return B(k(this._arg.evaluate(t,e)))}}function wt(t,e,r){const n=typeof t;if("string"===n||"boolean"===n||"number"===n||null===t){if(r)switch(r.kind){case"string":"string"!==n&&(t=bt.toString(t));break;case"number":"number"!==n&&(t=bt.toNumber(t));break;case"color":t=bt.toColor(t)}t=["literal",t]}if(!Array.isArray(t)||0===t.length)throw new Error("Expression must be a non empty array");const i=t[0];if("string"!=typeof i)throw new Error("First element of expression must be a string");const a=Rt[i];if(void 0===a)throw new Error(`Invalid expression operator "${i}"`);if(!a)throw new Error(`Unimplemented expression operator "${i}"`);return a.parse(t,e,r)}const Rt={array:Et,boolean:Et,collator:null,format:null,image:null,literal:Tt,number:Et,"number-format":null,object:Et,string:Et,"to-boolean":bt,"to-color":bt,"to-number":bt,"to-string":bt,typeof:It,accumulated:null,"feature-state":null,"geometry-type":$,id:z,"line-progress":null,properties:Y,at:it,get:at,has:st,in:ot,"index-of":lt,length:ut,slice:ct,"!":K,"!=":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t!==e))}},"<":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t<e))}},"<=":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t<=e))}},"==":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t===e))}},">":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t>e))}},">=":class extends H{static parse(t,e){return H.parse(t,e,((t,e)=>t>=e))}},all:Z,any:j,case:W,coalesce:J,match:Q,within:null,interpolate:tt,"interpolate-hcl":tt,"interpolate-lab":tt,step:et,let:rt,var:nt,concat:ft,downcase:gt,"is-supported-script":null,"resolved-locale":null,upcase:gt,rgb:mt,rgba:_t,"to-rgba":dt,"-":class extends pt{static parse(t,e){switch(t.length){case 2:return pt.parse(t,e,(t=>-t[0]));case 3:return pt.parse(t,e,(t=>t[0]-t[1]));default:throw new Error('"-" expects 1 or 2 arguments')}}},"*":class extends pt{static parse(t,e){return pt.parse(t,e,(t=>{let e=1;for(const r of t)e*=r;return e}))}},"/":class extends pt{static parse(t,e){if(3===t.length)return pt.parse(t,e,(t=>t[0]/t[1]));throw new Error('"/" expects 2 arguments')}},"%":class extends pt{static parse(t,e){if(3===t.length)return pt.parse(t,e,(t=>t[0]%t[1]));throw new Error('"%" expects 2 arguments')}},"^":class extends pt{static parse(t,e){if(3===t.length)return pt.parse(t,e,(t=>t[0]**t[1]));throw new Error('"^" expects 1 or 2 arguments')}},"+":class extends pt{static parse(t,e){return pt.parse(t,e,(t=>{let e=0;for(const r of t)e+=r;return e}))}},abs:yt,acos:yt,asin:yt,atan:yt,ceil:yt,cos:yt,e:yt,floor:yt,ln:yt,ln2:yt,log10:yt,log2:yt,max:yt,min:yt,pi:yt,round:yt,sin:yt,sqrt:yt,tan:yt,zoom:X,"heatmap-density":null,"has-id":ht,none:q};class vt{constructor(t){this._expression=t}filter(t,e){if(!this._expression)return!0;try{return this._expression.evaluate(t,e)}catch(t){return console.log(t.message),!0}}static createFilter(t){if(!t)return null;this.isLegacyFilter(t)&&(t=this.convertLegacyFilter(t));try{const e=wt(t,null,A);return new vt(e)}catch(t){return console.log(t.message),null}}static isLegacyFilter(t){if(!Array.isArray(t))return!0;if(0===t.length)return!0;switch(t[0]){case"==":case"!=":case">":case"<":case">=":case"<=":return 3===t.length&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"in":return t.length>=3&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"!in":case"none":case"!has":return!0;case"any":case"all":for(let e=1;e<t.length;e++)if(this.isLegacyFilter(t[e]))return!0;return!1;case"has":return 2===t.length&&("$id"===t[1]||"$type"===t[1]);default:return!1}}static convertLegacyFilter(t){if(!Array.isArray(t)||0===t.length)return!0;const e=t[0];if(1===t.length)return"any"!==e;switch(e){case"==":return vt.convertComparison("==",t[1],t[2]);case"!=":return vt.negate(vt.convertComparison("==",t[1],t[2]));case">":case"<":case">=":case"<=":return vt.convertComparison(e,t[1],t[2]);case"in":return vt.convertIn(t[1],t.slice(2));case"!in":return vt.negate(vt.convertIn(t[1],t.slice(2)));case"any":case"all":case"none":return vt.convertCombining(e,t.slice(1));case"has":return vt.convertHas(t[1]);case"!has":return vt.negate(vt.convertHas(t[1]));default:throw new Error("Unexpected legacy filter.")}}static convertComparison(t,e,r){switch(e){case"$type":return[t,["geometry-type"],r];case"$id":return[t,["id"],r];default:return[t,["get",e],r]}}static convertIn(t,e){switch(t){case"$type":return["in",["geometry-type"],["literal",e]];case"$id":return["in",["id"],["literal",e]];default:return["in",["get",t],["literal",e]]}}static convertHas(t){switch(t){case"$type":return!0;case"$id":return["has-id"];default:return["has",t]}}static convertCombining(t,e){return[t].concat(e.map(this.convertLegacyFilter))}static negate(t){return["!",t]}}var Nt=r(21315);class Dt{constructor(t,e){let r;switch(this.isDataDriven=!1,this.interpolator=null,t.type){case"number":case"color":r=!0;break;case"array":r="number"===t.value;break;default:r=!1}if(null==e&&(e=t.default),Array.isArray(e)&&e.length>0&&Rt[e[0]]){const r={number:L,color:P,string:x,boolean:A,enum:x};try{const n=wt(e,null,"array"===t.type?U(r[t.value]||S,t.length):r[t.type]);this.getValue=this._buildExpression(n,t),this.isDataDriven=!0,n instanceof tt&&n.input instanceof X&&(this.interpolator=n)}catch(e){console.log(e.message),this.getValue=this._buildSimple(t.default)}return}r&&"interval"===e.type&&(r=!1);const n=e&&e.stops&&e.stops.length>0;if(n)for(const r of e.stops)r[1]=this._validate(r[1],t);if(this.isDataDriven=!!e&&!!e.property,this.isDataDriven)if(void 0!==e.default&&(e.default=this._validate(e.default,t)),n)switch(e.type){case"identity":this.getValue=this._buildIdentity(e,t);break;case"categorical":this.getValue=this._buildCategorical(e,t);break;default:this.getValue=r?this._buildInterpolate(e,t):this._buildInterval(e,t)}else this.getValue=this._buildIdentity(e,t);else n?this.getValue=r?this._buildZoomInterpolate(e):this._buildZoomInterval(e):(e=this._validate(e,t),this.getValue=this._buildSimple(e))}_validate(t,e){if("number"===e.type){if(t<e.minimum)return e.minimum;if(t>e.maximum)return e.maximum}else"color"===e.type?t=Dt._parseColor(t):"enum"===e.type?"string"==typeof t&&(t=e.values.indexOf(t)):"array"===e.type&&"enum"===e.value?t=t.map((t=>"string"==typeof t?e.values.indexOf(t):t)):"string"===e.type&&(t=C(t));return t}_buildSimple(t){return()=>t}_buildExpression(t,e){return(r,n)=>{try{const i=t.evaluate(n,r);return void 0===i?e.default:this._validate(i,e)}catch(t){return console.log(t.message),e.default}}}_buildIdentity(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),void 0!==i&&(i=this._validate(i,e)),null!=i?i:void 0!==t.default?t.default:e.default}}_buildCategorical(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),i=this._categorical(i,t.stops),void 0!==i?i:void 0!==t.default?t.default:e.default}}_buildInterval(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interval(i,t.stops):void 0!==t.default?t.default:e.default}}_buildInterpolate(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interpolate(i,t.stops,t.base||1):void 0!==t.default?t.default:e.default}}_buildZoomInterpolate(t){return e=>this._interpolate(e,t.stops,t.base||1)}_buildZoomInterval(t){return e=>this._interval(e,t.stops)}_categorical(t,e){const r=e.length;for(let n=0;n<r;n++)if(e[n][0]===t)return e[n][1]}_interval(t,e){const r=e.length;let n=0;for(let i=0;i<r&&e[i][0]<=t;i++)n=i;return e[n][1]}_interpolate(t,e,r){let n,i;const a=e.length;for(let r=0;r<a;r++){const a=e[r];if(!(a[0]<=t)){i=a;break}n=a}if(n&&i){const e=i[0]-n[0],a=t-n[0],s=1===r?a/e:(r**a-1)/(r**e-1);if(Array.isArray(n[1])){const t=n[1],e=i[1],r=[];for(let n=0;n<t.length;n++)r.push((0,N.sX)(t[n],e[n],s));return r}return(0,N.sX)(n[1],i[1],s)}return n?n[1]:i?i[1]:void 0}static _isEmpty(t){for(const e in t)if(t.hasOwnProperty(e))return!1;return!0}static _parseColor(t){return Array.isArray(t)?t:("string"==typeof t&&(t=new I.Z(t)),t instanceof I.Z&&!this._isEmpty(t)?I.Z.toUnitRGBA(t):void 0)}}var Lt,xt=r(16534);!function(t){t[t.BUTT=0]="BUTT",t[t.ROUND=1]="ROUND",t[t.SQUARE=2]="SQUARE",t[t.UNKNOWN=4]="UNKNOWN"}(Lt||(Lt={}));class At{constructor(t,e,r,n){switch(this.type=t,this.typeName=e.type,this.id=e.id,this.source=e.source,this.sourceLayer=e["source-layer"],this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.filter=e.filter,this.layout=e.layout,this.paint=e.paint,this.z=r,this.uid=n,t){case Nt.fR.BACKGROUND:this._layoutDefinition=Nt.f2.backgroundLayoutDefinition,this._paintDefinition=Nt.f2.backgroundPaintDefinition;break;case Nt.fR.FILL:this._layoutDefinition=Nt.f2.fillLayoutDefinition,this._paintDefinition=Nt.f2.fillPaintDefinition;break;case Nt.fR.LINE:this._layoutDefinition=Nt.f2.lineLayoutDefinition,this._paintDefinition=Nt.f2.linePaintDefinition;break;case Nt.fR.SYMBOL:this._layoutDefinition=Nt.f2.symbolLayoutDefinition,this._paintDefinition=Nt.f2.symbolPaintDefinition;break;case Nt.fR.CIRCLE:this._layoutDefinition=Nt.f2.circleLayoutDefinition,this._paintDefinition=Nt.f2.circlePaintDefinition}this._layoutProperties=this._parseLayout(this.layout),this._paintProperties=this._parsePaint(this.paint)}getFeatureFilter(){return void 0!==this._featureFilter?this._featureFilter:this._featureFilter=vt.createFilter(this.filter)}getLayoutProperty(t){return this._layoutProperties[t]}getPaintProperty(t){return this._paintProperties[t]}getLayoutValue(t,e,r){let n;const i=this._layoutProperties[t];return i&&(n=i.getValue(e,r)),void 0===n&&(n=this._layoutDefinition[t].default),n}getPaintValue(t,e,r){let n;const i=this._paintProperties[t];return i&&(n=i.getValue(e,r)),void 0===n&&(n=this._paintDefinition[t].default),n}isPainterDataDriven(){const t=this._paintProperties;if(t)for(const e in t)if(t[e].isDataDriven)return!0;return!1}_parseLayout(t){const e={};for(const r in t){const n=this._layoutDefinition[r];n&&(e[r]=new Dt(n,t[r]))}return e}_parsePaint(t){const e={};for(const r in t){const n=this._paintDefinition[r];n&&(e[r]=new Dt(n,t[r]))}return e}computeAttributesKey(t,e,r,n){let i=0,a=0;for(const t of e){let e=3;if(!t||t!==n){const n=r[t],{isLayout:i,isOptional:a}=n,s=i?this.getLayoutProperty(t):this.getPaintProperty(t);e=s?.interpolator?2:s?.isDataDriven?1:a&&!s?3:0}a|=e<<i,i+=2}return a<<3|t}}class Pt extends At{constructor(t,e,r,n){super(t,e,r,n),this.backgroundMaterial=new y(this.computeAttributesKey(a._K.BACKGROUND,y.ATTRIBUTES,y.ATTRIBUTES_INFO))}}class Ot extends At{constructor(t,e,r,n){super(t,e,r,n);const i=this.getPaintProperty("fill-color"),s=this.getPaintProperty("fill-opacity"),o=this.getPaintProperty("fill-pattern");this.hasDataDrivenColor=i?.isDataDriven,this.hasDataDrivenOpacity=s?.isDataDriven,this.hasDataDrivenFill=this.hasDataDrivenColor||this.hasDataDrivenOpacity||o?.isDataDriven;const l=this.getPaintProperty("fill-outline-color");this.outlineUsesFillColor=!l,this.hasDataDrivenOutlineColor=l?.isDataDriven,this.hasDataDrivenOutline=l?l.isDataDriven:!!i&&i.isDataDriven,this.hasDataDrivenOutline=(l?this.hasDataDrivenOutlineColor:this.hasDataDrivenColor)||this.hasDataDrivenOpacity,this.fillMaterial=new g(this.computeAttributesKey(a._K.FILL,g.ATTRIBUTES,g.ATTRIBUTES_INFO)),this.outlineMaterial=new m(this.computeAttributesKey(a._K.OUTLINE,this.outlineUsesFillColor?m.ATTRIBUTES_FILL:m.ATTRIBUTES_OUTLINE,this.outlineUsesFillColor?m.ATTRIBUTES_INFO_FILL:m.ATTRIBUTES_INFO_OUTLINE),this.outlineUsesFillColor)}}class St extends At{constructor(t,e,r,n){super(t,e,r,n);const i=this.getPaintProperty("line-pattern");if(this.lineMaterial=new _(this.computeAttributesKey(a._K.LINE,_.ATTRIBUTES,_.ATTRIBUTES_INFO,i?"line-dasharray":"")),this.hasDataDrivenLine=this.getPaintProperty("line-blur")?.isDataDriven||this.getPaintProperty("line-color")?.isDataDriven||this.getPaintProperty("line-gap-width")?.isDataDriven||this.getPaintProperty("line-offset")?.isDataDriven||this.getPaintProperty("line-opacity")?.isDataDriven||this.getPaintProperty("line-pattern")?.isDataDriven||this.getPaintProperty("line-dasharray")?.isDataDriven||this.getLayoutProperty("line-cap")?.isDataDriven||this.getPaintProperty("line-width")?.isDataDriven,this.canUseThinTessellation=!1,!this.hasDataDrivenLine){const t=this.getPaintProperty("line-width");if(!t||"number"==typeof t&&.5*t<xt.tQ){const t=this.getPaintProperty("line-offset");(!t||"number"==typeof t&&0===t)&&(this.canUseThinTessellation=!0)}}}getDashKey(t,e){let r;switch(e){case Lt.BUTT:r="Butt";break;case Lt.ROUND:r="Round";break;case Lt.SQUARE:r="Square";break;default:r="Butt"}return`dasharray-[${t.toString()}]-${r}`}}class Ut extends At{constructor(t,e,r,n){super(t,e,r,n),this.iconMaterial=new b(this.computeAttributesKey(a._K.ICON,b.ATTRIBUTES,b.ATTRIBUTES_INFO)),this.textMaterial=new T(this.computeAttributesKey(a._K.TEXT,T.ATTRIBUTES,T.ATTRIBUTES_INFO)),this.hasDataDrivenIcon=this.getPaintProperty("icon-color")?.isDataDriven||this.getPaintProperty("icon-halo-blur")?.isDataDriven||this.getPaintProperty("icon-halo-color")?.isDataDriven||this.getPaintProperty("icon-halo-width")?.isDataDriven||this.getPaintProperty("icon-opacity")?.isDataDriven||this.getLayoutProperty("icon-size")?.isDataDriven,this.hasDataDrivenText=this.getPaintProperty("text-color")?.isDataDriven||this.getPaintProperty("text-halo-blur")?.isDataDriven||this.getPaintProperty("text-halo-color")?.isDataDriven||this.getPaintProperty("text-halo-width")?.isDataDriven||this.getPaintProperty("text-opacity")?.isDataDriven||this.getLayoutProperty("text-size")?.isDataDriven}}class Gt extends At{constructor(t,e,r,n){super(t,e,r,n),this.circleMaterial=new f(this.computeAttributesKey(a._K.CIRCLE,f.ATTRIBUTES,f.ATTRIBUTES_INFO))}}class Bt{constructor(t,e,r){let n;this.allowOverlap=t.getLayoutValue("icon-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("icon-ignore-placement",e),this.keepUpright=t.getLayoutValue("icon-keep-upright",e),this.optional=t.getLayoutValue("icon-optional",e),this.rotationAlignment=t.getLayoutValue("icon-rotation-alignment",e),this.rotationAlignment===Nt.aF.AUTO&&(this.rotationAlignment=r?Nt.aF.MAP:Nt.aF.VIEWPORT),n=t.getLayoutProperty("icon-anchor"),n?.isDataDriven?this._anchorProp=n:this.anchor=t.getLayoutValue("icon-anchor",e),n=t.getLayoutProperty("icon-offset"),n?.isDataDriven?this._offsetProp=n:this.offset=t.getLayoutValue("icon-offset",e),n=t.getLayoutProperty("icon-padding"),n?.isDataDriven?this._paddingProp=n:this.padding=t.getLayoutValue("icon-padding",e),n=t.getLayoutProperty("icon-rotate"),n?.isDataDriven?this._rotateProp=n:this.rotate=t.getLayoutValue("icon-rotate",e),n=t.getLayoutProperty("icon-size"),n?.isDataDriven?this._sizeProp=n:this.size=t.getLayoutValue("icon-size",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e))}}class kt{constructor(t,e,r){let n;this.allowOverlap=t.getLayoutValue("text-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("text-ignore-placement",e),this.keepUpright=t.getLayoutValue("text-keep-upright",e),this.optional=t.getLayoutValue("text-optional",e),this.rotationAlignment=t.getLayoutValue("text-rotation-alignment",e),this.rotationAlignment===Nt.aF.AUTO&&(this.rotationAlignment=r?Nt.aF.MAP:Nt.aF.VIEWPORT),n=t.getLayoutProperty("text-anchor"),n?.isDataDriven?this._anchorProp=n:this.anchor=t.getLayoutValue("text-anchor",e),n=t.getLayoutProperty("text-justify"),n?.isDataDriven?this._justifyProp=n:this.justify=t.getLayoutValue("text-justify",e),n=t.getLayoutProperty("text-letter-spacing"),n?.isDataDriven?this._letterSpacingProp=n:this.letterSpacing=t.getLayoutValue("text-letter-spacing",e),n=t.getLayoutProperty("text-line-height"),n?.isDataDriven?this._lineHeightProp=n:this.lineHeight=t.getLayoutValue("text-line-height",e),n=t.getLayoutProperty("text-max-angle"),n?.isDataDriven?this._maxAngleProp=n:this.maxAngle=t.getLayoutValue("text-max-angle",e),n=t.getLayoutProperty("text-max-width"),n?.isDataDriven?this._maxWidthProp=n:this.maxWidth=t.getLayoutValue("text-max-width",e),n=t.getLayoutProperty("text-offset"),n?.isDataDriven?this._offsetProp=n:this.offset=t.getLayoutValue("text-offset",e),n=t.getLayoutProperty("text-padding"),n?.isDataDriven?this._paddingProp=n:this.padding=t.getLayoutValue("text-padding",e),n=t.getLayoutProperty("text-rotate"),n?.isDataDriven?this._rotateProp=n:this.rotate=t.getLayoutValue("text-rotate",e),n=t.getLayoutProperty("text-size"),n?.isDataDriven?this._sizeProp=n:this.size=t.getLayoutValue("text-size",e),n=t.getLayoutProperty("text-writing-mode"),n?.isDataDriven?this._writingModeProp=n:this.writingMode=t.getLayoutValue("text-writing-mode",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._justifyProp&&(this.justify=this._justifyProp.getValue(t,e)),this._letterSpacingProp&&(this.letterSpacing=this._letterSpacingProp.getValue(t,e)),this._lineHeightProp&&(this.lineHeight=this._lineHeightProp.getValue(t,e)),this._maxAngleProp&&(this.maxAngle=this._maxAngleProp.getValue(t,e)),this._maxWidthProp&&(this.maxWidth=this._maxWidthProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e)),this._writingModeProp&&(this.writingMode=this._writingModeProp.getValue(t,e))}}},51785:(t,e,r)=>{r.d(e,{Z:()=>a});var n=r(21315),i=r(7333);class a{constructor(t){if(this._style=t,this.backgroundBucketIds=[],this._uidToLayer=new Map,this._layerByName={},this._runningId=0,t.layers||(t.layers=[]),this.version=parseFloat(t.version),this.layers=t.layers.map(((t,e,r)=>this._create(t,e,r))).filter((t=>!!t)),this.layers){let t;for(let e=0;e<this.layers.length;e++)t=this.layers[e],this._layerByName[t.id]=t,this._uidToLayer.set(t.uid,t),t.type===n.fR.BACKGROUND&&this.backgroundBucketIds.push(t.id)}this._identifyRefLayers()}isPainterDataDriven(t){const e=this._layerByName[t];return!!e&&e.isPainterDataDriven()}getStyleLayerId(t){return t>=this.layers.length?null:this.layers[t].id}getStyleLayerByUID(t){return this._uidToLayer.get(t)??null}getStyleLayerIndex(t){const e=this._layerByName[t];return e?this.layers.indexOf(e):-1}setStyleLayer(t,e){if(!t||!t.id)return;const r=this._style;null!=e&&e>=this.layers.length&&(e=this.layers.length-1);let n,i=!0;const s=this._layerByName[t.id];if(s){const o=this.layers.indexOf(s);e||(e=o),e===o?(i=!1,n=a._recreateLayer(t,s),this.layers[e]=n,r.layers[e]=t):(this.layers.splice(o,1),r.layers.splice(o,1),n=this._create(t,e,this.layers),this.layers.splice(e,0,n),r.layers.splice(e,0,t))}else n=this._create(t,e,this.layers),!e||e>=this.layers.length?(this.layers.push(n),r.layers.push(t)):(this.layers.splice(e,0,n),r.layers.splice(e,0,t));this._layerByName[t.id]=n,this._uidToLayer.set(n.uid,n),i&&this._recomputeZValues(),this._identifyRefLayers()}getStyleLayer(t){const e=this._layerByName[t];return e?{type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom,filter:e.filter,layout:e.layout,paint:e.paint}:null}deleteStyleLayer(t){const e=this._layerByName[t];if(e){delete this._layerByName[t],this._uidToLayer.delete(e.uid);const r=this.layers.indexOf(e);this.layers.splice(r,1),this._style.layers.splice(r,1),this._recomputeZValues(),this._identifyRefLayers()}}getLayerById(t){return this._layerByName[t]}getLayoutProperties(t){const e=this._layerByName[t];return e?e.layout:null}getPaintProperties(t){const e=this._layerByName[t];return e?e.paint:null}setPaintProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:r.layout,paint:e},i=a._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=i,this._style.layers[s].paint=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setLayoutProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:e,paint:r.paint},i=a._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=i,this._style.layers[s].layout=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setStyleLayerVisibility(t,e){const r=this._layerByName[t];if(!r)return;const n=r.layout||{};n.visibility=e;const i={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:n,paint:r.paint},s=a._recreateLayer(i,r),o=this.layers.indexOf(r);this.layers[o]=s,this._style.layers[o].layout=n,this._layerByName[r.id]=s,this._uidToLayer.set(r.uid,s)}getStyleLayerVisibility(t){const e=this._layerByName[t];return e?e.layout?.visibility??"visible":"none"}_recomputeZValues(){const t=this.layers,e=1/(t.length+1);for(let r=0;r<t.length;r++)t[r].z=1-(1+r)*e}_identifyRefLayers(){const t=[],e=[];let r=0;for(const i of this.layers){const a=i.layout;if(i.type===n.fR.FILL){const e=i;let n=i.source+"|"+i.sourceLayer;n+="|"+(a?.visibility??""),n+="|"+i.minzoom,n+="|"+i.maxzoom,n+="|"+JSON.stringify(i.filter),(e.hasDataDrivenFill||e.hasDataDrivenOutline)&&(n+="|"+r),t.push({key:n,layer:i})}else if(i.type===n.fR.LINE){const t=i,n=i.paint,s=null!=n&&(null!=n["line-pattern"]||null!=n["line-dasharray"]);let o=i.source+"|"+i.sourceLayer;o+="|"+(a?.visibility??""),o+="|"+i.minzoom,o+="|"+i.maxzoom,o+="|"+JSON.stringify(i.filter),o+="|"+(void 0!==a?a["line-cap"]:""),o+="|"+(void 0!==a?a["line-join"]:""),(t.hasDataDrivenLine||s)&&(o+="|"+r),e.push({key:o,layer:i})}++r}this._assignRefLayers(t),this._assignRefLayers(e)}_assignRefLayers(t){let e,r;t.sort(((t,e)=>t.key<e.key?-1:t.key>e.key?1:0));const i=t.length;for(let a=0;a<i;a++){const s=t[a];if(s.key===e)s.layer.refLayerId=r;else if(e=s.key,r=s.layer.id,s.layer.type===n.fR.FILL){if(!s.layer.getPaintProperty("fill-outline-color"))for(let n=a+1;n<i;n++){const i=t[n];if(i.key!==e)break;if(i.layer.getPaintProperty("fill-outline-color")){t[a]=i,t[n]=s,r=i.layer.id;break}}}else if(s.layer.type===n.fR.LINE){let n=s.layer;for(let o=a+1;o<i;o++){const i=t[o];if(i.key!==e)break;const l=i.layer;(n.canUseThinTessellation&&!l.canUseThinTessellation||!n.canUseThinTessellation&&(l.getPaintProperty("line-pattern")||l.getPaintProperty("line-dasharray")))&&(n=l,t[a]=i,t[o]=s,r=i.layer.id)}}}}_create(t,e,r){const a=1-(1+e)*(1/(r.length+1)),s=this._runningId++;switch(t.type){case"background":return new i.Et(n.fR.BACKGROUND,t,a,s);case"fill":return new i.Le(n.fR.FILL,t,a,s);case"line":return new i.gf(n.fR.LINE,t,a,s);case"symbol":return new i.jG(n.fR.SYMBOL,t,a,s);case"raster":console.warn(`Unsupported vector tile raster layer ${t.id}`);case"circle":return new i.sj(n.fR.CIRCLE,t,a,s)}}static _recreateLayer(t,e){switch(t.type){case"background":return new i.Et(n.fR.BACKGROUND,t,e.z,e.uid);case"fill":return new i.Le(n.fR.FILL,t,e.z,e.uid);case"line":return new i.gf(n.fR.LINE,t,e.z,e.uid);case"symbol":return new i.jG(n.fR.SYMBOL,t,e.z,e.uid);case"raster":console.warn(`Unsupported vector tile raster layer ${t.id}`);case"circle":return new i.sj(n.fR.CIRCLE,t,e.z,e.uid)}}}},35362:(t,e,r)=>{r.d(e,{E:()=>n,V:()=>i});class n{constructor(t,e){this.x=t,this.y=e}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){this.x=t,this.y=e}normalize(){const t=this.x,e=this.y,r=Math.sqrt(t*t+e*e);this.x/=r,this.y/=r}rightPerpendicular(){const t=this.x;this.x=this.y,this.y=-t}move(t,e){this.x+=t,this.y+=e}assign(t){this.x=t.x,this.y=t.y}assignAdd(t,e){this.x=t.x+e.x,this.y=t.y+e.y}assignSub(t,e){this.x=t.x-e.x,this.y=t.y-e.y}rotate(t,e){const r=this.x,n=this.y;this.x=r*t-n*e,this.y=r*e+n*t}scale(t){this.x*=t,this.y*=t}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}static distance(t,e){const r=e.x-t.x,n=e.y-t.y;return Math.sqrt(r*r+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}var i;!function(t){t[t.Unknown=0]="Unknown",t[t.Point=1]="Point",t[t.LineString=2]="LineString",t[t.Polygon=3]="Polygon"}(i||(i={}))},21968:(t,e,r)=>{r.d(e,{G:()=>n});class n{constructor(t,e,r,n,i,a=!1,s=0){this.name=t,this.count=e,this.type=r,this.offset=n,this.stride=i,this.normalized=a,this.divisor=s}}}}]);