1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5531],{12348:function(e,t,s){s.d(t,{Z:function(){return i}});var r=s(61681);class i{constructor(e){this.size=0,this._start=0,this.maxSize=e,this._buffer=Array(e)}get entries(){return this._buffer}enqueue(e){if(this.size===this.maxSize){let t=this._buffer[this._start];return this._buffer[this._start]=e,this._start=(this._start+1)%this.maxSize,t}return this._buffer[(this._start+this.size++)%this.maxSize]=e,null}dequeue(){if(0===this.size)return null;let e=this._buffer[this._start];return this._buffer[this._start]=null,this.size--,this._start=(this._start+1)%this.maxSize,e}peek(){return 0===this.size?null:this._buffer[this._start]}find(e){if(0===this.size)return null;for(let t of this._buffer)if((0,r.pC)(t)&&e(t))return t;return null}clear(e){let t=this.dequeue();for(;(0,r.pC)(t);)e&&e(t),t=this.dequeue()}}},31056:function(e,t,s){s.d(t,{Q:function(){return l},g:function(){return h}});var r=s(39994),i=s(61681),n=s(47126);let a=(0,r.Z)("esri-2d-log-allocations");class h{constructor(e,t){this._array=e,this._pool=t}get array(){return this._array}get length(){return this._array.length}static create(e,t){return new h(t.acquire(e),t)}expand(e){let t=this._pool.acquire(e);t.set(this._array),this._pool.release(this._array),this._array=t}destroy(){this._pool.release(this._array)}set(e,t){this._array.set(e._array,t)}slice(){let e=this._pool.acquire(this._array.byteLength);return e.set(this._array),new h(e,this._pool)}}class u{constructor(){this._data=new ArrayBuffer(u.BYTE_LENGTH),this._freeList=new n.m({start:0,end:this._data.byteLength})}static get BYTE_LENGTH(){return 64e6}get buffer(){return this._data}allocate(e){let t=this._freeList.firstFit(e);return(0,i.Wi)(t)?null:new Uint32Array(this._data,t,e/Uint32Array.BYTES_PER_ELEMENT)}free(e){this._freeList.free(e.byteOffset,e.byteLength)}}class l{constructor(){this._bytesAllocated=0,this._pages=[],this._pagesByBuffer=new Map,this._addPage()}destroy(){this._pages=[],this._pagesByBuffer=null}get _bytesTotal(){return this._pages.length*u.BYTE_LENGTH}acquire(e){if(this._bytesAllocated+=e,a&&console.log(`Allocating ${e}, (${this._bytesAllocated} / ${this._bytesTotal})`),e>u.BYTE_LENGTH)return new Uint32Array(e/Uint32Array.BYTES_PER_ELEMENT);for(let t of this._pages){let s=t.allocate(e);if((0,i.pC)(s))return s}return(0,i.s3)(this._addPage().allocate(e),"Expected to allocate page")}release(e){this._bytesAllocated-=e.byteLength,a&&console.log(`Freeing ${e.byteLength}, (${this._bytesAllocated} / ${this._bytesTotal})`);let t=this._pagesByBuffer.get(e.buffer);t&&t.free(e)}_addPage(){let e=new u;return this._pages.push(e),this._pagesByBuffer.set(e.buffer,e),e}}},88013:function(e,t,s){s.d(t,{KS:function(){return u},PX:function(){return i},QS:function(){return o},_I:function(){return r},jL:function(){return h},nE:function(){return l},vs:function(){return a},xp:function(){return n}});let r=8388607,i=0,n=1,a=e=>(8388608&e)>>>23,h=e=>e&r,u=e=>a(e)===n?254:255;function l(e){return a(e)===n}function o(e,t){return((t?8388608:0)|e)>>>0}},47126:function(e,t,s){s.d(t,{a:function(){return i},m:function(){return n}});var r=s(61681);class i{constructor(e){if(this.next=null,!Array.isArray(e))return void(this.data=e);this.data=e[0];let t=this;for(let s=1;s<e.length;s++)t.next=new i([e[s]]),t=t.next}*values(){let e=this;for(;e;)yield e.data,e=e.next}forEach(e){let t=this;for(;t;)e(t.data),t=t.next}find(e){return e(this.data)?this:this.next?.find(e)}max(e,t=this){let s=e(this.data)>e(t.data)?this:t;return this.next?this.next.max(e,s):s}remove(e,t=null){return this===e?t?(t.next=this.next,t):this.next:this.next?.remove(e,this)??null}get last(){return this.next?this.next.last:this}}class n{constructor(e){this._head=null,(0,r.Wi)(e)||(this._head=new i(e))}get head(){return this._head}maxAvailableSpace(){if((0,r.Wi)(this._head))return 0;let e=this._head.max(e=>e.end-e.start);return e.data.end-e.data.start}firstFit(e){if((0,r.Wi)(this._head))return null;let t=null,s=this._head;for(;s;){let r=s.data.end-s.data.start;if(r===e)return t?t.next=s.next:this._head=s.next,s.data.start;if(r>e){let t=s.data.start;return s.data.start+=e,t}t=s,s=s.next}return null}free(e,t){let s=e+t;if((0,r.Wi)(this._head)){let t=new i({start:e,end:s});return void(this._head=t)}if(s<=this._head.data.start){if(s===this._head.data.start)return void(this._head.data.start-=t);let r=new i({start:e,end:s});return r.next=this._head,void(this._head=r)}let n=this._head,a=n.next;for(;a;){if(a.data.start>=s){if(n.data.end===e){if(n.data.end+=t,n.data.end===a.data.start){let e=a.data.end-a.data.start;return n.data.end+=e,void(n.next=a.next)}return}if(a.data.start===s)return void(a.data.start-=t);let r=new i({start:e,end:s});return r.next=n.next,void(n.next=r)}n=a,a=a.next}if(e===n.data.end)return void(n.data.end+=t);let h=new i({start:e,end:s});n.next=h}}},37727:function(e,t,s){s.d(t,{J:function(){return i},g:function(){return r}});let r=(e,t)=>e&&((...e)=>t.warn("DEBUG:",...e))||(()=>null),i=!1},25970:function(e,t,s){s.d(t,{Z:function(){return u}});var r=s(36663),i=s(53280),n=s(81977);s(7753),s(7283);var a=s(40266);let h=class extends i.r{constructor(e){super(e),this.tiles=new Map}destroy(){this.tiles.clear(),this.layer=this.layerView=this.tileInfoView=this.tiles=null}get updating(){return this.isUpdating()}acquireTile(e){let t=this.createTile(e);return t.once("isReady",()=>this.notifyChange("updating")),this.tiles.set(e.id,t),t}forceAttributeTextureUpload(){}
1forEachTile(e){this.tiles.forEach(e)}releaseTile(e){this.tiles.delete(e.key.id),this.disposeTile(e)}isUpdating(){let e=!0;return this.tiles.forEach(t=>{e=e&&t.isReady}),!e}setHighlight(){}invalidateLabels(){}requestUpdate(){this.layerView.requestUpdate()}};(0,r._)([(0,n.Cb)()],h.prototype,"layer",void 0),(0,r._)([(0,n.Cb)()],h.prototype,"layerView",void 0),(0,r._)([(0,n.Cb)()],h.prototype,"tileInfoView",void 0),(0,r._)([(0,n.Cb)()],h.prototype,"updating",null);let u=h=(0,r._)([(0,a.j)("esri.views.2d.layers.features.tileRenderers.BaseTileRenderer")],h)},93243:function(e,t,s){s.r(t),s.d(t,{default:function(){return z}});var r=s(36663),i=s(39994),n=s(78668);s(13802),s(7283),s(7753),s(70375);var a=s(40266),h=s(24568),u=s(12348),l=s(61681),o=s(59566),d=s(38716),f=s(77801),_=s(780);class c{constructor(e){this._savedCursor=null,this._savedOffset=null,this._head=e,this._cursor=e}static from(e){return new c(p.from(new Float32Array(e)))}get id(){return this._cursor.id}get baseZoom(){return this._cursor.baseZoom}get anchorX(){return this._cursor.anchorX}get anchorY(){return this._cursor.anchorY}get directionX(){return this._cursor.directionX}get directionY(){return this._cursor.directionY}get size(){return this._cursor.size}get materialKey(){return this._cursor.materialKey}get boundsCount(){return this._cursor.boundsCount}computedMinZoom(){return this._cursor.computedMinZoom()}setComputedMinZoom(e){return this._cursor.setComputedMinZoom(e)}boundsComputedAnchorX(e){return this._cursor.boundsComputedAnchorX(e)}boundsComputedAnchorY(e){return this._cursor.boundsComputedAnchorY(e)}setBoundsComputedAnchorX(e,t){return this._cursor.setBoundsComputedAnchorX(e,t)}setBoundsComputedAnchorY(e,t){return this._cursor.setBoundsComputedAnchorY(e,t)}boundsX(e){return this._cursor.boundsX(e)}boundsY(e){return this._cursor.boundsY(e)}boundsWidth(e){return this._cursor.boundsWidth(e)}boundsHeight(e){return this._cursor.boundsHeight(e)}link(e){if((0,l.pC)(e._head))return this._cursor.link(e._head)}getCursor(){return this.copy()}copy(){let e=new c(this._head?.copy());if(!e._head)return e;let t=e._head,s=e._head._link;for(;s;)t._link=s.copy(),s=(t=s)._link;return e}peekId(){return this._cursor.peekId()??this._cursor._link.peekId()}nextId(){let e=this.id;for(;e===this.id;)if(!this.next())return!1;return!0}save(){this._savedCursor=this._cursor,this._savedOffset=this._cursor._offset}restore(){this._savedCursor&&(this._cursor=this._savedCursor),null!=this._savedOffset&&(this._cursor._offset=this._savedOffset)}next(){if(!this._cursor)return!1;if(!this._cursor.next()){if(!this._cursor._link)return!1;this._cursor=this._cursor._link,this._cursor._offset=0}return!0}lookup(e){for(this._cursor=this._head;this._cursor&&!this._cursor.lookup(e);){if(!this._cursor._link)return!1;this._cursor=this._cursor._link}return!!this._cursor}delete(e){let t=this._head,s=null;for(;t;){if(t.delete(e))return t.isEmpty()&&(0,l.pC)(s)&&(s._link=t._link),!0;s=t,t=t._link}return!1}}class p{constructor(e){this._offset=-1,this._link=null,this._count=0,this._deletedCount=0,this._offsets={instance:null},this._buffer=e}static from(e){return new p(new Float32Array(e))}isEmpty(){return this._deletedCount===this.count}get count(){return this._count||(this._count=this._computeCount()),this._count}get id(){return this._buffer[this._offset+0]}set id(e){this._buffer[this._offset+0]=e}get baseZoom(){return this._buffer[this._offset+1]}get anchorX(){return this._buffer[this._offset+2]}get anchorY(){return this._buffer[this._offset+3]}get directionX(){return this._buffer[this._offset+4]}get directionY(){return this._buffer[this._offset+5]}get size(){return this._buffer[this._offset+6]}get materialKey(){return this._buffer[this._offset+7]}computedMinZoom(){return this._buffer[this._offset+8]}setComputedMinZoom(e){this._buffer[this._offset+8]=e}get boundsCount(){return this._buffer[this._offset+9]}boundsComputedAnchorX(e){return this._buffer[this._offset+10+6*e+0]}boundsComputedAnchorY(e){return this._buffer[this._offset+10+6*e+1]}setBoundsComputedAnchorX(e,t){this._buffer[this._offset+10+6*e+0]=t}setBoundsComputedAnchorY(e,t){this._buffer[this._offset+10+6*e+1]=t}boundsX(e){return this._buffer[this._offset+10+6*e+2]}boundsY(e){return this._buffer[this._offset+10+6*e+3]}boundsWidth(e){return this._buffer[this._offset+10+6*e+4]}boundsHeight(e){return this._buffer[this._offset+10+6*e+5]}link(e){let t=this;for(;t._link;)t=t._link;t._link=e}getCursor(){return this.copy()}copy(){let e=new p(this._buffer);return e._link=this._link,e._offset=this._offset,e._deletedCount=this._deletedCount,e._offsets=this._offsets,e._count=this._count,e}peekId(){let e=this._offset+10+6*this.boundsCount+0;return e>=this._buffer.length?0:this._buffer[e]}next(){let e=0;for(;this._offset<this._buffer.length&&e++<100&&(-1===this._offset?this._offset=0:this._offset+=10+6*this.boundsCount,4294967296===this.id););return 4294967296!==this.id&&this._offset<this._buffer.length}delete(e){let t=this._offset,s=this.lookup(e);if(s)for(this.id=4294967295,++this._deletedCount;this.next()&&this.id===e;)this.id=4294967295,++this._deletedCount;return this._offset=t,s}lookup(e){let t=this._offset;if((0,l.Wi)(this._offsets.instance)){this._offsets.instance=new Map;let e=this.copy();e._offset=-1;let t=0;for(;e.next();)e.id!==t&&(this._offsets.instance.set(e.id,e._offset),t=e.id)}return!!this._offsets.instance.has(e)&&(this._offset=this._offsets.instance.get(e),4294967296!==this.id||(this._offset=t,!1))}_computeCount(){let e=this._offset,t=0;for(this._offset=-1;this.next();)t++;return this._offset=e,t}}var y=s(47126);class g{constructor(e,t,s,r,i){this.target=e,this.geometryType=t,this.materialKey=s,this.indexFrom=r,this.indexCount=i}get indexEnd(){return this.indexFrom+this.indexCount}extend(e){this.indexCount+=e}}class m{constructor(e,t){this.geometryType=0,this._target=e,this.geometryType=t}static from(e,t,s,r){let i=new m(e,t);if((0,l.pC)(r))for(let e of r)s.seekIndex(e),i.addRecord(s);else for(;s.next();)i.addRecord(s);return i}addRecord(e){let t=this._target,s=this.geometryType,r=e.materialKey,i=e.indexFrom,n=e.indexCount,a=e.vertexFrom,h=e.vertexCount;if(n||(i=a,n=h),(0,l.Wi)(this._head)){let e=new g(t,s,r,i,n);return void(this._head=new y.a(e))}let u=null,o=this._head;for(;o;){if(i<o.data.indexFrom)return this._insert(r,i,n,u,o);u=o,o=o.next}this._insert(r,i,n,u,null)}
1forEach(e){(0,l.pC)(this._head)&&this._head.forEach(e)}*infos(){if((0,l.pC)(this._head))for(let e of this._head.values())yield e}_insert(e,t,s,r,i){if((0,l.Wi)(r)&&(0,l.Wi)(i)){let r=new g(this._target,this.geometryType,e,t,s);this._head=new y.a(r)}return(0,l.Wi)(r)&&(0,l.pC)(i)?this._insertAtHead(e,t,s,i):(0,l.pC)(r)&&(0,l.Wi)(i)?this._insertAtEnd(e,t,s,r):(0,l.pC)(r)&&(0,l.pC)(i)?this._insertAtMiddle(e,t,s,r,i):void 0}_insertAtHead(e,t,s,r){let i=t+s;if(e===r.data.materialKey&&i===r.data.indexFrom)r.data.indexFrom=t,r.data.indexCount+=s;else{let i=new g(this._target,this.geometryType,e,t,s);this._head=new y.a(i),this._head.next=r}}_insertAtEnd(e,t,s,r){if(r.data.materialKey===e&&r.data.indexEnd===t)r.data.indexCount+=s;else{let i=new g(this._target,this.geometryType,e,t,s),n=new y.a(i);r.next=n}}_insertAtMiddle(e,t,s,r,i){let n=t+s;if(r.data.materialKey===e&&r.data.indexEnd===t)r.data.indexCount+=s,r.data.materialKey===i.data.materialKey&&r.data.indexEnd===i.data.indexFrom&&(r.data.indexCount+=i.data.indexCount,r.next=i.next);else if(e===i.data.materialKey&&n===i.data.indexFrom)i.data.indexFrom=t,i.data.indexCount+=s;else{let n=new g(this._target,this.geometryType,e,t,s),a=new y.a(n);r.next=a,a.next=i}}}var b=s(31056),x=s(78951),v=s(91907);class w{constructor(e,t,s,r){let i=b.g.create(t*s*Uint32Array.BYTES_PER_ELEMENT,r);this.size=t,this.strideInt=s,this.bufferType=e,this.dirty={start:1/0,end:0},this._gpu=null,this._cpu=i,this.clear()}get elementSize(){return this._cpu.length/this.strideInt}get invalidated(){return this.bufferSize&&!this._gpu}get invalidatedComputeBuffer(){return this.bufferSize&&!this._gpuComputeTriangles}invalidate(){this._invalidateTriangleBuffer(),(0,l.yw)(this._gpu,e=>e.dispose()),this._gpu=null}_invalidateTriangleBuffer(){(0,l.yw)(this._gpuComputeTriangles,e=>e.dispose()),this._gpuComputeTriangles=null}destroy(){(0,l.yw)(this._gpu,e=>e.dispose()),(0,l.yw)(this._gpuComputeTriangles,e=>e.dispose()),(0,l.yw)(this._cpu,e=>e.destroy()),(0,l.yw)(this._cpu2,e=>e.destroy())}clear(){this.dirty.start=1/0,this.dirty.end=0,this.freeList=new y.m({start:0,end:this._cpu.length/this.strideInt}),this.fillPointer=0}ensure(e){if(!(this.maxAvailableSpace()>=e)&&e*this.strideInt>this._cpu.length-this.fillPointer){this.invalidate();let t=this._cpu.length/this.strideInt,s=Math.round((t+e)*1.25),r=s*this.strideInt;this._cpu.expand(r*Uint32Array.BYTES_PER_ELEMENT),this.freeList.free(t,s-t)}}set(e,t){this._cpu.array[e]!==t&&(this._cpu.array[e]=t,this.dirty.start=Math.min(e,this.dirty.start),this.dirty.end=Math.max(e,this.dirty.end))}getGPUBuffer(e,t=!1){if(!this.bufferSize)return null;if(t){if("index"!==this.bufferType)throw Error("Tired to get triangle buffer, but target is not an index buffer");return(0,l.Wi)(this._gpuComputeTriangles)&&(this._gpuComputeTriangles=this._createComputeBuffer(e)),this._gpuComputeTriangles}return(0,l.Wi)(this._gpu)&&(this._gpu=this._createBuffer(e)),this._gpu}getCPUBuffer(){if(!this._cpu2){let e=this._cpu.slice();this._cpu2=e}return this._cpu2.length!==this._cpu.length&&this._cpu2.expand(this._cpu.length*this._cpu.array.BYTES_PER_ELEMENT),this._cpu2.set(this._cpu),this._cpu2}get bufferSize(){return this._cpu.length/this.strideInt}maxAvailableSpace(){return this.freeList.maxAvailableSpace()}insert(e,t,s,r){let i=s*this.strideInt;if(!i)return 0;let n=t*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,a=new Uint32Array(e,n,i),h=(0,l.s3)(this.freeList.firstFit(s),"First fit region must be defined")*this.strideInt,u=h/this.strideInt-t;if(0!==r)for(let e=0;e<a.length;e++)a[e]+=r;return this._cpu.array.set(a,h),this.dirty.start=Math.min(this.dirty.start,h),this.dirty.end=Math.max(this.dirty.end,h+i),this.fillPointer=Math.max(this.fillPointer,h+i),u}free(e,t,s){let r=e*this.strideInt,i=(e+t)*this.strideInt;if(!0===s)for(let s=e;s!==e+t;s++)this._cpu.array[s*this.strideInt]=2147450879;this.dirty.start=Math.min(this.dirty.start,r),this.dirty.end=Math.max(this.dirty.end,i),this.freeList.free(e,t)}upload(){if(this.dirty.end){if(this._invalidateTriangleBuffer(),(0,l.Wi)(this._gpu))return this.dirty.start=1/0,void(this.dirty.end=0);this._gpu.setSubData(this._cpu.array,this.dirty.start,this.dirty.start,this.dirty.end),this.dirty.start=1/0,this.dirty.end=0}}_createBuffer(e){let t=v.l1.DYNAMIC_DRAW;return"index"===this.bufferType?x.f.createIndex(e,t,this._cpu.array):x.f.createVertex(e,t,this._cpu.array)}_createComputeBuffer(e){let t=v.l1.DYNAMIC_DRAW,s=new Uint32Array(this.fillPointer/3);for(let e=0;e<this.fillPointer;e+=3)s[e/3]=this._cpu.array[e];return x.f.createIndex(e,t,s)}}var C=s(18018),E=s(29620);class T{constructor(e,t){this._vaos=new Map,this._indicesInvalid=!1,this.geometryType=e,this._stage=t}destroy(){for(let[e,t]of this._vaos)(0,l.pC)(t)&&t.dispose(!1);this._indexBuffer=(0,l.SC)(this._indexBuffer),this._vertexBuffer=(0,l.SC)(this._vertexBuffer)}insert(e,t,s){if(!e.records.byteLength)return;let r=e.stride;if(this._vertexBuffer&&this._indexBuffer){let s=e.indices.byteLength/4,i=e.vertices.byteLength/r;this._indexBuffer.ensure(s),this._vertexBuffer.ensure(i);let{vertices:n,indices:a}=e,h=C.$.from(e.records),u=this._vertexBuffer.insert(n,0,n.byteLength/r,0),o=this._indexBuffer.insert(a,0,a.byteLength/4,u);
1if(h.forEach(e=>{e.indexFrom+=o,e.vertexFrom+=u}),(0,l.s3)(this._records,"Expected records to be defined").link(h),t)this._indicesInvalid=!0;else if(this._displayList){let e=h.getCursor();for(;e.next();)this._displayList.addRecord(e)}}else{let s=e.indices.byteLength/4,i=e.vertices.byteLength/r,n=r/Uint32Array.BYTES_PER_ELEMENT,a=this._stage.bufferPool;this._records=C.$.from(e.records),this._indexBuffer=new w("index",s,1,a),this._vertexBuffer=new w("vertex",i,n,a),this._indexBuffer.insert(e.indices,0,e.indices.byteLength/4,0),this._vertexBuffer.insert(e.vertices,0,e.vertices.byteLength/r,0),t&&(this._indicesInvalid=!0)}}remove(e){if(!(0,l.Wi)(this._records))for(let t of e){let e=this._records.getCursor();if(!e.lookup(t))continue;let s=e.indexFrom,r=e.vertexFrom,i=e.indexCount,n=e.vertexCount;for(;e.next()&&e.id===t;)i+=e.indexCount,n+=e.vertexCount;this._indexBuffer.free(s,i),this._vertexBuffer.free(r,n,!0),this._records.delete(t)}}getVAO(e,t,s,r){if(!this._vertexBuffer||!this._indexBuffer||(0,l.Wi)(this._records)||!this._vertexBuffer.bufferSize)return null;let i=r?1:0,n=this._vaos.get(i);(this._vertexBuffer.invalidated||this._indexBuffer.invalidated||r&&this._indexBuffer.invalidatedComputeBuffer)&&((0,l.yw)(n,e=>e.dispose(!1)),n=null),this._vertexBuffer.upload(),this._indexBuffer.upload();let a=this._indexBuffer.getGPUBuffer(e,1===i),h=this._vertexBuffer.getGPUBuffer(e);return n||(n=new E.U(e,s,t,{geometry:h},a),this._vaos.set(i,n)),n}forEachCommand(e){if(!(0,l.Wi)(this._records)){if(this._sortIndices(this._records),!this._displayList){let e=this._cursorIndexOrder;this._displayList=m.from(this,this.geometryType,this._records.getCursor(),e)}this._displayList.forEach(e)}}_sortIndices(e){let t=!!this._indexBuffer.bufferSize;if(!this._indicesInvalid)return;this._indicesInvalid=!1;let s=0,r=e.getCursor(),i=[],n=[],a=[];for(;r.next();)n.push(r.index),a.push(r.sortKey),i.push(r.id);n.sort((e,t)=>{let s=a[t],r=a[e];return r===s?i[t]-i[e]:s-r});let h=e.getCursor(),u=t?this._indexBuffer.getCPUBuffer():this._vertexBuffer.getCPUBuffer();for(let e of n){if(!h.seekIndex(e))throw Error("Expected to find index");if(t){let{indexFrom:e,indexCount:t}=h;h.indexFrom=s;for(let r=0;r<t;r++)this._indexBuffer.set(s++,u.array[e+r])}else{let{vertexFrom:e,vertexCount:t}=h,r=this._vertexBuffer.strideInt,i=e*r,n=i+t*r;h.vertexFrom=s/r;for(let e=i;e<n;e++)this._vertexBuffer.set(s++,u.array[e])}}this._cursorIndexOrder=n,this._displayList=null}}let S=0;class B extends _.o{constructor(e,t,s,r,i,n){super(e,t,s,r),this.instanceId=S++,this.patchCount=0,this._renderState={current:{geometry:new Map,metrics:null},next:null,swap:!1,swapFrames:0,locked:!1},this._patches=new u.Z(100),this._bufferPatches=new u.Z(100),this._lastCommitTime=0,this.transforms.labelMat2d=(0,o.c)(),this._store=i,this._requestLabelUpdate=n}destroy(){super.destroy(),this._renderState.current.geometry.forEach(e=>e.destroy()),(0,l.pC)(this._renderState.next)&&this._renderState.next.geometry.forEach(e=>e.destroy()),this._renderState.current=null,this._renderState.next=null}get labelMetrics(){return this._renderState.current.metrics}get hasData(){return!!this._renderState.current.geometry.size}getGeometry(e){return this._renderState.current.geometry.get(e)}patch(e,t){this.patchCount++,e.clear&&this._patches.size>=50&&this._dropPatches();let s=e.addOrUpdate&&this.key.id!==e.addOrUpdate.tileKeyOrigin;t&&s?this._bufferPatches.enqueue(e):(e.sort=e.sort&&!t,this._patches.enqueue(e)),this.requestRender()}commit(e){if(this._lastCommitTime!==e.time){this._lastCommitTime=e.time;for(let e=0;e<4;e++)this._updateMesh(),this.isReady&&this._updateBufferMesh();this._renderState.swap&&(this._swapRenderStates(),this.requestRender())}}lock(){this._renderState.locked=!0}unlock(){this._renderState.locked=!1,this._flushUpdates(),this._swap()}_swapRenderStates(){if(this._renderState.next){if(this._renderState.locked)return this._renderState.swap=!0,void this.requestRender();this._renderState.swap=!0,this._swap()}}_swap(){this._renderState.swap&&(this._renderState.swap=!1,(0,l.pC)(this._renderState.next)&&(this._renderState.current.geometry.forEac
1h(e=>e.destroy()),this._renderState.current=this._renderState.next,this._renderState.next=null,this._requestLabelUpdate()))}_flushUpdates(){let e=this._patches.maxSize;for(;this._patches.size&&e--;)this._updateMesh(),this._swap()}_updateBufferMesh(){let e=this._bufferPatches.peek();if(!(0,l.pC)(e)||!e.clear||null===this._renderState.next)for(;this._bufferPatches.size;){let e=this._bufferPatches.dequeue();(0,l.pC)(e)&&this._patchBuffer(e)}}_updateMesh(){let e=this._patches.dequeue();if((0,l.pC)(e)){if((0,i.Z)("esri-2d-update-debug")){let t=e.addOrUpdate?.tileKeyOrigin,s=this.key.id===t?"SELF":t,r="";for(let t=0;t<5;t++)r+=e.addOrUpdate?.data[t]?.records?.byteLength?1:0;console.debug(this.key.id,"FeatureTile:patch",`[clear: ${e.clear} origin: ${s}, end:${e.end} data:${r}]`)}!0===e.clear&&((0,l.pC)(this._renderState.next)&&(this._renderState.next.geometry.forEach(e=>e.destroy()),this._renderState.next=null),this._renderState.next={geometry:new Map,metrics:null},(0,i.Z)("esri-2d-update-debug")&&console.debug(this.key.id,"FeatureTile:_updateMesh - Creating new renderState")),this.requestRender(),this._patch(e),e.end&&((0,i.Z)("esri-2d-update-debug")&&console.debug(this.key.id,"FeatureTile:_updateMesh - Encountered end message"),this.ready(),this._swapRenderStates())}}_patch(e){(0,f.Z_)(t=>{this._remove(t,e.remove),this._insert(t,e,!1)})}_patchBuffer(e){(0,f.Z_)(t=>{this._insert(t,e,!0)})}_insert(e,t,s){try{let r=(0,l.Pt)(this._renderState.next,this._renderState.current),n=t.addOrUpdate?.data[e],a=r.geometry;if((0,l.Wi)(n))return;a.has(e)||((0,i.Z)("esri-2d-update-debug")&&console.debug(this.key.id,`FeatureTile:_insert - Creating geometry buffer ${e}`),a.set(e,new T(e,this.stage))),(0,i.Z)("esri-2d-update-debug")&&console.debug(this.key.id,`FeatureTile:_insert - Inserting into ${e}, version=${t.addOrUpdate.version} stride=${n.stride}`),a.get(e).insert(n,t.sort,s),e===d.LW.LABEL&&this._insertLabelMetrics(t.type,n.metrics,t.clear)}catch(e){}}_insertLabelMetrics(e,t,s){let r=(0,l.Pt)(this._renderState.next,this._renderState.current);if((0,l.Wi)(t))return;let i=c.from(t);if((0,l.Wi)(r.metrics))r.metrics=i;else{if("update"===e){let e=i.getCursor();for(;e.next();)r.metrics.delete(e.id)}r.metrics.link(i)}}_remove(e,t){let s=(0,l.Pt)(this._renderState.next,this._renderState.current).geometry.get(e);t&&t.length&&s&&(s.remove(t),this._removeLabelMetrics(t))}_removeLabelMetrics(e){let{metrics:t}=(0,l.Pt)(this._renderState.next,this._renderState.current);if(!(0,l.Wi)(t)&&e.length)for(let s of e)for(;t.delete(s););}_dropPatches(){let e=[],t=!1;for(;this._patches.size;){let s=this._patches.dequeue();if((0,l.Wi)(s))break;if(s.clear){if(t)break;t=!0}e.push(s)}this._patches.clear(),e.forEach(e=>this._patches.enqueue(e))}}var V=s(54680),U=s(25970),k=s(54465),A=s(16943),L=s(49529);let I=(0,i.Z)("featurelayer-order-by-server-enabled");class R extends L.T{constructor(e,t,s,r){super(e),this._hitTestsRequests=[],this._layer=s,this._layerView=t,this._onUpdate=r}renderChildren(e){this.attributeView.update(),this.hasAnimation&&e.painter.effects.integrate.draw(e,e.attributeView),super.renderChildren(e)}hasEmptyAttributeView(){return this.attributeView.isEmpty()}
1isUpdating(){return this.attributeView.isUpdating()}hitTest(e){let t=this._hitTestsRequests.find(({x:t,y:s})=>t===e.x&&s===e.y),s=(0,n.hh)();return t?t.resolvers.push(s):(t={x:e.x,y:e.y,resolvers:[s]},this._hitTestsRequests.push(t)),this.requestRender(),s.promise}onTileData(e,t){let s=I&&"orderBy"in this._layer&&this._layer.orderBy,r=s?.length&&!s[0].valueExpression&&s[0].field,i=s&&this._layerView.orderByFields===r;e.patch(t,i),this.contains(e)||this.addChild(e),this.requestRender()}onTileError(e){this.contains(e)||this.addChild(e)}updateTransitionProperties(e,t){super.updateTransitionProperties(e,t),this._layerView.featureEffectView.transitionStep(e,t),this._layerView.featureEffectView.transitioning&&this.requestRender()}doRender(e){let{minScale:t,maxScale:s}=this._layer,r=e.state.scale;r<=(t||1/0)&&r>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}onAttributeStoreUpdate(){this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this._onUpdate()}get hasAnimation(){return this.hasLabels}setStencilReference(e){let{rendererSchema:t}=e.rendererInfo;if("dot-density"===t?.type&&t?.dotSize>1||"heatmap"===t?.type)for(let e of this.children)e.stencilRef=e.key.level+1;else super.setStencilReference(e)}get hasLabels(){if("sublayers"in this._layer)return this._layer.sublayers.some(e=>e.labelingInfo&&e.labelingInfo.length&&e.labelsVisible);let e=this._layer.featureReduction,t=e&&"labelingInfo"in e&&e.labelsVisible&&e.labelingInfo&&e.labelingInfo.length;return this._layer.labelingInfo&&this._layer.labelingInfo.length&&this._layer.labelsVisible||!!t}prepareRenderPasses(e){let t=e.registerRenderPass({name:"label",brushes:[A.U.label],target:()=>this.hasLabels?this.children:null,drawPhase:d.jx.LABEL|d.jx.LABEL_ALPHA}),s=e.registerRenderPass({name:"geometry",brushes:[A.U.fill,A.U.dotDensity,A.U.line,A.U.marker,A.U.heatmap,A.U.pieChart,A.U.text],target:()=>this.children,enableDefaultDraw:()=>!this._layerView.featureEffectView.hasEffects,effects:[{apply:e.effects.outsideEffect,enable:()=>this._layerView.featureEffectView.hasEffects,args:()=>this._layerView.featureEffectView.excludedEffects},{apply:e.effects.insideEffect,enable:()=>this._layerView.featureEffectView.hasEffects,args:()=>this._layerView.featureEffectView.includedEffects},{apply:e.effects.hittest,enable:()=>!!this._hitTestsRequests.length,args:()=>this._hitTestsRequests}]}),r=e.registerRenderPass({name:"highlight",brushes:[A.U.fill,A.U.dotDensity,A.U.line,A.U.marker,A.U.pieChart,A.U.text],target:()=>this.children,drawPhase:d.jx.HIGHLIGHT,enableDefaultDraw:()=>!1,effects:[{apply:e.effects.highlight,enable:()=>!!this._layerView.hasHighlight()}]});return[...super.prepareRenderPasses(e),s,r,t]}}let M=class extends U.Z{constructor(){super(...arguments),this.type="symbol"}install(e){let t=new R(this.tileInfoView,this.layerView,this.layer,()=>this.notifyChange("updating"));this.featuresView=t,e.addChild(t)}uninstall(e){e.removeChild(this.featuresView),this.featuresView.destroy(),this.featuresView=null}fetchResource(e,t){let{url:s}=e,r=this.featuresView.stage;try{return r.resourceManager.fetchResource(s,{signal:t.signal})}catch(e){return(0,n.D_)(e)?Promise.resolve({width:0,height:0}):Promise.reject(e)}}isUpdating(){let e=super.isUpdating(),t=!this.featuresView||this.featuresView.isUpdating(),s=this.featuresView?.hasEmptyAttributeView(),r=e||t||e&&s;return(0,i.Z)("esri-2d-log-updating")&&console.log(`Updating SymbolTileRenderer ${r} 2 -> updatingTiles ${e} 3 -> hasFeaturesView ${!!this.featuresView} 4 -> updatingFeaturesView ${t}`),r}hitTest(e){return this.featuresView.hitTest(e)}supportsRenderer(e){return null!=e&&["simple","class-breaks","unique-value","dot-density","dictionary","heatmap","pie-chart"].includes(e.type)}onConfigUpdate(e){let t=null;if(e&&"visualVariables"in e){let s=((0,V.aR)(e).visualVariables||[]).map(e=>{let t=e.clone();return"normalizationField"in e&&(t.normalizationField=null),e.valueExpression&&"$view.scale"!==e.valueExpression&&(t.valueExpression=null,t.field="nop"),t});t=(0,k.I)(s)}this.featuresView.setRendererInfo(e,t,this.layerView.featureEffect)}onTileData(e){let t=this.tiles.get(e.tileKey);t&&e.data&&this.featuresView.onTileData(t,e.data),this.layerView.view.labelManager.requestUpdate()}onTileError(e){let t=this.tiles.get(e.tileKey);t&&this.featuresView.onTileError(t)}forceAttributeTextureUpload(){this.featuresView.attributeView.forceTextureUpload()}lockGPUUploads(){this.featuresView.attributeView.lockTextureUpload(),this.tiles.forEac
4h(e=>e.lock())}unlockGPUUploads(){this.featuresView.attributeView.unlockTextureUpload(),this.tiles.forEach(e=>e.unlock())}async getMaterialItems(e){return this.featuresView.getMaterialItems(e)}invalidateLabels(){this.featuresView.hasLabels&&this.layerView.view.labelManager.requestUpdate()}createTile(e){let t=this.tileInfoView.getTileBounds((0,h.Ue)(),e),s=this.tileInfoView.getTileResolution(e.level),r=this.featuresView.attributeView;return new B(e,s,t[0],t[3],r,()=>this.layerView.view.labelManager.requestUpdate())}disposeTile(e){this.featuresView.removeChild(e),e.destroy(),this.layerView.view.labelManager.requestUpdate()}},z=M=(0,r._)([(0,a.j)("esri.views.2d.layers.features.tileRenderers.SymbolTileRenderer")],M)},54465:function(e,t,s){s.d(t,{I:function(){return _},qc:function(){return l}});var r=s(61681),i=s(95550),n=s(62173),a=s(14266),h=s(38716),u=s(41657);function l(e,t){if(!e||!t)return e;switch(t){case"radius":case"distance":return 2*e;case"diameter":case"width":break;case"area":return Math.sqrt(e)}return e}function o(e){return e.map(e=>({value:e.value,size:(0,i.t_)(e.size)}))}function d(e){return"string"==typeof e||"number"==typeof e?(0,i.t_)(e):{type:"size",expression:e.expression,stops:o(e.stops)}}let f=e=>{let t=[],s=[],r=o(e),n=r.length;for(let e=0;e<6;e++){let h=r[Math.min(e,n-1)];t.push(h.value),s.push(null==h.size?a.AI:(0,i.F2)(h.size))}return{values:new Float32Array(t),sizes:new Float32Array(s)}};function _(e){let t=e&&e.length>0?{}:null,s=t?{}:null;if(!t)return{vvFields:t,vvRanges:s};for(let i of e)if(i.field&&(t[i.type]=i.field),"size"===i.type)switch(s.size||(s.size={}),(0,u.a)(i)){case h.X.SIZE_MINMAX_VALUE:s.size.minMaxValue={minDataValue:i.minDataValue,maxDataValue:i.maxDataValue,minSize:d(i.minSize),maxSize:d(i.maxSize)};break;case h.X.SIZE_SCALE_STOPS:s.size.scaleStops={stops:o(i.stops)};break;case h.X.SIZE_FIELD_STOPS:if(i.levels){let e={};for(let t in i.levels)e[t]=f(i.levels[t]);s.size.fieldStops={type:"level-dependent",levels:e}}else s.size.fieldStops={type:"static",...f(i.stops)};break;case h.X.SIZE_UNIT_VALUE:s.size.unitValue={unit:i.valueUnit,valueRepresentation:i.valueRepresentation}}else"color"===i.type?s.color=function(e){if((0,r.Wi)(e)||e.normalizationField)return null;let t={field:null,values:[0,0,0,0,0,0,0,0],colors:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]};if("string"==typeof e.field){if(!e.stops)return null;{if(e.stops.length>8)return null;t.field=e.field;let s=e.stops;for(let e=0;e<8;++e){let r=s[Math.min(e,s.length-1)];t.values[e]=r.value,c(t.colors,e,r.color)}}}else{if(!(e.stops&&e.stops.length>=0))return null;{let s=e.stops&&e.stops.length>=0&&e.stops[0].color;for(let e=0;e<8;e++)t.values[e]=1/0,c(t.colors,e,s)}}for(let e=0;e<32;e+=4)(0,n.pr)(t.colors,e,!0);return t}(i):"opacity"===i.type?s.opacity=function(e){let t={values:[0,0,0,0,0,0,0,0],opacities:[0,0,0,0,0,0,0,0]};if("string"==typeof e.field){if(!e.stops)return null;{if(e.stops.length>8)return null;let s=e.stops;for(let e=0;e<8;++e){let r=s[Math.min(e,s.length-1)];t.values[e]=r.value,t.opacities[e]=r.opacity}}}else{if(!(e.stops&&e.stops.length>=0))return null;{let s=e.stops&&e.stops.length>=0&&e.stops[0].opacity;for(let e=0;e<8;e++)t.values[e]=1/0,t.opacities[e]=s}}return t}(i):"rotation"===i.type&&(s.rotation={type:i.rotationType});return{vvFields:t,vvRanges:s}}function c(e,t,s){e[4*t+0]=s.r/255,e[4*t+1]=s.g/255,e[4*t+2]=s.b/255,e[4*t+3]=s.a}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.