text: "use strict";(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[3373,1057,2440],{7049:(t,e,s)=>{s.d(e,{Z$:()=>n,s7:()=>a,Dp:()=>r,$m:()=>d});const n=t=>t[t.length-1];const o=()=>[];const c=t=>t.slice();const a=(t,e)=>{for(let s=0;s<e.length;s++){t.push(e[s])}};const r=Array.from;const l=(t,e)=>t.every(e);const i=(t,e)=>t.some(e);const d=(t,e)=>t.length===e.length&&l(t,((t,s)=>t===e[s]));const h=t=>t.reduce(((t,e)=>t.concat(e)),[])},97027:(t,e,s)=>{s.d(e,{PP:()=>c,UV:()=>d,Hi:()=>h});var n=s(7049);var o=s(59735);const c=(t,e,s=0)=>{try{for(;s<t.length;s++){t[s](...e)}}finally{if(s<t.length){c(t,e,s+1)}}};const a=()=>{};const r=t=>t();const l=t=>t;const i=(t,e)=>t===e;const d=(t,e)=>t===e||t!=null&&e!=null&&t.constructor===e.constructor&&(t instanceof Array&&n.$m(t,e)||typeof t==="object"&&o.$m(t,e));const h=(t,e)=>{if(t==null||e==null){return i(t,e)}if(t.constructor!==e.constructor){return false}if(t===e){return true}switch(t.constructor){case ArrayBuffer:t=new Uint8Array(t);e=new Uint8Array(e);case Uint8Array:{if(t.byteLength!==e.byteLength){return false}for(let s=0;s<t.length;s++){if(t[s]!==e[s]){return false}}break}case Set:{if(t.size!==e.size){return false}for(const s of t){if(!e.has(s)){return false}}break}case Map:{if(t.size!==e.size){return false}for(const s of t.keys()){if(!e.has(s)||!h(t.get(s),e.get(s))){return false}}break}case Object:if(o.kE(t)!==o.kE(e)){return false}for(const s in t){if(!o.l$(t,s)||!h(t[s],e[s])){return false}}break;case Array:if(t.length!==e.length){return false}for(let s=0;s<t.length;s++){if(!h(t[s],e[s])){return false}}break;default:return false}return true}},14247:(t,e,s)=>{s.d(e,{GW:()=>n,Wn:()=>c,mv:()=>l,IH:()=>u,VV:()=>f,Fp:()=>g,GR:()=>v});const n=Math.floor;const o=Math.ceil;const c=Math.abs;const a=Math.imul;const r=Math.round;const l=Math.log10;const i=Math.log2;const d=Math.log;const h=Math.sqrt;const u=(t,e)=>t+e;const f=(t,e)=>t<e?t:e;const g=(t,e)=>t>e?t:e;const p=Number.isNaN;const m=Math.pow;const y=t=>Math.pow(10,t);const k=Math.sign;const v=t=>t!==0?t<0:1/t<0},59735:(t,e,s)=>{s.d(e,{UI:()=>r,kE:()=>l,l$:()=>h,$m:()=>u});const n=()=>Object.create(null);const o=Object.assign;const c=Object.keys;const a=(t,e)=>{for(const s in t){e(t[s],s)}};const r=(t,e)=>{const s=[];for(const n in t){s.push(e(t[n],n))}return s};const l=t=>c(t).length;const i=(t,e)=>{for(const s in t){if(e(t[s],s)){return true}}return false};const d=(t,e)=>{for(const s in t){if(!e(t[s],s)){return false}}return true};const h=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const u=(t,e)=>t===e||l(t)===l(e)&&d(t,((t,s)=>(t!==undefined||h(e,s))&&e[s]===t))},1057:(t,e,s)=>{s.d(e,{GL:()=>u,Ag:()=>f,xq:()=>g,oy:()=>m});var n=s(19038);var o=s(64485);var c=s(20817);var a=s(14247);var r=s(58290);var l=s(97027);var i=s(67925);var d=s.n(i);const h=3e4;class u extends r.y{constructor(t){super();this.doc=t;this.clientID=t.clientID;this.states=new Map;this.meta=new Map;this._checkInterval=setInterval((()=>{const t=c.ZG();if(this.getLocalState()!==null&&h/2<=t-this.meta.get(this.clientID).lastUpdated){this.setLocalState(this.getLocalState())}const e=[];this.meta.forEach(((s,n)=>{if(n!==this.clientID&&h<=t-s.lastUpdated&&this.states.has(n)){e.push(n)}}));if(e.length>0){f(this,e,"timeout")}}),a.GW(h/10));t.on("destroy",(()=>{this.destroy()}));this.setLocalState({})}destroy(){this.emit("destroy",[this]);this.setLocalState(null);super.destroy();clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(t){const e=this.clientID;const s=this.meta.get(e);const n=s===undefined?0:s.clock+1;const o=this.states.get(e);if(t===null){this.states.delete(e)}else{this.states.set(e,t)}this.meta.set(e,{clock:n,lastUpdated:c.ZG()});const a=[];const r=[];const i=[];const d=[];if(t===null){d.push(e)}else if(o==null){if(t!=null){a.push(e)}}else{r.push(e);if(!l.Hi(o,t)){i.push(e)}}if(a.length>0||i.length>0||d.length>0){this.emit("change",[{added:a,updated:i,removed:d},"local"])}this.emit("update",[{added:a,updated:r,removed:d},"local"])}setLocalStateField(t,e){const s=this.getLocalState();if(s!==null){this.setLocalState({...s,[t]:e})}}getStates(){return this.states}}const f=(t,e,s)=>{const n=[];for(let o=0;o<e.length;o++){const s=e[o];if(t.states.has(s)){t.states.delete(s);if(s===t.clientID){const e=t.meta.get(s);t.meta.set(s,{clock:e.clock+1,lastUpdated:c.ZG()})}n.push(s)}}if(n.length>0){t.emit("change",[{added:[],updated:[],removed:n},s]);t.emit("update",[{added:[],updated:[],removed:n},s])}};const g=(t,e,s=t.states)=>{const o=e.length;const c=n.Mf();n.uE(c,o);for(let a=0;a<o;a++){const o=e[a];const r=s.get(o)||null;const l=t.meta.get(o).clock;n.uE(c,o);n.uE(c,l);n.uw(c,JSON.stringify(r))}return n._f(c)};const p=(t,e)=>{const s=decoding.createDecoder(t);const n=encoding.createEncoder();const o=decoding.readVarUint(s);encoding.writeVarUint(n,o);for(let c=0;c<o;c++){const t=decoding.readVarUint(s);const o=decoding.readVarUint(s);const c=JSON.parse(decoding.readVarString(s));const a=e(c);encoding.writeVarUint(n,t);encoding.writeVarUint(n,o);encoding.writeVarString(n,JSON.stringify(a))}return encoding.toUint8Array(n)};const m=(t,e,s)=>{const n=o.l1(e);const a=c.ZG();const r=[];const i=[];const d=[];const h=[];const u=o.yg(n);for(let c=0;c<u;c++){const e=o.yg(n);let s=o.yg(n);const c=JSON.parse(o.kf(n));const u=t.meta.get(e);const f=t.states.get(e);const g=u===undefined?0:u.clock;if(g<s||g===s&&c===null&&t.states.has(e)){if(c===null){if(e===t.clientID&&t.getLocalState()!=null){s++}else{t.states.delete(e)}}else{t.states.set(e,c)}t.meta.set(e,{clock:s,lastUpdated:a});if(u===undefined&&c!==null){r.push(e)}else if(u!==undefined&&c===null){h.push(e)}else if(c!==null){if(!l.Hi(c,f)){d.push(e)}i.push(e)}}}if(r.length>0||d.length>0||h.length>0){t.emit("change",[{added:r,updated:d,removed:h},s])}if(r.length>0||i.length>0||h.length>0){t.emit("update",[{added:r,updated:i,removed:h},s])}}}}]);