text: (self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5817,132,4602],{66789:(t,e,s)=>{"use strict";s.r(e),s.d(e,{YBaseCell:()=>g,YCodeCell:()=>p,YDocument:()=>l,YFile:()=>c,YMarkdownCell:()=>m,YNotebook:()=>u,YRawCell:()=>y,convertYMapEventToMapChange:()=>f,createCellFromType:()=>h,createMutex:()=>w,createStandaloneCell:()=>d});var n=s(9727),a=s(75138),r=s(6493),o=s(85072);const i=t=>JSON.parse(JSON.stringify(t));class l{constructor(){this.isDisposed=!1,this.ydoc=new o.Doc,this.source=this.ydoc.getText("source"),this.ystate=this.ydoc.getMap("state"),this.undoManager=new o.UndoManager([this.source],{trackedOrigins:new Set([this])}),this.awareness=new r.GL(this.ydoc),this._changed=new a.Signal(this)}transact(t,e=!0){this.ydoc.transact(t,e?this:null)}dispose(){this.isDisposed=!0,this.ydoc.destroy()}canUndo(){return this.undoManager.undoStack.length>0}canRedo(){return this.undoManager.redoStack.length>0}undo(){this.undoManager.undo()}redo(){this.undoManager.redo()}clearUndoHistory(){this.undoManager.clear()}get changed(){return this._changed}}class c extends l{constructor(){super(),this._modelObserver=t=>{const e={};e.sourceChange=t.changes.delta,this._changed.emit(e)},this._onStateChanged=t=>{const e=[];t.keysChanged.forEach((s=>{const n=t.changes.keys.get(s);e.push({name:s,oldValue:(null==n?void 0:n.oldValue)?n.oldValue:0,newValue:this.ystate.get(s)})})),this._changed.emit({stateChange:e})},this.ysource=this.ydoc.getText("source"),this.ysource.observe(this._modelObserver),this.ystate.observe(this._onStateChanged)}dispose(){this.ysource.unobserve(this._modelObserver),this.ystate.unobserve(this._onStateChanged)}static create(){return new c}getSource(){return this.ysource.toString()}setSource(t){this.transact((()=>{const e=this.ysource;e.delete(0,e.length),e.insert(0,t)}))}updateSource(t,e,s=""){this.transact((()=>{const n=this.ysource;n.insert(t,s),n.delete(t+s.length,e-t)}))}}class u extends l{constructor(){super(),this._onYCellsChanged=t=>{t.changes.added.forEach((t=>{const e=t.content.type;this._ycellMapping.has(e)||this._ycellMapping.set(e,h(e));const s=this._ycellMapping.get(e);s._notebook=this,s._undoManager=this.undoManager})),t.changes.deleted.forEach((t=>{const e=t.content.type,s=this._ycellMapping.get(e);s&&(s.dispose(),this._ycellMapping.delete(e))}));let e=0;const s=[];t.changes.delta.forEach((t=>{if(null!=t.insert){const n=t.insert.map((t=>this._ycellMapping.get(t)));s.push({insert:n}),this.cells.splice(e,0,...n),e+=t.insert.length}else null!=t.delete?(s.push(t),this.cells.splice(e,t.delete)):null!=t.retain&&(s.push(t),e+=t.retain)})),this._changed.emit({cellsChange:s})},this._onStateChanged=t=>{const e=[];t.keysChanged.forEach((s=>{const n=t.changes.keys.get(s);e.push({name:s,oldValue:(null==n?void 0:n.oldValue)?n.oldValue:0,newValue:this.ystate.get(s)})})),this._changed.emit({stateChange:e})},this.ycells=this.ydoc.getArray("cells"),this.ymeta=this.ydoc.getMap("meta"),this.ymodel=this.ydoc.getMap("model"),this.undoManager=new o.UndoManager([this.ycells],{trackedOrigins:new Set([this])}),this._ycellMapping=new Map,this.ycells.observe(this._onYCellsChanged),this.cells=this.ycells.toArray().map((t=>(this._ycellMapping.has(t)||this._ycellMapping.set(t,h(t)),this._ycellMapping.get(t)))),this.ystate.observe(this._onStateChanged)}get nbformat(){return this.ystate.get("nbformat")}set nbformat(t){this.transact((()=>{this.ystate.set("nbformat",t)}),!1)}get nbformat_minor(){return this.ystate.get("nbformatMinor")}set nbformat_minor(t){this.transact((()=>{this.ystate.set("nbformatMinor",t)}),!1)}dispose(){this.ycells.unobserve(this._onYCellsChanged),this.ystate.unobserve(this._onStateChanged)}getCell(t){return this.cells[t]}insertCell(t,e){this.insertCells(t,[e])}insertCells(t,e){e.forEach((t=>{this._ycellMapping.set(t.ymodel,t)})),this.transact((()=>{this.ycells.insert(t,e.map((t=>t.ymodel)))}))}moveCell(t,e){this.transact((()=>{const s=this.getCell(t).clone();this.deleteCell(t),this.insertCell(e,s)}))}deleteCell(t){this.deleteCellRange(t,t+1)}deleteCellRange(t,e){this.transact((()=>{this.ycells.delete(t,e-t)}))}getMetadata(){const t=this.ymeta.get("metadata");return t?i(t):{orig_nbformat:1}}setMetadata(t){this.ymeta.set("metadata",i(t))}updateMetadata(t){this.ymeta.set("metadata",Object.assign({},this.getMetadata(),t))}static create(){return new u}}const h=t=>{switch(t.get("cell_type")){case"code":return new p(t);case"markdown":return new m(t);case"raw":return new y(t);default:throw new Error("Found unknown cell type")}},d=(t,e)=>{switch(t){case"markdown":return m.createStandalone(e);case"code":return p.createStandalone(e);default:return y.createStandalone(e)}};class g{constructor(t){this._notebook=null,this.isStandalone=!1,this._modelObserver=t=>{const e={},s=t.find((t=>t.target===this.ymodel.get("source")));s&&(e.sourceChange=s.changes.delta);const n=t.find((t=>t.target===this.ymodel.get("outputs")));n&&(e.outputsChange=n.changes.delta);const a=t.find((t=>t.target===this.ymodel));if(a&&a.keysChanged.has("metadata")){const t=a.changes.keys.get("metadata");e.metadataChange={oldValue:(null==t?void 0:t.oldValue)?t.oldValue:void 0,newValue:this.getMetadata()}}if(a&&a.keysChanged.has("execution_count")){const t=a.changes.keys.get("execution_count");e.executionCountChange={oldValue:t.oldValue,newValue:this.ymodel.get("execution_count")}}const r=this.ymodel.get("source");a&&a.keysChanged.has("source")&&(e.sourceChange=[{delete:this._prevSourceLength},{insert:r.toString()}]),this._prevSourceLength=r.length,this._changed.emit(e)},this.isDisposed=!1,this._undoManager=null,this._changed=new a.Signal(this),this.ymodel=t;const e=t.get("source");this._prevSourceLength=e?e.length:0,this.ymodel.observeDeep(this._modelObserver)}get ysource(){return this.ymodel.get("source")}get awareness(){var t;return(null===(t=this.notebook)||void 0===t?void 0:t.awareness)||null}transact(t,e=!0){this.notebook&&e?this.notebook.transact(t):this.ymodel.doc.transact(t,this)}get undoManager(){return this.notebook?this.notebook.undoManager:this._undoManager}undo(){var t;null===(t=this.undoManager)||void 0===t||t.undo()}redo(){var t;null===(t=this.undoManager)||void 0===t||t.redo()}canUndo(){return!!this.undoManager&&this.undoManager.undoStack.length>0}canRedo(){return!!this.undoManager&&this.undoManager.redoStack.length>0}clearUndoHistory(){var t;null===(t=this.undoManager)||void 0===t||t.clear()}get notebook(){return this._notebook}static create(t=n.UUID.uuid4()){const e=new o.Map,s=new o.Text;return e.set("source",s),e.set("metadata",{}),e.set("cell_type",this.prototype.cell_type),e.set("id",t),new this(e)}static createStandalone(t){const e=this.create(t);return e.isStandalone=!0,(new o.Doc).getArray().insert(0,[e.ymodel]),e._undoManager=new o.UndoManager([e.ymodel],{trackedOrigins:new Set([e])}),e}clone(){const t=new o.Map,e=new o.Text(this.getSource());return t.set("source",e),t.set("metadata",this.getMetadata()),t.set("cell_type",this.cell_type),t.set("id",this.getId()),new(0,this.constructor)(t)}get changed(){return this._changed}dispose(){this.ymodel.unobserveDeep(this._modelObserver)}getAttachments(){return this.ymodel.get("attachments")}setAttachments(t){this.transact((()=>{null==t?this.ymodel.set("attachments",t):this.ymodel.delete("attachments")}))}getId(){return this.ymodel.get("id")}getSource(){return this.ymodel.get("source").toString()}setSource(t){const e=this.ymodel.get("source");this.transact((()=>{e.delete(0,e.length),e.insert(0,t)}))}updateSource(t,e,s=""){this.transact((()=>{const n=this.ysource;n.insert(t,s),n.delete(t+s.length,e-t)}))}get cell_type(){throw new Error("A YBaseCell must not be constructed")}getMetadata(){return i(this.ymodel.get("metadata"))}setMetadata(t){this.transact((()=>{this.ymodel.set("metadata",i(t))}))}toJSON(){return{id:this.getId(),cell_type:this.cell_type,source:this.getSource(),metadata:this.getMetadata()}}}class p extends g{get cell_type(){return"code"}get execution_count(){return this.ymodel.get("execution_count")}set execution_count(t){this.transact((()=>{this.ymodel.set("execution_count",t)}))}getOutputs(){return i(this.ymodel.get("outputs").toArray())}setOutputs(t){const e=this.ymodel.get("outputs");this.transact((()=>{e.delete(0,e.length),e.insert(0,t)}),!1)}updateOutputs(t,e,s=[]){const n=this.ymodel.get("outputs"),a=e<n.length?e-t:n.length-t;this.transact((()=>{n.delete(t,a),n.insert(t,s)}),!1)}static create(t){const e=super.create(t);return e.ymodel.set("execution_count",0),e.ymodel.set("outputs",new o.Array),e}static createStandalone(t){const e=super.createStandalone(t);return e.ymodel.set("execution_count",null),e.ymodel.set("outputs",new o.Array),e}clone(){const t=super.clone(),e=new o.Array;return e.insert(0,this.getOutputs()),t.ymodel.set("execution_count",this.execution_count),t.ymodel.set("outputs",e),t}toJSON(){return{id:this.getId(),cell_type:"code",source:this.getSource(),metadata:this.getMetadata(),outputs:this.getOutputs(),execution_count:this.execution_count}}}class y extends g{static create(t){return super.create(t)}static createStandalone(t){return super.createStandalone(t)}get cell_type(){return"raw"}toJSON(){return{id:this.getId(),cell_type:"raw",source:this.getSource(),metadata:this.getMetadata(),attachments:this.getAttachments()}}}class m extends g{static create(t){return super.create(t)}static createStandalone(t){return super.createStandalone(t)}get cell_type(){return"markdown"}toJSON(){return{id:this.getId(),cell_type:"markdown",source:this.getSource(),metadata:this.getMetadata(),attachments:this.getAttachments()}}}function f(t){let e=new Map;return t.changes.keys.forEach(((t,s)=>{e.set(s,{action:t.action,oldValue:t.oldValue,newValue:this.ymeta.get(s)})})),e}const w=()=>{let t=!0;return e=>{if(t){t=!1;try{e()}finally{t=!0}}}}},11565:(t,e,s)=>{"use strict";s.d(e,{Z$:()=>n,s7:()=>a,Dp:()=>r,$m:()=>o});const n=t=>t[t.length-1],a=(t,e)=>{for(let s=0;s<e.length;s++)t.push(e[s])},r=Array.from,o=(t,e)=>{return t.length===e.length&&(s=(t,s)=>t===e[s],t.every(s));var s}},70132:(t,e,s)=>{"use strict";s.d(e,{jS:()=>d,E0:()=>g,jU:()=>l,UG:()=>i});var n=s(23205),a=s(45931);var r=s(55852),o=s(34406);const i=o.release&&/node|io\.js/.test(o.release.name),l="undefined"!=typeof window&&!i;let c;"undefined"!=typeof navigator&&/Mac/.test(navigator.platform);const u=[],h=()=>{if(void 0===c)if(i){c=n.Ue();const t=o.argv;let e=null;for(let s=0;s<t.length;s++){const n=t[s];"-"===n[0]?(null!==e&&c.set(e,""),e=n):null!==e?(c.set(e,n),e=null):u.push(n)}null!==e&&c.set(e,"")}else"object"==typeof location?(c=n.Ue(),(location.search||"?").slice(1).split("&").forEach((t=>{if(0!==t.length){const[e,s]=t.split("=");c.set(`--${a.NF(e,"-")}`,s),c.set(`-${a.NF(e,"-")}`,s)}}))):c=n.Ue();return c},d=(t,e)=>h().get(t)||e,g=t=>{return void 0===(e=i?{}[t.toUpperCase()]:r.X.getItem(t))?null:e;var e};(t=>h().has(t))("--"+"production")||g("production")},1872:(t,e,s)=>{"use strict";s.d(e,{PP:()=>r,WY:()=>o,UV:()=>i,Hi:()=>l});var n=s(11565),a=s(69600);const r=(t,e,s=0)=>{try{for(;s<t.length;s++)t[s](...e)}finally{s<t.length&&r(t,e,s+1)}},o=()=>{},i=(t,e)=>t===e||null!=t&&null!=e&&t.constructor===e.constructor&&(t instanceof Array&&n.$m(t,e)||"object"==typeof t&&a.$m(t,e)),l=(t,e)=>{if(null==t||null==e)return((t,e)=>t===e)(t,e);if(t.constructor!==e.constructor)return!1;if(t===e)return!0;switch(t.constructor){case ArrayBuffer:t=new Uint8Array(t),e=new Uint8Array(e);case Uint8Array:if(t.byteLength!==e.byteLength)return!1;for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;break;case Set:if(t.size!==e.size)return!1;for(const s of t)if(!e.has(s))return!1;break;case Map:if(t.size!==e.size)return!1;for(const s of t.keys())if(!e.has(s)||!l(t.get(s),e.get(s)))return!1;break;case Object:if(a.kE(t)!==a.kE(e))return!1;for(const s in t)if(!a.l$(t,s)||!l(t[s],e[s]))return!1;break;case Array:if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!l(t[s],e[s]))return!1;break;default:return!1}return!0}},23205:(t,e,s)=>{"use strict";s.d(e,{Ue:()=>n,JG:()=>a,Yu:()=>r,UI:()=>o,Yj:()=>i});const n=()=>new Map,a=t=>{const e=n();return t.forEach(((t,s)=>{e.set(s,t)})),e},r=(t,e,s)=>{let n=t.get(e);return void 0===n&&t.set(e,n=s()),n},o=(t,e)=>{const s=[];for(const[n,a]of t)s.push(e(a,n));return s},i=(t,e)=>{for(const[s,n]of t)if(e(n,s))return!0;return!1}},21332:(t,e,s)=>{"use strict";s.d(e,{GW:()=>n,Wn:()=>a,mv:()=>r,IH:()=>o,VV:()=>i,Fp:()=>l,GR:()=>c});const n=Math.floor,a=(Math.ceil,Math.abs),r=(Math.imul,Math.round,Math.log10),o=(Math.log2,Math.log,Math.sqrt,(t,e)=>t+e),i=(t,e)=>t<e?t:e,l=(t,e)=>t>e?t:e,c=(Number.isNaN,Math.pow,Math.sign,t=>0!==t?t<0:1/t<0)},69600:(t,e,s)=>{"use strict";s.d(e,{UI:()=>a,kE:()=>r,l$:()=>o,$m:()=>i}),Object.assign;const n=Object.keys,a=(t,e)=>{const s=[];for(const n in t)s.push(e(t[n],n));return s},r=t=>n(t).length,o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i=(t,e)=>t===e||r(t)===r(e)&&((t,e)=>{for(const s in t)if(!e(t[s],s))return!1;return!0})(t,((t,s)=>(void 0!==t||o(e,s))&&e[s]===t))},55852:(t,e,s)=>{"use strict";s.d(e,{X:()=>r,z:()=>o});let n=new class{constructor(){this.map=new Map}setItem(t,e){this.map.set(t,e)}getItem(t){return this.map.get(t)}},a=!0;try{"undefined"!=typeof localStorage&&(n=localStorage,a=!1)}catch(t){}const r=n,o=t=>a||addEventListener("storage",t)},45931:(t,e,s)=>{"use strict";s.d(e,{IK:()=>n,NF:()=>o,lz:()=>l});const n=String.fromCharCode,a=(String.fromCodePoint,/^\s*/g),r=/([A-Z])/g,o=(t,e)=>(t=>t.replace(a,""))(t.replace(r,(t=>`${e}${(t=>t.toLowerCase())(t)}`))),i="undefined"!=typeof TextEncoder?new TextEncoder:null,l=i?t=>i.encode(t):t=>{const e=unescape(encodeURIComponent(t)),s=e.length,n=new Uint8Array(s);for(let t=0;t<s;t++)n[t]=e.codePointAt(t);return n};let c="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});c&&1===c.decode(new Uint8Array).length&&(c=null)},34406:t=>{var e,s,n=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(e===setTimeout)return setTimeout(t,0);if((e===a||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(s){try{return e.call(null,t,0)}catch(s){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:a}catch(t){e=a}try{s="function"==typeof clearTimeout?clearTimeout:r}catch(t){s=r}}();var i,l=[],c=!1,u=-1;function h(){c&&i&&(c=!1,i.length?l=i.concat(l):u=-1,l.length&&d())}function d(){if(!c){var t=o(h);c=!0;for(var e=l.length;e;){for(i=l,l=[];++u<e;)i&&i[u].run();u=-1,e=l.length}i=null,c=!1,function(t){if(s===clearTimeout)return clearTimeout(t);if((s===r||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(t);try{s(t)}catch(e){try{return s.call(null,t)}catch(e){return s.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)e[s-1]=arguments[s];l.push(new g(t,e)),1!==l.length||c||o(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},6493:(t,e,s)=>{"use strict";s.d(e,{GL:()=>c,Ag:()=>u,xq:()=>h,oy:()=>d});var n=s(23406),a=s(94072),r=s(40870),o=s(21332),i=s(75736),l=s(1872);s(85072);class c extends i.y{constructor(t){super(),this.doc=t,this.clientID=t.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval((()=>{const t=r.ZG();null!==this.getLocalState()&&15e3<=t-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const e=[];this.meta.forEach(((s,n)=>{n!==this.clientID&&3e4<=t-s.lastUpdated&&this.states.has(n)&&e.push(n)})),e.length>0&&u(this,e,"timeout")}),o.GW(3e3)),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,s=this.meta.get(e),n=void 0===s?0:s.clock+1,a=this.states.get(e);null===t?this.states.delete(e):this.states.set(e,t),this.meta.set(e,{clock:n,lastUpdated:r.ZG()});const o=[],i=[],c=[],u=[];null===t?u.push(e):null==a?null!=t&&o.push(e):(i.push(e),l.Hi(a,t)||c.push(e)),(o.length>0||c.length>0||u.length>0)&&this.emit("change",[{added:o,updated:c,removed:u},"local"]),this.emit("update",[{added:o,updated:i,removed:u},"local"])}setLocalStateField(t,e){const s=this.getLocalState();null!==s&&this.setLocalState({...s,[t]:e})}getStates(){return this.states}}const u=(t,e,s)=>{const n=[];for(let s=0;s<e.length;s++){const a=e[s];if(t.states.has(a)){if(t.states.delete(a),a===t.clientID){const e=t.meta.get(a);t.meta.set(a,{clock:e.clock+1,lastUpdated:r.ZG()})}n.push(a)}}n.length>0&&(t.emit("change",[{added:[],updated:[],removed:n},s]),t.emit("update",[{added:[],updated:[],removed:n},s]))},h=(t,e,s=t.states)=>{const a=e.length,r=n.Mf();n.uE(r,a);for(let o=0;o<a;o++){const a=e[o],i=s.get(a)||null,l=t.meta.get(a).clock;n.uE(r,a),n.uE(r,l),n.uw(r,JSON.stringify(i))}return n._f(r)},d=(t,e,s)=>{const n=a.l1(e),o=r.ZG(),i=[],c=[],u=[],h=[],d=a.yg(n);for(let e=0;e<d;e++){const e=a.yg(n);let s=a.yg(n);const r=JSON.parse(a.kf(n)),d=t.meta.get(e),g=t.states.get(e),p=void 0===d?0:d.clock;(p<s||p===s&&null===r&&t.states.has(e))&&(null===r?e===t.clientID&&null!=t.getLocalState()?s++:t.states.delete(e):t.states.set(e,r),t.meta.set(e,{clock:s,lastUpdated:o}),void 0===d&&null!==r?i.push(e):void 0!==d&&null===r?h.push(e):null!==r&&(l.Hi(r,g)||u.push(e),c.push(e)))}(i.length>0||u.length>0||h.length>0)&&t.emit("change",[{added:i,updated:u,removed:h},s]),(i.length>0||c.length>0||h.length>0)&&t.emit("update",[{added:i,updated:c,removed:h},s])}}}]);
  //# sourceMappingURL=5817.b2ff37f8ddbc954d06db.js.map