import{_ as o,a0 as n,R as p,S as y,a as m,cR as u}from"./index.6c049565.js";import d from"./FeatureLayerView2D.bab9ad1d.js";import"./utils.eb2c3fd5.js";import"./Utils.e8554a0e.js";import"./enums.0295eb81.js";import"./enums.2d9e6f64.js";import"./Texture.8e8dfb11.js";import"./VertexElementDescriptor.1fdca6da.js";import"./MaterialKey.bbaab8f1.js";import"./LayerView.7c2db9bf.js";import"./schemaUtils.7eee5b9f.js";import"./visualVariablesUtils.88ca310b.js";import"./createSymbolSchema.30665f63.js";import"./ExpandedCIM.64535143.js";import"./BidiEngine.d8bba3fc.js";import"./Rect.95b0fd2e.js";import"./quantizationUtils.4f3ed95a.js";import"./GeometryUtils.4f19e772.js";import"./floatRGBA.c5518572.js";import"./util.d5f4af7b.js";import"./popupUtils.33b7306b.js";import"./RefreshableLayerView.5868f703.js";function h(e,r){return!e.visible||e.minScale!==0&&r>e.minScale||e.maxScale!==0&&r{var e;return(e=this.view)==null?void 0:e.viewpoint},()=>this._update(),y)])}_injectOverrides(e){let r=super._injectOverrides(e);const s=this.view.scale,t=this.layer.sublayers.filter(a=>h(a,s)).map(a=>a.subtypeCode);if(!t.length)return r;r=m(r)?r:new u().toJSON();const i=`NOT ${this.layer.subtypeField} IN (${t.join(",")})`;return r.where=r.where?`(${r.where}) AND (${i})`:i,r}_setLayersForFeature(e){const r=this.layer.fieldsIndex.get(this.layer.subtypeField),s=e.attributes[r.name],t=this.layer.sublayers.find(i=>i.subtypeCode===s);e.layer=t,e.sourceLayer=this.layer}_createSchemaConfig(){const e={subtypeField:this.layer.subtypeField,sublayers:Array.from(this.layer.sublayers).map(i=>({featureReduction:null,geometryType:this.layer.geometryType,labelingInfo:i.labelingInfo,labelsVisible:i.labelsVisible,renderer:i.renderer,subtypeCode:i.subtypeCode,orderBy:null}))},r=this.layer.sublayers.map(i=>i.subtypeCode).join(","),s=this.layer.sublayers.length?`${this.layer.subtypeField} IN (${r})`:"1=2";let t=this.layer.definitionExpression?this.layer.definitionExpression+" AND ":"";return t+=s,{...super._createSchemaConfig(),...e,definitionExpression:t}}};l=o([n("esri.views.2d.layers.SubtypeGroupLayerView2D")],l);const V=l;export{V as default};