1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- import {
- q
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/core/Queue.js
- var e = class {
- constructor(t = (t2) => t2.values().next().value) {
- this._peeker = t, this._items = new Set();
- }
- get length() {
- return this._items.size;
- }
- clear() {
- this._items.clear();
- }
- last() {
- if (this._items.size === 0)
- return;
- let t;
- for (t of this._items)
- ;
- return t;
- }
- peek() {
- if (this._items.size !== 0)
- return this._peeker(this._items);
- }
- push(t) {
- this.contains(t) || this._items.add(t);
- }
- contains(t) {
- return this._items.has(t);
- }
- pop() {
- if (this.length === 0)
- return;
- const e2 = this.peek();
- return this._items.delete(q(e2)), e2;
- }
- popLast() {
- if (this.length === 0)
- return;
- const e2 = this.last();
- return this._items.delete(q(e2)), e2;
- }
- remove(t) {
- this._items.delete(t);
- }
- filter(t) {
- return this._items.forEach((e2) => {
- t(e2) || this._items.delete(e2);
- }), this;
- }
- };
- export {
- e
- };
- //# sourceMappingURL=chunk-3OHML7FO.js.map
|