1import{B as n,C as l,F as S,V as $,fz as U,g1 as _,v as x,g2 as H,c as I,d8 as g}from"./index-CYBe2UDx.js";import{S as O,y as T}from"./LayerView-C-cXnjQS.js";import"./Container-77zCscnR.js";import"./layerViewUtils-CQtevIz1.js";const u=Symbol(),A=p=>{let r=class extends p{constructor(){super(...arguments),this.layerViews=new $,this._debouncedUpdate=U(async()=>{const{layer:e,parent:t}=this,s=t==null?void 0:t.footprintLayerView;let i=[];const d=this._createQuery();if(d&&s){const{features:h}=await s.queryFeatures(d);this.suspended||(i=h.map(c=>e.acquireLayer(c)))}this.removeHandles(u),this.addHandles(i,u)})}get creatingLayerViews(){var e;return((e=this.view)==null?void 0:e.layerViewManager.isCreatingLayerViewsForLayer(this.layer))??!1}isUpdating(){return this.creatingLayerViews||this.layer.updating||this.layerViews.some(e=>e.updating)}enableLayerUpdates(){return _([this._updatingHandles.addWhen(()=>{var e,t;return((t=(e=this.parent)==null?void 0:e.footprintLayerView)==null?void 0:t.dataUpdating)===!1},()=>this.updateLayers()),this._updatingHandles.add(()=>{var e,t,s,i,d;return[this.layer.maximumVisibleSublayers,(e=this.layer.parent)==null?void 0:e.orderBy,
1(s=(t=this.parent)==null?void 0:t.footprintLayerView)==null?void 0:s.filter,(d=(i=this.parent)==null?void 0:i.footprintLayerView)==null?void 0:d.timeExtent,this.suspended]},()=>this.updateLayers()),x(()=>this.removeHandles(u))])}updateLayers(){this.suspended?this.removeHandles(u):this._updatingHandles.addPromise(H(this._debouncedUpdate()).catch(e=>{I.getLogger(this).error(e)}))}_createQuery(){var V,v;const e=(V=this.parent)==null?void 0:V.footprintLayerView,t=(v=this.layer)==null?void 0:v.parent;if(!e||!t||t.destroyed)return null;const{layer:{maximumVisibleSublayers:s},view:{scale:i}}=this;if(!s)return null;const{itemTypeField:d,itemSourceField:h,itemNameField:c,minScaleField:m,maxScaleField:L,objectIdField:C,orderBy:w}=t,F=g(`${m} IS NULL OR ${i} <= ${m} OR ${m} = 0`,`${L} IS NULL OR ${i} >= ${L}`),o=w==null?void 0:w.find(y=>y.field&&!y.valueExpression),a=e.createQuery();if(a.returnGeometry=!1,a.num=s,a.outFields=[C,h,c],a.where=g(a.where,F),this.unsupportedItemTypes!=null){const y=`${d} NOT IN (${this.unsupportedItemTypes.map(b=>`'${b}'`)})`;a.where=g(a.where,y)}return o!=null&&o.field&&(a.orderByFields=[`${o.field} ${o.order==="descending"?"DESC":"ASC"}`],a.outFields.push(o.field)),a}};return n([l({readOnly:!0})],r.prototype,"creatingLayerViews",null),n([l()],r.prototype,"layer",void 0),n([l()],r.prototype,"layerViews",void 0),n([l({readOnly:!0})],r.prototype,"unsupportedItemTypes",void 0),n([l()],r.prototype,"parent",void 0),n([l({readOnly:!0})],r.prototype,"isUpdating",null),r=n([S("esri.views.layers.CatalogDynamicGroupLayerView")],r),r};let f=class extends A(O(T)){constructor(){super(...arguments),this.unsupportedItemTypes=["Scene Service"],this.layerViews=new $}attach(){this.addAttachHandles([this.layerViews.on("after-changes",()=>this._updateStageChildren()),this.enableLayerUpdates()])}detach(){this.container.removeAllChildren()}update(p){this.updateLayers()}viewChange(){}moveEnd(){this.requestUpdate()}_updateStageChildren(){this.container.removeAllChildren(),this.layerViews.forEach((p,r)=>this.container.addChildAt(p.container,r))}};f=n([S("esri.views.2d.layers.CatalogDynamicGroupLayerView2D")],f);const q=f;export{q as default};
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.