@arcgis/core 4.28.6 → 4.28.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -25
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0c08d59c5d65921ba5ae.js +1 -0
- package/assets/esri/core/workers/chunks/0dbf3fa096d02d83b222.js +1 -0
- package/assets/esri/core/workers/chunks/16453ca31cc3e09fde46.js +1 -0
- package/assets/esri/core/workers/chunks/{1da721608993783dc9cf.js → 24d04cca452ba2fec5d4.js} +1 -1
- package/assets/esri/core/workers/chunks/2c121541cde5c24b1fbe.js +1 -0
- package/assets/esri/core/workers/chunks/2efd2496f7310142f928.js +1 -0
- package/assets/esri/core/workers/chunks/42880f0fac5f1606201c.js +1 -0
- package/assets/esri/core/workers/chunks/70eba80261d7fdc624ad.js +1 -0
- package/assets/esri/core/workers/chunks/{3dcb2a82e1e4b520c9c9.js → 7b901d0b68e5cc17533a.js} +1 -1
- package/assets/esri/core/workers/chunks/7f68c2cc1048d136fd1b.js +1 -0
- package/assets/esri/core/workers/chunks/85d6dd6703b228248e30.js +1 -0
- package/assets/esri/core/workers/chunks/adc138e5d9983a5752d4.js +1 -0
- package/assets/esri/core/workers/chunks/b35e87cf2b8244e3584f.js +1 -0
- package/assets/esri/core/workers/chunks/b49f830a8d74c4564ed8.js +1 -0
- package/assets/esri/core/workers/chunks/b6d77edf9eec757e88da.js +1 -0
- package/assets/esri/core/workers/chunks/c9306fb3ec1a2d5e137a.js +1 -0
- package/assets/esri/core/workers/chunks/cd201c627e9396edf6b9.js +1 -0
- package/assets/esri/core/workers/chunks/ceeaa8d1b0034b59eae7.js +1 -0
- package/assets/esri/core/workers/chunks/dc4a71e72e56cbdff49a.js +1 -0
- package/assets/esri/core/workers/chunks/f78b1bfacd95a6ccf7b4.js +1 -0
- package/assets/esri/themes/base/widgets/_LabeledSwitch.scss +6 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/sqlCompareUtils.js +1 -1
- package/core/sql/sqlDateParsingUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/support/FieldsIndex.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/support/LabeledSwitch.js +1 -1
- package/assets/esri/core/workers/chunks/16b56e541afa438dfb7f.js +0 -1
- package/assets/esri/core/workers/chunks/340ab726ba40fe3a99c8.js +0 -1
- package/assets/esri/core/workers/chunks/46b4a17ec898ab744861.js +0 -1
- package/assets/esri/core/workers/chunks/4f0412b52844aa9c7bd4.js +0 -1
- package/assets/esri/core/workers/chunks/5b80ae1eb79f1db75dc6.js +0 -1
- package/assets/esri/core/workers/chunks/80fcb63476829b6a48d2.js +0 -1
- package/assets/esri/core/workers/chunks/84725021c43f1122056a.js +0 -1
- package/assets/esri/core/workers/chunks/8cdece03397d01767593.js +0 -1
- package/assets/esri/core/workers/chunks/9607460895182d31aef9.js +0 -1
- package/assets/esri/core/workers/chunks/a0a86383e69932a25e50.js +0 -1
- package/assets/esri/core/workers/chunks/a3bf50d9e24ad1de9847.js +0 -1
- package/assets/esri/core/workers/chunks/a5db3be5eeb3005df3c1.js +0 -1
- package/assets/esri/core/workers/chunks/a87ab14d6a6ccc9004a0.js +0 -1
- package/assets/esri/core/workers/chunks/a8cf23c3a55c1834178c.js +0 -1
- package/assets/esri/core/workers/chunks/ba00df2e707550939a6f.js +0 -1
- package/assets/esri/core/workers/chunks/cfa6d1b63b794febe70a.js +0 -1
- package/assets/esri/core/workers/chunks/e0382138cf58191a9697.js +0 -1
- package/assets/esri/core/workers/chunks/fe0c6814ef56604540b3.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6413,5732],{92835:(e,t,i)=>{i.d(t,{Z:()=>y});var r,s=i(43697),n=i(96674),o=i(35463),l=i(5600),a=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),d=i(30556),h=i(25031);let c=r=class extends n.wq{static get allTime(){return p}static get empty(){return f}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=h.By){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.JE)(i,e,t));let s=this.end;if(s){const i=(0,o.JE)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.Nm)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,l;if(s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?l=i:n>=t&&n<=i&&(l=n),null!=o&&null!=l&&!isNaN(o)&&!isNaN(l)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=l===1/0?null:new Date(l),e}return r.empty}offset(e,t,i=h.By){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:l}=this;return null!=n&&(s.start=(0,o.Nm)(n,e,t,i)),null!=l&&(s.end=(0,o.Nm)(l,e,t,i)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,d.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,d.c)("start")],c.prototype,"writeStart",null),c=r=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const p=new c,f=new c({start:void 0,end:void 0}),y=c},5732:(e,t,i)=>{i.d(t,{c:()=>r,g:()=>s});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2368:(e,t,i)=>{i.d(t,{J:()=>d,j:()=>h});var r=i(43697),s=i(92036),n=(i(80442),i(22974)),o=(i(92604),i(70586)),l=i(31263),a=i(1153),u=i(52011);const d=e=>{let t=class extends e{clone(){const e=(0,a.vw)(this);(0,o.O3)(e,"unable to clone instance of non-accessor class");const t=e.metadatas,i=e.store,r={},s=new Map;for(const e in t){const o=t[e],a=i?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||a!==l.s3.USER&&a!==l.s3.DEFAULTS&&a!==l.s3.WEB_MAP&&a!==l.s3.WEB_SCENE)continue;const d=this[e];let h=null;h="function"==typeof u?u(d):"reference"===u?d:(0,n.Vo)(d),null!=d&&null==h||(a===l.s3.DEFAULTS?s.set(e,h):r[e]=h)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){const e=(0,a.vw)(u)?.store;if(e)for(const[t,i]of s)e.set(t,i,l.s3.DEFAULTS)}return u}};return t=(0,r._)([(0,u.j)("esri.core.Clonable")],t),t};let h=class extends(d(s.Z)){};h=(0,r._)([(0,u.j)("esri.core.Clonable")],h)},57435:(e,t,i)=>{i.d(t,{Z:()=>u});var r=i(43697),s=i(46791),n=(i(66643),i(20102),i(92604),i(26258),i(87538)),o=i(5600),l=i(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const i of e)null!=i&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction??(e=>!!e);for(const r of t)if(r){if(i(r)){const t=this.indexOf(r,e);t>=0?t!==e&&this.reorder(r,e):this.add(r,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(r);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,r._)([(0,o.Cb)()],a.prototype,"getCollections",void 0),(0,r._)([(0,o.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,r._)([(0,o.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,r._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},13867:(e,t,i)=>{i.d(t,{z:()=>s});var r=i(69801);class s{constructor(e,t){this._storage=new r.WJ,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(){}}},69801:(e,t,i)=>{i.d(t,{WJ:()=>l,Xq:()=>o});var r,s,n=i(44553);(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=a+++":",this.size=0,this.maxSize=0,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 sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,i,r=0){this._storage.put(this,e,t,i,r)}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)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}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 l{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 n.Z,this._users=new n.Z}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,0),this._checkSizeLimits()}put(e,t,i,s,n){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,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,r.ALL);const l=1+Math.max(n,-3)- -3;this._db.set(t,{entry:i,size:s,lifetime:l,lives:l}),this._size+=s,e.size+=s,this._checkSizeLimits()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSizeLimits()}}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,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forAll((i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/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,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let r;return this._removeFuncs.some((s=>{if(e.startsWith(s[0])){const e=s[1](t,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,i]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,i,e),e.size<=.9*e.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 s=this._notifyRemove(e,t.entry,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let a=0},22862:(e,t,i)=>{i.d(t,{Hg:()=>f,V7:()=>p,uD:()=>c});var r=i(92036),s=i(46791),n=i(1153);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.Z}function a(e){return e instanceof s.Z?Object.keys(e.items):l(e)?(0,n.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.Z?e.items[t]:e[t]}function d(e){return e?e.declaredClass:null}function h(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=a(e),s=a(t);if(0===r.length&&0===s.length)return;if(!r.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter((e=>!r.includes(e))),c=r.filter((e=>!s.includes(e))),p=r.filter((i=>s.includes(i)&&u(e,i)!==u(t,i))).concat(n,c).sort(),f=d(e);if(f&&o.has(f)&&p.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=l(e)&&l(t);for(const r of p){const s=u(e,r),n=u(t,r);let o;if((m||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(i&&i[r]&&"function"==typeof i[r])o=i[r]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&d(s)===d(n)?h(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=y?y.diff[r]=o:y={type:"partial",diff:{[r]:o}})}}return y}function c(e,t){if(null==e)return!1;const i=t.split(".");let r=e;for(const e of i){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}function p(e,t){for(const i of t)if(c(e,i))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>m,on:()=>h,tX:()=>g}),i(66643),i(46791);var r=i(91460),s=i(50758),n=i(70586),o=i(95330),l=i(26258);function a(e,t,i={}){return d(e,t,i,p)}function u(e,t,i={}){return d(e,t,i,f)}function d(e,t,i={},r){let s=null;const o=i.once?(e,i)=>{r(e)&&((0,n.hw)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.aQ)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function h(e,t,i,o={}){let l=null,u=null,d=null;function h(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function c(e){o.once&&o.once&&(0,n.hw)(d),i(e)}const p=a(e,((e,i)=>{h(),(0,r.vT)(e)&&(l=e,u=(0,r.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return d=(0,s.kB)((()=>{p.remove(),h()})),d}function c(e,t){return function(e,t,i){if((0,o.Hc)(i))return Promise.reject((0,o.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function a(){l=(0,n.hw)(l)}return new Promise(((r,n)=>{l=(0,s.AL)([(0,o.fu)(i,(()=>{a(),n((0,o.zE)())})),d(e,(e=>{a(),r(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(87538);const y={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},60437:(e,t,i)=>{i.d(t,{G_:()=>_,HH:()=>o,JR:()=>f,TC:()=>l,Tn:()=>h,Ue:()=>s,al:()=>n,bZ:()=>y,cS:()=>p,dp:()=>u,fS:()=>g,is:()=>m,op:()=>d,pp:()=>a,t8:()=>c});var r=i(6570);function s(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,i,r,n,o,l=s()){return l[0]=e,l[1]=t,l[2]=i,l[3]=r,l[4]=n,l[5]=o,l}function o(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.Z(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function h(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function p(e){return e?c(e,_):s(_)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,i,r,s){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function g(e,t,i){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(24470);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];s()},42756:(e,t,i)=>{i.r(t),i.d(t,{default:()=>H});var r=i(43697),s=(i(66577),i(46791)),n=i(57435),o=i(16453),l=i(95330),a=i(17445),u=i(17452),d=i(5600),h=i(75215),c=(i(67676),i(80442),i(71715)),p=i(52011),f=i(30556),y=i(82971),m=i(87085),g=i(71612),_=i(38009),b=i(16859),v=i(34760),w=i(72965),S=i(21506),F=i(32448),T=i(96674),C=i(83379),x=i(19153),z=i(68773),I=i(40330),E=(i(51773),i(3172)),P=i(22974),N=i(60437),M=i(20322);i(91423),i(74889);const R={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function O(e){const t=e.folders||[],i=t.slice(),r=new Map,s=new Map,n=new Map,o=new Map,l=new Map,a={esriGeometryPoint:s,esriGeometryPolyline:n,esriGeometryPolygon:o};(e.featureCollection?.layers||[]).forEach((e=>{const t=(0,P.d9)(e);t.featureSet.features=[];const i=e.featureSet.geometryType;r.set(i,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===i?L(s,l,e.featureSet.features):"esriGeometryPolyline"===i?L(n,l,e.featureSet.features):"esriGeometryPolygon"===i&&L(o,l,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{l.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((r=>{const s=function(e,t,i){const r=function(e,t){let i;return t.some((t=>t.id===e&&(i=t,!0))),i}(e,i);return r&&(r.parentFolderId=t,r.networkLink=r),r}(r,t.id,e.networkLinks);s&&i.push(s)}))})),i.forEach((e=>{if(e.featureInfos){e.points=(0,P.d9)(r.get("esriGeometryPoint")),e.polylines=(0,P.d9)(r.get("esriGeometryPolyline")),e.polygons=(0,P.d9)(r.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const i=a[t.type].get(t.id);i&&e[R[t.type]]?.featureSet.features.push(i);break}case"GroundOverlay":{const i=l.get(t.id);i&&e.mapImages.push(i);break}}e.fullExtent=k([e])}}));const u=k(i);return{folders:t,sublayers:i,extent:u}}function Z(e,t,i,r){const s=I.id?.findCredential(e);e=(0,u.fl)(e,{token:s?.token});const n=z.default.kmlServiceUrl;return(0,E.Z)(n,{query:{url:e,model:"simple",folders:"",refresh:0!==i||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:r})}function j(e,t,i=null,r=[]){const s=[],n={},o=t.sublayers,l=new Set(t.folders.map((e=>e.id)));return o.forEach((t=>{const o=new e;if(i?o.read(t,i):o.read(t),r.length&&l.has(o.id)&&(o.visible=r.includes(o.id)),n[t.id]=o,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=n[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(o)}else s.unshift(o)})),s}function L(e,t,i){i.forEach((i=>{e.set(i.attributes[t],i)}))}function k(e){const t=(0,N.Ue)(N.G_),i=(0,N.Ue)(N.G_);for(const r of e){if(r.polygons?.featureSet?.features)for(const e of r.polygons.featureSet.features)(0,M.Yg)(t,e.geometry),(0,N.TC)(i,t);if(r.polylines?.featureSet?.features)for(const e of r.polylines.featureSet.features)(0,M.Yg)(t,e.geometry),(0,N.TC)(i,t);if(r.points?.featureSet?.features)for(const e of r.points.featureSet.features)(0,M.Yg)(t,e.geometry),(0,N.TC)(i,t);if(r.mapImages)for(const e of r.mapImages)(0,M.Yg)(t,e.extent),(0,N.TC)(i,t)}return(0,N.fS)(i,N.G_)?void 0:{xmin:i[0],ymin:i[1],zmin:i[2],xmax:i[3],ymax:i[4],zmax:i[5],spatialReference:y.Z.WGS84}}var D,A=i(6570);let V=D=class extends(F.Z.EventedMixin((0,T.eC)(C.Z))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.Z_),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.Z_),(0,a.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.Z_),(0,a.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),a.Z_)])}initialize(){(0,a.N1)((()=>this.networkLink)).then((()=>(0,a.N1)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,i=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=k(e.sublayers);this.fullExtent=A.Z.fromJSON(t),this.sourceJSON=e;const i=(0,h.se)(s.Z.ofType(D),j(D,e));this.sublayers?this.sublayers.addMany(i):this.sublayers=i,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(i),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return Z(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>O(e.data)))}};(0,r._)([(0,d.Cb)()],V.prototype,"description",void 0),(0,r._)([(0,d.Cb)({type:A.Z})],V.prototype,"fullExtent",void 0),(0,r._)([(0,d.Cb)()],V.prototype,"id",void 0),(0,r._)([(0,d.Cb)({readOnly:!0,value:null})],V.prototype,"networkLink",void 0),(0,r._)([(0,d.Cb)({json:{write:{allowNull:!0}}})],V.prototype,"parent",void 0),(0,r._)([(0,d.Cb)({type:s.Z.ofType(V),json:{write:{allowNull:!0}}})],V.prototype,"sublayers",void 0),(0,r._)([(0,d.Cb)({value:null,json:{read:{source:"name",reader:e=>(0,x.Cb)(e)}}})],V.prototype,"title",void 0),(0,r._)([(0,d.Cb)({value:!0})],V.prototype,"visible",null),(0,r._)([(0,c.r)("visible",["visibility"])],V.prototype,"readVisible",null),(0,r._)([(0,d.Cb)()],V.prototype,"sourceJSON",void 0),(0,r._)([(0,d.Cb)()],V.prototype,"layer",void 0),V=D=(0,r._)([(0,p.j)("esri.layers.support.KMLSublayer")],V);const G=V,J=["kml","xml"];let q=class extends((0,g.h)((0,v.Q)((0,w.M)((0,_.q)((0,b.I)((0,o.R)(m.Z))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new n.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=y.Z.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.YP)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.Z_),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,i){return j(G,t,i,this._visibleFolders)}writeSublayers(e,t){const i=[],r=e.toArray();for(;r.length;){const e=r[0];e.networkLink||(e.visible&&i.push(e.id),e.sublayers&&r.push(...e.sublayers.toArray())),r.shift()}t.visibleFolders=i}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.vt)(this.url,J)||"KML":e||""}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],i=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(i))};return e&&e.forEach(i),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=O((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:Z(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=i=>{if(i.sublayers)for(const r of i.sublayers.items)t(r),r.visible&&r.fullExtent&&(null!=e?e.union(r.fullExtent):e=r.fullExtent.clone())};return t(this),e}};(0,r._)([(0,d.Cb)({readOnly:!0})],q.prototype,"allSublayers",void 0),(0,r._)([(0,d.Cb)({type:y.Z})],q.prototype,"outSpatialReference",void 0),(0,r._)([(0,d.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],q.prototype,"path",void 0),(0,r._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!1}})],q.prototype,"legendEnabled",void 0),(0,r._)([(0,d.Cb)({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),(0,r._)([(0,d.Cb)({type:["KML"]})],q.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)({})],q.prototype,"resourceInfo",void 0),(0,r._)([(0,d.Cb)({type:s.Z.ofType(G),json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),(0,r._)([(0,c.r)(["web-map","portal-item"],"sublayers",["visibleFolders"])],q.prototype,"readSublayersFromItemOrWebMap",null),(0,r._)([(0,c.r)("service","sublayers",["sublayers"])],q.prototype,"readSublayers",null),(0,r._)([(0,f.c)("sublayers")],q.prototype,"writeSublayers",null),(0,r._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),(0,r._)([(0,d.Cb)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],q.prototype,"title",null),(0,r._)([(0,d.Cb)(S.HQ)],q.prototype,"url",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],q.prototype,"visibleSublayers",null),(0,r._)([(0,d.Cb)({type:A.Z})],q.prototype,"extent",void 0),(0,r._)([(0,d.Cb)()],q.prototype,"fullExtent",null),q=(0,r._)([(0,p.j)("esri.layers.KMLLayer")],q);const H=q},16859:(e,t,i)=>{i.d(t,{I:()=>S});var r=i(43697),s=i(68773),n=i(40330),o=i(3172),l=i(66643),a=i(20102),u=i(92604),d=i(70586),h=i(95330),c=i(17452),p=i(5600),f=(i(75215),i(67676),i(80442),i(71715)),y=i(52011),m=i(30556),g=i(84230),_=i(48522),b=i(15235),v=i(86082),w=i(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,h.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,h.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.Ss)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,h.r9)(e)}if(!s||!(0,c.Zo)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new b.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,h.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=_.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(r))return s.user;const a=`${r}/community/self`,u=null!=e?e.signal:null,d=await(0,l.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?v.Z.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,p.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,r._)([(0,f.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},34760:(e,t,i)=>{i.d(t,{Q:()=>b});var r=i(43697),s=i(92604),n=i(95330),o=i(5600),l=i(90578),a=(i(67676),i(80442),i(52011)),u=i(82960),d=i(46791),h=(i(66643),i(20102),i(26258),i(87538));const c=new d.Z,p=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function y(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:y(t,e%t):0}let m=0,g=0;function _(){const e=Date.now();let t=!1;for(const i of c){const r=i.deref();r?r.refreshInterval&&e-(p.get(r)??0)+5>=6e4*r.refreshInterval&&(p.set(r,e),r.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,h.EH)((()=>{const e=Date.now();let t=0;for(const i of c){const r=i.deref();r&&(t=y(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?p.get(r)||p.set(r,e):p.delete(r))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(_,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,r._)([(0,o.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,r._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,r._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,r._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,r._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},1231:(e,t,i)=>{i.d(t,{Z:()=>m});var r,s=i(43697),n=i(35454),o=i(96674),l=i(5600),a=i(75215),u=(i(67676),i(80442),i(36030)),d=i(71715),h=i(52011),c=i(72729),p=i(86719);const f=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=r=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?f.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,s._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,s._)([(0,l.Cb)()],y.prototype,"description",void 0),(0,s._)([(0,d.r)("description")],y.prototype,"readDescription",null),(0,s._)([(0,l.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],y.prototype,"domain",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,s._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,s._)([(0,u.J)(p.v)],y.prototype,"type",void 0),(0,s._)([(0,l.Cb)()],y.prototype,"valueType",void 0),(0,s._)([(0,d.r)("valueType",["description"])],y.prototype,"readValueType",null),(0,s._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=r=(0,s._)([(0,h.j)("esri.layers.support.Field")],y);const m=y},99514:(e,t,i)=>{i.d(t,{Z:()=>a});var r=i(20102),s=i(96674),n=i(92604),o=i(69165),l=i(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],c(e))}static fromLayerJSON(e){return new a(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=d(t);if(t&&r){const s=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,o.Dl)(e)||(0,o.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,o.Dl)(e)||(0,o.Se)(e)||e.nullable||void 0!==(0,o.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(d(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.Z.getLogger("esri.layers.support.FieldsIndex").error(new r.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),l.pt):h.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function d(e){return(0,o.q6)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,d=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,l.Jv)(s.dateFieldsTimeReference):a??l.pt:null,c=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,l.Jv)(r.timeReference):a:null,p=new Map([[u(s?.creationDateField??""),d],[u(s?.editDateField??""),d],[u(n),c],[u(o),c]]);for(const{name:r,type:s}of e.fields)if(h.has(s))t.set(r,l._4);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,l._4);else{const e=p.get(u(r??""))??a;t.set(r,e)}return t}},72729:(e,t,i)=>{i.d(t,{im:()=>T,V5:()=>F}),i(80442);var r,s=i(43697),n=i(22974),o=i(5600),l=(i(75215),i(36030)),a=i(52011),u=i(96674);i(67676);let d=r=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=r=(0,s._)([(0,a.j)("esri.layers.support.CodedValue")],d);const h=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,l.J)(h)],c.prototype,"type",void 0),c=(0,s._)([(0,a.j)("esri.layers.support.Domain")],c);const p=c;var f;let y=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,s._)([(0,o.Cb)({type:[d],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,s._)([(0,l.J)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=f=(0,s._)([(0,a.j)("esri.layers.support.CodedValueDomain")],y);const m=y;var g;i(92604),i(20102);let _=g=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,s._)([(0,l.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=g=(0,s._)([(0,a.j)("esri.layers.support.InheritedDomain")],_);const b=_;var v;let w=v=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new v({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,s._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,s._)([(0,l.J)({range:"range"})],w.prototype,"type",void 0),w=v=(0,s._)([(0,a.j)("esri.layers.support.RangeDomain")],w);const S=w,F={key:"type",base:p,typeMap:{range:w,"coded-value":m,inherited:b}};function T(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,i)=>{i.d(t,{v:()=>r});const r=new(i(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},74889:(e,t,i)=>{i.d(t,{Z:()=>b});var r,s=i(43697),n=i(66577),o=i(38171),l=i(35454),a=i(96674),u=i(22974),d=i(5600),h=(i(75215),i(71715)),c=i(52011),p=i(30556),f=i(82971),y=i(33955),m=i(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=r=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=f.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const s=e[t],n=o.Z.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const a=s.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}r.push(n)}return r}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,y.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=f.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((s-e)/i)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,s],scale:[n,o]}=i;let l=null,a=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;a=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*n+r),(e=>s-e*o),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,s;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=i(l[1]);e===r&&o===s||(n.push([e-r,o-s]),r=e,s=o)}else r=t(l[0]),s=i(l[1]),n.push([r,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,y.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],o=this._quantizePoints(n,t,i);o&&s.push(o)}return s.length>0?((0,y.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,s){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.oU)(e)?e.rings:e.paths;let o,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,s=r.length;e<s;e++){const s=r[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=i(l)}}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=s(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=s(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(o+=r[0],l+=r[1]):(o=r[0],l=r[1]),r[0]=t(o),r[1]=i(l)}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=s(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,d.Cb)({type:[o.Z],json:{write:!0}})],_.prototype,"features",void 0),(0,s._)([(0,h.r)("features")],_.prototype,"readFeatures",null),(0,s._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],_.prototype,"fields",void 0),(0,s._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,s._)([(0,p.c)("geometryType")],_.prototype,"writeGeometryType",null),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,s._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,s._)([(0,h.r)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,s._)([(0,d.Cb)({type:f.Z,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,s._)([(0,p.c)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,s._)([(0,d.Cb)({json:{write:!0}})],_.prototype,"transform",void 0),_=r=(0,s._)([(0,c.j)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const b=_}}]);
|