chunk-6334AFGG.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import {
  2. x
  3. } from "./chunk-YXWMMD76.js";
  4. // node_modules/@arcgis/core/core/Queue.js
  5. var e = class {
  6. constructor(t = (t2) => t2.values().next().value) {
  7. this._peeker = t, this._items = /* @__PURE__ */ new Set();
  8. }
  9. get length() {
  10. return this._items.size;
  11. }
  12. clear() {
  13. this._items.clear();
  14. }
  15. last() {
  16. if (0 === this._items.size)
  17. return;
  18. let t;
  19. for (t of this._items)
  20. ;
  21. return t;
  22. }
  23. peek() {
  24. if (0 !== this._items.size)
  25. return this._peeker(this._items);
  26. }
  27. push(t) {
  28. this.contains(t) || this._items.add(t);
  29. }
  30. contains(t) {
  31. return this._items.has(t);
  32. }
  33. pop() {
  34. if (0 === this.length)
  35. return;
  36. const e2 = this.peek();
  37. return this._items.delete(x(e2)), e2;
  38. }
  39. popLast() {
  40. if (0 === this.length)
  41. return;
  42. const e2 = this.last();
  43. return this._items.delete(x(e2)), e2;
  44. }
  45. remove(t) {
  46. this._items.delete(t);
  47. }
  48. filter(t) {
  49. return this._items.forEach((e2) => {
  50. t(e2) || this._items.delete(e2);
  51. }), this;
  52. }
  53. };
  54. export {
  55. e
  56. };
  57. //# sourceMappingURL=chunk-6334AFGG.js.map