@arcgis/core 4.29.7 → 4.29.9
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{4984e2b79d862114d6a6.js → 1a8d56e01ddfec2257c3.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8ac511280f873960d46.js → 1dc474a28d5ddac1a4b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{3afb525a131b6841276b.js → 1e4d779a884f13762601.js} +1 -1
- package/assets/esri/core/workers/chunks/{2447a4d5886aeb0ff72a.js → 205597cd91cb7ff3d2b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c50daccd84ba5545bfe.js → 22ebdec0867e44d8d58c.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc5ac713872766571e07.js → 31c065746e53f7518c17.js} +1 -1
- package/assets/esri/core/workers/chunks/{da4616b02dd0c3dd3d5d.js → 321547d796a2ecd72ab4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c3ae96ec90e9ed7dd50.js → 32be478638e9e643ea32.js} +1 -1
- package/assets/esri/core/workers/chunks/{c556644bb0cf88770939.js → 413978b96c88d5ff01ee.js} +1 -1
- package/assets/esri/core/workers/chunks/{a61f337802ae963d7f65.js → 59f03847a9eb96e5f65c.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a98d2e026f63a581b1e.js → 5b08309b184f5d8345a0.js} +1 -1
- package/assets/esri/core/workers/chunks/{8225febaf0a412f4cee4.js → 5e4465448b2728cafab0.js} +1 -1
- package/assets/esri/core/workers/chunks/6301990e489d31596bc8.js +1 -0
- package/assets/esri/core/workers/chunks/631bda7b99a27f4453c1.js +1 -0
- package/assets/esri/core/workers/chunks/{c527692694688a5b3b07.js → 658a8ee9a4f24bc03f7f.js} +1 -1
- package/assets/esri/core/workers/chunks/{9a8ab968ebb18480481d.js → 8699eaadd3fb6709fd94.js} +1 -1
- package/assets/esri/core/workers/chunks/{b139cf91bc148aa84419.js → 96cb79adabfbbcc3e707.js} +1 -1
- package/assets/esri/core/workers/chunks/99ac2a6a5be0604ee4c2.js +1 -0
- package/assets/esri/core/workers/chunks/{2433b39624a7e274cb98.js → b4c41a8244b7371e864e.js} +1 -1
- package/assets/esri/core/workers/chunks/{48db6e0bbb1a9c043193.js → b7a78246d25dc07f173d.js} +1 -1
- package/assets/esri/core/workers/chunks/{60ab18c6a04d4b2f1d4c.js → bb05528d2ca12c57a031.js} +1 -1
- package/assets/esri/core/workers/chunks/{b42a83db83851cb57d44.js → bed684a8d38fa7ac5eb7.js} +1 -1
- package/assets/esri/core/workers/chunks/{5227f9eea6988aadad7f.js → cf0dc0ccbeaf9458de6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f59b5ea05caca8a1a398.js → d40408be9bbcb0021d18.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe74ee642bc72fe18210.js → d576aa444ad7c9289617.js} +1 -1
- package/assets/esri/core/workers/chunks/{f60e5dd0e712cf32f782.js → f2e8b75ad3b574894ade.js} +1 -1
- package/assets/esri/core/workers/chunks/{b9c55ff1f21db198ce03.js → ff96940be6a4c8489ebb.js} +1 -1
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/vec32.js +1 -1
- package/chunks/vec42.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +5 -5
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/makeScheduleFunction.js +5 -0
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomSphericalMomentumController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/geometryUtils/sphere.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/assets/esri/core/workers/chunks/967812e66fef41febb98.js +0 -1
- package/assets/esri/core/workers/chunks/a28b7d868346e13468bb.js +0 -1
- package/assets/esri/core/workers/chunks/ccd53b81c2688dd11584.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9368,8528],{8528:(e,t,i)=>{i.d(t,{c:()=>s,g:()=>n});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},11004:(e,t,i)=>{i.d(t,{o:()=>n});var s=i(74452);class n{constructor(e,t){this._storage=new s.kB,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},74452:(e,t,i)=>{i.d(t,{ML:()=>o,kB:()=>a});var s,n,r=i(24680);(n=s||(s={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,i,s=0){this._storage.put(this,e,t,i,s)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.c,this._users=new r.c}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,o.size,s.ALL)),n>this._maxSize)return void this._notifyRemove(t,i,n,s.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,s.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new c(i,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,i,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===i){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,i,n,s.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._users.forAll((i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}}))}));const s={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"}));const n=Object.keys(t);n.sort(((e,i)=>t[i]-t[e])),n.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]));for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,s.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,s.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,s,i);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const i=e?.id;let s=!0;for(;s;){s=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!i||n.startsWith(i))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if((!i||s.startsWith(i))&&(this._purgeItem(s,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,s.SOME);null!=n&&n>0&&(this._size+=n,i&&(i.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class c{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}},39180:(e,t,i)=>{function s(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(u&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,s=0;for(;!t&&s<=e.length;)t=!c.test(e[s]),s++;i=!t}}return i}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const i=t.groups,s=+i.year,n=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),c=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(c>59)return null;const u=i.ms??"0",h=u?+u.padEnd(3,"0").substring(0,3):0;let d;if(i.isUTC||!i.offsetSign)d=Date.UTC(s,n,r,o,a,c,h);else{const e=+i.offsetHours,t=+i.offsetMinutes;d=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,n,r,o,a,c,h)}return Number.isNaN(d)?null:d}i.d(t,{H9:()=>s,_:()=>n,sn:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,c=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,u=!Number.isNaN(new Date("technology 10").getTime())},3024:(e,t,i)=>{i.d(t,{U:()=>o});var s=i(92400),n=i(24680),r=i(85304);class o{constructor(e=9,t){this._compareMinX=u,this._compareMinY=h,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(),x.prune(),S.prune(),b.prune(),I.prune()}all(e){this._all(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(_(e,i))for(x.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;_(e,o)&&(i.leaf?t(r):g(e,o)?this._all(r,t):x.push(r))}i=x.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!_(e,t))return!1;for(x.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(_(e,r)){if(t.leaf||g(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),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 F([]),this}remove(e){if(!e)return this;let t,i=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(b.clear(),I.clear();i||b.length>0;){if(i||(i=b.pop(),n=b.data[b.length-1],r=I.pop()??0,o=!0),i.leaf&&(t=(0,s.IP)(i.children,e,i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),b.push(i),this._condense(b),this;o||i.leaf||!g(i,a)?n?(r++,i=n.children[r],o=!1):i=null:(b.push(i),I.push(r),r=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let i=e;for(S.clear();i;){if(!0===i.leaf)for(const e of i.children)t(e);else S.pushArray(i.children);i=S.pop()??null}}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new F(e.slice(t,i+1));return a(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new z([]);o.height=s;const l=Math.ceil(n/r),c=l*Math.ceil(Math.sqrt(r));y(e,t,i,c,this._compareMinX);for(let n=t;n<=i;n+=c){const t=Math.min(n+c-1,i);y(e,n,t,l,this._compareMinY);for(let i=n;i<=t;i+=l){const n=Math.min(i+l-1,t);o.children.push(this._build(e,i,n,s-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),l=p(e,o)-a;l<n?(n=l,s=a<s?a:s,i=o):l===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);b.clear();const r=this._chooseSubtree(n,this._data,t,b);for(r.children.push(e),c(r,n);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;this._adjustParentBBoxes(n,b,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=i.children.splice(r,i.children.length-r),l=i.leaf?new F(o):new z(o);l.height=i.height,a(i,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(i,l)}_splitRoot(e,t){this._data=new z([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,i,this._toBBox),c=m(t,a),u=d(t)+d(a);c<s?(s=c,r=o,n=u<n?u:n):c===s&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:u,n=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=l(e,0,t,n),o=l(e,i-t,i,n);let a=f(r)+f(o);for(let s=t;s<i-t;s++){const t=e.children[s];c(r,e.leaf?n(t):t),a+=f(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];c(o,e.leaf?n(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,i){for(let s=i;s>=0;s--)c(t.data[s],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.IP)(r,i,r.length,n.indexHint),1)}else this.clear();else a(i,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 a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,i,s,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],c(n,e.leaf?s(r):r);return n}function c(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 u(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(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 m(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function g(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 y(e,t,i,s,n){const o=[t,i];for(;o.length;){const t=o.pop(),i=o.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,r.q)(e,a,i,t,n),o.push(i,a,a,t)}}const x=new n.c,S=new n.c,b=new n.c,I=new n.c({deallocator:void 0});class w{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class v extends w{constructor(){super(...arguments),this.height=1,this.indexHint=new s.is}}class F extends v{constructor(e){super(),this.children=e,this.leaf=!0}}class z extends v{constructor(e){super(),this.children=e,this.leaf=!1}}},55376:(e,t,i)=>{i.d(t,{E9:()=>a,K0:()=>u,Qt:()=>c});var s=i(88264),n=i(89960);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,n.a8)()){let t=(e=e.toLowerCase())in r;if(!t){const i=e.split("-");i.length>1&&i[0]in r&&(e=i[0],t=!0),t||(e="en")}const[i,s,o="#,##0.###"]=r[e];return{decimal:i,group:s,pattern:o}}function a(e,t){const i=o((t={...t}).locale);t.customs=i;const s=t.pattern||i.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,i){const s=(i=i||{}).customs.group,n=i.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,c=o.match(a);if(!c)throw new Error("unable to find a number expression in pattern: "+t);return!1===i.fractional&&(i.places=0),t.replace(a,function(e,t,i){!0===(i=i||{}).places&&(i.places=0),i.places===1/0&&(i.places=6);const s=t.split("."),n="string"==typeof i.places&&i.places.indexOf(",");let r=i.places;n?r=i.places.substring(n+1):+r>=0||(r=(s[1]||[]).length),i.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(s[1]||i.places){n&&(i.places=i.places.substring(0,n));const e=void 0!==i.places?i.places:s[1]&&s[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+r<a.length&&(o[1]=a.substr(0,Number(r)))}else o[1]&&o.pop();const l=s[0].replace(",","");let c=l.indexOf("0");-1!==c&&(c=l.length-c,c>o[0].length&&(o[0]=o[0].padStart(c,"0")),l.includes("#")||(o[0]=o[0].substr(o[0].length-c)));let u,h,d=s[0].lastIndexOf(",");if(-1!==d){u=s[0].length-d-1;const e=s[0].substr(0,d);d=e.lastIndexOf(","),-1!==d&&(h=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-u;f.push(t>0?e.substr(t):e),e=t>0?e.slice(0,t):"",h&&(u=h,h=void 0)}return o[0]=f.reverse().join(i.group||","),o.join(i.decimal||".")}(e,c[0],{decimal:n,group:s,places:i.places,round:i.round}))}(e,s,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function c(e){const t=o((e=e||{}).locale),i=e.pattern||t.pattern,n=t.group,r=t.decimal;let a=1;if(i.includes("%"))a/=100;else if(i.includes("‰"))a/=1e3;else if(i.includes("¤"))throw new Error("currency notation not supported");const c=i.split(";");1===c.length&&c.push("-"+c[0]);const u=d(c,(t=>(t="(?:"+(0,s.cB)(t,".")+")").replace(l,(t=>{const i={signed:!1,separator:e.strict?n:[n,""],fractional:e.fractional,decimal:r,exponent:!1},s=t.split(".");let o=e.places;1===s.length&&1!==a&&(s[1]="###"),1===s.length||0===o?i.fractional=!1:(void 0===o&&(o=e.pattern?s[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(i.fractional=!0),!e.places&&+o<s[1].length&&(o+=","+s[1].length),i.places=o);const l=s[0].split(",");return l.length>1&&(i.groupSize=l.pop().length,l.length>1&&(i.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=h(e),i=d(e.fractional,(t=>{let i="";return t&&0!==e.places&&(i="\\"+e.decimal,e.places===1/0?i="(?:"+i+"\\d+)?":i+="\\d{"+e.places+"}"),i}),!0);let s=t+i;return i&&(s="(?:(?:"+s+")|(?:"+i+"))"),s+d(e.exponent,(t=>t?"([eE]"+h({signed:e.eSigned})+")":""))}(i)+")"}))),!0);return{regexp:u.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:r,factor:a}}function u(e,t){const i=c(t),s=new RegExp("^"+i.regexp+"$").exec(e);if(!s)return NaN;let n=s[1];if(!s[1]){if(!s[2])return NaN;n=s[2],i.factor*=-1}return n=n.replaceAll(new RegExp("["+i.group+"\\s\\xa0]","g"),"").replace(i.decimal,"."),Number(n)*i.factor}function h(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,s.cB)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const i=e.groupSize,n=e.groupSize2;if(n){const e="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*["+t+"]\\d{"+i+"})";return i-n>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(i-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+t+"]\\d{"+i+"})*)"}),!0)}const d=(e,t,i)=>{if(!(e instanceof Array))return t(e);const s=[];for(let i=0;i<e.length;i++)s.push(t(e[i]));return f(s.join("|"),Boolean(i))},f=(e,t)=>"("+(t?"?:":"")+e+")"},57896:(e,t,i)=>{i.d(t,{Eq:()=>d,KG:()=>_,_8:()=>g,_I:()=>c,aE:()=>l,du:()=>m,on:()=>h}),i(40196),i(2952);var s=i(60976),n=i(38912),r=i(70680),o=i(10860),a=i(37176);function l(e,t,i={}){return u(e,t,i,f)}function c(e,t,i={}){return u(e,t,i,p)}function u(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.oR)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,a.M9)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function h(e,t,i,o={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),o.onListenerRemove?.(a),a=null,c=null)}function d(e){o.once&&o.once&&(0,r.oR)(u),i(e)}const f=l(e,((e,i)=>{h(),(0,s.sh)(e)&&(a=e,c=(0,s.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,n.uU)((()=>{f.remove(),h()})),u}function d(e,t){return function(e,t,i){if((0,o.wv)(i))return Promise.reject((0,o.Uh)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.oR)(a)}return new Promise(((s,r)=>{a=(0,n.Ip)([(0,o.wD)(i,(()=>{l(),r((0,o.Uh)())})),u(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(41168);const m={sync:!0},g={initial:!0},_={sync:!0,initial:!0}},20480:(e,t,i)=>{i.d(t,{WW:()=>I});var s=i(6220),n=i(20744),r=i(66360),o=i(7488),a=i(48516),l=i(44048),c=i(60544),u=i(29120),h=(i(60708),i(2600)),d=i(6704),f=i(21980),p=i(28176),m=i(81976);const g=()=>r.c.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function x(e,t,i){if(t){const t=function(e,t){if(!(e instanceof a.c||e instanceof o.c)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g().error(e),new n.c(e)}const i=(0,l.iM)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const n=e[s][0],r=e[s][1],o=e[s+1][0],a=e[s+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),c=(a-r)/l,u=(o-n)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const s=e*t,o=u*s+n,a=c*s+r;i.push([o,a])}const e=(l+Math.floor(h-1)*t)/2,s=u*e+n,o=c*e+r;i.push([s,o])}i.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.c({rings:s,spatialReference:e.spatialReference}):new a.c({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.aq)(t,!0)}return i&&(e=(0,l.wb)(e,i)),e}function S(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,l.yK)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,l.yK)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,l.yK)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,l.yK)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function b(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const n=t.cutIndexes[s],r=t.geometries[s],o=(0,l.iM)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,l.yK)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(s,0))}return!0}}))}if(n===i){if(_(e))for(const t of(0,l.iM)(r))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,l.iM)(r))e[n]=e[n].addPath(t)}else i=n,e[n]=r}return e}async function I(e,t,i){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&g().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??s.default.geometryServiceUrl;let r,_,y,w,v,F,z,B,M=0;const N=[],E=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,_=(0,c.Nq)(r),y=r.isWebMercator,F=y?102100:4326,w=l.Hh[F].maxX,v=l.Hh[F].minX,z=l.Hh[F].plus180Line,B=l.Hh[F].minus180Line),_)if("mesh"===t.type)E.push(t);else if("point"===t.type)E.push(S(t.clone(),w,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>S(e,w,v))),E.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,_);E.push(e.rings?new o.c(e):e)}else if(t.extent){const e=t.extent,i=(0,l.yK)(e.xmin,v)*(2*w);let s=0===i?t.clone():(0,l.wb)(t.clone(),i);e.offset(i,0),e.intersects(z)&&e.xmax!==w?(M=e.xmax>M?e.xmax:M,s=x(s,y),N.push(s),E.push("cut")):e.intersects(B)&&e.xmin!==v?(M=e.xmax*(2*w)>M?e.xmax*(2*w):M,s=x(s,y,360),N.push(s),E.push("cut")):E.push(s)}else E.push(t.clone());else E.push(t);else E.push(t);let T=(0,l.yK)(M,w),R=-90;const A=T,C=new a.c;for(;T>0;){const e=360*T-180;C.addPath([[e,R],[e,-1*R]]),R*=-1,T--}if(N.length>0&&A>0){const t=b(N,await async function(e,t,i,s){const n=(0,f.UX)(e),r=t[0].spatialReference,o={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,c.um)(r),target:JSON.stringify({geometryType:(0,d.Ce)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},a=await(0,h.c)(n.path+"/cut",o),{cutIndexes:l,geometries:u=[]}=a.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,d.h4)(e);return t.spatialReference=r,t}))}}(n,N,C,i)),s=[],r=[];for(let i=0;i<E.length;i++){const n=E[i];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[i];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(s.push(n),r.push("simplify")):r.push(y?(0,u.w7)(n):n)}}if(!s.length)return r;const o=await async function(e,t,i){const s="string"==typeof e?(0,p.as)(e):e,n=t[0].spatialReference,r=(0,d.Ce)(t[0]),o={...i,query:{...s.query,f:"json",sr:(0,c.um)(n),geometries:JSON.stringify((0,m.y)(t))}},{data:a}=await(0,h.c)(s.path+"/simplify",o);return(0,m.Q)(a.geometries,r,n)}(n,s,i),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(y?(0,u.w7)(o.shift()):o.shift())}return a}const L=[];for(let e=0;e<E.length;e++){const t=E[e];if("cut"!==t)L.push(t);else{const e=N.shift();L.push(!0===y?(0,u.w7)(e):e)}}return L}},44048:(e,t,i)=>{i.d(t,{Hh:()=>o,iM:()=>c,wb:()=>l,yK:()=>a});var s=i(48516),n=i(56156),r=i(6704);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.c({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator}),minus180Line:new s.c({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.c({paths:[[[180,-180],[180,180]]],spatialReference:n.c.WGS84}),minus180Line:new s.c({paths:[[[-180,-180],[-180,180]]],spatialReference:n.c.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=c(e);for(const e of i)for(const i of e)i[0]+=t;return e}function c(e){return(0,r.Cs)(e)?e.rings:e.paths}},6904:(e,t,i)=>{i.d(t,{c:()=>a});var s=i(9456),n=i(3024),r=i(83372);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.U(9,(0,s.c)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((i,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.FZ)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9107:(e,t,i)=>{i.d(t,{c:()=>p});var s=i(92400),n=i(20744),r=i(77860),o=i(66360),a=i(77048),l=i(83372),c=i(97088),u=i(6904),h=i(83624),d=i(51752);const f=(0,a.Su)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new u.c,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.c,this.featureAdapter=d.u}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,n]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:n,spatialReference:(0,h.C6)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(s.G6)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Qv)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,i)=>{this._markedIds.has(i)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(this._markedIds.add(t),i?(e.displayId=i.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,c.C_)(null!=s?s:(0,l.Su)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._markedIds.add(t);const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,c.C_)((0,l.Su)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},88300:(e,t,i)=>{i.r(t),i.d(t,{default:()=>H}),i(60708);var s=i(2600),n=i(40196),r=i(39180),o=i(20744),a=i(66360),l=i(10860),c=i(28176),u=i(60074),h=i(3452),d=i(60544),f=i(29120),p=i(34888),m=i(85152),g=i(9107),_=i(7684),y=i(47302),x=i(55376),S=i(564);const b=/^\s*"([\S\s]*)"\s*$/,I=/""/g,w="\n",v=[","," ",";","|","\t"];function*F(e,t,i){let s=0;for(;s<=e.length;){const n=e.indexOf(t,s),r=e.substring(s,n>-1?n:void 0);s+=r.length+t.length,i&&!r.trim()||(yield r)}}function z(e){const t=e.includes("\r\n")?"\r\n":w;return F(e,t,!0)}function B(e,t){return F(e,t,!1)}function M(e,t,i){e=e.trim(),t=t?.trim();const s=[],n=Array.from(new Set([i?.delimiter,...v])).filter((e=>null!=e));for(const i of n){const n=T(e,i).length,r=T(t,i).length??n;n>1&&s.push({weight:Math.min(n,r),delimiter:i})}const r=s.sort((({weight:e},{weight:t})=>t-e)).map((({delimiter:e})=>e));for(const t of r){const s=A(E(e,t).names,i?.longitudeField,i?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:t,locationInfo:s}}return{delimiter:r[0],locationInfo:null}}function*N(e,t,i,s=(()=>Object.create(null))){const n=z(e);n.next();let r="",o="",a=0,l=s(),c=0;e:for(const e of n){const n=B(e,i);for(const e of n)if(r+=o+e,o="",a+=R(e),a%2==0){if(a>0){const e=b.exec(r);if(!e){l=s(),c=0,r="",a=0;continue e}l[t[c]]=e[1].replaceAll(I,'"'),c++}else l[t[c]]=r,c++;r="",a=0}else o=i;0===a?(yield l,l=s(),c=0):o=w}}function E(e,t){const i=T(e,t).filter((e=>null!=e)),s=i.map((e=>(0,S.gP)(e)));for(let e=s.length-1;e>=0;e--)s[e]||(s.splice(e,1),i.splice(e,1));return{names:s,aliases:i}}function T(e,t){if(!e?.length)return[];const i=[];let s="",n="",r=0;const o=B(e,t);for(const e of o)if(s+=n+e,n="",r+=R(e),r%2==0){if(r>0){const e=b.exec(s);e&&i.push(e[1].replaceAll(I,'"'))}else i.push(s);s="",r=0}else n=t;return i}function R(e){let t=0,i=0;for(i=e.indexOf('"',i);i>=0;)t++,i=e.indexOf('"',i+1);return t}function A(e,t,i){t=(0,S.gP)(t)?.toLowerCase(),i=(0,S.gP)(i)?.toLowerCase();const s=e.map((e=>e.toLowerCase())),n=t?e[s.indexOf(t)]:null,r=i?e[s.indexOf(i)]:null;return{longitudeFieldName:n||e[s.indexOf(k.find((e=>s.includes(e))))],latitudeFieldName:r||e[s.indexOf(O.find((e=>s.includes(e))))]}}function C(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map((e=>{if(""!==e){if(!t.test(e)){let t=L(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.H9)(e)?"date":"string"}})).reduce(((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0))}const L=function(){const e=(0,x.Qt)(),t=new RegExp("^"+e.regexp+"$"),i=new RegExp("["+e.group+"\\s\\xa0]","g"),s=e.factor;return n=>{const r=t.exec(n);if(e.factor=s,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(i,"").replace(e.decimal,"."),+o*e.factor}}(),O=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],k=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];var X=i(17724),Y=i(16424),q=i(28484),j=i(56156);const P=(0,X.w7)("esriGeometryPoint"),D=["csv"],U=[0,0];class G{constructor(e,t){this.x=e,this.y=t}}class H{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[i]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),s=function(e,t){const i=t.parsingOptions||{},s={delimiter:i.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:i.latitudeField,longitudeFieldName:i.longitudeField}},n=s.layerDefinition={name:(0,c.u8)(t.url,D)||"csv",dateFieldsTimeReference:{timeZoneIANA:q.Gw},drawingInfo:P,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:i.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:i.spatialReference||{wkid:4326}}},r=z(e),a=r.next().value?.trim(),l=r.next().value?.trim();if(!a)throw new o.c("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:u,locationInfo:h}=M(a,l,i);if(!u)throw new o.c("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:i});if(!h)throw new o.c("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:i});s.locationInfo=h,s.delimiter=u;const{names:d,aliases:f}=E(a,u),p=function(e,t,i,s,n){const r=[],o=N(e,i,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<i.length;e++){const t=i[e],o=s[e];if(t===n.longitudeFieldName||t===n.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(C(a.map((e=>e[t])))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}r.push({name:t,type:e,alias:o,length:(0,S.G0)(e)})}}return r}(e,s.delimiter,d,f,s.locationInfo);if(i.fields?.length){const e=new Y.c(i.fields);for(const t of p){const i=e.get(t.name);i&&Object.assign(t,i)}}if(!p.some((e=>"esriFieldTypeOID"===e.type&&(n.objectIdField=e.name,!0)))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};n.objectIdField=e.name,p.unshift(e)}n.fields=p;const m=new Y.c(n.fields);if(s.locationInfo&&(s.locationInfo.latitudeFieldName=m.get(s.locationInfo.latitudeFieldName).name,s.locationInfo.longitudeFieldName=m.get(s.locationInfo.longitudeFieldName).name),n.timeInfo){const e=n.timeInfo;if(e.startTimeField){const t=m.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=m.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=m.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(n.timeInfo=null)}return s}(i,e);this._locationInfo=s.locationInfo,this._delimiter=s.delimiter,this._queryEngine=this._createQueryEngine(s);const n=await this._createFeatures(i);this._queryEngine.featureStore.addMany(n);const{fullExtent:r,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(s.layerDefinition.extent=r,a){const{start:e,end:t}=a;s.layerDefinition.timeInfo.timeExtent=[e,t]}return s}async applyEdits(){throw new o.c("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,n.kn)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.mA)(e)||a.c.getLogger("esri.layers.CSVLayer").error(new o.c("csv-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:i}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:i}=this._loadOptions;if(!t)throw new o.c("csv-layer:invalid-source","url not defined");const n=(0,c.as)(t);return(await(0,s.c)(n.path,{query:{...n.query,...i},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:i,extent:s,timeInfo:n}=e.layerDefinition,r=new g.c({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new y.U({fieldsIndex:Y.c.fromLayerJSON({fields:i,dateFieldsTimeReference:{timeZoneIANA:q.Gw}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:n,objectIdField:t,spatialReference:s.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:i}=this._locationInfo,{objectIdField:s,fieldsIndex:n,spatialReference:o}=this._queryEngine;let a=[];const l=[],c=n.fields.filter((e=>e.name!==s)).map((e=>e.name));let g=0;const _={};for(const e of n.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,S.gB)(e);void 0!==t&&(_[e.name]=t)}const y=N(e,c,this._delimiter,(0,X.GA)(_,s));for(const e of y){const o=this._parseCoordinateValue(e[t]),c=this._parseCoordinateValue(e[i]);if(null!=c&&null!=o&&!isNaN(o)&&!isNaN(c)){e[t]=o,e[i]=c;for(const s in e)if(s!==t&&s!==i)if(n.isDateField(s))e[s]=(0,r.sn)(e[s]);else if(n.isNumericField(s)){const t=L(e[s]);isNaN(t)?e[s]=null:e[s]=t}e[s]=g,g++,a.push(new G(c,o)),l.push(e)}}if(!(0,d.yK)({wkid:4326},o))if((0,d.kn)(o))for(const e of a)[e.x,e.y]=(0,f.S6)(e.x,e.y,U);else a=(0,u.projectMany)(h.O,a,j.c.WGS84,o,null,null);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:i}=a[e],n=l[e];n[s]=e+1,x.push(new p._M(new m.c([],[t,i]),n,null,n[s]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=L(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,_.Qv)(d.UH,e)}catch{throw new o.c("csv-layer:projection-not-supported","Projection not supported")}}}},17724:(e,t,i)=>{i.d(t,{G4:()=>d,GA:()=>u,QD:()=>h,w7:()=>a});var s=i(9456),n=i(62088),r=i(13136),o=i(9504);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.qe:"esriGeometryPolyline"===e?o.MZ:o.yq}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let c=1;function u(e,t){if((0,s.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this.${t} = null;`;for(const t in e)i+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${c++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new s}catch(i){return()=>({[t]:null,...e})}}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.ct)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},81976:(e,t,i)=>{i.d(t,{Q:()=>r,y:()=>n});var s=i(6704);function n(e){return{geometryType:(0,s.Ce)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,i){const n=(0,s.uG)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=i,t}))}},21980:(e,t,i)=>{i.d(t,{OW:()=>a,UX:()=>o,sR:()=>r}),i(6220),i(47620);var s=i(62088),n=i(28176);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.as)(e):(0,s.ct)(e)}function a(e,t,i){const s={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))s[n]=r.map((e=>a({item:e},t,i).item));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?r:JSON.stringify(r);else s[n]=r}return s}i(20572)},9504:(e,t,i)=>{i.d(t,{MZ:()=>r,aV:()=>c,gF:()=>a,gP:()=>l,qe:()=>n,wp:()=>u,yq:()=>o});const s=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9368,8528],{8528:(e,t,i)=>{i.d(t,{c:()=>s,g:()=>n});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},11004:(e,t,i)=>{i.d(t,{o:()=>n});var s=i(74452);class n{constructor(e,t){this._storage=new s.kB,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},74452:(e,t,i)=>{i.d(t,{ML:()=>o,kB:()=>a});var s,n,r=i(24680);(n=s||(s={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,i,s=0){this._storage.put(this,e,t,i,s)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.c,this._users=new r.c}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,o.size,s.ALL)),n>this._maxSize)return void this._notifyRemove(t,i,n,s.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,s.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new c(i,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,i,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===i){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,i,n,s.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._users.forAll((i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}}))}));const s={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"}));const n=Object.keys(t);n.sort(((e,i)=>t[i]-t[e])),n.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]));for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,s.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,s.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,s,i);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const i=e?.id;let s=!0;for(;s;){s=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!i||n.startsWith(i))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if((!i||s.startsWith(i))&&(this._purgeItem(s,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,s.SOME);null!=n&&n>0&&(this._size+=n,i&&(i.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class c{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}},39180:(e,t,i)=>{function s(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(u&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,s=0;for(;!t&&s<=e.length;)t=!c.test(e[s]),s++;i=!t}}return i}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const i=t.groups,s=+i.year,n=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),c=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(c>59)return null;const u=i.ms??"0",h=u?+u.padEnd(3,"0").substring(0,3):0;let d;if(i.isUTC||!i.offsetSign)d=Date.UTC(s,n,r,o,a,c,h);else{const e=+i.offsetHours,t=+i.offsetMinutes;d=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,n,r,o,a,c,h)}return Number.isNaN(d)?null:d}i.d(t,{H9:()=>s,_:()=>n,sn:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,c=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,u=!Number.isNaN(new Date("technology 10").getTime())},3024:(e,t,i)=>{i.d(t,{U:()=>o});var s=i(92400),n=i(24680),r=i(85304);class o{constructor(e=9,t){this._compareMinX=u,this._compareMinY=h,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(),x.prune(),S.prune(),b.prune(),I.prune()}all(e){this._all(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(_(e,i))for(x.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;_(e,o)&&(i.leaf?t(r):g(e,o)?this._all(r,t):x.push(r))}i=x.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!_(e,t))return!1;for(x.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(_(e,r)){if(t.leaf||g(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),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 F([]),this}remove(e){if(!e)return this;let t,i=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(b.clear(),I.clear();i||b.length>0;){if(i||(i=b.pop(),n=b.data[b.length-1],r=I.pop()??0,o=!0),i.leaf&&(t=(0,s.IP)(i.children,e,i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),b.push(i),this._condense(b),this;o||i.leaf||!g(i,a)?n?(r++,i=n.children[r],o=!1):i=null:(b.push(i),I.push(r),r=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let i=e;for(S.clear();i;){if(!0===i.leaf)for(const e of i.children)t(e);else S.pushArray(i.children);i=S.pop()??null}}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new F(e.slice(t,i+1));return a(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new z([]);o.height=s;const l=Math.ceil(n/r),c=l*Math.ceil(Math.sqrt(r));y(e,t,i,c,this._compareMinX);for(let n=t;n<=i;n+=c){const t=Math.min(n+c-1,i);y(e,n,t,l,this._compareMinY);for(let i=n;i<=t;i+=l){const n=Math.min(i+l-1,t);o.children.push(this._build(e,i,n,s-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),l=p(e,o)-a;l<n?(n=l,s=a<s?a:s,i=o):l===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);b.clear();const r=this._chooseSubtree(n,this._data,t,b);for(r.children.push(e),c(r,n);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;this._adjustParentBBoxes(n,b,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=i.children.splice(r,i.children.length-r),l=i.leaf?new F(o):new z(o);l.height=i.height,a(i,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(i,l)}_splitRoot(e,t){this._data=new z([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,i,this._toBBox),c=m(t,a),u=d(t)+d(a);c<s?(s=c,r=o,n=u<n?u:n):c===s&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:u,n=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=l(e,0,t,n),o=l(e,i-t,i,n);let a=f(r)+f(o);for(let s=t;s<i-t;s++){const t=e.children[s];c(r,e.leaf?n(t):t),a+=f(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];c(o,e.leaf?n(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,i){for(let s=i;s>=0;s--)c(t.data[s],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.IP)(r,i,r.length,n.indexHint),1)}else this.clear();else a(i,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 a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,i,s,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],c(n,e.leaf?s(r):r);return n}function c(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 u(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(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 m(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function g(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 y(e,t,i,s,n){const o=[t,i];for(;o.length;){const t=o.pop(),i=o.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,r.q)(e,a,i,t,n),o.push(i,a,a,t)}}const x=new n.c,S=new n.c,b=new n.c,I=new n.c({deallocator:void 0});class w{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class v extends w{constructor(){super(...arguments),this.height=1,this.indexHint=new s.is}}class F extends v{constructor(e){super(),this.children=e,this.leaf=!0}}class z extends v{constructor(e){super(),this.children=e,this.leaf=!1}}},55376:(e,t,i)=>{i.d(t,{E9:()=>a,K0:()=>u,Qt:()=>c});var s=i(88264),n=i(89960);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,n.a8)()){let t=(e=e.toLowerCase())in r;if(!t){const i=e.split("-");i.length>1&&i[0]in r&&(e=i[0],t=!0),t||(e="en")}const[i,s,o="#,##0.###"]=r[e];return{decimal:i,group:s,pattern:o}}function a(e,t){const i=o((t={...t}).locale);t.customs=i;const s=t.pattern||i.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,i){const s=(i=i||{}).customs.group,n=i.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,c=o.match(a);if(!c)throw new Error("unable to find a number expression in pattern: "+t);return!1===i.fractional&&(i.places=0),t.replace(a,function(e,t,i){!0===(i=i||{}).places&&(i.places=0),i.places===1/0&&(i.places=6);const s=t.split("."),n="string"==typeof i.places&&i.places.indexOf(",");let r=i.places;n?r=i.places.substring(n+1):+r>=0||(r=(s[1]||[]).length),i.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(s[1]||i.places){n&&(i.places=i.places.substring(0,n));const e=void 0!==i.places?i.places:s[1]&&s[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+r<a.length&&(o[1]=a.substr(0,Number(r)))}else o[1]&&o.pop();const l=s[0].replace(",","");let c=l.indexOf("0");-1!==c&&(c=l.length-c,c>o[0].length&&(o[0]=o[0].padStart(c,"0")),l.includes("#")||(o[0]=o[0].substr(o[0].length-c)));let u,h,d=s[0].lastIndexOf(",");if(-1!==d){u=s[0].length-d-1;const e=s[0].substr(0,d);d=e.lastIndexOf(","),-1!==d&&(h=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-u;f.push(t>0?e.substr(t):e),e=t>0?e.slice(0,t):"",h&&(u=h,h=void 0)}return o[0]=f.reverse().join(i.group||","),o.join(i.decimal||".")}(e,c[0],{decimal:n,group:s,places:i.places,round:i.round}))}(e,s,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function c(e){const t=o((e=e||{}).locale),i=e.pattern||t.pattern,n=t.group,r=t.decimal;let a=1;if(i.includes("%"))a/=100;else if(i.includes("‰"))a/=1e3;else if(i.includes("¤"))throw new Error("currency notation not supported");const c=i.split(";");1===c.length&&c.push("-"+c[0]);const u=d(c,(t=>(t="(?:"+(0,s.cB)(t,".")+")").replace(l,(t=>{const i={signed:!1,separator:e.strict?n:[n,""],fractional:e.fractional,decimal:r,exponent:!1},s=t.split(".");let o=e.places;1===s.length&&1!==a&&(s[1]="###"),1===s.length||0===o?i.fractional=!1:(void 0===o&&(o=e.pattern?s[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(i.fractional=!0),!e.places&&+o<s[1].length&&(o+=","+s[1].length),i.places=o);const l=s[0].split(",");return l.length>1&&(i.groupSize=l.pop().length,l.length>1&&(i.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=h(e),i=d(e.fractional,(t=>{let i="";return t&&0!==e.places&&(i="\\"+e.decimal,e.places===1/0?i="(?:"+i+"\\d+)?":i+="\\d{"+e.places+"}"),i}),!0);let s=t+i;return i&&(s="(?:(?:"+s+")|(?:"+i+"))"),s+d(e.exponent,(t=>t?"([eE]"+h({signed:e.eSigned})+")":""))}(i)+")"}))),!0);return{regexp:u.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:r,factor:a}}function u(e,t){const i=c(t),s=new RegExp("^"+i.regexp+"$").exec(e);if(!s)return NaN;let n=s[1];if(!s[1]){if(!s[2])return NaN;n=s[2],i.factor*=-1}return n=n.replaceAll(new RegExp("["+i.group+"\\s\\xa0]","g"),"").replace(i.decimal,"."),Number(n)*i.factor}function h(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,s.cB)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const i=e.groupSize,n=e.groupSize2;if(n){const e="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*["+t+"]\\d{"+i+"})";return i-n>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(i-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+t+"]\\d{"+i+"})*)"}),!0)}const d=(e,t,i)=>{if(!(e instanceof Array))return t(e);const s=[];for(let i=0;i<e.length;i++)s.push(t(e[i]));return f(s.join("|"),Boolean(i))},f=(e,t)=>"("+(t?"?:":"")+e+")"},57896:(e,t,i)=>{i.d(t,{Eq:()=>d,KG:()=>_,_8:()=>g,_I:()=>c,aE:()=>l,du:()=>m,on:()=>h}),i(40196),i(2952);var s=i(60976),n=i(38912),r=i(70680),o=i(10860),a=i(37176);function l(e,t,i={}){return u(e,t,i,f)}function c(e,t,i={}){return u(e,t,i,p)}function u(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.oR)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,a.M9)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function h(e,t,i,o={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),o.onListenerRemove?.(a),a=null,c=null)}function d(e){o.once&&o.once&&(0,r.oR)(u),i(e)}const f=l(e,((e,i)=>{h(),(0,s.sh)(e)&&(a=e,c=(0,s.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,n.uU)((()=>{f.remove(),h()})),u}function d(e,t){return function(e,t,i){if((0,o.wv)(i))return Promise.reject((0,o.Uh)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.oR)(a)}return new Promise(((s,r)=>{a=(0,n.Ip)([(0,o.wD)(i,(()=>{l(),r((0,o.Uh)())})),u(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(41168);const m={sync:!0},g={initial:!0},_={sync:!0,initial:!0}},20480:(e,t,i)=>{i.d(t,{WW:()=>I});var s=i(6220),n=i(20744),r=i(66360),o=i(7488),a=i(48516),l=i(44048),c=i(60544),u=i(29120),h=(i(60708),i(2600)),d=i(6704),f=i(21980),p=i(28176),m=i(81976);const g=()=>r.c.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function x(e,t,i){if(t){const t=function(e,t){if(!(e instanceof a.c||e instanceof o.c)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g().error(e),new n.c(e)}const i=(0,l.iM)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const n=e[s][0],r=e[s][1],o=e[s+1][0],a=e[s+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),c=(a-r)/l,u=(o-n)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const s=e*t,o=u*s+n,a=c*s+r;i.push([o,a])}const e=(l+Math.floor(h-1)*t)/2,s=u*e+n,o=c*e+r;i.push([s,o])}i.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.c({rings:s,spatialReference:e.spatialReference}):new a.c({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.aq)(t,!0)}return i&&(e=(0,l.wb)(e,i)),e}function S(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,l.yK)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,l.yK)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,l.yK)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,l.yK)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function b(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const n=t.cutIndexes[s],r=t.geometries[s],o=(0,l.iM)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,l.yK)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(s,0))}return!0}}))}if(n===i){if(_(e))for(const t of(0,l.iM)(r))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,l.iM)(r))e[n]=e[n].addPath(t)}else i=n,e[n]=r}return e}async function I(e,t,i){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&g().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??s.default.geometryServiceUrl;let r,_,y,w,v,F,z,B,M=0;const N=[],E=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,_=(0,c.Nq)(r),y=r.isWebMercator,F=y?102100:4326,w=l.Hh[F].maxX,v=l.Hh[F].minX,z=l.Hh[F].plus180Line,B=l.Hh[F].minus180Line),_)if("mesh"===t.type)E.push(t);else if("point"===t.type)E.push(S(t.clone(),w,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>S(e,w,v))),E.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,_);E.push(e.rings?new o.c(e):e)}else if(t.extent){const e=t.extent,i=(0,l.yK)(e.xmin,v)*(2*w);let s=0===i?t.clone():(0,l.wb)(t.clone(),i);e.offset(i,0),e.intersects(z)&&e.xmax!==w?(M=e.xmax>M?e.xmax:M,s=x(s,y),N.push(s),E.push("cut")):e.intersects(B)&&e.xmin!==v?(M=e.xmax*(2*w)>M?e.xmax*(2*w):M,s=x(s,y,360),N.push(s),E.push("cut")):E.push(s)}else E.push(t.clone());else E.push(t);else E.push(t);let T=(0,l.yK)(M,w),R=-90;const A=T,C=new a.c;for(;T>0;){const e=360*T-180;C.addPath([[e,R],[e,-1*R]]),R*=-1,T--}if(N.length>0&&A>0){const t=b(N,await async function(e,t,i,s){const n=(0,f.UX)(e),r=t[0].spatialReference,o={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,c.um)(r),target:JSON.stringify({geometryType:(0,d.Ce)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},a=await(0,h.c)(n.path+"/cut",o),{cutIndexes:l,geometries:u=[]}=a.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,d.h4)(e);return t.spatialReference=r,t}))}}(n,N,C,i)),s=[],r=[];for(let i=0;i<E.length;i++){const n=E[i];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[i];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(s.push(n),r.push("simplify")):r.push(y?(0,u.w7)(n):n)}}if(!s.length)return r;const o=await async function(e,t,i){const s="string"==typeof e?(0,p.as)(e):e,n=t[0].spatialReference,r=(0,d.Ce)(t[0]),o={...i,query:{...s.query,f:"json",sr:(0,c.um)(n),geometries:JSON.stringify((0,m.y)(t))}},{data:a}=await(0,h.c)(s.path+"/simplify",o);return(0,m.Q)(a.geometries,r,n)}(n,s,i),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(y?(0,u.w7)(o.shift()):o.shift())}return a}const L=[];for(let e=0;e<E.length;e++){const t=E[e];if("cut"!==t)L.push(t);else{const e=N.shift();L.push(!0===y?(0,u.w7)(e):e)}}return L}},44048:(e,t,i)=>{i.d(t,{Hh:()=>o,iM:()=>c,wb:()=>l,yK:()=>a});var s=i(48516),n=i(56156),r=i(6704);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.c({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator}),minus180Line:new s.c({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.c.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.c({paths:[[[180,-180],[180,180]]],spatialReference:n.c.WGS84}),minus180Line:new s.c({paths:[[[-180,-180],[-180,180]]],spatialReference:n.c.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=c(e);for(const e of i)for(const i of e)i[0]+=t;return e}function c(e){return(0,r.Cs)(e)?e.rings:e.paths}},6904:(e,t,i)=>{i.d(t,{c:()=>a});var s=i(9456),n=i(3024),r=i(83372);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.U(9,(0,s.c)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((i,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.FZ)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},9107:(e,t,i)=>{i.d(t,{c:()=>p});var s=i(92400),n=i(20744),r=i(77860),o=i(66360),a=i(77048),l=i(83372),c=i(97088),u=i(6904),h=i(83624),d=i(16736);const f=(0,a.Su)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new u.c,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.c,this.featureAdapter=d.u}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,n]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:n,spatialReference:(0,h.C6)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(s.G6)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Qv)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,i)=>{this._markedIds.has(i)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(this._markedIds.add(t),i?(e.displayId=i.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,c.C_)(null!=s?s:(0,l.Su)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.c.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.c("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._markedIds.add(t);const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,c.C_)((0,l.Su)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},88300:(e,t,i)=>{i.r(t),i.d(t,{default:()=>H}),i(60708);var s=i(2600),n=i(40196),r=i(39180),o=i(20744),a=i(66360),l=i(10860),c=i(28176),u=i(60074),h=i(3452),d=i(60544),f=i(29120),p=i(34888),m=i(85152),g=i(9107),_=i(7684),y=i(47302),x=i(55376),S=i(564);const b=/^\s*"([\S\s]*)"\s*$/,I=/""/g,w="\n",v=[","," ",";","|","\t"];function*F(e,t,i){let s=0;for(;s<=e.length;){const n=e.indexOf(t,s),r=e.substring(s,n>-1?n:void 0);s+=r.length+t.length,i&&!r.trim()||(yield r)}}function z(e){const t=e.includes("\r\n")?"\r\n":w;return F(e,t,!0)}function B(e,t){return F(e,t,!1)}function M(e,t,i){e=e.trim(),t=t?.trim();const s=[],n=Array.from(new Set([i?.delimiter,...v])).filter((e=>null!=e));for(const i of n){const n=T(e,i).length,r=T(t,i).length??n;n>1&&s.push({weight:Math.min(n,r),delimiter:i})}const r=s.sort((({weight:e},{weight:t})=>t-e)).map((({delimiter:e})=>e));for(const t of r){const s=A(E(e,t).names,i?.longitudeField,i?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:t,locationInfo:s}}return{delimiter:r[0],locationInfo:null}}function*N(e,t,i,s=(()=>Object.create(null))){const n=z(e);n.next();let r="",o="",a=0,l=s(),c=0;e:for(const e of n){const n=B(e,i);for(const e of n)if(r+=o+e,o="",a+=R(e),a%2==0){if(a>0){const e=b.exec(r);if(!e){l=s(),c=0,r="",a=0;continue e}l[t[c]]=e[1].replaceAll(I,'"'),c++}else l[t[c]]=r,c++;r="",a=0}else o=i;0===a?(yield l,l=s(),c=0):o=w}}function E(e,t){const i=T(e,t).filter((e=>null!=e)),s=i.map((e=>(0,S.gP)(e)));for(let e=s.length-1;e>=0;e--)s[e]||(s.splice(e,1),i.splice(e,1));return{names:s,aliases:i}}function T(e,t){if(!e?.length)return[];const i=[];let s="",n="",r=0;const o=B(e,t);for(const e of o)if(s+=n+e,n="",r+=R(e),r%2==0){if(r>0){const e=b.exec(s);e&&i.push(e[1].replaceAll(I,'"'))}else i.push(s);s="",r=0}else n=t;return i}function R(e){let t=0,i=0;for(i=e.indexOf('"',i);i>=0;)t++,i=e.indexOf('"',i+1);return t}function A(e,t,i){t=(0,S.gP)(t)?.toLowerCase(),i=(0,S.gP)(i)?.toLowerCase();const s=e.map((e=>e.toLowerCase())),n=t?e[s.indexOf(t)]:null,r=i?e[s.indexOf(i)]:null;return{longitudeFieldName:n||e[s.indexOf(k.find((e=>s.includes(e))))],latitudeFieldName:r||e[s.indexOf(O.find((e=>s.includes(e))))]}}function C(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map((e=>{if(""!==e){if(!t.test(e)){let t=L(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.H9)(e)?"date":"string"}})).reduce(((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0))}const L=function(){const e=(0,x.Qt)(),t=new RegExp("^"+e.regexp+"$"),i=new RegExp("["+e.group+"\\s\\xa0]","g"),s=e.factor;return n=>{const r=t.exec(n);if(e.factor=s,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(i,"").replace(e.decimal,"."),+o*e.factor}}(),O=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],k=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];var X=i(17724),Y=i(16424),q=i(28484),j=i(56156);const P=(0,X.w7)("esriGeometryPoint"),D=["csv"],U=[0,0];class G{constructor(e,t){this.x=e,this.y=t}}class H{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[i]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),s=function(e,t){const i=t.parsingOptions||{},s={delimiter:i.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:i.latitudeField,longitudeFieldName:i.longitudeField}},n=s.layerDefinition={name:(0,c.u8)(t.url,D)||"csv",dateFieldsTimeReference:{timeZoneIANA:q.Gw},drawingInfo:P,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:i.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:i.spatialReference||{wkid:4326}}},r=z(e),a=r.next().value?.trim(),l=r.next().value?.trim();if(!a)throw new o.c("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:u,locationInfo:h}=M(a,l,i);if(!u)throw new o.c("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:i});if(!h)throw new o.c("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:i});s.locationInfo=h,s.delimiter=u;const{names:d,aliases:f}=E(a,u),p=function(e,t,i,s,n){const r=[],o=N(e,i,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<i.length;e++){const t=i[e],o=s[e];if(t===n.longitudeFieldName||t===n.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(C(a.map((e=>e[t])))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}r.push({name:t,type:e,alias:o,length:(0,S.G0)(e)})}}return r}(e,s.delimiter,d,f,s.locationInfo);if(i.fields?.length){const e=new Y.c(i.fields);for(const t of p){const i=e.get(t.name);i&&Object.assign(t,i)}}if(!p.some((e=>"esriFieldTypeOID"===e.type&&(n.objectIdField=e.name,!0)))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};n.objectIdField=e.name,p.unshift(e)}n.fields=p;const m=new Y.c(n.fields);if(s.locationInfo&&(s.locationInfo.latitudeFieldName=m.get(s.locationInfo.latitudeFieldName).name,s.locationInfo.longitudeFieldName=m.get(s.locationInfo.longitudeFieldName).name),n.timeInfo){const e=n.timeInfo;if(e.startTimeField){const t=m.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=m.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=m.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(n.timeInfo=null)}return s}(i,e);this._locationInfo=s.locationInfo,this._delimiter=s.delimiter,this._queryEngine=this._createQueryEngine(s);const n=await this._createFeatures(i);this._queryEngine.featureStore.addMany(n);const{fullExtent:r,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(s.layerDefinition.extent=r,a){const{start:e,end:t}=a;s.layerDefinition.timeInfo.timeExtent=[e,t]}return s}async applyEdits(){throw new o.c("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,n.kn)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.mA)(e)||a.c.getLogger("esri.layers.CSVLayer").error(new o.c("csv-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:i}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:i}=this._loadOptions;if(!t)throw new o.c("csv-layer:invalid-source","url not defined");const n=(0,c.as)(t);return(await(0,s.c)(n.path,{query:{...n.query,...i},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:i,extent:s,timeInfo:n}=e.layerDefinition,r=new g.c({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new y.U({fieldsIndex:Y.c.fromLayerJSON({fields:i,dateFieldsTimeReference:{timeZoneIANA:q.Gw}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:n,objectIdField:t,spatialReference:s.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:i}=this._locationInfo,{objectIdField:s,fieldsIndex:n,spatialReference:o}=this._queryEngine;let a=[];const l=[],c=n.fields.filter((e=>e.name!==s)).map((e=>e.name));let g=0;const _={};for(const e of n.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,S.gB)(e);void 0!==t&&(_[e.name]=t)}const y=N(e,c,this._delimiter,(0,X.GA)(_,s));for(const e of y){const o=this._parseCoordinateValue(e[t]),c=this._parseCoordinateValue(e[i]);if(null!=c&&null!=o&&!isNaN(o)&&!isNaN(c)){e[t]=o,e[i]=c;for(const s in e)if(s!==t&&s!==i)if(n.isDateField(s))e[s]=(0,r.sn)(e[s]);else if(n.isNumericField(s)){const t=L(e[s]);isNaN(t)?e[s]=null:e[s]=t}e[s]=g,g++,a.push(new G(c,o)),l.push(e)}}if(!(0,d.yK)({wkid:4326},o))if((0,d.kn)(o))for(const e of a)[e.x,e.y]=(0,f.S6)(e.x,e.y,U);else a=(0,u.projectMany)(h.O,a,j.c.WGS84,o,null,null);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:i}=a[e],n=l[e];n[s]=e+1,x.push(new p._M(new m.c([],[t,i]),n,null,n[s]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=L(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,_.Qv)(d.UH,e)}catch{throw new o.c("csv-layer:projection-not-supported","Projection not supported")}}}},17724:(e,t,i)=>{i.d(t,{G4:()=>d,GA:()=>u,QD:()=>h,w7:()=>a});var s=i(9456),n=i(62088),r=i(13136),o=i(9504);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.qe:"esriGeometryPolyline"===e?o.MZ:o.yq}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let c=1;function u(e,t){if((0,s.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this.${t} = null;`;for(const t in e)i+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${c++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new s}catch(i){return()=>({[t]:null,...e})}}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.ct)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},81976:(e,t,i)=>{i.d(t,{Q:()=>r,y:()=>n});var s=i(6704);function n(e){return{geometryType:(0,s.Ce)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,i){const n=(0,s.uG)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=i,t}))}},21980:(e,t,i)=>{i.d(t,{OW:()=>a,UX:()=>o,sR:()=>r}),i(6220),i(47620);var s=i(62088),n=i(28176);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.as)(e):(0,s.ct)(e)}function a(e,t,i){const s={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))s[n]=r.map((e=>a({item:e},t,i).item));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?r:JSON.stringify(r);else s[n]=r}return s}i(20572)},9504:(e,t,i)=>{i.d(t,{MZ:()=>r,aV:()=>c,gF:()=>a,gP:()=>l,qe:()=>n,wp:()=>u,yq:()=>o});const s=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|