@arcgis/core 5.0.0-next.5 → 5.0.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/020c8913d8e35d63080b.js +1 -0
- package/assets/esri/core/workers/chunks/{c2b47a7dc961863d283f.js → 02e69f0c63d97661da60.js} +1 -1
- package/assets/esri/core/workers/chunks/087973e7c4fea5fcfa5e.js +1 -0
- package/assets/esri/core/workers/chunks/{929ece362604dc301229.js → 17acde0245ecd956306c.js} +1 -1
- package/assets/esri/core/workers/chunks/{8cea114168d849c38b1b.js → 20278683bddc8c2d8136.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc4982b0ac007bd70213.js → 22d6b8102e75bdef204c.js} +1 -1
- package/assets/esri/core/workers/chunks/{3271614322ba4b44fb5a.js → 279366e6b743f9680603.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7c99e9c8d19352af38d.js → 3ac7562ea90f91a9f30c.js} +1 -1
- package/assets/esri/core/workers/chunks/3f3d492f1093b7832aab.js +1 -0
- package/assets/esri/core/workers/chunks/464d42bebb365287808d.js +1 -0
- package/assets/esri/core/workers/chunks/{d570c75a425aa29672c8.js → 4d599008e1ea42321b37.js} +1 -1
- package/assets/esri/core/workers/chunks/{0686243904381ef863dc.js → 53bd8996e8812f1ad7b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{762fe93015b705546188.js → 5bd36dbf46c25bd961c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{b7a17927e14f502006b4.js → 5ea0c62016d56990787b.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ea6985da4eb0107bb9d.js → 5fc7b61f467f1d60a284.js} +1 -1
- package/assets/esri/core/workers/chunks/{a87521ebe632bf783ef4.js → 62a49cfd9a2508950e9f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ec13053af1999701464a.js → 6826fe54562dcdc054d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{309c5f69ea06f3081d83.js → 73487b9d85e726e9c012.js} +1 -1
- package/assets/esri/core/workers/chunks/7413e582bc2b16af6a0f.js +1 -0
- package/assets/esri/core/workers/chunks/{88d942cd25bef74fd50a.js → 7461124454bfb4fb6474.js} +1 -1
- package/assets/esri/core/workers/chunks/{147ad5fdd02f46b6da24.js → 7544316a75dbd981aea6.js} +1 -1
- package/assets/esri/core/workers/chunks/{0f8847f9ae3068833fa4.js → 75bf27271a31e26e1b21.js} +1 -1
- package/assets/esri/core/workers/chunks/{630efe10c871425b6a95.js → 76ae1702fecc7ad7017c.js} +1 -1
- package/assets/esri/core/workers/chunks/{de1f75c907152df7e788.js → 794748fd1edc29a621cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{e1258b6a404e58878c7a.js → 7aaaebbabee27690283c.js} +1 -1
- package/assets/esri/core/workers/chunks/{6a69dafeb7c9ca8a3d84.js → 7c4a63aeead2505d6f02.js} +1 -1
- package/assets/esri/core/workers/chunks/{d84373a6ec94dcfec8c2.js → 88074189fa10c335370b.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8c4fd779e454e4075c4.js → 8833c3d168951be4bf20.js} +1 -1
- package/assets/esri/core/workers/chunks/{85622fe99f4d08afe875.js → 8a314b3790313e6dc5db.js} +1 -1
- package/assets/esri/core/workers/chunks/{b0b2670596d6d8c32b5e.js → 8c056eac35d05d9524b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a713dcc9971e1935401.js → 8f56f298e7c1a283f407.js} +1 -1
- package/assets/esri/core/workers/chunks/{dabc5a38a472c9719df9.js → 8ffd4710d168c2fcfd96.js} +1 -1
- package/assets/esri/core/workers/chunks/{1da74aa308ded5748ef5.js → 90250e9239c173aace88.js} +1 -1
- package/assets/esri/core/workers/chunks/90b2b43b8b54c9a1ec35.js +1 -0
- package/assets/esri/core/workers/chunks/90f8b4bda28af43ea019.js +1 -0
- package/assets/esri/core/workers/chunks/{89027f6800e17fab8973.js → 9486032af3e934d85582.js} +1 -1
- package/assets/esri/core/workers/chunks/95c594a87b732f5c4979.js +1 -0
- package/assets/esri/core/workers/chunks/{239377336a2009caea01.js → 99859dce1925b406ccd0.js} +1 -1
- package/assets/esri/core/workers/chunks/{a137c27ce078bea44f89.js → 9e8dceef4c961f56940d.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5b7e7f2860a825ed373.js → 9fac5a12e878cd745354.js} +1 -1
- package/assets/esri/core/workers/chunks/{f779034623980bf9a37c.js → a06bac9b8f9e18874de8.js} +2 -2
- package/assets/esri/core/workers/chunks/{01642fe19e81bfa33eb5.js → a395373e3173e6458a56.js} +1 -1
- package/assets/esri/core/workers/chunks/a3991ae8caa713d4ddcd.js +1 -0
- package/assets/esri/core/workers/chunks/{a6ac1ff89c40f3a4797a.js → a712cdff78fc826acd8c.js} +1 -1
- package/assets/esri/core/workers/chunks/{af3fc2562bb6d217adf6.js → aa54b6f2aba6952af149.js} +1 -1
- package/assets/esri/core/workers/chunks/ac26e3e77df4302f47a2.js +1 -0
- package/assets/esri/core/workers/chunks/af5fc5d6c1d072a27df1.js +1 -0
- package/assets/esri/core/workers/chunks/{bc3bcf88b252760e2574.js → b3028b1ff75eafd0c358.js} +1 -1
- package/assets/esri/core/workers/chunks/{5875a51b97ee9bd438a0.js → bc241c7735e4efba734a.js} +1 -1
- package/assets/esri/core/workers/chunks/{56916e56c20465428dd4.js → be3b874f86f627f4fa98.js} +1 -1
- package/assets/esri/core/workers/chunks/c4e4da69969499a89a2c.js +1 -0
- package/assets/esri/core/workers/chunks/c8733cd621105afab2ac.js +1 -0
- package/assets/esri/core/workers/chunks/ccc0da0e01f023c8aa1f.js +1 -0
- package/assets/esri/core/workers/chunks/{c0b7e86860838638537f.js → cd1930f08e1fc8b30b14.js} +1 -1
- package/assets/esri/core/workers/chunks/{551c6c89b51b99f4864b.js → d1fe816b6990918c13c7.js} +1 -1
- package/assets/esri/core/workers/chunks/{8605ec4678eb4511c715.js → d305a21666b1ed5bf33d.js} +1 -1
- package/assets/esri/core/workers/chunks/{037b2548bf85e2d7c6ac.js → d40f57f9fc47f9a9f97c.js} +1 -1
- package/assets/esri/core/workers/chunks/{a29d7205394cb8b2a847.js → d97fadbc69e055d183a0.js} +1 -1
- package/assets/esri/core/workers/chunks/dedc4583b5f32a278124.js +1 -0
- package/assets/esri/core/workers/chunks/{e5bcc44f3dc6fc90835a.js → e5a06ce0ef6a9a90e100.js} +1 -1
- package/assets/esri/core/workers/chunks/f0e0a63962784acb4ba1.js +1 -0
- package/assets/esri/core/workers/chunks/f4d0ae6be1b3984228d0.js +1 -0
- package/assets/esri/core/workers/chunks/{7c5c272612198db83851.js → f5e47eea8720ba84665b.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa4411e0a5ac3fcba365.js → f65c0102af17390a50ac.js} +1 -1
- package/assets/esri/core/workers/chunks/f6c11c8ac687de3ef1ab.js +1 -0
- package/assets/esri/core/workers/chunks/{7596d005a4dc3964b140.js → f6c8beb60f6d29945a2e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2a284d4dd5caaecbc2e.js → f746e3f7ebff2bbdf333.js} +1 -1
- package/assets/esri/core/workers/chunks/f9324e88c359c03f35aa.js +1 -0
- package/assets/esri/core/workers/chunks/{cfa3164e7fa1884dc2b9.js → facb3886714222772ab2.js} +1 -1
- package/assets/esri/core/workers/chunks/{aa6eb55e4fb57c4e8eeb.js → fd2efd1d1cf9d95a87e6.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe3f95fda29e4844b153.js → fe77ae6cf232a7a3298e.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ce4a0fe4fae63c43a81.js → ff35a077ac6776469805.js} +1 -1
- package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +14 -4
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/config.js +1 -1
- package/core/Identifiable.js +1 -1
- package/core/MultiOriginJSONSupport.js +1 -1
- package/core/NumericIdentifiable.js +5 -0
- package/core/WriteableMultiOriginJSONMixin.js +5 -0
- package/core/performance.js +5 -0
- package/core/scheduling.js +1 -1
- package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
- package/interfaces.d.ts +18 -2
- package/kernel.js +1 -1
- package/layers/support/MediaElementBase.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/package.json +3 -3
- package/support/basemapDefinitions.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/views/2d/constraints/GeometryConstraint.js +1 -1
- package/views/2d/constraints/RotationConstraint.js +1 -1
- package/views/2d/constraints/ZoomConstraint.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
- package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
- package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/Search/LayerSearchSource.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/assets/esri/core/workers/chunks/0366b78b0ccf4ed5f6ac.js +0 -1
- package/assets/esri/core/workers/chunks/0429c1a3690f20647c9f.js +0 -1
- package/assets/esri/core/workers/chunks/0f100e163e1847e04155.js +0 -1
- package/assets/esri/core/workers/chunks/1eedac33c9fcd7681427.js +0 -1
- package/assets/esri/core/workers/chunks/2f03d33f4ca8a48461fc.js +0 -1
- package/assets/esri/core/workers/chunks/50864c1924030e62497d.js +0 -1
- package/assets/esri/core/workers/chunks/655360995c1cbc78a5a3.js +0 -1
- package/assets/esri/core/workers/chunks/71762199aef5d3107da2.js +0 -1
- package/assets/esri/core/workers/chunks/72c851c400752094b162.js +0 -1
- package/assets/esri/core/workers/chunks/7558919912f7fdc4837b.js +0 -1
- package/assets/esri/core/workers/chunks/829bc5dbda2f51561446.js +0 -1
- package/assets/esri/core/workers/chunks/98311fec6c16a1b23586.js +0 -1
- package/assets/esri/core/workers/chunks/a61cb4f1ca282bf8b75d.js +0 -1
- package/assets/esri/core/workers/chunks/bc6619307f312f9241bf.js +0 -1
- package/assets/esri/core/workers/chunks/bfc1e8aec7aace3ff30e.js +0 -1
- package/assets/esri/core/workers/chunks/c134ebbaeac514cbd657.js +0 -1
- package/assets/esri/core/workers/chunks/c368a8e8d2f1535af446.js +0 -1
- package/assets/esri/core/workers/chunks/d886fb97bdb348a16f25.js +0 -1
- package/assets/esri/core/workers/chunks/e6a86cad44056735ed26.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4283,7548],{620:(e,t,r)=>{r.d(t,{O_:()=>s,vA:()=>n}),r(48163),r(87317),(0,r(91829).vt)();class i{constructor(e){this.message=e}toString(){return`AssertException: ${this.message}`}}function n(e,t="Assertion"){if(!e){const e=new Error(t).stack;throw new i(`${t} at ${e}`)}}function s(e,t,r,i){let n,s=(r[0]-e[0])/t[0],o=(i[0]-e[0])/t[0];s>o&&(n=s,s=o,o=n);let a=(r[1]-e[1])/t[1],l=(i[1]-e[1])/t[1];if(a>l&&(n=a,a=l,l=n),s>l||a>o)return!1;a>s&&(s=a),l<o&&(o=l);let c=(r[2]-e[2])/t[2],u=(i[2]-e[2])/t[2];return c>u&&(n=c,c=u,u=n),!(s>u||c>o||(u<o&&(o=u),o<0))}},2272:(e,t,r)=>{r.d(t,{Dl:()=>c,gf:()=>d,jV:()=>l,lF:()=>u});var i=r(92602),n=r(70333),s=r(4718),o=r(84952),a=r(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function c(e){return"string"==typeof e?(0,o.An)(e):(0,s.o8)(e)}function u(e,t,r){const i={};for(const n in e){if("declaredClass"===n)continue;const s=e[n];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[n]=s.map(e=>u(e));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?s:JSON.stringify(s);else i[n]=s}return i}async function d(e,t,s){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!n.id&&i.A.request.useIdentity&&await Promise.all([r.e(7330),r.e(168),r.e(3747)]).then(r.bind(r,73747));const l=await n.id.getCredential(e,s);return l?.token}},4146:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(31635),n=r(78888),s=r(49186),o=r(65529),a=r(4902),l=r(92474),c=r(53966),u=r(74887),d=r(84952),h=r(10107),f=(r(44208),r(87811),r(64108)),p=r(5443),m=r(16930),y=r(92602),g=r(79677);let b=0,_=class extends((0,o.Zt)((0,a.sA)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,m.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||y.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,h.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,i.Cg)([(0,h.MZ)({type:p.A})],_.prototype,"fullExtent",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i.Cg)([(0,h.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,h.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i.Cg)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i.Cg)([(0,h.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,h.MZ)({type:m.A})],_.prototype,"spatialReference",void 0),(0,i.Cg)([(0,h.MZ)({type:String})],_.prototype,"title",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)()],_.prototype,"url",void 0),(0,i.Cg)([(0,h.MZ)({type:g.A})],_.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i.Cg)([(0,f.$)("esri.layers.Layer")],_)},4902:(e,t,r)=>{r.d(t,{PH:()=>a,sA:()=>o});var i=r(31635),n=r(64108);let s=0;const o=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return r=(0,i.Cg)([(0,n.$)("esri.core.Identifiable")],r),r},a=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return r=(0,i.Cg)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],r),r};o(class{})},5076:(e,t,r)=>{r.d(t,{i:()=>s});var i=r(65864),n=r(21325);function s(e,t,r){const{geometry:s}=e,o=e.compactGeometryEnabled??!1,a=e.toJSON();delete a.compactGeometryEnabled,delete a.defaultSpatialReferenceEnabled;const l=a;let c,u,d;if(s&&(u=s.spatialReference,d=(0,n.YX)(u),l.geometryType=(0,i.$B)(s),l.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(s,o),l.inSR=d),a.groupByFieldsForStatistics&&(l.groupByFieldsForStatistics=a.groupByFieldsForStatistics.join(",")),a.objectIds)switch(r?.uniqueIdFields?.length){case void 0:l.objectIds=a.objectIds.join(",");break;case 1:l.uniqueIds=JSON.stringify(a.objectIds),delete l.objectIds;break;default:l.uniqueIds=JSON.stringify(a.objectIds.map(e=>JSON.parse(e))),delete l.objectIds}if(a.orderByFields&&(l.orderByFields=a.orderByFields.join(",")),!a.outFields||!a.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete l.outFields:a.outFields.includes("*")?l.outFields="*":l.outFields=a.outFields.join(","),a.outSR?(l.outSR=(0,n.YX)(a.outSR),c=e.outSpatialReference):s&&(a.returnGeometry||a.returnCentroid)&&(l.outSR=l.inSR,c=u),a.returnGeometry&&delete a.returnGeometry,a.outStatistics&&(l.outStatistics=JSON.stringify(a.outStatistics)),a.fullText&&(l.fullText=JSON.stringify(a.fullText)),a.pixelSize&&(l.pixelSize=JSON.stringify(a.pixelSize)),a.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete a.quantizationParameters.extent.spatialReference,l.quantizationParameters=JSON.stringify(a.quantizationParameters)),a.parameterValues&&(l.parameterValues=JSON.stringify(a.parameterValues)),a.rangeValues&&(l.rangeValues=JSON.stringify(a.rangeValues)),a.dynamicDataSource&&(l.layer=JSON.stringify({source:a.dynamicDataSource}),delete a.dynamicDataSource),a.timeExtent){const e=a.timeExtent,{start:t,end:r}=e;null==t&&null==r||(l.time=t===r?t:`${t??"null"},${r??"null"}`),delete a.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=c&&u.equals(c)&&(l.defaultSR=l.inSR,delete l.inSR,delete l.outSR),l}},6797:(e,t,r)=>{r.d(t,{Ui:()=>h});var i=r(69622),n=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof n.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function c(e,t){return e instanceof n.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),n=l(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),h=i.filter(e=>!n.includes(e)),f=i.filter(r=>n.includes(r)&&c(e,r)!==c(t,r)).concat(s,h).sort(),p=u(e);if(p&&o.has(p)&&f.length)return{type:"complete",oldValue:e,newValue:t};let m;const y=a(e)&&a(t);for(const i of f){const n=c(e,i),s=c(t,i);let o;if((y||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;o={type:"complete",oldValue:n,newValue:s}}else o="object"==typeof n&&"object"==typeof s&&u(n)===u(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=o&&(null!=m?m.diff[i]=o:m={type:"partial",diff:{[i]:o}})}}return m}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},10536:(e,t,r)=>{function i(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=i(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>i})},13030:(e,t,r)=>{r.d(t,{Y$:()=>m,XW:()=>p,qB:()=>A,Qt:()=>$,My:()=>W,bf:()=>q,jZ:()=>x,j0:()=>C,Sx:()=>S,E$:()=>T,h:()=>F,P:()=>k,SL:()=>E,gH:()=>g,ZD:()=>y,si:()=>I,mJ:()=>Y,UL:()=>J,D6:()=>N,Yi:()=>D,An:()=>z,LC:()=>M,xs:()=>_,EC:()=>b,Xm:()=>P,Vp:()=>Z,zD:()=>Q,m8:()=>G,nS:()=>j,H$:()=>L,eI:()=>O,Eq:()=>w,jz:()=>v,Aj:()=>B,E7:()=>X,Y4:()=>K,TX:()=>H,Uz:()=>V,ml:()=>U,XP:()=>R});var i=r(20498);class n{static{this.ElementCount=9}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=9;const s=this.TypedArrayConstructor;void 0===i&&(i=9*s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<9;e++)t[e]=this.typedBuffer[r++];return t}setMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<9;e++)this.typedBuffer[r++]=t[e]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let s=e*this.typedBufferStride,o=r*t.typedBufferStride;for(let e=0;e<9;++e)i[s++]=n[o++]}get buffer(){return this.typedBuffer.buffer}}class s{static{this.ElementCount=16}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=16;const s=this.TypedArrayConstructor;void 0===i&&(i=16*s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<16;e++)t[e]=this.typedBuffer[r++];return t}setMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<16;e++)this.typedBuffer[r++]=t[e]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){this.copyFromTypedBuffer(e,t.typedBuffer,r*t.typedBufferStride)}copyFromTypedBuffer(e,t,r){const i=this.typedBuffer;let n=e*this.typedBufferStride;for(let e=0;e<16;++e)i[n++]=t[r++]}get buffer(){return this.typedBuffer.buffer}}class o{static{this.ElementCount=1}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=1;const s=this.TypedArrayConstructor;void 0===i&&(i=s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.stride=i,this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}get(e){return this.typedBuffer[e*this.typedBufferStride]}set(e,t){this.typedBuffer[e*this.typedBufferStride]=t}get buffer(){return this.typedBuffer.buffer}}var a=r(37585);class l{static{this.ElementCount=2}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.start=r,this.elementCount=2;const s=this.TypedArrayConstructor;void 0===i&&(i=2*s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,a.hZ)(t,this.typedBuffer[e],this.typedBuffer[e+1])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e]=t[1]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e]=r}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let s=e*this.typedBufferStride,o=r*t.typedBufferStride;i[s++]=n[o++],i[s]=n[o]}get buffer(){return this.typedBuffer.buffer}}var c=r(38954);class u{static{this.ElementCount=3}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=3;const s=this.TypedArrayConstructor;void 0===i&&(i=3*s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,c.j)(t,this.typedBuffer[e],this.typedBuffer[e+1],this.typedBuffer[e+2])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e]=t[2]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,i){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e]=i}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let s=e*this.typedBufferStride,o=r*t.typedBufferStride;i[s++]=n[o++],i[s++]=n[o++],i[s]=n[o]}get buffer(){return this.typedBuffer.buffer}}var d=r(87317);class h{static{this.ElementCount=4}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.start=r,this.elementCount=4;const s=this.TypedArrayConstructor;void 0===i&&(i=4*s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,d.s)(t,this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e++]=t[2],this.typedBuffer[e]=t[3]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,i,n){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e++]=i,this.typedBuffer[e]=n}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let s=e*this.typedBufferStride,o=r*t.typedBufferStride;i[s++]=n[o++],i[s++]=n[o++],i[s++]=n[o++],i[s]=n[o]}get buffer(){return this.typedBuffer.buffer}}var f=r(620);class p extends o{constructor(e,t=0,r,n){(0,f.vA)(i.SX),super((0,i.pX)(),e,t,r,n),this.elementType="f16"}static{this.ElementType="f16"}}class m extends o{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}static{this.ElementType="f32"}}class y extends l{constructor(e,t=0,r,n){(0,f.vA)(i.SX),super((0,i.pX)(),e,t,r,n),this.elementType="f16"}slice(e,t){return this.sliceBuffer(y,e,t)}static{this.ElementType="f16"}}class g extends l{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(g,e,t)}static{this.ElementType="f32"}}class b extends u{constructor(e,t=0,r,n){(0,f.vA)(i.SX),super((0,i.pX)(),e,t,r,n),this.elementType="f16"}slice(e,t){return this.sliceBuffer(b,e,t)}static{this.ElementType="f16"}}class _ extends u{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(_,e,t)}static fromTypedArray(e,t){return new _(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class v extends h{constructor(e,t=0,r,n){(0,f.vA)(i.SX),super((0,i.pX)(),e,t,r,n),this.elementType="f16"}slice(e,t){return this.sliceBuffer(v,e,t)}static{this.ElementType="f16"}}class w extends h{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(w,e,t)}static{this.ElementType="f32"}}class x extends n{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(x,e,t)}static{this.ElementType="f32"}}class C extends n{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(C,e,t)}static{this.ElementType="f64"}}class S extends s{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(S,e,t)}static{this.ElementType="f32"}}class T extends s{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(T,e,t)}static{this.ElementType="f64"}}class A extends o{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(A,e,t)}static{this.ElementType="f64"}}class I extends l{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(I,e,t)}static{this.ElementType="f64"}}class P extends u{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(P,e,t)}static fromTypedArray(e,t){return new P(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class B extends h{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(B,e,t)}static{this.ElementType="f64"}}class E extends o{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(E,e,t)}static{this.ElementType="u8"}}class M extends l{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(M,e,t)}static{this.ElementType="u8"}}class O extends u{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class R extends h{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(R,e,t)}static{this.ElementType="u8"}}class F extends o{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(F,e,t)}static{this.ElementType="u16"}}class D extends l{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(D,e,t)}static{this.ElementType="u16"}}class j extends u{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(j,e,t)}static{this.ElementType="u16"}}class V extends h{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(V,e,t)}static{this.ElementType="u16"}}class k extends o{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(k,e,t)}static{this.ElementType="u32"}}class z extends l{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(z,e,t)}static{this.ElementType="u32"}}class L extends u{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(L,e,t)}static{this.ElementType="u32"}}class U extends h{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(U,e,t)}static{this.ElementType="u32"}}class q extends o{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(q,e,t)}static{this.ElementType="i8"}}class N extends l{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(N,e,t)}static{this.ElementType="i8"}}class G extends u{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(G,e,t)}static{this.ElementType="i8"}}class H extends h{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(H,e,t)}static{this.ElementType="i8"}}class $ extends o{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer($,e,t)}static{this.ElementType="i16"}}class Y extends l{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(Y,e,t)}static{this.ElementType="i16"}}class Z extends u{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(Z,e,t)}static{this.ElementType="i16"}}class X extends h{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(X,e,t)}static{this.ElementType="i16"}}class W extends o{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(W,e,t)}static{this.ElementType="i32"}}class J extends l{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(J,e,t)}static{this.ElementType="i32"}}class Q extends u{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(Q,e,t)}static{this.ElementType="i32"}}class K extends h{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(K,e,t)}static{this.ElementType="i32"}}},13259:(e,t,r)=>{r.d(t,{H:()=>D,b:()=>B,c:()=>M,f:()=>R});var i=r(37585),n=r(48163),s=r(91829),o=r(79258),a=r(76591),l=r(36782),c=r(47522),u=r(40268),d=r(63578),h=r(50832),f=r(42593),p=r(42398),m=r(63365),y=r(52587),g=r(25178),b=r(47286),_=r(14314),v=r(81961),w=r(71988),x=r(33094),C=r(20304),S=r(31821),T=r(12791),A=r(63761),I=r(14113),P=r(49788);function B(e){const t=new I.N5,{signedDistanceFieldEnabled:r,occlusionTestEnabled:n,horizonCullingEnabled:B,pixelSnappingEnabled:R,hasScreenSizePerspective:D,debugDrawLabelBorder:j,hasVVSize:V,hasVVColor:k,hasRotation:z,occludedFragmentFade:L,sampleSignedDistanceFieldTexelCenter:U}=e;t.include(u.Q,e),t.vertex.include(a.rA,e);const{occlusionPass:q,output:N,oitPass:G}=e;if(q)return t.include(d.I,e),t;const{vertex:H,fragment:$}=t;t.include(y.Y6),t.include(p.A,e),t.include(l.g,e),n&&t.include(h.y),$.include(m.a),t.varyings.add("vcolor","vec4"),t.varyings.add("vtc","vec2"),t.varyings.add("vsize","vec2");const Y=9===N,Z=Y&&n;Z&&t.varyings.add("voccluded","float"),H.uniforms.add(new _.I("viewport",e=>e.camera.fullViewport),new b.G("screenOffset",(e,t)=>(0,i.hZ)(O,2*e.screenOffset[0]*t.camera.pixelRatio,2*e.screenOffset[1]*t.camera.pixelRatio)),new b.G("anchorPosition",e=>M(e)),new w.E("materialColor",e=>e.color),new C.m("materialRotation",e=>e.rotation),new A.N("tex",e=>e.texture)),(0,g.Nz)(H),r&&(H.uniforms.add(new w.E("outlineColor",e=>e.outlineColor)),$.uniforms.add(new w.E("outlineColor",e=>E(e)?e.outlineColor:s.uY),new C.m("outlineSize",e=>E(e)?e.outlineSize:0))),B&&H.uniforms.add(new v.V("pointDistanceSphere",(e,t)=>{const r=t.camera.eye,i=e.origin;return(0,s.fA)(i[0]-r[0],i[1]-r[1],i[2]-r[2],o.$O.radius)})),R&&H.include(c.K),D&&((0,y.pM)(H),(0,y.OH)(H)),j&&t.varyings.add("debugBorderCoords","vec4"),t.attributes.add("uv0","vec2"),t.attributes.add("uvi","vec4"),t.attributes.add("color","vec4"),t.attributes.add("size","vec2"),t.attributes.add("rotation","float"),(V||k)&&t.attributes.add("featureAttribute","vec4"),H.code.add(B?S.H`bool behindHorizon(vec3 posModel) {
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4283,7548],{620:(e,t,r)=>{r.d(t,{O_:()=>s,vA:()=>n}),r(48163),r(87317),(0,r(91829).vt)();class i{constructor(e){this.message=e}toString(){return`AssertException: ${this.message}`}}function n(e,t="Assertion"){if(!e){const e=new Error(t).stack;throw new i(`${t} at ${e}`)}}function s(e,t,r,i){let n,s=(r[0]-e[0])/t[0],o=(i[0]-e[0])/t[0];s>o&&(n=s,s=o,o=n);let a=(r[1]-e[1])/t[1],l=(i[1]-e[1])/t[1];if(a>l&&(n=a,a=l,l=n),s>l||a>o)return!1;a>s&&(s=a),l<o&&(o=l);let c=(r[2]-e[2])/t[2],u=(i[2]-e[2])/t[2];return c>u&&(n=c,c=u,u=n),!(s>u||c>o||(u<o&&(o=u),o<0))}},2272:(e,t,r)=>{r.d(t,{Dl:()=>c,gf:()=>d,jV:()=>l,lF:()=>u});var i=r(92602),n=r(70333),s=r(4718),o=r(84952),a=r(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function c(e){return"string"==typeof e?(0,o.An)(e):(0,s.o8)(e)}function u(e,t,r){const i={};for(const n in e){if("declaredClass"===n)continue;const s=e[n];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[n]=s.map(e=>u(e));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?s:JSON.stringify(s);else i[n]=s}return i}async function d(e,t,s){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!n.id&&i.A.request.useIdentity&&await Promise.all([r.e(7330),r.e(168),r.e(3747)]).then(r.bind(r,73747));const l=await n.id.getCredential(e,s);return l?.token}},4146:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(31635),n=r(78888),s=r(49186),o=r(65529),a=r(4902),l=r(92474),c=r(53966),u=r(74887),d=r(84952),h=r(10107),f=(r(44208),r(87811),r(64108)),p=r(5443),m=r(16930),y=r(92602),g=r(79677);let b=0,_=class extends((0,o.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,m.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||y.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,h.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,i.Cg)([(0,h.MZ)({type:p.A})],_.prototype,"fullExtent",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i.Cg)([(0,h.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,h.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i.Cg)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i.Cg)([(0,h.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,h.MZ)({type:m.A})],_.prototype,"spatialReference",void 0),(0,i.Cg)([(0,h.MZ)({type:String})],_.prototype,"title",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)()],_.prototype,"url",void 0),(0,i.Cg)([(0,h.MZ)({type:g.A})],_.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i.Cg)([(0,f.$)("esri.layers.Layer")],_)},4902:(e,t,r)=>{r.d(t,{s:()=>o});var i=r(31635),n=r(64108);let s=0;const o=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return r=(0,i.Cg)([(0,n.$)("esri.core.Identifiable")],r),r};o(class{})},5076:(e,t,r)=>{r.d(t,{i:()=>s});var i=r(65864),n=r(21325);function s(e,t,r){const{geometry:s}=e,o=e.compactGeometryEnabled??!1,a=e.toJSON();delete a.compactGeometryEnabled,delete a.defaultSpatialReferenceEnabled;const l=a;let c,u,d;if(s&&(u=s.spatialReference,d=(0,n.YX)(u),l.geometryType=(0,i.$B)(s),l.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(s,o),l.inSR=d),a.groupByFieldsForStatistics&&(l.groupByFieldsForStatistics=a.groupByFieldsForStatistics.join(",")),a.objectIds)switch(r?.uniqueIdFields?.length){case void 0:l.objectIds=a.objectIds.join(",");break;case 1:l.uniqueIds=JSON.stringify(a.objectIds),delete l.objectIds;break;default:l.uniqueIds=JSON.stringify(a.objectIds.map(e=>JSON.parse(e))),delete l.objectIds}if(a.orderByFields&&(l.orderByFields=a.orderByFields.join(",")),!a.outFields||!a.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete l.outFields:a.outFields.includes("*")?l.outFields="*":l.outFields=a.outFields.join(","),a.outSR?(l.outSR=(0,n.YX)(a.outSR),c=e.outSpatialReference):s&&(a.returnGeometry||a.returnCentroid)&&(l.outSR=l.inSR,c=u),a.returnGeometry&&delete a.returnGeometry,a.outStatistics&&(l.outStatistics=JSON.stringify(a.outStatistics)),a.fullText&&(l.fullText=JSON.stringify(a.fullText)),a.pixelSize&&(l.pixelSize=JSON.stringify(a.pixelSize)),a.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete a.quantizationParameters.extent.spatialReference,l.quantizationParameters=JSON.stringify(a.quantizationParameters)),a.parameterValues&&(l.parameterValues=JSON.stringify(a.parameterValues)),a.rangeValues&&(l.rangeValues=JSON.stringify(a.rangeValues)),a.dynamicDataSource&&(l.layer=JSON.stringify({source:a.dynamicDataSource}),delete a.dynamicDataSource),a.timeExtent){const e=a.timeExtent,{start:t,end:r}=e;null==t&&null==r||(l.time=t===r?t:`${t??"null"},${r??"null"}`),delete a.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=c&&u.equals(c)&&(l.defaultSR=l.inSR,delete l.inSR,delete l.outSR),l}},6797:(e,t,r)=>{r.d(t,{Ui:()=>h});var i=r(69622),n=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof n.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function c(e,t){return e instanceof n.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),n=l(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),h=i.filter(e=>!n.includes(e)),f=i.filter(r=>n.includes(r)&&c(e,r)!==c(t,r)).concat(s,h).sort(),p=u(e);if(p&&o.has(p)&&f.length)return{type:"complete",oldValue:e,newValue:t};let m;const y=a(e)&&a(t);for(const i of f){const n=c(e,i),s=c(t,i);let o;if((y||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;o={type:"complete",oldValue:n,newValue:s}}else o="object"==typeof n&&"object"==typeof s&&u(n)===u(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=o&&(null!=m?m.diff[i]=o:m={type:"partial",diff:{[i]:o}})}}return m}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},10536:(e,t,r)=>{function i(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=i(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>i})},13030:(e,t,r)=>{r.d(t,{Y$:()=>m,XW:()=>p,qB:()=>A,Qt:()=>$,My:()=>W,bf:()=>q,jZ:()=>x,j0:()=>C,Sx:()=>S,E$:()=>T,h:()=>F,P:()=>k,SL:()=>E,gH:()=>g,ZD:()=>y,si:()=>I,mJ:()=>Y,UL:()=>J,D6:()=>N,Yi:()=>D,An:()=>z,LC:()=>M,xs:()=>_,EC:()=>b,Xm:()=>P,Vp:()=>Z,zD:()=>Q,m8:()=>G,nS:()=>j,H$:()=>L,eI:()=>O,Eq:()=>w,jz:()=>v,Aj:()=>B,E7:()=>X,Y4:()=>K,TX:()=>H,Uz:()=>V,ml:()=>U,XP:()=>R});var i=r(20498);class n{static{this.ElementCount=9}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=9;const s=this.TypedArrayConstructor;void 0===i&&(i=9*s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<9;e++)t[e]=this.typedBuffer[r++];return t}setMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<9;e++)this.typedBuffer[r++]=t[e]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let s=e*this.typedBufferStride,o=r*t.typedBufferStride;for(let e=0;e<9;++e)i[s++]=n[o++]}get buffer(){return this.typedBuffer.buffer}}class s{static{this.ElementCount=16}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=16;const s=this.TypedArrayConstructor;void 0===i&&(i=16*s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<16;e++)t[e]=this.typedBuffer[r++];return t}setMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<16;e++)this.typedBuffer[r++]=t[e]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){this.copyFromTypedBuffer(e,t.typedBuffer,r*t.typedBufferStride)}copyFromTypedBuffer(e,t,r){const i=this.typedBuffer;let n=e*this.typedBufferStride;for(let e=0;e<16;++e)i[n++]=t[r++]}get buffer(){return this.typedBuffer.buffer}}class o{static{this.ElementCount=1}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=1;const s=this.TypedArrayConstructor;void 0===i&&(i=s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.stride=i,this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}get(e){return this.typedBuffer[e*this.typedBufferStride]}set(e,t){this.typedBuffer[e*this.typedBufferStride]=t}get buffer(){return this.typedBuffer.buffer}}var a=r(37585);class l{static{this.ElementCount=2}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.start=r,this.elementCount=2;const s=this.TypedArrayConstructor;void 0===i&&(i=2*s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,a.hZ)(t,this.typedBuffer[e],this.typedBuffer[e+1])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e]=t[1]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e]=r}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let s=e*this.typedBufferStride,o=r*t.typedBufferStride;i[s++]=n[o++],i[s]=n[o]}get buffer(){return this.typedBuffer.buffer}}var c=r(38954);class u{static{this.ElementCount=3}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=3;const s=this.TypedArrayConstructor;void 0===i&&(i=3*s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,c.j)(t,this.typedBuffer[e],this.typedBuffer[e+1],this.typedBuffer[e+2])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e]=t[2]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,i){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e]=i}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let s=e*this.typedBufferStride,o=r*t.typedBufferStride;i[s++]=n[o++],i[s++]=n[o++],i[s]=n[o]}get buffer(){return this.typedBuffer.buffer}}var d=r(87317);class h{static{this.ElementCount=4}constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.start=r,this.elementCount=4;const s=this.TypedArrayConstructor;void 0===i&&(i=4*s.BYTES_PER_ELEMENT);const o=0===t.byteLength?0:r;this.typedBuffer=null==n?new s(t,o):new s(t,o,(n-r)/s.BYTES_PER_ELEMENT),this.typedBufferStride=i/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,d.s)(t,this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e++]=t[2],this.typedBuffer[e]=t[3]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,i,n){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e++]=i,this.typedBuffer[e]=n}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let s=e*this.typedBufferStride,o=r*t.typedBufferStride;i[s++]=n[o++],i[s++]=n[o++],i[s++]=n[o++],i[s]=n[o]}get buffer(){return this.typedBuffer.buffer}}var f=r(620);class p extends o{constructor(e,t=0,r,n){(0,f.vA)(i.SX),super((0,i.pX)(),e,t,r,n),this.elementType="f16"}static{this.ElementType="f16"}}class m extends o{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}static{this.ElementType="f32"}}class y extends l{constructor(e,t=0,r,n){(0,f.vA)(i.SX),super((0,i.pX)(),e,t,r,n),this.elementType="f16"}slice(e,t){return this.sliceBuffer(y,e,t)}static{this.ElementType="f16"}}class g extends l{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(g,e,t)}static{this.ElementType="f32"}}class b extends u{constructor(e,t=0,r,n){(0,f.vA)(i.SX),super((0,i.pX)(),e,t,r,n),this.elementType="f16"}slice(e,t){return this.sliceBuffer(b,e,t)}static{this.ElementType="f16"}}class _ extends u{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(_,e,t)}static fromTypedArray(e,t){return new _(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class v extends h{constructor(e,t=0,r,n){(0,f.vA)(i.SX),super((0,i.pX)(),e,t,r,n),this.elementType="f16"}slice(e,t){return this.sliceBuffer(v,e,t)}static{this.ElementType="f16"}}class w extends h{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(w,e,t)}static{this.ElementType="f32"}}class x extends n{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(x,e,t)}static{this.ElementType="f32"}}class C extends n{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(C,e,t)}static{this.ElementType="f64"}}class S extends s{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(S,e,t)}static{this.ElementType="f32"}}class T extends s{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(T,e,t)}static{this.ElementType="f64"}}class A extends o{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(A,e,t)}static{this.ElementType="f64"}}class I extends l{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(I,e,t)}static{this.ElementType="f64"}}class P extends u{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(P,e,t)}static fromTypedArray(e,t){return new P(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class B extends h{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(B,e,t)}static{this.ElementType="f64"}}class E extends o{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(E,e,t)}static{this.ElementType="u8"}}class M extends l{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(M,e,t)}static{this.ElementType="u8"}}class O extends u{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class R extends h{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(R,e,t)}static{this.ElementType="u8"}}class F extends o{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(F,e,t)}static{this.ElementType="u16"}}class D extends l{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(D,e,t)}static{this.ElementType="u16"}}class j extends u{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(j,e,t)}static{this.ElementType="u16"}}class V extends h{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(V,e,t)}static{this.ElementType="u16"}}class k extends o{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(k,e,t)}static{this.ElementType="u32"}}class z extends l{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(z,e,t)}static{this.ElementType="u32"}}class L extends u{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(L,e,t)}static{this.ElementType="u32"}}class U extends h{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(U,e,t)}static{this.ElementType="u32"}}class q extends o{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(q,e,t)}static{this.ElementType="i8"}}class N extends l{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(N,e,t)}static{this.ElementType="i8"}}class G extends u{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(G,e,t)}static{this.ElementType="i8"}}class H extends h{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(H,e,t)}static{this.ElementType="i8"}}class $ extends o{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer($,e,t)}static{this.ElementType="i16"}}class Y extends l{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(Y,e,t)}static{this.ElementType="i16"}}class Z extends u{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(Z,e,t)}static{this.ElementType="i16"}}class X extends h{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(X,e,t)}static{this.ElementType="i16"}}class W extends o{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(W,e,t)}static{this.ElementType="i32"}}class J extends l{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(J,e,t)}static{this.ElementType="i32"}}class Q extends u{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(Q,e,t)}static{this.ElementType="i32"}}class K extends h{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(K,e,t)}static{this.ElementType="i32"}}},13259:(e,t,r)=>{r.d(t,{H:()=>D,b:()=>B,c:()=>M,f:()=>R});var i=r(37585),n=r(48163),s=r(91829),o=r(79258),a=r(76591),l=r(36782),c=r(47522),u=r(40268),d=r(63578),h=r(50832),f=r(42593),p=r(42398),m=r(63365),y=r(52587),g=r(25178),b=r(47286),_=r(14314),v=r(81961),w=r(71988),x=r(33094),C=r(20304),S=r(31821),T=r(12791),A=r(63761),I=r(14113),P=r(49788);function B(e){const t=new I.N5,{signedDistanceFieldEnabled:r,occlusionTestEnabled:n,horizonCullingEnabled:B,pixelSnappingEnabled:R,hasScreenSizePerspective:D,debugDrawLabelBorder:j,hasVVSize:V,hasVVColor:k,hasRotation:z,occludedFragmentFade:L,sampleSignedDistanceFieldTexelCenter:U}=e;t.include(u.Q,e),t.vertex.include(a.rA,e);const{occlusionPass:q,output:N,oitPass:G}=e;if(q)return t.include(d.I,e),t;const{vertex:H,fragment:$}=t;t.include(y.Y6),t.include(p.A,e),t.include(l.g,e),n&&t.include(h.y),$.include(m.a),t.varyings.add("vcolor","vec4"),t.varyings.add("vtc","vec2"),t.varyings.add("vsize","vec2");const Y=9===N,Z=Y&&n;Z&&t.varyings.add("voccluded","float"),H.uniforms.add(new _.I("viewport",e=>e.camera.fullViewport),new b.G("screenOffset",(e,t)=>(0,i.hZ)(O,2*e.screenOffset[0]*t.camera.pixelRatio,2*e.screenOffset[1]*t.camera.pixelRatio)),new b.G("anchorPosition",e=>M(e)),new w.E("materialColor",e=>e.color),new C.m("materialRotation",e=>e.rotation),new A.N("tex",e=>e.texture)),(0,g.Nz)(H),r&&(H.uniforms.add(new w.E("outlineColor",e=>e.outlineColor)),$.uniforms.add(new w.E("outlineColor",e=>E(e)?e.outlineColor:s.uY),new C.m("outlineSize",e=>E(e)?e.outlineSize:0))),B&&H.uniforms.add(new v.V("pointDistanceSphere",(e,t)=>{const r=t.camera.eye,i=e.origin;return(0,s.fA)(i[0]-r[0],i[1]-r[1],i[2]-r[2],o.$O.radius)})),R&&H.include(c.K),D&&((0,y.pM)(H),(0,y.OH)(H)),j&&t.varyings.add("debugBorderCoords","vec4"),t.attributes.add("uv0","vec2"),t.attributes.add("uvi","vec4"),t.attributes.add("color","vec4"),t.attributes.add("size","vec2"),t.attributes.add("rotation","float"),(V||k)&&t.attributes.add("featureAttribute","vec4"),H.code.add(B?S.H`bool behindHorizon(vec3 posModel) {
|
|
2
2
|
vec3 camToEarthCenter = pointDistanceSphere.xyz - localOrigin;
|
|
3
3
|
vec3 camToPos = pointDistanceSphere.xyz + posModel;
|
|
4
4
|
float earthRadius = pointDistanceSphere.w;
|
|
@@ -313,4 +313,4 @@ gl_Position = posProjCenter;
|
|
|
313
313
|
gl_PointSize = 1.0;`),o.main.add(s.H`fragColor = vec4(1);
|
|
314
314
|
if(discardByTerrainDepth()) {
|
|
315
315
|
fragColor.g = 0.5;
|
|
316
|
-
}`)}},64183:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ei});var i=r(31635),n=r(65529),s=r(74887),o=r(36708),a=r(10107),l=r(44208),c=r(53966),u=(r(87811),r(64108)),d=r(5443),h=r(91218),f=r(16930),p=r(56390),m=r(61956),y=r(65494);class g{constructor(e,t,r){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=r}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}static create(e,t=[]){return new g(e,e.createRenderCommandBuffer(),t)}}var b=r(68197),_=r(18574),v=r(87403),w=r(28975);function x(){return new _.A({material:new w.N({color:new b.A("red")})})}var C=r(9093),S=r(51850),T=r(91829),A=r(6847),I=r(83047),P=r(58083),B=r(87317),E=r(70328),M=r(19419);r(12359),r(95108),r(27615),r(52106),r(4718),r(34275),r(65864);var O=r(37585),R=r(48163),F=r(34727),D=r(26857);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const j=[];{const e=16;for(let t=0;t<360;t+=360/e)j.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}Object.freeze({left:0,center:.5,right:1});const V=Object.freeze({"bottom-left":(0,R.fA)(0,0),bottom:(0,R.fA)(.5,0),"bottom-right":(0,R.fA)(1,0),left:(0,R.fA)(0,.5),center:(0,R.fA)(.5,.5),right:(0,R.fA)(1,.5),"top-left":(0,R.fA)(0,1),top:(0,R.fA)(.5,1),"top-right":(0,R.fA)(1,1)});var k=r(9762),z=r(27993);function L(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const r=new Uint32Array(t);return e.getObjectIdsArray(r),r}function U(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const r=new Float64Array(3*t);return e.getCoordinatesArray(r),r}function q(e,t){const r=t.viewSpatialReference,i=t.renderSpatialReference,{extent:n}=e,s=(0,M.gX)(n),o=(0,S.vt)();return(0,z.F)([s[0],s[1],0],r,o,i),o}var N=r(97146);function G(e){const t=new Map;for(const[r,i]of e)t.set(r,{...i,indices:(0,N.Dg)(i.indices)});return t}r(48833);var H=r(63907);const $=(0,T.CN)(.25,.25,.75,.75);function Y(e){return"cross"===e||"x"===e}function Z(e,t=128,r=.5*t,i=0){switch(e){case"circle":default:return function(e,t){const r=e/2-.5;return K(e,J(r,r,t/2))}(t,r);case"square":return function(e,t){return X(e,t,!1)}(t,r);case"cross":return function(e,t,r=0){return W(e,t,!1,r)}(t,r,i);case"x":return function(e,t,r=0){return W(e,t,!0,r)}(t,r,i);case"kite":return function(e,t){return X(e,t,!0)}(t,r);case"triangle":return function(e,t){return K(e,Q(e/2,t,t/2))}(t,r);case"arrow":return function(e,t){const r=t,i=t/2,n=e/2,s=.8*r,o=J(n,(e-t)/2-s,Math.sqrt(s*s+i*i)),a=Q(n,r,i);return K(e,(e,t)=>Math.max(a(e,t),-o(e,t)))}(t,r)}}function X(e,t,r){return r&&(t/=Math.SQRT2),K(e,(i,n)=>{let s=i-.5*e+.25,o=.5*e-n-.75;if(r){const e=(s+o)/Math.SQRT2;o=(o-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(o))-.5*t})}function W(e,t,r,i=0){t-=i,r&&(t*=Math.SQRT2);const n=.5*t;return K(e,(t,s)=>{let o,a=t-.5*e,l=.5*e-s-1;if(r){const e=(a+l)/Math.SQRT2;l=(l-a)/Math.SQRT2,a=e}return a=Math.abs(a),l=Math.abs(l),o=a>l?a>n?Math.sqrt((a-n)*(a-n)+l*l):l:l>n?Math.sqrt(a*a+(l-n)*(l-n)):a,o-=i/2,o})}function J(e,t,r){return(i,n)=>{const s=i-e,o=n-t;return Math.sqrt(s*s+o*o)-r}}function Q(e,t,r){const i=Math.sqrt(t*t+r*r);return(n,s)=>{const o=Math.abs(n-e)-r,a=s-e+t/2+.75,l=(t*o+r*a)/i,c=-a;return Math.max(l,c)}}function K(e,t){const r=new Float32Array(e*e);for(let i=0;i<e;i++)for(let n=0;n<e;n++)r[n+e*i]=t(n,i)/e;return r}var ee=r(46610);class te{constructor(e,t){this._context=null,this._symbolLayer=null,this._draped=!1,this._loaded=!1,this._loadingPromise=null,this._iconTextureID=null,this._materialId=null,this._context=t,this._symbolLayer=e}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}_destroy(){this._iconTextureID=null}async _load(){const e=this._context.renderCommandContext,t=await e.createTexture(()=>function(e,t=128,r=.5*t,i=0){return{data:Z(e,t,r,i),parameters:{mipmap:!1,wrap:{s:33071,t:33071},width:t,height:t,noUnpackFlip:!0,dataType:H.ld.FLOAT,pixelFormat:6403,internalFormat:H.H0.R16F,reloadable:!0}}}("circle"));this._iconTextureID=t;const r={anchorPosition:V.center,occlusionTest:!0,hasSlicePlane:!1,color:this._getFillColor(),outlineColor:this._getOutlineColor(),outlineSize:1,distanceFieldBoundingBox:$,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:Y("circle")},i=new Uint8Array(8),n=255;i[0]=0,i[1]=0,i[2]=0,i[3]=n,i[4]=n,i[5]=0,i[6]=n,i[7]=n,this._materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this._materialId),await e.setBaseInstance(this._materialId,{data:i.buffer,elementCount:4}),this._loaded=!0}async createAddCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r;if(null==t)throw new Error("expected material not to be null");const n=await this._createGeometry(e);if(null==n)return r.createPipelineCommand();const s=q(e,r);return r.createPipelineCommand(i.addDirectRendererGeometry(e.id,n,s,!0))}async _createGeometry(e){const{_materialId:t,_context:r}=this,{mainThreadDelegate:i}=r,{featureCount:n}=e;if(0===n||null==t)return null;const s=L(e),o=U(e),a=function(e,t){const r=e.length/3,i=t.viewSpatialReference,n=t.renderSpatialReference,s=new Float64Array(3*r);if(!(0,k.projectBuffer)(e,i,0,s,n,0,r))throw new Error("Failed to project coordinates");return s}(await i.applyElevationAlignmentTo(o),r),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),u=new Float64Array([24,24]),d=new Float64Array([0,0,0,1]),h=new Float64Array([0]),f=new Uint32Array(n);for(let e=0;e<n;++e)f[e]=e;const p=new Uint32Array(n);for(let e=0;e<n;++e)p[e]=0;const m=[["position",new ee.n(a,f,3,!0)],["normal",new ee.n(l,p,3,!0)],["color",new ee.n(c,p,4,!0)],["rotation",new ee.n(h,p,1,!0)],["size",new ee.n(u,p,2,!0)],["centerOffsetAndDistance",new ee.n(d,p,4,!0)]],y=new Uint8Array(n);return e.getVisibilityArray(y),{attributes:G(m),olidColor:void 0,transformation:(0,C.vt)(),materialId:t,objectIds:s,visibilities:y}}async createRemoveCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;return null==t?r.createPipelineCommand():r.createPipelineCommand(i.removeDirectRendererGeometryBuffer(t,e))}async createUpdateVisibilityCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;if(null==t)return r.createPipelineCommand();const n=new Uint8Array(e.featureCount);return e.getVisibilityArray(n),r.createPipelineCommand(i.updateVisibility(t,e.id,n))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_materialId:r}=this,i=t.renderCommandContext;return null==r?t.createPipelineCommand():t.createPipelineCommand(i.updateMaterial({type:"hud",materialId:r,parameters:{color:this._getFillColor(),outlineColor:this._getOutlineColor()}}))}async createUpdateElevationCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r,{featureCount:n,id:s}=e;if(null==t||0===n)return r.createPipelineCommand();const o=await this._createGeometry(e);if(null==o)return r.createPipelineCommand();const a=q(e,r);return r.createPipelineCommand(i.updateDirectRendererGeometry(s,o,a,!0))}async createDestroyCommand(){const{_iconTextureID:e,_context:t}=this,r=t.renderCommandContext;let i;return i=null!=e?await r.releaseTexture(e):g.create(r),i.appendPipelineStateCommand(()=>this._destroy()),i}_getOutlineColor(){const e=this._getLayerOpacity(),t=this._symbolLayer,r=t?.outline?.color;if(null!=r){const t=b.A.toUnitRGB(r),i=r.a*e;return[t[0],t[1],t[2],i]}return[0,0,0,0]}_getFillColor(){if(function(e){return null!=e&&("cross"===e||"x"===e)}(this._getPrimitive()))return ie;const e=null==this._getPrimitive(),t=this._symbolLayer?.material?.color;return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}_getCombinedOpacity(e,t=re){const r=this._draped?1:this._getLayerOpacity();return e?r*e.a:t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(e,t=re){const r=this._getCombinedOpacity(e,t);return function(e,t,r=null){const i=(0,T.o8)(T.Un);return null!=e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2],e.length>3&&(i[3]=e[3])),null!=t&&(i[3]=t),r&&(0,B.c)(i,i,r),i}(null!=e?b.A.toUnitRGB(e):S.Un,r)}_getPrimitive(){return e=this._symbolLayer,e.resource?.href?null:e.resource?.primitive??A.r;var e}}const re={hasIntrinsicColor:!1},ie=T.uY;class ne{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._context=null,this._symbol=null,this._symbolLayerRenderers=[],this._context=t,this._symbol=e}_destroy(){}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_context:e,_symbol:t,_symbolLayerRenderers:r}=this,i=[];for(const n of t.symbolLayers){const t=e.symbolRendererFactory.createSymbolRendererFromSymbolLayer(n);null!=t&&(i.push(t.load()),r.push(t))}await Promise.all(i),this._loaded=!0}async createDestroyCommand(){const{_context:e,_symbolLayerRenderers:t}=this,r=[];for(const e of t)r.push(e.createDestroyCommand());const i=e.joinPipelineCommands(await Promise.all(r));return i.appendPipelineStateCommand(()=>this._destroy()),i}async createAddCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createAddCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createRemoveCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createRemoveCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateVisibilityCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateVisibilityCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateLayerViewOpacityCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateElevationCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateElevationCommand(e));return t.joinPipelineCommands(await Promise.all(i))}}class se{constructor(e,t){this._symbol=null,this._featureData=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_renderer:e,_context:t}=this;this._symbol=t.symbolRendererFactory.createSymbolRendererFromSymbol(e.symbol),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,r=await this._provisionSymbol(),i=null==r?t.createPipelineCommand():await r.createAddCommand(e);return i.appendPipelineStateCommand(()=>this._featureData.set(e.id,e)),i}async createRemoveCommand(e){const t=this._context,r=await this._provisionSymbol(),i=null==r?t.createPipelineCommand():await r.createRemoveCommand(e);return i.appendPipelineStateCommand(()=>this._featureData.delete(e)),i}async createUpdateVisibilityCommand(e){const t=this._context,r=await this._provisionSymbol();return null==r?t.createPipelineCommand():await r.createUpdateVisibilityCommand(e)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,r=await this._provisionSymbol();return null==r?t.createPipelineCommand():await r.createUpdateLayerViewOpacityCommand(e)}async createUpdateElevationCommand(){const{_featureData:e,_context:t}=this,r=await this._provisionSymbol();if(null==r)return t.createPipelineCommand();const i=[];for(const t of e.values())i.push(r.createUpdateElevationCommand(t));const n=await Promise.all(i);return t.joinPipelineCommands(n)}async createDestroyCommand(){const{_symbol:e,_context:t,_featureData:r}=this;if(!e)return t.createPipelineCommand();const i=[];for(const e of r.keys())i.push(this.createRemoveCommand(e));i.push(e.createDestroyCommand());const n=await Promise.all(i);return t.joinPipelineCommands(n)}async _provisionSymbol(){const e=this._symbol;return e?(e.loaded||await e.load(),e):null}}var oe=r(48353),ae=r(30809),le=r(8887),ce=r(38954),ue=r(72385),de=(r(4197),r(11868)),he=r(27921),fe=r(71351),pe=r(73941);function me(e,t){const r=e[t],i=e[t+1],n=e[t+2];return Math.sqrt(r*r+i*i+n*n)}function ye(e,t){const r=e[t],i=e[t+1],n=e[t+2],s=1/Math.sqrt(r*r+i*i+n*n);e[t]*=s,e[t+1]*=s,e[t+2]*=s}function ge(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r}r(37539),r(20498),r(87170),(0,R.vt)(),(0,R.vt)();var be=r(620);r(78754);const _e=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)_e[6*e+t]=e;const ve=new Array(36);for(let e=0;e<6;e++)ve[6*e]=0,ve[6*e+1]=1,ve[6*e+2]=2,ve[6*e+3]=2,ve[6*e+4]=3,ve[6*e+5]=0;const we=(0,ue.fA)(-.5,0,-.5),xe=(0,ue.fA)(.5,0,-.5),Ce=(0,ue.fA)(0,0,.5),Se=(0,ue.fA)(0,.5,0),Te=(0,ue.vt)(),Ae=(0,ue.vt)(),Ie=(0,ue.vt)(),Pe=(0,ue.vt)(),Be=(0,ue.vt)();(0,ce.e)(Te,we,Se),(0,ce.e)(Ae,we,xe),(0,ce.i)(Ie,Te,Ae),(0,ce.n)(Ie,Ie),(0,ce.e)(Te,xe,Se),(0,ce.e)(Ae,xe,Ce),(0,ce.i)(Pe,Te,Ae),(0,ce.n)(Pe,Pe),(0,ce.e)(Te,Ce,Se),(0,ce.e)(Ae,Ce,we),(0,ce.i)(Be,Te,Ae),(0,ce.n)(Be,Be),Ie[0],Ie[1],Ie[2],Pe[0],Pe[1],Pe[2],Be[0],Be[1],Be[2],(0,S.vt)();var Ee=r(4576),Me=r(69397);r(6867),r(87582);var Oe=r(57917);function Re(e,t){const r=(e,r,i=!1)=>({levels:e.map(e=>{const n=G(r(e.tesselation));return i&&function(e){const t=e,r=t.get("position").data,i=t.get("normal").data;if(i){const t=Fe(e,"normal").data;for(let e=0;e<i.length;e+=3){const r=i[e+1];t[e+1]=-i[e+2],t[e+2]=r}}if(r){const t=Fe(e,"position").data;for(let e=0;e<r.length;e+=3){const i=r[e+1];t[e+1]=-r[e+2],t[e+2]=i}}}(n),{components:[{attributes:n,olidColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}})});switch(e){case"cone":return r(De,e=>function(e,t,r,i,n=!0,s=!0){let o=0;const a=t,l=e;let c=(0,ue.fA)(0,o,0),u=(0,ue.fA)(0,o+l,0),d=(0,ue.fA)(0,-1,0),h=(0,ue.fA)(0,1,0);i&&(o=l,u=(0,ue.fA)(0,0,0),c=(0,ue.fA)(0,o,0),d=(0,ue.fA)(0,1,0),h=(0,ue.fA)(0,-1,0));const f=[u,c],p=[d,h],m=r+2,y=Math.sqrt(l*l+a*a);if(i)for(let e=r-1;e>=0;e--){const t=e*(2*Math.PI/r),i=(0,ue.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(i);const n=(0,ue.fA)(l*Math.cos(t)/y,-a/y,l*Math.sin(t)/y);p.push(n)}else for(let e=0;e<r;e++){const t=e*(2*Math.PI/r),i=(0,ue.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(i);const n=(0,ue.fA)(l*Math.cos(t)/y,a/y,l*Math.sin(t)/y);p.push(n)}const g=new Array,b=new Array;if(n){for(let e=3;e<f.length;e++)g.push(1),g.push(e-1),g.push(e),b.push(0),b.push(0),b.push(0);g.push(f.length-1),g.push(2),g.push(1),b.push(0),b.push(0),b.push(0)}if(s){for(let e=3;e<f.length;e++)g.push(e),g.push(e-1),g.push(0),b.push(e),b.push(e-1),b.push(1);g.push(0),g.push(2),g.push(f.length-1),b.push(1),b.push(2),b.push(p.length-1)}const _=(0,de.oe)(3*m);for(let e=0;e<m;e++)_[3*e]=f[e][0],_[3*e+1]=f[e][1],_[3*e+2]=f[e][2];const v=(0,de.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[["position",new ee.n(_,g,3,!0)],["normal",new ee.n(v,b,3,!0)]]}(1,.5,e,!1),!0);case"sphere":return r([{tesselation:0,minScreenSpaceRadius:0},{tesselation:1,minScreenSpaceRadius:8},{tesselation:2,minScreenSpaceRadius:16},{tesselation:3,minScreenSpaceRadius:50},{tesselation:4,minScreenSpaceRadius:250}],e=>function(e,t,r){const i=e;let n,s;if(r)n=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],s=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const e=i*(1+Math.sqrt(5))/2;n=[-i,e,0,i,e,0,-i,-e,0,i,-e,0,0,-i,e,0,i,e,0,-i,-e,0,i,-e,e,0,-i,e,0,i,-e,0,-i,-e,0,i],s=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let t=0;t<n.length;t+=3)ge(n,t,e/me(n,t));let o={};function a(t,r){t>r&&([t,r]=[r,t]);const i=t.toString()+"."+r.toString();if(o[i])return o[i];let s=n.length;return n.length+=3,function(e,t,r,i,n,s=t){(n=n||e)[s]=e[t]+r[i],n[s+1]=e[t+1]+r[i+1],n[s+2]=e[t+2]+r[i+2]}(n,3*t,n,3*r,n,s),ge(n,s,e/me(n,s)),s/=3,o[i]=s,s}for(let e=0;e<t;e++){const e=s.length,t=new Array(4*e);for(let r=0;r<e;r+=3){const e=s[r],i=s[r+1],n=s[r+2],o=a(e,i),l=a(i,n),c=a(n,e),u=4*r;t[u]=e,t[u+1]=o,t[u+2]=c,t[u+3]=i,t[u+4]=l,t[u+5]=o,t[u+6]=n,t[u+7]=c,t[u+8]=l,t[u+9]=o,t[u+10]=l,t[u+11]=c}s=t,o={}}const l=(0,de.Wz)(n);for(let e=0;e<l.length;e+=3)ye(l,e);return[["position",new ee.n((0,de.Wz)(n),s,3,!0)],["normal",new ee.n(l,s,3,!0)]]}(.5,e,!0));case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function Fe(e,t){let r=e.get(t);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:(0,Oe.S)(r.data)},e.set(t,r)),r}const De=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var je=r(2495),Ve=r(74810);class ke{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._primitiveMaterialId=null,this._lodRendererId=null,this._context=null,this._symbolLayer=null,this._primitive=null,this._context=t,this._symbolLayer=e}_destroy(){this._lodRendererId=null,this._primitiveMaterialId=null}get loaded(){return this._loaded}get _isPrimitive(){return null!=this._primitive}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t=this._getLayerOpacity();let r={usePBR:!0,isSchematic:!0,mrrFactors:Ve.Bt,ambient:S.Un,diffuse:S.Un,hasSlicePlane:!1,castShadows:!0,layerOpacity:t,offsetTransparentBackfaces:!1,screenSizePerspective:{}};if(r.externalColor=T.Un,r.instanced=!0,this._isPrimitive){const e=new je.fs;e.layerOpacity=t,r={...r,cullFace:ze((0,je.ty)(e))}}const i=await e.createMaterial({type:"default",parameters:r}),n=this._symbolLayer.resource;this._primitive=n&&function(e){switch(e){case"sphere":case"cube":case"diamond":case"cylinder":case"cone":case"inverted-cone":case"tetrahedron":return!0}return!1}(n?.primitive)?n.primitive:ae.r;const s=Re(this._primitive,i);this._lodRendererId=await e.createLodRenderer(s),this._primitiveMaterialId=i,this._loaded=!0}async createDestroyCommand(){const{_lodRendererId:e,_primitiveMaterialId:t,_context:r}=this,i=r.renderCommandContext,n=[];return null!=e&&n.push(i.destroyLodRenderer(e)),null!=t&&n.push(i.destroyMaterial(t)),new g(i,i.mergeRenderCommandBuffers(n),[()=>this._destroy()])}async createAddCommand(e){const t=this._context,{renderCommandContext:r,mainThreadDelegate:i}=t;if(null==this._lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:n}=e;if(0===n)return t.createPipelineCommand();const s=this._isPrimitive,o=this._primitive||ae.r,a=(0,E.vt)((0,le.Fq)(o)),l=(0,S.ci)((0,E.Ej)(a)),c=(0,S.ci)((0,le.Bb)(l,{isPrimitive:s,width:100,depth:null,height:null})),u=new Float64Array(16*n),d=new Float64Array(16*n),h=U(e),f=await i.applyElevationAlignmentTo(h);for(let e=0;e<n;++e){const t=e,r=f[3*e+0],i=f[3*e+1],n=f[3*e+2],s=this._computeGlobalTransform(r,i,n,this._context.viewSpatialReference,qe),o=this._computeLocalTransform(c,l,Ue);this._writeMatrixToTypedBuffer(u,t,o),this._writeMatrixToTypedBuffer(d,t,s)}const p=L(e),m=new Uint8Array(n);e.getVisibilityArray(m);const y={featureIds:new Uint32Array(p),visibility:m,localTransforms:u,globalTransforms:d};return t.createPipelineCommand(r.addLodInstances(this._lodRendererId,e.id,y))}async createRemoveCommand(e){const{_context:t,_lodRendererId:r}=this,i=t.renderCommandContext;return null==r?t.createPipelineCommand():t.createPipelineCommand(i.removeLodInstances(r,e))}async createUpdateVisibilityCommand(e){const{_lodRendererId:t,_context:r}=this,i=r.renderCommandContext;if(null==t)return r.createPipelineCommand();const n=new Uint8Array(e.featureCount);return e.getVisibilityArray(n),r.createPipelineCommand(i.updateVisibility(t,e.id,n))}async createUpdateLayerViewOpacityCommand(e){const{_context:t}=this,r=t.renderCommandContext,i=this._primitiveMaterialId;if(null==i)return t.createPipelineCommand();const n=this._getLayerOpacity();let s={layerOpacity:n};if(this._isPrimitive){const e=new je.fs;e.layerOpacity=n,s={...s,cullFace:ze((0,je.ty)(e))}}return t.createPipelineCommand(r.updateMaterial({type:"default",materialId:i,parameters:s}))}async createUpdateElevationCommand(e){const{_context:t,_lodRendererId:r}=this,{renderCommandContext:i,mainThreadDelegate:n}=t,{featureCount:s,id:o}=e;if(null==r||0===s)return t.createPipelineCommand();const a=new Float64Array(16*s),l=U(e),c=await n.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,r=c[3*e+0],i=c[3*e+1],n=c[3*e+2],s=this._computeGlobalTransform(r,i,n,this._context.viewSpatialReference,qe);this._writeMatrixToTypedBuffer(a,t,s)}return t.createPipelineCommand(i.updateLodInstancesData(r,o,a))}_writeMatrixToTypedBuffer(e,t,r){let i=16*t;for(let t=0;t<16;t++)e[i++]=r[t]}_computeGlobalTransform(e,t,r,i,n){return Le[0]=e,Le[1]=t,Le[2]=r,(0,oe.l)(i,Le,n,this._context.renderSpatialReference),n}_computeLocalTransform(e,t,r){return(0,P.D_)(r),this._applyObjectScale(e,t,r),r}_applyObjectScale(e,t,r){const i=function(e=S.Un,t,r,i=1){const n=new Array(3);if(null==t||null==r)n[0]=1,n[1]=1,n[2]=1;else{let i,s=0;for(let o=2;o>=0;o--){const a=e[o],l=null!=a,c=0===o&&!i&&!l,u=r[o];let d;"symbol-value"===a||c?d=0!==u?t[o]/u:1:l&&"proportional"!==a&&isFinite(a)&&(d=0!==u?a/u:1),null!=d&&(n[o]=d,i=d,s=Math.max(s,Math.abs(d)))}for(let e=2;e>=0;e--)null==n[e]?n[e]=i:0===n[e]&&(n[e]=.001*s)}for(let e=2;e>=0;e--)n[e]/=i;return(0,S.ci)(n)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===i[0]&&1===i[1]&&1===i[2]||(0,P.hs)(r,r,i)}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}}function ze(e){return e?0:2}const Le=(0,S.vt)(),Ue=(0,C.vt)(),qe=(0,C.vt)();class Ne{constructor(e,t){this._symbols=new Array,this._featureDataPartitioning=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){this._symbols[0]=new te(x(),this._context),this._symbols[1]=new ke(new v.A,this._context),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,r=this._partition(e),i=await Promise.all(r.map(async({index:e,features:t})=>{const r=await this._provisionSymbol(e);return await(r?.createAddCommand(t))})),n=t.joinPipelineCommands(i);return n.appendPipelineStateCommand(()=>this._featureDataPartitioning.set(e.id,r)),n}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:r}=this,i=r.renderCommandContext,n=t.get(e);if(null==n)return new g(i,i.createRenderCommandBuffer(),[]);const s=await Promise.all(n.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createRemoveCommand(t.id))})),o=r.joinPipelineCommands(s);return o.appendPipelineStateCommand(()=>t.delete(e)),o}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:r}=this,i=r.renderCommandContext,n=t.get(e.id);if(null==n)return new g(i,i.createRenderCommandBuffer(),[]);const s=await Promise.all(n.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateVisibilityCommand(t))}));return r.joinPipelineCommands(s)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,r=[];for(let t=0;t<this._symbols.length;++t){const i=this._symbols[t];null!=i&&i.loaded&&r.push(i.createUpdateLayerViewOpacityCommand(e))}const i=await Promise.all(r);return t.joinPipelineCommands(i)}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=[];for(const t of e.values()){const e=t.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateElevationCommand(t))});r.push(...e)}const i=await Promise.all(r);return t.joinPipelineCommands(i)}async createDestroyCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=[];for(const t of e.keys())r.push(this.createRemoveCommand(t));for(const e of this._symbols)r.push(e.createDestroyCommand());const i=await Promise.all(r);return t.joinPipelineCommands(i)}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=L(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:r}=e,i=[[],[]];for(let e=0;e<r;++e)i[t[e]%2].push(e);return i.map((t,r)=>new Ge(r,e.subset(new Uint32Array(t)))).filter(e=>e.features.featureCount>0)}}class Ge{constructor(e,t){this.index=e,this.features=t}}class He{constructor(e,t,r,i,n,s,o){this.viewSpatialReference=e,this.renderSpatialReference=t,this.mainThreadDelegate=r,this.renderCoordsHelper=i,this.renderCommandContext=n,this.layerInfo=s,this.layerViewInfo=o,this.symbolRendererFactory=new $e(this)}createPipelineCommand(e=this.renderCommandContext.createRenderCommandBuffer(),t=[]){return new g(this.renderCommandContext,e,t)}joinPipelineCommands(e){return 0===e.length?this.createPipelineCommand():e.filter(e=>null!=e).reduce((e,t)=>(e.append(t),e))}}class $e{constructor(e){this.context=e}createSymbolRendererFromJSON(e){const t=(0,y.L)(e??Ye)??void 0;if(!t)throw new Error("Failed to create renderer");const r=t.type;switch(r){case"simple":return new se(t,this.context);case"unique-value":return new Ne(t,this.context);default:return console.warn(`Unable to create symbolrenderer for renderer of ${r}`),this.createSymbolRendererFromJSON(Ye)}}createSymbolRendererFromSymbol(e){const t=e?.type;switch(t){case"point-3d":return new ne(e,this.context);case"picture-marker":case"simple-marker":return new te(x(),this.context);default:return console.warn(`Unable to create symbolrenderer for symbol of ${t}`),null}}createSymbolRendererFromSymbolLayer(e){const t=e.type;return"icon"===t?new te(e,this.context):(console.warn(`Unable to create symbolrenderer for symbolLayer of ${t}`),null)}}const Ye={type:"simple"};var Ze=r(69622),Xe=r(60999),We=r(32587),Je=r(96211),Qe=r(24326);function Ke(e=""){return`${e}${(0,Qe.c)()}`}new Float64Array(3);class et{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=Ke(`featureDataSubset-${e.id}-`)}get tileId(){return this._parent.tileId}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+Me.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,r){return this._parent.getCoordinates(this._subsetIndices[e],t,r)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,r){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),r)}getCoordinatesArray(e,t,r){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),r)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,r=new Uint32Array(e.length);for(let i=0;i<r.length;++i)r[i]=t[e[i]];return new et(this._parent,r)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,r=new Array;for(let i=0;i<t;++i)this.getEnabled(i)&&e.has(this.getObjectId(i))&&r.push(i);if(0!==r.length)for(const e of r)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const r of e)t.setEnabled(r,!0)}getVisibilityArray(e,t,r){return this._parent.getVisibilityArray(e,this._translatedIndices(t),r)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const r of e)yield t[r];else yield*t}}class tt{constructor(e){this._tile=e,this.id=Ke(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get tileId(){return this._tile.id}get featureCount(){return this._tile.featureCount}get usedMemory(){return Me.qK+(0,Me.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every(e=>e)}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,r){return this._tile.getCoordinates(e,t,r)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,r){return this._tile.getObjectIdsArray(e,t,r)}getCoordinatesArray(e,t,r){return this._tile.getCoordinatesArray(e,t,r)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new et(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,r=new Array;for(const i of this._allFeatureIndices())t[i]&&e.has(this.getObjectId(i))&&r.push(i);if(0!==r.length)for(const e of r)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),r=0){const{_enabled:i}=this;for(const n of t)e[r++]=Number(i[n]);return r}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const r of e)t[r]&&(yield this.getObjectId(r))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let rt=class extends Ze.A{constructor(e){super(e),this.extent=null,this._tileHandles=new We.A,this._wanted=new We.A,this._updateRequested=!1,this._synchronizationTask=null,this._requestedTiles=new Array}destroy(){this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updateRequested||!(this._synchronizationTask?.finished??1)}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,M.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted,r=this._tileHandles;for(const i of t.values())null==r.get(i.id)?.featureData&&e.push(i);return e}onTileTreeChange({tiles:e}){this._requestedTiles=e,this._scheduleTilesSync()}_scheduleTilesSync(){if(this._updateRequested)return;this._updateRequested=!0;const e=this._synchronizationTask,t=(0,Xe.UT)(async()=>{try{await(0,o.C_)(()=>e?.finished??!0),await(0,Je.NO)(),this._updateRequested=!1,await this._synchronizeTiles()}finally{this._synchronizationTask===t&&(this._synchronizationTask=null)}});this._synchronizationTask=t}async _synchronizeTiles(){const e=this._requestedTiles,t=this._tileHandles,r=new Array;for(const i of e)t.has(i.id)||r.push(i);const i=new Array;for(const r of t.values()){const{id:t}=r;e.every(e=>e.id!==t)&&i.push(r.descriptor)}const n=this._tileHandles,{_boundingRect:s}=this,o=null!=s?r.filter(e=>!e.extent||(0,M.HY)(s,e.extent)):r,a=this._wanted,l=new Array;for(const{id:e}of i)a.delete(e);for(const e of o)a.set(e.id,e);const c=this._missingTiles;for(const e of i){const{id:t}=e;if(c.some(t=>it(t,e)||it(e,t)))continue;const r=n.get(t);null!=r&&l.push(this._removeTile(r))}for(const e of o)l.push(this._addTile(e));const u=await Promise.allSettled(l);for(const e of u)"rejected"===e.status&&console.error(e.reason)}forEachTile(e){for(const t of this._tileHandles.values()){const r=t.featureData;null!=r&&e(r)}}*loadedTiles(){for(const e of this._tileHandles.values()){const t=e.featureData;null!=t&&(yield t)}}async _removeTile(e){e.loadTask.abort(),this._tileHandles.delete(e.id),this._validate();const{featureData:t}=e;if(null!=t){const e={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(e,await this.tileLocks.lock([t.tileId]),!1);const r=await this.createRemoveCommand(t.id);await(r?.execute())}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}}async _addTile(e){const{_tileHandles:t}=this,r=t.get(e.id);if(null!=r){if(!st(r)||r.featureData.isFullyEnabled)return;return r.featureData.enableAll(),void await this._onTileLoad(r)}const i=new nt(e,(0,Xe.UT)(async t=>{const r=await this.loadTile(e,t);return(0,s.Te)(t),new tt(r)}));this._tileHandles.set(i.id,i);try{await i.loadTask.promise}catch(e){return void(0,s.jH)(e)}(function(e){if(!st(e))throw new Error})(i),await this._onTileLoad(i)}async _onTileLoad(e){const t={stack:[],error:void 0,hasError:!1};try{const{_wanted:r,_tileHandles:n,_missingTiles:s}=this,o=e.descriptor,a=new Array,l=new Array,c=new Array,u=new Set;for(const t of n.values()){if(t===e)continue;const{descriptor:i,id:c}=t;if(!r.has(c)&&!s.some(e=>it(e,i)||it(i,e))){n.delete(c),t.loadTask.abort();const{featureData:e}=t;null!=e&&a.push(e);continue}if(st(t)){if(it(o,i)){const e=t.featureData;for(const t of e.objectIds())u.add(t)}if(it(i,o)){const{featureData:e}=t;l.push(e)}}}u.size>0&&(e.featureData.disableObjectIds(u),this._validateRemoval(e.featureData,u)),this._validate(),c.push(e.featureData);const d=[...c,...a,...l].map(e=>e.tileId);if((0,i.mS)(t,await this.tileLocks.lock(d),!1),0!==l.length){const t=e.featureData,r=new Set(t.objectIds());for(const e of l)e.disableObjectIds(r),this._validateRemoval(e,r)}const h=a.map(e=>this.createRemoveCommand(e.id)),f=c.map(e=>this.createAddCommand(e)),p=l.map(e=>this.createUpdateCommand(e)),m=function(e){return 0===e.length?null:e.reduce((e,t)=>(e.append(t),e))}((await Promise.all([...h,...f,...p])).filter(Ee.Ru));await(m?.execute())}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}_validate(){if(!(0,l.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!st(t))continue;const{featureData:r}=t;e.push({featureData:r,objectIds:new Set(r.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:r,objectIds:i}=e[t];for(let n=t+1;n<e.length;++n){const{featureData:t,objectIds:s}=e[n];for(const e of s)if(i.has(e))throw new Error(`${r.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,l.A)("feature-pipeline-3d-test-validation"))for(const r of e.enabledObjectIds())if(t.has(r))throw new Error(`Failed to remove ${r} from ${e.id}!`)}};function it({lij:[e,t,r]},{lij:[i,n,s]}){const o=i-e;return o>=0&&t===n>>o&&r===s>>o}(0,i.Cg)([(0,a.MZ)()],rt.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],rt.prototype,"loadTile",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],rt.prototype,"createAddCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],rt.prototype,"createRemoveCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],rt.prototype,"createUpdateCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],rt.prototype,"tileLocks",void 0),(0,i.Cg)([(0,a.MZ)()],rt.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)()],rt.prototype,"_boundingRect",null),(0,i.Cg)([(0,a.MZ)()],rt.prototype,"_missingTiles",null),(0,i.Cg)([(0,a.MZ)()],rt.prototype,"_updateRequested",void 0),(0,i.Cg)([(0,a.MZ)()],rt.prototype,"_synchronizationTask",void 0),rt=(0,i.Cg)([(0,u.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],rt);class nt{constructor(e,t){this.descriptor=e,this.loadTask=t}get id(){return this.descriptor.id}get featureData(){return this.loadTask.value}}function st(e){return null!=e.featureData}var ot=r(36563);class at{constructor(){this._previousActions=new Map}async lock(e){const{_previousActions:t}=this,r=e.map(e=>t.get(e)).filter(Ee.Ru),i=Promise.allSettled(r),n=(0,s.Tw)(),o=(0,ot.hA)(()=>n.resolve()),a=n.promise.finally(()=>{for(const r of e)t.get(r)===a&&t.delete(r)});for(const r of e)t.set(r,a);return await i,(0,ot.Bf)(o)}}var lt=r(75503),ct=r(27647);class ut{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return Me.qK+Me.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new dt(this._index,this._view,e)}}class dt extends ut{constructor(e,t,r){super(e,t),this._geometryOverride=r}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,ct.Q)(this._geometryOverride)}}class ht{constructor(e,t){this.featureData=e,this.bounds=t}}class ft{constructor(){this._tileBounds=new Map,this.events=new n.bk,this.featureAdapter=pt.shared}get usedMemory(){return Me.qK+Me.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const r=new lt.wq(9,t=>e.getBounds(t)),i=new Array;for(let e=0;e<t;++e)i[e]=e;r.load(i),this._tileBounds.set(e.id,new ht(e,r)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:r}of this._tileBounds.values())r.all(r=>{t.getEnabled(r)&&e(new ut(r,t))})}forEachInBounds(e,t){mt.minX=e[0],mt.minY=e[1],mt.maxX=e[2],mt.maxY=e[3];for(const{featureData:e,bounds:r}of this._tileBounds.values())r.search(mt,r=>{e.getEnabled(r)&&t(new ut(r,e))})}forEachBounds(e,t){for(const r of e)t(r.getBoundingBox())}getFullExtent(e){let t=1/0,r=1/0,i=-1/0,n=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:o,maxX:a,maxY:l}=e.toJSON();t=Math.min(t,s),r=Math.min(r,o),i=Math.min(i,a),n=Math.min(n,l)}return{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:e}}}class pt{static{this.shared=new pt}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const mt=new lt.EC;var yt=r(80893);class gt{constructor(e,t,r){this.descriptor=e,this._pages=t,this._pageSize=r;const i=Me.ez+t.reduce((e,{usedMemory:t})=>e+t,0),n=3*Me.RS;this.usedMemory=Me.qK+i+n,this.featureCount=t.reduce((e,t)=>e+t.featureCount,0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getObjectId(r)}getAttribute(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getAttribute(i,t)}getAttributeAsTimestamp(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getAttributeAsTimestamp(i,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getAttributes(r)}getCoordinates(e,t,r){const{pageIndex:i,featurePageIndex:n}=this._translateIndex(e);this._pages[i].getCoordinates(n,t,r)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(r)}getCentroid(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getCentroid(i,t)}getBounds(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBounds(r)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBoundingBox(r)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){let i=r;for(const{page:r,indices:n}of this._batchPageIndices(t))i=r.getObjectIdsArray(e,n,i);return i}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){let i=r;for(const{page:r,indices:n}of this._batchPageIndices(t))i=r.getCoordinatesArray(e,n,i);return i}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:r}of this._batchPageIndices(e))for(const e of t.objectIds(r))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let r=0,i=new Array;for(const n of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(n);r!==e&&(0!==i.length&&t.push({pageIndex:r,indices:i}),r=e,i=[]),i.push(s)}0!==i.length&&t.push({pageIndex:r,indices:i})}const{_pages:r}=this;for(const{pageIndex:e,indices:i}of t)yield{page:r[e],indices:i}}}var bt=r(49186),_t=r(51624),vt=r(62577),wt=r(92722),xt=r(95466),Ct=r(53655);class St{constructor(e){this._reader=new _t.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return Tt(e.getMessage());e.skip()}It()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:r,attributeIndices:i}}=this,n=r.get(t)?.index;if(null==n)return;const s=i[e*r.fields.length+n],o=this._reader;return o.move(s),Pt(o)}getAttributeAsTimestamp(e,t){const r=this.getAttribute(e,t);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:r}}=this,i=e*t.fields.length,n=this._reader,s={};for(const e of t.fields){const t=r[i+e.index];n.move(t),s[e.name]=Pt(n)}return s}getCoordinates(e,t,r=0){const i=this._reader,{transform:n,featureIndices:s}=this._index,{scale:o,translate:a}=n;i.move(s[e]),this._readCoordinates(o,a,t,r)}getOptimizedGeometry(e){const t=(0,S.vt)();return this.getCoordinates(e,t),new wt.A([],t,!0,!1)}getCentroid(e,{hasZ:t,hasM:r}){this.getCoordinates(e,Bt);const[i,n,s]=Bt,o=[i,n];return t&&(o[3]=s),r&&(o[t?4:3]=0),new wt.A([],o,t,r)}getBounds(e){this.getCoordinates(e,Bt);const[t,r]=Bt,i=new lt.EC;return i.minX=t,i.minY=r,i.maxX=t,i.maxY=r,i}getBoundingBox(e){this.getCoordinates(e,Bt);const[t,r,i]=Bt;return(0,E.fA)(t,r,i,t,r,i)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){const i=this._reader,{objectIdFieldName:n,attributeIndices:s,fieldsIndex:o}=this._index,a=o.get(n).index,l=o.fields.length;for(const n of t){const t=s[n*l+a];i.move(t),e[r++]=Pt(i)}return r}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){const i=this._reader,{transform:n,featureIndices:s}=this._index,{scale:o,translate:a}=n;for(const n of t){const t=s[n];i.move(t),r=this._readCoordinates(o,a,e,r)}return r}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:r,attributeIndices:i,fieldsIndex:n}=this._index,s=n.get(r).index,o=n.fields.length;for(const r of e){const e=i[r*o+s];t.move(e),yield Pt(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,r],[i,n,s],o,a){const l=this._reader,c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)3===l.tag()?(l.getUInt32(),o[a++]=i+e*l.getSInt64(),o[a++]=n+t*l.getSInt64(),o[a++]=s+r*l.getSInt64()):l.skip();break}default:l.skip()}return a}}function Tt(e){for(;e.next();){if(1===e.tag())return At(e.getMessage());e.skip()}It()}function At(e){let t,r,i=!1,n=!1,s=0;const o=new Array,a=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:r=e.getString();break;case 7:0!==e.getEnum()&&It();break;case 9:i=e.getBool()??!1;break;case 12:t=(0,vt.Q1)(e.processMessage(Ct.ae));break;case 13:{const t=e.processMessage(Ct.cn);t.index=s++,o.push(t);break}case 15:{a.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:n=e.getBool()??!1;break;default:e.skip()}const c=new xt.A(o);return null!=t&&n&&null!=r&&c.has(r)||It(),{transform:t,exceededTransferLimit:i,fieldsIndex:c,objectIdFieldName:r,featureIndices:a,attributeIndices:l}}function It(){const e=new bt.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function Pt(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const Bt=(0,S.vt)();class Et{constructor(e,t,r,i,n){this.spatialReference=e,this.url=r,this.objectIdField=i,this.capabilities=n;const{supportsMaxRecordCountFactor:s,maxRecordCount:o}=this.capabilities.query,a=s?4:1,l=(o??8e3)*a;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=a,c.num=this._pageSize,c.outFields=[i],this._baseQuery=c}async fetch(e,t){const{spatialReference:r,_pageSize:i}=this,n=(0,M.w1)(e.extent,r),o=this._baseQuery.clone();o.geometry=n;const a=new Array;let l=0,c=!1,u=1;for(;!c;){const e=[];for(let r=0;r<u;++r)e.push(this._fetchPage(o,l++,t));const r=await Promise.all(e);(0,s.Te)(t);for(const e of r){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&a.push(e)}u=Math.min(u+1,4)}return new gt(e,a,i)}async _fetchPage(e,t,r){const i=e.clone();i.start=t*this._pageSize;const n=(await(0,yt.kS)(this.url,i,{signal:r})).data;return(0,s.Te)(r),new St(n)}}var Mt=r(29920),Ot=r(77690),Rt=r(29242);var Ft=r(13030),Dt=r(78662),jt=r(49255),Vt=r(40268),kt=r(25634),zt=r(11725),Lt=r(77194),Ut=r(59907),qt=r(43616),Nt=r(13259),Gt=r(4431),Ht=r(1843),$t=r(97220),Yt=r(98958),Zt=r(16943),Xt=r(33524),Wt=r(90644),Jt=r(85079);class Qt extends Yt.w{constructor(e,t){super(e,t,new $t.$(Nt.H,()=>r.e(8241).then(r.bind(r,48241))),(0,Jt._u)([er,ir()].map(Gt.U))),this.primitiveType=t.occlusionPass?H.WR.POINTS:H.WR.TRIANGLE_STRIP}initializePipeline(e){const{oitPass:t,hasPolygonOffset:r,draped:i,output:n,depthTestEnabled:s,occlusionPass:o}=e,a=s&&!i&&!(1===t)&&!o&&!(9===n);return(0,Wt.Ey)({blending:(0,jt.RN)(n)?(0,Xt.Yf)(t,!0):null,depthTest:s&&!i?{func:515}:null,depthWrite:a?Wt.Uy:null,drawBuffers:(0,Xt.m6)(t,n),colorWrite:Wt.kn,polygonOffset:r?Kt:null})}}const Kt={factor:0,units:-4},er=(0,Ht.BP)().vec2u8("uv0",{glNormalized:!0}),tr=(0,Ht.BP)().vec3f("position").vec3f("normal").vec4i16("uvi").vec4u8("color").vec2f("size").f32("rotation").vec4f("centerOffsetAndDistance").vec4f("featureAttribute"),rr=tr.clone().vec4u8("olidColor");function ir(){return(0,Zt.E)()?rr:tr}var nr=r(51976),sr=r(35256);class or extends sr.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.olidColorInstanced=!1,this.textureCoordinateType=0,this.emissionSource=0,this.discardInvisibleFragments=!0,this.hasVVInstancing=!1,this.snowCover=!1}}(0,i.Cg)([(0,nr.W)()],or.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"occlusionTestEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"signedDistanceFieldEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasVVSize",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasVVColor",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasVerticalOffset",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasScreenSizePerspective",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasRotation",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"debugDrawLabelBorder",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasPolygonOffset",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"depthTestEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"pixelSnappingEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"draped",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"terrainDepthTest",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"cullAboveTerrain",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"occlusionPass",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"occludedFragmentFade",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"horizonCullingEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"isFocused",void 0);var ar=r(49788);class lr extends zt.i{constructor(e,t){super(e,Or),this.produces=new Map([[13,e=>(0,jt.Mb)(e)&&!this.parameters.drawAsLabel],[14,e=>(0,jt.Mb)(e)&&this.parameters.drawAsLabel],[12,()=>this.parameters.occlusionTest],[18,e=>this.parameters.draped&&(0,jt.Mb)(e)]]),this._visible=!0,this._configuration=new or(t)}getConfiguration(e,t){const r=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=r,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.hasVVSize=!!this.parameters.vvSize,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.occlusionPass=12===t.slot,this._configuration.occludedFragmentFade=!r&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||12===t.slot,(0,jt.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!D.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,r,i,n,s){const{options:{selectionMode:o,hud:a,excludeLabels:l},point:c,camera:u}=r,{parameters:d}=this;if(!o||!a||l&&d.isLabel||!e.visible||!c||!u)return;const h=e.attributes.get("featureAttribute"),f=null==h?null:(0,T.ci)(h.data,Ar),{scaleX:p,scaleY:m}=Fr(f,d,u.pixelRatio);(0,Ot.z0)(vr,t),e.attributes.has("featureAttribute")&&function(e){const t=e[0],r=e[1],i=e[2],n=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],u=1/Math.sqrt(t*t+r*r+i*i),d=1/Math.sqrt(n*n+s*s+o*o),h=1/Math.sqrt(a*a+l*l+c*c);e[0]=t*u,e[1]=r*u,e[2]=i*u,e[3]=n*d,e[4]=s*d,e[5]=o*d,e[6]=a*h,e[7]=l*h,e[8]=c*h}(vr);const y=e.attributes.get("position"),g=e.attributes.get("size"),b=e.attributes.get("normal"),_=e.attributes.get("rotation"),v=e.attributes.get("centerOffsetAndDistance");(0,be.vA)(y.size>=3);const w=(0,Nt.c)(d),x="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<y.data.length/y.size;e++){const i=e*y.size;(0,ce.j)(fr,y.data[i],y.data[i+1],y.data[i+2]),(0,ce.t)(fr,fr,t),(0,ce.t)(fr,fr,u.viewMatrix);const n=e*v.size;if((0,ce.j)(Sr,v.data[n],v.data[n+1],v.data[n+2]),!x&&(fr[0]+=Sr[0],fr[1]+=Sr[1],0!==Sr[2])){const e=Sr[2];(0,ce.n)(Sr,fr),(0,ce.e)(fr,fr,(0,ce.h)(Sr,Sr,e))}const o=e*b.size;if((0,ce.j)(pr,b.data[o],b.data[o+1],b.data[o+2]),ur(pr,vr,u,Ir),Dr(this.parameters,fr,Ir,u,hr),u.applyProjection(fr,mr),mr[0]>-1){x&&(Sr[0]||Sr[1])&&(mr[0]+=Sr[0]*u.pixelRatio,0!==Sr[1]&&(mr[1]+=hr.alignmentEvaluator.apply(Sr[1])*u.pixelRatio),u.unapplyProjection(mr,fr)),mr[0]+=this.parameters.screenOffset[0]*u.pixelRatio,mr[1]+=this.parameters.screenOffset[1]*u.pixelRatio,mr[0]=Math.floor(mr[0]),mr[1]=Math.floor(mr[1]);const t=e*g.size;Er[0]=g.data[t],Er[1]=g.data[t+1],hr.evaluator.applyVec2(Er,Er);const i=Pr*u.pixelRatio;let n=0;d.textureIsSignedDistanceField&&(n=Math.min(d.outlineSize,.5*Er[0])*u.pixelRatio/2),Er[0]*=p,Er[1]*=m;const o=e*_.size,a=d.rotation+_.data[o];if(dr(c,mr[0],mr[1],Er,i,n,a,d,w)){const e=r.ray;if((0,ce.t)(gr,fr,(0,P.B8)(xr,u.viewMatrix)),mr[0]=c[0],mr[1]=c[1],u.unprojectFromRenderScreen(mr,fr)){const t=(0,S.vt)();(0,ce.d)(t,e.direction);const r=1/(0,ce.b)(t);(0,ce.h)(t,t,r),s((0,ce.k)(e.origin,fr)*r,t,-1,gr)}}}}}intersectDraped(e,t,r,i,n){const s=e.attributes.get("position"),o=e.attributes.get("size"),a=e.attributes.get("rotation"),l=this.parameters,c=(0,Nt.c)(l),u=e.attributes.get("featureAttribute"),d=null==u?null:(0,T.ci)(u.data,Ar),{scaleX:h,scaleY:f}=Fr(d,l,e.screenToWorldRatio),p=Br*e.screenToWorldRatio;for(let t=0;t<s.data.length/s.size;t++){const u=t*s.size,d=s.data[u],m=s.data[u+1],y=t*o.size;Er[0]=o.data[y],Er[1]=o.data[y+1];let g=0;l.textureIsSignedDistanceField&&(g=Math.min(l.outlineSize,.5*Er[0])*e.screenToWorldRatio/2),Er[0]*=h,Er[1]*=f;const b=t*a.size,_=l.rotation+a.data[b];dr(r,d,m,Er,p,g,_,l,c)&&i(n.distance,n.normal,-1)}}createBufferWriter(){return new Rr}applyShaderOffsetsView(e,t,r,i,n,s,o){const a=ur(t,r,n,Ir);return this._applyVerticalGroundOffsetView(e,a,n,o),Dr(this.parameters,o,a,n,s),this._applyPolygonOffsetView(o,a,i[3],n,o),this._applyCenterOffsetView(o,i,o),o}applyShaderOffsetsNDC(e,t,r,i,n){return this._applyCenterOffsetNDC(e,t,r,i),null!=n&&(0,ce.d)(n,i),this._applyPolygonOffsetNDC(i,t,r,i),i}_applyPolygonOffsetView(e,t,r,i,n){const s=i.aboveGround?1:-1;let o=Math.sign(r);0===o&&(o=s);const a=s*o;if(this.parameters.shaderPolygonOffset<=0)return(0,ce.d)(n,e);const l=(0,F.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/i.viewport[2];return(0,ce.h)(n,e,a>0?c:1/c),n}_applyVerticalGroundOffsetView(e,t,r,i){const n=(0,ce.b)(e),s=r.aboveGround?1:-1,o=r.computeRenderPixelSizeAtDist(n)*Vt.R,a=(0,ce.h)(fr,t.normal,s*o);return(0,ce.g)(i,e,a),i}_applyCenterOffsetView(e,t,r){const i="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,ce.d)(r,e),i&&(r[0]+=t[0],r[1]+=t[1],t[2]&&((0,ce.n)(pr,r),(0,ce.a)(r,r,(0,ce.h)(pr,pr,t[2])))),r}_applyCenterOffsetNDC(e,t,r,i){const n="screen"!==this.parameters.centerOffsetUnits;return i!==e&&(0,ce.d)(i,e),n||(i[0]+=t[0]/r.fullWidth*2,i[1]+=t[1]/r.fullHeight*2),i}_applyPolygonOffsetNDC(e,t,r,i){const n=this.parameters.shaderPolygonOffset;if(e!==i&&(0,ce.d)(i,e),n){const e=r.aboveGround?1:-1,s=e*Math.sign(t[3]);i[2]-=(s||e)*n}return i}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:r}=this.parameters,i=e[3]>=ar.Q||t>=ar.Q&&r[3]>=ar.Q;return this._visible&&i}createGLMaterial(e){return new cr(e)}calculateRelativeScreenBounds(e,t,r=(0,M.vt)()){return function(e,t,r,i){i[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*r,i[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*r}(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class cr extends kt.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(Qt,e)}}function ur(e,t,r,i){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,Ot.z0)(wr,t)),(0,ce.o)(i.normal,e,t),(0,ce.t)(i.normal,i.normal,r.viewInverseTransposeMatrix),i.cosAngle=(0,ce.f)(yr,Mr),i}function dr(e,t,r,i,n,s,o,a,l){let c=t-n-i[0]*l[0],u=c+i[0]+2*n,d=r-n-i[1]*l[1],h=d+i[1]+2*n;const f=a.distanceFieldBoundingBox;return a.textureIsSignedDistanceField&&null!=f&&(c+=i[0]*f[0],d+=i[1]*f[1],u-=i[0]*(1-f[2]),h-=i[1]*(1-f[3]),c-=s,u+=s,d-=s,h+=s),(0,O.hZ)(_r,t,r),(0,O.e$)(br,e,_r,(0,F.kU)(o)),br[0]>c&&br[0]<u&&br[1]>d&&br[1]<h}const hr=new Lt.fc,fr=(0,S.vt)(),pr=(0,S.vt)(),mr=(0,T.vt)(),yr=(0,S.vt)(),gr=(0,S.vt)(),br=(0,R.vt)(),_r=(0,R.vt)(),vr=(0,Rt.vt)(),wr=(0,Rt.vt)(),xr=(0,C.vt)(),Cr=(0,T.vt)(),Sr=(0,S.vt)(),Tr=(0,S.vt)(),Ar=(0,T.vt)(),Ir={normal:yr,cosAngle:0},Pr=1,Br=2,Er=(0,R.fA)(0,0),Mr=(0,S.fA)(0,0,1);class Or extends kt.NV{constructor(){super(...arguments),this.renderOccluded=1,this.isDecoration=!1,this.color=(0,T.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,R.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,T.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,T.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusStyle="bright",this.draped=!1,this.isLabel=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class Rr{constructor(){this.layout=er,this.instanceLayout=ir()}elementCount(e){return e.get("position").indices.length}elementCountBaseInstance(e){return e.get("uv0").indices.length}write(e,t,r,i,n,s){const{position:o,normal:a,color:l,size:c,rotation:u,centerOffsetAndDistance:d,featureAttribute:h,uvi:f}=n;(0,Ut.Hk)(r.get("position"),e,o,s),(0,Ut.p1)(r.get("normal"),t,a,s);const p=r.get("position").indices.length;let m=0,y=0,g=Nt.f,b=Nt.f;const _=r.get("uvi")?.data;_&&_.length>=4&&(m=_[0],y=_[1],g=_[2],b=_[3]);for(let e=0;e<p;++e){const t=s+e;f.setValues(t,m,y,g,b)}if((0,Ut.tb)(r.get("color"),4,l,s),(0,Ut.Ue)(r.get("size"),c,s),(0,Ut.uO)(r.get("rotation"),u,s),r.get("centerOffsetAndDistance")?(0,Ut.Ut)(r.get("centerOffsetAndDistance"),d,s):(0,Ut.Pq)(d,s,p),r.get("featureAttribute")?(0,Ut.Ut)(r.get("featureAttribute"),h,s):(0,Ut.Pq)(h,s,p),null!=i){const e=r.get("position")?.indices;if(e){const t=e.length,r=n.getField("olidColor",Ft.XP);(0,Ut.vx)(i,r,t,s)}}return{numVerticesPerItem:1,numItems:p}}writeBaseInstance(e,t){const{uv0:r}=t;(0,Ut.Ue)(e.get("uv0"),r,0)}intersect(e,t,r,i,n,s,o){const{options:{selectionMode:a,hud:l,excludeLabels:c},point:u,camera:d}=i;if(!a||!l||c&&t.isLabel||!u)return;const h=this.instanceLayout.createView(e),{position:f,normal:p,rotation:m,size:y,featureAttribute:g,centerOffsetAndDistance:b}=h,_="screen"===t.centerOffsetUnits,v=(0,Nt.c)(t);if(null==f||null==p||null==m||null==y||null==b||null==d)return;const w=null==g?null:g.getVec(0,Ar),{scaleX:x,scaleY:C}=Fr(w,t,d.pixelRatio),T=f.count;for(let e=0;e<T;e++){if(f.getVec(e,fr),null!=r&&(0,ce.g)(fr,fr,r),(0,ce.t)(fr,fr,d.viewMatrix),b.getVec(e,Cr),(0,ce.j)(Sr,Cr[0],Cr[1],Cr[2]),!_&&(fr[0]+=Sr[0],fr[1]+=Sr[1],0!==Sr[2])){const e=Sr[2];(0,ce.n)(Sr,fr),(0,ce.e)(fr,fr,(0,ce.h)(Sr,Sr,e))}if(p.getVec(e,pr),ur(pr,vr,d,Ir),Dr(t,fr,Ir,d,hr),d.applyProjection(fr,mr),mr[0]>-1){_&&(Sr[0]||Sr[1])&&(mr[0]+=Sr[0]*d.pixelRatio,0!==Sr[1]&&(mr[1]+=hr.alignmentEvaluator.apply(Sr[1])*d.pixelRatio),d.unapplyProjection(mr,fr)),mr[0]+=t.screenOffset[0]*d.pixelRatio,mr[1]+=t.screenOffset[1]*d.pixelRatio,mr[0]=Math.floor(mr[0]),mr[1]=Math.floor(mr[1]),y.getVec(e,Er),hr.evaluator.applyVec2(Er,Er);const r=Pr*d.pixelRatio;let n=0;t.textureIsSignedDistanceField&&(n=Math.min(t.outlineSize,.5*Er[0])*d.pixelRatio/2),Er[0]*=x,Er[1]*=C;const s=m.get(e),a=t.rotation+s;if(dr(u,mr[0],mr[1],Er,r,n,a,t,v)){const t=i.ray;if((0,ce.t)(gr,fr,(0,P.B8)(xr,d.viewMatrix)),mr[0]=u[0],mr[1]=u[1],d.unprojectFromRenderScreen(mr,fr)){const r=(0,S.vt)();(0,ce.d)(r,t.direction);const i=1/(0,ce.b)(r);(0,ce.h)(r,r,i),o((0,ce.k)(t.origin,fr)*i,r,e,gr)}}}}}}function Fr(e,t,r){return null==e||null==t.vvSize?{scaleX:r,scaleY:r}:((0,Dt.VC)(Tr,t,e),{scaleX:Tr[0]*r,scaleY:Tr[1]*r})}function Dr(e,t,r,i,n){if(!e.verticalOffset?.screenLength){const i=(0,ce.b)(t);return n.update(r.cosAngle,i,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),t}const s=(0,ce.b)(t),o=e.screenSizePerspectiveAlignment??e.screenSizePerspective,a=(0,qt.kE)(i,s,e.verticalOffset,r.cosAngle,o,e.screenSizePerspectiveMinPixelReferenceSize);return n.update(r.cosAngle,s,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),(0,ce.h)(r.normal,r.normal,a),(0,ce.g)(t,t,r.normal)}class jr{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this.globalViewingMode=1===e}createRenderCommandBuffer(e=[],t=[]){return{commands:e,transferList:t}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const r of e)null!=r&&(t.commands.push(...r.commands),t.transferList.push(...r.transferList));return t}async createTexture(e){const{data:t,parameters:r}=e();return await this._mainThreadDelegate.createTexture(t,r)}async releaseTexture(e){const t=this._destroyTexture(e);return new g(this,t,[])}_destroyTexture(e){return{commands:[{id:"destroy-texture",textureId:e}],transferList:[]}}async createMaterial(e){const{type:t,parameters:r}=e,i=Ke("material");let n,s;switch(t){case"default":n=new je.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,materialId:i,parameters:e.parameters};break;case"hud":n=new lr(r,this.globalViewingMode),s={type:t,materialId:i,parameters:e.parameters}}return this._bufferWriters.set(i,n.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),i}destroyMaterial(e){return{commands:[{id:"destroy-material",materialId:e}],transferList:[]}}updateMaterial(e){return{commands:[{...e,id:"update-material"}],transferList:[]}}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}async destroyDirectRenderer(e){await this._mainThreadDelegate.destroyDirectRenderer(e)}addDirectRendererGeometry(e,t,r,i){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:s,renderGeometryBufferItems:o}=this.createRenderGeometryBuffer(t,r,i);return this.addDirectRendererGeometryBuffer(n,e,s,o,r)}updateDirectRendererGeometry(e,t,r,i){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:s,renderGeometryBufferItems:o}=this.createRenderGeometryBuffer(t,r,i);return this.updateDirectRendererGeometryBuffer(n,e,s,o,r)}addDirectRendererGeometryBuffer(e,t,r,i,n){const{objectIds:s,visibilities:o}=i;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:i,localOrigin:n}],transferList:[r.data,s.buffer,o.buffer]}}updateDirectRendererGeometryBuffer(e,t,r,i,n){const{objectIds:s,visibilities:o}=i;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:i,localOrigin:n}],transferList:[r.data,s.buffer,o.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=Ke("lod-renderer"),r=new Set,i={levels:e.levels.map(e=>({components:e.components.map(e=>{const t=e.attributes.get("position");if(!t||0===t.indices.length)throw new Error("positions attribute expected");const i=(0,N.tM)(t.indices.length/3),n=new Mt.j(i,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return r.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:n.bbMax,bbMin:n.bbMin}}}),minScreenSpaceRadius:e.minScreenSpaceRadius}))};return await this._mainThreadDelegate.createLodRenderer(t,i,Array.from(r)),t}destroyLodRenderer(e){return{commands:[{id:"destroy-lod-renderer",rendererId:e}],transferList:[]}}addLodInstances(e,t,r){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:r}],transferList:[r.featureIds.buffer,r.globalTransforms.buffer,r.localTransforms.buffer,r.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,r){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:r}],transferList:[r.buffer]}}updateVisibility(e,t,r){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:r}],transferList:[r.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t,r){const{materialId:i,visibilities:n,objectIds:s}=e,o=this._bufferWriters.get(i);if(null==o)throw new Error("no registered bufferWriter for material found");let a=null;if(e.transformation&&t)(0,P.C)(Vr,e.transformation),Vr[12]-=t[0],Vr[13]-=t[1],Vr[14]-=t[2],a=Vr;else{if(t)throw new Error("not implemented");e.transformation&&(a=e.transformation)}let l=null;a&&((0,P.B8)(kr,Vr),(0,P.mg)(kr,kr),l=kr);const c=e.attributes,u=o.elementCount(c),d=r?o.instanceLayout:o.layout;if(!d)throw new Error("Missing layout");const h=d.stride/4;u>Math.floor(zr/h)&&console.warn("geometry with very large number of elements encountered");const f=d.createBuffer(u),p=o.write(a,l,c,e.olidColor,f,0);if(null==p)throw new Error("Bufferwriter.write does not provide item information.");if(n.length!==p.numItems||s.length!==p.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:f.buffer,elementCount:u},renderGeometryBufferItems:{objectIds:s,visibilities:n,ranges:{numVertices:p.numVerticesPerItem,numItems:p.numItems}}}}async setBaseInstance(e,t){await this._mainThreadDelegate.setBaseInstance(e,t)}}const Vr=(0,C.vt)(),kr=(0,C.vt)(),zr=4194304;var Lr=r(98764),Ur=r(65806);const qr=(0,S.vt)();var Nr=r(4341),Gr=r(11964),Hr=r(44280),$r=r(32114);const Yr=()=>c.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function Zr(e=hi){return{plane:(0,he.vt)(e.plane),origin:(0,S.o8)(e.origin),basis1:(0,S.o8)(e.basis1),basis2:(0,S.o8)(e.basis2)}}function Xr(e,t=Zr()){return Wr(e.origin,e.basis1,e.basis2,t)}function Wr(e,t,r,i=Zr()){return(0,ce.d)(i.origin,e),(0,ce.d)(i.basis1,t),(0,ce.d)(i.basis2,r),Jr(i),function(e,t){Math.abs((0,ce.f)(e.basis1,e.basis2)/((0,ce.b)(e.basis1)*(0,ce.b)(e.basis2)))>1e-6&&Yr().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,ce.f)(e.basis1,ai(e)))>1e-6&&Yr().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,ce.f)(ai(e),e.origin)-e.plane[3])>1e-6&&Yr().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function Jr(e){(0,he.mR)(e.basis2,e.basis1,e.origin,e.plane)}function Qr(e,t,r){e!==r&&Xr(e,r);const i=(0,ce.h)($r.rq.get(),ai(e),t);return(0,ce.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function Kr(e,t=Zr()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,ce.j)(t.origin,e[0]+r,e[1]+i,0),(0,ce.j)(t.basis1,r,0,0),(0,ce.j)(t.basis2,0,i,0),(0,he.fA)(0,0,1,0,t.plane),t}function ei(e,t,r){return!!(0,he.Ui)(e.plane,t,r)&&li(e,r)}function ti(e,t,r){const i=fi.get();di(e,t,i,fi.get());let n=Number.POSITIVE_INFINITY;for(const s of gi){const o=ui(e,s,pi.get()),a=$r.rq.get();if((0,he.T7)(i,o,a)){const e=(0,ce.E)($r.rq.get(),t.origin,a),i=Math.abs((0,F.XM)((0,ce.f)(t.direction,e)));i<n&&(n=i,(0,ce.d)(r,a))}}return n===Number.POSITIVE_INFINITY?ri(e,t,r):r}function ri(e,t,r){if(ei(e,t,r))return r;const i=fi.get(),n=fi.get();di(e,t,i,n);let s=Number.POSITIVE_INFINITY;for(const o of gi){const a=ui(e,o,pi.get()),l=$r.rq.get();if((0,he.gv)(i,a,l)){const e=(0,fe.kb)(t,l);if(!(0,he.Tj)(n,l))continue;e<s&&(s=e,(0,ce.d)(r,l))}}return si(e,t.origin)<s&&ii(e,t.origin,r),r}function ii(e,t,r){const i=(0,he._I)(e.plane,t,$r.rq.get()),n=(0,Gr.H6)(ci(e,e.basis1),i,-1,1,$r.rq.get()),s=(0,Gr.H6)(ci(e,e.basis2),i,-1,1,$r.rq.get());return(0,ce.e)(r,(0,ce.g)($r.rq.get(),n,s),e.origin),r}function ni(e,t,r){const{origin:i,basis1:n,basis2:s}=e,o=(0,ce.e)($r.rq.get(),t,i),a=(0,Hr.gr)(n,o),l=(0,Hr.gr)(s,o),c=(0,Hr.gr)(ai(e),o);return(0,ce.j)(r,a,l,c)}function si(e,t){const r=ni(e,t,$r.rq.get()),{basis1:i,basis2:n}=e,s=(0,ce.b)(i),o=(0,ce.b)(n),a=Math.max(Math.abs(r[0])-s,0),l=Math.max(Math.abs(r[1])-o,0),c=r[2];return a*a+l*l+c*c}function oi(e,t){const r=-e.plane[3];return(0,Hr.gr)(ai(e),t)-r}function ai(e){return(0,he.Qj)(e.plane)}function li(e,t){const r=(0,ce.e)($r.rq.get(),t,e.origin),i=(0,ce.m)(e.basis1),n=(0,ce.m)(e.basis2),s=(0,ce.f)(e.basis1,r),o=(0,ce.f)(e.basis2,r);return-s-i<0&&s-i<0&&-o-n<0&&o-n<0}function ci(e,t){const r=pi.get();return(0,ce.d)(r.origin,e.origin),(0,ce.d)(r.vector,t),r}function ui(e,t,r){const{basis1:i,basis2:n,origin:s}=e,o=(0,ce.h)($r.rq.get(),i,t.origin[0]),a=(0,ce.h)($r.rq.get(),n,t.origin[1]);(0,ce.g)(r.origin,o,a),(0,ce.g)(r.origin,r.origin,s);const l=(0,ce.h)($r.rq.get(),i,t.direction[0]),c=(0,ce.h)($r.rq.get(),n,t.direction[1]);return(0,ce.h)(r.vector,(0,ce.g)(l,l,c),2),r}function di(e,t,r,i){const n=ai(e);(0,he.mR)(n,t.direction,t.origin,r),(0,he.mR)((0,he.Qj)(r),n,t.origin,i)}const hi={plane:(0,he.vt)(),origin:(0,S.fA)(0,0,0),basis1:(0,S.fA)(1,0,0),basis2:(0,S.fA)(0,1,0)},fi=new Nr.I(he.vt),pi=new Nr.I(Gr.vt),mi=(0,S.vt)(),yi=new Nr.I(()=>Zr()),gi=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],bi=(0,C.vt)(),_i=(0,C.vt)(),vi=Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:oi,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case 0:(0,ce.d)(r,e.basis1),(0,ce.n)(r,r);break;case 1:(0,ce.d)(r,e.basis2),(0,ce.n)(r,r);break;case 2:(0,ce.d)(r,ai(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:ri,closestPointOnSilhouette:ti,copy:Xr,copyWithoutVerify:function(e,t){(0,ce.d)(t.origin,e.origin),(0,ce.d)(t.basis1,e.basis1),(0,ce.d)(t.basis2,e.basis2),(0,he.C)(t.plane,e.plane)},create:Zr,distance:function(e,t){return Math.sqrt(si(e,t))},distance2:si,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of gi){const n=ui(e,i,pi.get()),s=(0,Gr.kb)(n,t);s>r&&(r=s)}return Math.sqrt(r)},elevate:Qr,equals:function(e,t){return(0,ce.q)(e.basis1,t.basis1)&&(0,ce.q)(e.basis2,t.basis2)&&(0,ce.q)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,he.Tj)(e.plane,t)&&li(e,t)},fromAABoundingRect:Kr,fromValues:Wr,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[n,s]=e.origin;return(0,M.fA)(n-r,s-i,n+r,s+i,t)},intersectRay:ei,intersectRayClosestSilhouette:function(e,t,r){if(ei(e,t,r))return r;const i=ti(e,t,$r.rq.get());return(0,ce.g)(r,t.origin,(0,ce.h)($r.rq.get(),t.direction,(0,ce.k)(t.origin,i)/(0,ce.b)(t.direction))),r},normal:ai,projectPoint:ii,projectPointLocal:ni,rotate:function(e,t,r,i){return e!==i&&Xr(e,i),(0,P.$0)(_i,t,r),(0,ce.t)(i.basis1,e.basis1,_i),(0,ce.t)(i.basis2,e.basis2,_i),Jr(i),i},setAltitudeAt:function(e,t,r,i){const n=oi(e,t),s=(0,ce.h)(mi,ai(e),r-n);return(0,ce.g)(i,t,s),i},setExtent:function(e,t,r){return Kr(t,r),Qr(r,oi(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&Xr(e,r),(0,P.B8)(bi,t),(0,P.mg)(bi,bi),(0,ce.t)(r.basis1,e.basis1,bi),(0,ce.t)(r.basis2,e.basis2,bi),(0,ce.t)((0,he.Qj)(r.plane),(0,he.Qj)(e.plane),bi),(0,ce.t)(r.origin,e.origin,t),(0,he.mP)(r.plane,r.plane,r.origin),r},up:hi,updateUnboundedPlane:Jr,wrap:function(e,t,r){const i=yi.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,he.LV)(0,0,0,0),Jr(i),i}},Symbol.toStringTag,{value:"Module"}));var wi=r(97937);function xi(e,t,r=function(e){return{operations:e,value:e.create()}}(e)){return r.operations=e,e.copy(t,r.value),r}const Ci=2**50;function Si(e,t,r,i){return e.operations.setAltitudeAt(e.value,t,r,i)}function Ti(e,t,r){return e.operations.elevate(e.value,t,r.value)}const Ai=(0,S.vt)();function Ii(e){return"point"===e.type}(0,S.vt)();class Pi{constructor(e,t,r,i){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this._coordinateSystem=i,this._tmpCoordinateSystem=function(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}(i),this.referenceEllipsoid=(0,pe.tO)(t),this.sphericalPCPF=(0,Lr.lO)(t)}set extent(e){e&&function(e,t,r){e.operations.setExtent(e.value,t,r.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return e=this._coordinateSystem,t=(0,M.vt)(),e.operations.getExtent(e.value,t),t;var e,t}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,r=e){return Si(this._coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){var r,i,n,s;r=this._coordinateSystem,n=e,(i=t)!==(s=t)&&(0,P.C)(s,i),(0,ce.j)(Ai,s[12],s[13],s[14]),Si(r,Ai,n,Ai),s[12]=Ai[0],s[13]=Ai[1],s[14]=Ai[2]}worldUpAtPosition(e,t){return function(e,t,r){return e.operations.axisAt(e.value,t,2,r)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return function(e,t,r,i){return e.operations.axisAt(e.value,t,r,i)}(this._coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,0,$r.rq.get()),i=this.worldBasisAtPosition(e,1,$r.rq.get()),n=this.worldBasisAtPosition(e,2,$r.rq.get());return(0,P.hZ)(t,r[0],r[1],r[2],0,i[0],i[1],i[2],0,n[0],n[1],n[2],0,0,0,0,1),t}headingAtPosition(e,t){const r=this.worldUpAtPosition(e,$r.rq.get()),i=this.worldBasisAtPosition(e,1,$r.rq.get()),n=(0,Hr.EJ)(t,i,r);return(0,F.KJ)(n)}intersectManifoldClosestSilhouette(e,t,r){return Ti(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,r){e.operations.intersectRayClosestSilhouette(e.value,t,r)}(this._tmpCoordinateSystem,e,r),r}intersectManifold(e,t,r){Ti(this._coordinateSystem,t,this._tmpCoordinateSystem);const i=$r.rq.get();return function(e,t,r){return e.operations.intersectRay(e.value,t,r)}(this._tmpCoordinateSystem,e,i)?(0,ce.d)(r,i):null}intersectInfiniteManifold(e,t,r){if(1===this.viewingMode)return this.intersectManifold(e,t,r);Ti(this._coordinateSystem,t,this._tmpCoordinateSystem);const i=this._tmpCoordinateSystem.value,n=$r.rq.get();return(0,he.Ui)(i.plane,e,n)?(0,ce.d)(r,n):null}toRenderCoords(e,t,r){return Ii(e)?(0,Ur.g)(e,t,this.spatialReference):(0,z.F)(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return Ii(t)?(null!=r&&(t.spatialReference=r),function(e,t,r){return!!(0,z.F)(e,t,qr,r.spatialReference)&&(r.x=qr[0],r.y=qr[1],r.z=qr[2],!0)}(e,this.spatialReference,t)?t:null):(0,z.F)(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case 2:return new Pi(2,t,(0,I.GA)(t),xi(vi,Wr([0,0,0],[Ci,0,0],[0,Ci,0])));case 1:return new Pi(1,t,1,function(e){return xi(wi.s,(0,wi.f)(0,0,0,(0,pe.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,I.KX)(e)/(0,I.KX)(t)}}let Bi=class extends n.nJ{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new ft,this._tileLocks=new at,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null,this._mainThreadDelegate=null,this._viewSpatialReference=null,this._renderCommandContext=null,this._context=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,layerInfo:i,layerViewInfo:n}){const s=f.A.fromJSON(e);this._viewSpatialReference=s;const a=f.A.fromJSON(t);this._fetcher=new Et(this._viewSpatialReference,m.A.fromJSON(i.baseQuery),i.url,i.objectIdField,i.capabilities),this._queryEngine=new p.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:i.objectIdField},fieldsIndex:i.fieldIndex,availableFields:[i.objectIdField],spatialReference:e,featureStore:this._featureStore,timeInfo:i.timeInfo}),this._mainThreadDelegate={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},destroyMaterial:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},destroyDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const i={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",i,{transferList:r})},destroyLodRenderer:async e=>{const t={rendererId:e};await this.remoteClient.invoke("destroyLoDRenderer",t)},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})},setBaseInstance:async(e,t)=>{const r={rendererId:e,baseInstance:t};await this.remoteClient.invoke("setBaseInstance",r,{transferList:null!=t?[t.data]:void 0})}};const l=Pi.create(r,a),c=new jr(r,this._mainThreadDelegate);this._renderCommandContext=c;const u=new He(s,a,this._mainThreadDelegate,l,c,i,n);this._context=u,this._renderer=u.symbolRendererFactory.createSymbolRendererFromJSON(i.renderer),this._defaultQueryJSON=new m.A({outSpatialReference:s}).toJSON();let y=null;if(null!=i.fullExtent){const e=d.A.fromJSON(i.fullExtent);await(0,h.initializeProjection)(e.spatialReference,s),y=(0,h.project)(e,s)}return this._tileManager=new rt({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),tileLocks:this._tileLocks,extent:y}),this.addHandles((0,o.wB)(()=>this.updating,e=>{this.emit("notify-updating",{updating:e})}),o.Vh),null!=this._renderer&&await this._renderer.load(),Mi}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async executeAttributeBinsQuery(e,t){return{result:await this._queryEngine.executeAttributeBinsQuery(e,t)}}onTileTreeChange(e){return this._tileManager.onTileTreeChange(e),Promise.resolve(Mi)}async onElevationChange(e){return Mi}async onLayerViewOpacityChange(e){const{_context:t,_renderer:r}=this;if(t.layerViewInfo.fullOpacity=e,null==r)return Mi;const i=await r.createUpdateLayerViewOpacityCommand(e);return await i.execute(),Mi}async onRendererChange(e){const{_context:t}=this,r=t.symbolRendererFactory.createSymbolRendererFromJSON(e);await r.load();const n=this._renderer;this._renderer=r;const s=[...this._tileManager.loadedTiles()],o=s.map(e=>e.tileId);{const e={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(e,await this._tileLocks.lock(o),!1);const a=s.flatMap(e=>[n.createRemoveCommand(e.id),r.createAddCommand(e)]),l=await Promise.all(a),c=t.joinPipelineCommands(l);await c.execute()}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}const a=await n.createDestroyCommand();return await a.execute(),Mi}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,i=this._renderer;let n;return n=null!=i?await i.createAddCommand(e):g.create(this._renderCommandContext),(0,s.Te)(t),n.appendPipelineStateCommand(()=>{r.addTile(e)}),n}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer;let i;return i=null!=r?await r.createRemoveCommand(e):g.create(this._renderCommandContext),i.appendPipelineStateCommand(()=>{t.removeTile(e)}),i}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer;let i;return i=null!=r?await r.createUpdateVisibilityCommand(e):g.create(this._renderCommandContext),(0,s.Te)(t),i}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,i.Cg)([(0,a.MZ)()],Bi.prototype,"updating",null),Bi=(0,i.Cg)([(0,u.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Bi);const Ei=Bi,Mi={result:void 0}},65215:(e,t,r)=>{r.d(t,{H:()=>i,R:()=>n});class i{constructor(e){this.layerViewUid=e}}class n extends i{constructor(e,t){super(e),this.graphicUid=t}}},65494:(e,t,r)=>{r.d(t,{L:()=>l,r:()=>o});var i=r(67076),n=r(90360),s=r(41214);function o(e,t){return l(e,null,t)}const a=(0,n.C)({types:s.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):a(e,t,r):null}},66208:(e,t,r)=>{r.d(t,{m:()=>n});var i=r(53655);function n(e,t){const r=(0,i.SH)(e,t),n=r.queryResult.featureResult,s=r.queryResult.queryGeometry,o=r.queryResult.queryGeometryType;if(n&&n.features&&n.features.length&&n.objectIdFieldName){const e=n.objectIdFieldName;for(const t of n.features)t.attributes&&(t.objectId=t.attributes[e])}return n&&(n.queryGeometry=s,n.queryGeometryType=o),n}},69418:(e,t,r)=>{r.d(t,{S:()=>c,z:()=>l});var i=r(83047),n=r(21325),s=r(43334),o=r(58512),a=r(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class c{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,n.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,i.G9)(this._options.sourceSpatialReference)/(0,i.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,s.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce((e,t)=>e+t,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.A}}},72385:(e,t,r)=>{function i(){return new Float32Array(3)}function n(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,r){const i=new Float32Array(3);return i[0]=e,i[1]=t,i[2]=r,i}function o(){return i()}function a(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function u(){return s(0,0,1)}r.d(t,{fA:()=>s,o8:()=>n,vt:()=>i});const d=o(),h=a(),f=l(),p=c(),m=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:n,create:i,fromValues:s,ones:a,unitX:l,unitY:c,unitZ:u,zeros:o},Symbol.toStringTag,{value:"Module"}))},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))h.delete(e);h.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const f=await(0,a.xR)(e.expression,null,d);if(!f)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const p=!o||!o.greaterEqual(4,0);p&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new c(r,p);return new l(p,u,f,m)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class c extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},75503:(e,t,r)=>{r.d(t,{EC:()=>T,wq:()=>a});var i=r(4576),n=r(21818),s=(r(44208),r(15142)),o=r(11006);class a{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),x.prune(),C.prune(),S.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const i=this._toBBox;if(_(e,r))for(w.clear();r;){for(let n=0,s=r.children.length;n<s;n++){const s=r.children[n],o=r.leaf?i(s):s;_(e,o)&&(r.leaf?t(s):b(e,o)?l(s,t):w.push(s))}r=w.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],s=t.leaf?r(n):n;if(_(e,s)){if(t.leaf||b(e,s))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),S.clear();r||C.length>0;){if(r||(r=C.pop(),s=C.data[C.length-1],o=S.pop()??0,a=!0),r.leaf&&(t=(0,i.qh)(r.children,(0,n.zI)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),C.push(r),this._condense(C),this;a||r.leaf||!b(r,l)?s?(o++,r=s.children[o],a=!1):r=null:(C.push(r),S.push(o),o=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,i){const n=r-t+1;let s=this._maxEntries;if(n<=s){const i=new I(e.slice(t,r+1));return c(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(s)),s=Math.ceil(n/s**(i-1)));const o=new P([]);o.height=i;const a=Math.ceil(n/s),l=a*Math.ceil(Math.sqrt(s));v(e,t,r,l,this._compareMinX);for(let n=t;n<=r;n+=l){const t=Math.min(n+l-1,r);v(e,n,t,a,this._compareMinY);for(let r=n;r<=t;r+=a){const n=Math.min(r+a-1,t);o.children.push(this._build(e,r,n,i-1))}}return c(o,this._toBBox),o}_insert(e,t,r){const i=this._toBBox,n=r?e:i(e);C.clear();const s=function(e,t,r,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==r;){let r,i=1/0,n=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=p(o),l=y(e,o)-a;l<n?(n=l,i=a<i?a:i,r=o):l===n&&a<i&&(i=a,r=o)}t=r||t.children[0]}return t}(n,this._data,t,C);for(s.children.push(e),d(s,n);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,r){for(let i=r;i>=0;i--)d(t.data[i],e)}(n,C,t)}_split(e,t){const r=e.data[t],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);const s=this._chooseSplitIndex(r,n,i);if(!s)return;const o=r.children.splice(s,r.children.length-s),a=r.leaf?new I(o):new P(o);a.height=r.height,c(r,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let i,n,s;i=n=1/0;for(let o=t;o<=r-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,r,this._toBBox),l=g(t,a),c=p(t)+p(a);l<i?(i=l,s=o,n=c<n?c:n):l===i&&c<n&&(n=c,s=o)}return s}_chooseSplitAxis(e,t,r){const i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,r,i)<this._allDistMargin(e,t,r,n)&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);const n=this._toBBox,s=u(e,0,t,n),o=u(e,r-t,r,n);let a=m(s)+m(o);for(let i=t;i<r-t;i++){const t=e.children[i];d(s,e.leaf?n(t):t),a+=m(s)}for(let i=r-t-1;i>=t;i--){const t=e.children[i];d(o,e.leaf?n(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const n=e.data[t-1],s=n.children;s.splice((0,i.qh)(s,r,s.length,n.indexHint),1)}else this.clear();else c(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(x.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,n.zI)(e));else x.pushArray(r.children);r=x.pop()??null}}function c(e,t){u(e,0,e.children.length,t,e)}function u(e,t,r,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let s,o=t;o<r;o++)s=e.children[o],d(n,e.leaf?i(s):s);return n}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,s-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,r,i,n){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=i)continue;const a=r+Math.ceil((t-r)/i/2)*i;(0,o.q)(e,a,r,t,n),s.push(r,a,a,t)}}const w=new s.A,x=new s.A,C=new s.A,S=new s.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class I extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),n=r(66552),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),l=r(64108);const c=new n.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends s.o{constructor(e){super(e),this.name=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,a.e)(c),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,i.Cg)([(0,l.$)("esri.layers.support.Domain")],u)},77548:(e,t,r)=>{r.d(t,{Gh:()=>y,tk:()=>h,BR:()=>d,wI:()=>u,G$:()=>p,$x:()=>f,Ov:()=>a,W_:()=>l,OP:()=>m,TU:()=>o,XX:()=>s,jy:()=>c});var i=r(70333),n=r(78888);r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function c(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function u(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function h(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function f(e,t){return null}function p(e){return null}function m(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function y(e,t){if(!t||!m(e))return;const r=(e.url,null);r&&(e.url=r)}},79677:(e,t,r)=>{r.d(t,{A:()=>h});var i,n=r(31635),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),c=r(64108),u=r(43937),d=r(98623);let h=class extends s.o{static{i=this}static get allTime(){return f}static get empty(){return p}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let n=this.end;if(n){const r=(0,o.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=r?o=n:t>=n&&t<=s&&(o=t),r>=n&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,e,t,r)),null!=a&&(n.end=(0,o.S1)(a,e,t,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n.Cg)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,n.Cg)([(0,u.K)("end")],h.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n.Cg)([(0,l.w)("start")],h.prototype,"readStart",null),(0,n.Cg)([(0,u.K)("start")],h.prototype,"writeStart",null),h=i=(0,n.Cg)([(0,c.$)("esri.time.TimeExtent")],h);const f=new h,p=new h({start:void 0,end:void 0})},80451:(e,t,r)=>{r.d(t,{rS:()=>p,gK:()=>f}),r(44208);var i,n=r(53177),s=r(76357),o=r(31635),a=(r(53966),r(87811),r(49186),r(93223)),l=r(64108);let c=class extends s.A{static{i=this}constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o.Cg)([(0,a.e)({inherited:"inherited"})],c.prototype,"type",void 0),c=i=(0,o.Cg)([(0,l.$)("esri.layers.support.InheritedDomain")],c);var u,d=r(10107);let h=class extends s.A{static{u=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new u({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],h.prototype,"maxValue",void 0),(0,o.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],h.prototype,"minValue",void 0),(0,o.Cg)([(0,a.e)({range:"range"})],h.prototype,"type",void 0),h=u=(0,o.Cg)([(0,l.$)("esri.layers.support.RangeDomain")],h);const f={key:"type",base:s.A,typeMap:{range:h,"coded-value":n.A,inherited:c}};function p(e){if(!e?.type)return null;switch(e.type){case"range":return h.fromJSON(e);case"codedValue":return n.A.fromJSON(e);case"inherited":return c.fromJSON(e)}return null}},80893:(e,t,r)=>{r.d(t,{IJ:()=>h,Jf:()=>y,Pk:()=>p,eW:()=>d,gW:()=>m,kS:()=>f});var i=r(78888),n=r(84952),s=r(17136),o=r(10536),a=r(66208),l=r(5076),c=r(58501);const u="Layer does not support extent calculation.";async function d(e,t,r,i={},n){const s=t.timeExtent?.isEmpty?{data:{features:[]}}:await b(e,t,"json",i,void 0,n);return(0,c.q)(t,r,s.data),s}async function h(e,t,r,i,n){if(t.timeExtent?.isEmpty)return{data:r.createFeatureResult()};const s=await f(e,t,i,n),o=s;return o.data=(0,a.m)(s.data,r),o}function f(e,t,r={},i){return b(e,t,"pbf",r,void 0,i)}function p(e,t,r={},i){return t.timeExtent?.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",r,{returnIdsOnly:!0},i)}function m(e,t,r={},i){return t.timeExtent?.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},i)}async function y(e,t,r={}){if(t.timeExtent?.isEmpty)return{data:{count:0,extent:null}};const i=await b(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),n=i.data;if(n.hasOwnProperty("extent"))return i;if(n.features)throw new Error(u);if(n.hasOwnProperty("count"))throw new Error(u);return i}function g(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;const r={...e,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function b(e,t,r,a,c={},u={}){const d="string"==typeof e?(0,n.An)(e):e,h=t.geometry?[t.geometry]:[],f=await(0,s.el)(h,null,{signal:a.signal}),p=f?.[0];if(null!=p){const e=t.clone();e.geometry=p.clone(),t=e}const m=(0,o.z)({...d.query,f:r,...g(c,u),...(y=t,b=c,_=u,(0,l.i)(y,b,_))});var y,b,_;return(0,i.A)((0,n.fj)(d.path,function(e,t){return null!=e.formatOf3DObjects&&!(t.returnCountOnly||t.returnExtentOnly||t.returnIdsOnly)}(t,c)?"query3d":"query"),{...a,responseType:"pbf"===r?"array-buffer":"json",query:{...m,...a.query}})}},81961:(e,t,r)=>{r.d(t,{V:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",2,(i,n,s)=>i.setUniform4fv(e,t(n,s),r))}}},87582:(e,t,r)=>{r(6867),r(65215).R},95696:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(31635),s=r(69540),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),c=r(64108);let u=class extends((0,s.OU)(o.o)){static{i=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new i}};(0,n.Cg)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=i=(0,n.Cg)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},96576:(e,t,r)=>{r.d(t,{A:()=>h});var i,n=r(31635),s=r(4718),o=r(10107),a=(r(44208),r(53966),r(93223)),l=r(64108),c=r(92438),u=r(63988),d=r(49849);let h=i=class extends((0,u.h)(c.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,s.o8)(this.symbol),visualVariables:(0,s.o8)(this.visualVariables),authoringInfo:(0,s.o8)(this.authoringInfo)})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"label",void 0),(0,n.Cg)([(0,o.MZ)(d.Wp)],h.prototype,"symbol",void 0),(0,n.Cg)([(0,a.e)({simple:"simple"})],h.prototype,"type",void 0),h=i=(0,n.Cg)([(0,l.$)("esri.renderers.SimpleRenderer")],h)},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
|
|
316
|
+
}`)}},64183:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ei});var i=r(31635),n=r(65529),s=r(74887),o=r(36708),a=r(10107),l=r(44208),c=r(53966),u=(r(87811),r(64108)),d=r(5443),h=r(91218),f=r(16930),p=r(56390),m=r(61956),y=r(65494);class g{constructor(e,t,r){this.renderCommandContext=e,this.renderCommandBuffer=t,this.pipelineStateCommands=r}append(e){this.appendRenderCommands(e.renderCommandBuffer),this.appendPipelineStateCommands(e.pipelineStateCommands)}appendRenderCommands(e){this.renderCommandBuffer.commands.push(...e.commands),this.renderCommandBuffer.transferList.push(...e.transferList)}appendPipelineStateCommand(e){this.pipelineStateCommands.push(e)}appendPipelineStateCommands(e){for(const t of e)this.appendPipelineStateCommand(t)}async execute(){for(const e of this.pipelineStateCommands)e();await this.renderCommandContext.dispatchRenderCommands(this.renderCommandBuffer)}static create(e,t=[]){return new g(e,e.createRenderCommandBuffer(),t)}}var b=r(68197),_=r(18574),v=r(87403),w=r(28975);function x(){return new _.A({material:new w.N({color:new b.A("red")})})}var C=r(9093),S=r(51850),T=r(91829),A=r(6847),I=r(83047),P=r(58083),B=r(87317),E=r(70328),M=r(19419);r(12359),r(95108),r(27615),r(52106),r(4718),r(34275),r(65864);var O=r(37585),R=r(48163),F=r(34727),D=r(26857);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const j=[];{const e=16;for(let t=0;t<360;t+=360/e)j.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}Object.freeze({left:0,center:.5,right:1});const V=Object.freeze({"bottom-left":(0,R.fA)(0,0),bottom:(0,R.fA)(.5,0),"bottom-right":(0,R.fA)(1,0),left:(0,R.fA)(0,.5),center:(0,R.fA)(.5,.5),right:(0,R.fA)(1,.5),"top-left":(0,R.fA)(0,1),top:(0,R.fA)(.5,1),"top-right":(0,R.fA)(1,1)});var k=r(9762),z=r(27993);function L(e){const{featureCount:t}=e;if(0===t)return new Uint32Array;const r=new Uint32Array(t);return e.getObjectIdsArray(r),r}function U(e){const{featureCount:t}=e;if(0===t)return new Float64Array;const r=new Float64Array(3*t);return e.getCoordinatesArray(r),r}function q(e,t){const r=t.viewSpatialReference,i=t.renderSpatialReference,{extent:n}=e,s=(0,M.gX)(n),o=(0,S.vt)();return(0,z.F)([s[0],s[1],0],r,o,i),o}var N=r(97146);function G(e){const t=new Map;for(const[r,i]of e)t.set(r,{...i,indices:(0,N.Dg)(i.indices)});return t}r(48833);var H=r(63907);const $=(0,T.CN)(.25,.25,.75,.75);function Y(e){return"cross"===e||"x"===e}function Z(e,t=128,r=.5*t,i=0){switch(e){case"circle":default:return function(e,t){const r=e/2-.5;return K(e,J(r,r,t/2))}(t,r);case"square":return function(e,t){return X(e,t,!1)}(t,r);case"cross":return function(e,t,r=0){return W(e,t,!1,r)}(t,r,i);case"x":return function(e,t,r=0){return W(e,t,!0,r)}(t,r,i);case"kite":return function(e,t){return X(e,t,!0)}(t,r);case"triangle":return function(e,t){return K(e,Q(e/2,t,t/2))}(t,r);case"arrow":return function(e,t){const r=t,i=t/2,n=e/2,s=.8*r,o=J(n,(e-t)/2-s,Math.sqrt(s*s+i*i)),a=Q(n,r,i);return K(e,(e,t)=>Math.max(a(e,t),-o(e,t)))}(t,r)}}function X(e,t,r){return r&&(t/=Math.SQRT2),K(e,(i,n)=>{let s=i-.5*e+.25,o=.5*e-n-.75;if(r){const e=(s+o)/Math.SQRT2;o=(o-s)/Math.SQRT2,s=e}return Math.max(Math.abs(s),Math.abs(o))-.5*t})}function W(e,t,r,i=0){t-=i,r&&(t*=Math.SQRT2);const n=.5*t;return K(e,(t,s)=>{let o,a=t-.5*e,l=.5*e-s-1;if(r){const e=(a+l)/Math.SQRT2;l=(l-a)/Math.SQRT2,a=e}return a=Math.abs(a),l=Math.abs(l),o=a>l?a>n?Math.sqrt((a-n)*(a-n)+l*l):l:l>n?Math.sqrt(a*a+(l-n)*(l-n)):a,o-=i/2,o})}function J(e,t,r){return(i,n)=>{const s=i-e,o=n-t;return Math.sqrt(s*s+o*o)-r}}function Q(e,t,r){const i=Math.sqrt(t*t+r*r);return(n,s)=>{const o=Math.abs(n-e)-r,a=s-e+t/2+.75,l=(t*o+r*a)/i,c=-a;return Math.max(l,c)}}function K(e,t){const r=new Float32Array(e*e);for(let i=0;i<e;i++)for(let n=0;n<e;n++)r[n+e*i]=t(n,i)/e;return r}var ee=r(46610);class te{constructor(e,t){this._context=null,this._symbolLayer=null,this._draped=!1,this._loaded=!1,this._loadingPromise=null,this._iconTextureID=null,this._materialId=null,this._context=t,this._symbolLayer=e}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}_destroy(){this._iconTextureID=null}async _load(){const e=this._context.renderCommandContext,t=await e.createTexture(()=>function(e,t=128,r=.5*t,i=0){return{data:Z(e,t,r,i),parameters:{mipmap:!1,wrap:{s:33071,t:33071},width:t,height:t,noUnpackFlip:!0,dataType:H.ld.FLOAT,pixelFormat:6403,internalFormat:H.H0.R16F,reloadable:!0}}}("circle"));this._iconTextureID=t;const r={anchorPosition:V.center,occlusionTest:!0,hasSlicePlane:!1,color:this._getFillColor(),outlineColor:this._getOutlineColor(),outlineSize:1,distanceFieldBoundingBox:$,textureId:t,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:Y("circle")},i=new Uint8Array(8),n=255;i[0]=0,i[1]=0,i[2]=0,i[3]=n,i[4]=n,i[5]=0,i[6]=n,i[7]=n,this._materialId=await e.createMaterial({type:"hud",parameters:r}),await e.createDirectRenderer(this._materialId),await e.setBaseInstance(this._materialId,{data:i.buffer,elementCount:4}),this._loaded=!0}async createAddCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r;if(null==t)throw new Error("expected material not to be null");const n=await this._createGeometry(e);if(null==n)return r.createPipelineCommand();const s=q(e,r);return r.createPipelineCommand(i.addDirectRendererGeometry(e.id,n,s,!0))}async _createGeometry(e){const{_materialId:t,_context:r}=this,{mainThreadDelegate:i}=r,{featureCount:n}=e;if(0===n||null==t)return null;const s=L(e),o=U(e),a=function(e,t){const r=e.length/3,i=t.viewSpatialReference,n=t.renderSpatialReference,s=new Float64Array(3*r);if(!(0,k.projectBuffer)(e,i,0,s,n,0,r))throw new Error("Failed to project coordinates");return s}(await i.applyElevationAlignmentTo(o),r),l=new Float64Array([0,0,1]),c=new Float64Array([255,255,255,255]),u=new Float64Array([24,24]),d=new Float64Array([0,0,0,1]),h=new Float64Array([0]),f=new Uint32Array(n);for(let e=0;e<n;++e)f[e]=e;const p=new Uint32Array(n);for(let e=0;e<n;++e)p[e]=0;const m=[["position",new ee.n(a,f,3,!0)],["normal",new ee.n(l,p,3,!0)],["color",new ee.n(c,p,4,!0)],["rotation",new ee.n(h,p,1,!0)],["size",new ee.n(u,p,2,!0)],["centerOffsetAndDistance",new ee.n(d,p,4,!0)]],y=new Uint8Array(n);return e.getVisibilityArray(y),{attributes:G(m),olidColor:void 0,transformation:(0,C.vt)(),materialId:t,objectIds:s,visibilities:y}}async createRemoveCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;return null==t?r.createPipelineCommand():r.createPipelineCommand(i.removeDirectRendererGeometryBuffer(t,e))}async createUpdateVisibilityCommand(e){const{_materialId:t,_context:r}=this,i=r.renderCommandContext;if(null==t)return r.createPipelineCommand();const n=new Uint8Array(e.featureCount);return e.getVisibilityArray(n),r.createPipelineCommand(i.updateVisibility(t,e.id,n))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_materialId:r}=this,i=t.renderCommandContext;return null==r?t.createPipelineCommand():t.createPipelineCommand(i.updateMaterial({type:"hud",materialId:r,parameters:{color:this._getFillColor(),outlineColor:this._getOutlineColor()}}))}async createUpdateElevationCommand(e){const{_materialId:t,_context:r}=this,{renderCommandContext:i}=r,{featureCount:n,id:s}=e;if(null==t||0===n)return r.createPipelineCommand();const o=await this._createGeometry(e);if(null==o)return r.createPipelineCommand();const a=q(e,r);return r.createPipelineCommand(i.updateDirectRendererGeometry(s,o,a,!0))}async createDestroyCommand(){const{_iconTextureID:e,_context:t}=this,r=t.renderCommandContext;let i;return i=null!=e?await r.releaseTexture(e):g.create(r),i.appendPipelineStateCommand(()=>this._destroy()),i}_getOutlineColor(){const e=this._getLayerOpacity(),t=this._symbolLayer,r=t?.outline?.color;if(null!=r){const t=b.A.toUnitRGB(r),i=r.a*e;return[t[0],t[1],t[2],i]}return[0,0,0,0]}_getFillColor(){if(function(e){return null!=e&&("cross"===e||"x"===e)}(this._getPrimitive()))return ie;const e=null==this._getPrimitive(),t=this._symbolLayer?.material?.color;return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}_getCombinedOpacity(e,t=re){const r=this._draped?1:this._getLayerOpacity();return e?r*e.a:t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(e,t=re){const r=this._getCombinedOpacity(e,t);return function(e,t,r=null){const i=(0,T.o8)(T.Un);return null!=e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2],e.length>3&&(i[3]=e[3])),null!=t&&(i[3]=t),r&&(0,B.c)(i,i,r),i}(null!=e?b.A.toUnitRGB(e):S.Un,r)}_getPrimitive(){return e=this._symbolLayer,e.resource?.href?null:e.resource?.primitive??A.r;var e}}const re={hasIntrinsicColor:!1},ie=T.uY;class ne{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._context=null,this._symbol=null,this._symbolLayerRenderers=[],this._context=t,this._symbol=e}_destroy(){}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_context:e,_symbol:t,_symbolLayerRenderers:r}=this,i=[];for(const n of t.symbolLayers){const t=e.symbolRendererFactory.createSymbolRendererFromSymbolLayer(n);null!=t&&(i.push(t.load()),r.push(t))}await Promise.all(i),this._loaded=!0}async createDestroyCommand(){const{_context:e,_symbolLayerRenderers:t}=this,r=[];for(const e of t)r.push(e.createDestroyCommand());const i=e.joinPipelineCommands(await Promise.all(r));return i.appendPipelineStateCommand(()=>this._destroy()),i}async createAddCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createAddCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createRemoveCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createRemoveCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateVisibilityCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateVisibilityCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateLayerViewOpacityCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateLayerViewOpacityCommand(e));return t.joinPipelineCommands(await Promise.all(i))}async createUpdateElevationCommand(e){const{_context:t,_symbolLayerRenderers:r}=this,i=[];for(const t of r)i.push(t.createUpdateElevationCommand(e));return t.joinPipelineCommands(await Promise.all(i))}}class se{constructor(e,t){this._symbol=null,this._featureData=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_renderer:e,_context:t}=this;this._symbol=t.symbolRendererFactory.createSymbolRendererFromSymbol(e.symbol),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,r=await this._provisionSymbol(),i=null==r?t.createPipelineCommand():await r.createAddCommand(e);return i.appendPipelineStateCommand(()=>this._featureData.set(e.id,e)),i}async createRemoveCommand(e){const t=this._context,r=await this._provisionSymbol(),i=null==r?t.createPipelineCommand():await r.createRemoveCommand(e);return i.appendPipelineStateCommand(()=>this._featureData.delete(e)),i}async createUpdateVisibilityCommand(e){const t=this._context,r=await this._provisionSymbol();return null==r?t.createPipelineCommand():await r.createUpdateVisibilityCommand(e)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,r=await this._provisionSymbol();return null==r?t.createPipelineCommand():await r.createUpdateLayerViewOpacityCommand(e)}async createUpdateElevationCommand(){const{_featureData:e,_context:t}=this,r=await this._provisionSymbol();if(null==r)return t.createPipelineCommand();const i=[];for(const t of e.values())i.push(r.createUpdateElevationCommand(t));const n=await Promise.all(i);return t.joinPipelineCommands(n)}async createDestroyCommand(){const{_symbol:e,_context:t,_featureData:r}=this;if(!e)return t.createPipelineCommand();const i=[];for(const e of r.keys())i.push(this.createRemoveCommand(e));i.push(e.createDestroyCommand());const n=await Promise.all(i);return t.joinPipelineCommands(n)}async _provisionSymbol(){const e=this._symbol;return e?(e.loaded||await e.load(),e):null}}var oe=r(48353),ae=r(30809),le=r(8887),ce=r(38954),ue=r(72385),de=(r(4197),r(11868)),he=r(27921),fe=r(71351),pe=r(73941);function me(e,t){const r=e[t],i=e[t+1],n=e[t+2];return Math.sqrt(r*r+i*i+n*n)}function ye(e,t){const r=e[t],i=e[t+1],n=e[t+2],s=1/Math.sqrt(r*r+i*i+n*n);e[t]*=s,e[t+1]*=s,e[t+2]*=s}function ge(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r}r(37539),r(20498),r(87170),(0,R.vt)(),(0,R.vt)();var be=r(620);r(78754);const _e=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)_e[6*e+t]=e;const ve=new Array(36);for(let e=0;e<6;e++)ve[6*e]=0,ve[6*e+1]=1,ve[6*e+2]=2,ve[6*e+3]=2,ve[6*e+4]=3,ve[6*e+5]=0;const we=(0,ue.fA)(-.5,0,-.5),xe=(0,ue.fA)(.5,0,-.5),Ce=(0,ue.fA)(0,0,.5),Se=(0,ue.fA)(0,.5,0),Te=(0,ue.vt)(),Ae=(0,ue.vt)(),Ie=(0,ue.vt)(),Pe=(0,ue.vt)(),Be=(0,ue.vt)();(0,ce.e)(Te,we,Se),(0,ce.e)(Ae,we,xe),(0,ce.i)(Ie,Te,Ae),(0,ce.n)(Ie,Ie),(0,ce.e)(Te,xe,Se),(0,ce.e)(Ae,xe,Ce),(0,ce.i)(Pe,Te,Ae),(0,ce.n)(Pe,Pe),(0,ce.e)(Te,Ce,Se),(0,ce.e)(Ae,Ce,we),(0,ce.i)(Be,Te,Ae),(0,ce.n)(Be,Be),Ie[0],Ie[1],Ie[2],Pe[0],Pe[1],Pe[2],Be[0],Be[1],Be[2],(0,S.vt)();var Ee=r(4576),Me=r(69397);r(6867),r(87582);var Oe=r(57917);function Re(e,t){const r=(e,r,i=!1)=>({levels:e.map(e=>{const n=G(r(e.tesselation));return i&&function(e){const t=e,r=t.get("position").data,i=t.get("normal").data;if(i){const t=Fe(e,"normal").data;for(let e=0;e<i.length;e+=3){const r=i[e+1];t[e+1]=-i[e+2],t[e+2]=r}}if(r){const t=Fe(e,"position").data;for(let e=0;e<r.length;e+=3){const i=r[e+1];t[e+1]=-r[e+2],t[e+2]=i}}}(n),{components:[{attributes:n,olidColor:void 0,transformation:null,materialId:t,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:e.minScreenSpaceRadius}})});switch(e){case"cone":return r(De,e=>function(e,t,r,i,n=!0,s=!0){let o=0;const a=t,l=e;let c=(0,ue.fA)(0,o,0),u=(0,ue.fA)(0,o+l,0),d=(0,ue.fA)(0,-1,0),h=(0,ue.fA)(0,1,0);i&&(o=l,u=(0,ue.fA)(0,0,0),c=(0,ue.fA)(0,o,0),d=(0,ue.fA)(0,1,0),h=(0,ue.fA)(0,-1,0));const f=[u,c],p=[d,h],m=r+2,y=Math.sqrt(l*l+a*a);if(i)for(let e=r-1;e>=0;e--){const t=e*(2*Math.PI/r),i=(0,ue.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(i);const n=(0,ue.fA)(l*Math.cos(t)/y,-a/y,l*Math.sin(t)/y);p.push(n)}else for(let e=0;e<r;e++){const t=e*(2*Math.PI/r),i=(0,ue.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(i);const n=(0,ue.fA)(l*Math.cos(t)/y,a/y,l*Math.sin(t)/y);p.push(n)}const g=new Array,b=new Array;if(n){for(let e=3;e<f.length;e++)g.push(1),g.push(e-1),g.push(e),b.push(0),b.push(0),b.push(0);g.push(f.length-1),g.push(2),g.push(1),b.push(0),b.push(0),b.push(0)}if(s){for(let e=3;e<f.length;e++)g.push(e),g.push(e-1),g.push(0),b.push(e),b.push(e-1),b.push(1);g.push(0),g.push(2),g.push(f.length-1),b.push(1),b.push(2),b.push(p.length-1)}const _=(0,de.oe)(3*m);for(let e=0;e<m;e++)_[3*e]=f[e][0],_[3*e+1]=f[e][1],_[3*e+2]=f[e][2];const v=(0,de.oe)(3*m);for(let e=0;e<m;e++)v[3*e]=p[e][0],v[3*e+1]=p[e][1],v[3*e+2]=p[e][2];return[["position",new ee.n(_,g,3,!0)],["normal",new ee.n(v,b,3,!0)]]}(1,.5,e,!1),!0);case"sphere":return r([{tesselation:0,minScreenSpaceRadius:0},{tesselation:1,minScreenSpaceRadius:8},{tesselation:2,minScreenSpaceRadius:16},{tesselation:3,minScreenSpaceRadius:50},{tesselation:4,minScreenSpaceRadius:250}],e=>function(e,t,r){const i=e;let n,s;if(r)n=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],s=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const e=i*(1+Math.sqrt(5))/2;n=[-i,e,0,i,e,0,-i,-e,0,i,-e,0,0,-i,e,0,i,e,0,-i,-e,0,i,-e,e,0,-i,e,0,i,-e,0,-i,-e,0,i],s=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let t=0;t<n.length;t+=3)ge(n,t,e/me(n,t));let o={};function a(t,r){t>r&&([t,r]=[r,t]);const i=t.toString()+"."+r.toString();if(o[i])return o[i];let s=n.length;return n.length+=3,function(e,t,r,i,n,s=t){(n=n||e)[s]=e[t]+r[i],n[s+1]=e[t+1]+r[i+1],n[s+2]=e[t+2]+r[i+2]}(n,3*t,n,3*r,n,s),ge(n,s,e/me(n,s)),s/=3,o[i]=s,s}for(let e=0;e<t;e++){const e=s.length,t=new Array(4*e);for(let r=0;r<e;r+=3){const e=s[r],i=s[r+1],n=s[r+2],o=a(e,i),l=a(i,n),c=a(n,e),u=4*r;t[u]=e,t[u+1]=o,t[u+2]=c,t[u+3]=i,t[u+4]=l,t[u+5]=o,t[u+6]=n,t[u+7]=c,t[u+8]=l,t[u+9]=o,t[u+10]=l,t[u+11]=c}s=t,o={}}const l=(0,de.Wz)(n);for(let e=0;e<l.length;e+=3)ye(l,e);return[["position",new ee.n((0,de.Wz)(n),s,3,!0)],["normal",new ee.n(l,s,3,!0)]]}(.5,e,!0));case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function Fe(e,t){let r=e.get(t);return r&&!r.exclusive&&(r={...r,exclusive:!0,data:(0,Oe.S)(r.data)},e.set(t,r)),r}const De=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];var je=r(2495),Ve=r(74810);class ke{constructor(e,t){this._loaded=!1,this._loadingPromise=null,this._primitiveMaterialId=null,this._lodRendererId=null,this._context=null,this._symbolLayer=null,this._primitive=null,this._context=t,this._symbolLayer=e}_destroy(){this._lodRendererId=null,this._primitiveMaterialId=null}get loaded(){return this._loaded}get _isPrimitive(){return null!=this._primitive}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext,t=this._getLayerOpacity();let r={usePBR:!0,isSchematic:!0,mrrFactors:Ve.Bt,ambient:S.Un,diffuse:S.Un,hasSlicePlane:!1,castShadows:!0,layerOpacity:t,offsetTransparentBackfaces:!1,screenSizePerspective:{}};if(r.externalColor=T.Un,r.instanced=!0,this._isPrimitive){const e=new je.fs;e.layerOpacity=t,r={...r,cullFace:ze((0,je.ty)(e))}}const i=await e.createMaterial({type:"default",parameters:r}),n=this._symbolLayer.resource;this._primitive=n&&function(e){switch(e){case"sphere":case"cube":case"diamond":case"cylinder":case"cone":case"inverted-cone":case"tetrahedron":return!0}return!1}(n?.primitive)?n.primitive:ae.r;const s=Re(this._primitive,i);this._lodRendererId=await e.createLodRenderer(s),this._primitiveMaterialId=i,this._loaded=!0}async createDestroyCommand(){const{_lodRendererId:e,_primitiveMaterialId:t,_context:r}=this,i=r.renderCommandContext,n=[];return null!=e&&n.push(i.destroyLodRenderer(e)),null!=t&&n.push(i.destroyMaterial(t)),new g(i,i.mergeRenderCommandBuffers(n),[()=>this._destroy()])}async createAddCommand(e){const t=this._context,{renderCommandContext:r,mainThreadDelegate:i}=t;if(null==this._lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:n}=e;if(0===n)return t.createPipelineCommand();const s=this._isPrimitive,o=this._primitive||ae.r,a=(0,E.vt)((0,le.Fq)(o)),l=(0,S.ci)((0,E.Ej)(a)),c=(0,S.ci)((0,le.Bb)(l,{isPrimitive:s,width:100,depth:null,height:null})),u=new Float64Array(16*n),d=new Float64Array(16*n),h=U(e),f=await i.applyElevationAlignmentTo(h);for(let e=0;e<n;++e){const t=e,r=f[3*e+0],i=f[3*e+1],n=f[3*e+2],s=this._computeGlobalTransform(r,i,n,this._context.viewSpatialReference,qe),o=this._computeLocalTransform(c,l,Ue);this._writeMatrixToTypedBuffer(u,t,o),this._writeMatrixToTypedBuffer(d,t,s)}const p=L(e),m=new Uint8Array(n);e.getVisibilityArray(m);const y={featureIds:new Uint32Array(p),visibility:m,localTransforms:u,globalTransforms:d};return t.createPipelineCommand(r.addLodInstances(this._lodRendererId,e.id,y))}async createRemoveCommand(e){const{_context:t,_lodRendererId:r}=this,i=t.renderCommandContext;return null==r?t.createPipelineCommand():t.createPipelineCommand(i.removeLodInstances(r,e))}async createUpdateVisibilityCommand(e){const{_lodRendererId:t,_context:r}=this,i=r.renderCommandContext;if(null==t)return r.createPipelineCommand();const n=new Uint8Array(e.featureCount);return e.getVisibilityArray(n),r.createPipelineCommand(i.updateVisibility(t,e.id,n))}async createUpdateLayerViewOpacityCommand(e){const{_context:t}=this,r=t.renderCommandContext,i=this._primitiveMaterialId;if(null==i)return t.createPipelineCommand();const n=this._getLayerOpacity();let s={layerOpacity:n};if(this._isPrimitive){const e=new je.fs;e.layerOpacity=n,s={...s,cullFace:ze((0,je.ty)(e))}}return t.createPipelineCommand(r.updateMaterial({type:"default",materialId:i,parameters:s}))}async createUpdateElevationCommand(e){const{_context:t,_lodRendererId:r}=this,{renderCommandContext:i,mainThreadDelegate:n}=t,{featureCount:s,id:o}=e;if(null==r||0===s)return t.createPipelineCommand();const a=new Float64Array(16*s),l=U(e),c=await n.applyElevationAlignmentTo(l);for(let e=0;e<s;++e){const t=e,r=c[3*e+0],i=c[3*e+1],n=c[3*e+2],s=this._computeGlobalTransform(r,i,n,this._context.viewSpatialReference,qe);this._writeMatrixToTypedBuffer(a,t,s)}return t.createPipelineCommand(i.updateLodInstancesData(r,o,a))}_writeMatrixToTypedBuffer(e,t,r){let i=16*t;for(let t=0;t<16;t++)e[i++]=r[t]}_computeGlobalTransform(e,t,r,i,n){return Le[0]=e,Le[1]=t,Le[2]=r,(0,oe.l)(i,Le,n,this._context.renderSpatialReference),n}_computeLocalTransform(e,t,r){return(0,P.D_)(r),this._applyObjectScale(e,t,r),r}_applyObjectScale(e,t,r){const i=function(e=S.Un,t,r,i=1){const n=new Array(3);if(null==t||null==r)n[0]=1,n[1]=1,n[2]=1;else{let i,s=0;for(let o=2;o>=0;o--){const a=e[o],l=null!=a,c=0===o&&!i&&!l,u=r[o];let d;"symbol-value"===a||c?d=0!==u?t[o]/u:1:l&&"proportional"!==a&&isFinite(a)&&(d=0!==u?a/u:1),null!=d&&(n[o]=d,i=d,s=Math.max(s,Math.abs(d)))}for(let e=2;e>=0;e--)null==n[e]?n[e]=i:0===n[e]&&(n[e]=.001*s)}for(let e=2;e>=0;e--)n[e]/=i;return(0,S.ci)(n)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===i[0]&&1===i[1]&&1===i[2]||(0,P.hs)(r,r,i)}_getLayerOpacity(){return this._context.layerViewInfo.fullOpacity}}function ze(e){return e?0:2}const Le=(0,S.vt)(),Ue=(0,C.vt)(),qe=(0,C.vt)();class Ne{constructor(e,t){this._symbols=new Array,this._featureDataPartitioning=new Map,this._loaded=!1,this._loadingPromise=null,this._renderer=null,this._context=t,this._renderer=e}async load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){this._symbols[0]=new te(x(),this._context),this._symbols[1]=new ke(new v.A,this._context),this._loaded=!0}get loaded(){return this._loaded}async createAddCommand(e){const t=this._context,r=this._partition(e),i=await Promise.all(r.map(async({index:e,features:t})=>{const r=await this._provisionSymbol(e);return await(r?.createAddCommand(t))})),n=t.joinPipelineCommands(i);return n.appendPipelineStateCommand(()=>this._featureDataPartitioning.set(e.id,r)),n}async createRemoveCommand(e){const{_featureDataPartitioning:t,_context:r}=this,i=r.renderCommandContext,n=t.get(e);if(null==n)return new g(i,i.createRenderCommandBuffer(),[]);const s=await Promise.all(n.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createRemoveCommand(t.id))})),o=r.joinPipelineCommands(s);return o.appendPipelineStateCommand(()=>t.delete(e)),o}async createUpdateVisibilityCommand(e){const{_featureDataPartitioning:t,_context:r}=this,i=r.renderCommandContext,n=t.get(e.id);if(null==n)return new g(i,i.createRenderCommandBuffer(),[]);const s=await Promise.all(n.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateVisibilityCommand(t))}));return r.joinPipelineCommands(s)}async createUpdateLayerViewOpacityCommand(e){const t=this._context,r=[];for(let t=0;t<this._symbols.length;++t){const i=this._symbols[t];null!=i&&i.loaded&&r.push(i.createUpdateLayerViewOpacityCommand(e))}const i=await Promise.all(r);return t.joinPipelineCommands(i)}async createUpdateElevationCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=[];for(const t of e.values()){const e=t.map(async({index:e,features:t})=>{const r=this._getLoadedSymbol(e);return await(r?.createUpdateElevationCommand(t))});r.push(...e)}const i=await Promise.all(r);return t.joinPipelineCommands(i)}async createDestroyCommand(){const{_featureDataPartitioning:e,_context:t}=this,r=[];for(const t of e.keys())r.push(this.createRemoveCommand(t));for(const e of this._symbols)r.push(e.createDestroyCommand());const i=await Promise.all(r);return t.joinPipelineCommands(i)}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=L(e);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:r}=e,i=[[],[]];for(let e=0;e<r;++e)i[t[e]%2].push(e);return i.map((t,r)=>new Ge(r,e.subset(new Uint32Array(t)))).filter(e=>e.features.featureCount>0)}}class Ge{constructor(e,t){this.index=e,this.features=t}}class He{constructor(e,t,r,i,n,s,o){this.viewSpatialReference=e,this.renderSpatialReference=t,this.mainThreadDelegate=r,this.renderCoordsHelper=i,this.renderCommandContext=n,this.layerInfo=s,this.layerViewInfo=o,this.symbolRendererFactory=new $e(this)}createPipelineCommand(e=this.renderCommandContext.createRenderCommandBuffer(),t=[]){return new g(this.renderCommandContext,e,t)}joinPipelineCommands(e){return 0===e.length?this.createPipelineCommand():e.filter(e=>null!=e).reduce((e,t)=>(e.append(t),e))}}class $e{constructor(e){this.context=e}createSymbolRendererFromJSON(e){const t=(0,y.L)(e??Ye)??void 0;if(!t)throw new Error("Failed to create renderer");const r=t.type;switch(r){case"simple":return new se(t,this.context);case"unique-value":return new Ne(t,this.context);default:return console.warn(`Unable to create symbolrenderer for renderer of ${r}`),this.createSymbolRendererFromJSON(Ye)}}createSymbolRendererFromSymbol(e){const t=e?.type;switch(t){case"point-3d":return new ne(e,this.context);case"picture-marker":case"simple-marker":return new te(x(),this.context);default:return console.warn(`Unable to create symbolrenderer for symbol of ${t}`),null}}createSymbolRendererFromSymbolLayer(e){const t=e.type;return"icon"===t?new te(e,this.context):(console.warn(`Unable to create symbolrenderer for symbolLayer of ${t}`),null)}}const Ye={type:"simple"};var Ze=r(69622),Xe=r(60999),We=r(32587),Je=r(76030),Qe=r(24326);function Ke(e=""){return`${e}${(0,Qe.c)()}`}new Float64Array(3);class et{constructor(e,t){this._parent=e,this._subsetIndices=t,this.id=Ke(`featureDataSubset-${e.id}-`)}get tileId(){return this._parent.tileId}get extent(){return this._parent.extent}get featureCount(){return this._subsetIndices.length}get usedMemory(){return this._parent.usedMemory+Me.qK+this._subsetIndices.byteLength}get isFullyEnabled(){for(const e of this._subsetIndices)if(!this._parent.getEnabled(e))return!1;return!0}getObjectId(e){return this._parent.getObjectId(this._subsetIndices[e])}getAttribute(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributeAsTimestamp(e,t){return this._parent.getAttribute(this._subsetIndices[e],t)}getAttributes(e){return this._parent.getAttributes(this._subsetIndices[e])}getCoordinates(e,t,r){return this._parent.getCoordinates(this._subsetIndices[e],t,r)}getOptimizedGeometry(e){return this._parent.getOptimizedGeometry(this._subsetIndices[e])}getCentroid(e,t){return this._parent.getCentroid(this._subsetIndices[e],t)}getBounds(e){return this._parent.getBounds(this._subsetIndices[e])}getBoundingBox(e){return this._parent.getBoundingBox(this._subsetIndices[e])}getObjectIdsArray(e,t,r){return this._parent.getObjectIdsArray(e,this._translatedIndices(t),r)}getCoordinatesArray(e,t,r){return this._parent.getCoordinatesArray(e,this._translatedIndices(t),r)}objectIds(e){return this._parent.objectIds(this._translatedIndices(e))}subset(e){const{_subsetIndices:t}=this,r=new Uint32Array(e.length);for(let i=0;i<r.length;++i)r[i]=t[e[i]];return new et(this._parent,r)}disableObjectIds(e){if(0===e.size)return;const{featureCount:t}=this,r=new Array;for(let i=0;i<t;++i)this.getEnabled(i)&&e.has(this.getObjectId(i))&&r.push(i);if(0!==r.length)for(const e of r)this.setEnabled(e,!1)}setEnabled(e,t){this._parent.setEnabled(this._subsetIndices[e],t)}getEnabled(e){return this._parent.getEnabled(this._subsetIndices[e])}enableAll(){const{_subsetIndices:e,_parent:t}=this;for(const r of e)t.setEnabled(r,!0)}getVisibilityArray(e,t,r){return this._parent.getVisibilityArray(e,this._translatedIndices(t),r)}enabledObjectIds(e){return this._parent.enabledObjectIds(this._translatedIndices(e))}*_translatedIndices(e){const{_subsetIndices:t}=this;if(null!=e)for(const r of e)yield t[r];else yield*t}}class tt{constructor(e){this._tile=e,this.id=Ke(`featureData-${e.id}-`),this._enabled=new Array(e.featureCount).fill(!0)}get tileId(){return this._tile.id}get featureCount(){return this._tile.featureCount}get usedMemory(){return Me.qK+(0,Me.$B)(this.id)}get extent(){return this._tile.descriptor.extent}get isFullyEnabled(){return this._enabled.every(e=>e)}getObjectId(e){return this._tile.getObjectId(e)}getAttribute(e,t){return this._tile.getAttribute(e,t)}getAttributeAsTimestamp(e,t){return this._tile.getAttribute(e,t)}getAttributes(e){return this._tile.getAttributes(e)}getCoordinates(e,t,r){return this._tile.getCoordinates(e,t,r)}getOptimizedGeometry(e){return this._tile.getOptimizedGeometry(e)}getCentroid(e,t){return this._tile.getCentroid(e,t)}getBounds(e){return this._tile.getBounds(e)}getBoundingBox(e){return this._tile.getBoundingBox(e)}getObjectIdsArray(e,t,r){return this._tile.getObjectIdsArray(e,t,r)}getCoordinatesArray(e,t,r){return this._tile.getCoordinatesArray(e,t,r)}objectIds(e){return this._tile.objectIds(e)}subset(e){return new et(this,e)}disableObjectIds(e){if(0===e.size)return;const{_enabled:t}=this,r=new Array;for(const i of this._allFeatureIndices())t[i]&&e.has(this.getObjectId(i))&&r.push(i);if(0!==r.length)for(const e of r)t[e]=!1}setEnabled(e,t){this._enabled[e]=t}getEnabled(e){return this._enabled[e]}enableAll(){this._enabled.fill(!0)}getVisibilityArray(e,t=this._allFeatureIndices(),r=0){const{_enabled:i}=this;for(const n of t)e[r++]=Number(i[n]);return r}*enabledObjectIds(e=this._allFeatureIndices()){const{_enabled:t}=this;for(const r of e)t[r]&&(yield this.getObjectId(r))}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}}let rt=class extends Ze.A{constructor(e){super(e),this.extent=null,this._tileHandles=new We.A,this._wanted=new We.A,this._updateRequested=!1,this._synchronizationTask=null,this._requestedTiles=new Array}destroy(){this._tileHandles.clear(),this._wanted.clear()}get updating(){return this._updateRequested||!(this._synchronizationTask?.finished??1)}get _boundingRect(){const{extent:e}=this;return null==e?null:(0,M.VY)(e)}get _missingTiles(){const e=new Array,t=this._wanted,r=this._tileHandles;for(const i of t.values())null==r.get(i.id)?.featureData&&e.push(i);return e}onTileTreeChange({tiles:e}){this._requestedTiles=e,this._scheduleTilesSync()}_scheduleTilesSync(){if(this._updateRequested)return;this._updateRequested=!0;const e=this._synchronizationTask,t=(0,Xe.UT)(async()=>{try{await(0,o.C_)(()=>e?.finished??!0),await(0,Je.NO)(),this._updateRequested=!1,await this._synchronizeTiles()}finally{this._synchronizationTask===t&&(this._synchronizationTask=null)}});this._synchronizationTask=t}async _synchronizeTiles(){const e=this._requestedTiles,t=this._tileHandles,r=new Array;for(const i of e)t.has(i.id)||r.push(i);const i=new Array;for(const r of t.values()){const{id:t}=r;e.every(e=>e.id!==t)&&i.push(r.descriptor)}const n=this._tileHandles,{_boundingRect:s}=this,o=null!=s?r.filter(e=>!e.extent||(0,M.HY)(s,e.extent)):r,a=this._wanted,l=new Array;for(const{id:e}of i)a.delete(e);for(const e of o)a.set(e.id,e);const c=this._missingTiles;for(const e of i){const{id:t}=e;if(c.some(t=>it(t,e)||it(e,t)))continue;const r=n.get(t);null!=r&&l.push(this._removeTile(r))}for(const e of o)l.push(this._addTile(e));const u=await Promise.allSettled(l);for(const e of u)"rejected"===e.status&&console.error(e.reason)}forEachTile(e){for(const t of this._tileHandles.values()){const r=t.featureData;null!=r&&e(r)}}*loadedTiles(){for(const e of this._tileHandles.values()){const t=e.featureData;null!=t&&(yield t)}}async _removeTile(e){e.loadTask.abort(),this._tileHandles.delete(e.id),this._validate();const{featureData:t}=e;if(null!=t){const e={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(e,await this.tileLocks.lock([t.tileId]),!1);const r=await this.createRemoveCommand(t.id);await(r?.execute())}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}}async _addTile(e){const{_tileHandles:t}=this,r=t.get(e.id);if(null!=r){if(!st(r)||r.featureData.isFullyEnabled)return;return r.featureData.enableAll(),void await this._onTileLoad(r)}const i=new nt(e,(0,Xe.UT)(async t=>{const r=await this.loadTile(e,t);return(0,s.Te)(t),new tt(r)}));this._tileHandles.set(i.id,i);try{await i.loadTask.promise}catch(e){return void(0,s.jH)(e)}(function(e){if(!st(e))throw new Error})(i),await this._onTileLoad(i)}async _onTileLoad(e){const t={stack:[],error:void 0,hasError:!1};try{const{_wanted:r,_tileHandles:n,_missingTiles:s}=this,o=e.descriptor,a=new Array,l=new Array,c=new Array,u=new Set;for(const t of n.values()){if(t===e)continue;const{descriptor:i,id:c}=t;if(!r.has(c)&&!s.some(e=>it(e,i)||it(i,e))){n.delete(c),t.loadTask.abort();const{featureData:e}=t;null!=e&&a.push(e);continue}if(st(t)){if(it(o,i)){const e=t.featureData;for(const t of e.objectIds())u.add(t)}if(it(i,o)){const{featureData:e}=t;l.push(e)}}}u.size>0&&(e.featureData.disableObjectIds(u),this._validateRemoval(e.featureData,u)),this._validate(),c.push(e.featureData);const d=[...c,...a,...l].map(e=>e.tileId);if((0,i.mS)(t,await this.tileLocks.lock(d),!1),0!==l.length){const t=e.featureData,r=new Set(t.objectIds());for(const e of l)e.disableObjectIds(r),this._validateRemoval(e,r)}const h=a.map(e=>this.createRemoveCommand(e.id)),f=c.map(e=>this.createAddCommand(e)),p=l.map(e=>this.createUpdateCommand(e)),m=function(e){return 0===e.length?null:e.reduce((e,t)=>(e.append(t),e))}((await Promise.all([...h,...f,...p])).filter(Ee.Ru));await(m?.execute())}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}_validate(){if(!(0,l.A)("feature-pipeline-3d-test-validation"))return;const e=new Array;for(const t of this._tileHandles.values()){if(!st(t))continue;const{featureData:r}=t;e.push({featureData:r,objectIds:new Set(r.enabledObjectIds())})}for(let t=0;t<e.length;++t){const{featureData:r,objectIds:i}=e[t];for(let n=t+1;n<e.length;++n){const{featureData:t,objectIds:s}=e[n];for(const e of s)if(i.has(e))throw new Error(`${r.id} and ${t.id} both contain ${e}.`)}}}_validateRemoval(e,t){if((0,l.A)("feature-pipeline-3d-test-validation"))for(const r of e.enabledObjectIds())if(t.has(r))throw new Error(`Failed to remove ${r} from ${e.id}!`)}};function it({lij:[e,t,r]},{lij:[i,n,s]}){const o=i-e;return o>=0&&t===n>>o&&r===s>>o}(0,i.Cg)([(0,a.MZ)()],rt.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],rt.prototype,"loadTile",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],rt.prototype,"createAddCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],rt.prototype,"createRemoveCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],rt.prototype,"createUpdateCommand",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],rt.prototype,"tileLocks",void 0),(0,i.Cg)([(0,a.MZ)()],rt.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)()],rt.prototype,"_boundingRect",null),(0,i.Cg)([(0,a.MZ)()],rt.prototype,"_missingTiles",null),(0,i.Cg)([(0,a.MZ)()],rt.prototype,"_updateRequested",void 0),(0,i.Cg)([(0,a.MZ)()],rt.prototype,"_synchronizationTask",void 0),rt=(0,i.Cg)([(0,u.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],rt);class nt{constructor(e,t){this.descriptor=e,this.loadTask=t}get id(){return this.descriptor.id}get featureData(){return this.loadTask.value}}function st(e){return null!=e.featureData}var ot=r(36563);class at{constructor(){this._previousActions=new Map}async lock(e){const{_previousActions:t}=this,r=e.map(e=>t.get(e)).filter(Ee.Ru),i=Promise.allSettled(r),n=(0,s.Tw)(),o=(0,ot.hA)(()=>n.resolve()),a=n.promise.finally(()=>{for(const r of e)t.get(r)===a&&t.delete(r)});for(const r of e)t.set(r,a);return await i,(0,ot.Bf)(o)}}var lt=r(75503),ct=r(27647);class ut{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return Me.qK+Me.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new dt(this._index,this._view,e)}}class dt extends ut{constructor(e,t,r){super(e,t),this._geometryOverride=r}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,ct.Q)(this._geometryOverride)}}class ht{constructor(e,t){this.featureData=e,this.bounds=t}}class ft{constructor(){this._tileBounds=new Map,this.events=new n.bk,this.featureAdapter=pt.shared}get usedMemory(){return Me.qK+Me.qK*this._tileBounds.size}addTile(e){const{featureCount:t}=e;if(0===t)return;const r=new lt.wq(9,t=>e.getBounds(t)),i=new Array;for(let e=0;e<t;++e)i[e]=e;r.load(i),this._tileBounds.set(e.id,new ht(e,r)),this.events.emit("changed")}removeTile(e){this._tileBounds.delete(e),this.events.emit("changed")}clear(){this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const{featureData:t,bounds:r}of this._tileBounds.values())r.all(r=>{t.getEnabled(r)&&e(new ut(r,t))})}forEachInBounds(e,t){mt.minX=e[0],mt.minY=e[1],mt.maxX=e[2],mt.maxY=e[3];for(const{featureData:e,bounds:r}of this._tileBounds.values())r.search(mt,r=>{e.getEnabled(r)&&t(new ut(r,e))})}forEachBounds(e,t){for(const r of e)t(r.getBoundingBox())}getFullExtent(e){let t=1/0,r=1/0,i=-1/0,n=-1/0;for(const{bounds:e}of this._tileBounds.values()){const{minX:s,minY:o,maxX:a,maxY:l}=e.toJSON();t=Math.min(t,s),r=Math.min(r,o),i=Math.min(i,a),n=Math.min(n,l)}return{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:e}}}class pt{static{this.shared=new pt}getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}const mt=new lt.EC;var yt=r(80893);class gt{constructor(e,t,r){this.descriptor=e,this._pages=t,this._pageSize=r;const i=Me.ez+t.reduce((e,{usedMemory:t})=>e+t,0),n=3*Me.RS;this.usedMemory=Me.qK+i+n,this.featureCount=t.reduce((e,t)=>e+t.featureCount,0)}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getObjectId(r)}getAttribute(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getAttribute(i,t)}getAttributeAsTimestamp(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getAttributeAsTimestamp(i,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getAttributes(r)}getCoordinates(e,t,r){const{pageIndex:i,featurePageIndex:n}=this._translateIndex(e);this._pages[i].getCoordinates(n,t,r)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(r)}getCentroid(e,t){const{pageIndex:r,featurePageIndex:i}=this._translateIndex(e);return this._pages[r].getCentroid(i,t)}getBounds(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBounds(r)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:r}=this._translateIndex(e);return this._pages[t].getBoundingBox(r)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){let i=r;for(const{page:r,indices:n}of this._batchPageIndices(t))i=r.getObjectIdsArray(e,n,i);return i}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){let i=r;for(const{page:r,indices:n}of this._batchPageIndices(t))i=r.getCoordinatesArray(e,n,i);return i}*objectIds(e=this._allFeatureIndices()){for(const{page:t,indices:r}of this._batchPageIndices(e))for(const e of t.objectIds(r))yield e}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}*_batchPageIndices(e){const t=new Array;{let r=0,i=new Array;for(const n of e){const{pageIndex:e,featurePageIndex:s}=this._translateIndex(n);r!==e&&(0!==i.length&&t.push({pageIndex:r,indices:i}),r=e,i=[]),i.push(s)}0!==i.length&&t.push({pageIndex:r,indices:i})}const{_pages:r}=this;for(const{pageIndex:e,indices:i}of t)yield{page:r[e],indices:i}}}var bt=r(49186),_t=r(51624),vt=r(62577),wt=r(92722),xt=r(95466),Ct=r(53655);class St{constructor(e){this._reader=new _t.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return Tt(e.getMessage());e.skip()}It()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:r,attributeIndices:i}}=this,n=r.get(t)?.index;if(null==n)return;const s=i[e*r.fields.length+n],o=this._reader;return o.move(s),Pt(o)}getAttributeAsTimestamp(e,t){const r=this.getAttribute(e,t);return"string"==typeof r?new Date(r).getTime():"number"==typeof r||null==r?r:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:r}}=this,i=e*t.fields.length,n=this._reader,s={};for(const e of t.fields){const t=r[i+e.index];n.move(t),s[e.name]=Pt(n)}return s}getCoordinates(e,t,r=0){const i=this._reader,{transform:n,featureIndices:s}=this._index,{scale:o,translate:a}=n;i.move(s[e]),this._readCoordinates(o,a,t,r)}getOptimizedGeometry(e){const t=(0,S.vt)();return this.getCoordinates(e,t),new wt.A([],t,!0,!1)}getCentroid(e,{hasZ:t,hasM:r}){this.getCoordinates(e,Bt);const[i,n,s]=Bt,o=[i,n];return t&&(o[3]=s),r&&(o[t?4:3]=0),new wt.A([],o,t,r)}getBounds(e){this.getCoordinates(e,Bt);const[t,r]=Bt,i=new lt.EC;return i.minX=t,i.minY=r,i.maxX=t,i.maxY=r,i}getBoundingBox(e){this.getCoordinates(e,Bt);const[t,r,i]=Bt;return(0,E.fA)(t,r,i,t,r,i)}getObjectIdsArray(e,t=this._allFeatureIndices(),r=0){const i=this._reader,{objectIdFieldName:n,attributeIndices:s,fieldsIndex:o}=this._index,a=o.get(n).index,l=o.fields.length;for(const n of t){const t=s[n*l+a];i.move(t),e[r++]=Pt(i)}return r}getCoordinatesArray(e,t=this._allFeatureIndices(),r=0){const i=this._reader,{transform:n,featureIndices:s}=this._index,{scale:o,translate:a}=n;for(const n of t){const t=s[n];i.move(t),r=this._readCoordinates(o,a,e,r)}return r}*objectIds(e=this._allFeatureIndices()){const t=this._reader,{objectIdFieldName:r,attributeIndices:i,fieldsIndex:n}=this._index,s=n.get(r).index,o=n.fields.length;for(const r of e){const e=i[r*o+s];t.move(e),yield Pt(t)}}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,r],[i,n,s],o,a){const l=this._reader,c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),u=l.pos()+c;for(;l.pos()<u&&l.next();)3===l.tag()?(l.getUInt32(),o[a++]=i+e*l.getSInt64(),o[a++]=n+t*l.getSInt64(),o[a++]=s+r*l.getSInt64()):l.skip();break}default:l.skip()}return a}}function Tt(e){for(;e.next();){if(1===e.tag())return At(e.getMessage());e.skip()}It()}function At(e){let t,r,i=!1,n=!1,s=0;const o=new Array,a=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:r=e.getString();break;case 7:0!==e.getEnum()&&It();break;case 9:i=e.getBool()??!1;break;case 12:t=(0,vt.Q1)(e.processMessage(Ct.ae));break;case 13:{const t=e.processMessage(Ct.cn);t.index=s++,o.push(t);break}case 15:{a.push(e.pos());const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:n=e.getBool()??!1;break;default:e.skip()}const c=new xt.A(o);return null!=t&&n&&null!=r&&c.has(r)||It(),{transform:t,exceededTransferLimit:i,fieldsIndex:c,objectIdFieldName:r,featureIndices:a,attributeIndices:l}}function It(){const e=new bt.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function Pt(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const Bt=(0,S.vt)();class Et{constructor(e,t,r,i,n){this.spatialReference=e,this.url=r,this.objectIdField=i,this.capabilities=n;const{supportsMaxRecordCountFactor:s,maxRecordCount:o}=this.capabilities.query,a=s?4:1,l=(o??8e3)*a;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=a,c.num=this._pageSize,c.outFields=[i],this._baseQuery=c}async fetch(e,t){const{spatialReference:r,_pageSize:i}=this,n=(0,M.w1)(e.extent,r),o=this._baseQuery.clone();o.geometry=n;const a=new Array;let l=0,c=!1,u=1;for(;!c;){const e=[];for(let r=0;r<u;++r)e.push(this._fetchPage(o,l++,t));const r=await Promise.all(e);(0,s.Te)(t);for(const e of r){const t=0!==e.featureCount;c||=!e.exceededTransferLimit||!t,t&&a.push(e)}u=Math.min(u+1,4)}return new gt(e,a,i)}async _fetchPage(e,t,r){const i=e.clone();i.start=t*this._pageSize;const n=(await(0,yt.kS)(this.url,i,{signal:r})).data;return(0,s.Te)(r),new St(n)}}var Mt=r(29920),Ot=r(77690),Rt=r(29242);var Ft=r(13030),Dt=r(78662),jt=r(49255),Vt=r(40268),kt=r(25634),zt=r(11725),Lt=r(77194),Ut=r(59907),qt=r(43616),Nt=r(13259),Gt=r(4431),Ht=r(1843),$t=r(97220),Yt=r(98958),Zt=r(16943),Xt=r(33524),Wt=r(90644),Jt=r(85079);class Qt extends Yt.w{constructor(e,t){super(e,t,new $t.$(Nt.H,()=>r.e(8241).then(r.bind(r,48241))),(0,Jt._u)([er,ir()].map(Gt.U))),this.primitiveType=t.occlusionPass?H.WR.POINTS:H.WR.TRIANGLE_STRIP}initializePipeline(e){const{oitPass:t,hasPolygonOffset:r,draped:i,output:n,depthTestEnabled:s,occlusionPass:o}=e,a=s&&!i&&!(1===t)&&!o&&!(9===n);return(0,Wt.Ey)({blending:(0,jt.RN)(n)?(0,Xt.Yf)(t,!0):null,depthTest:s&&!i?{func:515}:null,depthWrite:a?Wt.Uy:null,drawBuffers:(0,Xt.m6)(t,n),colorWrite:Wt.kn,polygonOffset:r?Kt:null})}}const Kt={factor:0,units:-4},er=(0,Ht.BP)().vec2u8("uv0",{glNormalized:!0}),tr=(0,Ht.BP)().vec3f("position").vec3f("normal").vec4i16("uvi").vec4u8("color").vec2f("size").f32("rotation").vec4f("centerOffsetAndDistance").vec4f("featureAttribute"),rr=tr.clone().vec4u8("olidColor");function ir(){return(0,Zt.E)()?rr:tr}var nr=r(51976),sr=r(35256);class or extends sr.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.olidColorInstanced=!1,this.textureCoordinateType=0,this.emissionSource=0,this.discardInvisibleFragments=!0,this.hasVVInstancing=!1,this.snowCover=!1}}(0,i.Cg)([(0,nr.W)()],or.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"occlusionTestEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"signedDistanceFieldEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasVVSize",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasVVColor",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasVerticalOffset",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasScreenSizePerspective",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasRotation",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"debugDrawLabelBorder",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"hasPolygonOffset",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"depthTestEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"pixelSnappingEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"draped",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"terrainDepthTest",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"cullAboveTerrain",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"occlusionPass",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"occludedFragmentFade",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"horizonCullingEnabled",void 0),(0,i.Cg)([(0,nr.W)()],or.prototype,"isFocused",void 0);var ar=r(49788);class lr extends zt.i{constructor(e,t){super(e,Or),this.produces=new Map([[13,e=>(0,jt.Mb)(e)&&!this.parameters.drawAsLabel],[14,e=>(0,jt.Mb)(e)&&this.parameters.drawAsLabel],[12,()=>this.parameters.occlusionTest],[18,e=>this.parameters.draped&&(0,jt.Mb)(e)]]),this._visible=!0,this._configuration=new or(t)}getConfiguration(e,t){const r=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=r,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.hasVVSize=!!this.parameters.vvSize,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.occlusionPass=12===t.slot,this._configuration.occludedFragmentFade=!r&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||12===t.slot,(0,jt.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!D.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,r,i,n,s){const{options:{selectionMode:o,hud:a,excludeLabels:l},point:c,camera:u}=r,{parameters:d}=this;if(!o||!a||l&&d.isLabel||!e.visible||!c||!u)return;const h=e.attributes.get("featureAttribute"),f=null==h?null:(0,T.ci)(h.data,Ar),{scaleX:p,scaleY:m}=Fr(f,d,u.pixelRatio);(0,Ot.z0)(vr,t),e.attributes.has("featureAttribute")&&function(e){const t=e[0],r=e[1],i=e[2],n=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],u=1/Math.sqrt(t*t+r*r+i*i),d=1/Math.sqrt(n*n+s*s+o*o),h=1/Math.sqrt(a*a+l*l+c*c);e[0]=t*u,e[1]=r*u,e[2]=i*u,e[3]=n*d,e[4]=s*d,e[5]=o*d,e[6]=a*h,e[7]=l*h,e[8]=c*h}(vr);const y=e.attributes.get("position"),g=e.attributes.get("size"),b=e.attributes.get("normal"),_=e.attributes.get("rotation"),v=e.attributes.get("centerOffsetAndDistance");(0,be.vA)(y.size>=3);const w=(0,Nt.c)(d),x="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<y.data.length/y.size;e++){const i=e*y.size;(0,ce.j)(fr,y.data[i],y.data[i+1],y.data[i+2]),(0,ce.t)(fr,fr,t),(0,ce.t)(fr,fr,u.viewMatrix);const n=e*v.size;if((0,ce.j)(Sr,v.data[n],v.data[n+1],v.data[n+2]),!x&&(fr[0]+=Sr[0],fr[1]+=Sr[1],0!==Sr[2])){const e=Sr[2];(0,ce.n)(Sr,fr),(0,ce.e)(fr,fr,(0,ce.h)(Sr,Sr,e))}const o=e*b.size;if((0,ce.j)(pr,b.data[o],b.data[o+1],b.data[o+2]),ur(pr,vr,u,Ir),Dr(this.parameters,fr,Ir,u,hr),u.applyProjection(fr,mr),mr[0]>-1){x&&(Sr[0]||Sr[1])&&(mr[0]+=Sr[0]*u.pixelRatio,0!==Sr[1]&&(mr[1]+=hr.alignmentEvaluator.apply(Sr[1])*u.pixelRatio),u.unapplyProjection(mr,fr)),mr[0]+=this.parameters.screenOffset[0]*u.pixelRatio,mr[1]+=this.parameters.screenOffset[1]*u.pixelRatio,mr[0]=Math.floor(mr[0]),mr[1]=Math.floor(mr[1]);const t=e*g.size;Er[0]=g.data[t],Er[1]=g.data[t+1],hr.evaluator.applyVec2(Er,Er);const i=Pr*u.pixelRatio;let n=0;d.textureIsSignedDistanceField&&(n=Math.min(d.outlineSize,.5*Er[0])*u.pixelRatio/2),Er[0]*=p,Er[1]*=m;const o=e*_.size,a=d.rotation+_.data[o];if(dr(c,mr[0],mr[1],Er,i,n,a,d,w)){const e=r.ray;if((0,ce.t)(gr,fr,(0,P.B8)(xr,u.viewMatrix)),mr[0]=c[0],mr[1]=c[1],u.unprojectFromRenderScreen(mr,fr)){const t=(0,S.vt)();(0,ce.d)(t,e.direction);const r=1/(0,ce.b)(t);(0,ce.h)(t,t,r),s((0,ce.k)(e.origin,fr)*r,t,-1,gr)}}}}}intersectDraped(e,t,r,i,n){const s=e.attributes.get("position"),o=e.attributes.get("size"),a=e.attributes.get("rotation"),l=this.parameters,c=(0,Nt.c)(l),u=e.attributes.get("featureAttribute"),d=null==u?null:(0,T.ci)(u.data,Ar),{scaleX:h,scaleY:f}=Fr(d,l,e.screenToWorldRatio),p=Br*e.screenToWorldRatio;for(let t=0;t<s.data.length/s.size;t++){const u=t*s.size,d=s.data[u],m=s.data[u+1],y=t*o.size;Er[0]=o.data[y],Er[1]=o.data[y+1];let g=0;l.textureIsSignedDistanceField&&(g=Math.min(l.outlineSize,.5*Er[0])*e.screenToWorldRatio/2),Er[0]*=h,Er[1]*=f;const b=t*a.size,_=l.rotation+a.data[b];dr(r,d,m,Er,p,g,_,l,c)&&i(n.distance,n.normal,-1)}}createBufferWriter(){return new Rr}applyShaderOffsetsView(e,t,r,i,n,s,o){const a=ur(t,r,n,Ir);return this._applyVerticalGroundOffsetView(e,a,n,o),Dr(this.parameters,o,a,n,s),this._applyPolygonOffsetView(o,a,i[3],n,o),this._applyCenterOffsetView(o,i,o),o}applyShaderOffsetsNDC(e,t,r,i,n){return this._applyCenterOffsetNDC(e,t,r,i),null!=n&&(0,ce.d)(n,i),this._applyPolygonOffsetNDC(i,t,r,i),i}_applyPolygonOffsetView(e,t,r,i,n){const s=i.aboveGround?1:-1;let o=Math.sign(r);0===o&&(o=s);const a=s*o;if(this.parameters.shaderPolygonOffset<=0)return(0,ce.d)(n,e);const l=(0,F.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/i.viewport[2];return(0,ce.h)(n,e,a>0?c:1/c),n}_applyVerticalGroundOffsetView(e,t,r,i){const n=(0,ce.b)(e),s=r.aboveGround?1:-1,o=r.computeRenderPixelSizeAtDist(n)*Vt.R,a=(0,ce.h)(fr,t.normal,s*o);return(0,ce.g)(i,e,a),i}_applyCenterOffsetView(e,t,r){const i="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,ce.d)(r,e),i&&(r[0]+=t[0],r[1]+=t[1],t[2]&&((0,ce.n)(pr,r),(0,ce.a)(r,r,(0,ce.h)(pr,pr,t[2])))),r}_applyCenterOffsetNDC(e,t,r,i){const n="screen"!==this.parameters.centerOffsetUnits;return i!==e&&(0,ce.d)(i,e),n||(i[0]+=t[0]/r.fullWidth*2,i[1]+=t[1]/r.fullHeight*2),i}_applyPolygonOffsetNDC(e,t,r,i){const n=this.parameters.shaderPolygonOffset;if(e!==i&&(0,ce.d)(i,e),n){const e=r.aboveGround?1:-1,s=e*Math.sign(t[3]);i[2]-=(s||e)*n}return i}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:r}=this.parameters,i=e[3]>=ar.Q||t>=ar.Q&&r[3]>=ar.Q;return this._visible&&i}createGLMaterial(e){return new cr(e)}calculateRelativeScreenBounds(e,t,r=(0,M.vt)()){return function(e,t,r,i){i[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*r,i[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*r}(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class cr extends kt.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(Qt,e)}}function ur(e,t,r,i){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,Ot.z0)(wr,t)),(0,ce.o)(i.normal,e,t),(0,ce.t)(i.normal,i.normal,r.viewInverseTransposeMatrix),i.cosAngle=(0,ce.f)(yr,Mr),i}function dr(e,t,r,i,n,s,o,a,l){let c=t-n-i[0]*l[0],u=c+i[0]+2*n,d=r-n-i[1]*l[1],h=d+i[1]+2*n;const f=a.distanceFieldBoundingBox;return a.textureIsSignedDistanceField&&null!=f&&(c+=i[0]*f[0],d+=i[1]*f[1],u-=i[0]*(1-f[2]),h-=i[1]*(1-f[3]),c-=s,u+=s,d-=s,h+=s),(0,O.hZ)(_r,t,r),(0,O.e$)(br,e,_r,(0,F.kU)(o)),br[0]>c&&br[0]<u&&br[1]>d&&br[1]<h}const hr=new Lt.fc,fr=(0,S.vt)(),pr=(0,S.vt)(),mr=(0,T.vt)(),yr=(0,S.vt)(),gr=(0,S.vt)(),br=(0,R.vt)(),_r=(0,R.vt)(),vr=(0,Rt.vt)(),wr=(0,Rt.vt)(),xr=(0,C.vt)(),Cr=(0,T.vt)(),Sr=(0,S.vt)(),Tr=(0,S.vt)(),Ar=(0,T.vt)(),Ir={normal:yr,cosAngle:0},Pr=1,Br=2,Er=(0,R.fA)(0,0),Mr=(0,S.fA)(0,0,1);class Or extends kt.NV{constructor(){super(...arguments),this.renderOccluded=1,this.isDecoration=!1,this.color=(0,T.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,R.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,T.CN)(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=(0,T.vt)(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusStyle="bright",this.draped=!1,this.isLabel=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class Rr{constructor(){this.layout=er,this.instanceLayout=ir()}elementCount(e){return e.get("position").indices.length}elementCountBaseInstance(e){return e.get("uv0").indices.length}write(e,t,r,i,n,s){const{position:o,normal:a,color:l,size:c,rotation:u,centerOffsetAndDistance:d,featureAttribute:h,uvi:f}=n;(0,Ut.Hk)(r.get("position"),e,o,s),(0,Ut.p1)(r.get("normal"),t,a,s);const p=r.get("position").indices.length;let m=0,y=0,g=Nt.f,b=Nt.f;const _=r.get("uvi")?.data;_&&_.length>=4&&(m=_[0],y=_[1],g=_[2],b=_[3]);for(let e=0;e<p;++e){const t=s+e;f.setValues(t,m,y,g,b)}if((0,Ut.tb)(r.get("color"),4,l,s),(0,Ut.Ue)(r.get("size"),c,s),(0,Ut.uO)(r.get("rotation"),u,s),r.get("centerOffsetAndDistance")?(0,Ut.Ut)(r.get("centerOffsetAndDistance"),d,s):(0,Ut.Pq)(d,s,p),r.get("featureAttribute")?(0,Ut.Ut)(r.get("featureAttribute"),h,s):(0,Ut.Pq)(h,s,p),null!=i){const e=r.get("position")?.indices;if(e){const t=e.length,r=n.getField("olidColor",Ft.XP);(0,Ut.vx)(i,r,t,s)}}return{numVerticesPerItem:1,numItems:p}}writeBaseInstance(e,t){const{uv0:r}=t;(0,Ut.Ue)(e.get("uv0"),r,0)}intersect(e,t,r,i,n,s,o){const{options:{selectionMode:a,hud:l,excludeLabels:c},point:u,camera:d}=i;if(!a||!l||c&&t.isLabel||!u)return;const h=this.instanceLayout.createView(e),{position:f,normal:p,rotation:m,size:y,featureAttribute:g,centerOffsetAndDistance:b}=h,_="screen"===t.centerOffsetUnits,v=(0,Nt.c)(t);if(null==f||null==p||null==m||null==y||null==b||null==d)return;const w=null==g?null:g.getVec(0,Ar),{scaleX:x,scaleY:C}=Fr(w,t,d.pixelRatio),T=f.count;for(let e=0;e<T;e++){if(f.getVec(e,fr),null!=r&&(0,ce.g)(fr,fr,r),(0,ce.t)(fr,fr,d.viewMatrix),b.getVec(e,Cr),(0,ce.j)(Sr,Cr[0],Cr[1],Cr[2]),!_&&(fr[0]+=Sr[0],fr[1]+=Sr[1],0!==Sr[2])){const e=Sr[2];(0,ce.n)(Sr,fr),(0,ce.e)(fr,fr,(0,ce.h)(Sr,Sr,e))}if(p.getVec(e,pr),ur(pr,vr,d,Ir),Dr(t,fr,Ir,d,hr),d.applyProjection(fr,mr),mr[0]>-1){_&&(Sr[0]||Sr[1])&&(mr[0]+=Sr[0]*d.pixelRatio,0!==Sr[1]&&(mr[1]+=hr.alignmentEvaluator.apply(Sr[1])*d.pixelRatio),d.unapplyProjection(mr,fr)),mr[0]+=t.screenOffset[0]*d.pixelRatio,mr[1]+=t.screenOffset[1]*d.pixelRatio,mr[0]=Math.floor(mr[0]),mr[1]=Math.floor(mr[1]),y.getVec(e,Er),hr.evaluator.applyVec2(Er,Er);const r=Pr*d.pixelRatio;let n=0;t.textureIsSignedDistanceField&&(n=Math.min(t.outlineSize,.5*Er[0])*d.pixelRatio/2),Er[0]*=x,Er[1]*=C;const s=m.get(e),a=t.rotation+s;if(dr(u,mr[0],mr[1],Er,r,n,a,t,v)){const t=i.ray;if((0,ce.t)(gr,fr,(0,P.B8)(xr,d.viewMatrix)),mr[0]=u[0],mr[1]=u[1],d.unprojectFromRenderScreen(mr,fr)){const r=(0,S.vt)();(0,ce.d)(r,t.direction);const i=1/(0,ce.b)(r);(0,ce.h)(r,r,i),o((0,ce.k)(t.origin,fr)*i,r,e,gr)}}}}}}function Fr(e,t,r){return null==e||null==t.vvSize?{scaleX:r,scaleY:r}:((0,Dt.VC)(Tr,t,e),{scaleX:Tr[0]*r,scaleY:Tr[1]*r})}function Dr(e,t,r,i,n){if(!e.verticalOffset?.screenLength){const i=(0,ce.b)(t);return n.update(r.cosAngle,i,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),t}const s=(0,ce.b)(t),o=e.screenSizePerspectiveAlignment??e.screenSizePerspective,a=(0,qt.kE)(i,s,e.verticalOffset,r.cosAngle,o,e.screenSizePerspectiveMinPixelReferenceSize);return n.update(r.cosAngle,s,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),(0,ce.h)(r.normal,r.normal,a),(0,ce.g)(t,t,r.normal)}class jr{constructor(e,t){this._mainThreadDelegate=t,this._bufferWriters=new Map,this.globalViewingMode=1===e}createRenderCommandBuffer(e=[],t=[]){return{commands:e,transferList:t}}mergeRenderCommandBuffers(e){const t=this.createRenderCommandBuffer();for(const r of e)null!=r&&(t.commands.push(...r.commands),t.transferList.push(...r.transferList));return t}async createTexture(e){const{data:t,parameters:r}=e();return await this._mainThreadDelegate.createTexture(t,r)}async releaseTexture(e){const t=this._destroyTexture(e);return new g(this,t,[])}_destroyTexture(e){return{commands:[{id:"destroy-texture",textureId:e}],transferList:[]}}async createMaterial(e){const{type:t,parameters:r}=e,i=Ke("material");let n,s;switch(t){case"default":n=new je.$U(e.parameters,{spherical:this.globalViewingMode}),s={type:t,materialId:i,parameters:e.parameters};break;case"hud":n=new lr(r,this.globalViewingMode),s={type:t,materialId:i,parameters:e.parameters}}return this._bufferWriters.set(i,n.createBufferWriter()),await this._mainThreadDelegate.createMaterial(s),i}destroyMaterial(e){return{commands:[{id:"destroy-material",materialId:e}],transferList:[]}}updateMaterial(e){return{commands:[{...e,id:"update-material"}],transferList:[]}}async createDirectRenderer(e){return await this._mainThreadDelegate.createDirectRenderer(e),e}async destroyDirectRenderer(e){await this._mainThreadDelegate.destroyDirectRenderer(e)}addDirectRendererGeometry(e,t,r,i){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:s,renderGeometryBufferItems:o}=this.createRenderGeometryBuffer(t,r,i);return this.addDirectRendererGeometryBuffer(n,e,s,o,r)}updateDirectRendererGeometry(e,t,r,i){const{materialId:n}=t;if(null==this._bufferWriters.get(n))throw new Error(`no bufferwriter found for material ${n}`);const{renderGeometryBuffer:s,renderGeometryBufferItems:o}=this.createRenderGeometryBuffer(t,r,i);return this.updateDirectRendererGeometryBuffer(n,e,s,o,r)}addDirectRendererGeometryBuffer(e,t,r,i,n){const{objectIds:s,visibilities:o}=i;return{commands:[{id:"add-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:i,localOrigin:n}],transferList:[r.data,s.buffer,o.buffer]}}updateDirectRendererGeometryBuffer(e,t,r,i,n){const{objectIds:s,visibilities:o}=i;return{commands:[{id:"update-direct-renderer-geometry-buffer",rendererId:e,groupId:t,renderGeometryBuffer:r,renderGeometryBufferItems:i,localOrigin:n}],transferList:[r.data,s.buffer,o.buffer]}}removeDirectRendererGeometryBuffer(e,t){return{commands:[{id:"remove-direct-renderer-geometry-buffer",rendererId:e,groupId:t}],transferList:[]}}async createLodRenderer(e){const t=Ke("lod-renderer"),r=new Set,i={levels:e.levels.map(e=>({components:e.components.map(e=>{const t=e.attributes.get("position");if(!t||0===t.indices.length)throw new Error("positions attribute expected");const i=(0,N.tM)(t.indices.length/3),n=new Mt.j(i,3,t);if(null==this._bufferWriters.get(e.materialId))throw new Error("writer not found");const{renderGeometryBuffer:s}=this.createRenderGeometryBuffer(e,null);return r.add(s.data),{materialId:e.materialId,renderGeometryBuffer:s,boundingInfo:{bbMax:n.bbMax,bbMin:n.bbMin}}}),minScreenSpaceRadius:e.minScreenSpaceRadius}))};return await this._mainThreadDelegate.createLodRenderer(t,i,Array.from(r)),t}destroyLodRenderer(e){return{commands:[{id:"destroy-lod-renderer",rendererId:e}],transferList:[]}}addLodInstances(e,t,r){return{commands:[{id:"add-lod-instances",rendererId:e,groupId:t,data:r}],transferList:[r.featureIds.buffer,r.globalTransforms.buffer,r.localTransforms.buffer,r.visibility.buffer]}}removeLodInstances(e,t){return{commands:[{id:"remove-lod-instances",rendererId:e,groupId:t}],transferList:[]}}updateLodInstancesData(e,t,r){return{commands:[{id:"update-lod-instance-data",rendererId:e,groupId:t,globalTransforms:r}],transferList:[r.buffer]}}updateVisibility(e,t,r){return{commands:[{id:"update-visibility",rendererId:e,groupId:t,visibility:r}],transferList:[r.buffer]}}async dispatchRenderCommands(e){0!==e.commands.length&&await this._mainThreadDelegate.executeRenderCommands(e)}createRenderGeometryBuffer(e,t,r){const{materialId:i,visibilities:n,objectIds:s}=e,o=this._bufferWriters.get(i);if(null==o)throw new Error("no registered bufferWriter for material found");let a=null;if(e.transformation&&t)(0,P.C)(Vr,e.transformation),Vr[12]-=t[0],Vr[13]-=t[1],Vr[14]-=t[2],a=Vr;else{if(t)throw new Error("not implemented");e.transformation&&(a=e.transformation)}let l=null;a&&((0,P.B8)(kr,Vr),(0,P.mg)(kr,kr),l=kr);const c=e.attributes,u=o.elementCount(c),d=r?o.instanceLayout:o.layout;if(!d)throw new Error("Missing layout");const h=d.stride/4;u>Math.floor(zr/h)&&console.warn("geometry with very large number of elements encountered");const f=d.createBuffer(u),p=o.write(a,l,c,e.olidColor,f,0);if(null==p)throw new Error("Bufferwriter.write does not provide item information.");if(n.length!==p.numItems||s.length!==p.numItems)throw new Error("Unexpected mismatch between number of RenderGeometryBufferItems and provided objectIds/visibility flags.");return{renderGeometryBuffer:{data:f.buffer,elementCount:u},renderGeometryBufferItems:{objectIds:s,visibilities:n,ranges:{numVertices:p.numVerticesPerItem,numItems:p.numItems}}}}async setBaseInstance(e,t){await this._mainThreadDelegate.setBaseInstance(e,t)}}const Vr=(0,C.vt)(),kr=(0,C.vt)(),zr=4194304;var Lr=r(98764),Ur=r(65806);const qr=(0,S.vt)();var Nr=r(4341),Gr=r(11964),Hr=r(44280),$r=r(32114);const Yr=()=>c.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function Zr(e=hi){return{plane:(0,he.vt)(e.plane),origin:(0,S.o8)(e.origin),basis1:(0,S.o8)(e.basis1),basis2:(0,S.o8)(e.basis2)}}function Xr(e,t=Zr()){return Wr(e.origin,e.basis1,e.basis2,t)}function Wr(e,t,r,i=Zr()){return(0,ce.d)(i.origin,e),(0,ce.d)(i.basis1,t),(0,ce.d)(i.basis2,r),Jr(i),function(e,t){Math.abs((0,ce.f)(e.basis1,e.basis2)/((0,ce.b)(e.basis1)*(0,ce.b)(e.basis2)))>1e-6&&Yr().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,ce.f)(e.basis1,ai(e)))>1e-6&&Yr().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,ce.f)(ai(e),e.origin)-e.plane[3])>1e-6&&Yr().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function Jr(e){(0,he.mR)(e.basis2,e.basis1,e.origin,e.plane)}function Qr(e,t,r){e!==r&&Xr(e,r);const i=(0,ce.h)($r.rq.get(),ai(e),t);return(0,ce.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function Kr(e,t=Zr()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,ce.j)(t.origin,e[0]+r,e[1]+i,0),(0,ce.j)(t.basis1,r,0,0),(0,ce.j)(t.basis2,0,i,0),(0,he.fA)(0,0,1,0,t.plane),t}function ei(e,t,r){return!!(0,he.Ui)(e.plane,t,r)&&li(e,r)}function ti(e,t,r){const i=fi.get();di(e,t,i,fi.get());let n=Number.POSITIVE_INFINITY;for(const s of gi){const o=ui(e,s,pi.get()),a=$r.rq.get();if((0,he.T7)(i,o,a)){const e=(0,ce.E)($r.rq.get(),t.origin,a),i=Math.abs((0,F.XM)((0,ce.f)(t.direction,e)));i<n&&(n=i,(0,ce.d)(r,a))}}return n===Number.POSITIVE_INFINITY?ri(e,t,r):r}function ri(e,t,r){if(ei(e,t,r))return r;const i=fi.get(),n=fi.get();di(e,t,i,n);let s=Number.POSITIVE_INFINITY;for(const o of gi){const a=ui(e,o,pi.get()),l=$r.rq.get();if((0,he.gv)(i,a,l)){const e=(0,fe.kb)(t,l);if(!(0,he.Tj)(n,l))continue;e<s&&(s=e,(0,ce.d)(r,l))}}return si(e,t.origin)<s&&ii(e,t.origin,r),r}function ii(e,t,r){const i=(0,he._I)(e.plane,t,$r.rq.get()),n=(0,Gr.H6)(ci(e,e.basis1),i,-1,1,$r.rq.get()),s=(0,Gr.H6)(ci(e,e.basis2),i,-1,1,$r.rq.get());return(0,ce.e)(r,(0,ce.g)($r.rq.get(),n,s),e.origin),r}function ni(e,t,r){const{origin:i,basis1:n,basis2:s}=e,o=(0,ce.e)($r.rq.get(),t,i),a=(0,Hr.gr)(n,o),l=(0,Hr.gr)(s,o),c=(0,Hr.gr)(ai(e),o);return(0,ce.j)(r,a,l,c)}function si(e,t){const r=ni(e,t,$r.rq.get()),{basis1:i,basis2:n}=e,s=(0,ce.b)(i),o=(0,ce.b)(n),a=Math.max(Math.abs(r[0])-s,0),l=Math.max(Math.abs(r[1])-o,0),c=r[2];return a*a+l*l+c*c}function oi(e,t){const r=-e.plane[3];return(0,Hr.gr)(ai(e),t)-r}function ai(e){return(0,he.Qj)(e.plane)}function li(e,t){const r=(0,ce.e)($r.rq.get(),t,e.origin),i=(0,ce.m)(e.basis1),n=(0,ce.m)(e.basis2),s=(0,ce.f)(e.basis1,r),o=(0,ce.f)(e.basis2,r);return-s-i<0&&s-i<0&&-o-n<0&&o-n<0}function ci(e,t){const r=pi.get();return(0,ce.d)(r.origin,e.origin),(0,ce.d)(r.vector,t),r}function ui(e,t,r){const{basis1:i,basis2:n,origin:s}=e,o=(0,ce.h)($r.rq.get(),i,t.origin[0]),a=(0,ce.h)($r.rq.get(),n,t.origin[1]);(0,ce.g)(r.origin,o,a),(0,ce.g)(r.origin,r.origin,s);const l=(0,ce.h)($r.rq.get(),i,t.direction[0]),c=(0,ce.h)($r.rq.get(),n,t.direction[1]);return(0,ce.h)(r.vector,(0,ce.g)(l,l,c),2),r}function di(e,t,r,i){const n=ai(e);(0,he.mR)(n,t.direction,t.origin,r),(0,he.mR)((0,he.Qj)(r),n,t.origin,i)}const hi={plane:(0,he.vt)(),origin:(0,S.fA)(0,0,0),basis1:(0,S.fA)(1,0,0),basis2:(0,S.fA)(0,1,0)},fi=new Nr.I(he.vt),pi=new Nr.I(Gr.vt),mi=(0,S.vt)(),yi=new Nr.I(()=>Zr()),gi=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],bi=(0,C.vt)(),_i=(0,C.vt)(),vi=Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:oi,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case 0:(0,ce.d)(r,e.basis1),(0,ce.n)(r,r);break;case 1:(0,ce.d)(r,e.basis2),(0,ce.n)(r,r);break;case 2:(0,ce.d)(r,ai(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:ri,closestPointOnSilhouette:ti,copy:Xr,copyWithoutVerify:function(e,t){(0,ce.d)(t.origin,e.origin),(0,ce.d)(t.basis1,e.basis1),(0,ce.d)(t.basis2,e.basis2),(0,he.C)(t.plane,e.plane)},create:Zr,distance:function(e,t){return Math.sqrt(si(e,t))},distance2:si,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of gi){const n=ui(e,i,pi.get()),s=(0,Gr.kb)(n,t);s>r&&(r=s)}return Math.sqrt(r)},elevate:Qr,equals:function(e,t){return(0,ce.q)(e.basis1,t.basis1)&&(0,ce.q)(e.basis2,t.basis2)&&(0,ce.q)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,he.Tj)(e.plane,t)&&li(e,t)},fromAABoundingRect:Kr,fromValues:Wr,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[n,s]=e.origin;return(0,M.fA)(n-r,s-i,n+r,s+i,t)},intersectRay:ei,intersectRayClosestSilhouette:function(e,t,r){if(ei(e,t,r))return r;const i=ti(e,t,$r.rq.get());return(0,ce.g)(r,t.origin,(0,ce.h)($r.rq.get(),t.direction,(0,ce.k)(t.origin,i)/(0,ce.b)(t.direction))),r},normal:ai,projectPoint:ii,projectPointLocal:ni,rotate:function(e,t,r,i){return e!==i&&Xr(e,i),(0,P.$0)(_i,t,r),(0,ce.t)(i.basis1,e.basis1,_i),(0,ce.t)(i.basis2,e.basis2,_i),Jr(i),i},setAltitudeAt:function(e,t,r,i){const n=oi(e,t),s=(0,ce.h)(mi,ai(e),r-n);return(0,ce.g)(i,t,s),i},setExtent:function(e,t,r){return Kr(t,r),Qr(r,oi(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&Xr(e,r),(0,P.B8)(bi,t),(0,P.mg)(bi,bi),(0,ce.t)(r.basis1,e.basis1,bi),(0,ce.t)(r.basis2,e.basis2,bi),(0,ce.t)((0,he.Qj)(r.plane),(0,he.Qj)(e.plane),bi),(0,ce.t)(r.origin,e.origin,t),(0,he.mP)(r.plane,r.plane,r.origin),r},up:hi,updateUnboundedPlane:Jr,wrap:function(e,t,r){const i=yi.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,he.LV)(0,0,0,0),Jr(i),i}},Symbol.toStringTag,{value:"Module"}));var wi=r(97937);function xi(e,t,r=function(e){return{operations:e,value:e.create()}}(e)){return r.operations=e,e.copy(t,r.value),r}const Ci=2**50;function Si(e,t,r,i){return e.operations.setAltitudeAt(e.value,t,r,i)}function Ti(e,t,r){return e.operations.elevate(e.value,t,r.value)}const Ai=(0,S.vt)();function Ii(e){return"point"===e.type}(0,S.vt)();class Pi{constructor(e,t,r,i){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this._coordinateSystem=i,this._tmpCoordinateSystem=function(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}(i),this.referenceEllipsoid=(0,pe.tO)(t),this.sphericalPCPF=(0,Lr.lO)(t)}set extent(e){e&&function(e,t,r){e.operations.setExtent(e.value,t,r.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return e=this._coordinateSystem,t=(0,M.vt)(),e.operations.getExtent(e.value,t),t;var e,t}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,r=e){return Si(this._coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){var r,i,n,s;r=this._coordinateSystem,n=e,(i=t)!==(s=t)&&(0,P.C)(s,i),(0,ce.j)(Ai,s[12],s[13],s[14]),Si(r,Ai,n,Ai),s[12]=Ai[0],s[13]=Ai[1],s[14]=Ai[2]}worldUpAtPosition(e,t){return function(e,t,r){return e.operations.axisAt(e.value,t,2,r)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return function(e,t,r,i){return e.operations.axisAt(e.value,t,r,i)}(this._coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,0,$r.rq.get()),i=this.worldBasisAtPosition(e,1,$r.rq.get()),n=this.worldBasisAtPosition(e,2,$r.rq.get());return(0,P.hZ)(t,r[0],r[1],r[2],0,i[0],i[1],i[2],0,n[0],n[1],n[2],0,0,0,0,1),t}headingAtPosition(e,t){const r=this.worldUpAtPosition(e,$r.rq.get()),i=this.worldBasisAtPosition(e,1,$r.rq.get()),n=(0,Hr.EJ)(t,i,r);return(0,F.KJ)(n)}intersectManifoldClosestSilhouette(e,t,r){return Ti(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,r){e.operations.intersectRayClosestSilhouette(e.value,t,r)}(this._tmpCoordinateSystem,e,r),r}intersectManifold(e,t,r){Ti(this._coordinateSystem,t,this._tmpCoordinateSystem);const i=$r.rq.get();return function(e,t,r){return e.operations.intersectRay(e.value,t,r)}(this._tmpCoordinateSystem,e,i)?(0,ce.d)(r,i):null}intersectInfiniteManifold(e,t,r){if(1===this.viewingMode)return this.intersectManifold(e,t,r);Ti(this._coordinateSystem,t,this._tmpCoordinateSystem);const i=this._tmpCoordinateSystem.value,n=$r.rq.get();return(0,he.Ui)(i.plane,e,n)?(0,ce.d)(r,n):null}toRenderCoords(e,t,r){return Ii(e)?(0,Ur.g)(e,t,this.spatialReference):(0,z.F)(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return Ii(t)?(null!=r&&(t.spatialReference=r),function(e,t,r){return!!(0,z.F)(e,t,qr,r.spatialReference)&&(r.x=qr[0],r.y=qr[1],r.z=qr[2],!0)}(e,this.spatialReference,t)?t:null):(0,z.F)(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case 2:return new Pi(2,t,(0,I.GA)(t),xi(vi,Wr([0,0,0],[Ci,0,0],[0,Ci,0])));case 1:return new Pi(1,t,1,function(e){return xi(wi.s,(0,wi.f)(0,0,0,(0,pe.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,I.KX)(e)/(0,I.KX)(t)}}let Bi=class extends n.nJ{constructor(){super(...arguments),this.remoteClient=null,this._featureStore=new ft,this._tileLocks=new at,this._tileManager=null,this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null,this._mainThreadDelegate=null,this._viewSpatialReference=null,this._renderCommandContext=null,this._context=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager?.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:r,layerInfo:i,layerViewInfo:n}){const s=f.A.fromJSON(e);this._viewSpatialReference=s;const a=f.A.fromJSON(t);this._fetcher=new Et(this._viewSpatialReference,m.A.fromJSON(i.baseQuery),i.url,i.objectIdField,i.capabilities),this._queryEngine=new p.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:i.objectIdField},fieldsIndex:i.fieldIndex,availableFields:[i.objectIdField],spatialReference:e,featureStore:this._featureStore,timeInfo:i.timeInfo}),this._mainThreadDelegate={createTexture:async(e,t)=>{const r={data:e,parameters:t};return await this.remoteClient.invoke("createTexture",r,{transferList:[e.buffer]})},releaseTexture:async e=>{const t={uid:e};await this.remoteClient.invoke("releaseTexture",t)},createMaterial:async e=>{const t={materialJSON:e};await this.remoteClient.invoke("createMaterial",t)},destroyMaterial:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyMaterial",t)},createDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("createDirectRenderer",t)},destroyDirectRenderer:async e=>{const t={materialId:e};await this.remoteClient.invoke("destroyDirectRenderer",t)},createLodRenderer:async(e,t,r)=>{const i={rendererId:e,lodRenderGeometry:t};await this.remoteClient.invoke("createLoDRenderer",i,{transferList:r})},destroyLodRenderer:async e=>{const t={rendererId:e};await this.remoteClient.invoke("destroyLoDRenderer",t)},executeRenderCommands:async e=>{const t={commands:e.commands};await this.remoteClient.invoke("dispatchRenderCommands",t,{transferList:e.transferList})},applyElevationAlignmentTo:async e=>{const t={mapPoints:e};return await this.remoteClient.invoke("applyElevationAlignment",t,{transferList:[e.buffer]})},setBaseInstance:async(e,t)=>{const r={rendererId:e,baseInstance:t};await this.remoteClient.invoke("setBaseInstance",r,{transferList:null!=t?[t.data]:void 0})}};const l=Pi.create(r,a),c=new jr(r,this._mainThreadDelegate);this._renderCommandContext=c;const u=new He(s,a,this._mainThreadDelegate,l,c,i,n);this._context=u,this._renderer=u.symbolRendererFactory.createSymbolRendererFromJSON(i.renderer),this._defaultQueryJSON=new m.A({outSpatialReference:s}).toJSON();let y=null;if(null!=i.fullExtent){const e=d.A.fromJSON(i.fullExtent);await(0,h.initializeProjection)(e.spatialReference,s),y=(0,h.project)(e,s)}return this._tileManager=new rt({loadTile:(e,t)=>this._fetcher.fetch(e,t),createAddCommand:(e,t)=>this._createAddFeatureDataCommand(e,t),createRemoveCommand:e=>this._createRemoveFeatureDataCommand(e),createUpdateCommand:(e,t)=>this._createUpdateFeatureDataVisibilityCommand(e,t),tileLocks:this._tileLocks,extent:y}),this.addHandles((0,o.wB)(()=>this.updating,e=>{this.emit("notify-updating",{updating:e})}),o.Vh),null!=this._renderer&&await this._renderer.load(),Mi}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const r=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(r)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async executeAttributeBinsQuery(e,t){return{result:await this._queryEngine.executeAttributeBinsQuery(e,t)}}onTileTreeChange(e){return this._tileManager.onTileTreeChange(e),Promise.resolve(Mi)}async onElevationChange(e){return Mi}async onLayerViewOpacityChange(e){const{_context:t,_renderer:r}=this;if(t.layerViewInfo.fullOpacity=e,null==r)return Mi;const i=await r.createUpdateLayerViewOpacityCommand(e);return await i.execute(),Mi}async onRendererChange(e){const{_context:t}=this,r=t.symbolRendererFactory.createSymbolRendererFromJSON(e);await r.load();const n=this._renderer;this._renderer=r;const s=[...this._tileManager.loadedTiles()],o=s.map(e=>e.tileId);{const e={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(e,await this._tileLocks.lock(o),!1);const a=s.flatMap(e=>[n.createRemoveCommand(e.id),r.createAddCommand(e)]),l=await Promise.all(a),c=t.joinPipelineCommands(l);await c.execute()}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}const a=await n.createDestroyCommand();return await a.execute(),Mi}async _createAddFeatureDataCommand(e,t){const r=this._featureStore,i=this._renderer;let n;return n=null!=i?await i.createAddCommand(e):g.create(this._renderCommandContext),(0,s.Te)(t),n.appendPipelineStateCommand(()=>{r.addTile(e)}),n}async _createRemoveFeatureDataCommand(e){const t=this._featureStore,r=this._renderer;let i;return i=null!=r?await r.createRemoveCommand(e):g.create(this._renderCommandContext),i.appendPipelineStateCommand(()=>{t.removeTile(e)}),i}async _createUpdateFeatureDataVisibilityCommand(e,t){const r=this._renderer;let i;return i=null!=r?await r.createUpdateVisibilityCommand(e):g.create(this._renderCommandContext),(0,s.Te)(t),i}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,i.Cg)([(0,a.MZ)()],Bi.prototype,"updating",null),Bi=(0,i.Cg)([(0,u.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],Bi);const Ei=Bi,Mi={result:void 0}},65215:(e,t,r)=>{r.d(t,{H:()=>i,R:()=>n});class i{constructor(e){this.layerViewUid=e}}class n extends i{constructor(e,t){super(e),this.graphicUid=t}}},65494:(e,t,r)=>{r.d(t,{L:()=>l,r:()=>o});var i=r(67076),n=r(90360),s=r(41214);function o(e,t){return l(e,null,t)}const a=(0,n.C)({types:s.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):a(e,t,r):null}},66208:(e,t,r)=>{r.d(t,{m:()=>n});var i=r(53655);function n(e,t){const r=(0,i.SH)(e,t),n=r.queryResult.featureResult,s=r.queryResult.queryGeometry,o=r.queryResult.queryGeometryType;if(n&&n.features&&n.features.length&&n.objectIdFieldName){const e=n.objectIdFieldName;for(const t of n.features)t.attributes&&(t.objectId=t.attributes[e])}return n&&(n.queryGeometry=s,n.queryGeometryType=o),n}},69418:(e,t,r)=>{r.d(t,{S:()=>c,z:()=>l});var i=r(83047),n=r(21325),s=r(43334),o=r(58512),a=r(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class c{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,n.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,i.G9)(this._options.sourceSpatialReference)/(0,i.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,s.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce((e,t)=>e+t,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.A}}},72385:(e,t,r)=>{function i(){return new Float32Array(3)}function n(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(e,t,r){const i=new Float32Array(3);return i[0]=e,i[1]=t,i[2]=r,i}function o(){return i()}function a(){return s(1,1,1)}function l(){return s(1,0,0)}function c(){return s(0,1,0)}function u(){return s(0,0,1)}r.d(t,{fA:()=>s,o8:()=>n,vt:()=>i});const d=o(),h=a(),f=l(),p=c(),m=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:f,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:n,create:i,fromValues:s,ones:a,unitX:l,unitY:c,unitZ:u,zeros:o},Symbol.toStringTag,{value:"Module"}))},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))h.delete(e);h.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const f=await(0,a.xR)(e.expression,null,d);if(!f)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const p=!o||!o.greaterEqual(4,0);p&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new c(r,p);return new l(p,u,f,m)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class c extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},75503:(e,t,r)=>{r.d(t,{EC:()=>T,wq:()=>a});var i=r(4576),n=r(21818),s=(r(44208),r(15142)),o=r(11006);class a{constructor(e=9,t){this._compareMinX=h,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),x.prune(),C.prune(),S.prune()}all(e){l(this._data,e)}search(e,t){let r=this._data;const i=this._toBBox;if(_(e,r))for(w.clear();r;){for(let n=0,s=r.children.length;n<s;n++){const s=r.children[n],o=r.leaf?i(s):s;_(e,o)&&(r.leaf?t(s):b(e,o)?l(s,t):w.push(s))}r=w.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],s=t.leaf?r(n):n;if(_(e,s)){if(t.leaf||b(e,s))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,r=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),S.clear();r||C.length>0;){if(r||(r=C.pop(),s=C.data[C.length-1],o=S.pop()??0,a=!0),r.leaf&&(t=(0,i.qh)(r.children,(0,n.zI)(e),r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),C.push(r),this._condense(C),this;a||r.leaf||!b(r,l)?s?(o++,r=s.children[o],a=!1):r=null:(C.push(r),S.push(o),o=0,s=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,i){const n=r-t+1;let s=this._maxEntries;if(n<=s){const i=new I(e.slice(t,r+1));return c(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(s)),s=Math.ceil(n/s**(i-1)));const o=new P([]);o.height=i;const a=Math.ceil(n/s),l=a*Math.ceil(Math.sqrt(s));v(e,t,r,l,this._compareMinX);for(let n=t;n<=r;n+=l){const t=Math.min(n+l-1,r);v(e,n,t,a,this._compareMinY);for(let r=n;r<=t;r+=a){const n=Math.min(r+a-1,t);o.children.push(this._build(e,r,n,i-1))}}return c(o,this._toBBox),o}_insert(e,t,r){const i=this._toBBox,n=r?e:i(e);C.clear();const s=function(e,t,r,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==r;){let r,i=1/0,n=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=p(o),l=y(e,o)-a;l<n?(n=l,i=a<i?a:i,r=o):l===n&&a<i&&(i=a,r=o)}t=r||t.children[0]}return t}(n,this._data,t,C);for(s.children.push(e),d(s,n);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,r){for(let i=r;i>=0;i--)d(t.data[i],e)}(n,C,t)}_split(e,t){const r=e.data[t],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);const s=this._chooseSplitIndex(r,n,i);if(!s)return;const o=r.children.splice(s,r.children.length-s),a=r.leaf?new I(o):new P(o);a.height=r.height,c(r,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let i,n,s;i=n=1/0;for(let o=t;o<=r-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,r,this._toBBox),l=g(t,a),c=p(t)+p(a);l<i?(i=l,s=o,n=c<n?c:n):l===i&&c<n&&(n=c,s=o)}return s}_chooseSplitAxis(e,t,r){const i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,r,i)<this._allDistMargin(e,t,r,n)&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);const n=this._toBBox,s=u(e,0,t,n),o=u(e,r-t,r,n);let a=m(s)+m(o);for(let i=t;i<r-t;i++){const t=e.children[i];d(s,e.leaf?n(t):t),a+=m(s)}for(let i=r-t-1;i>=t;i--){const t=e.children[i];d(o,e.leaf?n(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const n=e.data[t-1],s=n.children;s.splice((0,i.qh)(s,r,s.length,n.indexHint),1)}else this.clear();else c(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let r=e;for(x.clear();r;){if(!0===r.leaf)for(const e of r.children)t((0,n.zI)(e));else x.pushArray(r.children);r=x.pop()??null}}function c(e,t){u(e,0,e.children.length,t,e)}function u(e,t,r,i,n){n||(n=new I([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let s,o=t;o<r;o++)s=e.children[o],d(n,e.leaf?i(s):s);return n}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,s-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,r,i,n){const s=[t,r];for(;s.length;){const t=s.pop(),r=s.pop();if(t-r<=i)continue;const a=r+Math.ceil((t-r)/i/2)*i;(0,o.q)(e,a,r,t,n),s.push(r,a,a,t)}}const w=new s.A,x=new s.A,C=new s.A,S=new s.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class I extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),n=r(66552),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),l=r(64108);const c=new n.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends s.o{constructor(e){super(e),this.name=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,a.e)(c),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,i.Cg)([(0,l.$)("esri.layers.support.Domain")],u)},77548:(e,t,r)=>{r.d(t,{Gh:()=>y,tk:()=>h,BR:()=>d,wI:()=>u,G$:()=>p,$x:()=>f,Ov:()=>a,W_:()=>l,OP:()=>m,TU:()=>o,XX:()=>s,jy:()=>c});var i=r(70333),n=r(78888);r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function c(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function u(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function h(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function f(e,t){return null}function p(e){return null}function m(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function y(e,t){if(!t||!m(e))return;const r=(e.url,null);r&&(e.url=r)}},79677:(e,t,r)=>{r.d(t,{A:()=>h});var i,n=r(31635),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),c=r(64108),u=r(43937),d=r(98623);let h=class extends s.o{static{i=this}static get allTime(){return f}static get empty(){return p}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let n=this.end;if(n){const r=(0,o.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return n>=t&&n<=r?o=n:t>=n&&t<=s&&(o=t),r>=n&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,e,t,r)),null!=a&&(n.end=(0,o.S1)(a,e,t,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n.Cg)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,n.Cg)([(0,u.K)("end")],h.prototype,"writeEnd",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n.Cg)([(0,l.w)("start")],h.prototype,"readStart",null),(0,n.Cg)([(0,u.K)("start")],h.prototype,"writeStart",null),h=i=(0,n.Cg)([(0,c.$)("esri.time.TimeExtent")],h);const f=new h,p=new h({start:void 0,end:void 0})},80451:(e,t,r)=>{r.d(t,{rS:()=>p,gK:()=>f}),r(44208);var i,n=r(53177),s=r(76357),o=r(31635),a=(r(53966),r(87811),r(49186),r(93223)),l=r(64108);let c=class extends s.A{static{i=this}constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o.Cg)([(0,a.e)({inherited:"inherited"})],c.prototype,"type",void 0),c=i=(0,o.Cg)([(0,l.$)("esri.layers.support.InheritedDomain")],c);var u,d=r(10107);let h=class extends s.A{static{u=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new u({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],h.prototype,"maxValue",void 0),(0,o.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],h.prototype,"minValue",void 0),(0,o.Cg)([(0,a.e)({range:"range"})],h.prototype,"type",void 0),h=u=(0,o.Cg)([(0,l.$)("esri.layers.support.RangeDomain")],h);const f={key:"type",base:s.A,typeMap:{range:h,"coded-value":n.A,inherited:c}};function p(e){if(!e?.type)return null;switch(e.type){case"range":return h.fromJSON(e);case"codedValue":return n.A.fromJSON(e);case"inherited":return c.fromJSON(e)}return null}},80893:(e,t,r)=>{r.d(t,{IJ:()=>h,Jf:()=>y,Pk:()=>p,eW:()=>d,gW:()=>m,kS:()=>f});var i=r(78888),n=r(84952),s=r(17136),o=r(10536),a=r(66208),l=r(5076),c=r(58501);const u="Layer does not support extent calculation.";async function d(e,t,r,i={},n){const s=t.timeExtent?.isEmpty?{data:{features:[]}}:await b(e,t,"json",i,void 0,n);return(0,c.q)(t,r,s.data),s}async function h(e,t,r,i,n){if(t.timeExtent?.isEmpty)return{data:r.createFeatureResult()};const s=await f(e,t,i,n),o=s;return o.data=(0,a.m)(s.data,r),o}function f(e,t,r={},i){return b(e,t,"pbf",r,void 0,i)}function p(e,t,r={},i){return t.timeExtent?.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",r,{returnIdsOnly:!0},i)}function m(e,t,r={},i){return t.timeExtent?.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0},i)}async function y(e,t,r={}){if(t.timeExtent?.isEmpty)return{data:{count:0,extent:null}};const i=await b(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}),n=i.data;if(n.hasOwnProperty("extent"))return i;if(n.features)throw new Error(u);if(n.hasOwnProperty("count"))throw new Error(u);return i}function g(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;const r={...e,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function b(e,t,r,a,c={},u={}){const d="string"==typeof e?(0,n.An)(e):e,h=t.geometry?[t.geometry]:[],f=await(0,s.el)(h,null,{signal:a.signal}),p=f?.[0];if(null!=p){const e=t.clone();e.geometry=p.clone(),t=e}const m=(0,o.z)({...d.query,f:r,...g(c,u),...(y=t,b=c,_=u,(0,l.i)(y,b,_))});var y,b,_;return(0,i.A)((0,n.fj)(d.path,function(e,t){return null!=e.formatOf3DObjects&&!(t.returnCountOnly||t.returnExtentOnly||t.returnIdsOnly)}(t,c)?"query3d":"query"),{...a,responseType:"pbf"===r?"array-buffer":"json",query:{...m,...a.query}})}},81961:(e,t,r)=>{r.d(t,{V:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",2,(i,n,s)=>i.setUniform4fv(e,t(n,s),r))}}},87582:(e,t,r)=>{r(6867),r(65215).R},95696:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(31635),s=r(69540),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),c=r(64108);let u=class extends((0,s.OU)(o.o)){static{i=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new i}};(0,n.Cg)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=i=(0,n.Cg)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},96576:(e,t,r)=>{r.d(t,{A:()=>h});var i,n=r(31635),s=r(4718),o=r(10107),a=(r(44208),r(53966),r(93223)),l=r(64108),c=r(92438),u=r(63988),d=r(49849);let h=i=class extends((0,u.h)(c.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,s.o8)(this.symbol),visualVariables:(0,s.o8)(this.visualVariables),authoringInfo:(0,s.o8)(this.authoringInfo)})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"label",void 0),(0,n.Cg)([(0,o.MZ)(d.Wp)],h.prototype,"symbol",void 0),(0,n.Cg)([(0,a.e)({simple:"simple"})],h.prototype,"type",void 0),h=i=(0,n.Cg)([(0,l.$)("esri.renderers.SimpleRenderer")],h)},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
|