// node_modules/@arcgis/core/core/ObjectPool.js function t(t3) { return t3 && t3.release && "function" == typeof t3.release; } function i(t3) { return t3 && t3.acquire && "function" == typeof t3.acquire; } var e = class { constructor(t3, i2, e2, o2 = 1, s = 0) { if (this._ctor = t3, this._acquireFunction = i2, this._releaseFunction = e2, this.allocationSize = o2, this._pool = new Array(s), this._initialSize = s, this._ctor) for (let n = 0; n < s; n++) this._pool[n] = new this._ctor(); this.allocationSize = Math.max(o2, 1); } destroy() { this.prune(0); } acquire(...t3) { let o2; if (e.test.disabled) o2 = new this._ctor(); else { if (0 === this._pool.length) { const t4 = this.allocationSize; for (let i2 = 0; i2 < t4; i2++) this._pool[i2] = new this._ctor(); } o2 = this._pool.pop(); } return this._acquireFunction ? this._acquireFunction(o2, ...t3) : i(o2) && o2.acquire(...t3), o2; } release(i2) { i2 && !e.test.disabled && (this._releaseFunction ? this._releaseFunction(i2) : t(i2) && i2.release(), this._pool.push(i2)); } prune(t3 = this._initialSize) { if (!(t3 >= this._pool.length)) { for (let i2 = t3; i2 < this._pool.length; ++i2) { const t4 = this._pool[i2]; this._dispose(t4); } this._pool.length = t3; } } _dispose(t3) { t3.dispose && "function" == typeof t3.dispose && t3.dispose(); } }; e.test = { disabled: false }; // node_modules/@arcgis/core/core/ArrayPool.js function r(e2) { e2.length = 0; } var t2 = class { constructor(t3 = 50, o2 = 50) { this._pool = new e(Array, void 0, r, o2, t3); } acquire() { return this._pool.acquire(); } release(e2) { this._pool.release(e2); } prune() { this._pool.prune(0); } static acquire() { return o.acquire(); } static release(e2) { return o.release(e2); } static prune() { o.prune(); } }; var o = new t2(100); export { e, t2 as t }; //# sourceMappingURL=chunk-U2XHEJM7.js.map