{"version":3,"sources":["node_modules/@arcgis/core/core/MemCache.js","node_modules/@arcgis/core/core/LRUCache.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport t from \"./PooledArray.js\";\nconst e = -3,\n s = e - 1;\nvar i;\n!function (t) {\n t[t.ALL = 0] = \"ALL\", t[t.SOME = 1] = \"SOME\";\n}(i || (i = {}));\nclass r {\n constructor(t, e, s) {\n this.name = t, this._storage = e, this.id = o++ + \":\", this.size = 0, this.maxSize = -1, this._removeFunc = !1, this._hit = 0, this._miss = 0, this._storage.register(this), s && (this._storage.registerRemoveFunc(this.id, s), this._removeFunc = !0);\n }\n destroy() {\n this._storage.clear(this), this._removeFunc && this._storage.deregisterRemoveFunc(this.id), this._storage.deregister(this), this._storage = null;\n }\n get hitRate() {\n return this._hit / (this._hit + this._miss);\n }\n get storageSize() {\n return this._storage.size;\n }\n getSize(t) {\n return this._storage.getSize(this, t);\n }\n resetHitRate() {\n this._hit = this._miss = 0;\n }\n put(t, e, s, i = 0) {\n this._storage.put(this, t, e, s, i);\n }\n pop(t) {\n const e = this._storage.pop(this, t);\n return void 0 === e ? ++this._miss : ++this._hit, e;\n }\n get(t) {\n const e = this._storage.get(this, t);\n return void 0 === e ? ++this._miss : ++this._hit, e;\n }\n peek(t) {\n return this._storage.peek(this, t);\n }\n updateSize(t, e, s) {\n this._storage.updateSize(this, t, e, s);\n }\n clear() {\n this._storage.clear(this);\n }\n clearAll() {\n this._storage.clearAll();\n }\n get performanceInfo() {\n return this._storage.performanceInfo;\n }\n resetStats() {\n this._storage.resetStats();\n }\n}\nclass h {\n get size() {\n return this._size;\n }\n constructor(e = 10485760) {\n this._maxSize = e, this._db = new Map(), this._size = 0, this._hit = 0, this._miss = 0, this._removeFuncs = new t(), this._users = new t();\n }\n destroy() {\n this.clearAll(), this._removeFuncs.clear(), this._users.clear(), this._db = null;\n }\n register(t) {\n this._users.push(t);\n }\n deregister(t) {\n this._users.removeUnordered(t);\n }\n registerRemoveFunc(t, e) {\n this._removeFuncs.push([t, e]);\n }\n deregisterRemoveFunc(t) {\n this._removeFuncs.filterInPlace(e => e[0] !== t);\n }\n get maxSize() {\n return this._maxSize;\n }\n set maxSize(t) {\n this._maxSize = Math.max(t, -1), this._checkSize();\n }\n getSize(t, e) {\n const s = this._db.get(t.id + e);\n return s?.size ?? 0;\n }\n put(t, r, h, o, _) {\n r = t.id + r;\n const a = this._db.get(r);\n if (a && (this._size -= a.size, t.size -= a.size, this._db.delete(r), a.entry !== h && this._notifyRemove(r, a.entry, a.size, i.ALL)), o > this._maxSize) return void this._notifyRemove(r, h, o, i.ALL);\n if (void 0 === h) return void console.warn(\"Refusing to cache undefined entry \");\n if (!o || o < 0) return console.warn(`Refusing to cache entry with size ${o} for key ${r}`), void this._notifyRemove(r, h, 0, i.ALL);\n const c = 1 + Math.max(_, s) - e;\n this._db.set(r, new n(h, o, c)), this._size += o, t.size += o, this._checkSize();\n }\n updateSize(t, e, s, r) {\n e = t.id + e;\n const h = this._db.get(e);\n if (h && h.entry === s) {\n for (this._size -= h.size, t.size -= h.size; r > this._maxSize;) {\n const t = this._notifyRemove(e, s, r, i.SOME);\n if (!(null != t && t > 0)) return void this._db.delete(e);\n r = t;\n }\n h.size = r, this._size += r, t.size += r, this._checkSize();\n }\n }\n pop(t, e) {\n e = t.id + e;\n const s = this._db.get(e);\n if (s) return this._size -= s.size, t.size -= s.size, this._db.delete(e), ++this._hit, s.entry;\n ++this._miss;\n }\n get(t, e) {\n e = t.id + e;\n const s = this._db.get(e);\n if (void 0 !== s) return this._db.delete(e), s.lives = s.lifetime, this._db.set(e, s), ++this._hit, s.entry;\n ++this._miss;\n }\n peek(t, e) {\n const s = this._db.get(t.id + e);\n return s ? ++this._hit : ++this._miss, s?.entry;\n }\n get performanceInfo() {\n const t = {\n Size: Math.round(this._size / 1048576) + \"/\" + Math.round(this._maxSize / 1048576) + \"MB\",\n \"Hit rate\": Math.round(100 * this._getHitRate()) + \"%\",\n Entries: this._db.size.toString()\n },\n s = {},\n i = new Array();\n this._db.forEach((t, e) => {\n const r = t.lifetime;\n i[r] = (i[r] || 0) + t.size, this._users.forAll(i => {\n const {\n id: r,\n name: h\n } = i;\n if (e.startsWith(r)) {\n const e = s[h] || 0;\n s[h] = e + t.size;\n }\n });\n });\n const r = {};\n this._users.forAll(t => {\n const e = t.name;\n if (\"hitRate\" in t && \"number\" == typeof t.hitRate && !isNaN(t.hitRate) && t.hitRate > 0) {\n const i = s[e] || 0;\n s[e] = i, r[e] = Math.round(100 * t.hitRate) + \"%\";\n } else r[e] = \"0%\";\n });\n const h = Object.keys(s);\n h.sort((t, e) => s[e] - s[t]), h.forEach(e => t[e] = Math.round(s[e] / 2 ** 20) + \"MB / \" + r[e]);\n for (let o = i.length - 1; o >= 0; --o) {\n const s = i[o];\n s && (t[\"Priority \" + (o + e - 1)] = Math.round(s / this._size * 100) + \"%\");\n }\n return t;\n }\n resetStats() {\n this._hit = this._miss = 0, this._users.forAll(t => t.resetHitRate());\n }\n clear(t) {\n const e = t.id;\n this._db.forEach((t, s) => {\n s.startsWith(e) && (this._size -= t.size, this._db.delete(s), this._notifyRemove(s, t.entry, t.size, i.ALL));\n }), t.size = 0;\n }\n clearAll() {\n this._db.forEach((t, e) => this._notifyRemove(e, t.entry, t.size, i.ALL)), this._users.forAll(t => t.size = 0), this._size = 0, this._db.clear();\n }\n _getHitRate() {\n return this._hit / (this._hit + this._miss);\n }\n _notifyRemove(t, e, s, i) {\n let r;\n return this._removeFuncs.some(h => {\n if (t.startsWith(h[0])) {\n const t = h[1](e, i, s);\n return \"number\" == typeof t && (r = t), !0;\n }\n return !1;\n }), r;\n }\n _checkSize() {\n this._users.forAll(t => this._checkSizeLimits(t)), this._checkSizeLimits();\n }\n _checkSizeLimits(t) {\n const e = t ?? this;\n if (e.maxSize < 0 || e.size <= e.maxSize) return;\n const s = t?.id;\n let i = !0;\n for (; i;) {\n i = !1;\n for (const [r, h] of this._db) if (0 === h.lifetime && (!s || r.startsWith(s))) {\n if (this._purgeItem(r, h, t), e.size <= .9 * e.maxSize) return;\n i ||= this._db.has(r);\n }\n }\n for (const [r, h] of this._db) if ((!s || r.startsWith(s)) && (this._purgeItem(r, h, t), e.size <= .9 * e.maxSize)) return;\n }\n _purgeItem(t, e, s = this._users.find(e => t.startsWith(e.id))) {\n if (this._db.delete(t), e.lives <= 1) {\n this._size -= e.size, s && (s.size -= e.size);\n const r = this._notifyRemove(t, e.entry, e.size, i.SOME);\n null != r && r > 0 && (this._size += r, s && (s.size += r), e.lives = e.lifetime, e.size = r, this._db.set(t, e));\n } else --e.lives, this._db.set(t, e);\n }\n}\nlet o = 0;\nclass n {\n constructor(t, e, s) {\n this.entry = t, this.size = e, this.lifetime = s, this.lives = s;\n }\n}\nexport { r as MemCache, h as MemCacheStorage, e as MinPriority, s as NoPriority, i as RemoveMode };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { MemCacheStorage as t } from \"./MemCache.js\";\nclass e {\n constructor(e, s) {\n this._storage = new t(), this.id = \"\", this.name = \"\", this.size = 0, this._storage.maxSize = e, this._storage.register(this), s && this._storage.registerRemoveFunc(\"\", s);\n }\n destroy() {\n this._storage.deregister(this), this._storage.destroy();\n }\n put(t, e, s = 1) {\n this._storage.put(this, t, e, s, 1);\n }\n pop(t) {\n return this._storage.pop(this, t);\n }\n get(t) {\n return this._storage.get(this, t);\n }\n clear() {\n this._storage.clearAll();\n }\n get maxSize() {\n return this._storage.maxSize;\n }\n set maxSize(t) {\n this._storage.maxSize = t;\n }\n resetHitRate() {}\n}\nexport { e as LRUCache };"],"mappings":"wCAKA,IAAMA,EAAI,GACRC,EAAID,EAAI,EACNE,GACH,SAAUC,EAAG,CACZA,EAAEA,EAAE,IAAM,CAAC,EAAI,MAAOA,EAAEA,EAAE,KAAO,CAAC,EAAI,MACxC,GA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