@arcgis/core 4.31.0-next.20240921 → 4.31.0-next.20240922

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/1810cb638ca1d52de7b2.js +1 -0
  3. package/assets/esri/core/workers/chunks/{69f6f35b04c722aba8cf.js → 238897e72fedd6754af7.js} +1 -1
  4. package/assets/esri/core/workers/chunks/2807eb7bfe4868fe840f.js +1 -0
  5. package/assets/esri/core/workers/chunks/{6c07116c8f7361780803.js → 2b04d2f8466d16a24a80.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{83649583139b818d4dfa.js → 356f6cc122287412b888.js} +1 -1
  7. package/assets/esri/core/workers/chunks/36a1de3752ff13d77b4d.js +1 -0
  8. package/assets/esri/core/workers/chunks/{f14cefc311a21116d21b.js → 4c0d37b799edae391ab2.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{16eda85f728423c4ed02.js → 4ea08495271f6d291b05.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{cf147f34032a8d07f322.js → 53becb5fe10f7f38311f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{24d45530fe47b3114daf.js → 5652ff08dcc5afd3d739.js} +1 -1
  12. package/assets/esri/core/workers/chunks/5fe1f8881959df0e61ce.js +1 -0
  13. package/assets/esri/core/workers/chunks/62f4eda8a9f4de481dcb.js +1 -0
  14. package/assets/esri/core/workers/chunks/{3fa3e1e6595668ca0e18.js → 686613864dd54d1cae3c.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{5d0d36230a5b8309c9e4.js → 75bf6dff29056a5a1242.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{a7bd5bb21a7f3030ee13.js → 783d66397f16899dd0e9.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{2658205b1ab2502c0bc7.js → 856c82a20027435fd306.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{99944b05d3142903511c.js → 93fb720bbfb3628f9c71.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{14f77efbfba0ca9efb6c.js → 9dce33a9bcfb852a74d3.js} +1 -1
  20. package/assets/esri/core/workers/chunks/abdb6f02351250a776ff.js +1 -0
  21. package/assets/esri/core/workers/chunks/{de7e197223471c7b66a7.js → afb35deb035c9c9225c9.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{5f9beed2a9599b9ce649.js → bc37c0dc14ea54f1b9e8.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{35f92652df2561845d47.js → c9aa8df2f62e6d40b771.js} +1 -1
  24. package/assets/esri/core/workers/chunks/d8435cc010bd2260feec.js +1 -0
  25. package/assets/esri/core/workers/chunks/e5a8ab8d02a616469f1d.js +1 -0
  26. package/assets/esri/core/workers/chunks/f1446e56c35e59b904e1.js +1 -0
  27. package/assets/esri/core/workers/chunks/{6508ff21b0a5725629eb.js → fa3f9691a9bd1bbb25d3.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{008f290833724454160d.js → fab59ee41f96b2378768.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{67ea066a903f5ad31155.js → fe709db8238127f91e59.js} +1 -1
  30. package/layers/FeatureLayer.js +1 -1
  31. package/layers/SubtypeGroupLayer.js +1 -1
  32. package/layers/support/SubtypeSublayer.js +1 -1
  33. package/layers/support/featureLayerUtils.js +1 -1
  34. package/package.json +1 -1
  35. package/support/revision.js +1 -1
  36. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  37. package/assets/esri/core/workers/chunks/0eb789af3c26fecdf3be.js +0 -1
  38. package/assets/esri/core/workers/chunks/41a3c7d286a050002d20.js +0 -1
  39. package/assets/esri/core/workers/chunks/59e4731d246203e94a96.js +0 -1
  40. package/assets/esri/core/workers/chunks/69c09478c899cd5e5013.js +0 -1
  41. package/assets/esri/core/workers/chunks/7088f771163fda53d196.js +0 -1
  42. package/assets/esri/core/workers/chunks/79ed119c70ce6ea02f71.js +0 -1
  43. package/assets/esri/core/workers/chunks/eeacd5fa9fb9b1dee5f7.js +0 -1
  44. package/assets/esri/core/workers/chunks/f7c96d34c70ed36da7c2.js +0 -1
  45. package/assets/esri/core/workers/chunks/f9e90a2fda559ca68848.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9377,3069],{39516:(e,t,n)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([n.e(835),n.e(4800)]).then(n.bind(n,50835));return i.create(e,{fieldsIndex:t})}function r(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>i,m:()=>r})},3330:(e,t,n)=>{n.d(t,{GB:()=>r,Qo:()=>s,Y4:()=>o});var i=n(96285);class r{}function o(e){return e instanceof i.bo?e===r.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return o(e)?r.instance:e}r.instance=new i.oh("Etc/UTC")},13069:(e,t,n)=>{n.d(t,{lk:()=>r,vD:()=>s,yS:()=>o});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${r().toUpperCase()}}`}function s(){return`{${r()}}`}},70328:(e,t,n)=>{n.d(t,{BI:()=>x,Ej:()=>f,Hq:()=>u,Ie:()=>F,Jt:()=>w,Ne:()=>h,RF:()=>l,_F:()=>m,aI:()=>T,fA:()=>o,gX:()=>y,hZ:()=>_,iT:()=>a,is:()=>v,qv:()=>M,vI:()=>g,v_:()=>N,vt:()=>r,w1:()=>s});var i=n(5443);function r(e=N){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,n,i,o,s,l=r()){return l[0]=e,l[1]=t,l[2]=n,l[3]=i,l[4]=o,l[5]=s,l}function s(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new i.A(n?{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,n=0,i=t.length/3){let r=e[0],o=e[1],s=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)r=Math.min(r,t[n+3*e]),o=Math.min(o,t[n+3*e+1]),s=Math.min(s,t[n+3*e+2]),l=Math.max(l,t[n+3*e]),a=Math.max(a,t[n+3*e+1]),u=Math.max(u,t[n+3*e+2]);e[0]=r,e[1]=o,e[2]=s,e[3]=l,e[4]=a,e[5]=u}function p(e){return e[0]>=e[3]?0:e[3]-e[0]}function d(e){return e[1]>=e[4]?0:e[4]-e[1]}function c(e){return e[2]>=e[5]?0:e[5]-e[2]}function m(e){const t=p(e),n=c(e),i=d(e);return Math.sqrt(t*t+n*n+i*i)}function y(e,t=[0,0,0]){return t[0]=e[0]+p(e)/2,t[1]=e[1]+d(e)/2,t[2]=e[2]+c(e)/2,t}function f(e,t=[0,0,0]){return t[0]=p(e),t[1]=d(e),t[2]=c(e),t}function h(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function g(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function _(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 F(e){return e?_(e,M):r(M)}function w(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 x(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function v(e){return 6===e.length}function T(e,t,n){if(null==e||null==t)return e===t;if(!v(e)||!v(t))return!1;if(n){for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n(19419);const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],N=[0,0,0,0,0,0];r()},39357:(e,t,n)=>{n.d(t,{H:()=>a});var i,r=n(90237),o=n(25482),s=n(10107),l=(n(44208),n(53966),n(87811),n(40608));let a=i=class extends o.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,r._)([(0,s.M)({type:String,json:{write:!0}})],a.prototype,"name",void 0),(0,r._)([(0,s.M)({type:[String,Number],json:{write:!0}})],a.prototype,"code",void 0),a=i=(0,r._)([(0,l.$)("esri.layers.support.CodedValue")],a)},53177:(e,t,n)=>{n.d(t,{A:()=>c});var i,r=n(90237),o=n(4718),s=n(10107),l=(n(44208),n(53966),n(93223)),a=n(40608),u=n(39357),p=n(76357);let d=i=class extends p.A{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new i({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,r._)([(0,s.M)({type:[u.H],json:{write:!0}})],d.prototype,"codedValues",void 0),(0,r._)([(0,l.e)({codedValue:"coded-value"})],d.prototype,"type",void 0),d=i=(0,r._)([(0,a.$)("esri.layers.support.CodedValueDomain")],d);const c=d},76357:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(90237),r=n(66552),o=n(25482),s=n(10107),l=(n(44208),n(53966),n(87811),n(93223)),a=n(40608);const u=new r.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let p=class extends o.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,s.M)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,l.e)(u)],p.prototype,"type",void 0),p=(0,i._)([(0,a.$)("esri.layers.support.Domain")],p);const d=p},33143:(e,t,n)=>{n.d(t,{A:()=>m});var i=n(90237),r=n(69540),o=n(25482),s=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),a=n(40608),u=n(43937),p=n(80451),d=n(29005);let c=class extends((0,r.O)(o.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const n of Object.keys(e))t[n]=(0,p.rS)(e[n]);return t}writeDomains(e,t){const n={};for(const t of Object.keys(e))e[t]&&(n[t]=e[t]?.toJSON());t.domains=n}};(0,i._)([(0,s.M)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,s.M)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,s.M)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,l.w)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,s.M)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,a.$)("esri.layers.support.FeatureType")],c);const m=c},20437:(e,t,n)=>{n.d(t,{A:()=>h});var i,r=n(90237),o=n(66552),s=n(25482),l=n(10107),a=n(56507),u=(n(87811),n(44208),n(93223)),p=n(36005),d=n(40608),c=n(80451),m=n(98453);const y=new o.J({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 f=i=class extends s.oY{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 n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?y.fromJSON(n.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,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,r._)([(0,l.M)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,r._)([(0,l.M)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,r._)([(0,l.M)()],f.prototype,"description",void 0),(0,r._)([(0,p.w)("description")],f.prototype,"readDescription",null),(0,r._)([(0,l.M)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],f.prototype,"domain",void 0),(0,r._)([(0,l.M)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,r._)([(0,l.M)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,r._)([(0,l.M)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,r._)([(0,l.M)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,r._)([(0,u.e)(m.m)],f.prototype,"type",void 0),(0,r._)([(0,l.M)()],f.prototype,"valueType",void 0),(0,r._)([(0,p.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,r._)([(0,l.M)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,r._)([(0,d.$)("esri.layers.support.Field")],f);const h=f},95466:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(49186),r=n(25482),o=n(53966),s=n(91869),l=n(3330),a=n(30524),u=n(56400),p=n(96285);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],h(e))}static fromLayerJSON(e){return new c(e.fields??[],h(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 n=[];for(const e of this.fields){const t=e?.name,i=y(t);if(t&&i){const r=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(i,e),n.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}n.sort(),this.uid=n.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(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(m(e))??this._normalizedFieldsMap.get(y(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?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?l.GB.instance:t===u.n$?p.mQ.utcInstance:(0,s.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(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,r.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function y(e){return(0,a.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const n=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:r}=e,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,a=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.dateFieldsTimeReference?(0,u.ZS)(r.dateFieldsTimeReference):l??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,u.ZS)(i.timeReference):l:null,d=new Map([[m(r?.creationDateField??""),a],[m(r?.editDateField??""),a],[m(o),p],[m(s),p]]);for(const{name:i,type:r}of e.fields)if(f.has(r))t.set(i,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(i,null);else if(n)t.set(i,u.L5);else{const e=d.get(m(i??""))??l;t.set(i,e)}return t}},80451:(e,t,n)=>{n.d(t,{rS:()=>h,gK:()=>f}),n(44208);var i,r=n(53177),o=n(76357),s=n(90237),l=(n(53966),n(87811),n(49186),n(93223)),a=n(40608);let u=i=class extends o.A{constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,s._)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=i=(0,s._)([(0,a.$)("esri.layers.support.InheritedDomain")],u);const p=u;var d,c=n(10107);let m=d=class extends o.A{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new d({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,c.M)({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,n){t[n]=[this.minValue||0,e]}}}})],m.prototype,"maxValue",void 0),(0,s._)([(0,c.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],m.prototype,"minValue",void 0),(0,s._)([(0,l.e)({range:"range"})],m.prototype,"type",void 0),m=d=(0,s._)([(0,a.$)("esri.layers.support.RangeDomain")],m);const y=m,f={key:"type",base:o.A,typeMap:{range:y,"coded-value":r.A,inherited:p}};function h(e){if(!e?.type)return null;switch(e.type){case"range":return y.fromJSON(e);case"codedValue":return r.A.fromJSON(e);case"inherited":return p.fromJSON(e)}return null}},98453:(e,t,n)=>{n.d(t,{m:()=>i});const i=new(n(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,n)=>{n.d(t,{BI:()=>h,D3:()=>y,XJ:()=>f,lc:()=>m,mX:()=>_,rU:()=>g,tH:()=>T});var i=n(799);const r="__begin__",o="__end__",s=new RegExp(r,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+r,"i"),u=new RegExp(o+"$","i"),p='"',d=p+" + ",c=" + "+p;function m(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=m(e.labelExpression),t.type="conventional"),t}function h(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(F);return t?.[1].trim()||null}(t.expression);case"arcade":return T(t.expression)}return null}function _(e){let t;return e?(t=(0,i.HC)(e,(e=>r+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(s,d).replaceAll(l,c)):t='""',t}const F=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function T(e){if(!e)return null;let t=w.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},58501:(e,t,n)=>{n.d(t,{q:()=>r});var i=n(62815);function r(e,t,n){if(!n?.features||!n.hasZ)return;const r=(0,i.N)(n.geometryType,t,e.outSpatialReference);if(null!=r)for(const e of n.features)r(e.geometry)}},22671:(e,t,n)=>{n.d(t,{A:()=>F});var i,r=n(90237),o=n(59456),s=n(52106),l=n(66552),a=n(25482),u=n(4718),p=n(10107),d=(n(44208),n(53966),n(36005)),c=n(40608),m=n(43937),y=n(16930),f=n(65864),h=n(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends a.oY{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 n=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const r=e[t],o=s.A.fromJSON(r),l=r.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=n);const a=r.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],i=a[e],r=i?.spatialReference;null==t||r||(t.spatialReference=n)}i.push(o)}return i}writeGeometryType(e,t,n,i){if(e)return void g.write(e,t,n,i);const{features:r}=this;if(r)for(const e of r)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,i)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,i=(0,f.rS)(e);return i&&!n&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({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 n=0;n<t.features.length;n++){const i=t.features[n];if(i.geometry){const t=e?.[n];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,n],translate:[i,r]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((r-e)/n)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[i,r],scale:[o,s]}=n;let l=null,a=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;l=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;a=n=>null==n?n:n*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>r-e*s),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,n){let i,r;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=n(l[1]);e===i&&s===r||(o.push([e-i,s-r]),i=e,r=s)}else i=t(l[0]),r=n(l[1]),o.push([i,r])}return o.length>0?o:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths,r=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,n);s&&r.push(s)}return r.length>0?((0,f.Bi)(e)?e.rings=r:e.paths=r,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,n);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,i,r){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,r=i.length;e<r;e++){const r=i[e];e>0?(s+=r[0],l+=r[1]):(s=r[0],l=r[1]),r[0]=t(s),r[1]=n(l)}}if(i&&r)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=i(n[2]),n[3]=r(n[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=i(n[2])}}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),r&&null!=e.mmax&&null!=e.mmin&&(e.mmax=r(e.mmax),e.mmin=r(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=n(l)}if(i&&r)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=r(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2])}}:null}};(0,r._)([(0,p.M)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,r._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,r._)([(0,p.M)({type:[s.A],json:{write:!0}})],_.prototype,"features",void 0),(0,r._)([(0,d.w)("features")],_.prototype,"readFeatures",null),(0,r._)([(0,p.M)({type:[h.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,r._)([(0,p.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,r._)([(0,m.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,r._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,r._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,r._)([(0,p.M)({types:o.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,r._)([(0,d.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,r._)([(0,p.M)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,r._)([(0,m.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,r._)([(0,p.M)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,r._)([(0,c.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const F=_}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4273,3069],{3330:(e,t,i)=>{i.d(t,{GB:()=>r,Qo:()=>l,Y4:()=>o});var n=i(96285);class r{}function o(e){return e instanceof n.bo?e===r.instance:"unknown"===e?.toString().toLowerCase()}function l(e){return o(e)?r.instance:e}r.instance=new n.oh("Etc/UTC")},13069:(e,t,i)=>{i.d(t,{lk:()=>r,vD:()=>l,yS:()=>o});const n="randomUUID"in crypto;function r(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${r().toUpperCase()}}`}function l(){return`{${r()}}`}},70328:(e,t,i)=>{i.d(t,{BI:()=>M,Ej:()=>f,Hq:()=>u,Ie:()=>S,Jt:()=>w,Ne:()=>h,RF:()=>a,_F:()=>m,aI:()=>T,fA:()=>o,gX:()=>c,hZ:()=>b,iT:()=>s,is:()=>F,qv:()=>_,vI:()=>g,v_:()=>O,vt:()=>r,w1:()=>l});var n=i(5443);function r(e=O){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,i,n,o,l,a=r()){return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=o,a[5]=l,a}function l(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new n.A(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 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[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function s(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,i=0,n=t.length/3){let r=e[0],o=e[1],l=e[2],a=e[3],s=e[4],u=e[5];for(let e=0;e<n;e++)r=Math.min(r,t[i+3*e]),o=Math.min(o,t[i+3*e+1]),l=Math.min(l,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),s=Math.max(s,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=r,e[1]=o,e[2]=l,e[3]=a,e[4]=s,e[5]=u}function y(e){return e[0]>=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function d(e){return e[2]>=e[5]?0:e[5]-e[2]}function m(e){const t=y(e),i=d(e),n=p(e);return Math.sqrt(t*t+i*i+n*n)}function c(e,t=[0,0,0]){return t[0]=e[0]+y(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+d(e)/2,t}function f(e,t=[0,0,0]){return t[0]=y(e),t[1]=p(e),t[2]=d(e),t}function h(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 g(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 b(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 S(e){return e?b(e,_):r(_)}function w(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 M(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function F(e){return 6===e.length}function T(e,t,i){if(null==e||null==t)return e===t;if(!F(e)||!F(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(19419);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],O=[0,0,0,0,0,0];r()},96953:(e,t,i)=>{i.r(t),i.d(t,{default:()=>q});var n=i(90237),r=(i(59456),i(52106)),o=(i(61147),i(5503)),l=i(49186),a=i(4718),s=i(92071),u=i(93637),y=i(67076),p=i(10107),d=(i(44208),i(53966),i(36005)),m=i(40608),c=i(43937),f=i(57251),h=i(19419),g=i(17136),b=i(21325),S=i(13600),w=i(94194),M=i(4146),F=i(33032),T=i(63074),_=i(16131),O=i(8303),N=i(25036),I=i(20437),v=i(94985),x=i(31593),L=i(53930),J=i(68249),C=i(16930),A=i(5443);function D(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!R(e)))}function R({layerDefinition:e,featureSet:t}){const i=e.geometryType??t.geometryType;return G.find((t=>i===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function j(){return new A.A({xmin:-180,ymin:-90,xmax:180,ymax:90})}const E=new I.A({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),Z=new I.A({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let B=class extends w.A{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?(0,f.projectOrLoad)(j(),e).geometry:(0,h.w1)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,h.Ie)();return this.graphics.forEach((i=>{const n=null!=i.geometry?(0,f.projectOrLoad)(i.geometry,e).geometry:null;null!=n&&(0,h.fT)(t,"point"===n.type?n:n.extent,t)})),(0,h.aI)(t,h.qv)?null:t}get sublayers(){return this.graphics}};(0,n._)([(0,p.M)({readOnly:!0})],B.prototype,"fullExtent",null),(0,n._)([(0,p.M)({readOnly:!0})],B.prototype,"fullBounds",null),(0,n._)([(0,p.M)({readOnly:!0})],B.prototype,"sublayers",null),(0,n._)([(0,p.M)()],B.prototype,"layer",void 0),(0,n._)([(0,p.M)()],B.prototype,"layerId",void 0),(0,n._)([(0,p.M)({readOnly:!0})],B.prototype,"visibilityMode",void 0),B=(0,n._)([(0,m.$)("esri.layers.MapNotesLayer.MapNotesSublayer")],B);const G=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new v.A).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new x.A).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new L.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new L.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new J.A).toJSON()}];let P=class extends((0,T.dM)((0,N.j)((0,_.q)((0,O.A)((0,s.P)(M.A)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=C.A.WGS84,this.sublayers=new o.A(G.map((e=>new B({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,i){return{operations:{supportsMapNotesEditing:!D(t)&&"portal-item"!==i?.origin}}}readFeatureCollections(e,t,i){if(!D(t))return null;const n=t.layers.map((e=>{const t=new S.default;return t.read(e,i),t}));return new o.A({items:n})}readLegacyfeatureCollectionJSON(e,t){return D(t)?(0,a.o8)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,h.Ie)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,h.fT)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((i=>{const n=(0,f.projectOrLoad)(i.layerDefinition.extent,e).geometry;null!=n&&(0,h.fT)(t,n,t)})),(0,h.aI)(t,h.qv)?(0,f.projectOrLoad)(j(),e).geometry:(0,h.w1)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?C.A.fromJSON(t.layers[0].layerDefinition.spatialReference):C.A.WGS84}readSublayers(e,t,i){if(D(t))return null;const n=[];let l=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:i}=e,o=t.id??l++,a=R(e);if(null!=a){const e=new B({id:a.id,title:t.name,layerId:o,layer:this,graphics:i.features.map((({geometry:e,symbol:t,attributes:i,popupInfo:n})=>r.A.fromJSON({attributes:i,geometry:e,symbol:t,popupTemplate:n})))});n.push(e)}}return new o.A(n)}writeSublayers(e,t,i,n){const{minScale:r,maxScale:o}=this;if(null==e)return;const a=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(a&&n?.messages?.push(new l.A("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const s=[];let y=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if(null!=e.geometry){y=e.geometry.spatialReference.toJSON();break e}for(const t of G){const i=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(s,i,t,r,o,y,n)}(0,u.sM)("featureCollection.layers",s,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,a.o8)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const i of this.sublayers)for(const n of i.graphics)if(null!=n.geometry){const i=n.geometry;e?(0,b.aI)(i.spatialReference,e)||((0,f.canProjectWithoutEngine)(i.spatialReference,e)||(0,f.isLoaded)()||await(0,f.load)(),n.geometry=(0,f.project)(i,e)):e=i.spatialReference,t.push(n)}const i=await(0,g.el)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=i[t]))}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,i,n,r,o,l){const s=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(s,e,i.geometryType,l);this._normalizeObjectIds(s,E),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,a.o8)(i.identifyingSymbol)}},id:t.layerId,geometryType:i.geometryTypeJSON,minScale:n,maxScale:r,objectIdField:"OBJECTID",fields:[E.toJSON(),Z.toJSON()],spatialReference:o},featureSet:{features:s,geometryType:i.geometryTypeJSON}})}}_writeMapNote(e,t,i,n){if(null==t)return;const{geometry:r,symbol:o,popupTemplate:l}=t;if(null==r)return;if(r.type!==i)return void n?.messages?.push(new y.A("map-notes-layer:invalid-geometry-type",`Geometry "${r.type}" cannot be saved in "${i}" layer`,{graphic:t}));if(null==o)return void n?.messages?.push(new y.A("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const a={attributes:{...t.attributes},geometry:r.toJSON(),symbol:o.toJSON()};null!=l&&(a.popupInfo=l.toJSON()),e.push(a)}_normalizeObjectIds(e,t){const i=t.name;let n=(0,F.H)(i,e)+1;const r=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[i]||r.has(e[i]))&&(e[i]=n++),r.add(e[i])}}};(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"capabilities",void 0),(0,n._)([(0,d.w)(["portal-item","web-map"],"capabilities",["layers"])],P.prototype,"readCapabilities",null),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"featureCollections",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"featureCollections",["layers"])],P.prototype,"readFeatureCollections",null),(0,n._)([(0,p.M)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],P.prototype,"featureCollectionJSON",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],P.prototype,"readLegacyfeatureCollectionJSON",null),(0,n._)([(0,p.M)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],P.prototype,"featureCollectionType",void 0),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"fullExtent",null),(0,n._)([(0,p.M)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],P.prototype,"legendEnabled",void 0),(0,n._)([(0,p.M)({type:["show","hide","hide-children"]})],P.prototype,"listMode",void 0),(0,n._)([(0,p.M)({type:Number,nonNullable:!0,json:{write:!1}})],P.prototype,"minScale",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"minScale",["layers"])],P.prototype,"readMinScale",null),(0,n._)([(0,p.M)({type:Number,nonNullable:!0,json:{write:!1}})],P.prototype,"maxScale",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"maxScale",["layers"])],P.prototype,"readMaxScale",null),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"multipointLayer",null),(0,n._)([(0,p.M)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],P.prototype,"operationalLayerType",void 0),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"pointLayer",null),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"polygonLayer",null),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"polylineLayer",null),(0,n._)([(0,p.M)({type:C.A})],P.prototype,"spatialReference",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"spatialReference",["layers"])],P.prototype,"readSpatialReference",null),(0,n._)([(0,p.M)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],P.prototype,"sublayers",void 0),(0,n._)([(0,d.w)("web-map","sublayers",["layers"])],P.prototype,"readSublayers",null),(0,n._)([(0,c.K)("web-map","sublayers")],P.prototype,"writeSublayers",null),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"textLayer",null),(0,n._)([(0,p.M)()],P.prototype,"title",void 0),(0,n._)([(0,p.M)({readOnly:!0,json:{read:!1}})],P.prototype,"type",void 0),P=(0,n._)([(0,m.$)("esri.layers.MapNotesLayer")],P);const q=P},33032:(e,t,i)=>{i.d(t,{H:()=>r,L:()=>n});const n=1;function r(e,t){let i=0;for(const n of t){const t=n.attributes?.[e];"number"==typeof t&&isFinite(t)&&(i=Math.max(i,t))}return i}},33143:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(90237),r=i(69540),o=i(25482),l=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),s=i(40608),u=i(43937),y=i(72088),p=i(29005);let d=class extends((0,r.O)(o.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,y.rS)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,n._)([(0,l.M)({json:{write:!0}})],d.prototype,"id",void 0),(0,n._)([(0,l.M)({json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,l.M)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,n._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,n._)([(0,l.M)({type:[p.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n._)([(0,s.$)("esri.layers.support.FeatureType")],d);const m=d},95466:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(49186),r=i(25482),o=i(53966),l=i(91869),a=i(3330),s=i(30524),u=i(56400),y=i(96285);const p=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],h(e))}static fromLayerJSON(e){return new d(e.fields??[],h(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,n=c(t);if(t&&n){const r=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(n,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,s.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,s.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,s.te)(e)||(0,s.Xz)(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,s.te)(e)||(0,s.Xz)(e)||e.nullable||void 0!==(0,s.lD)(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(m(e))??this._normalizedFieldsMap.get(c(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?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?y.mQ.utcInstance:(0,l.tE)(p,t,(()=>y.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,s.OH)(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,r.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function c(e){return(0,s.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:r}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",l=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,s=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.dateFieldsTimeReference?(0,u.ZS)(r.dateFieldsTimeReference):a??u.n$:null,y=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,u.ZS)(n.timeReference):a:null,p=new Map([[m(r?.creationDateField??""),s],[m(r?.editDateField??""),s],[m(o),y],[m(l),y]]);for(const{name:n,type:r}of e.fields)if(f.has(r))t.set(n,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(n,null);else if(i)t.set(n,u.L5);else{const e=p.get(m(n??""))??a;t.set(n,e)}return t}},98453:(e,t,i)=>{i.d(t,{m:()=>n});const n=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},58501:(e,t,i)=>{i.d(t,{q:()=>r});var n=i(62815);function r(e,t,i){if(!i?.features||!i.hasZ)return;const r=(0,n.N)(i.geometryType,t,e.outSpatialReference);if(null!=r)for(const e of i.features)r(e.geometry)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4273,3069],{3330:(e,t,i)=>{i.d(t,{GB:()=>r,Qo:()=>l,Y4:()=>o});var n=i(96285);class r{}function o(e){return e instanceof n.bo?e===r.instance:"unknown"===e?.toString().toLowerCase()}function l(e){return o(e)?r.instance:e}r.instance=new n.oh("Etc/UTC")},13069:(e,t,i)=>{i.d(t,{lk:()=>r,vD:()=>l,yS:()=>o});const n="randomUUID"in crypto;function r(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${r().toUpperCase()}}`}function l(){return`{${r()}}`}},70328:(e,t,i)=>{i.d(t,{BI:()=>M,Ej:()=>f,Hq:()=>u,Ie:()=>S,Jt:()=>w,Ne:()=>h,RF:()=>a,_F:()=>m,aI:()=>T,fA:()=>o,gX:()=>c,hZ:()=>b,iT:()=>s,is:()=>F,qv:()=>_,vI:()=>g,v_:()=>O,vt:()=>r,w1:()=>l});var n=i(5443);function r(e=O){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,i,n,o,l,a=r()){return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=o,a[5]=l,a}function l(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new n.A(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 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[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function s(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,i=0,n=t.length/3){let r=e[0],o=e[1],l=e[2],a=e[3],s=e[4],u=e[5];for(let e=0;e<n;e++)r=Math.min(r,t[i+3*e]),o=Math.min(o,t[i+3*e+1]),l=Math.min(l,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),s=Math.max(s,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=r,e[1]=o,e[2]=l,e[3]=a,e[4]=s,e[5]=u}function y(e){return e[0]>=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function d(e){return e[2]>=e[5]?0:e[5]-e[2]}function m(e){const t=y(e),i=d(e),n=p(e);return Math.sqrt(t*t+i*i+n*n)}function c(e,t=[0,0,0]){return t[0]=e[0]+y(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+d(e)/2,t}function f(e,t=[0,0,0]){return t[0]=y(e),t[1]=p(e),t[2]=d(e),t}function h(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 g(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 b(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 S(e){return e?b(e,_):r(_)}function w(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 M(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function F(e){return 6===e.length}function T(e,t,i){if(null==e||null==t)return e===t;if(!F(e)||!F(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(19419);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],O=[0,0,0,0,0,0];r()},96953:(e,t,i)=>{i.r(t),i.d(t,{default:()=>q});var n=i(90237),r=(i(59456),i(52106)),o=(i(61147),i(5503)),l=i(49186),a=i(4718),s=i(92071),u=i(93637),y=i(67076),p=i(10107),d=(i(44208),i(53966),i(36005)),m=i(40608),c=i(43937),f=i(57251),h=i(19419),g=i(17136),b=i(21325),S=i(13600),w=i(94194),M=i(4146),F=i(33032),T=i(63074),_=i(16131),O=i(8303),N=i(25036),I=i(20437),v=i(94985),x=i(31593),L=i(53930),J=i(68249),C=i(16930),A=i(5443);function D(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!R(e)))}function R({layerDefinition:e,featureSet:t}){const i=e.geometryType??t.geometryType;return G.find((t=>i===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function j(){return new A.A({xmin:-180,ymin:-90,xmax:180,ymax:90})}const E=new I.A({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),Z=new I.A({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let B=class extends w.A{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?(0,f.projectOrLoad)(j(),e).geometry:(0,h.w1)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,h.Ie)();return this.graphics.forEach((i=>{const n=null!=i.geometry?(0,f.projectOrLoad)(i.geometry,e).geometry:null;null!=n&&(0,h.fT)(t,"point"===n.type?n:n.extent,t)})),(0,h.aI)(t,h.qv)?null:t}get sublayers(){return this.graphics}};(0,n._)([(0,p.M)({readOnly:!0})],B.prototype,"fullExtent",null),(0,n._)([(0,p.M)({readOnly:!0})],B.prototype,"fullBounds",null),(0,n._)([(0,p.M)({readOnly:!0})],B.prototype,"sublayers",null),(0,n._)([(0,p.M)()],B.prototype,"layer",void 0),(0,n._)([(0,p.M)()],B.prototype,"layerId",void 0),(0,n._)([(0,p.M)({readOnly:!0})],B.prototype,"visibilityMode",void 0),B=(0,n._)([(0,m.$)("esri.layers.MapNotesLayer.MapNotesSublayer")],B);const G=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new v.A).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new x.A).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new L.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new L.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new J.A).toJSON()}];let P=class extends((0,T.dM)((0,N.j)((0,_.q)((0,O.A)((0,s.P)(M.A)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=C.A.WGS84,this.sublayers=new o.A(G.map((e=>new B({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,i){return{operations:{supportsMapNotesEditing:!D(t)&&"portal-item"!==i?.origin}}}readFeatureCollections(e,t,i){if(!D(t))return null;const n=t.layers.map((e=>{const t=new S.default;return t.read(e,i),t}));return new o.A({items:n})}readLegacyfeatureCollectionJSON(e,t){return D(t)?(0,a.o8)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,h.Ie)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,h.fT)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((i=>{const n=(0,f.projectOrLoad)(i.layerDefinition.extent,e).geometry;null!=n&&(0,h.fT)(t,n,t)})),(0,h.aI)(t,h.qv)?(0,f.projectOrLoad)(j(),e).geometry:(0,h.w1)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?C.A.fromJSON(t.layers[0].layerDefinition.spatialReference):C.A.WGS84}readSublayers(e,t,i){if(D(t))return null;const n=[];let l=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:i}=e,o=t.id??l++,a=R(e);if(null!=a){const e=new B({id:a.id,title:t.name,layerId:o,layer:this,graphics:i.features.map((({geometry:e,symbol:t,attributes:i,popupInfo:n})=>r.A.fromJSON({attributes:i,geometry:e,symbol:t,popupTemplate:n})))});n.push(e)}}return new o.A(n)}writeSublayers(e,t,i,n){const{minScale:r,maxScale:o}=this;if(null==e)return;const a=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(a&&n?.messages?.push(new l.A("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const s=[];let y=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if(null!=e.geometry){y=e.geometry.spatialReference.toJSON();break e}for(const t of G){const i=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(s,i,t,r,o,y,n)}(0,u.sM)("featureCollection.layers",s,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,a.o8)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const i of this.sublayers)for(const n of i.graphics)if(null!=n.geometry){const i=n.geometry;e?(0,b.aI)(i.spatialReference,e)||((0,f.canProjectWithoutEngine)(i.spatialReference,e)||(0,f.isLoaded)()||await(0,f.load)(),n.geometry=(0,f.project)(i,e)):e=i.spatialReference,t.push(n)}const i=await(0,g.el)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=i[t]))}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,i,n,r,o,l){const s=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(s,e,i.geometryType,l);this._normalizeObjectIds(s,E),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,a.o8)(i.identifyingSymbol)}},id:t.layerId,geometryType:i.geometryTypeJSON,minScale:n,maxScale:r,objectIdField:"OBJECTID",fields:[E.toJSON(),Z.toJSON()],spatialReference:o},featureSet:{features:s,geometryType:i.geometryTypeJSON}})}}_writeMapNote(e,t,i,n){if(null==t)return;const{geometry:r,symbol:o,popupTemplate:l}=t;if(null==r)return;if(r.type!==i)return void n?.messages?.push(new y.A("map-notes-layer:invalid-geometry-type",`Geometry "${r.type}" cannot be saved in "${i}" layer`,{graphic:t}));if(null==o)return void n?.messages?.push(new y.A("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const a={attributes:{...t.attributes},geometry:r.toJSON(),symbol:o.toJSON()};null!=l&&(a.popupInfo=l.toJSON()),e.push(a)}_normalizeObjectIds(e,t){const i=t.name;let n=(0,F.H)(i,e)+1;const r=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[i]||r.has(e[i]))&&(e[i]=n++),r.add(e[i])}}};(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"capabilities",void 0),(0,n._)([(0,d.w)(["portal-item","web-map"],"capabilities",["layers"])],P.prototype,"readCapabilities",null),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"featureCollections",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"featureCollections",["layers"])],P.prototype,"readFeatureCollections",null),(0,n._)([(0,p.M)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],P.prototype,"featureCollectionJSON",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],P.prototype,"readLegacyfeatureCollectionJSON",null),(0,n._)([(0,p.M)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],P.prototype,"featureCollectionType",void 0),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"fullExtent",null),(0,n._)([(0,p.M)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],P.prototype,"legendEnabled",void 0),(0,n._)([(0,p.M)({type:["show","hide","hide-children"]})],P.prototype,"listMode",void 0),(0,n._)([(0,p.M)({type:Number,nonNullable:!0,json:{write:!1}})],P.prototype,"minScale",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"minScale",["layers"])],P.prototype,"readMinScale",null),(0,n._)([(0,p.M)({type:Number,nonNullable:!0,json:{write:!1}})],P.prototype,"maxScale",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"maxScale",["layers"])],P.prototype,"readMaxScale",null),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"multipointLayer",null),(0,n._)([(0,p.M)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],P.prototype,"operationalLayerType",void 0),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"pointLayer",null),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"polygonLayer",null),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"polylineLayer",null),(0,n._)([(0,p.M)({type:C.A})],P.prototype,"spatialReference",void 0),(0,n._)([(0,d.w)(["web-map","portal-item"],"spatialReference",["layers"])],P.prototype,"readSpatialReference",null),(0,n._)([(0,p.M)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],P.prototype,"sublayers",void 0),(0,n._)([(0,d.w)("web-map","sublayers",["layers"])],P.prototype,"readSublayers",null),(0,n._)([(0,c.K)("web-map","sublayers")],P.prototype,"writeSublayers",null),(0,n._)([(0,p.M)({readOnly:!0})],P.prototype,"textLayer",null),(0,n._)([(0,p.M)()],P.prototype,"title",void 0),(0,n._)([(0,p.M)({readOnly:!0,json:{read:!1}})],P.prototype,"type",void 0),P=(0,n._)([(0,m.$)("esri.layers.MapNotesLayer")],P);const q=P},33032:(e,t,i)=>{i.d(t,{H:()=>r,L:()=>n});const n=1;function r(e,t){let i=0;for(const n of t){const t=n.attributes?.[e];"number"==typeof t&&isFinite(t)&&(i=Math.max(i,t))}return i}},33143:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(90237),r=i(69540),o=i(25482),l=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),s=i(40608),u=i(43937),y=i(80451),p=i(29005);let d=class extends((0,r.O)(o.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,y.rS)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,n._)([(0,l.M)({json:{write:!0}})],d.prototype,"id",void 0),(0,n._)([(0,l.M)({json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,l.M)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,n._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,n._)([(0,l.M)({type:[p.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n._)([(0,s.$)("esri.layers.support.FeatureType")],d);const m=d},95466:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(49186),r=i(25482),o=i(53966),l=i(91869),a=i(3330),s=i(30524),u=i(56400),y=i(96285);const p=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],h(e))}static fromLayerJSON(e){return new d(e.fields??[],h(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,n=c(t);if(t&&n){const r=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(n,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,s.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,s.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,s.te)(e)||(0,s.Xz)(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,s.te)(e)||(0,s.Xz)(e)||e.nullable||void 0!==(0,s.lD)(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(m(e))??this._normalizedFieldsMap.get(c(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?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?y.mQ.utcInstance:(0,l.tE)(p,t,(()=>y.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,s.OH)(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,r.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function c(e){return(0,s.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:r}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",l=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,s=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.dateFieldsTimeReference?(0,u.ZS)(r.dateFieldsTimeReference):a??u.n$:null,y=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,u.ZS)(n.timeReference):a:null,p=new Map([[m(r?.creationDateField??""),s],[m(r?.editDateField??""),s],[m(o),y],[m(l),y]]);for(const{name:n,type:r}of e.fields)if(f.has(r))t.set(n,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(n,null);else if(i)t.set(n,u.L5);else{const e=p.get(m(n??""))??a;t.set(n,e)}return t}},98453:(e,t,i)=>{i.d(t,{m:()=>n});const n=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},58501:(e,t,i)=>{i.d(t,{q:()=>r});var n=i(62815);function r(e,t,i){if(!i?.features||!i.hasZ)return;const r=(0,n.N)(i.geometryType,t,e.outSpatialReference);if(null!=r)for(const e of i.features)r(e.geometry)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2876,1053],{61294:(e,t,r)=>{r.d(t,{J:()=>l});var o,n,i,s=r(11053),a={exports:{}};o=a,n=function(){var e=function(){function e(e){this.message="JPEG error: "+e}return e.prototype=new Error,e.prototype.name="JpegError",e.constructor=e,e}();return function(){if(!self||!self.Uint8ClampedArray)return null;var t=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,o=799,n=3406,i=2276,s=1567,a=3784,l=5793,u=2896;function c(){this.decodeTransform=null,this.colorTransform=-1}function h(e,t){for(var r,o,n=0,i=[],s=16;s>0&&!e[s-1];)s--;i.push({children:[],index:0});var a,l=i[0];for(r=0;r<s;r++){for(o=0;o<e[r];o++){for((l=i.pop()).children[l.index]=t[n];l.index>0;)l=i.pop();for(l.index++,i.push(l);i.length<=r;)i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a;n++}r+1<s&&(i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a)}return i[0].children}function f(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function d(r,o,n,i,s,a,l,u,c){var h=n.mcusPerLine,d=n.progressive,p=o,m=0,y=0;function w(){if(y>0)return y--,m>>y&1;if(255===(m=r[o++])){var t=r[o++];if(t)throw new e("unexpected marker "+(m<<8|t).toString(16))}return y=7,m>>>7}function b(t){for(var r=t;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new e("invalid huffman sequence")}}function C(e){for(var t=0;e>0;)t=t<<1|w(),e--;return t}function v(e){if(1===e)return 1===w()?1:-1;var t=C(e);return t>=1<<e-1?t:t+(-1<<e)+1}var x,A=0,k=0;function T(e,t,r,o,n){var i=r%h;t(e,f(e,(r/h|0)*e.v+o,i*e.h+n))}function S(e,t,r){t(e,f(e,r/e.blocksPerLine|0,r%e.blocksPerLine))}var M,I,P,E,R,L,D=i.length;L=d?0===a?0===u?function(e,t){var r=b(e.huffmanTableDC),o=0===r?0:v(r)<<c;e.blockData[t]=e.pred+=o}:function(e,t){e.blockData[t]|=w()<<c}:0===u?function(e,r){if(A>0)A--;else for(var o=a,n=l;o<=n;){var i=b(e.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var h=t[o+=u];e.blockData[r+h]=v(s)*(1<<c),o++}else{if(u<15){A=C(u)+(1<<u)-1;break}o+=16}}}:function(r,o){for(var n,i,s=a,u=l,h=0;s<=u;){var f=t[s];switch(k){case 0:if(h=(i=b(r.huffmanTableAC))>>4,0==(n=15&i))h<15?(A=C(h)+(1<<h),k=4):(h=16,k=1);else{if(1!==n)throw new e("invalid ACn encoding");x=v(n),k=h?2:3}continue;case 1:case 2:r.blockData[o+f]?r.blockData[o+f]+=w()<<c:0==--h&&(k=2===k?3:0);break;case 3:r.blockData[o+f]?r.blockData[o+f]+=w()<<c:(r.blockData[o+f]=x<<c,k=0);break;case 4:r.blockData[o+f]&&(r.blockData[o+f]+=w()<<c)}s++}4===k&&0==--A&&(k=0)}:function(e,r){var o=b(e.huffmanTableDC),n=0===o?0:v(o);e.blockData[r]=e.pred+=n;for(var i=1;i<64;){var s=b(e.huffmanTableAC),a=15&s,l=s>>4;if(0!==a){var u=t[i+=l];e.blockData[r+u]=v(a),i++}else{if(l<15)break;i+=16}}};var U,O,N,B,G=0;for(O=1===D?i[0].blocksPerLine*i[0].blocksPerColumn:h*n.mcusPerColumn;G<O;){var _=s?Math.min(O-G,s):O;for(I=0;I<D;I++)i[I].pred=0;if(A=0,1===D)for(M=i[0],R=0;R<_;R++)S(M,L,G),G++;else for(R=0;R<_;R++){for(I=0;I<D;I++)for(N=(M=i[I]).h,B=M.v,P=0;P<B;P++)for(E=0;E<N;E++)T(M,L,G,P,E);G++}y=0,(U=g(r,o))&&U.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+U.invalid),o=U.offset);var F=U&&U.marker;if(!F||F<=65280)throw new e("marker was not found");if(!(F>=65488&&F<=65495))break;o+=2}return(U=g(r,o))&&U.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+U.invalid),o=U.offset),o-p}function p(t,c,h){var f,d,p,m,g,y,w,b,C,v,x,A,k,T,S,M,I,P=t.quantizationTable,E=t.blockData;if(!P)throw new e("missing required Quantization Table.");for(var R=0;R<64;R+=8)C=E[c+R],v=E[c+R+1],x=E[c+R+2],A=E[c+R+3],k=E[c+R+4],T=E[c+R+5],S=E[c+R+6],M=E[c+R+7],C*=P[R],v|x|A|k|T|S|M?(v*=P[R+1],x*=P[R+2],A*=P[R+3],k*=P[R+4],T*=P[R+5],S*=P[R+6],M*=P[R+7],d=(f=(f=l*C+128>>8)+(d=l*k+128>>8)+1>>1)-d,I=(p=x)*a+(m=S)*s+128>>8,p=p*s-m*a+128>>8,w=(g=(g=u*(v-M)+128>>8)+(w=T<<4)+1>>1)-w,y=(b=(b=u*(v+M)+128>>8)+(y=A<<4)+1>>1)-y,m=(f=f+(m=I)+1>>1)-m,p=(d=d+p+1>>1)-p,I=g*i+b*n+2048>>12,g=g*n-b*i+2048>>12,b=I,I=y*o+w*r+2048>>12,y=y*r-w*o+2048>>12,w=I,h[R]=f+b,h[R+7]=f-b,h[R+1]=d+w,h[R+6]=d-w,h[R+2]=p+y,h[R+5]=p-y,h[R+3]=m+g,h[R+4]=m-g):(I=l*C+512>>10,h[R]=I,h[R+1]=I,h[R+2]=I,h[R+3]=I,h[R+4]=I,h[R+5]=I,h[R+6]=I,h[R+7]=I);for(var L=0;L<8;++L)C=h[L],(v=h[L+8])|(x=h[L+16])|(A=h[L+24])|(k=h[L+32])|(T=h[L+40])|(S=h[L+48])|(M=h[L+56])?(d=(f=4112+((f=l*C+2048>>12)+(d=l*k+2048>>12)+1>>1))-d,I=(p=x)*a+(m=S)*s+2048>>12,p=p*s-m*a+2048>>12,m=I,w=(g=(g=u*(v-M)+2048>>12)+(w=T)+1>>1)-w,y=(b=(b=u*(v+M)+2048>>12)+(y=A)+1>>1)-y,I=g*i+b*n+2048>>12,g=g*n-b*i+2048>>12,b=I,I=y*o+w*r+2048>>12,y=y*r-w*o+2048>>12,C=(C=(f=f+m+1>>1)+b)<16?0:C>=4080?255:C>>4,v=(v=(d=d+p+1>>1)+(w=I))<16?0:v>=4080?255:v>>4,x=(x=(p=d-p)+y)<16?0:x>=4080?255:x>>4,A=(A=(m=f-m)+g)<16?0:A>=4080?255:A>>4,k=(k=m-g)<16?0:k>=4080?255:k>>4,T=(T=p-y)<16?0:T>=4080?255:T>>4,S=(S=d-w)<16?0:S>=4080?255:S>>4,M=(M=f-b)<16?0:M>=4080?255:M>>4,E[c+L]=C,E[c+L+8]=v,E[c+L+16]=x,E[c+L+24]=A,E[c+L+32]=k,E[c+L+40]=T,E[c+L+48]=S,E[c+L+56]=M):(I=(I=l*C+8192>>14)<-2040?0:I>=2024?255:I+2056>>4,E[c+L]=I,E[c+L+8]=I,E[c+L+16]=I,E[c+L+24]=I,E[c+L+32]=I,E[c+L+40]=I,E[c+L+48]=I,E[c+L+56]=I)}function m(e,t){for(var r=t.blocksPerLine,o=t.blocksPerColumn,n=new Int16Array(64),i=0;i<o;i++)for(var s=0;s<r;s++)p(t,f(t,i,s),n);return t.blockData}function g(e,t,r){function o(t){return e[t]<<8|e[t+1]}var n=e.length-1,i=r<t?r:t;if(t>=n)return null;var s=o(t);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:t};for(var a=o(i);!(a>=65472&&a<=65534);){if(++i>=n)return null;a=o(i)}return{invalid:s.toString(16),marker:a,offset:i}}return c.prototype={parse:function(r){function o(){var e=r[l]<<8|r[l+1];return l+=2,e}function n(){var e=o(),t=l+e-2,n=g(r,t,l);n&&n.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+n.invalid),t=n.offset);var i=r.subarray(l,t);return l+=i.length,i}function i(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),o=0;o<e.components.length;o++){G=e.components[o];var n=Math.ceil(Math.ceil(e.samplesPerLine/8)*G.h/e.maxH),i=Math.ceil(Math.ceil(e.scanLines/8)*G.v/e.maxV),s=t*G.h,a=r*G.v*64*(s+1);G.blockData=new Int16Array(a),G.blocksPerLine=n,G.blocksPerColumn=i}e.mcusPerLine=t,e.mcusPerColumn=r}var s,a,l=0,u=null,c=null,f=[],p=[],y=[],w=o();if(65496!==w)throw new e("SOI not found");for(w=o();65497!==w;){var b,C,v;switch(w){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var x=n();65504===w&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(u={version:{major:x[5],minor:x[6]},densityUnits:x[7],xDensity:x[8]<<8|x[9],yDensity:x[10]<<8|x[11],thumbWidth:x[12],thumbHeight:x[13],thumbData:x.subarray(14,14+3*x[12]*x[13])}),65518===w&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&(c={version:x[5]<<8|x[6],flags0:x[7]<<8|x[8],flags1:x[9]<<8|x[10],transformCode:x[11]});break;case 65499:for(var A=o()+l-2;l<A;){var k=r[l++],T=new Uint16Array(64);if(k>>4){if(k>>4!=1)throw new e("DQT - invalid table spec");for(C=0;C<64;C++)T[t[C]]=o()}else for(C=0;C<64;C++)T[t[C]]=r[l++];f[15&k]=T}break;case 65472:case 65473:case 65474:if(s)throw new e("Only single frame JPEGs supported");o(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=o(),s.samplesPerLine=o(),s.components=[],s.componentIds={};var S,M=r[l++],I=0,P=0;for(b=0;b<M;b++){S=r[l];var E=r[l+1]>>4,R=15&r[l+1];I<E&&(I=E),P<R&&(P=R);var L=r[l+2];v=s.components.push({h:E,v:R,quantizationId:L,quantizationTable:null}),s.componentIds[S]=v-1,l+=3}s.maxH=I,s.maxV=P,i(s);break;case 65476:var D=o();for(b=2;b<D;){var U=r[l++],O=new Uint8Array(16),N=0;for(C=0;C<16;C++,l++)N+=O[C]=r[l];var B=new Uint8Array(N);for(C=0;C<N;C++,l++)B[C]=r[l];b+=17+N,(U>>4?p:y)[15&U]=h(O,B)}break;case 65501:o(),a=o();break;case 65498:o();var G,_=r[l++],F=[];for(b=0;b<_;b++){var V=s.componentIds[r[l++]];G=s.components[V];var z=r[l++];G.huffmanTableDC=y[z>>4],G.huffmanTableAC=p[15&z],F.push(G)}var j=r[l++],W=r[l++],H=r[l++],J=d(r,l,s,F,a,j,W,H>>4,15&H);l+=J;break;case 65535:255!==r[l]&&l--;break;default:if(255===r[l-3]&&r[l-2]>=192&&r[l-2]<=254){l-=3;break}throw new e("unknown marker "+w.toString(16))}w=o()}for(this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=u,this.eof=l,this.adobe=c,this.components=[],b=0;b<s.components.length;b++){var q=f[(G=s.components[b]).quantizationId];q&&(G.quantizationTable=q),this.components.push({output:m(0,G),scaleX:G.h/s.maxH,scaleY:G.v/s.maxV,blocksPerLine:G.blocksPerLine,blocksPerColumn:G.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(e,t){var r,o,n,i,s,a,l,u,c,h,f,d=this.width/e,p=this.height/t,m=0,g=this.components.length,y=e*t*g,w=new Uint8ClampedArray(y),b=new Uint32Array(e),C=4294967288;for(l=0;l<g;l++){for(o=(r=this.components[l]).scaleX*d,n=r.scaleY*p,m=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<e;s++)u=0|s*o,b[s]=(u&C)<<3|7&u;for(a=0;a<t;a++)for(h=i*((u=0|a*n)&C)|(7&u)<<3,s=0;s<e;s++)w[m]=f[h+b[s]],m+=g}var v=this.decodeTransform;if(v)for(l=0;l<y;)for(u=0,c=0;u<g;u++,l++,c+=2)w[l]=(w[l]*v[c]>>8)+v[c+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(e){for(var t,r,o,n=0,i=e.length;n<i;n+=3)t=e[n],r=e[n+1],o=e[n+2],e[n]=t-179.456+1.402*o,e[n+1]=t+135.459-.344*r-.714*o,e[n+2]=t-226.816+1.772*r;return e},_convertYcckToRgb:function(e){for(var t,r,o,n,i=0,s=0,a=e.length;s<a;s+=4)t=e[s],r=e[s+1],o=e[s+2],n=e[s+3],e[i++]=r*(-660635669420364e-19*r+.000437130475926232*o-54080610064599e-18*t+.00048449797120281*n-.154362151871126)-122.67195406894+o*(-.000957964378445773*o+.000817076911346625*t-.00477271405408747*n+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*n+.48357088451265)+n*(-.000336197177618394*n+.484791561490776),e[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*o+.000659397001245577*t+.000426105652938837*n-.176491792462875)+o*(-.000778269941513683*o+.00130872261408275*t+.000770482631801132*n-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*n+.25802910206845)+n*(-.000318913117588328*n-.213742400323665),e[i++]=r*(-.000570115196973677*r-263409051004589e-19*o+.0020741088115012*t-.00288260236853442*n+.814272968359295)-20.810012546947+o*(-153496057440975e-19*o-.000132689043961446*t+.000560833691242812*n-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*n+.116935020465145)+n*(-.000343531996510555*n+.24165260232407);return e},_convertYcckToCmyk:function(e){for(var t,r,o,n=0,i=e.length;n<i;n+=4)t=e[n],r=e[n+1],o=e[n+2],e[n]=434.456-t-1.402*o,e[n+1]=119.541-t+.344*r+.714*o,e[n+2]=481.816-t-1.772*r;return e},_convertCmykToRgb:function(e){for(var t,r,o,n,i=0,s=1/255,a=0,l=e.length;a<l;a+=4)t=e[a]*s,r=e[a+1]*s,o=e[a+2]*s,n=e[a+3]*s,e[i++]=255+t*(-4.387332384609988*t+54.48615194189176*r+18.82290502165302*o+212.25662451639585*n-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*o-17.873870861415444*n-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*n+17.5119270841813)-n*(21.86122147463605*n+189.48180835922747),e[i++]=255+t*(8.841041422036149*t+60.118027045597366*r+6.871425592049007*o+31.159100130055922*n-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*o+131.35250912493976*n-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*n-24.86741582555878)-n*(20.737325471181034*n+187.80453709719578),e[i++]=255+t*(.8842522430003296*t+8.078677503112928*r+30.89978309703729*o-.23883238689178934*n-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*o+50.606957656360734*n-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*n-193.58209356861505)-n*(22.33816807309886*n+180.12613974708367);return e},getData:function(t,r,o){if(this.numComponents>4)throw new e("Unsupported color mode");var n=this._getLinearizedBlockData(t,r);if(1===this.numComponents&&o){for(var i=n.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=n[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(n);if(4===this.numComponents){if(this._isColorConversionNeeded())return o?this._convertYcckToRgb(n):this._convertYcckToCmyk(n);if(o)return this._convertCmykToRgb(n)}return n}},c}()},void 0!==(i=n())&&(o.exports=i);const l=(0,s.g)(a.exports)},68060:(e,t,r)=>{r.d(t,{Z:()=>l});var o,n,i,s=r(11053),a={exports:{}};n=a,void 0!==(o=function(){function e(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return e.prototype={ensureBuffer:function(e){var t=this.buffer,r=t?t.byteLength:0;if(e<r)return t;for(var o=512;o<e;)o<<=1;for(var n=new Uint8Array(o),i=0;i<r;++i)n[i]=t[i];return this.buffer=n},getByte:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(e){var t=this.pos;if(e){this.ensureBuffer(t+e);for(var r=t+e;!this.eof&&this.bufferLength<r;)this.readBlock();var o=this.bufferLength;r>o&&(r=o)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(t,r)},lookChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(e,t,r){for(var o=e+t;this.bufferLength<=o&&!this.eof;)this.readBlock();return new Stream(this.buffer,e,t,r)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0}},e}(),i=function(){if(!self||!self.Uint32Array)return null;var e=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),r=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),n=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],i=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function s(e){throw new Error(e)}function a(e){var t=0,r=e[t++],n=e[t++];-1!=r&&-1!=n||s("Invalid header in flate stream"),8!=(15&r)&&s("Unknown compression method in flate stream"),((r<<8)+n)%31!=0&&s("Bad FCHECK in flate stream"),32&n&&s("FDICT bit set in flate stream"),this.bytes=e,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,o.call(this)}return a.prototype=Object.create(o.prototype),a.prototype.getBits=function(e){for(var t,r=this.codeSize,o=this.codeBuf,n=this.bytes,i=this.bytesPos;r<e;)void 0===(t=n[i++])&&s("Bad encoding in flate stream"),o|=t<<r,r+=8;return t=o&(1<<e)-1,this.codeBuf=o>>e,this.codeSize=r-=e,this.bytesPos=i,t},a.prototype.getCode=function(e){for(var t=e[0],r=e[1],o=this.codeSize,n=this.codeBuf,i=this.bytes,a=this.bytesPos;o<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),n|=l<<o,o+=8}var u=t[n&(1<<r)-1],c=u>>16,h=65535&u;return(0==o||o<c||0==c)&&s("Bad encoding in flate stream"),this.codeBuf=n>>c,this.codeSize=o-c,this.bytesPos=a,h},a.prototype.generateHuffmanTable=function(e){for(var t=e.length,r=0,o=0;o<t;++o)e[o]>r&&(r=e[o]);for(var n=1<<r,i=new Uint32Array(n),s=1,a=0,l=2;s<=r;++s,a<<=1,l<<=1)for(var u=0;u<t;++u)if(e[u]==s){var c=0,h=a;for(o=0;o<s;++o)c=c<<1|1&h,h>>=1;for(o=c;o<n;o+=l)i[o]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function o(e,t,r,o,n){for(var i=e.getBits(r)+o;i-- >0;)t[p++]=n}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=n,u=i;else if(2==a){for(var c=this.getBits(5)+257,h=this.getBits(5)+1,f=this.getBits(4)+4,d=Array(e.length),p=0;p<f;)d[e[p++]]=this.getBits(3);for(var m=this.generateHuffmanTable(d),g=0,y=(p=0,c+h),w=new Array(y);p<y;){var b=this.getCode(m);16==b?o(this,w,2,3,g):17==b?o(this,w,3,3,g=0):18==b?o(this,w,7,11,g=0):w[p++]=g=b}l=this.generateHuffmanTable(w.slice(0,c)),u=this.generateHuffmanTable(w.slice(c,y))}else s("Unknown block type in flate stream");for(var C=(L=this.buffer)?L.length:0,v=this.bufferLength;;){var x=this.getCode(l);if(x<256)v+1>=C&&(C=(L=this.ensureBuffer(v+1)).length),L[v++]=x;else{if(256==x)return void(this.bufferLength=v);var A=(x=t[x-=257])>>16;A>0&&(A=this.getBits(A)),g=(65535&x)+A,x=this.getCode(u),(A=(x=r[x])>>16)>0&&(A=this.getBits(A));var k=(65535&x)+A;v+g>=C&&(C=(L=this.ensureBuffer(v+g)).length);for(var T=0;T<g;++T,++v)L[v]=L[v-k]}}}else{var S,M=this.bytes,I=this.bytesPos;void 0===(S=M[I++])&&s("Bad block header in flate stream");var P=S;void 0===(S=M[I++])&&s("Bad block header in flate stream"),P|=S<<8,void 0===(S=M[I++])&&s("Bad block header in flate stream");var E=S;void 0===(S=M[I++])&&s("Bad block header in flate stream"),(E|=S<<8)!=(65535&~P)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var R=this.bufferLength,L=this.ensureBuffer(R+P),D=R+P;this.bufferLength=D;for(var U=R;U<D;++U){if(void 0===(S=M[I++])){this.eof=!0;break}L[U]=S}this.bytesPos=I}},a}())&&(n.exports=i);const l=(0,s.g)(a.exports)},11053:(e,t,r)=>{r.d(t,{c:()=>o,g:()=>n});var o="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}},39357:(e,t,r)=>{r.d(t,{H:()=>l});var o,n=r(90237),i=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let l=o=class extends i.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new o({name:this.name,code:this.code})}};(0,n._)([(0,s.M)({type:String,json:{write:!0}})],l.prototype,"name",void 0),(0,n._)([(0,s.M)({type:[String,Number],json:{write:!0}})],l.prototype,"code",void 0),l=o=(0,n._)([(0,a.$)("esri.layers.support.CodedValue")],l)},53177:(e,t,r)=>{r.d(t,{A:()=>f});var o,n=r(90237),i=r(4718),s=r(10107),a=(r(44208),r(53966),r(93223)),l=r(40608),u=r(39357),c=r(76357);let h=o=class extends c.A{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new o({codedValues:(0,i.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,s.M)({type:[u.H],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=o=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],h);const f=h},76357:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(90237),n=r(66552),i=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const u=new n.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends i.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,s.M)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.e)(u)],c.prototype,"type",void 0),c=(0,o._)([(0,l.$)("esri.layers.support.Domain")],c);const h=c},20437:(e,t,r)=>{r.d(t,{A:()=>g});var o,n=r(90237),i=r(66552),s=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),c=r(36005),h=r(40608),f=r(80451),d=r(98453);const p=new i.J({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 m=o=class extends s.oY{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 r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?p.fromJSON(r.fieldValueType):null}clone(){return new o({alias:this.alias,defaultValue:this.defaultValue,description:this.description,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,n._)([(0,a.M)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,a.M)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,a.M)()],m.prototype,"description",void 0),(0,n._)([(0,c.w)("description")],m.prototype,"readDescription",null),(0,n._)([(0,a.M)({types:f.gK,json:{read:{reader:f.rS},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,a.M)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,a.M)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,a.M)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,a.M)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,u.e)(d.m)],m.prototype,"type",void 0),(0,n._)([(0,a.M)()],m.prototype,"valueType",void 0),(0,n._)([(0,c.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,a.M)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=o=(0,n._)([(0,h.$)("esri.layers.support.Field")],m);const g=m},14140:(e,t,r)=>{r.d(t,{A:()=>m});var o,n=r(90237),i=r(49186),s=r(25482),a=r(4718),l=r(53966),u=r(10107),c=r(79901),h=r(40608),f=r(4151),d=r(16019);let p=o=class extends s.oY{static createEmptyBand(e,t){return new(o.getPixelArrayConstructor(e))(t)}static combineBandMasks(e){if(e.length<2)return e[0];const t=e[0].length,r=new Uint8Array(t).fill(255);for(let o=0;o<e.length;o++){const n=e[o];for(let e=0;e<t;e++)n[e]||(r[e]=0)}return r}static getPixelArrayConstructor(e){let t;switch(e){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":t=Float32Array;break;case"f64":t=Float64Array}return t}constructor(e){super(e),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(e){if(!e)return"f32";let t=e.toLowerCase();return["u1","u2","u4"].includes(t)?t="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(t)||(t="f32"),t}getPlaneCount(){return this.pixels?.length}addData(e){if(!e.pixels||e.pixels.length!==this.width*this.height)throw new i.A("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||(this.pixels=[]),this.statistics||(this.statistics=[]),this.pixels.push(e.pixels),this.statistics.push(e.statistics??new f.z)}getAsRGBA(){const e=new ArrayBuffer(this.width*this.height*4);switch(this.pixelType){case"s8":case"s16":case"u16":case"s32":case"u32":case"f32":case"f64":this._fillFromNon8Bit(e);break;default:this._fillFrom8Bit(e)}return new Uint8ClampedArray(e)}getAsRGBAFloat(){const e=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(e),e}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map((e=>function(e,t){let r=1/0,o=-1/0;const n=e.length;let i,s=0;if(null!=t)for(i=0;i<n;i++)t[i]&&(s=e[i],r=s<r?s:r,o=s>o?s:o);else for(i=0;i<n;i++)s=e[i],r=s<r?s:r,o=s>o?s:o;return new f.z(r,o)}(e,this.mask)));const e=this.mask;let t=0;if(null!=e)for(let r=0;r<e.length;r++)e[r]&&t++;else t=this.width*this.height;this.validPixelCount=t}clamp(e){if(!e||"f64"===e||"f32"===e||!this.pixels)return;const[t,r]=(0,d.hP)(e),n=this.pixels,i=this.width*this.height,s=n.length;let a,l,u;const c=[];for(let h=0;h<s;h++){u=o.createEmptyBand(e,i),a=n[h];for(let e=0;e<i;e++)l=a[e],u[e]=l>r?r:l<t?t:l;c.push(u)}this.pixels=c,this.pixelType=e}extractBands(e){const{pixels:t,statistics:r}=this;if(null==e||0===e.length||!t||0===t.length)return this;const n=t.length,i=e.some((e=>e>=t.length)),s=n===e.length&&!e.some(((e,t)=>e!==t));if(i||s)return this;const a=this.bandMasks?.length===n?e.map((e=>this.bandMasks[e])):void 0;let{mask:l,validPixelCount:u}=this;const{width:c,height:h}=this;return a?.length&&(l=o.combineBandMasks(a),u=l.filter((e=>!!e)).length),new o({pixelType:this.pixelType,width:c,height:h,mask:l,bandMasks:a,validPixelCount:u,maskIsAlpha:this.maskIsAlpha,pixels:e.map((e=>t[e])),statistics:r&&e.map((e=>r[e]))})}clone(){const e=new o({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let t;null!=this.mask&&(e.mask=new Uint8Array(this.mask)),this.bandMasks&&(e.bandMasks=this.bandMasks.map((e=>new Uint8Array(e))));const r=o.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){e.pixels=[];const o=!!this.pixels[0].slice;for(t=0;t<this.pixels.length;t++)e.pixels[t]=o?this.pixels[t].slice():new r(this.pixels[t])}if(this.statistics)for(e.statistics=[],t=0;t<this.statistics.length;t++)e.statistics[t]=(0,a.o8)(this.statistics[t]);return e.premultiplyAlpha=this.premultiplyAlpha,e}_fillFrom8Bit(e){const{mask:t,maskIsAlpha:r,premultiplyAlpha:o,pixels:n}=this;if(!e||!n?.length)return void l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i,s,a,u;i=s=a=n[0],n.length>=3?(s=n[1],a=n[2]):2===n.length&&(s=n[1]);const c=new Uint32Array(e),h=this.width*this.height;if(i.length===h)if(null!=t&&t.length===h)if(r)for(u=0;u<h;u++){const e=t[u];if(e){const t=e/255;c[u]=o?e<<24|a[u]*t<<16|s[u]*t<<8|i[u]*t:e<<24|a[u]<<16|s[u]<<8|i[u]}}else for(u=0;u<h;u++)t[u]&&(c[u]=255<<24|a[u]<<16|s[u]<<8|i[u]);else for(u=0;u<h;u++)c[u]=255<<24|a[u]<<16|s[u]<<8|i[u];else l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(e){const{pixels:t,mask:r,statistics:o}=this;if(!e||!t?.length)return void l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const n=this.pixelType;let i=1,s=0,a=1;if(o&&o.length>0){for(const e of o)if(null!=e.minValue&&(s=Math.min(s,e.minValue)),null!=e.maxValue&&null!=e.minValue){const t=e.maxValue-e.minValue;a=Math.max(a,t)}i=255/a}else{let e=255;"s8"===n?(s=-128,e=127):"u16"===n?e=65535:"s16"===n?(s=-32768,e=32767):"u32"===n?e=4294967295:"s32"===n?(s=-2147483648,e=2147483647):"f32"===n?(s=-34e38,e=34e38):"f64"===n&&(s=-Number.MAX_VALUE,e=Number.MAX_VALUE),i=255/(e-s)}const u=new Uint32Array(e),c=this.width*this.height;let h,f,d,p,m;if(h=f=d=t[0],h.length!==c)return l.A.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(t.length>=2)if(f=t[1],t.length>=3&&(d=t[2]),null!=r&&r.length===c)for(p=0;p<c;p++)r[p]&&(u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i);else for(p=0;p<c;p++)u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i;else if(null!=r&&r.length===c)for(p=0;p<c;p++)m=(h[p]-s)*i,r[p]&&(u[p]=255<<24|m<<16|m<<8|m);else for(p=0;p<c;p++)m=(h[p]-s)*i,u[p]=255<<24|m<<16|m<<8|m}_fillFrom32Bit(e){const{pixels:t,mask:r}=this;if(!e||!t?.length)return l.A.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let o,n,i,s;o=n=i=t[0],t.length>=3?(n=t[1],i=t[2]):2===t.length&&(n=t[1]);const a=this.width*this.height;if(o.length!==a)return l.A.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let u=0;if(null!=r&&r.length===a)for(s=0;s<a;s++)e[u++]=o[s],e[u++]=n[s],e[u++]=i[s],e[u++]=1&r[s];else for(s=0;s<a;s++)e[u++]=o[s],e[u++]=n[s],e[u++]=i[s],e[u++]=1}};(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"width",void 0),(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"height",void 0),(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"pixelType",void 0),(0,n._)([(0,c.w)("pixelType")],p.prototype,"castPixelType",null),(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"validPixelCount",void 0),(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"mask",void 0),(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"maskIsAlpha",void 0),(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"pixels",void 0),(0,n._)([(0,u.M)()],p.prototype,"premultiplyAlpha",void 0),(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"statistics",void 0),(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"depthCount",void 0),(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"noDataValues",void 0),(0,n._)([(0,u.M)({json:{write:!0}})],p.prototype,"bandMasks",void 0),p=o=(0,n._)([(0,h.$)("esri.layers.support.PixelBlock")],p);const m=p},87186:(e,t,r)=>{r.d(t,{A:()=>A});var o,n=r(90237),i=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(40608)),u=r(5443),c=r(16930);function h(e){return e=Number(e),isNaN(e)?void 0:e}r(87811);let f=o=class extends i.oY{constructor(){super(...arguments),this.name=null,this.minWavelength=void 0,this.maxWavelength=void 0,this.radianceBias=void 0,this.radianceGain=void 0,this.reflectanceBias=void 0,this.reflectanceGain=void 0,this.solarIrradiance=void 0}clone(){return new o({name:this.name,minWavelength:this.minWavelength,maxWavelength:this.maxWavelength,radianceBias:this.radianceBias,radianceGain:this.radianceGain,reflectanceBias:this.reflectanceBias,reflectanceGain:this.reflectanceGain,solarIrradiance:this.solarIrradiance})}};(0,n._)([(0,a.M)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.M)({json:{name:"WavelengthMin",read:{reader:h},write:!0}})],f.prototype,"minWavelength",void 0),(0,n._)([(0,a.M)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,n._)([(0,a.M)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,n._)([(0,a.M)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,n._)([(0,a.M)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,n._)([(0,a.M)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,n._)([(0,a.M)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=o=(0,n._)([(0,l.$)("esri.layers.support.RasterBandInfo")],f);const d=f;var p,m=r(36005),g=r(43937);function y(e){return e=Number(e),isNaN(e)?void 0:e}let w=p=class extends i.oY{constructor(){super(...arguments),this.acquisitionDate=void 0,this.cloudCover=void 0,this.productName=void 0,this.sensorName=null,this.sensorAzimuth=void 0,this.sensorElevation=void 0,this.sunAzimuth=void 0,this.sunElevation=void 0}readAcquisitionDate(e){return new Date(e)}writeAcquisitionDate(e,t){t.AcquisitionDate=e.getTime()}clone(){return new p({acquisitionDate:this.acquisitionDate,cloudCover:this.cloudCover,productName:this.productName,sensorName:this.sensorName,sensorAzimuth:this.sensorAzimuth,sensorElevation:this.sensorElevation,sunAzimuth:this.sunAzimuth,sunElevation:this.sunElevation})}};(0,n._)([(0,a.M)({json:{name:"AcquisitionDate",write:!0}})],w.prototype,"acquisitionDate",void 0),(0,n._)([(0,m.w)("acquisitionDate")],w.prototype,"readAcquisitionDate",null),(0,n._)([(0,g.K)("acquisitionDate")],w.prototype,"writeAcquisitionDate",null),(0,n._)([(0,a.M)({json:{name:"CloudCover",read:{reader:y},write:!0}})],w.prototype,"cloudCover",void 0),(0,n._)([(0,a.M)({json:{name:"ProductName",write:!0}})],w.prototype,"productName",void 0),(0,n._)([(0,a.M)({json:{name:"SensorName",write:!0}})],w.prototype,"sensorName",void 0),(0,n._)([(0,a.M)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],w.prototype,"sensorAzimuth",void 0),(0,n._)([(0,a.M)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],w.prototype,"sensorElevation",void 0),(0,n._)([(0,a.M)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],w.prototype,"sunAzimuth",void 0),(0,n._)([(0,a.M)({json:{name:"SunElevation",read:{reader:y},write:!0}})],w.prototype,"sunElevation",void 0),w=p=(0,n._)([(0,l.$)("esri.layers.support.RasterSensorInfo")],w);const b=w;var C,v=r(20223);let x=C=class extends i.oY{constructor(e){super(e),this.attributeTable=null,this.bandCount=null,this.colormap=null,this.extent=null,this.format=void 0,this.height=null,this.width=null,this.histograms=null,this.keyProperties={},this.multidimensionalInfo=null,this.noDataValue=null,this.pixelSize=null,this.pixelType=null,this.isPseudoSpatialReference=!1,this.spatialReference=null,this.statistics=null,this.storageInfo=null,this.transform=null}get bandInfos(){const e=this.keyProperties.BandProperties,{bandCount:t}=this;if(!e?.length||e.length<t){const e=[];for(let r=1;r<=t;r++)e.push(new d({name:"band_"+r}));return e}const r=e.map((e=>d.fromJSON(e)));for(let e=0;e<r.length;e++)r[e].name=r[e].name||"band_"+(e+1);return r}get dataType(){const e=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===e?"standard-time":e}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(e){e&&this._set("nativeExtent",e)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;const e=this.nativeExtent;return{x:e.width/this.width,y:e.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}get sensorInfo(){if(this.keyProperties?.SensorName)return b.fromJSON(this.keyProperties)}clone(){return new C({attributeTable:(0,s.o8)(this.attributeTable),bandCount:this.bandCount,colormap:(0,s.o8)(this.colormap),extent:(0,s.o8)(this.extent),format:this.format,height:this.height,width:this.width,histograms:(0,s.o8)(this.histograms),keyProperties:(0,s.o8)(this.keyProperties),multidimensionalInfo:(0,s.o8)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,s.o8)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,s.o8)(this.spatialReference),statistics:(0,s.o8)(this.statistics),storageInfo:(0,s.o8)(this.storageInfo),transform:(0,s.o8)(this.transform)})}};(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"attributeTable",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"bandCount",void 0),(0,n._)([(0,a.M)({readOnly:!0})],x.prototype,"bandInfos",null),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"colormap",void 0),(0,n._)([(0,a.M)({type:String,readOnly:!0})],x.prototype,"dataType",null),(0,n._)([(0,a.M)({type:u.A,json:{write:!0}})],x.prototype,"extent",void 0),(0,n._)([(0,a.M)({type:u.A,json:{write:!0}})],x.prototype,"nativeExtent",null),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"nativePixelSize",null),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"format",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"height",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"width",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"hasMultidimensionalTranspose",null),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"histograms",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"keyProperties",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"multidimensionalInfo",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"noDataValue",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"pixelSize",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"pixelType",void 0),(0,n._)([(0,a.M)()],x.prototype,"isPseudoSpatialReference",void 0),(0,n._)([(0,a.M)({readOnly:!0})],x.prototype,"sensorInfo",null),(0,n._)([(0,a.M)({type:c.A,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"statistics",void 0),(0,n._)([(0,a.M)({type:v.A,json:{write:!0}})],x.prototype,"storageInfo",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],x.prototype,"transform",void 0),x=C=(0,n._)([(0,l.$)("esri.layers.support.RasterInfo")],x);const A=x},20223:(e,t,r)=>{r.d(t,{A:()=>h});var o,n=r(90237),i=r(25482),s=r(4718),a=r(10107),l=(r(44208),r(53966),r(40608)),u=r(86738);let c=o=class extends i.oY{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}clone(){return new o({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.o8)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.o8)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.o8)(this.tileInfo),transposeInfo:(0,s.o8)(this.transposeInfo),blockBoundary:(0,s.o8)(this.blockBoundary)})}};(0,n._)([(0,a.M)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,n._)([(0,a.M)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,n._)([(0,a.M)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,n._)([(0,a.M)({type:u.A,json:{write:!0}})],c.prototype,"origin",void 0),(0,n._)([(0,a.M)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,n._)([(0,a.M)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,n._)([(0,a.M)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,n._)([(0,a.M)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,n._)([(0,a.M)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,n._)([(0,a.M)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,n._)([(0,a.M)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,n._)([(0,a.M)()],c.prototype,"transposeInfo",void 0),(0,n._)([(0,a.M)()],c.prototype,"blockBoundary",void 0),c=o=(0,n._)([(0,l.$)("esri.layers.support.RasterStorageInfo")],c);const h=c},4151:(e,t,r)=>{r.d(t,{z:()=>o});class o{constructor(e=null,t=null,r=null){this.minValue=e,this.maxValue=t,this.noDataValue=r}}},80451:(e,t,r)=>{r.d(t,{rS:()=>g,gK:()=>m}),r(44208);var o,n=r(53177),i=r(76357),s=r(90237),a=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let u=o=class extends i.A{constructor(e){super(e),this.type="inherited"}clone(){return new o}};(0,s._)([(0,a.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=o=(0,s._)([(0,l.$)("esri.layers.support.InheritedDomain")],u);const c=u;var h,f=r(10107);let d=h=class extends i.A{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new h({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,f.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],d.prototype,"maxValue",void 0),(0,s._)([(0,f.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],d.prototype,"minValue",void 0),(0,s._)([(0,a.e)({range:"range"})],d.prototype,"type",void 0),d=h=(0,s._)([(0,l.$)("esri.layers.support.RangeDomain")],d);const p=d,m={key:"type",base:i.A,typeMap:{range:p,"coded-value":n.A,inherited:c}};function g(e){if(!e?.type)return null;switch(e.type){case"range":return p.fromJSON(e);case"codedValue":return n.A.fromJSON(e);case"inherited":return c.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>o});const o=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},15265:(e,t,r)=>{function o(e,t){let r=0,o="",n=0,i=0;const s=e.length;for(;r<s;)i=e[r++],n=i>>4,n<8?n=1:15===n?(n=4,i=(7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++]):14===n?(n=3,i=(15&i)<<12|(63&e[r++])<<6|63&e[r++]):(n=2,i=(31&i)<<6|63&e[r++]),(0!==i||t)&&(o+=String.fromCharCode(i));return o}r.d(t,{w:()=>o})},49589:(e,t,r)=>{r.d(t,{D4:()=>c,Hh:()=>s});var o=r(2741);const n=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let i=null;function s(){return i||(i=r.e(382).then(r.bind(r,30382)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,o.s)(`esri/layers/support/rasterFormats/${e}`)}))).then((e=>{!function(e){const{_malloc:t,_free:r,_lerc_getBlobInfo:o,_lerc_getDataRanges:i,_lerc_decode_4D:s,asm:u}=e;let c;const h=Object.values(u).find((t=>t&&"buffer"in t&&t.buffer===e.HEAPU8.buffer)),f=e=>{const r=e.map((e=>function(e){return 16+(e>>3<<3)}(e))),o=r.reduce(((e,t)=>e+t)),n=t(o);c=new Uint8Array(h.buffer);let i=r[0];r[0]=n;for(let e=1;e<r.length;e++){const t=r[e];r[e]=r[e-1]+i,i=t}return r};a.getBlobInfo=e=>{const t=new Uint8Array(48),n=new Uint8Array(24),[s,a,u]=f([e.length,t.length,n.length]);c.set(e,s),c.set(t,a),c.set(n,u);let d=o(s,e.length,a,u,12,3);if(d)throw r(s),new Error(`lerc-getBlobInfo: error code is ${d}`);c=new Uint8Array(h.buffer),l(c,a,t),l(c,u,n);const p=new Uint32Array(t.buffer),m=new Float64Array(n.buffer),[g,y,,w,b,C,v,x,A,k,T]=p,S={version:g,depthCount:k,width:w,height:b,validPixelCount:v,bandCount:C,blobSize:x,maskCount:A,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:T};if(T&&k>1)return r(s),S;if(1===k&&1===C)return r(s),S.statistics.push({minValue:m[0],maxValue:m[1]}),S;const M=k*C*8,I=new Uint8Array(M),P=new Uint8Array(M);let E=s,R=0,L=0,D=!1;if(c.byteLength<s+2*M?(r(s),D=!0,[E,R,L]=f([e.length,M,M]),c.set(e,E)):[R,L]=f([M,M]),c.set(I,R),c.set(P,L),d=i(E,e.length,k,C,R,L),d)throw r(E),D||r(R),new Error(`lerc-getDataRanges: error code is ${d}`);c=new Uint8Array(h.buffer),l(c,R,I),l(c,L,P);const U=new Float64Array(I.buffer),O=new Float64Array(P.buffer),N=S.statistics;for(let e=0;e<C;e++)if(k>1){const t=U.slice(e*k,(e+1)*k),r=O.slice(e*k,(e+1)*k),o=Math.min.apply(null,t),n=Math.max.apply(null,r);N.push({minValue:o,maxValue:n,depthStats:{minValues:t,maxValues:r}})}else N.push({minValue:U[e],maxValue:O[e]});return r(E),D||r(R),S},a.decode=(e,t)=>{const{maskCount:o,depthCount:i,bandCount:a,width:u,height:d,dataType:p,bandCountWithNoData:m}=t,g=n[p],y=u*d,w=new Uint8Array(y*a),b=y*i*a*g.size,C=new Uint8Array(b),v=new Uint8Array(a),x=new Uint8Array(8*a),[A,k,T,S,M]=f([e.length,w.length,C.length,v.length,x.length]);c.set(e,A),c.set(w,k),c.set(C,T),c.set(v,S),c.set(x,M);const I=s(A,e.length,o,k,i,u,d,a,p,T,S,M);if(I)throw r(A),new Error(`lerc-decode: error code is ${I}`);c=new Uint8Array(h.buffer),l(c,T,C),l(c,k,w);let P=null;if(m){l(c,S,v),l(c,M,x),P=[];const e=new Float64Array(x.buffer);for(let t=0;t<v.length;t++)P.push(v[t]?e[t]:null)}return r(A),{data:C,maskData:w,noDataValues:P}}}(e)})),i)}const a={getBlobInfo:null,decode:null};function l(e,t,r){r.set(e.slice(t,t+r.length))}function u(e,t,r,o,n){if(r<2)return e;const i=new o(t*r);for(let o=0,n=0;o<t;o++)for(let s=0,a=o;s<r;s++,a+=t)i[a]=e[n++];return i}function c(e,t={}){const r=t.inputOffset??0,o=e instanceof Uint8Array?e.subarray(r):new Uint8Array(e,r),i=a.getBlobInfo(o),{data:s,maskData:l,noDataValues:c}=a.decode(o,i),{width:h,height:f,bandCount:d,depthCount:p,dataType:m,maskCount:g,statistics:y}=i,w=n[m],b=new w.ctor(s.buffer),C=[],v=[],x=h*f,A=x*p;for(let e=0;e<d;e++){const r=b.subarray(e*A,(e+1)*A);if(t.returnInterleaved)C.push(r);else{const e=u(r,x,p,w.ctor);C.push(e)}v.push(l.subarray(e*A,(e+1)*A))}const k=0===g?null:1===g?v[0]:new Uint8Array(x);if(g>1){k.set(v[0]);for(let e=1;e<v.length;e++){const t=v[e];for(let e=0;e<x;e++)k[e]=k[e]&t[e]}}const{noDataValue:T}=t,S=null!=T&&w.range[0]<=T&&w.range[1]>=T;if(g>0&&S)for(let e=0;e<d;e++){const t=C[e],r=v[e]||k;for(let e=0;e<x;e++)0===r[e]&&(t[e]=T)}const M=g===d&&d>1?v:null,{pixelType:I}=w;return{width:h,height:f,bandCount:d,pixelType:I,depthCount:p,statistics:y,pixels:C,mask:k,bandMasks:M,noDataValues:c}}},56582:(e,t,r)=>{function o(){const e=[];for(let t=0;t<=257;t++)e[t]=[t];return e}function n(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}r.d(t,{D:()=>s});const i=new Set;function s(e,t,r,s=!0){const a=function(e,t,r,o=!0){if(t%4!=0||r%4!=0){const n=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(n),s=new Uint8Array(e,t,r);if(o)for(let e=0;e<i.length;e+=4)i[e]=s[e+3],i[e+1]=s[e+2],i[e+2]=s[e+1],i[e+3]=s[e];else i.set(s);return new Uint32Array(i.buffer)}if(o){const o=new Uint8Array(e,t,r),n=new Uint8Array(o.length);for(let e=0;e<n.length;e+=4)n[e]=o[e+3],n[e+1]=o[e+2],n[e+2]=o[e+1],n[e+3]=o[e];return new Uint32Array(n.buffer)}return new Uint32Array(e,t,r/4)}(e,t,r,s);let l=9,u=o(),c=32,h=u.length,f=[],d=1,p=a[0],m=0;const g=a.length,y=8*(4*g-r),w=[];for(;null!=p;){if(c>=l)c-=l,m=p>>>32-l,p<<=l;else{m=p>>>32-c,p=a[d++];const e=l-c;c=32-e,m=(m<<e)+(p>>>c),p<<=e}if(257===m)break;if(256===m){l=9,u=o(),h=u.length,f=[];continue}const e=u[m];if(null==e){if(m>u.length)throw new Error("data integrity issue: code does not exist on code page");f.push(f[0]),u[h++]=f.slice(),n(w,f)}else n(w,e),f.push(e[0]),f.length>1&&(u[h++]=f.slice()),f=e.slice();if(i.has(h)&&l++,0===c&&(p=a[d++],c=32),d>g||d===g&&c<=y)break}return new Uint8Array(w)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191)},51244:(e,t,r)=>{r.d(t,{D:()=>L,g:()=>R});var o=r(49186),n=r(97768),i=r(14140),s=r(4151),a=r(74887),l=r(68060);class u{constructor(e){this._canvas=null,this._ctx=null,e&&(this._canvas=e.canvas,this._ctx=e.ctx||e.canvas&&e.canvas.getContext("2d"))}decode(e,t,r){if(!e||e.byteLength<10)throw new o.A("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:n=0,height:i=0,format:s}=t;const{applyJpegMask:l}=t;if(l&&(!n||!i))throw new o.A("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise(((o,c)=>{let h=null;"jpg"===s&&l&&(h=u._getMask(e,{width:n,height:i}));const f=new Blob([new Uint8Array(e)],{type:"image/"+s=="jpg"?"jpeg":s}),d=URL.createObjectURL(f),p=new Image;let m;p.src=d,p.onload=()=>{if(URL.revokeObjectURL(d),(0,a.G4)(r))return void c((0,a.NK)());n=p.width,i=p.height,this._canvas&&this._ctx?(this._canvas.width===n&&this._canvas.height===i||(this._canvas.width=n,this._canvas.height=i),this._ctx.clearRect(0,0,n,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=n,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(p,0,0);const e=this._ctx.getImageData(0,0,n,i);let s;if(m=e.data,t.renderOnCanvas){if(h)for(s=0;s<h.length;s++)h[s]?m[4*s+3]=255:m[4*s+3]=0;return this._ctx.putImageData(e,0,0),void o(null)}const l=n*i,u=new Uint8Array(l),f=new Uint8Array(l),g=new Uint8Array(l);if(h)for(s=0;s<l;s++)u[s]=m[4*s],f[s]=m[4*s+1],g[s]=m[4*s+2];else for(h=new Uint8Array(l),s=0;s<l;s++)u[s]=m[4*s],f[s]=m[4*s+1],g[s]=m[4*s+2],h[s]=m[4*s+3];o({width:n,height:i,pixels:[u,f,g],mask:h,pixelType:"u8"})},p.onerror=()=>{URL.revokeObjectURL(d),c("cannot load image")}}))}static _getMask(e,t){let r=null;try{const o=new Uint8Array(e),n=Math.ceil(o.length/2);let i=0;const s=o.length-2;for(i=n;i<s&&(255!==o[i]||217!==o[i+1]);i++);if(i+=2,i<o.length-1){const e=new l.Z(o.subarray(i)).getBytes();r=new Uint8Array(t.width*t.height);let n=0;for(let t=0;t<e.length;t++)for(let o=7;o>=0;o--)r[n++]=e[t]>>o&1}}catch(e){}return r}}var c=r(61294);class h{static decode(e,t=!1){const r=new Uint8Array(e),o=new c.J;o.parse(r);const{width:n,height:i,numComponents:s,eof:a}=o,u=o.getData(n,i,!0),h=n*i;let f,d=null,p=0,m=0,g=0;if(!t&&a<r.length-1)try{const e=new l.Z(r.subarray(a)).getBytes();d=new Uint8Array(h);let t=0;for(p=0;p<e.length;p++)for(g=7;g>=0;g--)d[t++]=e[p]>>g&1}catch{}if(1===s&&u.length===n*i){const e=new Uint8Array(u.buffer);f=[e,e,e]}else{for(f=[],p=0;p<3;p++)f.push(new Uint8Array(h));for(g=0,m=0;m<h;m++)for(p=0;p<3;p++)f[p][m]=u[g++]}return{width:n,height:i,pixels:f,mask:d}}}var f=r(49589),d=r(56582),p=r(16019);const m=(e,t)=>{const r=t.width*t.height,o=t.pixelType;return Math.floor(e.byteLength/(r*g(o)))},g=e=>{let t=1;switch(e){case Uint8Array:case Int8Array:t=1;break;case Uint16Array:case Int16Array:t=2;break;case Uint32Array:case Int32Array:case Float32Array:t=4;break;case Float64Array:t=8}return t};class y{static decode(e,t){const r=t.pixelType,o=[],n=t.width*t.height,i=m(e,t),{bandIds:s,format:a}=t,l=s?.length||m(e,t),u=e.byteLength-e.byteLength%(n*g(r)),c=new r(e,0,n*i);let h,f,d,p,y=null;if("bip"===a)for(h=0;h<l;h++){for(d=new r(n),p=s?s[h]:h,f=0;f<n;f++)d[f]=c[f*i+p];o.push(d)}else if("bsq"===a)for(h=0;h<l;h++)p=s?s[h]:h,o.push(c.subarray(p*n,(p+1)*n));return u<e.byteLength-1&&(y=((e,t)=>{if(8*e.byteLength<t)return null;const r=new Uint8Array(e,0,Math.ceil(t/8)),o=new Uint8Array(t);let n=0,i=0,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)o[n++]=i>>a&1;for(a=7;n<t-1;)i=r[r.length-1],o[n++]=i>>a&1,a--;return o})(e.slice(u),n)),{pixels:o,mask:y}}}var w=r(45664),b=r(47124),C=function(e){var t,r,o;function n(e){var t,r,o,n,i,s,a,l,u,c,h,f,d;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(t=this.readUInt32(),l=function(){var e,t;for(t=[],e=0;e<4;++e)t.push(String.fromCharCode(this.data[this.pos++]));return t}.call(this).join(""),l){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(t);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},n=this.readUInt16(),o=this.readUInt16()||100,i.delay=1e3*n/o,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,t-=4),e=(null!=i?i.data:void 0)||this.imgData,h=0;0<=t?h<t:h>t;0<=t?++h:--h)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(t),(u=255-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":s=(c=this.read(t)).indexOf(0),a=String.fromCharCode.apply(String,c.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,c.slice(s+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(d=this.colorType)||6===d,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return n.load=function(e,t,r){var o;return"function"==typeof t&&(r=t),(o=new XMLHttpRequest).open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){var e;return e=new n(new Uint8Array(o.response||o.mozResponseArrayBuffer)),"function"==typeof(null!=t?t.getContext:void 0)&&e.render(t),"function"==typeof r?r(e):void 0},o.send(null)},n.prototype.read=function(e){var t,r;for(r=[],t=0;0<=e?t<e:t>e;0<=e?++t:--t)r.push(this.data[this.pos++]);return r},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(e){var t,r,o,n,i,s,a,u,c,h,f,d,p,m,g,y,w,b,C,v,x,A,k;if(null==e&&(e=this.imgData),0===e.length)return new Uint8Array(0);for(e=(e=new l.Z(e)).getBytes(),y=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(y*this.height),s=e.length,g=0,m=0,r=0;m<s;){switch(e[m++]){case 0:for(n=C=0;C<y;n=C+=1)p[r++]=e[m++];break;case 1:for(n=v=0;v<y;n=v+=1)t=e[m++],i=n<d?0:p[r-d],p[r++]=(t+i)%256;break;case 2:for(n=x=0;x<y;n=x+=1)t=e[m++],o=(n-n%d)/d,w=g&&p[(g-1)*y+o*d+n%d],p[r++]=(w+t)%256;break;case 3:for(n=A=0;A<y;n=A+=1)t=e[m++],o=(n-n%d)/d,i=n<d?0:p[r-d],w=g&&p[(g-1)*y+o*d+n%d],p[r++]=(t+Math.floor((i+w)/2))%256;break;case 4:for(n=k=0;k<y;n=k+=1)t=e[m++],o=(n-n%d)/d,i=n<d?0:p[r-d],0===g?w=b=0:(w=p[(g-1)*y+o*d+n%d],b=o&&p[(g-1)*y+(o-1)*d+n%d]),a=i+w-b,u=Math.abs(a-i),h=Math.abs(a-w),f=Math.abs(a-b),c=u<=h&&u<=f?i:h<=f?w:b,p[r++]=(t+c)%256;break;default:throw new Error("Invalid filter algorithm: "+e[m-1])}g++}return p},n.prototype.decodePalette=function(){var e,t,r,o,n,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],n=new Uint8Array((i.length||0)+r.length),o=0,r.length,e=0,t=s=0,a=r.length;s<a;t=s+=3)n[o++]=r[t],n[o++]=r[t+1],n[o++]=r[t+2],n[o++]=null!=(l=i[e++])?l:255;return n},n.prototype.copyToImageData=function(e,t){var r,o,n,i,s,a,l,u,c,h,f;if(o=this.colors,c=null,r=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),o=4,r=!0),u=(n=e.data||e).length,s=c||t,i=a=0,1===o)for(;i<u;)l=c?4*t[i/4]:a,h=s[l++],n[i++]=h,n[i++]=h,n[i++]=h,n[i++]=r?s[l++]:this.transparency.grayscale&&this.transparency.grayscale===h?0:255,a=l;else for(;i<u;)l=c?4*t[i/4]:a,n[i++]=s[l++],n[i++]=s[l++],n[i++]=s[l++],n[i++]=r?s[l++]:this.transparency.rgb&&this.transparency.rgb[1]===s[l-3]&&this.transparency.rgb[3]===s[l-2]&&this.transparency.rgb[5]===s[l-1]?0:255,a=l},n.prototype.decode=function(){var e;return e=new Uint8Array(this.width*this.height*4),this.copyToImageData(e,this.decodePixels()),e},r=e.document&&e.document.createElement("canvas"),o=r&&r.getContext("2d"),t=function(e){var t;return o.width=e.width,o.height=e.height,o.clearRect(0,0,e.width,e.height),o.putImageData(e,0,0),(t=new Image).src=r.toDataURL(),t},n.prototype.decodeFrames=function(e){var r,o,n,i,s,a,l,u;if(this.animation){for(u=[],o=s=0,a=(l=this.animation.frames).length;s<a;o=++s)r=l[o],n=e.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(n,i),r.imageData=n,u.push(r.image=t(n));return u}},n.prototype.renderFrame=function(e,t){var r,o,n;return r=(o=this.animation.frames)[t],n=o[t-1],0===t&&e.clearRect(0,0,this.width,this.height),1===(null!=n?n.disposeOp:void 0)?e.clearRect(n.xOffset,n.yOffset,n.width,n.height):2===(null!=n?n.disposeOp:void 0)&&e.putImageData(n.imageData,n.xOffset,n.yOffset),0===r.blendOp&&e.clearRect(r.xOffset,r.yOffset,r.width,r.height),e.drawImage(r.image,r.xOffset,r.yOffset)},n.prototype.animate=function(e){var t,r,o,n,i,s,a=this;return r=0,s=this.animation,n=s.numFrames,o=s.frames,i=s.numPlays,(t=function(){var s,l;if(s=r++%n,l=o[s],a.renderFrame(e,s),n>1&&r/n<i)return a.animation._timeout=setTimeout(t,l.delay)})()},n.prototype.stopAnimation=function(){var e;return clearTimeout(null!=(e=this.animation)?e._timeout:void 0)},n.prototype.render=function(e){var t,r;return e._png&&e._png.stopAnimation(),e._png=this,e.width=this.width,e.height=this.height,t=e.getContext("2d"),this.animation?(this.decodeFrames(t),this.animate(t)):(r=t.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),t.putImageData(r,0,0))},n}(self);const v=new Set(["jpg","png","bmp","gif"]);async function x(e,t){if(!b.Z)throw new o.A("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,f.Hh)();const{offset:r}=t,{width:n,height:a,pixelType:l,statistics:u,depthCount:c,noDataValues:h,bandMasks:d,pixels:p,mask:m}=(0,f.D4)(e,{inputOffset:r,returnInterleaved:t.returnInterleaved}),g=new i.A({width:n,height:a,pixelType:l.toLowerCase(),pixels:p,mask:m,statistics:u.map((({minValue:e,maxValue:t})=>new s.z(e,t))),bandMasks:d,depthCount:c,noDataValues:h});return u?.length||g.updateStatistics(),g}async function A(e,t){const r=await(0,w.D4)(e,{...t,noDataValue:null});(0,n.Lw)(r);const o=new i.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,bandMasks:r.bandMasks,statistics:null});return o.updateStatistics(),o}function k(e,t){const r=t.pixelType||"u8",o=i.A.getPixelArrayConstructor(r),n="u8"===r?e:new o(e.buffer),s=[],a=t.planes||1;if(1===a)s.push(n);else for(let r=0;r<a;r++){const i=(t.width||1)*(t.height||e.length),l=new o(i);for(let e=0;e<i;e++)l[e]=n[e*a+r];s.push(l)}const l=new i.A({width:t.width||1,height:t.height||e.length,pixels:s,pixelType:r,statistics:null});return l.updateStatistics(),l}function T(e,t){return k(new l.Z(new Uint8Array(e)).getBytes(),t)}function S(e,t){return k((0,d.D)(e,t.offset,t.eof,!t.isInputBigEndian),t)}function M(e,t,r){const{pixelTypeCtor:o}=function(e){let t=null,r=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,t=Uint8Array;break;case"u16":r=r||65535,t=Uint16Array;break;case"u32":r=r||2**32-1,t=Uint32Array;break;case"s8":r=r||-128,t=Int8Array;break;case"s16":r=r||-32768,t=Int16Array;break;case"s32":r=r||0-2**31,t=Int32Array;break;default:t=Float32Array}return{pixelTypeCtor:t,noDataValue:r}}(t.pixelType),n=(0,y.decode)(e,{width:t.width,height:t.height,pixelType:o,format:r}),s=new i.A({width:t.width,height:t.height,pixels:n.pixels,pixelType:t.pixelType,mask:n.mask,statistics:null});return s.updateStatistics(),s}function I(e,t){const r=h.decode(e,t.hasNoZlibMask??void 0),o=new i.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:"u8",mask:r.mask,statistics:null});return o.updateStatistics(),o}function P(e,t){const r=new Uint8Array(e),o=new C(r),{width:n,height:s}=t,a=n*s,l=o.decode();let u,c=0,h=0;const f=new Uint8Array(a);for(c=0;c<a;c++)f[c]=l[4*c+3];const d=new i.A({width:n,height:s,pixels:[],pixelType:"u8",mask:f,statistics:[]});for(c=0;c<3;c++){for(u=new Uint8Array(a),h=0;h<a;h++)u[h]=l[4*h+c];d.addData({pixels:u})}return d.updateStatistics(),d}function E(e){if(null==e)throw new o.A("rasterCodec:decode","parameter encodeddata is required.");const t=new Uint8Array(e,0,10);let r="";return 255===t[0]&&216===t[1]?r="jpg":137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?r="png":67===t[0]&&110===t[1]&&116===t[2]&&90===t[3]&&73===t[4]&&109===t[5]&&97===t[6]&&103===t[7]&&101===t[8]&&32===t[9]?r="lerc":76===t[0]&&101===t[1]&&114===t[2]&&99===t[3]&&50===t[4]&&32===t[5]?r="lerc2":73===t[0]&&73===t[1]&&42===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&42===t[3]||73===t[0]&&73===t[1]&&43===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&43===t[3]?r="tiff":71===t[0]&&73===t[1]&&70===t[2]?r="gif":66===t[0]&&77===t[1]?r="bmp":String.fromCharCode.apply(null,t).toLowerCase().includes("error")&&(r="error"),r}function R(e){let t=E(e);return"lerc2"===t?t="lerc":"error"===t&&(t=""),t}async function L(e,t={},r){if(null==e)throw new o.A("rasterCodec:decode","missing encodeddata parameter.");let n=t.format?.toLowerCase();if(!("bsq"!==n&&"bip"!==n||null!=t.width&&null!=t.height))throw new o.A("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===n&&t.customOptions)return async function(e,t){const r=await(0,w.s$)(e,t.customOptions),o=new i.A({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return o.updateStatistics(),o}(e,t);if((!n||"bsq"!==n&&"bip"!==n&&"deflate"!==n&&"lzw"!==n)&&(n=E(e)),t.useCanvas&&v.has(n))return async function(e,t,r,o){const n=new u,s={applyJpegMask:!1,format:t,...r},a=await n.decode(e,s,o),l=new i.A(a);return l.updateStatistics(),l}(e,n,t,r);const s=function(e){let t=null;switch(e){case"lerc":case"lerc2":t=x;break;case"jpg":t=I;break;case"png":t=P;break;case"bsq":case"bip":t=(t,r)=>M(t,r,e);break;case"tiff":t=A;break;case"deflate":t=T;break;case"lzw":t=S;break;case"error":t=()=>{throw new o.A("rasterCodec:decode","input data contains error")};break;default:t=()=>{throw new o.A("rasterCodec:decode","unsupported raster format")}}return t}(n);let a;t.isPoint&&(null!=(t={...t}).width&&t.width++,null!=t.height&&t.height++);const{offsets:l}=t;if(l&&l.length>1){const r=l.map(((r,o)=>s(e.slice(r,l[o+1]),t))),o=await Promise.all(r);a=o[0],a.pixels=o.map((e=>e.pixels[0]));const n=o.map((e=>e.mask));o.some((e=>null!=e))&&(n.forEach(((e,t)=>{null==e&&(n[t]=new Uint8Array(a.width*a.height).fill(255))})),a.bandMasks=n,a.mask=i.A.combineBandMasks(n)),a.updateStatistics()}else a=await s(e,{...t,offset:l?.[0]??t.offset});return"jpg"!==n&&null!=t.noDataValue&&1===a.depthCount&&(0,p.Sp)(a,t.noDataValue,{customFloatTolerance:t.tolerance}),t.isPoint&&function(e,t=1){if(!e)return;const{pixels:r,width:o,height:n,mask:s}=e;if(!r||0===r.length)return;const a=r.length,l=o-1,u=n-1,c=[];let h,f,d,p,m,g,y=null;const w=i.A.getPixelArrayConstructor(e.pixelType);if(0===t){for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)g[f*l+d]=m[p+d];c.push(g)}if(null!=s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)y[f*l+d]=s[p+d]}else{for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)g[f*l+d]=(m[p+d]+m[p+d+1]+m[p+o+d]+m[p+o+d+1])/4;c.push(g)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)y[f*l+d]=Math.min.apply(null,[s[p+d],s[p+d+1],s[p+o+d],s[p+o+d+1]])}e.width=l,e.height=u,e.mask=y,e.pixels=c}(a),a}},45664:(e,t,r)=>{r.d(t,{Cr:()=>E,D4:()=>z,JM:()=>_,XO:()=>L,r9:()=>U,s$:()=>V,uT:()=>G,uc:()=>R,zS:()=>D}),r(44208);var o=r(15265),n=r(61294),i=r(49589),s=r(56582),a=r(16019),l=r(47915),u=r(47124),c=r(68060);const h=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],f=4294967296,d=new Set([1,5,6,7,8,34712,34887]);function p(e,t){let r="unknown";return 3===e?r=64===t?"f64":"f32":1===e?1===t?r="u1":2===t?r="u2":4===t?r="u4":t<=8?r="u8":t<=16?r="u16":t<=32&&(r="u32"):2===e&&(t<=8?r="s8":t<=16?r="s16":t<=32&&(r="s32")),r}function m(e){let t=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f64":t=Float64Array;break;default:t=Float32Array}return t}function g(e,t){return{x:t[0]*e.x+t[1]*e.y+t[2],y:t[3]*e.x+t[4]*e.y+t[5]}}function y(e,t){return e.get(t)?.values}function w(e,t){return e.get(t)?.values}function b(e,t){return e.get(t)?.values?.[0]}function C(e,t){return e.get(t)?.values?.[0]}function v(e,t,r,o=0,n=l.A.tiffTags,i=4){const s=8===i,a=s?O(new DataView(e,r,8),0,t):new DataView(e,r,2).getUint16(0,t),u=4+2*i,c=s?8:2,h=c+a*u;if(r+h>e.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:h};const f=r+h+4<=e.byteLength?B(new DataView(e,r+h,8===i?8:4),0,t,8===i):null,d=r+c,p=new Map;let m,g,y,w,b,C=0,v=0;for(let r=0;r<a;r++){g=new DataView(e,d+u*r,u),y=g.getUint16(0,t),b=g.getUint16(2,t),w=l.A.getTagName(y,n);const s=[];2===i?(C=g.getUint16(4,t),v=g.getUint16(6,t)):4===i?(C=g.getUint32(4,t),v=g.getUint32(8,t)):8===i&&(C=B(g,4,t,!0),v=B(g,12,t,!0),s.push(g.getUint32(12,t)),s.push(g.getUint32(16,t))),m={id:y,type:b,valueCount:C,valueOffset:v,valueOffsets:s,values:null},E(e,t,m,o,!1,i),p.set(w,m)}return{success:!0,ifd:p,nextIFD:f,requiredBufferSize:h}}const x=(e,t)=>(0,i.D4)(e,{inputOffset:t}).pixels[0];function A(e,t){if(1!==t&&2!==t&&4!==t)return e;const r=new Uint8Array(e),o=8/t,n=new Uint8Array(e.byteLength*o);let i=0;const s=2**t-1;for(let e=0;e<r.length;e++){const a=r[e];for(let e=0;e<o;e++)n[i++]=a<<t*e>>>8-t&s}return n.buffer}function k(e,t,r){const o=new n.J;o.parse(e),o.colorTransform=6===r?-1:0;const i=o.getData(o.width,o.height,1!==t&&4!==t);return new Uint8Array(i.buffer)}function T(e){const t=new c.Z(e).getBytes(),r=new ArrayBuffer(t.length),o=new Uint8Array(r);return o.set(t),o}async function S(e,t,r,o,n){const a=u.Z===t,l=C(r,"BITSPERSAMPLE"),c=C(r,"SAMPLESPERPIXEL")??1,h=C(r,"PHOTOMETRICINTERPRETATION"),f=C(r,"SAMPLEFORMAT")??1,d=p(f,l),g=C(r,"COMPRESSION")??1,y=m(d);let w,b,v;if(34887===g)return await(0,i.Hh)(),x(e,o);if(1===g)w=e.slice(o,o+n),b=new Uint8Array(w);else if(8===g||32946===g)b=new Uint8Array(e,o,n),b=T(b),w=b.buffer;else if(6===g)b=new Uint8Array(e,o,n),b=k(b,c,h),w=b.buffer;else if(7===g){const t=r.get("JPEGTABLES").values,i=t.length-2;b=new Uint8Array(i+n-2);for(let e=0;e<i;e++)b[e]=t[e];const s=new Uint8Array(e,o+2,n-2);for(let e=0;e<s.length;e++)b[i+e]=s[e];b=k(b,c,h),w=b.buffer}else{if(5!==g)throw new Error("tiff-decode: unsupport compression "+g);b=(0,s.D)(e,o,n,t),w=b.buffer}if(w=A(w,l),"u8"===d||"s8"===d||a)v=new y(w);else{w=new ArrayBuffer(b.length);const e=new Uint8Array(w);switch(d){case"u16":case"s16":for(let t=0;t<b.length;t+=2)e[t]=b[t+1],e[t+1]=b[t];break;case"u32":case"s32":case"f32":for(let t=0;t<b.length;t+=4)e[t]=b[t+3],e[t+1]=b[t+2],e[t+2]=b[t+1],e[t+3]=b[t]}v=new y(w)}const S=C(r,"PREDICTOR")??1,M=C(r,"TILEWIDTH"),I=C(r,"TILELENGTH");if(S>1&&(5===g||8===g||32946===g)&&M&&I){const e=L(r),t=new y(v.length);t.set(v),v=function(e,t,r,o,n){const i=o?4:1,s=r*i*n;o&&(e=new Uint8Array(e.buffer));for(let r=0;r<t;r++){const t=r*s;for(let r=n;r<s;r++)e[t+r]+=e[t+r-n]}if(!o)return e;const a=new Uint8Array(e.length),l=r*n;for(let r=0;r<t;r++){const t=r*s;for(let r=0;r<l;r++)for(let o=0;o<i;o++)a[t+r*i+o]=e[t+r+(i-o-1)*l]}return new Float32Array(a.buffer)}(t,I,M,3===f&&3===S,e?1:c)}return v}const M=(e,t,r)=>{const o=u.Z===t.littleEndian,n=w(r,"STRIPOFFSETS");if(void 0===n)return null;const{width:i,height:a,pixelType:l}=R([r]),c=C(r,"SAMPLESPERPIXEL")||t.planes,h=C(r,"PHOTOMETRICINTERPRETATION"),f=i*a,d=C(r,"BITSPERSAMPLE"),p=m(l),g=new p(f*c),y=w(r,"STRIPBYTECOUNTS"),b=C(r,"ROWSPERSTRIP"),v=C(r,"COMPRESSION")??1;let x,S,M,I,P,E,L,D,U;if(d%8==0)for(x=0;x<n.length;x++){if(P=x*(b*i)*c,"u8"===l||"s8"===l||o)8===v||32946===v?(L=new Uint8Array(e,n[x],y[x]),L=T(L),E=L.buffer):6===v?(L=new Uint8Array(e,n[x],y[x]),L=k(L,c,h),E=L.buffer):5===v?(L=(0,s.D)(e,n[x],y[x],t.littleEndian),E=L.buffer):E=e.slice(n[x],n[x]+y[x]),E=A(E,d),I=new p(E);else{switch(6===v||8===v||32946===v?(L=new Uint8Array(e,n[x],y[x]),D=T(L),E=D.buffer):(E=new ArrayBuffer(y[x]),L=new Uint8Array(e,n[x],y[x]),D=new Uint8Array(E)),l){case"u16":case"s16":for(M=0;M<L.length;M+=2)D[M]=L[M+1],D[M+1]=L[M];break;case"u32":case"s32":case"f32":for(M=0;M<L.length;M+=4)D[M]=L[M+3],D[M+1]=L[M+2],D[M+2]=L[M+1],D[M+3]=L[M]}E=A(E,d),I=new p(E)}g.set(I,P)}const O=[];if(1===c)O.push(g);else for(x=0;x<c;x++){for(U=new p(f),S=0;S<f;S++)U[S]=g[S*c+x];O.push(U)}return{width:i,height:a,pixelType:l,pixels:O}},I=(e,t,r)=>{if(!(e&&e.length>0&&t&&r))return null;let o,n,i;const s=e[0].length,a=e.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(o=e[u],n=t[u],i=r[u],0===u)for(let e=0;e<s;e++)l[e]=o[e]<n||o[e]>i?0:1;else for(let e=0;e<s;e++)l[e]&&(l[e]=o[e]<n||o[e]>i?0:1);return l},P=e=>{if(!e)return null;const t=e.match(/<Item(.*?)Item>/gi);if(!t||0===t.length)return null;const r=new Map;let o,n,i,s,a;for(let e=0;e<t.length;e++)o=t[e],n=o.slice(6,o.indexOf(">")),s=o.indexOf("sample="),s>-1&&(a=o.slice(s+8,o.indexOf('"',s+8))),s=o.indexOf("name="),s>-1&&(n=o.slice(s+6,o.indexOf('"',s+6))),n&&(i=o.slice(o.indexOf(">")+1,o.indexOf("</Item>")).trim(),null!=a?r.has(n)?r.get(n)[a]=i:r.set(n,[i]):r.set(n,i)),a=null;const l=r.get("STATISTICS_MINIMUM"),u=r.get("STATISTICS_MAXIMUM"),c=r.get("STATISTICS_MEAN"),h=r.get("STATISTICS_STDDEV");let f=null;if(l&&u){f=[];for(let e=0;e<l.length;e++)f.push({min:parseFloat(l[e]),max:parseFloat(u[e]),avg:c&&parseFloat(c[e]),stddev:h&&parseFloat(h[e])})}const d=r.get("BandName"),p=r.get("WavelengthMin"),m=r.get("WavelengthMax");let g=null;if(d){g=[];for(let e=0;e<d.length;e++)g.push({BandName:d[e],WavelengthMin:p&&parseFloat(p[e]),WavelengthMax:m&&parseFloat(m[e])})}return{statistics:f,bandProperties:g,dataType:r.get("DataType"),rawMetadata:r}};function E(e,t,r,o=0,n=!1,i=4){if(r.values)return!0;const s=r.type,a=r.valueCount;let l=r.valueOffset,u=[];const c=h[s],d=8*c,p=a*c,m=a*h[s]*8;let g,y;const w=8===i?64:32,b=r.valueOffsets;if(m>w&&p>(n?e.byteLength:e?e.byteLength-l+o:0))return r.offlineOffsetSize=[l,p],r.values=null,!1;if(m<=w){if(!t)if(w<=32)l>>>=32-m;else{const e=b?.length?b[0]:l>>>0,t=b?.length?b[1]:Math.round((l-e)/f);m<=32?(l=e>>>32-m,b[0]=l):(l=e*2**(32-m)+(t>>>32-m),b[0]=e,b[1]=t>>>32-m)}if(1===a&&d===w)u=[l];else if(64===w){const e=b?.length?b[0]:l>>>0,t=b?.length?b[1]:Math.round((l-e)/f);let r=e,o=32;for(y=1;y<=a;y++){const e=32-d*y%32;if(o<d){const n=r<<e>>>32-o,i=t<<32-o>>>32-o;r=t,u.push(n+i*2**(d-o)),o-=32-(d-o)}else u.push(r<<e>>>32-d),o-=d;0===o&&(o=32,r=t)}}else for(y=1;y<=a;y++){const e=32-d*y;u.push(l<<e>>>32-d)}}else{l-=o,n&&(l=0);for(let r=l;r<l+p;r+=c){switch(s){case 1:case 2:case 7:g=new DataView(e,r,1).getUint8(0);break;case 3:g=new DataView(e,r,2).getUint16(0,t);break;case 4:case 13:g=new DataView(e,r,4).getUint32(0,t);break;case 5:g=new DataView(e,r,4).getUint32(0,t)/new DataView(e,r+4,4).getUint32(0,t);break;case 6:g=new DataView(e,r,1).getInt8(0);break;case 8:g=new DataView(e,r,2).getInt16(0,t);break;case 9:g=new DataView(e,r,4).getInt32(0,t);break;case 10:g=new DataView(e,r,4).getInt32(0,t)/new DataView(e,r+4,4).getInt32(0,t);break;case 11:g=new DataView(e,r,4).getFloat32(0,t);break;case 12:g=new DataView(e,r,8).getFloat64(0,t);break;case 16:case 18:g=O(new DataView(e,r,8),0,t);break;case 17:g=N(new DataView(e,r,8),0,t);break;default:g=null}u.push(g)}}if(2===s){let e="";const t=u;for(u=[],y=0;y<t.length;y++)0===t[y]&&""!==e?(u.push(e),e=""):e+=String.fromCharCode(t[y]);""===e&&0!==u.length||u.push(e)}return r.values=u,!0}function R(e){const t=e[0],r=C(t,"TILEWIDTH"),o=C(t,"TILELENGTH"),n=C(t,"IMAGEWIDTH"),i=C(t,"IMAGELENGTH"),s=C(t,"BITSPERSAMPLE"),a=C(t,"SAMPLESPERPIXEL"),l=C(t,"SAMPLEFORMAT")??1,u=p(l,s),c=L(t),h=y(t,"GDAL_NODATA");let f=null;h?.length&&(f=h.map((e=>parseFloat(e))),f.some((e=>isNaN(e)))&&(f=null));const m=C(t,"COMPRESSION")??1;let v;switch(m){case 1:v="NONE";break;case 2:case 3:case 4:case 32771:v="CCITT";break;case 5:v="LZW";break;case 6:case 7:v="JPEG";break;case 32773:v="PACKBITS";break;case 8:case 32946:v="DEFLATE";break;case 34712:v="JPEG2000";break;case 34887:v="LERC";break;default:v=String(m)}let x=!0,A="";d.has(m)||(x=!1,A+="unsupported tag compression "+m),l>3&&(x=!1,A+="unsupported tag sampleFormat "+l),1!==s&&2!==s&&4!==s&&s%8!=0&&(x=!1,A+="unsupported tag bitsPerSample "+s);const k=b(t,"GEOASCIIPARAMS");let T;if(k){const e=k.split("|").find((e=>e.includes("ESRI PE String = "))),t=e?e.replace("ESRI PE String = ",""):"";T=t.startsWith("COMPD_CS")||t.startsWith("PROJCS")||t.startsWith("GEOGCS")?{wkid:null,wkt:t}:null}const S=w(t,"GEOTIEPOINTS"),M=w(t,"GEOPIXELSCALE"),I=w(t,"GEOTRANSMATRIX"),E=t.has("GEOKEYDIRECTORY")?t.get("GEOKEYDIRECTORY").data:null;let R,O,N=!1,B=!1;if(E){N=2===C(E,"GTRasterTypeGeoKey");const e=C(E,"GTModelTypeGeoKey");if(2===e){const e=C(E,"GeographicTypeGeoKey");e>=1024&&e<=32766&&(T={wkid:e}),T||32767!==e||(B=!0,T={wkid:4326})}else if(1===e){const e=C(E,"ProjectedCSTypeGeoKey");e>=1024&&e<=32766&&(T={wkid:e})}}if(M&&S&&S.length>=6?(R=[M[0],0,S[3]-S[0]*M[0],0,-Math.abs(M[1]),S[4]-S[1]*M[1]],N&&(R[2]-=.5*R[0]+.5*R[1],R[5]-=.5*R[3]+.5*R[4])):I&&16===I.length&&(R=N?[I[0],I[1],I[3]-.5*I[0],I[4],I[5],I[7]-.5*I[5]]:[I[0],I[1],I[3],I[4],I[5],I[7]]),R){const e=[{x:0,y:i},{x:0,y:0},{x:n,y:i},{x:n,y:0}];let t,r=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let n=0;n<e.length;n++)t=g(e[n],R),r=t.x>r?r:t.x,s=t.x<s?s:t.x,o=t.y>o?o:t.y,a=t.y<a?a:t.y;O={xmin:r,xmax:s,ymin:o,ymax:a,spatialReference:T}}else O={xmin:-.5,ymin:.5-i,xmax:n-.5,ymax:.5,spatialReference:T};B&&(O.xmax-O.xmin>400||Math.max(Math.abs(O.xmin),Math.abs(O.xmax))>361)&&(T=null,O.spatialReference=null);const G=D(e);let _,V,z,j,W;if(G.length>0){z=Math.round(Math.log(n/C(G[0],"IMAGEWIDTH"))/Math.LN2);const e=G[G.length-1];j=G.length,_=C(e,"TILEWIDTH"),V=C(e,"TILELENGTH")}_=null!=j&&j>0?_||r:null,V=null!=j&&j>0?V||o:null,r&&(W=[{maxCol:Math.ceil(n/r)-1,maxRow:Math.ceil(i/o)-1,minRow:0,minCol:0}],G.forEach((e=>{W.push({maxCol:Math.ceil(C(e,"IMAGEWIDTH")/C(e,"TILEWIDTH"))-1,maxRow:Math.ceil(C(e,"IMAGELENGTH")/C(e,"TILELENGTH"))-1,minRow:0,minCol:0})})));const H=b(e[0],"GDAL_METADATA"),J=P(H);A+=" "+F({width:n,height:i,tileWidth:r,tileHeight:o,planes:a,ifds:e});const q=U(e).length===G.length+1,K=G?.length?G.map((e=>({x:n/C(e,"IMAGEWIDTH"),y:i/C(e,"IMAGELENGTH")}))):void 0;return{width:n,height:i,tileWidth:r,tileHeight:o,planes:a,isBSQ:c,pixelType:u,compression:v,noData:f,hasMaskBand:q,isSupported:x,pyramidResolutions:K,message:A,extent:O,isPseudoGeographic:B,affine:M?null:R,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:_,pyramidBlockHeight:V,tileBoundary:W,metadata:J}}function L(e,t){const r=y(e,"PLANARCONFIGURATION");return r?2===r[0]:!!t&&t.isBSQ}function D(e){return e.filter((e=>1===C(e,"NEWSUBFILETYPE")))}function U(e){return e.filter((e=>{const t=!(4&~(C(e,"NEWSUBFILETYPE")??0)),r=4===C(e,"PHOTOMETRICINTERPRETATION");return t&&r}))}function O(e,t,r){const o=e.getUint32(t,r),n=e.getUint32(t+4,r);return r?n*f+o:o*f+n}function N(e,t,r){let o=r?e.getInt32(t,r):e.getUint32(t,r),n=r?e.getUint32(t+4,r):e.getInt32(t+4,r);const i=(r?o:n)>=0?1:-1;return r?o*=i:n*=i,i*(r?n*f+o:o*f+n)}function B(e,t,r,o){return o?O(e,t,r):e.getUint32(t,r)}function G(e){const t=new DataView(e,0,16),r=t.getUint16(0,!1);let o=null;if(18761===r)o=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");o=!1}const n=t.getUint16(2,o);if(42!==n&&43!==n)throw new Error("unexpected tiff identifier");let i=4;const s=43===n;if(s){const e=t.getUint16(i,o);if(i+=2,8!==e)throw new Error("unsupported bigtiff version");if(0!==t.getUint16(i,o))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:o,isBigTiff:s,firstIFDPos:B(t,i,o,s)}}function _(e,t,r,n=0,i=l.A.tiffTags,s=4){const a=v(e,t,r,n,i,s);let u;const c=a.ifd;if(c){if(l.A.ifdTags.forEach(((r,o)=>{c.has(o)&&(u=c.get(o),u.data=v(e,t,u.valueOffset-n,n,r).ifd)})),c.has("GEOKEYDIRECTORY")){u=c.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const o=r[0]+"."+r[1]+"."+r[2];u.data=v(e,t,u.valueOffset+6-n,n,l.A.geoKeys,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[o]})}}if(c.has("XMP")){u=c.get("XMP");const e=u.values;"number"==typeof e[0]&&7===u.type&&(u.values=[(0,o.w)(new Uint8Array(e))])}}return a}function F(e){const{width:t,height:r,tileHeight:o,tileWidth:n}=e,i=e.planes,s=n?n*o:t*r,a=C(e.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/8:1)&&(l=n?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function V(e,t){const{headerInfo:r,ifd:o,offsets:n,sizes:i}=t,s=[];for(let t=0;t<n.length;t++){i[t];const a=await S(e,r.littleEndian,o,n[t],i[t]||e.byteLength);s.push(a)}const l=L(o,r),u=C(o,"BITSPERSAMPLE"),c=p(C(o,"SAMPLEFORMAT")??1,u),h=C(o,"SAMPLESPERPIXEL")||r.planes,f=m(c),d=C(o,"TILEWIDTH"),g=C(o,"TILELENGTH"),y=C(o,"COMPRESSION")??1,w=d*g;let b;const v=[];let x=s[0];const A=34887===y;for(let e=0;e<h;e++){if(b=new f(w),s.length===h)x=s[e],x.length===w&&(b=x);else if(x.length)if(l||A)b=x.length===w?x:x.slice(w*e,w*(e+1));else for(let t=0;t<w;t++)b[t]=x[t*h+e];v.push(b)}const k=r.noData?r.noData[0]:t.noDataValue,T=r.metadata?r.metadata.statistics:null,M=T?T.map((e=>e.min)):null,P=T?T.map((e=>e.max)):null,E={pixelType:c,width:d,height:g,pixels:v,noDataValue:k};return null!=k?(0,a.Sp)(E,k):M&&P&&t.applyMinMaxConstraint&&(E.mask=I(v,M,P)),E}async function z(e,t={}){const r=t.pyramidLevel||0,o=t.headerInfo||function(e){const{littleEndian:t,isBigTiff:r,firstIFDPos:o}=G(e);let n=o;const i=[];do{const o=_(e,t,n,0,l.A.tiffTags,r?8:4);if(!o.success)break;i.push(o.ifd),n=o.nextIFD}while(n>0);return{...R(i),littleEndian:t,isBigTiff:r,ifds:i,pyramidIFDs:D(i),maskIFDs:U(i)}}(e),{ifds:n,noData:i}=o;if(0===n.length)throw new Error("no valid image file directory");const s=F(o);if(s)throw s;let u=null;const c=-1===r?n[n.length-1]:n[r],h=i??t.noDataValue;return u=o.tileWidth?await async function(e,t,r){const o=w(r,"TILEOFFSETS");if(void 0===o)return null;const n=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=R([r]),c=L(r,t),h=C(r,"SAMPLESPERPIXEL")||t.planes,f=i*s,d=C(r,"BITSPERSAMPLE"),p=34887===(C(r,"COMPRESSION")??1),g=m(a),y=[];for(let e=0;e<h;e++)y.push(new g(f));let b,v,x,A,k,T,M,I,P,E,D,U,O;const N=Math.ceil(i/l),B=new Uint8Array(f).fill(255);let G=!1;if(d%8==0)if(p&&c&&h>1){const a=Math.round(o.length/h);for(b=0;b<a;b++){T=Math.floor(b/N)*u,M=b%N*l,I=T*i+M;for(let a=0;a<h;a++){const c=b*h+a;for(0===n[c]?(x=null,G=!0):x=await S(e,t.littleEndian,r,o[c],n[c]),E=0,P=I,U=Math.min(l,i-M),D=Math.min(u,s-T),O=y[a],A=0;A<D;A++)for(P=I+A*i,E=A*l,k=0;k<U;k++,P++,E++)x?O[P]=x[E]:B[P]=0}}}else for(b=0;b<o.length;b++)for(T=Math.floor(b/N)*u,M=b%N*l,I=T*i+M,0===n[b]?(x=null,G=!0):x=await S(e,t.littleEndian,r,o[b],n[b]),E=0,P=I,U=Math.min(l,i-M),D=Math.min(u,s-T),v=0;v<h;v++)if(O=y[v],c||p)for(A=0;A<D;A++)for(P=I+A*i,E=l*u*v+A*l,k=0;k<U;k++,P++,E++)x?O[P]=x[E]:B[P]=0;else for(A=0;A<D;A++)for(P=I+A*i,E=A*l*h+v,k=0;k<U;k++,P++,E+=h)x?O[P]=x[E]:B[P]=0;return{width:i,height:s,pixelType:a,pixels:y,mask:G?B:void 0}}(e,o,c):M(e,o,c),u?(null!=h&&(0,a.Sp)(u,h),u):u}},47915:(e,t,r)=>{r.d(t,{A:()=>a});const o=(()=>{const e=[];return e[254]="NEWSUBFILETYPE",e[255]="SUBFILETYPE",e[256]="IMAGEWIDTH",e[257]="IMAGELENGTH",e[258]="BITSPERSAMPLE",e[259]="COMPRESSION",e[262]="PHOTOMETRICINTERPRETATION",e[263]="THRESHHOLDING",e[264]="CELLWIDTH",e[265]="CELLLENGTH",e[266]="FILLORDER",e[269]="DOCUMENTNAME",e[270]="IMAGEDESCRIPTION",e[271]="MAKE",e[272]="MODEL",e[273]="STRIPOFFSETS",e[274]="ORIENTATION",e[277]="SAMPLESPERPIXEL",e[278]="ROWSPERSTRIP",e[279]="STRIPBYTECOUNTS",e[280]="MINSAMPLEVALUE",e[281]="MAXSAMPLEVALUE",e[282]="XRESOLUTION",e[283]="YRESOLUTION",e[284]="PLANARCONFIGURATION",e[285]="PAGENAME",e[286]="XPOSITION",e[287]="YPOSITION",e[288]="FREEOFFSETS",e[289]="FREEBYTECOUNTS",e[290]="GRAYRESPONSEUNIT",e[291]="GRAYRESPONSECURVE",e[292]="T4OPTIONS",e[293]="T6OPTIONS",e[296]="RESOLUTIONUNIT",e[297]="PAGENUMBER",e[300]="COLORRESPONSEUNIT",e[301]="TRANSFERFUNCTION",e[305]="SOFTWARE",e[306]="DATETIME",e[315]="ARTIST",e[316]="HOSTCOMPUTER",e[317]="PREDICTOR",e[318]="WHITEPOINT",e[319]="PRIMARYCHROMATICITIES",e[320]="COLORMAP",e[321]="HALFTONEHINTS",e[322]="TILEWIDTH",e[323]="TILELENGTH",e[324]="TILEOFFSETS",e[325]="TILEBYTECOUNTS",e[326]="BADFAXLINES",e[327]="CLEANFAXDATA",e[328]="CONSECUTIVEBADFAXLINES",e[330]="SUBIFD",e[332]="INKSET",e[333]="INKNAMES",e[334]="NUMBEROFINKS",e[336]="DOTRANGE",e[337]="TARGETPRINTER",e[338]="EXTRASAMPLES",e[339]="SAMPLEFORMAT",e[340]="SMINSAMPLEVALUE",e[341]="SMAXSAMPLEVALUE",e[342]="TRANSFERRANGE",e[347]="JPEGTABLES",e[512]="JPEGPROC",e[513]="JPEGIFOFFSET",e[514]="JPEGIFBYTECOUNT",e[515]="JPEGRESTARTINTERVAL",e[517]="JPEGLOSSLESSPREDICTORS",e[518]="JPEGPOINTTRANSFORM",e[519]="JPEGQTABLES",e[520]="JPEGDCTABLES",e[521]="JPEGACTABLES",e[529]="YCBCRCOEFFICIENTS",e[530]="YCBCRSUBSAMPLING",e[531]="YCBCRPOSITIONING",e[532]="REFERENCEBLACKWHITE",e[700]="XMP",e[33550]="GEOPIXELSCALE",e[33922]="GEOTIEPOINTS",e[33432]="COPYRIGHT",e[42112]="GDAL_METADATA",e[42113]="GDAL_NODATA",e[50844]="RPCCOEFFICIENT",e[34264]="GEOTRANSMATRIX",e[34735]="GEOKEYDIRECTORY",e[34736]="GEODOUBLEPARAMS",e[34737]="GEOASCIIPARAMS",e[34665]="EXIFIFD",e[34853]="GPSIFD",e[40965]="INTEROPERABILITYIFD",e})(),n=(()=>{const e=o.slice();return e[36864]="ExifVersion",e[40960]="FlashpixVersion",e[40961]="ColorSpace",e[42240]="Gamma",e[37121]="ComponentsConfiguration",e[37122]="CompressedBitsPerPixel",e[40962]="PixelXDimension",e[40963]="PixelYDimension",e[37500]="MakerNote",e[37510]="UserComment",e[40964]="RelatedSoundFile",e[36867]="DateTimeOriginal",e[36868]="DateTimeDigitized",e[36880]="OffsetTime",e[36881]="OffsetTimeOriginal",e[36882]="OffsetTimeDigitized",e[37520]="SubSecTime",e[37521]="SubSecTimeOriginal",e[37522]="SubSecTimeDigitized",e[37888]="Temperature",e[37889]="Humidity",e[37890]="Pressure",e[37891]="WaterDepth",e[37892]="Acceleration",e[37893]="CameraElevationAngle",e[42016]="ImageUniqueID",e[42032]="CameraOwnerName",e[42033]="BodySerialNumber",e[42034]="LensSpecification",e[42035]="LensMake",e[42036]="LensModel",e[42037]="LensSerialNumber",e[33434]="ExposureTime",e[33437]="FNumber",e[34850]="ExposureProgram",e[34852]="SpectralSensitivity",e[34855]="PhotographicSensitivity",e[34856]="OECF",e[34864]="SensitivityType",e[34865]="StandardOutputSensitivity",e[34866]="RecommendedExposureIndex",e[34867]="ISOSpeed",e[34868]="ISOSpeedLatitudeyyy",e[34869]="ISOSpeedLatitudezzz",e[37377]="ShutterSpeedValue",e[37378]="ApertureValue",e[37379]="BrightnessValue",e[37380]="ExposureBiasValue",e[37381]="MaxApertureValue",e[37382]="SubjectDistance",e[37383]="MeteringMode",e[37384]="LightSource",e[37385]="Flash",e[37386]="FocalLength",e[37396]="SubjectArea",e[41483]="FlashEnergy",e[41484]="SpatialFrequencyResponse",e[41486]="FocalPlaneXResolution",e[41487]="FocalPlaneYResolution",e[41488]="FocalPlaneResolutionUnit",e[41492]="SubjectLocation",e[41493]="ExposureIndex",e[41495]="SensingMethod",e[41728]="FileSource",e[41729]="SceneType",e[41730]="CFAPattern",e[41985]="CustomRendered",e[41986]="ExposureMode",e[41987]="WhiteBalance",e[41988]="DigitalZoomRatio",e[41989]="FocalLengthIn35mmFilm",e[41990]="SceneCaptureType",e[41991]="GainControl",e[41992]="Contrast",e[41993]="Saturation",e[41994]="Sharpness",e[41995]="DeviceSettingDescription",e[41996]="SubjectDistanceRange",e})(),i=(()=>{const e=[];return e[1024]="GTModelTypeGeoKey",e[1025]="GTRasterTypeGeoKey",e[1026]="GTCitationGeoKey",e[2048]="GeographicTypeGeoKey",e[2049]="GeogCitationGeoKey",e[2050]="GeogGeodeticDatumGeoKey",e[2051]="GeogPrimeMeridianGeoKey",e[2052]="GeogLinearUnitsGeoKey",e[2053]="GeogLinearUnitSizeGeoKey",e[2054]="GeogAngularUnitsGeoKey",e[2055]="GeogAngularUnitSizeGeoKey",e[2056]="GeogEllipsoidGeoKey",e[2057]="GeogSemiMajorAxisGeoKey",e[2058]="GeogSemiMinorAxisGeoKey",e[2059]="GeogInvFlatteningGeoKey",e[2061]="GeogPrimeMeridianLongGeoKey",e[2060]="GeogAzimuthUnitsGeoKey",e[3072]="ProjectedCSTypeGeoKey",e[3073]="PCSCitationGeoKey",e[3074]="ProjectionGeoKey",e[3075]="ProjCoordTransGeoKey",e[3076]="ProjLinearUnitsGeoKey",e[3077]="ProjLinearUnitSizeGeoKey",e[3078]="ProjStdParallel1GeoKey",e[3079]="ProjStdParallel2GeoKey",e[3080]="ProjNatOriginLongGeoKey",e[3081]="ProjNatOriginLatGeoKey",e[3082]="ProjFalseEastingGeoKey",e[3083]="ProjFalseNorthingGeoKey",e[3084]="ProjFalseOriginLongGeoKey",e[3085]="ProjFalseOriginLatGeoKey",e[3086]="ProjFalseOriginEastingGeoKey",e[3087]="ProjFalseOriginNorthingGeoKey",e[3088]="ProjCenterLongGeoKey",e[3090]="ProjCenterEastingGeoKey",e[3091]="ProjCenterNorthingGeoKey",e[3092]="ProjScaleAtNatOriginGeoKey",e[3093]="ProjScaleAtCenterGeoKey",e[3094]="ProjAzimuthAngleGeoKey",e[3095]="ProjStraightVertPoleLongGeoKey",e[4096]="VerticalCSTypeGeoKey",e[4097]="VerticalCitationGeoKey",e[4098]="VerticalDatumGeoKey",e[4099]="VerticalUnitsGeoKey",e})(),s=new Map;s.set("EXIFIFD",n),s.set("GPSIFD",["GPSVersionID","GPSLatitudeRef","GPSLatitude","GPSLongitudeRef","GPSLongitude","GPSAltitudeRef","GPSAltitude","GPSTimeStamp","GPSSatellites","GPSStatus","GPSMeasureMode","GPSDOP","GPSSpeedRef","GPSSpeed","GPSTrackRef","GPSTrack","GPSImgDirectionRef","GPSImgDirection","GPSMapDatum","GPSDestLatitudeRef","GPSDestLatitude","GPSDestLongitudeRef","GPSDestLongitude","GPSDestBearingRef","GPSDestBearing","GPSDestDistanceRef","GPSDestDistance","GPSProcessingMethod","GPSAreaInformation","GPSDateStamp","GPSDifferential","GPSHPositioningError"]);const a={tiffTags:o,ifdTags:s,geoKeys:i,getTagName:(e,t)=>{let r=(t||o)[e];return void 0===r&&(r="unknown"+String(e)),r}}},16019:(e,t,r)=>{r.d(t,{Sp:()=>u,X1:()=>a,hP:()=>s,zw:()=>l});const o=9999999e31,n=2e-7,i={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE],unknown:void 0,c64:void 0,c128:void 0};function s(e){return i[e]??[-34028234663852886e22,34028234663852886e22]}function a(e,t){return null==e||null==t?"s32":e<0?e>=-128&&t<128?"s8":e>=-32768&&t<32768?"s16":"s32":t<256?"u8":t<65536?"u16":"u32"}function l(e){return(e?.startsWith("s")||e?.startsWith("u"))??!1}function u(e,t,r){if(e.depthCount&&e.depthCount>1)return;const{pixels:i,statistics:a,pixelType:l}=e,u=i[0].length,c=e.bandMasks??[],h=e.mask??new Uint8Array(u).fill(255),f="f32"===l||"f64"===l,d=s(l);let p=!1;for(let e=0;e<i.length;e++){const s="number"==typeof t?t:t[e];if(null==s)continue;const u=a?.[e]?.minValue??d[0],m=a?.[e]?.maxValue??d[1];if(u>s+Number.EPSILON||m<s-Number.EPSILON)continue;const g=c[e]||h.slice(),y=i[e],w=r?.customFloatTolerance;if(f&&0!==w){let e=w;e||(e=Math.abs(s)>=o?n*Math.abs(s):"f32"===l?2**-23:Number.EPSILON);for(let t=0;t<y.length;t++)g[t]&&Math.abs(y[t]-s)<e&&(y[t]=0,g[t]=0,h[t]=0,p=!0)}else for(let e=0;e<y.length;e++)g[e]&&y[e]===s&&(y[e]=0,g[e]=0,h[e]=0,p=!0);c[e]=g}p&&(e.bandMasks=e.bandMasks||e.pixels.length>1?c:null,e.mask=h),p&&"updateStatistics"in e&&e.updateStatistics()}},47124:(e,t,r)=>{r.d(t,{Z:()=>o});const o=(()=>{const e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]})()},28435:(e,t,r)=>{r.d(t,{$i:()=>N,AB:()=>u,Ew:()=>g,Hx:()=>m,IB:()=>o,J$:()=>D,QF:()=>O,UK:()=>p,Wb:()=>n,Wt:()=>x,Wy:()=>c,XU:()=>v,dK:()=>C,eH:()=>d,et:()=>l,lD:()=>L,qL:()=>f,z$:()=>T,z7:()=>k,zg:()=>h});var o,n,i,s=r(14140),a=r(16019);(i=o||(o={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(e){e[e.bestMatch=0]="bestMatch",e[e.fail=1]="fail"}(n||(n={}));const l=6;function u(e){return null!=e&&"esri.layers.support.PixelBlock"===e.declaredClass&&e.pixels&&e.pixels.length>0}function c(e){if(!e?.length||e.some((e=>!u(e))))return null;if(1===e.length)return e[0]?.clone()??null;const t=e,{width:r,height:o,pixelType:n}=t[0];if(t.some((e=>e.width!==r||e.height!==o)))return null;const i=t.map((({mask:e})=>e)).filter((e=>null!=e));let a=null;i.length&&(a=new Uint8Array(r*o),a.set(i[0]),i.length>1&&b(i.slice(1),a));const l=[];t.forEach((({pixels:e})=>l.push(...e)));const c=t.map((({statistics:e})=>e)).filter((e=>e?.length)),h=[];return c.forEach((e=>h.push(...e))),new s.A({pixelType:n,width:r,height:o,mask:a,pixels:l,statistics:h.length?h:null})}function h(e){if(!e)return;const t=e.colormap;if(!t||0===t.length)return;const r=t.sort(((e,t)=>e[0]-t[0]));let o=0;r[0][0]<0&&(o=r[0][0]);const n=Math.max(256,r[r.length-1][0]-o+1),i=new Uint8Array(4*n),s=[];let a,l=0,u=0;const c=5===r[0].length;if(n>65536)return r.forEach((e=>{s[e[0]-o]=c?e.slice(1):e.slice(1).concat([255])})),{indexed2DColormap:s,offset:o,alphaSpecified:c};if(e.fillUnspecified)for(a=r[u],l=a[0]-o;l<n;l++)i[4*l]=a[1],i[4*l+1]=a[2],i[4*l+2]=a[3],i[4*l+3]=c?a[4]:255,l===a[0]-o&&(a=u===r.length-1?a:r[++u]);else for(l=0;l<r.length;l++)a=r[l],u=4*(a[0]-o),i[u]=a[1],i[u+1]=a[2],i[u+2]=a[3],i[u+3]=c?a[4]:255;return{indexedColormap:i,offset:o,alphaSpecified:c}}function f(e,t){if(!u(e))return e;if(!t||!t.indexedColormap&&!t.indexed2DColormap)return e;const r=e.clone(),o=r.pixels;let n=r.mask;const i=r.width*r.height;if(1!==o.length)return e;const{indexedColormap:s,indexed2DColormap:a,offset:l,alphaSpecified:c}=t;let h=0;const f=o[0],d=new Uint8Array(f.length),p=new Uint8Array(f.length),m=new Uint8Array(f.length);let g,y=0;if(s){const e=s.length-1;if(null!=n)for(h=0;h<i;h++)n[h]&&(y=4*(f[h]-l),y<l||y>e?n[h]=0:(d[h]=s[y],p[h]=s[y+1],m[h]=s[y+2],n[h]=s[y+3]));else{for(n=new Uint8Array(i),h=0;h<i;h++)y=4*(f[h]-l),y<l||y>e?n[h]=0:(d[h]=s[y],p[h]=s[y+1],m[h]=s[y+2],n[h]=s[y+3]);r.mask=n}}else if(a)if(null!=n)for(h=0;h<i;h++)n[h]&&(g=a[f[h]],d[h]=g[0],p[h]=g[1],m[h]=g[2],n[h]=g[3]);else{for(n=new Uint8Array(i),h=0;h<i;h++)g=a[f[h]],d[h]=g[0],p[h]=g[1],m[h]=g[2],n[h]=g[3];r.mask=n}return r.pixels=[d,p,m],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=c,r}function d(e,t){if(!u(e))return null;const{pixels:r,mask:o}=e,n=r.length;let i=t.lut;const{offset:a}=t;i&&1===i[0].length&&(i=r.map((()=>i)));const l=[],c=t.outputPixelType||"u8";for(let e=0;e<n;e++){const t=p(r[e],o,i[e],a||0,c);l.push(t)}const h=new s.A({width:e.width,height:e.height,pixels:l,mask:o,pixelType:c});return h.updateStatistics(),h}function p(e,t,r,o,n){const i=e.length,a=s.A.createEmptyBand(n,i);if(t)for(let n=0;n<i;n++)t[n]&&(a[n]=r[e[n]-o]);else for(let t=0;t<i;t++)a[t]=r[e[t]-o];return a}function m(e,t){if(!u(e))return null;const r=e.clone(),{pixels:o}=r,n=r.width*r.height,i=t.length,s=Math.floor(i/2),a=t[Math.floor(s)],l=o[0];let c,h,f,d,p,m,g=!1;const y=new Uint8Array(n),w=new Uint8Array(n),b=new Uint8Array(n);let C=r.mask;const v=4===t[0].mappedColor.length;for(C||(C=new Uint8Array(n),C.fill(v?255:1),r.mask=C),p=0;p<n;p++)if(C[p]){for(c=l[p],g=!1,m=s,h=a,f=0,d=i-1;d-f>1;){if(c===h.value){g=!0;break}c>h.value?f=m:d=m,m=Math.floor((f+d)/2),h=t[Math.floor(m)]}g||(c===t[f].value?(h=t[f],g=!0):c===t[d].value?(h=t[d],g=!0):c<t[f].value?(g=!1,h=null):c>t[f].value&&(c<t[d].value?(h=t[f],g=!0):d===i-1?(g=!1,h=null):(h=t[d],g=!0))),g?(y[p]=h.mappedColor[0],w[p]=h.mappedColor[1],b[p]=h.mappedColor[2],C[p]=h.mappedColor[3]):y[p]=w[p]=b[p]=C[p]=0}return r.pixels=[y,w,b],r.mask=C,r.pixelType="u8",r.maskIsAlpha=v,r}function g(e,t){if(!u(e))return null;const{width:r,height:o}=e,{inputRanges:n,outputValues:i,outputPixelType:l,noDataRanges:c,allowUnmatched:h,isLastInputRangeInclusive:f}=t,d=e.pixels[0],p=s.A.createEmptyBand(l,d.length),m=e.mask,g=new Uint8Array(r*o);m?g.set(m):g.fill(255);const y=e.pixelType.startsWith("f")?1e-6:0,w=n.map((e=>e-y));w[0]=n[0],w[w.length-1]=n[n.length-1]+(f?1e-6:0);const b=n.length/2,[C,v]=(0,a.hP)(l);for(let e=0;e<o;e++)for(let t=0;t<r;t++){const o=e*r+t;if(g[o]){const e=d[o];let t=!1;for(let r=b-1;r>=0;r--)if(e===w[2*r]||e>w[2*r]&&e<w[2*r+1]){p[o]=i[r],t=!0;break}t||(h?p[o]=e>v?v:e<C?C:e:g[o]=0)}}const x=c?.length;if(x)for(let e=0;e<o;e++)for(let t=0;t<r;t++){const o=e*r+t;if(!m||m[o]){const e=d[o];for(let t=0;t<x;t+=2)if(e>=c[t]&&e<=c[t+1]){p[o]=0,g[o]=0;break}}}return new s.A({width:r,height:o,pixelType:l,pixels:[p],mask:g})}function y(e,t,r,o){const n=null!=r&&r.length>=2?new Set(r):null,i=1===r?.length?r[0]:null,s=!!t?.length;for(let r=0;r<e.length;r++)if(o[r]){const a=e[r];if(s){let e=!1;for(let r=0;r<t.length;r+=2)if(a>=t[r]&&a<=t[r+1]){e=!0;break}e||(o[r]=0)}o[r]&&(a===i||n?.has(a))&&(o[r]=0)}}function w(e,t){const r=e[0].length;for(let o=0;o<r;o++)if(t[o]){let r=!1;for(let t=0;t<e.length;t++)if(e[t][o]){r=!0;break}r||(t[o]=0)}}function b(e,t){const r=e[0].length;for(let o=0;o<r;o++)if(t[o]){let r=!1;for(let t=0;t<e.length;t++)if(0===e[t][o]){r=!0;break}r&&(t[o]=0)}}function C(e,t){if(!u(e))return null;const{width:r,height:o,pixels:n}=e,i=r*o,a=new Uint8Array(i);e.mask?a.set(e.mask):a.fill(255);const l=n.length,{includedRanges:c,noDataValues:h,outputPixelType:f,matchAll:d,lookups:m}=t;if(m){const e=[];for(let t=0;t<l;t++){const r=m[t],o=p(n[t],a,r.lut,r.offset||0,"u8");e.push(o)}1===e.length?a.set(e[0]):d?w(e,a):b(e,a)}else if(d){const e=[];for(let t=0;t<l;t++){const r=new Uint8Array(i);r.set(a),y(n[t],c?.slice(2*t,2*t+2),h?.[t],r),e.push(r)}1===e.length?a.set(e[0]):w(e,a)}else for(let e=0;e<l;e++)y(n[e],c?.slice(2*e,2*e+2),h?.[e],a);return new s.A({width:r,height:o,pixelType:f,pixels:n,mask:a})}function v(e){const{srcPixelType:t,inputRanges:r,outputValues:o,allowUnmatched:n,noDataRanges:i,isLastInputRangeInclusive:l,outputPixelType:u}=e;if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const c=t.includes("16")?65536:256,h=t.includes("s")?-c/2:0,f=s.A.createEmptyBand(u,c),d=new Uint8Array(c);n&&d.fill(255);const[p,m]=(0,a.hP)(u);if(r?.length&&o?.length){const e=1e-6,t=r.map((t=>t-e));t[0]=r[0],l&&(t[t.length-1]=r[r.length-1]);for(let e=0;e<t.length;e++){const r=o[e]>m?m:o[e]<p?p:o[e],n=Math.ceil(t[2*e]-h),i=Math.floor(t[2*e+1]-h);for(let e=n;e<=i;e++)f[e]=r,d[e]=255}}if(i?.length)for(let e=0;e<i.length;e++){const t=Math.ceil(i[2*e]-h),r=Math.floor(i[2*e+1]-h);for(let e=t;e<=r;e++)d[e]=0}return{lut:f,offset:h,mask:d}}function x(e,t,r){if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const o=e.includes("16")?65536:256,n=e.includes("s")?-o/2:0,i=new Uint8Array(o);if(t)for(let e=0;e<t.length;e++){const r=Math.ceil(t[2*e]-n),o=Math.floor(t[2*e+1]-n);for(let e=r;e<=o;e++)i[e]=255}else i.fill(255);if(r)for(let e=0;e<r.length;e++)i[r[e]-n]=0;return{lut:i,offset:n}}function A(e,t,r,o,n,i){const{width:s,height:a}=r.block,{x:l,y:u}=r.offset,{width:c,height:h}=r.mosaic,f=function(e,t,r,o,n,i,s,a){return{xmin:n<=r*e?0:n<r*e+e?n-r*e:e,ymin:i<=o*t?0:i<o*t+t?i-o*t:t,xmax:n+s<=r*e?0:n+s<r*e+e?n+s-r*e:e,ymax:i+a<=o*t?0:i+a<o*t+t?i+a-o*t:t}}(s,a,o,n,l,u,c,h);let d=0,p=0;if(i){const e=i.hasGCSSShiftTransform?360:i.halfWorldWidth??0,t=s*i.resolutionX,r=i.startX+o*t;r<e&&r+t>e?p=i.rightPadding:r>=e&&(d=i.leftMargin-i.rightPadding,p=0)}if(f.xmax-=p,"number"!=typeof t)for(let r=f.ymin;r<f.ymax;r++){const i=(n*a+r-u)*c+(o*s-l)+d,h=r*s;for(let r=f.xmin;r<f.xmax;r++)e[i+r]=t[h+r]}else for(let r=f.ymin;r<f.ymax;r++){const i=(n*a+r-u)*c+(o*s-l)+d;for(let r=f.xmin;r<f.xmax;r++)e[i+r]=t}}function k(e,t,r={}){const{clipOffset:o,clipSize:n,alignmentInfo:i,blockWidths:a}=r;if(a)return function(e,t,r){const o=e.find((e=>null!=e));if(null==o)return null;const n=e.some((e=>null==e||!!e.mask)),{width:i,height:a}=t,l=n?new Uint8Array(i*a):null,{blockWidths:c}=r,h=[],f=o.getPlaneCount(),d=s.A.getPixelArrayConstructor(o.pixelType);if(n)for(let t=0,r=0;t<e.length;r+=c[t],t++){const o=e[t];if(!u(o))continue;const n=o.mask;for(let e=0;e<a;e++)for(let s=0;s<c[t];s++)l[e*i+s+r]=null==n?255:n[e*o.width+s]}const p=e.some((e=>e?.bandMasks&&e.bandMasks.length>1)),m=p?[]:void 0,g=i*a;for(let t=0;t<f;t++){const r=new d(g),o=p?new Uint8Array(g):void 0;for(let n=0,s=0;n<e.length;s+=c[n],n++){const l=e[n];if(!u(l))continue;const h=l.pixels[t];if(null!=h){for(let e=0;e<a;e++)for(let t=0;t<c[n];t++)r[e*i+t+s]=h[e*l.width+t];if(o){const e=l.bandMasks?.[t]??l.mask;for(let t=0;t<a;t++)for(let r=0;r<c[n];r++)o[t*i+r+s]=e?e[t*l.width+r]:255}}}h.push(r),m&&o&&m.push(o)}const y=new s.A({width:i,height:a,mask:l,bandMasks:m,pixels:h,pixelType:o.pixelType});return y.updateStatistics(),y}(e,t,{blockWidths:a});const l=e.find((e=>u(e)));if(null==l)return null;const c=n?n.width:t.width,h=n?n.height:t.height,f=l.width,d=l.height,p=t.width/f,m=t.height/d,g={offset:o||{x:0,y:0},mosaic:n||t,block:{width:f,height:d}},y=l.pixelType,w=s.A.getPixelArrayConstructor(y),b=l.pixels.length,C=[];let v,x;for(let t=0;t<b;t++){x=new w(c*h);for(let r=0;r<m;r++)for(let o=0;o<p;o++){const n=e[r*p+o];u(n)&&(v=n.pixels[t],A(x,v,g,o,r,i))}C.push(x)}const k=e.some((e=>null==e||null!=e.mask&&e.mask.length>0)),T=e.some((e=>e?.bandMasks&&e.bandMasks.length>1)),S=k?new Uint8Array(c*h):void 0,M=T?[]:void 0;if(S){for(let t=0;t<m;t++)for(let r=0;r<p;r++){const o=e[t*p+r],n=null!=o?o.mask:null;A(S,null!=n?n:o?255:0,g,r,t,i)}if(M)for(let t=0;t<b;t++){const r=new Uint8Array(c*h);for(let o=0;o<m;o++)for(let n=0;n<p;n++){const s=e[o*p+n],a=s?.bandMasks?.[t]??s?.mask;A(r,null!=a?a:s?255:0,g,n,o,i)}M.push(r)}}const I=new s.A({width:c,height:h,pixels:C,pixelType:y,bandMasks:M,mask:S});return I.updateStatistics(),I}function T(e,t,r){if(!u(e))return null;const{width:o,height:n}=e,i=t.x,s=t.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>o||l>n)return e;if(0===i&&0===s&&a===o&&l===n)return e;e.mask||(e.mask=new Uint8Array(o*n));const c=e.mask;for(let e=0;e<n;e++){const t=e*o;for(let r=0;r<o;r++)c[t+r]=e<s||e>=l||r<i||r>=a?0:1}return e.updateStatistics(),e}function S(e){if(!u(e))return null;const t=e.clone(),{width:r,height:o,pixels:n}=e,i=n[0],s=t.pixels[0],a=e.mask;for(let e=2;e<o-1;e++){const t=new Map;for(let o=e-2;o<e+2;o++)for(let e=0;e<4;e++){const n=o*r+e;P(t,i[n],a?a[n]:1)}s[e*r]=M(t),s[e*r+1]=s[e*r+2]=s[e*r];let o=3;for(;o<r-1;o++){let n=(e-2)*r+o+1;P(t,i[n],a?a[n]:1),n=(e-1)*r+o+1,P(t,i[n],a?a[n]:1),n=e*r+o+1,P(t,i[n],a?a[n]:1),n=(e+1)*r+o+1,P(t,i[n],a?a[n]:1),n=(e-2)*r+o-3,I(t,i[n],a?a[n]:1),n=(e-1)*r+o-3,I(t,i[n],a?a[n]:1),n=e*r+o-3,I(t,i[n],a?a[n]:1),n=(e+1)*r+o-3,I(t,i[n],a?a[n]:1),s[e*r+o]=M(t)}s[e*r+o+1]=s[e*r+o]}for(let e=0;e<r;e++)s[e]=s[r+e]=s[2*r+e],s[(o-1)*r+e]=s[(o-2)*r+e];return t.updateStatistics(),t}function M(e){if(0===e.size)return 0;let t=0,r=-1,o=0;const n=e.keys();let i=n.next();for(;!i.done;)o=e.get(i.value),o>t&&(r=i.value,t=o),i=n.next();return r}function I(e,t,r){if(0===r)return;const o=e.get(t);1===o?e.delete(t):e.set(t,o-1)}function P(e,t,r){0!==r&&e.set(t,e.has(t)?e.get(t)+1:1)}function E(e,t,r){let{x:o,y:n}=t;const{width:i,height:a}=r;if(0===o&&0===n&&a===e.height&&i===e.width)return e;const{width:l,height:c}=e,h=Math.max(0,n),f=Math.max(0,o),d=Math.min(o+i,l),p=Math.min(n+a,c);if(d<0||p<0||!u(e))return null;o=Math.max(0,-o),n=Math.max(0,-n);const{pixels:m}=e,g=i*a,y=m.length,w=[];for(let t=0;t<y;t++){const r=m[t],a=s.A.createEmptyBand(e.pixelType,g);for(let e=h;e<p;e++){const t=e*l;let s=(e+n-h)*i+o;for(let e=f;e<d;e++)a[s++]=r[t+e]}w.push(a)}const b=new Uint8Array(g),C=e.mask;for(let e=h;e<p;e++){const t=e*l;let r=(e+n-h)*i+o;for(let e=f;e<d;e++)b[r++]=C?C[t+e]:1}const v=new s.A({width:r.width,height:r.height,pixelType:e.pixelType,pixels:w,mask:b});return v.updateStatistics(),v}function R(e,t=!0){if(!u(e))return null;const{pixels:r,width:o,height:n,mask:i,pixelType:a}=e,l=[],c=Math.round(o/2),h=Math.round(n/2),f=n-1,d=o-1;for(let e=0;e<r.length;e++){const i=r[e],u=s.A.createEmptyBand(a,c*h);let p=0;for(let e=0;e<n;e+=2)for(let r=0;r<o;r+=2){const n=i[e*o+r];if(t){const t=r===d?n:i[e*o+r+1],s=e===f?n:i[e*o+r+o],a=r===d?s:e===f?t:i[e*o+r+o+1];u[p++]=(n+t+s+a)/4}else u[p++]=n}l.push(u)}let p=null;if(null!=i){p=new Uint8Array(c*h);let e=0;for(let r=0;r<n;r+=2)for(let n=0;n<o;n+=2){const s=i[r*o+n];if(t){const t=n===d?s:i[r*o+n+1],a=r===f?s:i[r*o+n+o],l=n===d?a:r===f?t:i[r*o+n+o+1];p[e++]=s*t*a*l?1:0}else p[e++]=s}}return new s.A({width:c,height:h,pixelType:a,pixels:l,mask:p})}function L(e,t,r=0,o=!0){if(!u(e))return null;const{width:n,height:i}=t;let{width:s,height:a}=e;const l=new Map,c={x:0,y:0},h=1+r;let f=e;for(let e=0;e<h;e++){const r=Math.ceil(s/n),u=Math.ceil(a/i);for(let o=0;o<u;o++){c.y=o*i;for(let i=0;i<r;i++){c.x=i*n;const r=E(f,c,t);l.set(`${e}/${o}/${i}`,r)}}e<h-1&&(f=R(f,o)),s=Math.round(s/2),a=Math.round(a/2)}return l}function D(e){const{pixelBlock:t,tileSize:r,level:o,row:n,col:i,useBilinear:s}=e;if(!u(t))return null;const{width:a,height:l}=r,c=2**o,h=c*a,f=c*l;let d=E(t,{y:n*f,x:i*h},{width:h,height:f});if(!d)return null;for(let e=o;e>0;e--)d=R(d,s);return d}function U(e,t,r,o,n=0){const{width:i,height:s}=e,{width:a,height:l}=t,u=o.cols,c=o.rows,h=Math.ceil(a/u-.1/u),f=Math.ceil(l/c-.1/c);let d,p,m,g,y,w,b;const C=h*u,v=C*f*c,x=new Float32Array(v),A=new Float32Array(v),k=new Uint32Array(v),T=new Uint32Array(v);let S,M,I=0;for(let e=0;e<f;e++)for(let t=0;t<h;t++){d=12*(e*h+t),p=r[d],m=r[d+1],g=r[d+2],y=r[d+3],w=r[d+4],b=r[d+5];for(let r=0;r<c;r++){I=(e*c+r)*C+t*u,M=(r+.5)/c;for(let e=0;e<r;e++)S=(e+.5)/u,x[I+e]=(p*S+m*M+g)*i+n,A[I+e]=(y*S+w*M+b)*s+n,k[I+e]=Math.floor(x[I+e]),T[I+e]=Math.floor(A[I+e])}d+=6,p=r[d],m=r[d+1],g=r[d+2],y=r[d+3],w=r[d+4],b=r[d+5];for(let r=0;r<c;r++){I=(e*c+r)*C+t*u,M=(r+.5)/c;for(let e=r;e<u;e++)S=(e+.5)/u,x[I+e]=(p*S+m*M+g)*i+n,A[I+e]=(y*S+w*M+b)*s+n,k[I+e]=Math.floor(x[I+e]),T[I+e]=Math.floor(A[I+e])}}return{offsets_x:x,offsets_y:A,offsets_xi:k,offsets_yi:T,gridWidth:C}}function O(e,t){const{coefficients:r,spacing:o}=t,{offsets_x:n,offsets_y:i,gridWidth:s}=U(e,e,r,{rows:o[0],cols:o[1]}),{width:a,height:l}=e,u=new Float32Array(a*l),c=180/Math.PI;for(let e=0;e<l;e++)for(let t=0;t<a;t++){const r=e*s+t,o=0===e?r:r-s,h=e===l-1?r:r+s,f=n[o]-n[h],d=i[h]-i[o];if(isNaN(f)||isNaN(d))u[e*a+t]=90;else{let r=Math.atan2(d,f)*c;r=(360+r)%360,u[e*a+t]=r}}return u}function N(e,t,r,o,n="nearest"){if(!u(e))return null;"majority"===n&&(e=S(e));const{pixels:i,mask:a,bandMasks:l,pixelType:c}=e,h=e.width,f=e.height,d=s.A.getPixelArrayConstructor(c),p=i.length,{width:m,height:g}=t;let y=!1;for(let e=0;e<r.length;e+=3)-1===r[e]&&-1===r[e+1]&&-1===r[e+2]&&(y=!0);const{offsets_x:w,offsets_y:b,offsets_xi:C,offsets_yi:v,gridWidth:x}=U({width:h,height:f},t,r,o,"majority"===n?.5:0);let A;const k=(e,t,r,o)=>{const n=e instanceof Float32Array||e instanceof Float64Array?0:.5;for(let i=0;i<g;i++){A=i*x;for(let s=0;s<m;s++){if(w[A]<0||b[A]<0)e[i*m+s]=0;else if(o)e[i*m+s]=t[C[A]+v[A]*h];else{const o=Math.floor(w[A]),a=Math.floor(b[A]),l=Math.ceil(w[A]),u=Math.ceil(b[A]),c=w[A]-o,f=b[A]-a;if(!r||r[o+a*h]&&r[l+a*h]&&r[o+u*h]&&r[l+u*h]){const r=(1-c)*t[o+a*h]+c*t[l+a*h],d=(1-c)*t[o+u*h]+c*t[l+u*h];e[i*m+s]=(1-f)*r+f*d+n}else e[i*m+s]=t[C[A]+v[A]*h]}A++}}},T=[];let M;const I=l?.length===p,P=[];for(let e=0;e<p;e++){if(I){const t=new Uint8Array(m*g);k(t,l[e],l[e],!0),P.push(t)}M=new d(m*g),k(M,i[e],I?l[e]:a,"nearest"===n||"majority"===n),T.push(M)}const E=new s.A({width:m,height:g,pixelType:c,pixels:T,bandMasks:I?P:void 0});if(null!=a)E.mask=new Uint8Array(m*g),k(E.mask,a,a,!0);else if(y){E.mask=new Uint8Array(m*g);for(let e=0;e<m*g;e++)E.mask[e]=w[e]<0||b[e]<0?0:1}return E.updateStatistics(),E}},6952:(e,t,r)=>{r.d(t,{DP:()=>y,Nh:()=>w,Pg:()=>g,RP:()=>c,WF:()=>u,_N:()=>b,eH:()=>p,f4:()=>m,fP:()=>f,zj:()=>h});var o=r(97768),n=r(14140),i=r(16019),s=r(70274);const a=1,l=[.299,.587,.114];function u(e,t=256){t=Math.min(t,256);const{size:r,counts:o}=e,n=new Uint8Array(r),i=o.reduce(((e,r)=>e+r/t),0);let s=0,a=0,l=0,u=i;for(let e=0;e<r;e++)if(l+=o[e],!(e<r-1&&l+o[e+1]<u)){for(;s<t-1&&u<l;)s++,u+=i;for(let t=a;t<=e;t++)n[t]=s;a=e+1}for(let e=a;e<r;e++)n[e]=t-1;return n}function c(e){const{minCutOff:t,maxCutOff:r,gamma:o,pixelType:n,rounding:i}=e,s=e.outMin||0,a=e.outMax||255;if(!["u8","u16","s8","s16"].includes(n))return null;const l=t.length;let u,c,f=0;"s8"===n?f=-127:"s16"===n&&(f=-32767);let d=256;["u16","s16"].includes(n)&&(d=65536);const p=[],m=[],g=a-s;for(u=0;u<l;u++)m[u]=r[u]-t[u],p[u]=0===m[u]?0:g/m[u];let y;const b=[];let C,v,x;if(o&&o.length>=l){const e=w(l,o);for(u=0;u<l;u++){for(x=[],c=0;c<d;c++)if(0!==m[u])if(C=c+f,y=(C-t[u])/m[u],v=1,o[u]>1&&(v-=(1/g)**(y*e[u])),C<r[u]&&C>t[u]){const e=v*g*y**(1/o[u])+s;x[c]="floor"===i?Math.floor(e):"round"===i?Math.round(e):e}else C>=r[u]?x[c]=a:x[c]=s;else x[c]=s;b[u]=x}}else for(u=0;u<l;u++){for(x=[],c=0;c<d;c++)if(C=c+f,C<=t[u])x[c]=s;else if(C>=r[u])x[c]=a;else{const e=(C-t[u])*p[u]+s;x[c]="floor"===i?Math.floor(e):"round"===i?Math.round(e):e}b[u]=x}if(null!=e.contrastOffset){const t=h(e.contrastOffset,e.brightnessOffset);for(u=0;u<l;u++)for(x=b[u],c=0;c<d;c++)x[c]=t[x[c]]}return{lut:b,offset:f}}function h(e,t){const r=Math.min(Math.max(e,-100),100),o=Math.min(Math.max(t??0,-100),100);let n=0,i=0;const s=new Uint8Array(256);for(n=0;n<256;n++)r>0&&r<100?i=(200*n-25500+510*o)/(2*(100-r))+128:r<=0&&r>-100?i=(200*n-25500+510*o)*(100+r)/2e4+128:100===r?(i=200*n-25500+256*(100-r)+510*o,i=i>0?255:0):-100===r&&(i=128),s[n]=i>255?255:i<0?0:i;return s}function f(e,t,r){const o=[];for(let n=0;n<t.length;n++){let i=0,s=0,a=0;"min"in t[n]?({min:i,max:s,avg:a}=t[n]):[i,s,a]=t[n];let u=a??0;"u8"!==e&&(u=255*(u-i)/(s-i)),r&&(u*=l[n]),o.push(d(u))}return o}function d(e){if(e<=0||e>=255)return a;let t=0;150!==e&&(t=e<=150?45*Math.cos(.01047*e):17*Math.sin(.021*e));const r=e+t,o=Math.log(e/255),n=Math.log(r/255);if(0===n)return a;const i=o/n;return isNaN(i)?a:Math.min(9.9,Math.max(.01,i))}function p(e){const{pixels:t,mask:r,pixelType:o,bandMasks:n}=e,i=t.map(((e,t)=>function(e,t,r){let o=1/0,n=-1/0,i=0,s=0,a=0,l=0;const u=e.length,c=new Map,h=[];for(let r=0;r<u;r++){const u=e[r];if(!t||t[r]){h.push(u);const e=(c.get(u)??0)+1;c.set(u,e),e>l&&(l=e,a=u),o=u<o?u:o,n=u>n?u:n,i+=u,s++}}if(0===s)return{statistics:{min:0,max:0,avg:0,stddev:0,mode:0,median:0},histogram:null};const f=i/s;let d=0;for(let r=0;r<u;r++)t&&!t[r]||(d+=(e[r]-f)**2);const p=t?t.filter((e=>e)).length:u,m=p<=1?0:Math.sqrt(d/(p-1));h.sort(((e,t)=>e-t));const g=s>>>1,y={min:o,max:n,avg:f,stddev:m,mode:a,median:s%2?h[Math.floor(g)]:(h[g-1]+h[g])/2};if(["u8","s8","u4","u2","u1"].includes(r)){const r=n-o+1,i=new Uint32Array(r);for(let r=0;r<u;r++)t&&!t[r]||i[e[r]-o]++;return{statistics:y,histogram:{min:o-.5,max:n+.5,size:r,counts:i}}}const w=256,b=new Uint32Array(w),C=(n-o)/w;if(0===C)return{statistics:y,histogram:{min:o,max:n,size:1,counts:new Uint32Array(1).fill(s)}};const v=new Uint32Array(257);for(let r=0;r<u;r++)t&&!t[r]||v[Math.floor((e[r]-o)/C)]++;for(let e=0;e<255;e++)b[e]=v[e];return b[255]=v[255]+v[w],{statistics:y,histogram:{min:o,max:n,size:w,counts:b}}}(e,n?.[t]??r,o)));return{statistics:i.map((({statistics:e})=>e)),histograms:i.map((({histogram:e})=>e))}}function m(e){if(!e?.pixels?.length)return null;const{pixels:t,mask:r,bandMasks:o,pixelType:n}=e,i=e.width*e.height,s=t.length,a=[],l=[],u=256;let c,h,f,d;for(let p=0;p<s;p++){f=new Uint32Array(u);const s=t[p],m=o?.[p]??r;if("u8"===n){if(c=255,h=0,m){for(let e=0;e<i;e++)if(m[e]){const t=s[e];c=t<c?t:c,h=t>h?t:h,f[t]++}}else for(let e=0;e<i;e++){const t=s[e];c=t<c?t:c,h=t>h?t:h,f[t]++}f=f.slice(c,h+1)}else{let t=!1;e.statistics||(e.updateStatistics(),t=!0);const r=e.statistics;c=r[p].minValue,h=r[p].maxValue;const o=(h-c)/u;if(0===o){!r||e.validPixelCount||t||e.updateStatistics();const o=(e.validPixelCount||e.width*e.height)/u;for(let e=0;e<u;e++)f[e]=Math.round(o*(e+1))-Math.round(o*e)}else{d=new Uint32Array(257);for(let e=0;e<i;e++)m&&!m[e]||d[Math.floor((s[e]-c)/o)]++;for(let e=0;e<255;e++)f[e]=d[e];f[255]=d[255]+d[u]}}const g="u8"===n?c-.5:c,y="u8"===n?h+.5:h;a.push({min:g,max:y,size:f.length,counts:f});let w=0,b=0,C=0;for(let e=0;e<f.length;e++)w+=f[e],b+=e*f[e];const v=b/w;for(let e=0;e<f.length;e++)C+=f[e]*(e-v)**2;const x=Math.sqrt(C/(w-1)),A=(y-g)/f.length,k=(v+("u8"===n?0:.5))*A+c,T=x*A;l.push({min:c,max:h,avg:k,stddev:T})}return{statistics:l,histograms:a}}function g(e){const t=[];for(let r=0;r<e.length;r++){const{min:o,max:n,size:i,counts:s}=e[r];let a=0,l=0;for(let e=0;e<i;e++)a+=s[e],l+=e*s[e];const u=l/a;let c=0;for(let e=0;e<i;e++)c+=s[e]*(e-u)**2;const h=(n-o)/i,f=(u+.5)*h+o,d=Math.sqrt(c/(a-1))*h;t.push({min:o,max:n,avg:f,stddev:d})}return t}function y(e,t){const{pixelBlock:r,bandIds:n,returnHistogramLut:a,rasterInfo:l}=t;let c=null,h=null,f=e.stretchType;if("number"==typeof f&&(f=s.x[f]),e.dra)if("minMax"===f&&r?.statistics)c=r.statistics.map((e=>[e.minValue,e.maxValue,0,0]));else{const e=m(r);c=null!=e?e.statistics:null,h=null!=e?e.histograms:null}else c=e.statistics?.length?e.statistics:l.statistics,h="histograms"in e?e.histograms:void 0,h||(h=l.histograms);"percentClip"!==f&&"histogramEqualization"!==f||h?.length||(f="minMax");const d=c?.length||h?.length||l.bandCount,p=[],g=[];let y,w,b,C,v,x,A,k,T;c&&!Array.isArray(c[0])&&(c=c.map((e=>[e.min,e.max,e.avg,e.stddev])));const[S,M]=(0,i.hP)(l.pixelType);if(!c?.length){for(c=[],k=0;k<d;k++)c.push([S,M,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(k=0;k<d;k++)p[k]=S,g[k]=M;break;case"minMax":for(k=0;k<d;k++){const e=c[k];p[k]=e[0],g[k]=e[1]}break;case"standardDeviation":{const{numberOfStandardDeviations:t=2}=e;for(k=0;k<d;k++){const e=c[k];p[k]=e[2]-t*e[3],g[k]=e[2]+t*e[3],p[k]<e[0]&&(p[k]=e[0]),g[k]>e[1]&&(g[k]=e[1])}}break;case"histogramEqualization":for((0,o.Lw)(h),k=0;k<d;k++)p[k]=h[k].min,g[k]=h[k].max;break;case"percentClip":for((0,o.Lw)(h),k=0;k<h.length;k++){for(y=h[k],v=new Uint32Array(y.size),C=[...y.counts],C.length>=20&&(C[0]=C[1]=C[2]=C[C.length-1]=C[C.length-2]=0),b=0,w=(y.max-y.min)/y.size,A=-.5===y.min&&1===w?.5:0,T=0;T<y.size;T++)b+=C[T],v[T]=b;for(x=(e.minPercent||0)*b/100,p[k]=y.min+A,T=0;T<y.size;T++)if(v[T]>x){p[k]=y.min+w*(T+A);break}for(x=(1-(e.maxPercent||0)/100)*b,g[k]=y.max+A,T=y.size-2;T>=0;T--)if(v[T]<x){g[k]=y.min+w*(T+2-A);break}if(g[k]<p[k]){const e=p[k];p[k]=g[k],g[k]=e}}break;default:for(k=0;k<d;k++){const e=c[k];p[k]=e[0],g[k]=e[1]}}let I,P,E;return"histogramEqualization"===f?((0,o.Lw)(h),P=h[0].size||256,I=0,a&&(E=h.map((e=>u(e))))):(P=e.max||255,I=e.min||0),function(e,t){if(null==t||0===t.length)return e;const r=Math.max.apply(null,t),{minCutOff:o,maxCutOff:n,outMin:i,outMax:s,histogramLut:a}=e;return o.length===t.length||o.length<=r?e:{minCutOff:t.map((e=>o[e])),maxCutOff:t.map((e=>n[e])),histogramLut:a?t.map((e=>a[e])):null,outMin:i,outMax:s}}({minCutOff:p,maxCutOff:g,outMax:P,outMin:I,histogramLut:E},n)}function w(e,t){const r=new Float32Array(e);for(let o=0;o<e;o++)t[o]>1?t[o]>2?r[o]=6.5+(t[o]-2)**2.5:r[o]=6.5+100*(2-t[o])**4:r[o]=1;return r}function b(e,t){if(!e?.pixels?.length)return e;const{mask:r,bandMasks:o,width:i,height:s,pixels:a}=e,{minCutOff:l,maxCutOff:u,gamma:c}=t,h=t.outMin||0,f=t.outMax||255,d=i*s,p=t.outputPixelType||"u8",m=e.pixels.map((()=>n.A.createEmptyBand(p,d))),g=m.length,y=f-h,b=[],C=[];for(let e=0;e<g;e++)C[e]=u[e]-l[e],b[e]=0===C[e]?0:y/C[e];const v=p.startsWith("u")||p.startsWith("s"),x=c&&c.length>=g,A=!!t.isRenderer;if(x){const e=w(g,c);for(let t=0;t<g;t++){const n=o?.[t]??r;for(let r=0;r<d;r++)if(null==n||n[r]){if(0===C[t]){m[t][r]=h;continue}const o=a[t][r],n=(o-l[t])/C[t];let i=1;if(c[t]>1&&(i-=(1/y)**(n*e[t])),o<u[t]&&o>l[t]){const e=i*y*n**(1/c[t])+h;m[t][r]=A?Math.floor(e):v?Math.round(e):e}else o>=u[t]?m[t][r]=f:m[t][r]=h}}}else for(let e=0;e<g;e++){const t=o?.[e]??r;for(let r=0;r<d;r++)if(null==t||t[r]){const t=a[e][r];if(t<u[e]&&t>l[e]){const o=(t-l[e])*b[e]+h;m[e][r]=A?Math.floor(o):v?Math.round(o):o}else t>=u[e]?m[e][r]=f:m[e][r]=h}}const k=new n.A({width:i,height:s,mask:r,bandMasks:o,pixels:m,pixelType:p});return k.updateStatistics(),k}},39062:(e,t,r)=>{r.d(t,{E0:()=>m,PP:()=>g,SC:()=>f,di:()=>p,fw:()=>h,ng:()=>l,rk:()=>a,yy:()=>d});var o=r(14140),n=r(4151),i=r(28435);const s=1,a=1/111e3;function l(e){let{altitude:t,azimuth:r}=e;const{hillshadeType:o,pixelSizePower:n=1,pixelSizeFactor:i=1,scalingType:s,isGCS:l,resolution:u}=e,c="multi-directional"===o?2*e.zFactor:e.zFactor,{x:h,y:f}=u;let d=c/(8*h),p=c/(8*f);if(l&&c>.001&&(d/=a,p/=a),"adjusted"===s)if(l){const e=h*a,t=f*a;d=(c+e**n*i)/(8*e),p=(c+t**n*i)/(8*t)}else d=(c+h**n*i)/(8*h),p=(c+f**n*i)/(8*f);let m=(90-t)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y);const C=[315,270,225,360,180,0],v=[60,60,60,60,60,90],x=new Float32Array([3,5,3,2,1,4]),A=x.reduce(((e,t)=>e+t)),k=x.map((e=>e/A)),T="multi-directional"===o?C.length:1,S=new Float32Array(6),M=new Float32Array(6),I=new Float32Array(6);if("multi-directional"===o)for(let e=0;e<T;e++)t=v[e],r=C[e],m=(90-t)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y),S[e]=g,M[e]=w,I[e]=b;else S.fill(g),M.fill(w),I.fill(b);return{resolution:u,factor:[d,p],sinZcosA:w,sinZsinA:b,cosZ:g,sinZcosAs:M,sinZsinAs:I,cosZs:S,weights:k,hillshadeType:["traditional","multi-directional"].indexOf(o)}}function u(e,t){const{width:r,height:o}=e,n=r*o,i=new Uint8Array(n),a=null!=e.mask;let l;if(a){l=new Uint8Array(e.mask);for(let e=0;e<l.length;e++)l[e]&&(i[e]=1,l[e]=1)}const u=e.pixels[0],c=new Float32Array(n),h=new Float32Array(n);let f,d=0;if(t){const{resolution:e}=t,r=e?(e.x+e.y)/2:1;d=200*t.zFactor/(r*r),f=new Float32Array(n)}const p=t?.curvatureType;let m,g,y,w,b,C,v,x;for(let e=s;e<o-s;e++){const t=e*r;for(let e=s;e<r-s;e++){const o=t+e;if(!l||0!==l[o]){if(l){if(l[o-r-1]+l[o-r]+l[o-r+1]+l[o-1]+l[o+1]+l[o+r-1]+l[o+r]+l[o+r+1]<7){i[o]=0;continue}m=l[o-r-1]?u[o-r-1]:u[o],g=l[o-r]?u[o-r]:u[o],y=l[o-r+1]?u[o-r+1]:u[o],w=l[o-1]?u[o-1]:u[o],b=l[o+1]?u[o+1]:u[o],C=l[o+r-1]?u[o+r-1]:u[o],v=l[o+r]?u[o+r]:u[o],x=l[o+r+1]?u[o+r+1]:u[o]}else m=u[o-r-1],g=u[o-r],y=u[o-r+1],w=u[o-1],b=u[o+1],C=u[o+r-1],v=u[o+r],x=u[o+r+1];if(c[o]=y+b+b+x-(m+w+w+C),h[o]=C+v+v+x-(m+g+g+y),null!=f){const e=u[o],t=.5*(w+b)-e,r=.5*(g+v)-e;if("standard"===p)f[o]=-d*(t+r);else{const e=(-m+y+C-x)/4,n=(-w+b)/2,i=(g-v)/2,s=n*n,a=i*i,l=s+a;l&&(f[o]="profile"===p?d*(t*s+r*a+e*n*i)/l:-d*(t*a+r*s-e*n*i)/l)}}}}}return{outMask:a?i:null,dzxs:c,dzys:h,curvatures:f}}function c(e,t,r){for(let o=0;o<r;o++)e[o*t]=e[o*t+1],e[(o+1)*t-1]=e[(o+1)*t-2];for(let o=1;o<t-1;o++)e[o]=e[o+t],e[o+(r-1)*t]=e[o+(r-2)*t]}function h(e,t){if(!(0,i.AB)(e))return e;const{factor:r,sinZcosA:a,sinZsinA:h,cosZ:f,sinZcosAs:d,sinZsinAs:p,cosZs:m,weights:g}=l(t),[y,w]=r,b="traditional"===t.hillshadeType,{width:C,height:v}=e,x=new Uint8Array(C*v),{dzxs:A,dzys:k,outMask:T}=u(e);for(let e=s;e<v-s;e++){const t=e*C;for(let e=s;e<C-s;e++){const r=t+e;if(!T||T[r]){const e=A[r]*y,t=k[r]*w,o=Math.sqrt(1+e*e+t*t);let n=0;if(b){let r=255*(f+h*t-a*e)/o;r<0&&(r=0),n=r}else{const r=p.length;for(let i=0;i<r;i++){let r=255*(m[i]+p[i]*t-d[i]*e)/o;r<0&&(r=0),n+=r*g[i]}}x[r]=255&n}}}return c(x,C,v),new o.A({width:C,height:v,pixels:[x],mask:T,pixelType:"u8",validPixelCount:e.validPixelCount,statistics:[new n.z(0,255)]})}function f(e,t,r,o){if(!(0,i.AB)(e)||!(0,i.AB)(t))return;const{min:n,max:s}=o,a=e.pixels[0],{pixels:l,mask:u}=t,c=l[0],h=255.00001/(s-n),f=new Uint8ClampedArray(c.length),d=new Uint8ClampedArray(c.length),p=new Uint8ClampedArray(c.length),m=r.length-1;for(let e=0;e<c.length;e++){if(u&&0===u[e])continue;const t=Math.floor((c[e]-n)*h),[o,i]=r[t<0?0:t>m?m:t],s=a[e],l=s*i,g=l*(1-Math.abs(o%2-1)),y=s-l;switch(Math.floor(o)){case 0:f[e]=l+y,d[e]=g+y,p[e]=y;break;case 1:f[e]=g+y,d[e]=l+y,p[e]=y;break;case 2:f[e]=y,d[e]=l+y,p[e]=g+y;break;case 3:f[e]=y,d[e]=g+y,p[e]=l+y;break;case 4:f[e]=g+y,d[e]=y,p[e]=l+y;break;case 5:case 6:f[e]=l+y,d[e]=y,p[e]=g+y}}e.pixels=[f,d,p],e.updateStatistics()}function d(e,t){if(!(0,i.AB)(e))return e;const r=t.zFactor,n=t.pixelSizePower??1,l=t.pixelSizeFactor??1,h=t.slopeType,f=t.isGCS,{x:d,y:p}=t.resolution;let m=r/(8*d),g=r/(8*p);f&&Math.abs(r-1)<1e-4&&(m/=a,g/=a),"adjusted"===h&&(m=(r+d**n*l)/(8*d),g=(r+p**n*l)/(8*p));const{dzxs:y,dzys:w,outMask:b}=u(e),{width:C,height:v}=e,x=new Float32Array(C*v);for(let e=s;e<v-s;e++){const t=e*C;for(let e=s;e<C-s;e++){const r=t+e;if(!b||b[r]){const o=y[r]*m,n=w[r]*g,i=Math.sqrt(o*o+n*n);x[t+e]="percent-rise"===h?100*i:57.2957795*Math.atan(i)}}}c(x,C,v);const A=new o.A({width:C,height:v,pixels:[x],mask:b,pixelType:"f32",validPixelCount:e.validPixelCount});return A.updateStatistics(),A}function p(e,t={}){if(!(0,i.AB)(e))return e;const{resolution:r}=t,a=r?1/r.x:1,l=r?1/r.y:1,{dzxs:h,dzys:f,outMask:d}=u(e),{width:p,height:m}=e,g=new Float32Array(p*m);for(let e=s;e<m-s;e++){const t=e*p;for(let e=s;e<p-s;e++){const r=t+e;if(!d||d[r]){const o=h[r]*a,n=f[r]*l;let i=-1;0===o&&0===n||(i=90-57.29578*Math.atan2(n,-o),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),g[t+e]=i}}}return c(g,p,m),new o.A({width:p,height:m,pixels:[g],mask:d,pixelType:"f32",validPixelCount:e.validPixelCount,statistics:[new n.z(-1,360)]})}function m(e,t){if(!(0,i.AB)(e))return e;const{curvatures:r,outMask:n}=u(e,t),{width:s,height:a}=e;c(r,s,a);const l=new o.A({width:s,height:a,pixels:[r],mask:n,pixelType:"f32",validPixelCount:e.validPixelCount});return l.updateStatistics(),l}function g(e,t,r){const{hillshadeType:o,altitude:n,azimuth:i,zFactor:s,pixelSizeFactor:a,pixelSizePower:l,slopeType:u}=e;return{hillshadeType:o,altitude:n,azimuth:i,zFactor:s,pixelSizePower:l,pixelSizeFactor:a,scalingType:"scaled"===u?"adjusted":"none",resolution:t,isGCS:r}}},14636:(e,t,r)=>{r.d(t,{FI:()=>p,KL:()=>u,Lu:()=>h,MD:()=>l,Rn:()=>m,Y2:()=>d});var o=r(66552),n=r(14140),i=r(28435);const s=new Map;s.set("meter-per-second",1),s.set("kilometer-per-hour",.277778),s.set("knots",.514444),s.set("feet-per-second",.3048),s.set("mile-per-hour",.44704);const a=180/Math.PI,l=new o.J({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(e,t){return s.get(e)/s.get(t)||1}function c(e){return(450-e)%360}function h(e,t="geographic"){const[r,o]=e,n=Math.sqrt(r*r+o*o);let i=Math.atan2(o,r)*a;return i=(360+i)%360,"geographic"===t&&(i=c(i)),[n,i]}function f(e,t="geographic"){let r=e[1];"geographic"===t&&(r=c(r)),r%=360;const o=e[0];return[o*Math.cos(r/a),o*Math.sin(r/a)]}function d(e,t,r,o="geographic"){if(!(0,i.AB)(e)||null==r)return e;const n="vector-magdir"===t?e.clone():p(e,t),s=n.pixels[1];for(let e=0;e<s.length;e++)s[e]="geographic"===o?(s[e]+r[e]+270)%360:(s[e]+360-r[e])%360;return"vector-magdir"===t?n:p(n,"vector-magdir")}function p(e,t,r="geographic",o=1){if(!(0,i.AB)(e))return e;const{pixels:s,width:a,height:l}=e,u=a*l,c=s[0],d=s[1],p=e.pixelType.startsWith("f")?e.pixelType:"f32",m=n.A.createEmptyBand(p,u),g=n.A.createEmptyBand(p,u);let y=0;for(let e=0;e<l;e++)for(let e=0;e<a;e++)"vector-uv"===t?([m[y],g[y]]=h([c[y],d[y]],r),m[y]*=o):([m[y],g[y]]=f([c[y],d[y]],r),m[y]*=o,g[y]*=o),y++;const w=new n.A({pixelType:p,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:[m,g]});return w.updateStatistics(),w}function m(e,t,r=1){if(1===r||!(0,i.AB)(e))return e;const o=e.clone(),{pixels:n,width:s,height:a}=o,l=n[0],u=n[1];let c=0;for(let e=0;e<a;e++)for(let e=0;e<s;e++)"vector-uv"===t?(l[c]*=r,u[c]*=r):l[c]*=r,c++;return o.updateStatistics(),o}function g(e,t,r,o=1){const n=Math.sqrt(e*e+t*t)/o,i=(2*Math.PI+Math.atan2(t,e))%(2*Math.PI);return[n,(2*Math.PI+i-r)%(2*Math.PI)]}!function(e=0,t=0,r=Math.PI,o=!0){o&&(r=(2*Math.PI-r)%(2*Math.PI));const n=o?-1:1,i=13*n,s=-7*n,a=-2*n,l=-16*n,u=21.75,[c,h]=g(0,t+i,r,u),[f,d]=g(e-5.5,t+s,r,u),[p,m]=g(e+5.5,t+s,r,u),[y,w]=g(e-1.5,t+a,r,u),[b,C]=g(e+1.5,t+a,r,u),[v,x]=g(e-1.5,t+l,r,u),[A,k]=g(e+1.5,t+l,r,u)}(0,0,0)},85676:(e,t,r)=>{r.d(t,{A:()=>m});var o=r(90237),n=r(25482),i=r(53966),s=r(10107),a=(r(44208),r(87811),r(40608)),l=r(87186),u=r(28435),c=r(6952),h=r(39062),f=r(67369),d=r(88178);let p=class extends n.oY{constructor(e){super(e)}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e?.pixelBlock;if(!g(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=t.extractBands(e.bandIds??[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const o=e.extent,n=o.spatialReference.isGeographic,i={x:(o.xmax-o.xmin)/t.width,y:(o.ymax-o.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:n,resolution:i});break}}return r}catch(e){return i.A.getLogger(this).error("symbolize",e.message),t}}simpleStretch(e,t){if(!g(e))return e;try{return e.pixels.length>3&&(e=e.extractBands([0,1,2])),(0,c._N)(e,{...t,isRenderer:!0})}catch(t){return i.A.getLogger(this).error("symbolize",t.message),e}}generateWebGLParameters(e){if(["uniqueValue","rasterColormap","classBreaks"].includes(this.rendererJSON.type)){const{indexedColormap:e,offset:t}=this.lookup.colormapLut||{};return{colormap:e,colormapOffset:t,type:"lut"}}const{pixelBlock:t,isGCS:r,resolution:o,bandIds:n}=e,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(t,i,n):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,r,o??void 0):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(e){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const t=this.rendererJSON.colorRamp;return e?JSON.stringify(t)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(e){return this._isLUTChanged()&&!this.bind().success?e:(0,u.qL)(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?e:t?(0,u.qL)(e,this.lookup.colormapLut):(0,u.Hx)(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){const{rasterInfo:r}=this,{pixelType:o,bandCount:n}=r,i=this.rendererJSON,s=["u8","u16","s8","s16"].includes(o);let a,l;const{dra:h}=i,{gamma:f}=this.lookup;if("histogramEqualization"===i.stretchType){const o=h?null:this.lookup?.histogramLut,n=(0,c.DP)(i,{rasterInfo:r,pixelBlock:e,bandIds:t,returnHistogramLut:!o}),s=(0,c._N)(e,{...n,gamma:f,isRenderer:!0});l=(0,u.eH)(s,{lut:h?n.histogramLut:o,offset:0})}else if(s){if(h){const n=(0,c.DP)(i,{rasterInfo:r,pixelBlock:e,bandIds:t});a=(0,c.RP)({pixelType:o,...n,gamma:f,rounding:"floor"})}else if(this._isLUTChanged()){if(!this.bind().success)return e;a=this.lookup?this.lookup.stretchLut:null}else a=this.lookup?this.lookup.stretchLut:null;if(!a)return e;n>1&&null!=t&&t.length===e?.pixels.length&&a?.lut.length===n&&(a={lut:t.map((e=>a.lut[e])),offset:a.offset}),l=(0,u.eH)(e,a)}else{const o=(0,c.DP)(i,{rasterInfo:r,pixelBlock:e,bandIds:t});l=(0,c._N)(e,{...o,gamma:f,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return e;l=(0,u.qL)(l,this.lookup?.colormapLut)}return l}_symbolizeShadedRelief(e,t){const r=this.rendererJSON,o={...r,...t},n=(0,h.fw)(e,o);if(!r.colorRamp)return n;let i;if(this._isLUTChanged(!0)){if(!this.bind().success)return n;i=this.lookup?this.lookup.hsvMap:null}else i=this.lookup?this.lookup.hsvMap:null;if(!i)return n;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,h.SC)(n,e,i,s),n}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:o}=this.rasterInfo,n=e.field1;if(!n)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=e.defaultSymbol,s=1===t&&["u8","s8"].includes(o);if(!(0,d.hu)(this.rasterInfo,n)&&!s)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const a=[];if(null!=r){const t=r.fields.find((e=>"value"===e.name.toLowerCase()));if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach((r=>{const o=e.uniqueValueInfos?.find((e=>String(e.value)===String(r.attributes[n]))),s=o?.symbol?.color;s?a.push([r.attributes[t.name]].concat(s)):i&&a.push([r.attributes[t.name]].concat(i.color))}))}else{if("value"!==n.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not available.'};e.uniqueValueInfos?.forEach((e=>{const t=e?.symbol?.color;t?a.push([parseInt(""+e.value,10)].concat(t)):i&&a.push([parseInt(""+e.value,10)].concat(i?.color))}))}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=(0,u.zg)({colormap:a});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=(0,d.WN)(l?.indexedColormap),{success:!0}}_updateColormapRenderer(e){if(!(0,d.FA)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map((e=>[e.value].concat(e.color))).sort(((e,t)=>e[0]-t[0]));if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=(0,u.zg)({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=(0,d.WN)(r?.indexedColormap),{success:!0}}_updateShadedReliefRenderer(e){if(!(0,d.iL)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){const t=(0,f.R8)(e.colorRamp,{interpolateAlpha:!0}),r=(0,u.zg)({colormap:t}),o=(0,f.S2)(r.indexedColormap);this.lookup={rendererJSON:e,colormapLut:r,hsvMap:o}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){const{attributeTable:t,pixelType:r}=this.rasterInfo,o=null!=t?t.fields.find((e=>"value"===e.name.toLowerCase())):null,n=null!=t?t.fields.find((t=>t.name.toLowerCase()===e.field.toLowerCase())):null,i=null!=o&&null!==n;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:o,tableBreakField:n}}_updateClassBreaksRenderer(e){const{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:o,tableBreakField:n}=this._analyzeClassBreaks(e),i=e.classBreakInfos;if(!i?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const s=i.sort(((e,t)=>e.classMaxValue-t.classMaxValue)),a=s[s.length-1];let l=e.minValue;if(!r){const t=[];for(let e=0;e<s.length;e++)t.push({value:s[e].classMinValue??l,mappedColor:s[e].symbol.color}),l=s[e].classMaxValue;return t.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const c=[];if(null!=t&&null!=o&&null!==n&&o!==n){const r=o.name,i=n.name,a=s[s.length-1],{classMaxValue:u}=a;l=e.minValue;for(const e of t.features){const t=e.attributes[r],o=e.attributes[i],n=o===u?a:o<l?null:s.find((({classMaxValue:e})=>e>o));n&&c.push([t].concat(n.symbol.color))}}else{l=Math.floor(e.minValue);for(let e=0;e<s.length;e++){const t=s[e];for(let e=l;e<t.classMaxValue;e++)c.push([e].concat(t.symbol.color));l=Math.ceil(t.classMaxValue)}a.classMaxValue===l&&c.push([a.classMaxValue].concat(a.symbol.color))}const h=(0,u.zg)({colormap:c,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:h},this.canRenderInWebGL=(0,d.WN)(h?.indexedColormap),{success:!0}}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||function(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const o=e.histograms||this.rasterInfo.histograms;!function(e){return"percentClip"===e||"histogramEqualization"===e}(e.stretchType)||o?.length||r||(t="minMax");const{computeGamma:n,useGamma:i,colorRamp:s}=e;let{gamma:a}=e;if(i&&n&&!a?.length){const t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;a=(0,c.fP)(this.rasterInfo.pixelType,t)}const l=this.rasterInfo.pixelType,h=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===t){const t=o.map((e=>(0,c.WF)(e)));this.lookup={rendererJSON:e,histogramLut:t}}else if(h){const t=(0,c.DP)(e,{rasterInfo:this.rasterInfo}),r=(0,c.RP)({pixelType:l,...t,gamma:i?a:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}if(s&&!function(e){return"algorithmic"===e.type&&["0,0,0,255","0,0,0"].includes(e.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(e.toColor.join(","))}(s)){const t=(0,f.R8)(s,{interpolateAlpha:!0});this.lookup||(this.lookup={rendererJSON:e}),this.lookup.colormapLut=(0,u.zg)({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL=!0,{success:!0}}_generateStretchWebGLParams(e,t,r){let o=null,n=null;const i=this.lookup?.colormapLut;t.colorRamp&&i&&(o=i.indexedColormap,n=i.offset),"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!(!t.useGamma||!s?.some((e=>1!==e))),{minCutOff:l,maxCutOff:u,outMin:h,outMax:f}=(0,c.DP)(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});let d=0;null!=e&&(d=e.getPlaneCount(),2===d&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const{bandCount:p}=this.rasterInfo,m=Math.min(3,r?.length||d||p,p),g=new Float32Array(m),y=o||a?1:255;let w;for(w=0;w<l.length;w++)g[w]=u[w]===l[w]?0:(f-h)/(u[w]-l[w])/y;const b=new Float32Array(m);if(a&&s)for(w=0;w<m;w++)s[w]>1?s[w]>2?b[w]=6.5+(s[w]-2)**2.5:b[w]=6.5+100*(2-s[w])**4:b[w]=1;return{bandCount:m,outMin:h/y,outMax:f/y,minCutOff:l,maxCutOff:u,factor:g,useGamma:a,gamma:a?s:[1,1,1],gammaCorrection:a?b:[1,1,1],colormap:o,colormapOffset:n,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){let o=null,n=null;const i=this.lookup?.colormapLut;e.colorRamp&&i&&(o=i.indexedColormap,n=i.offset);const s={...e,isGCS:t,resolution:r},a=(0,h.ng)(s),l=this.rasterInfo.statistics?.[0];return{...a,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:o,colormapOffset:n}}_generateVectorFieldWebGLParams(e){const{style:t,inputUnit:r,outputUnit:o,visualVariables:n,symbolTileSize:i,flowRepresentation:s}=e;let a;const l=this.rasterInfo.statistics?.[0].min??0,u=this.rasterInfo.statistics?.[0].max??50,c=n?.find((e=>"sizeInfo"===e.type))??{type:"sizeInfo",field:"Magnitude",maxDataValue:u,maxSize:.8*i,minDataValue:l,minSize:.2*i},h=c.minDataValue??l,f=c.maxDataValue??u,d=null!=c.maxSize&&null!=c.minSize?[c.minSize/i,c.maxSize/i]:[.2,.8];if("wind_speed"===t){const e=(d[0]+d[1])/2;d[0]=d[1]=e}const p=null!=h&&null!=f?[h,f]:null;if("classified_arrow"===t)if(null!=h&&null!=f&&null!=c){a=[];const e=(c.maxDataValue-c.minDataValue)/5;for(let t=0;t<6;t++)a.push(c.minDataValue+e*t)}else a=[0,1e-6,3.5,7,10.5,14];const m="flow_to"===s==("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,g=n?.find((e=>"rotationInfo"===e.type));return{breakValues:a,dataRange:p,inputUnit:r,outputUnit:o,symbolTileSize:i,symbolPercentRange:d,style:t||"single_arrow",rotation:m,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":g?.rotationType||e.rotationType,type:"vectorField"}}};(0,o._)([(0,s.M)({json:{write:!0}})],p.prototype,"rendererJSON",void 0),(0,o._)([(0,s.M)({type:l.A,json:{write:!0}})],p.prototype,"rasterInfo",void 0),(0,o._)([(0,s.M)({json:{write:!0}})],p.prototype,"lookup",void 0),(0,o._)([(0,s.M)()],p.prototype,"canRenderInWebGL",void 0),p=(0,o._)([(0,a.$)("esri.renderers.support.RasterSymbolizer")],p);const m=p;function g(e){return(0,u.AB)(e)&&0!==e.validPixelCount}},67369:(e,t,r)=>{r.d(t,{L7:()=>a,M5:()=>p,R8:()=>w,S2:()=>b,hf:()=>x,hs:()=>d,iv:()=>y,kH:()=>u,vL:()=>A,vj:()=>l});var o=r(68197),n=r(85334),i=r(66552),s=r(25482);const a=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],l=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],u=new i.J({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function c(e,t){if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]>t[r]+2||e[r]<t[r]-2)return!1;return!0}function h(e){const t=e.clone();return t.fromColor=e.toColor,t.toColor=e.fromColor,t.algorithm=e.algorithm,t}function f(e,t){if(!e)return;const r=t??l;let n=null;return"algorithmic"===e.type?r.some((t=>{if(c(e.fromColor.toRgb(),t.fromColor)&&c(e.toColor.toRgb(),t.toColor))return n=t.id,!0})):"multipart"===e.type&&r.some((t=>{const r=e.colorRamps,i=t.colorRamps;if(r&&i&&r.length===i.length&&!i.some(((e,t)=>{if(!c(r[t].fromColor.toRgb(),new o.A(e.fromColor).toRgb())||!c(r[t].toColor.toRgb(),new o.A(e.toColor).toRgb()))return!0}))){if(n)return!0;n=t.id}})),n}function d(e,t=!1){const r="string"==typeof e?e:function(e,t,r=!1){if(!e)return;let o=!1,n=f(e,t);return null!=n||r||(o=!0,n=f(e=function(e){if("multipart"===e.type){const t=e.clone();return t.colorRamps?.length?(t.colorRamps=t.colorRamps.reverse().map((e=>h(e))),t):t}return h(e)}(e),t)),n?{id:n,inverted:o}:void 0}(e,void 0,t)?.id;return r?u.toJSON(r):null}function p(e,t="esriCIELabAlgorithm"){const r=l.find((({id:t})=>t===e));return r?r.colorRamps?{type:"multipart",colorRamps:r.colorRamps.map((e=>({type:"algorithmic",algorithm:t,fromColor:[...e.fromColor],toColor:[...e.toColor]})))}:{type:"algorithmic",algorithm:t,fromColor:[...r.fromColor],toColor:[...r.toColor]}:null}function m(e){const t=(e=e||{}).numColors||256,r=e.distanceOffset||0,o=null!=e.isCustomInterval?e.isCustomInterval:null!==e.distanceInterval&&e.distanceInterval!==1/(t-1),n=e.distanceInterval||1/(t-1);return{...e,numColors:t,distanceOffset:r,interpolateAlpha:!!e.interpolateAlpha,distanceInterval:n,isCustomInterval:o,weights:e.weights}}function g(e,t){let{fromColor:r,toColor:o}=e;r=[...r],o=[...o],3===r.length&&(r=r.concat([255])),3===o.length&&(o=o.concat([255]));const i=e.algorithm||"esriCIELabAlgorithm",s=m(t),{numColors:a,distanceOffset:l,isCustomInterval:u,interpolateAlpha:c}=s;if(1===a&&0===l)return[r];if(2===a&&0===l&&!u)return[r,o];const h={r:r[0],g:r[1],b:r[2]},f={r:o[0],g:o[1],b:o[2]},d="esriCIELabAlgorithm"===i?function(e,t,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r;let{l:a,a:l,b:u}=e;const c=(t.l-a)*i,h=(t.a-l)*i,f=(t.b-u)*i,d=[];if(n){const e=n/i;a+=e*c,l+=e*h,u+=e*f}for(let e=0;e<o-1;e++)d.push({l:a,a:l,b:u}),a+=c,l+=h,u+=f;return d.push(s?{l:a,a:l,b:u}:t),d}((0,n.ZD)(h),(0,n.ZD)(f),s):"esriHSVAlgorithm"===i?function(e,t,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r,a=0===e.s,l=0===t.s;let u=e.h,c=t.h;a&&!l?u=c:l&&!a&&(t={...t,h:u},c=u);let h,f=Math.abs(c-u);const d=360;f<180?h=(c-u)*i:(f=d-f,h=u>c?f*i:-f*i);const p=(t.s-e.s)*i,m=(t.v-e.v)*i;let{s:g,v:y}=e,w=u;if(n){const e=n/i;w=(w+e*h+d)%d,g+=e*p,y+=e*m}const b=[];for(let e=0;e<o-1;e++)b.push({h:w,s:g,v:y}),w=(w+h+d)%d,g+=p,y+=m;return b.push(s?{h:w,s:g,v:y}:t),b}((0,n.N2)(h),(0,n.N2)(f),s):function(e,t,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r,a=e.h,l=t.h,u=2*Math.PI;let c;if(a<=l){const e=l-a,t=l-a-u;c=Math.abs(t)<Math.abs(e)?t:e}else{const e=l+u-a,t=l-a;c=Math.abs(t)<Math.abs(e)?t:e}const h=c*i,f=(t.l-e.l)*i,d=(t.c-e.c)*i;let{l:p,c:m,h:g}=e;if(n){const e=n/i;p+=e*f,m+=e*d,g=(g+e*h+u)%u}const y=[];for(let e=0;e<o-1;e++)y.push({l:p,c:m,h:g}),p+=f,m+=d,g=(g+h+u)%u;return y.push(s?{l:p,c:m,h:g}:t),y}((0,n.RH)(h),(0,n.RH)(f),s),p=[],g=r[3]??255,y=((o[3]??255)-g)/(a-1);for(let e=0;e<a;e++){const{r:t,g:r,b:o}=(0,n.$)(d[e]),i=c?Math.round(g+y*e):255;p.push([t,r,o,i])}return p}function y(e,t){const r=(0,s.Wj)(e)?e.toJSON():e;return"multipart"===r.type?function(e,t){const{numColors:r,interpolateAlpha:o}=m(t);let n=t?.weights;const{colorRamps:i}=e;if(n){const e=n.reduce(((e,t)=>e+t));n=n.map((t=>t/e))}else{n=[];for(let e=0;e<i.length;e++)n[e]=1/i.length}const s=[],a=1/(r-1);let l=0,u=!1;for(let e=0;e<i.length;e++){const t=s.length,c=u?0:t*a-l;l+=n[e];let h=e===i.length-1?r-1-t:(n[e]-c)/a;if(u=Math.ceil(h)===h,h=Math.ceil(h),0===h)continue;const f=g(i[e],{numColors:h,interpolateAlpha:o,distanceOffset:c/n[e],distanceInterval:a/n[e]});s.push(...f)}const c=[...i[i.length-1].toColor];return 3===c.length&&c.push(255),s.push(c),s}(r,t):g(r,t)}function w(e,t){const r=y(e,t),o=t?.interpolateAlpha;return r.forEach(((e,t)=>{e.unshift(t),o||e.pop()})),r}function b(e){const t=[];for(let r=0;r<e.length;r+=4){const o=(0,n.N2)({r:e[r],g:e[r+1],b:e[r+2]});t.push([o.h/60,o.s/100,255*o.v/100])}return t}function C(e){const t=(0,n.N2)(e);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function v(e){const t=e.toJSON();return{Algorithm:t?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:C(e.fromColor),ToColor:C(e.toColor)}}function x(e){const t=d(e);if(!t)return null;if("algorithmic"===e.type)return{...v(e),Name:t};if(e.colorRamps){const r=e.colorRamps.map(v);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:t}}return null}function A(e){const t=e.reverse().map((e=>{const t=e.toString(16);return t.length<2?"0"+t:t}));return 4294967295&Number.parseInt(t.join(""),16)}},88178:(e,t,r)=>{function o(e,t){const{attributeTable:r,bandCount:o}=e;return!((null!=r||(n=e,!["u8","s8"].includes(n.pixelType)||null==n.statistics?.[0]?.min||null==n.statistics[0]?.max||1!==n.bandCount))&&(null==r||o>1||t&&null==r.fields.find((e=>e.name.toLowerCase()===t.toLowerCase()))));var n}function n(e){const{bandCount:t,dataType:r,pixelType:o}=e;return"elevation"===r||"generic"===r&&1===t&&("s16"===o||"s32"===o||"f32"===o||"f64"===o)}function i(e,t=!1){const{bandCount:r,colormap:o,pixelType:n}=e;return 1===r&&(!!o?.length||!t&&"u8"===n)}function s(e,t=!1){const{attributeTable:r,bandCount:o}=e;return 1===o&&(!t||null!=r||null!=e.histograms)}function a(e){const{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}function l(e){const{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}function u(e){return!!e?.length&&e.length<=16384}r.d(t,{FA:()=>i,QJ:()=>l,WN:()=>u,hu:()=>o,iL:()=>n,rd:()=>a,xX:()=>s})},70274:(e,t,r)=>{r.d(t,{u:()=>o,x:()=>n});const o=new(r(66552).J)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),n={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},4095:(e,t,r)=>{r.d(t,{CW:()=>u}),r(59456);var o=r(44208),n=r(53966),i=(r(34727),r(74887)),s=r(87811);r(21325),r(5443);const a=()=>n.A.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(e,t,r,n){const u=performance.now(),c=function(e,t){const r=function(e,t,r,o){if(0===o)return e;const n=Math.round(3*o),i=new Array(2*n+1);let s=0;for(let e=-n;e<=n;e++){const t=Math.exp(-e*e/(o*o));i[e+n]=t,s+=t}for(let e=-n;e<=n;e++)i[e+n]/=s;const a=new Float32Array(e.length);for(let o=0;o<r;o++)for(let r=0;r<t;r++){let s=0,l=0;for(let a=-n;a<=n;a++){if(r+a<0||r+a>=t)continue;const u=i[a+n];s+=u*e[2*(o*t+(r+a))],l+=u*e[2*(o*t+(r+a))+1]}a[2*(o*t+r)]=s,a[2*(o*t+r)+1]=l}const l=new Float32Array(e.length);for(let e=0;e<t;e++)for(let o=0;o<r;o++){let s=0,u=0;for(let l=-n;l<=n;l++){if(o+l<0||o+l>=r)continue;const c=i[l+n];s+=c*a[2*((o+l)*t+e)],u+=c*a[2*((o+l)*t+e)+1]}l[2*(o*t+e)]=s,l[2*(o*t+e)+1]=u}return l}(t.data,t.width,t.height,e.smoothing);return e.interpolate?(e,o)=>{const n=Math.floor(e),i=Math.floor(o);if(n<0||n>=t.width)return[0,0];if(i<0||i>=t.height)return[0,0];const s=e-n,a=o-i,l=n,u=i,c=n<t.width-1?n+1:n,h=i<t.height-1?i+1:i,f=r[2*(u*t.width+l)],d=r[2*(u*t.width+c)],p=r[2*(h*t.width+l)],m=r[2*(h*t.width+c)],g=r[2*(u*t.width+l)+1],y=r[2*(u*t.width+c)+1];return[(f*(1-a)+p*a)*(1-s)+(d*(1-a)+m*a)*s,(g*(1-a)+r[2*(h*t.width+l)+1]*a)*(1-s)+(y*(1-a)+r[2*(h*t.width+c)+1]*a)*s]}:(e,o)=>{const n=Math.round(e),i=Math.round(o);return n<0||n>=t.width||i<0||i>=t.height?[0,0]:[r[2*(i*t.width+n)],r[2*(i*t.width+n)+1]]}}(t,r),f=performance.now(),d=h(t,c,r.width,r.height),p=performance.now(),m=function(e){const t=new s.A,r=e.reduce(((e,t)=>e+t.length),0),o=new Float32Array(4*r),n=new Array(e.length);let i=0,a=0;for(const r of e){const e=i;for(const e of r)o[4*i]=e.x,o[4*i+1]=e.y,o[4*i+2]=e.t,o[4*i+3]=e.speed,i++;n[a++]={startVertex:e,numberOfVertices:r.length,totalTime:r[r.length-1].t,timeSeed:t.getFloat()}}return{lineVertices:o,lineDescriptors:n}}(d),g=performance.now(),y="Streamlines"===e?function(e,t){const{lineVertices:r,lineDescriptors:o}=e;let n=0,i=0;for(const e of o)n+=2*e.numberOfVertices,i+=6*(e.numberOfVertices-1);const s=new Float32Array(9*n),a=new Uint32Array(i);let l=0,u=0;function c(){a[u++]=l-2,a[u++]=l,a[u++]=l-1,a[u++]=l,a[u++]=l+1,a[u++]=l-1}function h(e,t,r,o,n,i,a,u){const c=9*l;let h=0;s[c+h++]=e,s[c+h++]=t,s[c+h++]=1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=o/2,s[c+h++]=n/2,s[c+h++]=u,l++,s[c+h++]=e,s[c+h++]=t,s[c+h++]=-1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=-o/2,s[c+h++]=-n/2,s[c+h++]=u,l++}for(const e of o){const{totalTime:o,timeSeed:n}=e;let i=null,s=null,a=null,l=null,u=null,f=null;for(let d=0;d<e.numberOfVertices;d++){const p=r[4*(e.startVertex+d)],m=r[4*(e.startVertex+d)+1],g=r[4*(e.startVertex+d)+2],y=r[4*(e.startVertex+d)+3];let w=null,b=null,C=null,v=null;if(d>0){w=p-i,b=m-s;const e=Math.sqrt(w*w+b*b);if(w/=e,b/=e,d>1){let e=w+u,r=b+f;const o=Math.sqrt(e*e+r*r);e/=o,r/=o;const n=Math.min(1/(e*w+r*b),t);e*=n,r*=n,C=-r,v=e}else C=-b,v=w;null!==C&&null!==v&&(h(i,s,a,C,v,o,n,y),c())}i=p,s=m,a=g,u=w,f=b,l=y}h(i,s,a,-f,u,o,n,l)}return{vertexData:s,indexData:a}}(m,l):function(e){const{lineVertices:t,lineDescriptors:r}=e;let o=0,n=0;for(const e of r){const t=e.numberOfVertices-1;o+=4*t*2,n+=6*t*2}const i=new Float32Array(16*o),s=new Uint32Array(n);let a,l,u,c,h,f,d,p,m,g,y,w,b,C,v=0,x=0;function A(){s[x++]=v-8,s[x++]=v-7,s[x++]=v-6,s[x++]=v-7,s[x++]=v-5,s[x++]=v-6,s[x++]=v-4,s[x++]=v-3,s[x++]=v-2,s[x++]=v-3,s[x++]=v-1,s[x++]=v-2}function k(e,t,r,o,n,s,a,l,u,c,h,f,d,p){const m=16*v;let g=0;for(const y of[1,2])for(const w of[1,2,3,4])i[m+g++]=e,i[m+g++]=t,i[m+g++]=r,i[m+g++]=o,i[m+g++]=a,i[m+g++]=l,i[m+g++]=u,i[m+g++]=c,i[m+g++]=y,i[m+g++]=w,i[m+g++]=d,i[m+g++]=p,i[m+g++]=n/2,i[m+g++]=s/2,i[m+g++]=h/2,i[m+g++]=f/2,v++}function T(e,t){let r=m+y,o=g+w;const n=Math.sqrt(r*r+o*o);r/=n,o/=n;const i=m*r+g*o;r/=i,o/=i;let s=y+b,v=w+C;const x=Math.sqrt(s*s+v*v);s/=x,v/=x;const T=y*s+w*v;s/=T,v/=T,k(a,l,u,c,-o,r,h,f,d,p,-v,s,e,t),A()}function S(e,t,r,o,n,i){if(m=y,g=w,y=b,w=C,null==m&&null==g&&(m=y,g=w),null!=h&&null!=f){b=e-h,C=t-f;const r=Math.sqrt(b*b+C*C);b/=r,C/=r}null!=m&&null!=g&&T(n,i),a=h,l=f,u=d,c=p,h=e,f=t,d=r,p=o}function M(e,t){m=y,g=w,y=b,w=C,null==m&&null==g&&(m=y,g=w),null!=m&&null!=g&&T(e,t)}for(const e of r){a=null,l=null,u=null,c=null,h=null,f=null,d=null,p=null,m=null,g=null,y=null,w=null,b=null,C=null;const{totalTime:r,timeSeed:o}=e;for(let n=0;n<e.numberOfVertices;n++)S(t[4*(e.startVertex+n)],t[4*(e.startVertex+n)+1],t[4*(e.startVertex+n)+2],t[4*(e.startVertex+n)+3],r,o);M(r,o)}return{vertexData:i,indexData:s}}(m),w=performance.now();return(0,o.A)("esri-2d-profiler")&&(a().info("I.1","_createFlowFieldFromData (ms)",Math.round(f-u)),a().info("I.2","_getStreamlines (ms)",Math.round(p-f)),a().info("I.3","createAnimatedLinesData (ms)",Math.round(g-p)),a().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-g)),a().info("I.5","createFlowMesh (ms)",Math.round(w-u)),a().info("I.6","Mesh size (bytes)",y.vertexData.buffer.byteLength+y.indexData.buffer.byteLength)),await Promise.resolve(),(0,i.Te)(n),y}function c(e,t,r,o,n,i,s,a,l){const u=[];let c=r,h=o,f=0,[d,p]=t(c,h);d*=e.velocityScale,p*=e.velocityScale;const m=Math.sqrt(d*d+p*p);let g,y;u.push({x:c,y:h,t:f,speed:m});for(let r=0;r<e.verticesPerLine;r++){let[r,o]=t(c,h);r*=e.velocityScale,o*=e.velocityScale;const d=Math.sqrt(r*r+o*o);if(d<e.minSpeedThreshold)return u;const p=r/d,m=o/d;if(c+=p*e.segmentLength,h+=m*e.segmentLength,f+=e.segmentLength/d,Math.acos(p*g+m*y)>e.maxTurnAngle)return u;if(e.collisions){const e=Math.round(c*l),t=Math.round(h*l);if(e<0||e>s-1||t<0||t>a-1)return u;const r=i[t*s+e];if(-1!==r&&r!==n)return u;i[t*s+e]=n}u.push({x:c,y:h,t:f,speed:d}),g=p,y=m}return u}function h(e,t,r,o){const n=[],i=new s.A,a=1/Math.max(e.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(o*a),h=new Int32Array(l*u);for(let e=0;e<h.length;e++)h[e]=-1;const f=[];for(let t=0;t<o;t+=e.lineSpacing)for(let o=0;o<r;o+=e.lineSpacing)f.push({x:o,y:t,sort:i.getFloat()});f.sort(((e,t)=>e.sort-t.sort));for(const{x:r,y:o}of f)if(i.getFloat()<e.density){const i=c(e,t,r,o,n.length,h,l,u,a);if(i.length<2)continue;n.push(i)}return n}}}]);