@arcgis/core 4.30.0-next.20240301 → 4.30.0-next.20240302

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 (66) hide show
  1. package/arcade/functions/featuresetbase.js +1 -1
  2. package/arcade/functions/featuresetgeom.js +1 -1
  3. package/arcade/functions/featuresetstats.js +1 -1
  4. package/arcade/functions/featuresetstring.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/{5712570ecceb32f8ef1e.js → 0fab1cb76be1460fcba5.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{0cc788209a2c8f83af4d.js → 1805a6e63a1bfe6950be.js} +1 -1
  8. package/assets/esri/core/workers/chunks/4b3c25584a646e2462c6.js +1 -0
  9. package/assets/esri/core/workers/chunks/6cf429ec513941f4a4e1.js +1 -0
  10. package/assets/esri/core/workers/chunks/8d9e2d1b62cf4fd5697d.js +1 -0
  11. package/assets/esri/core/workers/chunks/b145b5410b4b3e1e4704.js +1 -0
  12. package/assets/esri/core/workers/chunks/b160972c411cca5c3158.js +1 -0
  13. package/assets/esri/core/workers/chunks/b58dd3f487fdff71500f.js +1 -0
  14. package/assets/esri/core/workers/chunks/{df1093b95b3b1507382c.js → c018ce3935d5f1e60e3c.js} +1 -1
  15. package/assets/esri/core/workers/chunks/cee492b97e841a6d4678.js +1 -0
  16. package/chunks/array.js +1 -1
  17. package/interfaces.d.ts +7 -7
  18. package/package.json +1 -2
  19. package/renderers/support/AuthoringInfoSizeStop.js +5 -0
  20. package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
  21. package/smartMapping/heuristics/referenceSize.js +5 -0
  22. package/smartMapping/renderers/size.js +1 -1
  23. package/smartMapping/renderers/support/referenceSizeUtils.js +5 -0
  24. package/support/revision.js +1 -1
  25. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  26. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  27. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementController.js +1 -1
  28. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  29. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  30. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  31. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  32. package/views/3d/analysis/support/measurementUtils.js +1 -1
  33. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  34. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  35. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  36. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  37. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  38. package/views/draw/DrawAction.js +1 -1
  39. package/views/interactive/snapping/allLayerSnapping.js +1 -1
  40. package/views/support/geodesicAreaMeasurementUtils.js +1 -1
  41. package/views/support/geodesicLengthMeasurementUtils.js +1 -1
  42. package/views/support/geodesicMeasurementUtils.js +1 -1
  43. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  44. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  45. package/widgets/BasemapLayerList.js +1 -1
  46. package/widgets/Daylight/DaylightViewModel.js +1 -1
  47. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  48. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  49. package/widgets/LayerList.js +1 -1
  50. package/widgets/Legend/LegendViewModel.js +1 -1
  51. package/widgets/Search/SearchViewModel.js +1 -1
  52. package/widgets/TableList.js +1 -1
  53. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  54. package/widgets/Widget.js +1 -1
  55. package/assets/esri/core/workers/chunks/39ae3a608762fe707a11.js +0 -1
  56. package/assets/esri/core/workers/chunks/7acf7b6340921b87c11e.js +0 -1
  57. package/assets/esri/core/workers/chunks/aae17bac651f847d222a.js +0 -1
  58. package/assets/esri/core/workers/chunks/b21807f68aff95d8b275.js +0 -1
  59. package/assets/esri/core/workers/chunks/b6a836569f8c1dca4e31.js +0 -1
  60. package/assets/esri/core/workers/chunks/d972ee5ec648f21e0b87.js +0 -1
  61. package/assets/esri/core/workers/chunks/dcc2fe423a4b2be95ec5.js +0 -1
  62. package/geometry/projection/projectPolygonToWGS84ComparableLonLat.js +0 -5
  63. package/geometry/projection/projectPolylineToWGS84ComparableLonLat.js +0 -5
  64. package/views/3d/analysis/support/UnitNormalizer.js +0 -5
  65. package/widgets/support/Popover.js +0 -5
  66. /package/views/interactive/snapping/{SceneSnappingManagerPool.js → SnappingManagerPool.js} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9040,6591],{80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>h});const i={Base64:0,Hex:1,String:2,Raw:3},n=8,s=(1<<n)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*n;r<i;r+=n)t[r>>5]|=(e.charCodeAt(r/n)&s)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=n)t.push(String.fromCharCode(e[r>>5]>>>r%32&s));return t.join("")}function u(e,t,r,i,n,s){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,s)),n),r)}function p(e,t,r,i,n,s,o){return u(t&r|~t&i,e,t,n,s,o)}function c(e,t,r,i,n,s,o){return u(t&i|r&~i,e,t,n,s,o)}function d(e,t,r,i,n,s,o){return u(t^r^i,e,t,n,s,o)}function f(e,t,r,i,n,s,o){return u(r^(t|~i),e,t,n,s,o)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,s=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,u=n,y=s;r=p(r,i,n,s,e[t],7,-680876936),s=p(s,r,i,n,e[t+1],12,-389564586),n=p(n,s,r,i,e[t+2],17,606105819),i=p(i,n,s,r,e[t+3],22,-1044525330),r=p(r,i,n,s,e[t+4],7,-176418897),s=p(s,r,i,n,e[t+5],12,1200080426),n=p(n,s,r,i,e[t+6],17,-1473231341),i=p(i,n,s,r,e[t+7],22,-45705983),r=p(r,i,n,s,e[t+8],7,1770035416),s=p(s,r,i,n,e[t+9],12,-1958414417),n=p(n,s,r,i,e[t+10],17,-42063),i=p(i,n,s,r,e[t+11],22,-1990404162),r=p(r,i,n,s,e[t+12],7,1804603682),s=p(s,r,i,n,e[t+13],12,-40341101),n=p(n,s,r,i,e[t+14],17,-1502002290),i=p(i,n,s,r,e[t+15],22,1236535329),r=c(r,i,n,s,e[t+1],5,-165796510),s=c(s,r,i,n,e[t+6],9,-1069501632),n=c(n,s,r,i,e[t+11],14,643717713),i=c(i,n,s,r,e[t],20,-373897302),r=c(r,i,n,s,e[t+5],5,-701558691),s=c(s,r,i,n,e[t+10],9,38016083),n=c(n,s,r,i,e[t+15],14,-660478335),i=c(i,n,s,r,e[t+4],20,-405537848),r=c(r,i,n,s,e[t+9],5,568446438),s=c(s,r,i,n,e[t+14],9,-1019803690),n=c(n,s,r,i,e[t+3],14,-187363961),i=c(i,n,s,r,e[t+8],20,1163531501),r=c(r,i,n,s,e[t+13],5,-1444681467),s=c(s,r,i,n,e[t+2],9,-51403784),n=c(n,s,r,i,e[t+7],14,1735328473),i=c(i,n,s,r,e[t+12],20,-1926607734),r=d(r,i,n,s,e[t+5],4,-378558),s=d(s,r,i,n,e[t+8],11,-2022574463),n=d(n,s,r,i,e[t+11],16,1839030562),i=d(i,n,s,r,e[t+14],23,-35309556),r=d(r,i,n,s,e[t+1],4,-1530992060),s=d(s,r,i,n,e[t+4],11,1272893353),n=d(n,s,r,i,e[t+7],16,-155497632),i=d(i,n,s,r,e[t+10],23,-1094730640),r=d(r,i,n,s,e[t+13],4,681279174),s=d(s,r,i,n,e[t],11,-358537222),n=d(n,s,r,i,e[t+3],16,-722521979),i=d(i,n,s,r,e[t+6],23,76029189),r=d(r,i,n,s,e[t+9],4,-640364487),s=d(s,r,i,n,e[t+12],11,-421815835),n=d(n,s,r,i,e[t+15],16,530742520),i=d(i,n,s,r,e[t+2],23,-995338651),r=f(r,i,n,s,e[t],6,-198630844),s=f(s,r,i,n,e[t+7],10,1126891415),n=f(n,s,r,i,e[t+14],15,-1416354905),i=f(i,n,s,r,e[t+5],21,-57434055),r=f(r,i,n,s,e[t+12],6,1700485571),s=f(s,r,i,n,e[t+3],10,-1894986606),n=f(n,s,r,i,e[t+10],15,-1051523),i=f(i,n,s,r,e[t+1],21,-2054922799),r=f(r,i,n,s,e[t+8],6,1873313359),s=f(s,r,i,n,e[t+15],10,-30611744),n=f(n,s,r,i,e[t+6],15,-1560198380),i=f(i,n,s,r,e[t+13],21,1309151649),r=f(r,i,n,s,e[t+4],6,-145523070),s=f(s,r,i,n,e[t+11],10,-1120210379),n=f(n,s,r,i,e[t+2],15,718787259),i=f(i,n,s,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),n=o(n,u),s=o(s,y)}return[r,i,n,s]}function h(e,t=i.Hex){const r=t||i.Base64,s=y(a(e),e.length*n);switch(r){case i.Raw:return s;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,n=4*e.length;i<n;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(s);case i.String:return l(s);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let n=0;n<4;n++)8*r+6*n>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-n)&63))}return t.join("")}(s)}}},81149:(e,t,r)=>{r.d(t,{J:()=>ee});var i=r(90237),n=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576)),s=(r(93618),r(65494)),o=r(53966),a=r(36708),l=r(10107),u=r(44208),p=(r(87811),r(40608)),c=r(25482),d=r(4718),f=r(69540);let y=class extends((0,f.O)(c.oY)){constructor(e){super(e),this.expression=null,this.title=null,this.returnType=null}};(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],y.prototype,"expression",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],y.prototype,"title",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],y.prototype,"returnType",void 0),y=(0,i._)([(0,p.$)("esri.layers.support.ExpressionInfo")],y);const h=y;var m;let b=m=class extends c.oY{constructor(e){super(e),this.isAutoGenerated=!1,this.name=null,this.alias=null,this.onStatisticField=null,this.onStatisticExpression=null,this.statisticType=null}clone(){return new m({name:this.name,alias:this.alias,isAutoGenerated:this.isAutoGenerated,onStatisticExpression:(0,d.o8)(this.onStatisticExpression),onStatisticField:this.onStatisticField,statisticType:this.statisticType})}};(0,i._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],b.prototype,"isAutoGenerated",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],b.prototype,"name",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],b.prototype,"alias",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],b.prototype,"onStatisticField",void 0),(0,i._)([(0,l.MZ)({type:h,json:{write:!0}})],b.prototype,"onStatisticExpression",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],b.prototype,"statisticType",void 0),b=m=(0,i._)([(0,p.$)("esri.layers.support.AggregateField")],b);const w=b;var g,v=r(89317),_=r(40530),A=r(13874),x=r(15036),M=r(93637),I=r(93223),S=r(36005),F=r(43937),j=r(55785),R=r(15426),E=r(81457);let Z=g=class extends _.c{constructor(e){super(e),this.type="binning",this.binType="geohash",this.fixedBinLevel=3,this.labelingInfo=null,this.labelsVisible=!0,this.maxScale=0,this.popupEnabled=!0,this.popupTemplate=null,this.fields=[],this.renderer=null}writeFields(e,t,r){const i=e.filter((e=>"avg_angle"!==e.statisticType)).map((e=>e.toJSON()));(0,M.sM)(r,i,t)}readRenderer(e,t,r){const i=t.drawingInfo?.renderer;return i?(0,s.L)(i,t,r)??void 0:(0,R.PD)(t,r)}clone(){return new g({fields:(0,d.o8)(this.fields),fixedBinLevel:this.fixedBinLevel,labelingInfo:(0,d.o8)(this.labelingInfo),labelsVisible:this.labelsVisible,maxScale:this.maxScale,popupEnabled:this.popupEnabled,popupTemplate:(0,d.o8)(this.popupTemplate),renderer:(0,d.o8)(this.renderer)})}};(0,i._)([(0,I.e)({binning:"binning"})],Z.prototype,"type",void 0),(0,i._)([(0,I.e)({geohash:"geohash"})],Z.prototype,"binType",void 0),(0,i._)([(0,l.MZ)({type:Number,range:{min:1,max:9},json:{write:!0}})],Z.prototype,"fixedBinLevel",void 0),(0,i._)([(0,l.MZ)({type:[E.A],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],Z.prototype,"labelingInfo",void 0),(0,i._)([(0,l.MZ)(j.kF)],Z.prototype,"labelsVisible",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{default:0,name:"visibilityInfo.maxScale"}})],Z.prototype,"maxScale",void 0),(0,i._)([(0,l.MZ)(j.M6)],Z.prototype,"popupEnabled",void 0),(0,i._)([(0,l.MZ)({type:A.A,json:{name:"popupInfo",write:!0}})],Z.prototype,"popupTemplate",void 0),(0,i._)([(0,l.MZ)({type:[w],json:{write:!0}})],Z.prototype,"fields",void 0),(0,i._)([(0,F.K)("fields")],Z.prototype,"writeFields",null),(0,i._)([(0,l.MZ)({types:x.H,json:{write:{target:"drawingInfo.renderer"}}})],Z.prototype,"renderer",void 0),(0,i._)([(0,S.w)("renderer",["drawingInfo.renderer"])],Z.prototype,"readRenderer",null),Z=g=(0,i._)([(0,p.$)("esri.layers.support.FeatureReductionBinning")],Z);const C=Z;var T,V=r(61147),O=r(90629);function q(e){return"simple"===e.type&&!e.visualVariables?.length}let G=T=class extends c.oY{constructor(e){super(e),this.type="cluster",this.clusterRadius=(0,O.cr)("80px"),this.clusterMinSize=(0,O.cr)("12px"),this.clusterMaxSize=(0,O.cr)("50px"),this.maxScale=0,this.popupEnabled=!0,this.popupTemplate=null,this.renderer=null,this.symbol=null,this.labelingInfo=null,this.labelsVisible=!0,this.fields=[]}readRenderer(e,t,r){const i=t.drawingInfo?.renderer;return i?.authoringInfo?.isAutoGenerated?null:i?q(i)?null:(0,s.L)(i,t,r)??void 0:(0,R.PD)(t,r)}readSymbol(e,t,r){const i=t.drawingInfo?.renderer;if(i?.authoringInfo?.isAutoGenerated)return null;if(i&&q(i)){const e=(0,s.L)(i,t,r);return e?.symbol}return null}writeSymbol(e,t,r,i){const s=this.renderer?.authoringInfo?.isAutoGenerated;if(!this.renderer||s){const r=new n.A({symbol:e});t.drawingInfo={renderer:r.write({},i)}}}writeFields(e,t,r){const i=e.filter((e=>"avg_angle"!==e.statisticType)).map((e=>e.toJSON()));(0,M.sM)(r,i,t)}readFields(e,t,r){return e.filter((e=>!e.isAutoGenerated)).map((e=>w.fromJSON(e)))}clone(){return new T({clusterRadius:this.clusterRadius,clusterMinSize:this.clusterMinSize,clusterMaxSize:this.clusterMaxSize,labelingInfo:(0,d.o8)(this.labelingInfo),labelsVisible:this.labelsVisible,fields:(0,d.o8)(this.fields),maxScale:this.maxScale,renderer:(0,d.o8)(this.renderer),symbol:(0,d.o8)(this.symbol),popupEnabled:this.popupEnabled,popupTemplate:(0,d.o8)(this.popupTemplate)})}};(0,i._)([(0,l.MZ)({type:["cluster"],readOnly:!0,json:{write:!0}})],G.prototype,"type",void 0),(0,i._)([(0,l.MZ)({type:Number,cast:e=>"auto"===e?e:(0,O.cr)(e),json:{write:!0}})],G.prototype,"clusterRadius",void 0),(0,i._)([(0,l.MZ)({type:Number,cast:O.cr,json:{write:!0}})],G.prototype,"clusterMinSize",void 0),(0,i._)([(0,l.MZ)({type:Number,cast:O.cr,json:{write:!0}})],G.prototype,"clusterMaxSize",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{default:0,name:"visibilityInfo.maxScale"}})],G.prototype,"maxScale",void 0),(0,i._)([(0,l.MZ)(j.M6)],G.prototype,"popupEnabled",void 0),(0,i._)([(0,l.MZ)({type:A.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],G.prototype,"popupTemplate",void 0),(0,i._)([(0,l.MZ)({types:x.H,json:{write:{target:"drawingInfo.renderer"}}})],G.prototype,"renderer",void 0),(0,i._)([(0,S.w)("renderer",["drawingInfo.renderer"])],G.prototype,"readRenderer",null),(0,i._)([(0,l.MZ)({types:V.q8})],G.prototype,"symbol",void 0),(0,i._)([(0,S.w)("symbol",["drawingInfo.renderer"])],G.prototype,"readSymbol",null),(0,i._)([(0,F.K)("symbol")],G.prototype,"writeSymbol",null),(0,i._)([(0,l.MZ)({type:[E.A],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],G.prototype,"labelingInfo",void 0),(0,i._)([(0,l.MZ)(j.kF)],G.prototype,"labelsVisible",void 0),(0,i._)([(0,l.MZ)({type:[w],json:{write:!0}})],G.prototype,"fields",void 0),(0,i._)([(0,F.K)("fields")],G.prototype,"writeFields",null),(0,i._)([(0,S.w)("fields")],G.prototype,"readFields",null),G=T=(0,i._)([(0,p.$)("esri.layers.support.FeatureReductionCluster")],G);const $=G;var P=r(67202);const L={key:"type",base:_.c,typeMap:{cluster:$,binning:C}},z={types:{key:"type",base:_.c,typeMap:{selection:P.A,cluster:$,binning:C}},json:{name:"layerDefinition.featureReduction",write:{allowNull:!0},origins:{"web-map":{types:L},"portal-item":{types:L},"web-scene":{types:{key:"type",base:_.c,typeMap:{selection:P.A}},name:"layerDefinition.featureReduction",write:{layerContainerTypes:v.K}}}}};var N=r(496),D=r(12330),k=r(49186),B=r(80200),H=r(86592),J=r(53930);u.A.add("esri-cluster-arcade-enabled",!0);const K=(0,u.A)("esri-cluster-arcade-enabled"),U=new Set(["simple-line","simple-fill","picture-fill"]);function Q(e,t){let r=t.clone();if(!X(r))return r;if(t.getSymbols().some((e=>U.has(e.type)))&&(r=new n.A({symbol:new J.A})),r.authoringInfo||(r.authoringInfo=new H.A),r.authoringInfo.isAutoGenerated=!0,"visualVariables"in r){const t=(r.visualVariables||[]).filter((e=>"$view.scale"!==e.valueExpression));t.forEach((t=>{"rotation"===t.type?t.field?t.field=W(e,t.field,"avg_angle","number"):t.valueExpression&&(t.field=Y(e,t.valueExpression,"avg_angle","number"),t.valueExpression=null):t.normalizationField?(t.field=W(e,t.field,"avg_norm","number",t.normalizationField),t.normalizationField=null):t.field?t.field=W(e,t.field,"avg","number"):t.valueExpression&&(t.field=Y(e,t.valueExpression,"avg","number"),t.valueExpression=null)})),r.visualVariables=t}switch(r.type){case"simple":break;case"pie-chart":for(const t of r.attributes)t.field?t.field=W(e,t.field,"sum","number"):t.valueExpression&&(t.field=Y(e,t.valueExpression,"sum","number"),t.valueExpression=null);break;case"unique-value":r.field?r.field=W(e,r.field,"mode","string"):r.valueExpression&&(r.field=Y(e,r.valueExpression,"mode","string"),r.valueExpression=null);break;case"class-breaks":r.normalizationField?(r.field=W(e,r.field,"avg_norm","number",r.normalizationField),r.normalizationField=null):r.field?r.field=W(e,r.field,"avg","number"):r.valueExpression&&(r.field=Y(e,r.valueExpression,"avg","number"),r.valueExpression=null)}return r}const X=e=>{const t=t=>o.A.getLogger("esri.views.2d.layers.support.clusterUtils").error(new k.A("Unsupported-renderer",t,{renderer:e}));if(!e)return!1;switch(e.type){case"unique-value":if(e.field2||e.field3)return t("FeatureReductionCluster does not support multi-field UniqueValueRenderers"),!1;break;case"class-breaks":if(e.normalizationField){const r=e.normalizationType;if("field"!==r)return t(`FeatureReductionCluster does not support a normalizationType of ${r}`),!1}break;case"simple":case"pie-chart":break;default:return t(`FeatureReductionCluster does not support renderers of type ${e.type}`),!1}if(!K){if("valueExpression"in e&&e.valueExpression)return t("FeatureReductionCluster does not currently support renderer.valueExpression. Support will be added in a future release"),!1;if(("visualVariables"in e&&e.visualVariables||[]).some((e=>!(!("valueExpression"in e)||!e.valueExpression))))return t("FeatureReductionCluster does not currently support visualVariables with a valueExpression. Support will be added in a future release"),!1}return!0};function Y(e,t,r,i){const n=(0,B.d)(t),s="mode"===r?`cluster_type_${n}`:"sum"===r?`cluster_sum_${n}`:`cluster_avg_${n}`;return e.some((e=>e.name===s))||e.push(new w({name:s,isAutoGenerated:!0,onStatisticExpression:new h({expression:t,returnType:i}),statisticType:r})),s}function W(e,t,r,i,n){if("cluster_count"===t||e.some((e=>e.name===t)))return t;const s=function(e,t,r){switch(e){case"sum":return`cluster_sum_${t}`;case"avg":case"avg_angle":return`cluster_avg_${t}`;case"mode":return`cluster_type_${t}`;case"avg_norm":{const e=r,i="field",n=t.toLowerCase()+",norm:"+i+","+e.toLowerCase();return"cluster_avg_"+(0,B.d)(n)}}}(r,t,n);return e.some((e=>e.name===s))||("avg_norm"===r?e.push(new w({name:s,isAutoGenerated:!0,onStatisticExpression:new h({expression:`$feature.${t} / $feature.${n}`,returnType:i}),statisticType:"avg"})):e.push(new w({name:s,isAutoGenerated:!0,onStatisticField:t,statisticType:r}))),s}const ee=e=>{let t=class extends e{constructor(...e){super(...e),this.addHandles((0,a.wB)((()=>this.renderer),(()=>{if(this.featureReduction){const e=this._normalizeFeatureReduction(this.featureReduction);this._set("featureReduction",e)}}),a.OH))}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){}_withClusterVariable(e,t,r){const i=e.clone();return"visualVariables"in i&&(i.visualVariables||(i.visualVariables=[]),i.visualVariables.some((e=>"size"===e.type))||i.visualVariables.push(new N.A({field:"cluster_count",stops:[new D.A({value:1}),new D.A({useMinValue:!0,size:t}),new D.A({useMaxValue:!0,size:r})]}))),i}_normalizeFeatureReduction(e){if("cluster"!==e?.type)return e;const t=e.clone(),r=[new w({name:"cluster_count",isAutoGenerated:!0,statisticType:"count"})],i=(t.fields??[]).filter((e=>!e.isAutoGenerated)),s=e.renderer&&!e.renderer.authoringInfo?.isAutoGenerated,{clusterMinSize:o,clusterMaxSize:a}=t;if(s){t.fields=[...r,...i];const e=this._withClusterVariable(t.renderer,o,a);return t.effectiveFeatureRenderer=e,t.effectiveClusterRenderer=e,t}if(e.symbol){if(t.fields=[...r,...i],t.renderer=null,!this.renderer)return t.effectiveFeatureRenderer=null,t.effectiveClusterRenderer=null,t;const s=Q(r,this.renderer),l=this._withClusterVariable(s,o,a),u="visualVariables"in l&&l.visualVariables?l.visualVariables:[],p=new n.A({symbol:e.symbol,visualVariables:u});return t.fields=[...r,...i],t.effectiveFeatureRenderer=l,t.effectiveClusterRenderer=p,t}if(!this.renderer)return e;const l=Q(r,this.renderer);t.fields=[...r,...i],t.renderer=l;const u=this._withClusterVariable(l,o,a);return t.effectiveFeatureRenderer=u,t.effectiveClusterRenderer=u,t}};return(0,i._)([(0,l.MZ)(z)],t.prototype,"featureReduction",null),t=(0,i._)([(0,p.$)("esri.layers.mixins.FeatureReductionLayer")],t),t}},40530:(e,t,r)=>{r.d(t,{c:()=>a});var i=r(90237),n=r(25482),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends n.oY{constructor(){super(...arguments),this.type=null}};(0,i._)([(0,s.MZ)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,o.$)("esri.layers.support.FeatureReduction")],a)},67202:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(40530);let l=i=class extends a.c{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,n._)([(0,s.MZ)({type:["selection"]})],l.prototype,"type",void 0),l=i=(0,n._)([(0,o.$)("esri.layers.support.FeatureReductionSelection")],l);const u=l},15426:(e,t,r)=>{r.d(t,{Xl:()=>g,ct:()=>A,C$:()=>P,PD:()=>z,VZ:()=>T,mm:()=>M,VA:()=>$,WP:()=>I,iX:()=>w,GA:()=>D,jp:()=>C,tG:()=>N,lV:()=>S,B5:()=>R,Ye:()=>j,sg:()=>F,hM:()=>E,S2:()=>Z,jD:()=>V,Zm:()=>O,$4:()=>q,bt:()=>_,rn:()=>x});var i=r(70333),n=r(61147),s=r(60999),o=r(49186),a=r(66552),l=r(39516),u=r(90360),p=r(61956);async function c(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=d(e));const i=function(e){return d(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),n=e.capabilities.query.supportsPagination;t.start=0,t.num=i;let s=null;for(;;){const o=await e.source.queryFeaturesJSON(t,r);if(null==s?s=o:s.features=s.features.concat(o.features),s.exceededTransferLimit=o.exceededTransferLimit,!n||!o.exceededTransferLimit)break;t.start+=i}return s}function d(e){return e.capabilities.query.supportsMaxRecordCountFactor?p.A.MAX_MAX_RECORD_COUNT_FACTOR:1}var f=r(83531),y=r(96576),h=r(93618),m=r(54546),b=r(26591);const w=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function g(e,t,r,i){const n=await G(e);if(await v(e,t,i),!n.addAttachment)throw new o.A(i,"Layer source does not support addAttachment capability");return n.addAttachment(t,r)}function v(e,t,r){const{attributes:i}=t,{objectIdField:n}=e;return e.capabilities?.data?.supportsAttachment?t?i?n&&i[n]?Promise.resolve():Promise.reject(new o.A(r,`feature is missing the identifying attribute ${n}`)):Promise.reject(new o.A(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.A(r,"A feature is required to add/delete/update attachments")):Promise.reject(new o.A(r,"this layer doesn't support attachments"))}async function _(e,t,r,i,n){const s=await G(e);if(await v(e,t,n),!s.updateAttachment)throw new o.A(n,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,r,i)}async function A(e,t,i){const{applyEdits:n}=await r.e(8628).then(r.bind(r,78628)),s=await e.load(),{source:o,globalIdField:a}=s;let l=i;return("feature"===s.type?s.infoFor3D:null)&&null!=t.deleteFeatures&&null!=a&&(l={...l,globalIdToObjectId:await D(e,t.deleteFeatures,a)}),n(s,o,t,i)}async function x(e,t,i){const{uploadAssets:n}=await r.e(8628).then(r.bind(r,78628)),s=await e.load();return n(s,s.source,t,i)}async function M(e,t,r,i){const n=await G(e);if(await v(e,t,i),!n.deleteAttachments)throw new o.A(i,"Layer source does not support deleteAttachments capability");return n.deleteAttachments(t,r)}async function I(e,t,r){const i=(await e.load({signal:t?.signal})).source;if(!i.fetchRecomputedExtents)throw new o.A(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function S(e,t,r,i){t=m.A.from(t),await e.load();const n=e.source,s=e.capabilities;if(!s?.data?.supportsAttachment)throw new o.A(i,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:u,num:p,size:c,start:d,where:f}=t;if(!s?.operations?.supportsQueryAttachments&&(a?.length>0||u?.length>0||c?.length>0||p||d||f))throw new o.A(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||u?.length||f))throw new o.A(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!n.queryAttachments)throw new o.A(i,"Layer source does not support queryAttachments capability",t);return n.queryAttachments(t)}async function F(e,t,r,i){const n=await G(e);if(!n.queryObjectIds)throw new o.A(i,"Layer source does not support queryObjectIds capability");return n.queryObjectIds(p.A.from(t)??e.createQuery(),r)}async function j(e,t,r,i){const n=await G(e);if(!n.queryFeatureCount)throw new o.A(i,"Layer source does not support queryFeatureCount capability");return n.queryFeatureCount(p.A.from(t)??e.createQuery(),r)}async function R(e,t,r,i){const n=await G(e);if(!n.queryExtent)throw new o.A(i,"Layer source does not support queryExtent capability");return n.queryExtent(p.A.from(t)??e.createQuery(),r)}async function E(e,t,r,i){const n=await G(e);if(!n.queryRelatedFeatures)throw new o.A(i,"Layer source does not support queryRelatedFeatures capability");return n.queryRelatedFeatures(b.default.from(t),r)}async function Z(e,t,r,i){const n=await G(e);if(!n.queryRelatedFeaturesCount)throw new o.A(i,"Layer source does not support queryRelatedFeaturesCount capability");return n.queryRelatedFeaturesCount(b.default.from(t),r)}async function C(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:i}=await t.refresh();if(null!=i&&(e.sourceJSON={...e.sourceJSON,...i},e.read(i,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.G)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function T(e){const t=new p.A,r=e.capabilities?.data,i=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,i&&(t.compactGeometryEnabled=i.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=i.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:n,timeExtent:s}=e;return t.timeExtent=null!=n&&null!=s?s.offset(-n.value,n.unit):s||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function V(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function O(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function q(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function G(e){return(await e.load()).source}async function $(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!i.id)return;if(i.id.findCredential(e))return;let r;try{const n=await(0,f.wI)(e,t);n&&(r=await i.id.checkSignInStatus(`${n}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await i.id.getCredential(e,{signal:r})}catch(e){}}(n,r)}function P(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const L=(0,u.C)({types:n.xK});function z(e,t){if(e.defaultSymbol)return e.types?.length?new h.A({defaultSymbol:L(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:L(e.symbol,e,t)})))}):new y.A({symbol:L(e.defaultSymbol,e,t)})}function N(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function D(e,t,r){if(null==t)return null;const i=[],{objectIdField:n}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:i}=e;t={globalId:i[r],objectId:null!=i[n]&&-1!==i[n]?i[n]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||i.push(t.globalId))})),0===i.length)return null;const o=e.createQuery();o.where=i.map((e=>`${r}='${e}'`)).join(" OR "),o.returnGeometry=!1,o.outFields=[n,r],o.cacheHint=!1;const a=await(0,s.DZ)(c(e,o));if(!a.ok)return null;const l=new Map,u=a.value.features;for(const e of u){const t=e.attributes[r],i=e.attributes[n];null!=t&&null!=i&&-1!==i&&l.set(t,i)}return l}},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),n=r(53966),s=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},26591:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var i,n=r(90237),s=(r(59456),r(25482)),o=r(4718),a=r(10107),l=r(56507),u=r(40608),p=r(43937),c=r(27733),d=r(16930);let f=i=class extends s.oY{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.o8)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"cacheHint",void 0),(0,n._)([(0,a.MZ)({type:c.L,json:{write:!0}})],f.prototype,"dynamicDataSource",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"gdbVersion",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],f.prototype,"geometryPrecision",void 0),(0,n._)([(0,a.MZ)({type:Date})],f.prototype,"historicMoment",void 0),(0,n._)([(0,p.K)("historicMoment")],f.prototype,"_writeHistoricMoment",null),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],f.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,a.MZ)({type:[Number],json:{write:!0}})],f.prototype,"objectIds",void 0),(0,n._)([(0,a.MZ)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),(0,n._)([(0,a.MZ)({type:[String],json:{write:!0}})],f.prototype,"outFields",void 0),(0,n._)([(0,a.MZ)({type:d.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],f.prototype,"outSpatialReference",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],f.prototype,"relationshipId",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],f.prototype,"start",void 0),(0,n._)([(0,p.K)("start"),(0,p.K)("num")],f.prototype,"writeStart",null),(0,n._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],f.prototype,"num",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],f.prototype,"returnGeometry",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],f.prototype,"returnM",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],f.prototype,"returnZ",void 0),(0,n._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],f.prototype,"where",void 0),f=i=(0,n._)([(0,u.$)("esri.rest.support.RelationshipQuery")],f),f.from=(0,l.dp)(f);const y=f}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9040,6591],{80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>h});const i={Base64:0,Hex:1,String:2,Raw:3},n=8,s=(1<<n)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*n;r<i;r+=n)t[r>>5]|=(e.charCodeAt(r/n)&s)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=n)t.push(String.fromCharCode(e[r>>5]>>>r%32&s));return t.join("")}function u(e,t,r,i,n,s){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,s)),n),r)}function p(e,t,r,i,n,s,o){return u(t&r|~t&i,e,t,n,s,o)}function c(e,t,r,i,n,s,o){return u(t&i|r&~i,e,t,n,s,o)}function d(e,t,r,i,n,s,o){return u(t^r^i,e,t,n,s,o)}function f(e,t,r,i,n,s,o){return u(r^(t|~i),e,t,n,s,o)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,s=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,u=n,y=s;r=p(r,i,n,s,e[t],7,-680876936),s=p(s,r,i,n,e[t+1],12,-389564586),n=p(n,s,r,i,e[t+2],17,606105819),i=p(i,n,s,r,e[t+3],22,-1044525330),r=p(r,i,n,s,e[t+4],7,-176418897),s=p(s,r,i,n,e[t+5],12,1200080426),n=p(n,s,r,i,e[t+6],17,-1473231341),i=p(i,n,s,r,e[t+7],22,-45705983),r=p(r,i,n,s,e[t+8],7,1770035416),s=p(s,r,i,n,e[t+9],12,-1958414417),n=p(n,s,r,i,e[t+10],17,-42063),i=p(i,n,s,r,e[t+11],22,-1990404162),r=p(r,i,n,s,e[t+12],7,1804603682),s=p(s,r,i,n,e[t+13],12,-40341101),n=p(n,s,r,i,e[t+14],17,-1502002290),i=p(i,n,s,r,e[t+15],22,1236535329),r=c(r,i,n,s,e[t+1],5,-165796510),s=c(s,r,i,n,e[t+6],9,-1069501632),n=c(n,s,r,i,e[t+11],14,643717713),i=c(i,n,s,r,e[t],20,-373897302),r=c(r,i,n,s,e[t+5],5,-701558691),s=c(s,r,i,n,e[t+10],9,38016083),n=c(n,s,r,i,e[t+15],14,-660478335),i=c(i,n,s,r,e[t+4],20,-405537848),r=c(r,i,n,s,e[t+9],5,568446438),s=c(s,r,i,n,e[t+14],9,-1019803690),n=c(n,s,r,i,e[t+3],14,-187363961),i=c(i,n,s,r,e[t+8],20,1163531501),r=c(r,i,n,s,e[t+13],5,-1444681467),s=c(s,r,i,n,e[t+2],9,-51403784),n=c(n,s,r,i,e[t+7],14,1735328473),i=c(i,n,s,r,e[t+12],20,-1926607734),r=d(r,i,n,s,e[t+5],4,-378558),s=d(s,r,i,n,e[t+8],11,-2022574463),n=d(n,s,r,i,e[t+11],16,1839030562),i=d(i,n,s,r,e[t+14],23,-35309556),r=d(r,i,n,s,e[t+1],4,-1530992060),s=d(s,r,i,n,e[t+4],11,1272893353),n=d(n,s,r,i,e[t+7],16,-155497632),i=d(i,n,s,r,e[t+10],23,-1094730640),r=d(r,i,n,s,e[t+13],4,681279174),s=d(s,r,i,n,e[t],11,-358537222),n=d(n,s,r,i,e[t+3],16,-722521979),i=d(i,n,s,r,e[t+6],23,76029189),r=d(r,i,n,s,e[t+9],4,-640364487),s=d(s,r,i,n,e[t+12],11,-421815835),n=d(n,s,r,i,e[t+15],16,530742520),i=d(i,n,s,r,e[t+2],23,-995338651),r=f(r,i,n,s,e[t],6,-198630844),s=f(s,r,i,n,e[t+7],10,1126891415),n=f(n,s,r,i,e[t+14],15,-1416354905),i=f(i,n,s,r,e[t+5],21,-57434055),r=f(r,i,n,s,e[t+12],6,1700485571),s=f(s,r,i,n,e[t+3],10,-1894986606),n=f(n,s,r,i,e[t+10],15,-1051523),i=f(i,n,s,r,e[t+1],21,-2054922799),r=f(r,i,n,s,e[t+8],6,1873313359),s=f(s,r,i,n,e[t+15],10,-30611744),n=f(n,s,r,i,e[t+6],15,-1560198380),i=f(i,n,s,r,e[t+13],21,1309151649),r=f(r,i,n,s,e[t+4],6,-145523070),s=f(s,r,i,n,e[t+11],10,-1120210379),n=f(n,s,r,i,e[t+2],15,718787259),i=f(i,n,s,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),n=o(n,u),s=o(s,y)}return[r,i,n,s]}function h(e,t=i.Hex){const r=t||i.Base64,s=y(a(e),e.length*n);switch(r){case i.Raw:return s;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,n=4*e.length;i<n;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(s);case i.String:return l(s);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let n=0;n<4;n++)8*r+6*n>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-n)&63))}return t.join("")}(s)}}},81149:(e,t,r)=>{r.d(t,{J:()=>ee});var i=r(90237),n=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576)),s=(r(93618),r(65494)),o=r(53966),a=r(36708),l=r(10107),u=r(44208),p=(r(87811),r(40608)),c=r(25482),d=r(4718),f=r(69540);let y=class extends((0,f.O)(c.oY)){constructor(e){super(e),this.expression=null,this.title=null,this.returnType=null}};(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],y.prototype,"expression",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],y.prototype,"title",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],y.prototype,"returnType",void 0),y=(0,i._)([(0,p.$)("esri.layers.support.ExpressionInfo")],y);const h=y;var m;let b=m=class extends c.oY{constructor(e){super(e),this.isAutoGenerated=!1,this.name=null,this.alias=null,this.onStatisticField=null,this.onStatisticExpression=null,this.statisticType=null}clone(){return new m({name:this.name,alias:this.alias,isAutoGenerated:this.isAutoGenerated,onStatisticExpression:(0,d.o8)(this.onStatisticExpression),onStatisticField:this.onStatisticField,statisticType:this.statisticType})}};(0,i._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],b.prototype,"isAutoGenerated",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],b.prototype,"name",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],b.prototype,"alias",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],b.prototype,"onStatisticField",void 0),(0,i._)([(0,l.MZ)({type:h,json:{write:!0}})],b.prototype,"onStatisticExpression",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],b.prototype,"statisticType",void 0),b=m=(0,i._)([(0,p.$)("esri.layers.support.AggregateField")],b);const w=b;var g,v=r(89317),_=r(40530),A=r(13874),x=r(15036),M=r(93637),I=r(93223),S=r(36005),F=r(43937),j=r(55785),R=r(15426),E=r(81457);let Z=g=class extends _.c{constructor(e){super(e),this.type="binning",this.binType="geohash",this.fixedBinLevel=3,this.labelingInfo=null,this.labelsVisible=!0,this.maxScale=0,this.popupEnabled=!0,this.popupTemplate=null,this.fields=[],this.renderer=null}writeFields(e,t,r){const i=e.filter((e=>"avg_angle"!==e.statisticType)).map((e=>e.toJSON()));(0,M.sM)(r,i,t)}readRenderer(e,t,r){const i=t.drawingInfo?.renderer;return i?(0,s.L)(i,t,r)??void 0:(0,R.PD)(t,r)}clone(){return new g({fields:(0,d.o8)(this.fields),fixedBinLevel:this.fixedBinLevel,labelingInfo:(0,d.o8)(this.labelingInfo),labelsVisible:this.labelsVisible,maxScale:this.maxScale,popupEnabled:this.popupEnabled,popupTemplate:(0,d.o8)(this.popupTemplate),renderer:(0,d.o8)(this.renderer)})}};(0,i._)([(0,I.e)({binning:"binning"})],Z.prototype,"type",void 0),(0,i._)([(0,I.e)({geohash:"geohash"})],Z.prototype,"binType",void 0),(0,i._)([(0,l.MZ)({type:Number,range:{min:1,max:9},json:{write:!0}})],Z.prototype,"fixedBinLevel",void 0),(0,i._)([(0,l.MZ)({type:[E.A],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],Z.prototype,"labelingInfo",void 0),(0,i._)([(0,l.MZ)(j.kF)],Z.prototype,"labelsVisible",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{default:0,name:"visibilityInfo.maxScale"}})],Z.prototype,"maxScale",void 0),(0,i._)([(0,l.MZ)(j.M6)],Z.prototype,"popupEnabled",void 0),(0,i._)([(0,l.MZ)({type:A.A,json:{name:"popupInfo",write:!0}})],Z.prototype,"popupTemplate",void 0),(0,i._)([(0,l.MZ)({type:[w],json:{write:!0}})],Z.prototype,"fields",void 0),(0,i._)([(0,F.K)("fields")],Z.prototype,"writeFields",null),(0,i._)([(0,l.MZ)({types:x.H,json:{write:{target:"drawingInfo.renderer"}}})],Z.prototype,"renderer",void 0),(0,i._)([(0,S.w)("renderer",["drawingInfo.renderer"])],Z.prototype,"readRenderer",null),Z=g=(0,i._)([(0,p.$)("esri.layers.support.FeatureReductionBinning")],Z);const C=Z;var T,V=r(61147),O=r(90629);function q(e){return"simple"===e.type&&!e.visualVariables?.length}let G=T=class extends c.oY{constructor(e){super(e),this.type="cluster",this.clusterRadius=(0,O.cr)("80px"),this.clusterMinSize=(0,O.cr)("12px"),this.clusterMaxSize=(0,O.cr)("50px"),this.maxScale=0,this.popupEnabled=!0,this.popupTemplate=null,this.renderer=null,this.symbol=null,this.labelingInfo=null,this.labelsVisible=!0,this.fields=[]}readRenderer(e,t,r){const i=t.drawingInfo?.renderer;return i?.authoringInfo?.isAutoGenerated?null:i?q(i)?null:(0,s.L)(i,t,r)??void 0:(0,R.PD)(t,r)}readSymbol(e,t,r){const i=t.drawingInfo?.renderer;if(i?.authoringInfo?.isAutoGenerated)return null;if(i&&q(i)){const e=(0,s.L)(i,t,r);return e?.symbol}return null}writeSymbol(e,t,r,i){const s=this.renderer?.authoringInfo?.isAutoGenerated;if(!this.renderer||s){const r=new n.A({symbol:e});t.drawingInfo={renderer:r.write({},i)}}}writeFields(e,t,r){const i=e.filter((e=>"avg_angle"!==e.statisticType)).map((e=>e.toJSON()));(0,M.sM)(r,i,t)}readFields(e,t,r){return e.filter((e=>!e.isAutoGenerated)).map((e=>w.fromJSON(e)))}clone(){return new T({clusterRadius:this.clusterRadius,clusterMinSize:this.clusterMinSize,clusterMaxSize:this.clusterMaxSize,labelingInfo:(0,d.o8)(this.labelingInfo),labelsVisible:this.labelsVisible,fields:(0,d.o8)(this.fields),maxScale:this.maxScale,renderer:(0,d.o8)(this.renderer),symbol:(0,d.o8)(this.symbol),popupEnabled:this.popupEnabled,popupTemplate:(0,d.o8)(this.popupTemplate)})}};(0,i._)([(0,l.MZ)({type:["cluster"],readOnly:!0,json:{write:!0}})],G.prototype,"type",void 0),(0,i._)([(0,l.MZ)({type:Number,cast:e=>"auto"===e?e:(0,O.cr)(e),json:{write:!0}})],G.prototype,"clusterRadius",void 0),(0,i._)([(0,l.MZ)({type:Number,cast:O.cr,json:{write:!0}})],G.prototype,"clusterMinSize",void 0),(0,i._)([(0,l.MZ)({type:Number,cast:O.cr,json:{write:!0}})],G.prototype,"clusterMaxSize",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{default:0,name:"visibilityInfo.maxScale"}})],G.prototype,"maxScale",void 0),(0,i._)([(0,l.MZ)(j.M6)],G.prototype,"popupEnabled",void 0),(0,i._)([(0,l.MZ)({type:A.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],G.prototype,"popupTemplate",void 0),(0,i._)([(0,l.MZ)({types:x.H,json:{write:{target:"drawingInfo.renderer"}}})],G.prototype,"renderer",void 0),(0,i._)([(0,S.w)("renderer",["drawingInfo.renderer"])],G.prototype,"readRenderer",null),(0,i._)([(0,l.MZ)({types:V.q8})],G.prototype,"symbol",void 0),(0,i._)([(0,S.w)("symbol",["drawingInfo.renderer"])],G.prototype,"readSymbol",null),(0,i._)([(0,F.K)("symbol")],G.prototype,"writeSymbol",null),(0,i._)([(0,l.MZ)({type:[E.A],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],G.prototype,"labelingInfo",void 0),(0,i._)([(0,l.MZ)(j.kF)],G.prototype,"labelsVisible",void 0),(0,i._)([(0,l.MZ)({type:[w],json:{write:!0}})],G.prototype,"fields",void 0),(0,i._)([(0,F.K)("fields")],G.prototype,"writeFields",null),(0,i._)([(0,S.w)("fields")],G.prototype,"readFields",null),G=T=(0,i._)([(0,p.$)("esri.layers.support.FeatureReductionCluster")],G);const $=G;var P=r(67202);const L={key:"type",base:_.c,typeMap:{cluster:$,binning:C}},z={types:{key:"type",base:_.c,typeMap:{selection:P.A,cluster:$,binning:C}},json:{name:"layerDefinition.featureReduction",write:{allowNull:!0},origins:{"web-map":{types:L},"portal-item":{types:L},"web-scene":{types:{key:"type",base:_.c,typeMap:{selection:P.A}},name:"layerDefinition.featureReduction",write:{layerContainerTypes:v.K}}}}};var N=r(496),D=r(12330),k=r(49186),B=r(80200),H=r(30943),J=r(53930);u.A.add("esri-cluster-arcade-enabled",!0);const K=(0,u.A)("esri-cluster-arcade-enabled"),U=new Set(["simple-line","simple-fill","picture-fill"]);function Q(e,t){let r=t.clone();if(!X(r))return r;if(t.getSymbols().some((e=>U.has(e.type)))&&(r=new n.A({symbol:new J.A})),r.authoringInfo||(r.authoringInfo=new H.A),r.authoringInfo.isAutoGenerated=!0,"visualVariables"in r){const t=(r.visualVariables||[]).filter((e=>"$view.scale"!==e.valueExpression));t.forEach((t=>{"rotation"===t.type?t.field?t.field=W(e,t.field,"avg_angle","number"):t.valueExpression&&(t.field=Y(e,t.valueExpression,"avg_angle","number"),t.valueExpression=null):t.normalizationField?(t.field=W(e,t.field,"avg_norm","number",t.normalizationField),t.normalizationField=null):t.field?t.field=W(e,t.field,"avg","number"):t.valueExpression&&(t.field=Y(e,t.valueExpression,"avg","number"),t.valueExpression=null)})),r.visualVariables=t}switch(r.type){case"simple":break;case"pie-chart":for(const t of r.attributes)t.field?t.field=W(e,t.field,"sum","number"):t.valueExpression&&(t.field=Y(e,t.valueExpression,"sum","number"),t.valueExpression=null);break;case"unique-value":r.field?r.field=W(e,r.field,"mode","string"):r.valueExpression&&(r.field=Y(e,r.valueExpression,"mode","string"),r.valueExpression=null);break;case"class-breaks":r.normalizationField?(r.field=W(e,r.field,"avg_norm","number",r.normalizationField),r.normalizationField=null):r.field?r.field=W(e,r.field,"avg","number"):r.valueExpression&&(r.field=Y(e,r.valueExpression,"avg","number"),r.valueExpression=null)}return r}const X=e=>{const t=t=>o.A.getLogger("esri.views.2d.layers.support.clusterUtils").error(new k.A("Unsupported-renderer",t,{renderer:e}));if(!e)return!1;switch(e.type){case"unique-value":if(e.field2||e.field3)return t("FeatureReductionCluster does not support multi-field UniqueValueRenderers"),!1;break;case"class-breaks":if(e.normalizationField){const r=e.normalizationType;if("field"!==r)return t(`FeatureReductionCluster does not support a normalizationType of ${r}`),!1}break;case"simple":case"pie-chart":break;default:return t(`FeatureReductionCluster does not support renderers of type ${e.type}`),!1}if(!K){if("valueExpression"in e&&e.valueExpression)return t("FeatureReductionCluster does not currently support renderer.valueExpression. Support will be added in a future release"),!1;if(("visualVariables"in e&&e.visualVariables||[]).some((e=>!(!("valueExpression"in e)||!e.valueExpression))))return t("FeatureReductionCluster does not currently support visualVariables with a valueExpression. Support will be added in a future release"),!1}return!0};function Y(e,t,r,i){const n=(0,B.d)(t),s="mode"===r?`cluster_type_${n}`:"sum"===r?`cluster_sum_${n}`:`cluster_avg_${n}`;return e.some((e=>e.name===s))||e.push(new w({name:s,isAutoGenerated:!0,onStatisticExpression:new h({expression:t,returnType:i}),statisticType:r})),s}function W(e,t,r,i,n){if("cluster_count"===t||e.some((e=>e.name===t)))return t;const s=function(e,t,r){switch(e){case"sum":return`cluster_sum_${t}`;case"avg":case"avg_angle":return`cluster_avg_${t}`;case"mode":return`cluster_type_${t}`;case"avg_norm":{const e=r,i="field",n=t.toLowerCase()+",norm:"+i+","+e.toLowerCase();return"cluster_avg_"+(0,B.d)(n)}}}(r,t,n);return e.some((e=>e.name===s))||("avg_norm"===r?e.push(new w({name:s,isAutoGenerated:!0,onStatisticExpression:new h({expression:`$feature.${t} / $feature.${n}`,returnType:i}),statisticType:"avg"})):e.push(new w({name:s,isAutoGenerated:!0,onStatisticField:t,statisticType:r}))),s}const ee=e=>{let t=class extends e{constructor(...e){super(...e),this.addHandles((0,a.wB)((()=>this.renderer),(()=>{if(this.featureReduction){const e=this._normalizeFeatureReduction(this.featureReduction);this._set("featureReduction",e)}}),a.OH))}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){}_withClusterVariable(e,t,r){const i=e.clone();return"visualVariables"in i&&(i.visualVariables||(i.visualVariables=[]),i.visualVariables.some((e=>"size"===e.type))||i.visualVariables.push(new N.A({field:"cluster_count",stops:[new D.A({value:1}),new D.A({useMinValue:!0,size:t}),new D.A({useMaxValue:!0,size:r})]}))),i}_normalizeFeatureReduction(e){if("cluster"!==e?.type)return e;const t=e.clone(),r=[new w({name:"cluster_count",isAutoGenerated:!0,statisticType:"count"})],i=(t.fields??[]).filter((e=>!e.isAutoGenerated)),s=e.renderer&&!e.renderer.authoringInfo?.isAutoGenerated,{clusterMinSize:o,clusterMaxSize:a}=t;if(s){t.fields=[...r,...i];const e=this._withClusterVariable(t.renderer,o,a);return t.effectiveFeatureRenderer=e,t.effectiveClusterRenderer=e,t}if(e.symbol){if(t.fields=[...r,...i],t.renderer=null,!this.renderer)return t.effectiveFeatureRenderer=null,t.effectiveClusterRenderer=null,t;const s=Q(r,this.renderer),l=this._withClusterVariable(s,o,a),u="visualVariables"in l&&l.visualVariables?l.visualVariables:[],p=new n.A({symbol:e.symbol,visualVariables:u});return t.fields=[...r,...i],t.effectiveFeatureRenderer=l,t.effectiveClusterRenderer=p,t}if(!this.renderer)return e;const l=Q(r,this.renderer);t.fields=[...r,...i],t.renderer=l;const u=this._withClusterVariable(l,o,a);return t.effectiveFeatureRenderer=u,t.effectiveClusterRenderer=u,t}};return(0,i._)([(0,l.MZ)(z)],t.prototype,"featureReduction",null),t=(0,i._)([(0,p.$)("esri.layers.mixins.FeatureReductionLayer")],t),t}},40530:(e,t,r)=>{r.d(t,{c:()=>a});var i=r(90237),n=r(25482),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends n.oY{constructor(){super(...arguments),this.type=null}};(0,i._)([(0,s.MZ)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,o.$)("esri.layers.support.FeatureReduction")],a)},67202:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(40530);let l=i=class extends a.c{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,n._)([(0,s.MZ)({type:["selection"]})],l.prototype,"type",void 0),l=i=(0,n._)([(0,o.$)("esri.layers.support.FeatureReductionSelection")],l);const u=l},15426:(e,t,r)=>{r.d(t,{Xl:()=>g,ct:()=>A,C$:()=>P,PD:()=>z,VZ:()=>T,mm:()=>M,VA:()=>$,WP:()=>I,iX:()=>w,GA:()=>D,jp:()=>C,tG:()=>N,lV:()=>S,B5:()=>R,Ye:()=>j,sg:()=>F,hM:()=>E,S2:()=>Z,jD:()=>V,Zm:()=>O,$4:()=>q,bt:()=>_,rn:()=>x});var i=r(70333),n=r(61147),s=r(60999),o=r(49186),a=r(66552),l=r(39516),u=r(90360),p=r(61956);async function c(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=d(e));const i=function(e){return d(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),n=e.capabilities.query.supportsPagination;t.start=0,t.num=i;let s=null;for(;;){const o=await e.source.queryFeaturesJSON(t,r);if(null==s?s=o:s.features=s.features.concat(o.features),s.exceededTransferLimit=o.exceededTransferLimit,!n||!o.exceededTransferLimit)break;t.start+=i}return s}function d(e){return e.capabilities.query.supportsMaxRecordCountFactor?p.A.MAX_MAX_RECORD_COUNT_FACTOR:1}var f=r(83531),y=r(96576),h=r(93618),m=r(54546),b=r(26591);const w=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function g(e,t,r,i){const n=await G(e);if(await v(e,t,i),!n.addAttachment)throw new o.A(i,"Layer source does not support addAttachment capability");return n.addAttachment(t,r)}function v(e,t,r){const{attributes:i}=t,{objectIdField:n}=e;return e.capabilities?.data?.supportsAttachment?t?i?n&&i[n]?Promise.resolve():Promise.reject(new o.A(r,`feature is missing the identifying attribute ${n}`)):Promise.reject(new o.A(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.A(r,"A feature is required to add/delete/update attachments")):Promise.reject(new o.A(r,"this layer doesn't support attachments"))}async function _(e,t,r,i,n){const s=await G(e);if(await v(e,t,n),!s.updateAttachment)throw new o.A(n,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,r,i)}async function A(e,t,i){const{applyEdits:n}=await r.e(8628).then(r.bind(r,78628)),s=await e.load(),{source:o,globalIdField:a}=s;let l=i;return("feature"===s.type?s.infoFor3D:null)&&null!=t.deleteFeatures&&null!=a&&(l={...l,globalIdToObjectId:await D(e,t.deleteFeatures,a)}),n(s,o,t,i)}async function x(e,t,i){const{uploadAssets:n}=await r.e(8628).then(r.bind(r,78628)),s=await e.load();return n(s,s.source,t,i)}async function M(e,t,r,i){const n=await G(e);if(await v(e,t,i),!n.deleteAttachments)throw new o.A(i,"Layer source does not support deleteAttachments capability");return n.deleteAttachments(t,r)}async function I(e,t,r){const i=(await e.load({signal:t?.signal})).source;if(!i.fetchRecomputedExtents)throw new o.A(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function S(e,t,r,i){t=m.A.from(t),await e.load();const n=e.source,s=e.capabilities;if(!s?.data?.supportsAttachment)throw new o.A(i,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:u,num:p,size:c,start:d,where:f}=t;if(!s?.operations?.supportsQueryAttachments&&(a?.length>0||u?.length>0||c?.length>0||p||d||f))throw new o.A(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||u?.length||f))throw new o.A(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!n.queryAttachments)throw new o.A(i,"Layer source does not support queryAttachments capability",t);return n.queryAttachments(t)}async function F(e,t,r,i){const n=await G(e);if(!n.queryObjectIds)throw new o.A(i,"Layer source does not support queryObjectIds capability");return n.queryObjectIds(p.A.from(t)??e.createQuery(),r)}async function j(e,t,r,i){const n=await G(e);if(!n.queryFeatureCount)throw new o.A(i,"Layer source does not support queryFeatureCount capability");return n.queryFeatureCount(p.A.from(t)??e.createQuery(),r)}async function R(e,t,r,i){const n=await G(e);if(!n.queryExtent)throw new o.A(i,"Layer source does not support queryExtent capability");return n.queryExtent(p.A.from(t)??e.createQuery(),r)}async function E(e,t,r,i){const n=await G(e);if(!n.queryRelatedFeatures)throw new o.A(i,"Layer source does not support queryRelatedFeatures capability");return n.queryRelatedFeatures(b.default.from(t),r)}async function Z(e,t,r,i){const n=await G(e);if(!n.queryRelatedFeaturesCount)throw new o.A(i,"Layer source does not support queryRelatedFeaturesCount capability");return n.queryRelatedFeaturesCount(b.default.from(t),r)}async function C(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:i}=await t.refresh();if(null!=i&&(e.sourceJSON={...e.sourceJSON,...i},e.read(i,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.G)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function T(e){const t=new p.A,r=e.capabilities?.data,i=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,i&&(t.compactGeometryEnabled=i.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=i.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:n,timeExtent:s}=e;return t.timeExtent=null!=n&&null!=s?s.offset(-n.value,n.unit):s||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function V(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function O(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function q(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function G(e){return(await e.load()).source}async function $(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!i.id)return;if(i.id.findCredential(e))return;let r;try{const n=await(0,f.wI)(e,t);n&&(r=await i.id.checkSignInStatus(`${n}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await i.id.getCredential(e,{signal:r})}catch(e){}}(n,r)}function P(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const L=(0,u.C)({types:n.xK});function z(e,t){if(e.defaultSymbol)return e.types?.length?new h.A({defaultSymbol:L(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:L(e.symbol,e,t)})))}):new y.A({symbol:L(e.defaultSymbol,e,t)})}function N(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function D(e,t,r){if(null==t)return null;const i=[],{objectIdField:n}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:i}=e;t={globalId:i[r],objectId:null!=i[n]&&-1!==i[n]?i[n]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||i.push(t.globalId))})),0===i.length)return null;const o=e.createQuery();o.where=i.map((e=>`${r}='${e}'`)).join(" OR "),o.returnGeometry=!1,o.outFields=[n,r],o.cacheHint=!1;const a=await(0,s.DZ)(c(e,o));if(!a.ok)return null;const l=new Map,u=a.value.features;for(const e of u){const t=e.attributes[r],i=e.attributes[n];null!=t&&null!=i&&-1!==i&&l.set(t,i)}return l}},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),n=r(53966),s=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},26591:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var i,n=r(90237),s=(r(59456),r(25482)),o=r(4718),a=r(10107),l=r(56507),u=r(40608),p=r(43937),c=r(27733),d=r(16930);let f=i=class extends s.oY{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.o8)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"cacheHint",void 0),(0,n._)([(0,a.MZ)({type:c.L,json:{write:!0}})],f.prototype,"dynamicDataSource",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"gdbVersion",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],f.prototype,"geometryPrecision",void 0),(0,n._)([(0,a.MZ)({type:Date})],f.prototype,"historicMoment",void 0),(0,n._)([(0,p.K)("historicMoment")],f.prototype,"_writeHistoricMoment",null),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],f.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,a.MZ)({type:[Number],json:{write:!0}})],f.prototype,"objectIds",void 0),(0,n._)([(0,a.MZ)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),(0,n._)([(0,a.MZ)({type:[String],json:{write:!0}})],f.prototype,"outFields",void 0),(0,n._)([(0,a.MZ)({type:d.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],f.prototype,"outSpatialReference",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],f.prototype,"relationshipId",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],f.prototype,"start",void 0),(0,n._)([(0,p.K)("start"),(0,p.K)("num")],f.prototype,"writeStart",null),(0,n._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],f.prototype,"num",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],f.prototype,"returnGeometry",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],f.prototype,"returnM",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],f.prototype,"returnZ",void 0),(0,n._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],f.prototype,"where",void 0),f=i=(0,n._)([(0,u.$)("esri.rest.support.RelationshipQuery")],f),f.from=(0,l.dp)(f);const y=f}}]);