var e=new Map,t=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=new Map,s=new Map;function c(t,n){let r=L(t,n),i=e.get(r);return i==null?null:(e.delete(r),i)}function l(t,n){return e.get(L(t,n))??null}function u(e,n){let r=L(e,n),i=t.get(r);return i==null?null:(t.delete(r),i)}function d(e,n){return t.get(L(e,n))??null}function f(t,n){R(e,t,n)}function p(e,n){R(t,e,n)}function m(t,n,r){e.set(L(t,n),r)}function h(e,n,r){t.set(L(e,n),r)}function g(e,t){return n.get(L(e,t))??null}function _(e,t){R(n,e,t)}function v(e,t,r){n.set(L(e,t),r)}function y(e,t){return r.get(L(e,t))??null}function b(e,t){return i.get(L(e,t))??null}function x(e,t){R(r,e,t)}function S(e,t){R(i,e,t)}function C(e,t,n){r.set(L(e,t),n)}function w(e,t,n){i.set(L(e,t),n)}function T(e,t,{adoptionLease:n,adoptedWebContentsId:r,initialUrl:i,initiator:a,source:o}){if(o!=null&&m(e,t,o),a!=null&&h(e,t,a),i==null?_(e,t):v(e,t,i),n!=null&&r!=null){C(e,t,n),w(e,t,r);return}x(e,t),S(e,t)}function E(e){let t=a.get(e)??[];return a.delete(e),t}function D(e){a.delete(e)}function O(e){return a.get(e)?.map(e=>e.browserTabId)??[]}function k(e){let t=o.get(e)??new Set;return o.delete(e),[...t]}function A(e,t){N(e,t),M(e,t);let n=o.get(e);if(n==null){o.set(e,new Set([t]));return}n.add(t)}function j(e,t){if(N(e,t),t==null){D(e),o.delete(e);return}o.get(e)?.delete(t),M(e,t)}function M(e,t){let n=a.get(e);if(n==null)return;let r=n.filter(e=>e.browserTabId!==t);if(r.length===0){a.delete(e);return}a.set(e,r)}function N(e,t){p(e,t),f(e,t),_(e,t),x(e,t),S(e,t)}function P(e,t){o.get(e)?.delete(t.browserTabId);let n=a.get(e);if(n==null){a.set(e,[t]);return}let r=n.findIndex(e=>e.browserTabId===t.browserTabId);if(r===-1){n.push(t);return}n[r]=t}function F(e,t){let n=s.get(e);if(n==null){s.set(e,new Set([t]));return}n.add(t)}function I(e){let t=s.get(e);return t==null?[]:(s.delete(e),[...t])}function L(e,t){return`${e}\0${t}`}function R(e,t,n){if(n!=null){e.delete(L(t,n));return}let r=`${t}\0`;for(let t of e.keys())t.startsWith(r)&&e.delete(t)}export{T as _,I as a,k as c,d,l as f,F as g,y as h,x as i,E as l,O as m,j as n,u as o,g as p,_ as r,c as s,S as t,b as u,A as v,P as y};
//# sourceMappingURL=browser-sidebar-open-source-_kvO2A9r.js.map