1import{ec as m,cF as c,fo as y,cc as S,ew as R,ft as l,fs as g,bd as p,ff as d}from"./index-CyVzZKgG.js";import{i as x}from"./AttributeBinsFeatureSet-m2tyh39v.js";import J from"./AttributeBinsQuery-t8TU14Za.js";import"./queryUtils-BIR2uwrr.js";import"./FixedIntervalBinParameters--Fojn42v.js";function N(i){const e=i.geometry,n=i.toJSON(),t=n;let r,a,o;if(e!=null&&(a=e.spatialReference,o=l(a),t.geometryType=g(e),t.geometry=JSON.stringify(e),t.inSR=o),n.outSR?(t.outSR=l(n.outSR),r=i.outSpatialReference):e&&(t.outSR=t.inSR,r=a),t.bin&&(t.bin=JSON.stringify(t.bin)),t.quantizationParameters&&(t.quantizationParameters=JSON.stringify(t.quantizationParameters)),t.outStatistics&&(t.outStatistics=JSON.stringify(t.outStatistics)),t.outTimeReference&&(t.outTimeReference=JSON.stringify(t.outTimeReference)),n.timeExtent){const u=n.timeExtent,{start:s,end:f}=u;s==null&&f==null||(t.time=s===f?s:`${s??"null"},${f??"null"}`),delete n.timeExtent}return i.defaultSpatialReference&&p(a,r)&&(t.defaultSR=t.inSR,delete t.inSR,delete t.outSR),t}async function O(i,e,n){return e.timeExtent!=null&&e.timeExtent.isEmpty?{data:{features:[]}}
1:await q(i,e,n)}async function q(i,e,n={}){const t=typeof i=="string"?m(i):i,r=e.geometry?[e.geometry]:[],a=await c(r,null,{signal:n.signal}),o=a==null?void 0:a[0];o!=null&&((e=e.clone()).geometry=o);const u=y({...t.query,f:"json",...N(e)});return S(R(t.path,"queryBins"),{...n,query:{...u,...n.query}})}async function P(i,e,n){const{data:t}=await O(d(i),J.from(e),n);return x.fromJSON(t)}export{P as executeAttributeBinsQuery};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.