import{__decorate as t}from"tslib";import{EntityBase as e}from"../Entity.js";import{ItemType as r}from"../ItemType.js";import{serializable as s}from"../support/Serializable.js";import{from as i,toArray as a}from"../utilities/asyncIterable.js";import{FeatureSet as o}from"./FeatureSet.js";let l=class extends e{title;_itemType=r.FEATURE_STREAM;_features;constructor(t){var e;if(super(!(e=t)||e[Symbol.iterator]||e[Symbol.asyncIterator]?void 0:e),t)if(t[Symbol.asyncIterator])this._features=t;else if(t[Symbol.iterator])this._features=i(t);else{const{features:e}=t;e?.[Symbol.asyncIterator]?this._features=e:e?.[Symbol.iterator]&&(this._features=i(e))}this._features=this._features||i([])}[Symbol.asyncIterator](){return this._features[Symbol.asyncIterator]()}toArray(){return a(this)}async toFeatureSet(){return new o({title:this.title,features:await a(this)})}_getSerializableProperties(){return{...super._getSerializableProperties(),title:"initial"}}};l=t([s],l);export{l as FeatureStream};