jupyter-docprovider 1.0.0rc1__tar.gz → 1.1.0a0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/PKG-INFO +1 -2
- jupyter_docprovider-1.1.0a0/jupyter_docprovider/_version.py +1 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/jupyter_docprovider/labextension/package.json +5 -5
- jupyter_docprovider-1.1.0a0/jupyter_docprovider/labextension/static/240.5aa622ea121e34d22c41.js +1 -0
- jupyter_docprovider-1.1.0a0/jupyter_docprovider/labextension/static/576.21a3c1a9ebaebb58d346.js +1 -0
- jupyter_docprovider-1.1.0a0/jupyter_docprovider/labextension/static/703.96968af03651921862ee.js +1 -0
- jupyter_docprovider-1.1.0a0/jupyter_docprovider/labextension/static/remoteEntry.b892448bd108d88d3288.js +1 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/jupyter_docprovider/labextension/static/third-party-licenses.json +4 -4
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/package.json +3 -3
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/TimelineSlider.tsx +5 -1
- jupyter_docprovider-1.1.0a0/packages/docprovider/src/__tests__/forkManager.spec.ts +96 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/component.tsx +12 -6
- jupyter_docprovider-1.1.0a0/packages/docprovider/src/forkManager.ts +126 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/index.ts +2 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/requests.ts +41 -0
- jupyter_docprovider-1.1.0a0/packages/docprovider/src/tokens.ts +117 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/ydrive.ts +0 -1
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider-extension/package.json +4 -4
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider-extension/src/filebrowser.ts +45 -28
- jupyter_docprovider-1.1.0a0/packages/docprovider-extension/src/forkManager.ts +28 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider-extension/src/index.ts +3 -1
- jupyter_docprovider-1.0.0rc1/jupyter_docprovider/_version.py +0 -1
- jupyter_docprovider-1.0.0rc1/jupyter_docprovider/labextension/static/544.254effc7f474950ceae5.js +0 -1
- jupyter_docprovider-1.0.0rc1/jupyter_docprovider/labextension/static/576.36471ca07f7437678515.js +0 -1
- jupyter_docprovider-1.0.0rc1/jupyter_docprovider/labextension/static/618.28407d2343b911e61b63.js +0 -1
- jupyter_docprovider-1.0.0rc1/jupyter_docprovider/labextension/static/remoteEntry.3bd53d03724ff8e55dd4.js +0 -1
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/.gitignore +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/LICENSE +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/README.md +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/install.json +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/jupyter_docprovider/__init__.py +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/jupyter_docprovider/labextension/static/444.12adfae9a2b50e91531f.js +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/jupyter_docprovider/labextension/static/944.b85c55dff0f14165f872.js +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/jupyter_docprovider/labextension/static/style.js +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/babel.config.js +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/jest.config.js +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/__tests__/yprovider.spec.ts +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/awareness.ts +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/notebookCellExecutor.ts +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/yprovider.ts +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/style/base.css +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/style/index.css +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/style/index.js +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/style/slider.css +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/tsconfig.json +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/tsconfig.test.json +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider-extension/README.md +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider-extension/src/executor.ts +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider-extension/style/index.css +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider-extension/style/index.js +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider-extension/tsconfig.json +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/pyproject.toml +0 -0
- {jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: jupyter-docprovider
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0a0
|
|
4
4
|
Summary: JupyterLab/Jupyter Notebook 7+ extension integrating collaborative shared models.
|
|
5
5
|
Project-URL: Documentation, https://jupyterlab-realtime-collaboration.readthedocs.io/
|
|
6
6
|
Project-URL: Repository, https://github.com/jupyterlab/jupyter-collaboration
|
|
@@ -64,7 +64,6 @@ License: # Licensing terms
|
|
|
64
64
|
|
|
65
65
|
# Copyright (c) Jupyter Development Team.
|
|
66
66
|
# Distributed under the terms of the Modified BSD License.
|
|
67
|
-
License-File: LICENSE
|
|
68
67
|
Classifier: Framework :: Jupyter
|
|
69
68
|
Classifier: Framework :: Jupyter :: JupyterLab
|
|
70
69
|
Classifier: Framework :: Jupyter :: JupyterLab :: 4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.1.0.a0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter/docprovider-extension",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0-alpha.0",
|
|
4
4
|
"description": "JupyterLab - Collaborative Shared Models",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"watch:labextension": "jupyter labextension watch ."
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@jupyter/collaborative-drive": "^3.
|
|
57
|
-
"@jupyter/docprovider": "^3.
|
|
58
|
-
"@jupyter/ydoc": "^2.0.0 || ^3.0.0
|
|
56
|
+
"@jupyter/collaborative-drive": "^3.1.0-alpha.0",
|
|
57
|
+
"@jupyter/docprovider": "^3.1.0-alpha.0",
|
|
58
|
+
"@jupyter/ydoc": "^2.0.0 || ^3.0.0",
|
|
59
59
|
"@jupyterlab/application": "^4.2.0",
|
|
60
60
|
"@jupyterlab/apputils": "^4.2.0",
|
|
61
61
|
"@jupyterlab/docregistry": "^4.2.0",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
"_build": {
|
|
131
|
-
"load": "static/remoteEntry.
|
|
131
|
+
"load": "static/remoteEntry.b892448bd108d88d3288.js",
|
|
132
132
|
"extension": "./extension",
|
|
133
133
|
"style": "./style"
|
|
134
134
|
}
|
jupyter_docprovider-1.1.0a0/jupyter_docprovider/labextension/static/240.5aa622ea121e34d22c41.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[240],{68:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(758),r=n.n(o),s=n(935),i=n.n(s)()(r());i.push([e.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-timelineSliderWrapper .jp-sliderContainer{\n display: flex;\n align-items: center;\n}\n\n.jp-Slider {\n height: 4.5px\n}\n\n#jp-slider-status-bar {\n display: flex;\n}\n\n.jp-timestampDisplay {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n}\n\n.jp-restoreBtnContainer {\n width: 192px;\n}\n\n.jp-ToolbarButtonComponent.jp-restoreBtn {\n cursor: pointer;\n color: var(--jp-layout-color2);\n width: 100%;\n background: var(--jp-accept-color-normal)\n}\n",""]);const a=i},935:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);o&&i[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}},758:e=>{e.exports=function(e){return e[1]}},591:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var s={},i=[],a=0;a<e.length;a++){var c=e[a],l=o.base?c[0]+o.base:c[0],d=s[l]||0,h="".concat(l," ").concat(d);s[l]=d+1;var u=n(h),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==u)t[u].references++,t[u].updater(p);else{var m=r(p,o);o.byIndex=a,t.splice(a,0,{identifier:h,updater:m,references:1})}i.push(h)}return i}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var s=o(e=e||[],r=r||{});return function(e){e=e||[];for(var i=0;i<s.length;i++){var a=n(s[i]);t[a].references--}for(var c=o(e,r),l=0;l<s.length;l++){var d=n(s[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},128:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},51:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},740:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},656:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},240:(e,t,n)=>{n.r(t),n.d(t,{ForkManager:()=>K,IForkManagerToken:()=>J,JUPYTER_COLLABORATION_FORK_EVENTS_URI:()=>q,NotebookCellServerExecutor:()=>l,ROOM_FORK_URL:()=>p,TimelineWidget:()=>B,WebSocketAwarenessProvider:()=>r,WebSocketProvider:()=>w,YDrive:()=>k,requestAPI:()=>m,requestDocSession:()=>f,requestDocumentTimeline:()=>v,requestUndoRedo:()=>g});var o=n(560);class r extends o.WebsocketProvider{constructor(e){super(e.url,e.roomID,e.awareness.doc,{awareness:e.awareness}),this._isDisposed=!1,this._awareness=e.awareness,this._user=e.user,this._user.ready.then((()=>this._onUserChanged(this._user))).catch((e=>console.error(e))),this._user.userChanged.connect(this._onUserChanged,this)}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._user.userChanged.disconnect(this._onUserChanged,this),this._isDisposed=!0,this.destroy())}_onUserChanged(e){this._awareness.setLocalStateField("user",e.identity)}}var s=n(501),i=n(314),a=n(33),c=n(877);class l{constructor(e){var t;this._serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:a.ServerConnection.makeSettings()}async runCell({cell:e,notebook:t,notebookConfig:n,onCellExecuted:o,onCellExecutionScheduled:r,sessionContext:l,sessionDialogs:d,translator:h}){var u,p,m;const f=(h=null!=h?h:c.nullTranslator).load("jupyterlab");switch(e.model.type){case"markdown":e.rendered=!0,e.inputHidden=!1,o({cell:e,success:!0});break;case"code":if(l){if(l.isTerminating){await(0,s.showDialog)({title:f.__("Kernel Terminating"),body:f.__("The kernel for %1 appears to be terminating. You can not run any cell for now.",null===(u=l.session)||void 0===u?void 0:u.path),buttons:[s.Dialog.okButton()]});break}if(l.pendingInput)return await(0,s.showDialog)({title:f.__("Cell not executed due to pending input"),body:f.__("The cell has not been executed to avoid kernel deadlock as there is another pending input! Submit your pending input and try again."),buttons:[s.Dialog.okButton()]}),!1;if(l.hasNoKernel&&await l.startKernel()&&d&&await d.selectKernel(l),l.hasNoKernel)return e.model.sharedModel.transact((()=>{e.model.clearExecution()})),!0;const n=null===(m=null===(p=null==l?void 0:l.session)||void 0===p?void 0:p.kernel)||void 0===m?void 0:m.id,c=i.URLExt.join(this._serverSettings.baseUrl,`api/kernels/${n}/execute`),h=e.model.sharedModel.getId(),v=t.sharedModel.getState("document_id"),g={method:"POST",body:JSON.stringify({cell_id:h,document_id:v})};r({cell:e});let y=!1;try{y=(await a.ServerConnection.makeRequest(c,g,this._serverSettings)).ok}catch(t){if(o({cell:e,success:!1}),e.isDisposed)return!1;throw t}return o({cell:e,success:y}),!0}e.model.sharedModel.transact((()=>{e.model.clearExecution()}),!1)}return Promise.resolve(!0)}}const d="api/collaboration/session",h="api/collaboration/undo_redo",u="api/collaboration/timeline",p="api/collaboration/fork";async function m(e="",t={}){const n=a.ServerConnection.makeSettings(),o=i.URLExt.join(n.baseUrl,e);let r;try{r=await a.ServerConnection.makeRequest(o,t,n)}catch(e){throw new a.ServerConnection.NetworkError(e)}let s=await r.text();if(s.length>0)try{s=JSON.parse(s)}catch(e){console.error("Not a JSON response body.",r)}if(!r.ok)throw new a.ServerConnection.ResponseError(r,s.message||s);return s}async function f(e,t,n){const o=a.ServerConnection.makeSettings(),r=i.URLExt.join(o.baseUrl,d,encodeURIComponent(n)),s={method:"PUT",body:JSON.stringify({format:e,type:t})};let c;try{c=await a.ServerConnection.makeRequest(r,s,o)}catch(e){throw new a.ServerConnection.NetworkError(e)}let l=await c.text();if(l.length>0)try{l=JSON.parse(l)}catch(e){console.log("Not a JSON response body.",c)}if(!c.ok)throw new a.ServerConnection.ResponseError(c,l.message||l);return l}async function v(e,t,n){const o=a.ServerConnection.makeSettings();let r=i.URLExt.join(o.baseUrl,u,n);r=r.concat(`?format=${e}&&type=${t}`);const s={method:"GET"};let c;try{c=await a.ServerConnection.makeRequest(r,s,o)}catch(e){throw new a.ServerConnection.NetworkError(e)}return c}async function g(e,t,n,o){const r=a.ServerConnection.makeSettings();let s=i.URLExt.join(r.baseUrl,h,encodeURIComponent(e));s=s.concat(`?action=${t}&&steps=${n}&&forkRoom=${o}`);const c={method:"PUT"};let l;try{l=await a.ServerConnection.makeRequest(s,c,r)}catch(e){throw new a.ServerConnection.NetworkError(e)}let d=await l.text();if(d.length>0)try{d=JSON.parse(d)}catch(e){console.log("Not a JSON response body.",l)}if(!l.ok)throw new a.ServerConnection.ResponseError(l,d.message||d);return d}var y=n(602),_=n(262);class w{constructor(e){this._onConnectionClosed=e=>{1003===e.code&&(console.error("Document provider closed:",e.reason),(0,s.showErrorMessage)(this._trans.__("Document session error"),e.reason,[s.Dialog.okButton()]),this._sharedModel.dispose())},this._onSync=e=>{e&&(this._yWebsocketProvider&&(this._yWebsocketProvider.off("sync",this._onSync),this._sharedModel.ydoc.getMap("state").set("document_id",this._yWebsocketProvider.roomname)),this._ready.resolve())},this._ready=new _.PromiseDelegate,this._isDisposed=!1,this._path=e.path,this._contentType=e.contentType,this._format=e.format,this._serverUrl=e.url,this._sharedModel=e.model,this._awareness=e.model.awareness,this._yWebsocketProvider=null,this._trans=e.translator;const t=e.user;t.ready.then((()=>{this._onUserChanged(t)})).catch((e=>console.error(e))),t.userChanged.connect(this._onUserChanged,this),this._connect().catch((e=>console.warn(e)))}get isDisposed(){return this._isDisposed}get ready(){return this._ready.promise}get contentType(){return this._contentType}get format(){return this._format}dispose(){var e,t,n;this.isDisposed||(this._isDisposed=!0,null===(e=this._yWebsocketProvider)||void 0===e||e.off("connection-close",this._onConnectionClosed),null===(t=this._yWebsocketProvider)||void 0===t||t.off("sync",this._onSync),null===(n=this._yWebsocketProvider)||void 0===n||n.destroy(),this._disconnect(),y.Signal.clearData(this))}async reconnect(){this._disconnect(),this._connect()}async _connect(){const e=await f(this._format,this._contentType,this._path);this._yWebsocketProvider=new o.WebsocketProvider(this._serverUrl,`${e.format}:${e.type}:${e.fileId}`,this._sharedModel.ydoc,{disableBc:!0,params:{sessionId:e.sessionId},awareness:this._awareness}),this._yWebsocketProvider.on("sync",this._onSync),this._yWebsocketProvider.on("connection-close",this._onConnectionClosed)}async connectToForkDoc(e,t){this._disconnect(),this._yWebsocketProvider=new o.WebsocketProvider(this._serverUrl,e,this._sharedModel.ydoc,{disableBc:!0,params:{sessionId:t},awareness:this._awareness})}get wsProvider(){return this._yWebsocketProvider}_disconnect(){var e,t,n;null===(e=this._yWebsocketProvider)||void 0===e||e.off("connection-close",this._onConnectionClosed),null===(t=this._yWebsocketProvider)||void 0===t||t.off("sync",this._onSync),null===(n=this._yWebsocketProvider)||void 0===n||n.destroy(),this._yWebsocketProvider=null}_onUserChanged(e){this._awareness.setLocalStateField("user",e.identity)}}const S="true"===i.PageConfig.getOption("disableRTC");class k extends a.Drive{constructor(e,t,n){super({name:"RTC"}),this._onCreate=(e,t)=>{var n,o;if("string"==typeof e.format)try{const r=new w({url:i.URLExt.join(this.serverSettings.wsUrl,"api/collaboration/room"),path:e.path,format:e.format,contentType:e.contentType,model:t,user:this._user,translator:this._trans}),s=((null===(n=this._globalAwareness)||void 0===n?void 0:n.getLocalState())||{}).documents||[];s.includes(e.path)||(s.push(`${this.name}:${e.path}`),null===(o=this._globalAwareness)||void 0===o||o.setLocalStateField("documents",s));const a=`${e.format}:${e.contentType}:${e.path}`;this._providers.set(a,r),t.changed.connect((async(t,n)=>{if(!n.stateChange)return;const o=n.stateChange.filter((e=>"hash"===e.name));if(0===o.length)return;o.length>1&&console.error("Unexpected multiple changes to hash value in a single transaction");const r=o[0],s=await this.get(e.path,{content:!1});this._ydriveFileChanged.emit({type:"save",newValue:{...s,hash:r.newValue},oldValue:{hash:r.oldValue}})})),t.disposed.connect((()=>{var t,n;const o=this._providers.get(a);o&&(o.dispose(),this._providers.delete(a));const r=((null===(t=this._globalAwareness)||void 0===t?void 0:t.getLocalState())||{}).documents||[],s=r.indexOf(`${this.name}:${e.path}`);s>-1&&r.splice(s,1),null===(n=this._globalAwareness)||void 0===n||n.setLocalStateField("documents",r)}))}catch(t){console.error(`Failed to open websocket connection for ${e.path}.\n:${t}`)}},this._ydriveFileChanged=new y.Signal(this),this._user=e,this._trans=t,this._globalAwareness=n,this._providers=new Map,this.sharedModelFactory=new b(this._onCreate),super.fileChanged.connect(((e,t)=>{this._ydriveFileChanged.emit(t)}))}get providers(){return this._providers}dispose(){this.isDisposed||(this._providers.forEach((e=>e.dispose())),this._providers.clear(),super.dispose())}async get(e,t){if(t&&t.format&&t.type){const n=`${t.format}:${t.type}:${e}`,o=this._providers.get(n);if(o){const[n]=await Promise.all([super.get(e,{...t,content:!1}),o.ready]);return{...n,format:t.format}}}return super.get(e,t)}async save(e,t={}){if(t.format&&t.type){const n=`${t.format}:${t.type}:${e}`;if(this._providers.get(n)){const n={type:t.type,format:t.format,content:!1};return this.get(e,n)}}return super.save(e,t)}get fileChanged(){return this._ydriveFileChanged}}class b{constructor(e){this._onCreate=e,this.collaborative=!S,this.documentFactories=new Map}registerDocumentFactory(e,t){if(this.documentFactories.has(e))throw new Error(`The content type ${e} already exists`);this.documentFactories.set(e,t)}createNew(e){if("string"==typeof e.format){if(this.collaborative&&e.collaborative&&this.documentFactories.has(e.contentType)){const t=this.documentFactories.get(e.contentType)(e);return this._onCreate(e,t),t}}else console.warn(`Only defined format are supported; got ${e.format}.`)}}var C=n(345),T=n.n(C),E=n(591),x=n.n(E),R=n(740),U=n.n(R),D=n(128),$=n.n(D),N=n(855),P=n.n(N),j=n(51),I=n.n(j),L=n(656),M=n.n(L),F=n(68),W={};W.styleTagTransform=M(),W.setAttributes=P(),W.insert=$().bind(null,"head"),W.domAPI=U(),W.insertStyleElement=I(),x()(F.A,W),F.A&&F.A.locals&&F.A.locals;var A=n(963);const O=({apiURL:e,provider:t,contentType:n,format:o,documentTimelineUrl:r})=>{const[i,a]=(0,C.useState)({roomId:"",timestamps:[],forkRoom:"",sessionId:""}),[c,l]=(0,C.useState)(i.timestamps.length-1),[d,h]=(0,C.useState)(!1),[u,p]=(0,C.useState)(!1),m=(0,C.useRef)(!0),y=(0,C.useRef)(!0),_=(0,C.useRef)(null);function w(e){try{const t=new URL(e).pathname,n=t.lastIndexOf(r);if(-1===n)throw new Error(`API segment "${r}" not found in URL.`);return t.slice(n+r.length)}catch(e){return console.error("Invalid URL or unable to extract filename:",e),""}}return T().createElement("div",{className:"jp-sliderContainer"},T().createElement("div",{onClick:()=>{!async function(r){try{if(m.current){const i=await v(o,n,r);if(!i.ok)throw 404===i.status?new Error("Not found"):503===i.status?new Error("WebSocket closed"):new Error(`Failed to fetch data: ${i.statusText}`);const c=await i.text();let d={roomId:"",timestamps:[],forkRoom:"",sessionId:""};return c&&(s.Notification.warning("Document is now in read-only mode. Changes will not be saved.",{autoClose:2500}),d=JSON.parse(c),a(d),l(d.timestamps.length-1),t.connectToForkDoc(d.forkRoom,d.sessionId),_.current=await f(o,n,w(e))),h(!0),m.current=!1,d}}catch(e){console.error("Error fetching data:",e)}}(w(e))},className:"jp-mod-highlighted",title:"Document Timeline"},T().createElement(A.historyIcon.react,{marginRight:"4px"})),d&&T().createElement("div",{className:"jp-timestampDisplay"},T().createElement("input",{type:"range",min:0,max:i.timestamps.length-1,value:c,onChange:async e=>{const t=parseInt(e.target.value),n=Math.abs(t-c);try{const e=function(e){return e<c?"undo":"redo"}(t);if(l(t),y.current&&(p(!0),y.current=!1),!_.current)return void console.error("Session is not initialized");await g(`${_.current.format}:${_.current.type}:${_.current.fileId}`,e,n,i.forkRoom)}catch(e){console.error("Error fetching or applying updates:",e)}},className:"jp-Slider"}),T().createElement("div",null,T().createElement("strong",null,w(e).split("/").pop()," ")," "),u&&T().createElement("div",{className:"jp-restoreBtnContainer"},T().createElement("button",{onClick:async()=>{if(!_.current)return void console.error("Session is not initialized");const e=await g(`${_.current.format}:${_.current.type}:${_.current.fileId}`,"restore",0,i.forkRoom);200===e.code?(s.Notification.success(e.status,{autoClose:4e3}),t.reconnect(),h(!1),m.current=!0):s.Notification.error(e.status,{autoClose:4e3})},className:"jp-ToolbarButtonComponent jp-restoreBtn"},"Restore version"," ",(e=>{const t=new Date(1e3*e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`})(i.timestamps[c])))))};class B extends s.ReactWidget{constructor(e,t,n,o,r){super(),this.apiURL=e,this.provider=t,this.contentType=n,this.format=o,this.documentTimelineUrl=r,this.addClass("jp-timelineSliderWrapper")}render(){return C.createElement(O,{key:this.apiURL,apiURL:this.apiURL,provider:this.provider,contentType:this.contentType,format:this.format,documentTimelineUrl:this.documentTimelineUrl})}updateContent(e,t){this.apiURL=e,this.provider=t,this.contentType=this.provider.contentType,this.format=this.provider.format,this.update()}}const J=new _.Token("@jupyter/docprovider:IForkManagerToken"),q="https://schema.jupyter.org/jupyter_collaboration/fork/v1";class K{constructor(e){this._disposed=!1,this._forkAddedSignal=new y.Signal(this),this._forkDeletedSignal=new y.Signal(this);const{drive:t,eventManager:n}=e;this._drive=t,this._eventManager=n,this._eventManager.stream.connect(this._handleEvent,this)}get isDisposed(){return this._disposed}get forkAdded(){return this._forkAddedSignal}get forkDeleted(){return this._forkDeletedSignal}dispose(){var e;this._disposed||(null===(e=this._eventManager)||void 0===e||e.stream.disconnect(this._handleEvent),this._disposed=!0)}async createFork(e){const{rootId:t,title:n,description:o,synchronize:r}=e,s={method:"PUT",body:JSON.stringify({title:n,description:o,synchronize:r})},a=i.URLExt.join(p,t);return await m(a,s)}async getAllForks(e){const t=i.URLExt.join(p,e);return await m(t,{method:"GET"})}async deleteFork(e){const{forkId:t,merge:n}=e,o=i.URLExt.join(p,t),r=i.URLExt.objectToQueryString({merge:n});await m(`${o}${r}`,{method:"DELETE"})}getProvider(e){const{documentPath:t,format:n,type:o}=e,r=this._drive;if(r){const e=r.name;let s=t;return t.startsWith(e)&&(s=t.slice(e.length+1)),r.providers.get(`${n}:${o}:${s}`)}}_handleEvent(e,t){if(t.schema_id===q)switch(t.action){case"create":this._forkAddedSignal.emit(t);break;case"delete":this._forkDeletedSignal.emit(t)}}}}}]);
|
jupyter_docprovider-1.1.0a0/jupyter_docprovider/labextension/static/576.21a3c1a9ebaebb58d346.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[576],{907:e=>{var t,s,n=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function c(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(s){try{return t.call(null,e,0)}catch(s){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(e){t=r}try{s="function"==typeof clearTimeout?clearTimeout:o}catch(e){s=o}}();var a,i=[],l=!1,h=-1;function u(){l&&a&&(l=!1,a.length?i=a.concat(i):h=-1,i.length&&d())}function d(){if(!l){var e=c(u);l=!0;for(var t=i.length;t;){for(a=i,i=[];++h<t;)a&&a[h].run();h=-1,t=i.length}a=null,l=!1,function(e){if(s===clearTimeout)return clearTimeout(e);if((s===o||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{return s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)t[s-1]=arguments[s];i.push(new f(e,t)),1!==i.length||l||c(d)},f.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(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},576:(e,t,s)=>{"use strict";s.r(t),s.d(t,{WebsocketProvider:()=>Ce,messageAuth:()=>_e,messageAwareness:()=>ve,messageQueryAwareness:()=>ye,messageSync:()=>me});var n=s(206);const r=()=>new Map,o=(e,t,s)=>{let n=e.get(t);return void 0===n&&e.set(t,n=s()),n},c=()=>new Set,a=String.fromCharCode,i=(String.fromCodePoint,a(65535),/^\s*/g),l=/([A-Z])/g,h=(e,t)=>(e=>e.replace(i,""))(e.replace(l,(e=>`${t}${(e=>e.toLowerCase())(e)}`))),u="undefined"!=typeof TextEncoder?new TextEncoder:null,d=u?e=>u.encode(e):e=>{const t=unescape(encodeURIComponent(e)),s=t.length,n=new Uint8Array(s);for(let e=0;e<s;e++)n[e]=t.codePointAt(e);return n};let f="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});f&&1===f.decode(new Uint8Array).length&&(f=null);let p=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}},g=!0;try{"undefined"!=typeof localStorage&&localStorage&&(p=localStorage,g=!1)}catch(e){}const b=p,w=Array.from,m=(Array.isArray,Object.assign,Object.keys),y=e=>m(e).length,v=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),_=(Object.freeze,(e,t)=>{if(null==e||null==t)return((e,t)=>e===t)(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;break;case Set:if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;break;case Map:if(e.size!==t.size)return!1;for(const s of e.keys())if(!t.has(s)||!_(e.get(s),t.get(s)))return!1;break;case Object:if(y(e)!==y(t))return!1;for(const s in e)if(!v(e,s)||!_(e[s],t[s]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(!_(e[s],t[s]))return!1;break;default:return!1}return!0});var I=s(907);const S=void 0!==I&&I.release&&/node|io\.js/.test(I.release.name)&&"[object process]"===Object.prototype.toString.call(void 0!==I?I:0),U="undefined"!=typeof window&&"undefined"!=typeof document&&!S;let A;"undefined"!=typeof navigator&&/Mac/.test(navigator.platform);const k=[],C=e=>(()=>{if(void 0===A)if(S){A=r();const e=I.argv;let t=null;for(let s=0;s<e.length;s++){const n=e[s];"-"===n[0]?(null!==t&&A.set(t,""),t=n):null!==t?(A.set(t,n),t=null):k.push(n)}null!==t&&A.set(t,"")}else"object"==typeof location?(A=r(),(location.search||"?").slice(1).split("&").forEach((e=>{if(0!==e.length){const[t,s]=e.split("=");A.set(`--${h(t,"-")}`,s),A.set(`-${h(t,"-")}`,s)}}))):A=r();return A})().has(e),L=e=>{return void 0===(t=S?I.env[e.toUpperCase().replaceAll("-","_")]:b.getItem(e))?null:t;var t},T=e=>C("--"+e)||null!==L(e);var M;T("production"),S&&(M=I.env.FORCE_COLOR,["true","1","2"].includes(M))||!C("--no-colors")&&!T("no-color")&&(!S||I.stdout.isTTY)&&(!S||C("--color")||null!==L("COLORTERM")||(L("TERM")||"").includes("color"));const E=U?e=>{let t="";for(let s=0;s<e.byteLength;s++)t+=a(e[s]);return btoa(t)}:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),O=U?e=>{const t=atob(e),s=(n=t.length,new Uint8Array(n));var n;for(let e=0;e<t.length;e++)s[e]=t.charCodeAt(e);return s}:e=>{const t=Buffer.from(e,"base64");return s=t.buffer,n=t.byteOffset,r=t.byteLength,new Uint8Array(s,n,r);var s,n,r},R=new Map,x="undefined"==typeof BroadcastChannel?class{constructor(e){var t;this.room=e,this.onmessage=null,this._onChange=t=>t.key===e&&null!==this.onmessage&&this.onmessage({data:O(t.newValue||"")}),t=this._onChange,g||addEventListener("storage",t)}postMessage(e){b.setItem(this.room,E(new Uint8Array(e)))}close(){var e;e=this._onChange,g||removeEventListener("storage",e)}}:BroadcastChannel,B=e=>o(R,e,(()=>{const t=c(),s=new x(e);return s.onmessage=e=>t.forEach((t=>t(e.data,"broadcastchannel"))),{bc:s,subs:t}})),D=(e,t,s=null)=>{const n=B(e);n.bc.postMessage(t),n.subs.forEach((e=>e(t,s)))},N=Date.now,j=Math.floor,P=(Math.ceil,Math.abs,Math.imul,Math.round,Math.log10,Math.log2,Math.log,Math.sqrt,(e,t)=>e<t?e:t),H=(Number.isNaN,Math.pow),$=(Math.sign,128),z=127;class W{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const F=()=>new W,V=e=>{let t=e.cpos;for(let s=0;s<e.bufs.length;s++)t+=e.bufs[s].length;return t},G=e=>{const t=new Uint8Array(V(e));let s=0;for(let n=0;n<e.bufs.length;n++){const r=e.bufs[n];t.set(r,s),s+=r.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),s),t},J=(e,t)=>{const s=e.cbuf.length;e.cpos===s&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*s),e.cpos=0),e.cbuf[e.cpos++]=t},Y=(e,t)=>{for(;t>z;)J(e,$|z&t),t=j(t/128);J(e,z&t)},q=new Uint8Array(3e4),Q=q.length/3,X=u&&u.encodeInto?(e,t)=>{if(t.length<Q){const s=u.encodeInto(t,q).written||0;Y(e,s);for(let t=0;t<s;t++)J(e,q[t])}else Z(e,d(t))}:(e,t)=>{const s=unescape(encodeURIComponent(t)),n=s.length;Y(e,n);for(let t=0;t<n;t++)J(e,s.codePointAt(t))},Z=(e,t)=>{Y(e,t.byteLength),((e,t)=>{const s=e.cbuf.length,n=e.cpos,r=P(s-n,t.length),o=t.length-r;var c,a;e.cbuf.set(t.subarray(0,r),n),e.cpos+=r,o>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array((c=2*s)>(a=o)?c:a),e.cbuf.set(t.subarray(r)),e.cpos=o)})(e,t)};new DataView(new ArrayBuffer(4));const K=Number.MAX_SAFE_INTEGER,ee=(Number.MIN_SAFE_INTEGER,Number.isInteger,Number.isNaN,Number.parseInt,e=>new Error(e)),te=ee("Unexpected end of array"),se=ee("Integer out of Range");class ne{constructor(e){this.arr=e,this.pos=0}}const re=e=>new ne(e),oe=e=>((e,t)=>{const s=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,s})(e,ae(e)),ce=e=>e.arr[e.pos++],ae=e=>{let t=0,s=1;const n=e.arr.length;for(;e.pos<n;){const n=e.arr[e.pos++];if(t+=(n&z)*s,s*=128,n<$)return t;if(t>K)throw se}throw te},ie=f?e=>f.decode(oe(e)):e=>{let t=ae(e);if(0===t)return"";{let s=String.fromCodePoint(ce(e));if(--t<100)for(;t--;)s+=String.fromCodePoint(ce(e));else for(;t>0;){const n=t<1e4?t:1e4,r=e.arr.subarray(e.pos,e.pos+n);e.pos+=n,s+=String.fromCodePoint.apply(null,r),t-=n}return decodeURIComponent(escape(s))}},le=(e,t)=>{Y(e,0);const s=n.encodeStateVector(t);Z(e,s)},he=(e,t,s)=>{Y(e,1),Z(e,n.encodeStateAsUpdate(t,s))},ue=(e,t,s)=>{try{n.applyUpdate(t,oe(e),s)}catch(e){console.error("Caught error while handling a Yjs update",e)}},de=ue;class fe{constructor(){this._observers=r()}on(e,t){o(this._observers,e,c).add(t)}once(e,t){const s=(...n)=>{this.off(e,s),t(...n)};this.on(e,s)}off(e,t){const s=this._observers.get(e);void 0!==s&&(s.delete(t),0===s.size&&this._observers.delete(e))}emit(e,t){return w((this._observers.get(e)||r()).values()).forEach((e=>e(...t)))}destroy(){this._observers=r()}}class pe extends fe{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval((()=>{const e=N();null!==this.getLocalState()&&15e3<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const t=[];this.meta.forEach(((s,n)=>{n!==this.clientID&&3e4<=e-s.lastUpdated&&this.states.has(n)&&t.push(n)})),t.length>0&&ge(this,t,"timeout")}),j(3e3)),e.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(e){const t=this.clientID,s=this.meta.get(t),n=void 0===s?0:s.clock+1,r=this.states.get(t);null===e?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:n,lastUpdated:N()});const o=[],c=[],a=[],i=[];null===e?i.push(t):null==r?null!=e&&o.push(t):(c.push(t),_(r,e)||a.push(t)),(o.length>0||a.length>0||i.length>0)&&this.emit("change",[{added:o,updated:a,removed:i},"local"]),this.emit("update",[{added:o,updated:c,removed:i},"local"])}setLocalStateField(e,t){const s=this.getLocalState();null!==s&&this.setLocalState({...s,[e]:t})}getStates(){return this.states}}const ge=(e,t,s)=>{const n=[];for(let s=0;s<t.length;s++){const r=t[s];if(e.states.has(r)){if(e.states.delete(r),r===e.clientID){const t=e.meta.get(r);e.meta.set(r,{clock:t.clock+1,lastUpdated:N()})}n.push(r)}}n.length>0&&(e.emit("change",[{added:[],updated:[],removed:n},s]),e.emit("update",[{added:[],updated:[],removed:n},s]))},be=(e,t,s=e.states)=>{const n=t.length,r=F();Y(r,n);for(let o=0;o<n;o++){const n=t[o],c=s.get(n)||null,a=e.meta.get(n).clock;Y(r,n),Y(r,a),X(r,JSON.stringify(c))}return G(r)};var we=s(907);const me=0,ye=3,ve=1,_e=2,Ie=[];Ie[me]=(e,t,s,n,r)=>{Y(e,me);const o=((e,t,s,n)=>{const r=ae(e);switch(r){case 0:((e,t,s)=>{he(t,s,oe(e))})(e,t,s);break;case 1:ue(e,s,n);break;case 2:de(e,s,n);break;default:throw new Error("Unknown message type")}return r})(t,e,s.doc,s);n&&1===o&&!s.synced&&(s.synced=!0)},Ie[ye]=(e,t,s,n,r)=>{Y(e,ve),Z(e,be(s.awareness,Array.from(s.awareness.getStates().keys())))},Ie[ve]=(e,t,s,n,r)=>{((e,t,s)=>{const n=re(t),r=N(),o=[],c=[],a=[],i=[],l=ae(n);for(let t=0;t<l;t++){const t=ae(n);let s=ae(n);const l=JSON.parse(ie(n)),h=e.meta.get(t),u=e.states.get(t),d=void 0===h?0:h.clock;(d<s||d===s&&null===l&&e.states.has(t))&&(null===l?t===e.clientID&&null!=e.getLocalState()?s++:e.states.delete(t):e.states.set(t,l),e.meta.set(t,{clock:s,lastUpdated:r}),void 0===h&&null!==l?o.push(t):void 0!==h&&null===l?i.push(t):null!==l&&(_(l,u)||a.push(t),c.push(t)))}(o.length>0||a.length>0||i.length>0)&&e.emit("change",[{added:o,updated:a,removed:i},s]),(o.length>0||c.length>0||i.length>0)&&e.emit("update",[{added:o,updated:c,removed:i},s])})(s.awareness,oe(t),s)},Ie[_e]=(e,t,s,n,r)=>{((e,t,s)=>{0===ae(e)&&s(0,ie(e))})(t,s.doc,((e,t)=>Se(s,t)))};const Se=(e,t)=>console.warn(`Permission denied to access ${e.url}.\n${t}`),Ue=(e,t,s)=>{const n=re(t),r=F(),o=ae(n),c=e.messageHandlers[o];return c?c(r,n,e,s,o):console.error("Unable to compute message"),r},Ae=e=>{if(e.shouldConnect&&null===e.ws){const t=new e._WS(e.url);t.binaryType="arraybuffer",e.ws=t,e.wsconnecting=!0,e.wsconnected=!1,e.synced=!1,t.onmessage=s=>{e.wsLastMessageReceived=N();const n=Ue(e,new Uint8Array(s.data),!0);V(n)>1&&t.send(G(n))},t.onerror=t=>{e.emit("connection-error",[t,e])},t.onclose=t=>{e.emit("connection-close",[t,e]),e.ws=null,e.wsconnecting=!1,e.wsconnected?(e.wsconnected=!1,e.synced=!1,ge(e.awareness,Array.from(e.awareness.getStates().keys()).filter((t=>t!==e.doc.clientID)),e),e.emit("status",[{status:"disconnected"}])):e.wsUnsuccessfulReconnects++,setTimeout(Ae,P(100*H(2,e.wsUnsuccessfulReconnects),e.maxBackoffTime),e)},t.onopen=()=>{e.wsLastMessageReceived=N(),e.wsconnecting=!1,e.wsconnected=!0,e.wsUnsuccessfulReconnects=0,e.emit("status",[{status:"connected"}]);const s=F();if(Y(s,me),le(s,e.doc),t.send(G(s)),null!==e.awareness.getLocalState()){const s=F();Y(s,ve),Z(s,be(e.awareness,[e.doc.clientID])),t.send(G(s))}},e.emit("status",[{status:"connecting"}])}},ke=(e,t)=>{const s=e.ws;e.wsconnected&&s&&s.readyState===s.OPEN&&s.send(t),e.bcconnected&&D(e.bcChannel,t,e)};class Ce extends fe{constructor(e,t,s,{connect:n=!0,awareness:r=new pe(s),params:o={},WebSocketPolyfill:c=WebSocket,resyncInterval:a=-1,maxBackoffTime:i=2500,disableBc:l=!1}={}){for(super();"/"===e[e.length-1];)e=e.slice(0,e.length-1);const h=(e=>((e,t)=>{const s=[];for(const n in e)s.push(t(e[n],n));return s})(e,((e,t)=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&"))(o);this.maxBackoffTime=i,this.bcChannel=e+"/"+t,this.url=e+"/"+t+(0===h.length?"":"?"+h),this.roomname=t,this.doc=s,this._WS=c,this.awareness=r,this.wsconnected=!1,this.wsconnecting=!1,this.bcconnected=!1,this.disableBc=l,this.wsUnsuccessfulReconnects=0,this.messageHandlers=Ie.slice(),this._synced=!1,this.ws=null,this.wsLastMessageReceived=0,this.shouldConnect=n,this._resyncInterval=0,a>0&&(this._resyncInterval=setInterval((()=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){const e=F();Y(e,me),le(e,s),this.ws.send(G(e))}}),a)),this._bcSubscriber=(e,t)=>{if(t!==this){const t=Ue(this,new Uint8Array(e),!1);V(t)>1&&D(this.bcChannel,G(t),this)}},this._updateHandler=(e,t)=>{if(t!==this){const t=F();Y(t,me),((e,t)=>{Y(e,2),Z(e,t)})(t,e),ke(this,G(t))}},this.doc.on("update",this._updateHandler),this._awarenessUpdateHandler=({added:e,updated:t,removed:s},n)=>{const o=e.concat(t).concat(s),c=F();Y(c,ve),Z(c,be(r,o)),ke(this,G(c))},this._exitHandler=()=>{ge(this.awareness,[s.clientID],"app closed")},S&&void 0!==we&&we.on("exit",this._exitHandler),r.on("update",this._awarenessUpdateHandler),this._checkInterval=setInterval((()=>{this.wsconnected&&3e4<N()-this.wsLastMessageReceived&&this.ws.close()}),3e3),n&&this.connect()}get synced(){return this._synced}set synced(e){this._synced!==e&&(this._synced=e,this.emit("synced",[e]),this.emit("sync",[e]))}destroy(){0!==this._resyncInterval&&clearInterval(this._resyncInterval),clearInterval(this._checkInterval),this.disconnect(),S&&void 0!==we&&we.off("exit",this._exitHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.doc.off("update",this._updateHandler),super.destroy()}connectBc(){if(this.disableBc)return;var e,t;this.bcconnected||(e=this.bcChannel,t=this._bcSubscriber,B(e).subs.add(t),this.bcconnected=!0);const s=F();Y(s,me),le(s,this.doc),D(this.bcChannel,G(s),this);const n=F();Y(n,me),he(n,this.doc),D(this.bcChannel,G(n),this);const r=F();Y(r,ye),D(this.bcChannel,G(r),this);const o=F();Y(o,ve),Z(o,be(this.awareness,[this.doc.clientID])),D(this.bcChannel,G(o),this)}disconnectBc(){const e=F();Y(e,ve),Z(e,be(this.awareness,[this.doc.clientID],new Map)),ke(this,G(e)),this.bcconnected&&(((e,t)=>{const s=B(e);s.subs.delete(t)&&0===s.subs.size&&(s.bc.close(),R.delete(e))})(this.bcChannel,this._bcSubscriber),this.bcconnected=!1)}disconnect(){this.shouldConnect=!1,this.disconnectBc(),null!==this.ws&&this.ws.close()}connect(){this.shouldConnect=!0,this.wsconnected||null!==this.ws||(Ae(this),this.connectBc())}}}}]);
|
jupyter_docprovider-1.1.0a0/jupyter_docprovider/labextension/static/703.96968af03651921862ee.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[703],{703:(e,t,o)=>{o.r(t),o.d(t,{default:()=>D});var r,a=o(782),n=o(501),i=o(256),s=o(594),l=o(969),d=o(637),c=o(937),u=o(295),p=o(981),v=o(877),g=o(0),h=o(727),b=o(791),w=o(314);!function(e){e.openPath="filebrowser:open-path"}(r||(r={}));const m="api/collaboration/timeline",y="The file %1 has been opened with two different views. This is not supported. Please close this view; otherwise, some of your edits may not be saved properly.",f={id:"@jupyter/docprovider-extension:drive",description:"The default collaborative drive provider",provides:h.ICollaborativeDrive,requires:[v.ITranslator],optional:[h.IGlobalAwareness],activate:(e,t,o)=>{const r=t.load("jupyter_collaboration"),a=new b.YDrive(e.serviceManager.user,r,o);return e.serviceManager.contents.addDrive(a),a}},x={id:"@jupyter/docprovider-extension:yfile",description:"Plugin to register the shared model factory for the content type 'file'",autoStart:!0,requires:[h.ICollaborativeDrive],optional:[],activate:(e,t)=>{t.sharedModelFactory.registerDocumentFactory("file",(()=>new g.YFile))}},I={id:"@jupyter/docprovider-extension:ynotebook",description:"Plugin to register the shared model factory for the content type 'notebook'",autoStart:!0,requires:[h.ICollaborativeDrive],optional:[p.ISettingRegistry],activate:(e,t,o)=>{let r=!0;o&&o.load("@jupyterlab/notebook-extension:tracker").then((e=>{const t=e=>{var t;const o=null==e?void 0:e.get("experimentalEnableDocumentWideUndoRedo").composite;r=null===(t=!o)||void 0===t||t};t(e),e.changed.connect((e=>t(e)))})),t.sharedModelFactory.registerDocumentFactory("notebook",(()=>new g.YNotebook({disableDocumentWideUndoRedo:r})))}},k={id:"@jupyter/docprovider-extension:statusBarTimeline",description:"Plugin to add a timeline slider to the status bar",autoStart:!0,requires:[l.IStatusBar,h.ICollaborativeDrive],activate:async(e,t,o)=>{try{let r=null,a=null;const n=async(t,r)=>{if(r&&"RTC"===t.split(":")[0]&&o){t=t.slice(o.name.length+1),a&&(a.dispose(),a=null);const[n,s]=r.split(":"),l=o.providers.get(`${n}:${s}:${t}`),d=w.URLExt.join(e.serviceManager.serverSettings.baseUrl,m,t);a=new b.TimelineWidget(d,l,l.contentType,l.format,m);const c=document.getElementById("jp-slider-status-bar");c&&!a.isAttached&&i.Widget.attach(a,c)}};e.shell.currentChanged&&e.shell.currentChanged.connect((async(e,t)=>{const o=t.newValue;a&&(a.dispose(),a=null),o&&"context"in o&&(await o.context.ready,await n(o.context.path,o.context.model.sharedModel.getState("document_id")))})),t&&(r||(r=new i.Widget,r.addClass("jp-StatusBar-GroupItem"),r.addClass("jp-mod-highlighted"),r.id="jp-slider-status-bar",t.registerStatusItem("jp-slider-status-bar",{item:r,align:"left",rank:4,isActive:()=>{const t=e.shell.currentWidget;if(t&&t.context&&"string"==typeof t.context.path){const e=t.context.path;return!!t.context.model.sharedModel.getState("document_id")&&"RTC"===e.split(":")[0]}return!1}})))}catch(e){console.error("Failed to activate statusBarTimeline plugin:",e)}}},_={id:"@jupyter/docprovider-extension:defaultFileBrowser",description:"The default file browser factory provider",provides:s.IDefaultFileBrowser,requires:[h.ICollaborativeDrive,s.IFileBrowserFactory],optional:[a.IRouter,a.JupyterFrontEnd.ITreeResolver,a.ILabShell,v.ITranslator],activate:async(e,t,o,r,a,n,i)=>{const{commands:s}=e,l=(null!=i?i:v.nullTranslator).load("jupyterlab");e.serviceManager.contents.addDrive(t);const d=o.createFileBrowser("filebrowser",{auto:!1,restore:!1,driveName:t.name});return d.node.setAttribute("role","region"),d.node.setAttribute("aria-label",l.__("File Browser Section")),C.restoreBrowser(d,s,r,a,n),d}},j={id:"@jupyter/docprovider-extension:logger",description:"A logging plugin for debugging purposes.",autoStart:!0,optional:[c.ILoggerRegistry,d.IEditorTracker,u.INotebookTracker,v.ITranslator],activate:(e,t,o,r,a)=>{const i=(null!=a?a:v.nullTranslator).load("jupyter_collaboration"),s="https://schema.jupyter.org/jupyter_collaboration/session/v1";if(!t)return void e.serviceManager.events.stream.connect(((e,t)=>{var o,r;t.schema_id===s&&(console.debug(`[${t.room}(${t.path})] ${null!==(o=t.action)&&void 0!==o?o:""}: ${null!==(r=t.msg)&&void 0!==r?r:""}`),"WARNING"===t.level&&(0,n.showDialog)({title:i.__("Warning"),body:i.__(y,t.path),buttons:[n.Dialog.okButton()]}))}));const l=new Map,d=(e,o)=>{const r=t.getLogger(o.context.path);l.set(o.context.localPath,r),o.disposed.connect((e=>{l.delete(e.context.localPath)}))};o&&o.widgetAdded.connect(d),r&&r.widgetAdded.connect(d),(async()=>{var t,o;const{events:r}=e.serviceManager;for await(const e of r.stream)if(e.schema_id===s){const r=l.get(e.path);null==r||r.log({type:"text",level:e.level.toLowerCase(),data:`[${e.room}] ${null!==(t=e.action)&&void 0!==t?t:""}: ${null!==(o=e.msg)&&void 0!==o?o:""}`}),"WARNING"===e.level&&(0,n.showDialog)({title:i.__("Warning"),body:i.__(y,e.path),buttons:[n.Dialog.warnButton({label:i.__("Ok")})]})}})()}};var C;!function(e){e.restoreBrowser=async function(e,t,o,a,n){const i="jp-mod-restoring";if(e.addClass(i),!o)return await e.model.restore(e.id),await e.model.refresh(),void e.removeClass(i);const s=async()=>{o.routed.disconnect(s);const l=await(null==a?void 0:a.paths);(null==l?void 0:l.file)||(null==l?void 0:l.browser)?(await e.model.restore(e.id,!1),l.file&&await t.execute(r.openPath,{path:l.file,dontShowBrowser:!0}),l.browser&&await t.execute(r.openPath,{path:l.browser,dontShowBrowser:!0})):(await e.model.restore(e.id),await e.model.refresh()),e.removeClass(i),(null==n?void 0:n.isEmpty("main"))&&t.execute("launcher:create")};o.routed.connect(s)}}(C||(C={}));const S={id:"@jupyter/docprovider-extension:notebook-cell-executor",description:"Add notebook cell executor that uses REST API instead of kernel protocol over WebSocket.",autoStart:!0,provides:u.INotebookCellExecutor,activate:e=>"true"===w.PageConfig.getOption("serverSideExecution")?new b.NotebookCellServerExecutor({serverSettings:e.serviceManager.serverSettings}):Object.freeze({runCell:u.runCell})},T={id:"@jupyter/docprovider-extension:forkManager",autoStart:!0,requires:[h.ICollaborativeDrive],provides:b.IForkManagerToken,activate:(e,t)=>{const o=e.serviceManager.events;return new b.ForkManager({drive:t,eventManager:o})}},D=[f,x,I,_,j,S,k,T]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,o,a,n,i,l,u,s,f,d,p,c,h,v,b,y,m,g,j,w,P,S={496:(e,r,t)=>{var o={"./index":()=>Promise.all([t.e(266),t.e(813),t.e(703)]).then((()=>()=>t(703))),"./extension":()=>Promise.all([t.e(266),t.e(813),t.e(703)]).then((()=>()=>t(703))),"./style":()=>t.e(944).then((()=>()=>t(944)))},a=(e,r)=>(t.R=r,r=t.o(o,e)?o[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),n=(e,r)=>{if(t.S){var o="default",a=t.S[o];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[o]=e,t.I(o,r)}};t.d(r,{get:()=>a,init:()=>n})}},k={};function x(e){var r=k[e];if(void 0!==r)return r.exports;var t=k[e]={id:e,exports:{}};return S[e](t,t.exports,x),t.exports}x.m=S,x.c=k,x.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return x.d(r,{a:r}),r},x.d=(e,r)=>{for(var t in r)x.o(r,t)&&!x.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},x.f={},x.e=e=>Promise.all(Object.keys(x.f).reduce(((r,t)=>(x.f[t](e,r),r)),[])),x.u=e=>e+"."+{240:"5aa622ea121e34d22c41",444:"12adfae9a2b50e91531f",576:"21a3c1a9ebaebb58d346",703:"96968af03651921862ee",944:"b85c55dff0f14165f872"}[e]+".js?v="+{240:"5aa622ea121e34d22c41",444:"12adfae9a2b50e91531f",576:"21a3c1a9ebaebb58d346",703:"96968af03651921862ee",944:"b85c55dff0f14165f872"}[e],x.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),x.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@jupyter/docprovider-extension:",x.l=(t,o,a,n)=>{if(e[t])e[t].push(o);else{var i,l;if(void 0!==a)for(var u=document.getElementsByTagName("script"),s=0;s<u.length;s++){var f=u[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+a){i=f;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,x.nc&&i.setAttribute("nonce",x.nc),i.setAttribute("data-webpack",r+a),i.src=t),e[t]=[o];var d=(r,o)=>{i.onerror=i.onload=null,clearTimeout(p);var a=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(o))),r)return r(o)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},x.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{x.S={};var e={},r={};x.I=(t,o)=>{o||(o=[]);var a=r[t];if(a||(a=r[t]={}),!(o.indexOf(a)>=0)){if(o.push(a),e[t])return e[t];x.o(x.S,t)||(x.S[t]={});var n=x.S[t],i="@jupyter/docprovider-extension",l=(e,r,t,o)=>{var a=n[e]=n[e]||{},l=a[r];(!l||!l.loaded&&(!o!=!l.eager?o:i>l.from))&&(a[r]={get:t,from:i,eager:!!o})},u=[];return"default"===t&&(l("@jupyter/collaborative-drive","3.1.0-alpha.0",(()=>Promise.all([x.e(262),x.e(444)]).then((()=>()=>x(444))))),l("@jupyter/docprovider-extension","3.1.0-alpha.0",(()=>Promise.all([x.e(266),x.e(813),x.e(703)]).then((()=>()=>x(703))))),l("@jupyter/docprovider","3.1.0-alpha.0",(()=>Promise.all([x.e(266),x.e(262),x.e(240)]).then((()=>()=>x(240))))),l("y-websocket","1.5.4",(()=>Promise.all([x.e(576),x.e(206)]).then((()=>()=>x(576)))))),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;x.g.importScripts&&(e=x.g.location+"");var r=x.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),x.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),o=t[1]?r(t[1]):[];return t[2]&&(o.length++,o.push.apply(o,r(t[2]))),t[3]&&(o.push([]),o.push.apply(o,r(t[3]))),o},o=(e,r)=>{e=t(e),r=t(r);for(var o=0;;){if(o>=e.length)return o<r.length&&"u"!=(typeof r[o])[0];var a=e[o],n=(typeof a)[0];if(o>=r.length)return"u"==n;var i=r[o],l=(typeof i)[0];if(n!=l)return"o"==n&&"n"==l||"s"==l||"u"==n;if("o"!=n&&"u"!=n&&a!=i)return a<i;o++}},a=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var o=1,n=1;n<e.length;n++)o--,t+="u"==(typeof(l=e[n]))[0]?"-":(o>0?".":"")+(o=2,l);return t}var i=[];for(n=1;n<e.length;n++){var l=e[n];i.push(0===l?"not("+u()+")":1===l?"("+u()+" || "+u()+")":2===l?i.pop()+" "+i.pop():a(l))}return u();function u(){return i.pop().replace(/^\((.+)\)$/,"$1")}},n=(e,r)=>{if(0 in e){r=t(r);var o=e[0],a=o<0;a&&(o=-o-1);for(var i=0,l=1,u=!0;;l++,i++){var s,f,d=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(f=(typeof(s=r[i]))[0]))return!u||("u"==d?l>o&&!a:""==d!=a);if("u"==f){if(!u||"u"!=d)return!1}else if(u)if(d==f)if(l<=o){if(s!=e[l])return!1}else{if(a?s>e[l]:s<e[l])return!1;s!=e[l]&&(u=!1)}else if("s"!=d&&"n"!=d){if(a||l<=o)return!1;u=!1,l--}else{if(l<=o||f<d!=a)return!1;u=!1}else"s"!=d&&"n"!=d&&(u=!1,l--)}}var p=[],c=p.pop.bind(p);for(i=1;i<e.length;i++){var h=e[i];p.push(1==h?c()|c():2==h?c()&c():h?n(h,r):!c())}return!!c()},i=(e,r)=>e&&x.o(e,r),l=e=>(e.loaded=1,e.get()),u=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),s=(e,r,t,a)=>{var i=a?u(e[r]):e[r];return(r=Object.keys(i).reduce(((e,r)=>!n(t,r)||e&&!o(e,r)?e:r),0))&&i[r]},f=(e,r,t)=>{var a=t?u(e[r]):e[r];return Object.keys(a).reduce(((e,r)=>!e||!a[e].loaded&&o(e,r)?r:e),0)},d=(e,r,t,o)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+a(o)+")",p=(e,r,t,o,n)=>{var i=e[t];return"No satisfying version ("+a(o)+")"+(n?" for eager consumption":"")+" of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(i).map((e=>e+" from "+i[e].from)).join(", ")},c=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},b=(e,r,t)=>t?t():((e,r)=>c("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),y=(v=e=>function(r,t,o,a,n){var i=x.I(r);return i&&i.then&&!o?i.then(e.bind(e,r,x.S[r],t,!1,a,n)):e(r,x.S[r],t,o,a,n)})(((e,r,t,o,a,n)=>{if(!i(r,t))return b(e,t,n);var u=s(r,t,a,o);return u?l(u):n?n():void c(p(r,e,t,a,o))})),m=v(((e,r,t,o,a,u)=>{if(!i(r,t))return b(e,t,u);var s=f(r,t,o);return n(a,s)||h(d(r,t,s,a)),l(r[t][s])})),g={},j={314:()=>m("default","@jupyterlab/coreutils",!1,[1,6,3,1]),501:()=>m("default","@jupyterlab/apputils",!1,[1,4,4,1]),877:()=>m("default","@jupyterlab/translation",!1,[1,4,3,1]),0:()=>m("default","@jupyter/ydoc",!1,[1,3,0,0,,"a3"]),256:()=>m("default","@lumino/widgets",!1,[1,2,3,1,,"alpha",0]),295:()=>m("default","@jupyterlab/notebook",!1,[1,4,3,1]),594:()=>m("default","@jupyterlab/filebrowser",!1,[1,4,3,1]),637:()=>m("default","@jupyterlab/fileeditor",!1,[1,4,3,1]),727:()=>m("default","@jupyter/collaborative-drive",!1,[1,3,1,0,,"alpha",0],(()=>Promise.all([x.e(262),x.e(444)]).then((()=>()=>x(444))))),782:()=>m("default","@jupyterlab/application",!1,[1,4,3,1]),791:()=>m("default","@jupyter/docprovider",!1,[1,3,1,0,,"alpha",0],(()=>Promise.all([x.e(262),x.e(240)]).then((()=>()=>x(240))))),937:()=>m("default","@jupyterlab/logconsole",!1,[1,4,3,1]),969:()=>m("default","@jupyterlab/statusbar",!1,[1,4,3,1]),981:()=>m("default","@jupyterlab/settingregistry",!1,[1,4,3,1]),262:()=>m("default","@lumino/coreutils",!1,[1,2,0,0]),33:()=>m("default","@jupyterlab/services",!1,[1,7,3,1]),345:()=>m("default","react",!1,[1,18,2,0]),560:()=>y("default","y-websocket",!1,[1,1,3,15],(()=>Promise.all([x.e(576),x.e(206)]).then((()=>()=>x(576))))),602:()=>m("default","@lumino/signaling",!1,[1,2,0,0]),963:()=>m("default","@jupyterlab/ui-components",!1,[1,4,3,1]),206:()=>m("default","yjs",!1,[1,13,5,40])},w={206:[206],240:[33,345,560,602,963],262:[262],266:[314,501,877],813:[0,256,295,594,637,727,782,791,937,969,981]},P={},x.f.consumes=(e,r)=>{x.o(w,e)&&w[e].forEach((e=>{if(x.o(g,e))return r.push(g[e]);if(!P[e]){var t=r=>{g[e]=0,x.m[e]=t=>{delete x.c[e],t.exports=r()}};P[e]=!0;var o=r=>{delete g[e],x.m[e]=t=>{throw delete x.c[e],r}};try{var a=j[e]();a.then?r.push(g[e]=a.then(t).catch(o)):t(a)}catch(e){o(e)}}}))},(()=>{var e={552:0};x.f.j=(r,t)=>{var o=x.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else if(/^(2(06|62|66)|813)$/.test(r))e[r]=0;else{var a=new Promise(((t,a)=>o=e[r]=[t,a]));t.push(o[2]=a);var n=x.p+x.u(r),i=new Error;x.l(n,(t=>{if(x.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var a=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+n+")",i.name="ChunkLoadError",i.type=a,i.request=n,o[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var o,a,[n,i,l]=t,u=0;if(n.some((r=>0!==e[r]))){for(o in i)x.o(i,o)&&(x.m[o]=i[o]);l&&l(x)}for(r&&r(t);u<n.length;u++)a=n[u],x.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),x.nc=void 0;var E=x(496);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["@jupyter/docprovider-extension"]=E})();
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
"packages": [
|
|
3
3
|
{
|
|
4
4
|
"name": "@jupyter/collaboration",
|
|
5
|
-
"versionInfo": "3.
|
|
5
|
+
"versionInfo": "3.1.0-alpha.0",
|
|
6
6
|
"licenseId": "BSD-3-Clause",
|
|
7
7
|
"extractedText": ""
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"name": "@jupyter/collaborative-drive",
|
|
11
|
-
"versionInfo": "3.
|
|
11
|
+
"versionInfo": "3.1.0-alpha.0",
|
|
12
12
|
"licenseId": "BSD-3-Clause",
|
|
13
13
|
"extractedText": ""
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "@jupyter/docprovider",
|
|
17
|
-
"versionInfo": "3.
|
|
17
|
+
"versionInfo": "3.1.0-alpha.0",
|
|
18
18
|
"licenseId": "BSD-3-Clause",
|
|
19
19
|
"extractedText": ""
|
|
20
20
|
},
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"name": "lib0",
|
|
29
|
-
"versionInfo": "0.2.
|
|
29
|
+
"versionInfo": "0.2.98",
|
|
30
30
|
"licenseId": "MIT",
|
|
31
31
|
"extractedText": "The MIT License (MIT)\n\nCopyright (c) 2019 Kevin Jahns <kevin.jahns@protonmail.com>.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
|
|
32
32
|
},
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/package.json
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter/docprovider",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0-alpha.0",
|
|
4
4
|
"description": "JupyterLab - Document Provider",
|
|
5
5
|
"homepage": "https://github.com/jupyterlab/jupyter-collaboration",
|
|
6
6
|
"bugs": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"watch": "tsc -b --watch"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@jupyter/collaborative-drive": "^3.
|
|
45
|
-
"@jupyter/ydoc": "^2.0.0 || ^3.0.0
|
|
44
|
+
"@jupyter/collaborative-drive": "^3.1.0-alpha.0",
|
|
45
|
+
"@jupyter/ydoc": "^2.0.0 || ^3.0.0",
|
|
46
46
|
"@jupyterlab/apputils": "^4.2.0",
|
|
47
47
|
"@jupyterlab/cells": "^4.2.0",
|
|
48
48
|
"@jupyterlab/coreutils": "^6.2.0",
|
|
@@ -13,18 +13,21 @@ export class TimelineWidget extends ReactWidget {
|
|
|
13
13
|
private provider: IForkProvider;
|
|
14
14
|
private contentType: string;
|
|
15
15
|
private format: string;
|
|
16
|
+
private documentTimelineUrl: string;
|
|
16
17
|
|
|
17
18
|
constructor(
|
|
18
19
|
apiURL: string,
|
|
19
20
|
provider: IForkProvider,
|
|
20
21
|
contentType: string,
|
|
21
|
-
format: string
|
|
22
|
+
format: string,
|
|
23
|
+
documentTimelineUrl: string
|
|
22
24
|
) {
|
|
23
25
|
super();
|
|
24
26
|
this.apiURL = apiURL;
|
|
25
27
|
this.provider = provider;
|
|
26
28
|
this.contentType = contentType;
|
|
27
29
|
this.format = format;
|
|
30
|
+
this.documentTimelineUrl = documentTimelineUrl;
|
|
28
31
|
this.addClass('jp-timelineSliderWrapper');
|
|
29
32
|
}
|
|
30
33
|
|
|
@@ -36,6 +39,7 @@ export class TimelineWidget extends ReactWidget {
|
|
|
36
39
|
provider={this.provider}
|
|
37
40
|
contentType={this.contentType}
|
|
38
41
|
format={this.format}
|
|
42
|
+
documentTimelineUrl={this.documentTimelineUrl}
|
|
39
43
|
/>
|
|
40
44
|
);
|
|
41
45
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Copyright (c) Jupyter Development Team.
|
|
2
|
+
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
|
|
4
|
+
import { ICollaborativeDrive } from '@jupyter/collaborative-drive';
|
|
5
|
+
import {
|
|
6
|
+
ForkManager,
|
|
7
|
+
JUPYTER_COLLABORATION_FORK_EVENTS_URI
|
|
8
|
+
} from '../forkManager';
|
|
9
|
+
import { Event } from '@jupyterlab/services';
|
|
10
|
+
import { Signal } from '@lumino/signaling';
|
|
11
|
+
import { requestAPI } from '../requests';
|
|
12
|
+
jest.mock('../requests');
|
|
13
|
+
|
|
14
|
+
const driveMock = {
|
|
15
|
+
name: 'rtc',
|
|
16
|
+
providers: new Map()
|
|
17
|
+
} as ICollaborativeDrive;
|
|
18
|
+
const stream = new Signal({});
|
|
19
|
+
const eventManagerMock = {
|
|
20
|
+
stream: stream as any
|
|
21
|
+
} as Event.IManager;
|
|
22
|
+
|
|
23
|
+
describe('@jupyter/docprovider', () => {
|
|
24
|
+
let manager: ForkManager;
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
manager = new ForkManager({
|
|
27
|
+
drive: driveMock,
|
|
28
|
+
eventManager: eventManagerMock
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
describe('forkManager', () => {
|
|
32
|
+
it('should have a type', () => {
|
|
33
|
+
expect(ForkManager).not.toBeUndefined();
|
|
34
|
+
});
|
|
35
|
+
it('should be able to create instance', () => {
|
|
36
|
+
expect(manager).toBeInstanceOf(ForkManager);
|
|
37
|
+
});
|
|
38
|
+
it('should be able to create new fork', async () => {
|
|
39
|
+
await manager.createFork({
|
|
40
|
+
rootId: 'root-uuid',
|
|
41
|
+
synchronize: true,
|
|
42
|
+
title: 'my fork label',
|
|
43
|
+
description: 'my fork description'
|
|
44
|
+
});
|
|
45
|
+
expect(requestAPI).toHaveBeenCalledWith(
|
|
46
|
+
'api/collaboration/fork/root-uuid',
|
|
47
|
+
{
|
|
48
|
+
method: 'PUT',
|
|
49
|
+
body: JSON.stringify({
|
|
50
|
+
title: 'my fork label',
|
|
51
|
+
description: 'my fork description',
|
|
52
|
+
synchronize: true
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
it('should be able to get all forks', async () => {
|
|
58
|
+
await manager.getAllForks('root-uuid');
|
|
59
|
+
expect(requestAPI).toHaveBeenCalledWith(
|
|
60
|
+
'api/collaboration/fork/root-uuid',
|
|
61
|
+
{
|
|
62
|
+
method: 'GET'
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
});
|
|
66
|
+
it('should be able to get delete forks', async () => {
|
|
67
|
+
await manager.deleteFork({ forkId: 'fork-uuid', merge: true });
|
|
68
|
+
expect(requestAPI).toHaveBeenCalledWith(
|
|
69
|
+
'api/collaboration/fork/fork-uuid?merge=true',
|
|
70
|
+
{
|
|
71
|
+
method: 'DELETE'
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
it('should be able to emit fork added signal', async () => {
|
|
76
|
+
const listener = jest.fn();
|
|
77
|
+
manager.forkAdded.connect(listener);
|
|
78
|
+
const data = {
|
|
79
|
+
schema_id: JUPYTER_COLLABORATION_FORK_EVENTS_URI,
|
|
80
|
+
action: 'create'
|
|
81
|
+
};
|
|
82
|
+
stream.emit(data);
|
|
83
|
+
expect(listener).toHaveBeenCalledWith(manager, data);
|
|
84
|
+
});
|
|
85
|
+
it('should be able to emit fork deleted signal', async () => {
|
|
86
|
+
const listener = jest.fn();
|
|
87
|
+
manager.forkDeleted.connect(listener);
|
|
88
|
+
const data = {
|
|
89
|
+
schema_id: JUPYTER_COLLABORATION_FORK_EVENTS_URI,
|
|
90
|
+
action: 'delete'
|
|
91
|
+
};
|
|
92
|
+
stream.emit(data);
|
|
93
|
+
expect(listener).toHaveBeenCalledWith(manager, data);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
});
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/component.tsx
RENAMED
|
@@ -19,13 +19,15 @@ type Props = {
|
|
|
19
19
|
provider: IForkProvider;
|
|
20
20
|
contentType: string;
|
|
21
21
|
format: string;
|
|
22
|
+
documentTimelineUrl: string;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export const TimelineSliderComponent: React.FC<Props> = ({
|
|
25
26
|
apiURL,
|
|
26
27
|
provider,
|
|
27
28
|
contentType,
|
|
28
|
-
format
|
|
29
|
+
format,
|
|
30
|
+
documentTimelineUrl
|
|
29
31
|
}) => {
|
|
30
32
|
const [data, setData] = useState({
|
|
31
33
|
roomId: '',
|
|
@@ -74,7 +76,6 @@ export const TimelineSliderComponent: React.FC<Props> = ({
|
|
|
74
76
|
setData(data);
|
|
75
77
|
setCurrentTimestampIndex(data.timestamps.length - 1);
|
|
76
78
|
provider.connectToForkDoc(data.forkRoom, data.sessionId);
|
|
77
|
-
|
|
78
79
|
sessionRef.current = await requestDocSession(
|
|
79
80
|
format,
|
|
80
81
|
contentType,
|
|
@@ -147,16 +148,21 @@ export const TimelineSliderComponent: React.FC<Props> = ({
|
|
|
147
148
|
function determineAction(currentTimestamp: number): 'undo' | 'redo' {
|
|
148
149
|
return currentTimestamp < currentTimestampIndex ? 'undo' : 'redo';
|
|
149
150
|
}
|
|
150
|
-
|
|
151
151
|
function extractFilenameFromURL(url: string): string {
|
|
152
152
|
try {
|
|
153
153
|
const parsedURL = new URL(url);
|
|
154
154
|
const pathname = parsedURL.pathname;
|
|
155
|
-
const segments = pathname.split('/');
|
|
156
155
|
|
|
157
|
-
|
|
156
|
+
const apiIndex = pathname.lastIndexOf(documentTimelineUrl);
|
|
157
|
+
if (apiIndex === -1) {
|
|
158
|
+
throw new Error(
|
|
159
|
+
`API segment "${documentTimelineUrl}" not found in URL.`
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return pathname.slice(apiIndex + documentTimelineUrl.length);
|
|
158
164
|
} catch (error) {
|
|
159
|
-
console.error('Invalid URL:', error);
|
|
165
|
+
console.error('Invalid URL or unable to extract filename:', error);
|
|
160
166
|
return '';
|
|
161
167
|
}
|
|
162
168
|
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Jupyter Development Team.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ICollaborativeDrive } from '@jupyter/collaborative-drive';
|
|
7
|
+
import { URLExt } from '@jupyterlab/coreutils';
|
|
8
|
+
import { Event } from '@jupyterlab/services';
|
|
9
|
+
import { ISignal, Signal } from '@lumino/signaling';
|
|
10
|
+
|
|
11
|
+
import { requestAPI, ROOM_FORK_URL } from './requests';
|
|
12
|
+
import {
|
|
13
|
+
IAllForksResponse,
|
|
14
|
+
IForkChangedEvent,
|
|
15
|
+
IForkCreationResponse,
|
|
16
|
+
IForkManager
|
|
17
|
+
} from './tokens';
|
|
18
|
+
import { IForkProvider } from './ydrive';
|
|
19
|
+
|
|
20
|
+
export const JUPYTER_COLLABORATION_FORK_EVENTS_URI =
|
|
21
|
+
'https://schema.jupyter.org/jupyter_collaboration/fork/v1';
|
|
22
|
+
|
|
23
|
+
export class ForkManager implements IForkManager {
|
|
24
|
+
constructor(options: ForkManager.IOptions) {
|
|
25
|
+
const { drive, eventManager } = options;
|
|
26
|
+
this._drive = drive;
|
|
27
|
+
this._eventManager = eventManager;
|
|
28
|
+
this._eventManager.stream.connect(this._handleEvent, this);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
get isDisposed(): boolean {
|
|
32
|
+
return this._disposed;
|
|
33
|
+
}
|
|
34
|
+
get forkAdded(): ISignal<ForkManager, IForkChangedEvent> {
|
|
35
|
+
return this._forkAddedSignal;
|
|
36
|
+
}
|
|
37
|
+
get forkDeleted(): ISignal<ForkManager, IForkChangedEvent> {
|
|
38
|
+
return this._forkDeletedSignal;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
dispose(): void {
|
|
42
|
+
if (this._disposed) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this._eventManager?.stream.disconnect(this._handleEvent);
|
|
46
|
+
this._disposed = true;
|
|
47
|
+
}
|
|
48
|
+
async createFork(options: {
|
|
49
|
+
rootId: string;
|
|
50
|
+
synchronize: boolean;
|
|
51
|
+
title?: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
}): Promise<IForkCreationResponse | undefined> {
|
|
54
|
+
const { rootId, title, description, synchronize } = options;
|
|
55
|
+
const init: RequestInit = {
|
|
56
|
+
method: 'PUT',
|
|
57
|
+
body: JSON.stringify({ title, description, synchronize })
|
|
58
|
+
};
|
|
59
|
+
const url = URLExt.join(ROOM_FORK_URL, rootId);
|
|
60
|
+
const response = await requestAPI<IForkCreationResponse>(url, init);
|
|
61
|
+
return response;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async getAllForks(rootId: string) {
|
|
65
|
+
const url = URLExt.join(ROOM_FORK_URL, rootId);
|
|
66
|
+
const init = { method: 'GET' };
|
|
67
|
+
const response = await requestAPI<IAllForksResponse>(url, init);
|
|
68
|
+
return response;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async deleteFork(options: { forkId: string; merge: boolean }): Promise<void> {
|
|
72
|
+
const { forkId, merge } = options;
|
|
73
|
+
const url = URLExt.join(ROOM_FORK_URL, forkId);
|
|
74
|
+
const query = URLExt.objectToQueryString({ merge });
|
|
75
|
+
const init = { method: 'DELETE' };
|
|
76
|
+
await requestAPI(`${url}${query}`, init);
|
|
77
|
+
}
|
|
78
|
+
getProvider(options: {
|
|
79
|
+
documentPath: string;
|
|
80
|
+
format: string;
|
|
81
|
+
type: string;
|
|
82
|
+
}): IForkProvider | undefined {
|
|
83
|
+
const { documentPath, format, type } = options;
|
|
84
|
+
const drive = this._drive;
|
|
85
|
+
if (drive) {
|
|
86
|
+
const driveName = drive.name;
|
|
87
|
+
let docPath = documentPath;
|
|
88
|
+
if (documentPath.startsWith(driveName)) {
|
|
89
|
+
docPath = documentPath.slice(driveName.length + 1);
|
|
90
|
+
}
|
|
91
|
+
const provider = drive.providers.get(`${format}:${type}:${docPath}`);
|
|
92
|
+
return provider as IForkProvider | undefined;
|
|
93
|
+
}
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
private _handleEvent(_: Event.IManager, emission: Event.Emission) {
|
|
98
|
+
if (emission.schema_id === JUPYTER_COLLABORATION_FORK_EVENTS_URI) {
|
|
99
|
+
switch (emission.action) {
|
|
100
|
+
case 'create': {
|
|
101
|
+
this._forkAddedSignal.emit(emission as any);
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
case 'delete': {
|
|
105
|
+
this._forkDeletedSignal.emit(emission as any);
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
default:
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
private _disposed = false;
|
|
115
|
+
private _drive: ICollaborativeDrive | undefined;
|
|
116
|
+
private _eventManager: Event.IManager | undefined;
|
|
117
|
+
private _forkAddedSignal = new Signal<ForkManager, IForkChangedEvent>(this);
|
|
118
|
+
private _forkDeletedSignal = new Signal<ForkManager, IForkChangedEvent>(this);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export namespace ForkManager {
|
|
122
|
+
export interface IOptions {
|
|
123
|
+
drive: ICollaborativeDrive;
|
|
124
|
+
eventManager: Event.IManager;
|
|
125
|
+
}
|
|
126
|
+
}
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/requests.ts
RENAMED
|
@@ -14,6 +14,8 @@ const DOC_SESSION_URL = 'api/collaboration/session';
|
|
|
14
14
|
const DOC_FORK_URL = 'api/collaboration/undo_redo';
|
|
15
15
|
const TIMELINE_URL = 'api/collaboration/timeline';
|
|
16
16
|
|
|
17
|
+
export const ROOM_FORK_URL = 'api/collaboration/fork';
|
|
18
|
+
|
|
17
19
|
/**
|
|
18
20
|
* Document session model
|
|
19
21
|
*/
|
|
@@ -36,6 +38,45 @@ export interface ISessionModel {
|
|
|
36
38
|
sessionId: string;
|
|
37
39
|
}
|
|
38
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Call the API extension
|
|
43
|
+
*
|
|
44
|
+
* @param endPoint API REST end point for the extension
|
|
45
|
+
* @param init Initial values for the request
|
|
46
|
+
* @returns The response body interpreted as JSON
|
|
47
|
+
*/
|
|
48
|
+
export async function requestAPI<T = any>(
|
|
49
|
+
endPoint = '',
|
|
50
|
+
init: RequestInit = {}
|
|
51
|
+
): Promise<T> {
|
|
52
|
+
// Make request to Jupyter API
|
|
53
|
+
const settings = ServerConnection.makeSettings();
|
|
54
|
+
const requestUrl = URLExt.join(settings.baseUrl, endPoint);
|
|
55
|
+
|
|
56
|
+
let response: Response;
|
|
57
|
+
try {
|
|
58
|
+
response = await ServerConnection.makeRequest(requestUrl, init, settings);
|
|
59
|
+
} catch (error) {
|
|
60
|
+
throw new ServerConnection.NetworkError(error as any);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
let data: any = await response.text();
|
|
64
|
+
|
|
65
|
+
if (data.length > 0) {
|
|
66
|
+
try {
|
|
67
|
+
data = JSON.parse(data);
|
|
68
|
+
} catch (error) {
|
|
69
|
+
console.error('Not a JSON response body.', response);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!response.ok) {
|
|
74
|
+
throw new ServerConnection.ResponseError(response, data.message || data);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return data;
|
|
78
|
+
}
|
|
79
|
+
|
|
39
80
|
export async function requestDocSession(
|
|
40
81
|
format: string,
|
|
41
82
|
type: string,
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Jupyter Development Team.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { Token } from '@lumino/coreutils';
|
|
7
|
+
import { IDisposable } from '@lumino/disposable';
|
|
8
|
+
import { ISignal } from '@lumino/signaling';
|
|
9
|
+
import { IForkProvider } from './ydrive';
|
|
10
|
+
export interface IForkInfo {
|
|
11
|
+
description?: string;
|
|
12
|
+
root_roomid: string;
|
|
13
|
+
synchronize: boolean;
|
|
14
|
+
title?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IForkCreationResponse {
|
|
18
|
+
fork_info: IForkInfo;
|
|
19
|
+
fork_roomid: string;
|
|
20
|
+
sessionId: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface IAllForksResponse {
|
|
24
|
+
[forkId: string]: IForkInfo;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface IForkChangedEvent {
|
|
28
|
+
fork_info: IForkInfo;
|
|
29
|
+
fork_roomid: string;
|
|
30
|
+
username?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Interface representing a Fork Manager that manages forked documents and
|
|
35
|
+
* provides signals for fork-related events.
|
|
36
|
+
*
|
|
37
|
+
* @interface IForkManager
|
|
38
|
+
* @extends IDisposable
|
|
39
|
+
*/
|
|
40
|
+
export interface IForkManager extends IDisposable {
|
|
41
|
+
/**
|
|
42
|
+
* Get the fork provider of a given document.
|
|
43
|
+
*
|
|
44
|
+
* @param options.documentPath - The document path including the
|
|
45
|
+
* drive prefix.
|
|
46
|
+
* @param options.format - Format of the document.
|
|
47
|
+
* @param options.type - Content type of the document.
|
|
48
|
+
* @returns The fork provider of the document.
|
|
49
|
+
*/
|
|
50
|
+
getProvider(options: {
|
|
51
|
+
documentPath: string;
|
|
52
|
+
format: string;
|
|
53
|
+
type: string;
|
|
54
|
+
}): IForkProvider | undefined;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Creates a new fork for a given document.
|
|
58
|
+
*
|
|
59
|
+
* @param options.rootId - The ID of the root document to fork.
|
|
60
|
+
* @param options.synchronize - A flag indicating whether the fork should be kept
|
|
61
|
+
* synchronized with the root document.
|
|
62
|
+
* @param options.title - An optional label for the fork.
|
|
63
|
+
* @param options.description - An optional description for the fork.
|
|
64
|
+
*
|
|
65
|
+
* @returns A promise that resolves to an `IForkCreationResponse` if the fork
|
|
66
|
+
* is created successfully, or `undefined` if the creation fails.
|
|
67
|
+
*/
|
|
68
|
+
createFork(options: {
|
|
69
|
+
rootId: string;
|
|
70
|
+
synchronize: boolean;
|
|
71
|
+
title?: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
}): Promise<IForkCreationResponse | undefined>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Retrieves all forks associated with a specific document.
|
|
77
|
+
*
|
|
78
|
+
* @param documentId - The ID of the document for which forks are to be retrieved.
|
|
79
|
+
*
|
|
80
|
+
* @returns A promise that resolves to an `IAllForksResponse` containing information about all forks.
|
|
81
|
+
*/
|
|
82
|
+
getAllForks(documentId: string): Promise<IAllForksResponse>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Deletes a specified fork and optionally merges its changes.
|
|
86
|
+
*
|
|
87
|
+
* @param options - Options for deleting the fork.
|
|
88
|
+
* @param options.forkId - The ID of the fork to be deleted.
|
|
89
|
+
* @param options.merge - A flag indicating whether changes from the fork should be merged back into the root document.
|
|
90
|
+
*
|
|
91
|
+
* @returns A promise that resolves when the fork is successfully deleted.
|
|
92
|
+
*/
|
|
93
|
+
deleteFork(options: { forkId: string; merge: boolean }): Promise<void>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Signal emitted when a new fork is added.
|
|
97
|
+
*
|
|
98
|
+
* @event forkAdded
|
|
99
|
+
* @type ISignal<IForkManager, IForkChangedEvent>
|
|
100
|
+
*/
|
|
101
|
+
forkAdded: ISignal<IForkManager, IForkChangedEvent>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Signal emitted when a fork is deleted.
|
|
105
|
+
*
|
|
106
|
+
* @event forkDeleted
|
|
107
|
+
* @type ISignal<IForkManager, IForkChangedEvent>
|
|
108
|
+
*/
|
|
109
|
+
forkDeleted: ISignal<IForkManager, IForkChangedEvent>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Token providing a fork manager instance.
|
|
114
|
+
*/
|
|
115
|
+
export const IForkManagerToken = new Token<IForkManager>(
|
|
116
|
+
'@jupyter/docprovider:IForkManagerToken'
|
|
117
|
+
);
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/ydrive.ts
RENAMED
|
@@ -308,7 +308,6 @@ class SharedModelFactory implements ISharedModelFactory {
|
|
|
308
308
|
// the `sharedModel` will be the default one.
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
|
-
|
|
312
311
|
if (this.documentFactories.has(options.contentType)) {
|
|
313
312
|
const factory = this.documentFactories.get(options.contentType)!;
|
|
314
313
|
const sharedModel = factory(options);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter/docprovider-extension",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0-alpha.0",
|
|
4
4
|
"description": "JupyterLab - Collaborative Shared Models",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"watch:labextension": "jupyter labextension watch ."
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@jupyter/collaborative-drive": "^3.
|
|
57
|
-
"@jupyter/docprovider": "^3.
|
|
58
|
-
"@jupyter/ydoc": "^2.0.0 || ^3.0.0
|
|
56
|
+
"@jupyter/collaborative-drive": "^3.1.0-alpha.0",
|
|
57
|
+
"@jupyter/docprovider": "^3.1.0-alpha.0",
|
|
58
|
+
"@jupyter/ydoc": "^2.0.0 || ^3.0.0",
|
|
59
59
|
"@jupyterlab/application": "^4.2.0",
|
|
60
60
|
"@jupyterlab/apputils": "^4.2.0",
|
|
61
61
|
"@jupyterlab/docregistry": "^4.2.0",
|
|
@@ -158,35 +158,38 @@ export const statusBarTimeline: JupyterFrontEndPlugin<void> = {
|
|
|
158
158
|
documentPath: string,
|
|
159
159
|
documentId: string
|
|
160
160
|
) => {
|
|
161
|
-
if (
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
timelineWidget
|
|
167
|
-
|
|
168
|
-
|
|
161
|
+
if (documentId && documentPath.split(':')[0] === 'RTC') {
|
|
162
|
+
if (drive) {
|
|
163
|
+
// Remove 'RTC:' from document path
|
|
164
|
+
documentPath = documentPath.slice(drive.name.length + 1);
|
|
165
|
+
// Dispose of the previous timelineWidget if it exists
|
|
166
|
+
if (timelineWidget) {
|
|
167
|
+
timelineWidget.dispose();
|
|
168
|
+
timelineWidget = null;
|
|
169
|
+
}
|
|
169
170
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
171
|
+
const [format, type] = documentId.split(':');
|
|
172
|
+
const provider = drive.providers.get(
|
|
173
|
+
`${format}:${type}:${documentPath}`
|
|
174
|
+
) as unknown as IForkProvider;
|
|
175
|
+
const fullPath = URLExt.join(
|
|
176
|
+
app.serviceManager.serverSettings.baseUrl,
|
|
177
|
+
DOCUMENT_TIMELINE_URL,
|
|
178
|
+
documentPath
|
|
179
|
+
);
|
|
179
180
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
timelineWidget = new TimelineWidget(
|
|
182
|
+
fullPath,
|
|
183
|
+
provider,
|
|
184
|
+
provider.contentType,
|
|
185
|
+
provider.format,
|
|
186
|
+
DOCUMENT_TIMELINE_URL
|
|
187
|
+
);
|
|
186
188
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
189
|
+
const elt = document.getElementById('jp-slider-status-bar');
|
|
190
|
+
if (elt && !timelineWidget.isAttached) {
|
|
191
|
+
Widget.attach(timelineWidget, elt);
|
|
192
|
+
}
|
|
190
193
|
}
|
|
191
194
|
}
|
|
192
195
|
};
|
|
@@ -222,8 +225,22 @@ export const statusBarTimeline: JupyterFrontEndPlugin<void> = {
|
|
|
222
225
|
align: 'left',
|
|
223
226
|
rank: 4,
|
|
224
227
|
isActive: () => {
|
|
225
|
-
const currentWidget = app.shell
|
|
226
|
-
|
|
228
|
+
const currentWidget = app.shell
|
|
229
|
+
.currentWidget as DocumentWidget | null;
|
|
230
|
+
|
|
231
|
+
if (
|
|
232
|
+
currentWidget &&
|
|
233
|
+
currentWidget.context &&
|
|
234
|
+
typeof currentWidget.context.path === 'string'
|
|
235
|
+
) {
|
|
236
|
+
const documentPath = currentWidget.context.path;
|
|
237
|
+
const documentId =
|
|
238
|
+
currentWidget.context.model.sharedModel.getState(
|
|
239
|
+
'document_id'
|
|
240
|
+
) as string;
|
|
241
|
+
return !!documentId && documentPath.split(':')[0] === 'RTC';
|
|
242
|
+
}
|
|
243
|
+
return false;
|
|
227
244
|
}
|
|
228
245
|
});
|
|
229
246
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Jupyter Development Team.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ICollaborativeDrive } from '@jupyter/collaborative-drive';
|
|
7
|
+
import {
|
|
8
|
+
ForkManager,
|
|
9
|
+
IForkManager,
|
|
10
|
+
IForkManagerToken
|
|
11
|
+
} from '@jupyter/docprovider';
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
JupyterFrontEnd,
|
|
15
|
+
JupyterFrontEndPlugin
|
|
16
|
+
} from '@jupyterlab/application';
|
|
17
|
+
|
|
18
|
+
export const forkManagerPlugin: JupyterFrontEndPlugin<IForkManager> = {
|
|
19
|
+
id: '@jupyter/docprovider-extension:forkManager',
|
|
20
|
+
autoStart: true,
|
|
21
|
+
requires: [ICollaborativeDrive],
|
|
22
|
+
provides: IForkManagerToken,
|
|
23
|
+
activate: (app: JupyterFrontEnd, drive: ICollaborativeDrive) => {
|
|
24
|
+
const eventManager = app.serviceManager.events;
|
|
25
|
+
const manager = new ForkManager({ drive, eventManager });
|
|
26
|
+
return manager;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
statusBarTimeline
|
|
17
17
|
} from './filebrowser';
|
|
18
18
|
import { notebookCellExecutor } from './executor';
|
|
19
|
+
import { forkManagerPlugin } from './forkManager';
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Export the plugins as default.
|
|
@@ -27,7 +28,8 @@ const plugins: JupyterFrontEndPlugin<any>[] = [
|
|
|
27
28
|
defaultFileBrowser,
|
|
28
29
|
logger,
|
|
29
30
|
notebookCellExecutor,
|
|
30
|
-
statusBarTimeline
|
|
31
|
+
statusBarTimeline,
|
|
32
|
+
forkManagerPlugin
|
|
31
33
|
];
|
|
32
34
|
|
|
33
35
|
export default plugins;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.0.0rc1"
|
jupyter_docprovider-1.0.0rc1/jupyter_docprovider/labextension/static/544.254effc7f474950ceae5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[544],{544:(e,t,o)=>{o.r(t),o.d(t,{default:()=>S});var r,a=o(909),n=o(200),i=o(256),s=o(313),l=o(922),d=o(710),c=o(154),u=o(480),p=o(614),v=o(678),g=o(697),h=o(374),b=o(132),w=o(473);!function(e){e.openPath="filebrowser:open-path"}(r||(r={}));const m="The file %1 has been opened with two different views. This is not supported. Please close this view; otherwise, some of your edits may not be saved properly.",y={id:"@jupyter/docprovider-extension:drive",description:"The default collaborative drive provider",provides:h.ICollaborativeDrive,requires:[v.ITranslator],optional:[h.IGlobalAwareness],activate:(e,t,o)=>{const r=t.load("jupyter_collaboration"),a=new b.YDrive(e.serviceManager.user,r,o);return e.serviceManager.contents.addDrive(a),a}},f={id:"@jupyter/docprovider-extension:yfile",description:"Plugin to register the shared model factory for the content type 'file'",autoStart:!0,requires:[h.ICollaborativeDrive],optional:[],activate:(e,t)=>{t.sharedModelFactory.registerDocumentFactory("file",(()=>new g.YFile))}},x={id:"@jupyter/docprovider-extension:ynotebook",description:"Plugin to register the shared model factory for the content type 'notebook'",autoStart:!0,requires:[h.ICollaborativeDrive],optional:[p.ISettingRegistry],activate:(e,t,o)=>{let r=!0;o&&o.load("@jupyterlab/notebook-extension:tracker").then((e=>{const t=e=>{var t;const o=null==e?void 0:e.get("experimentalEnableDocumentWideUndoRedo").composite;r=null===(t=!o)||void 0===t||t};t(e),e.changed.connect((e=>t(e)))})),t.sharedModelFactory.registerDocumentFactory("notebook",(()=>new g.YNotebook({disableDocumentWideUndoRedo:r})))}},I={id:"@jupyter/docprovider-extension:statusBarTimeline",description:"Plugin to add a timeline slider to the status bar",autoStart:!0,requires:[l.IStatusBar,h.ICollaborativeDrive],activate:async(e,t,o)=>{try{let r=null,a=null;const n=async(t,r)=>{if(o){t=t.slice(o.name.length+1),a&&(a.dispose(),a=null);const[n,s]=r.split(":"),l=o.providers.get(`${n}:${s}:${t}`),d=w.URLExt.join(e.serviceManager.serverSettings.baseUrl,"api/collaboration/timeline",t);a=new b.TimelineWidget(d,l,l.contentType,l.format);const c=document.getElementById("jp-slider-status-bar");c&&!a.isAttached&&i.Widget.attach(a,c)}};e.shell.currentChanged&&e.shell.currentChanged.connect((async(e,t)=>{const o=t.newValue;a&&(a.dispose(),a=null),o&&"context"in o&&(await o.context.ready,await n(o.context.path,o.context.model.sharedModel.getState("document_id")))})),t&&(r||(r=new i.Widget,r.addClass("jp-StatusBar-GroupItem"),r.addClass("jp-mod-highlighted"),r.id="jp-slider-status-bar",t.registerStatusItem("jp-slider-status-bar",{item:r,align:"left",rank:4,isActive:()=>{const t=e.shell.currentWidget;return!!t&&"context"in t}})))}catch(e){console.error("Failed to activate statusBarTimeline plugin:",e)}}},_={id:"@jupyter/docprovider-extension:defaultFileBrowser",description:"The default file browser factory provider",provides:s.IDefaultFileBrowser,requires:[h.ICollaborativeDrive,s.IFileBrowserFactory],optional:[a.IRouter,a.JupyterFrontEnd.ITreeResolver,a.ILabShell,v.ITranslator],activate:async(e,t,o,r,a,n,i)=>{const{commands:s}=e,l=(null!=i?i:v.nullTranslator).load("jupyterlab");e.serviceManager.contents.addDrive(t);const d=o.createFileBrowser("filebrowser",{auto:!1,restore:!1,driveName:t.name});return d.node.setAttribute("role","region"),d.node.setAttribute("aria-label",l.__("File Browser Section")),k.restoreBrowser(d,s,r,a,n),d}},j={id:"@jupyter/docprovider-extension:logger",description:"A logging plugin for debugging purposes.",autoStart:!0,optional:[c.ILoggerRegistry,d.IEditorTracker,u.INotebookTracker,v.ITranslator],activate:(e,t,o,r,a)=>{const i=(null!=a?a:v.nullTranslator).load("jupyter_collaboration"),s="https://schema.jupyter.org/jupyter_collaboration/session/v1";if(!t)return void e.serviceManager.events.stream.connect(((e,t)=>{var o,r;t.schema_id===s&&(console.debug(`[${t.room}(${t.path})] ${null!==(o=t.action)&&void 0!==o?o:""}: ${null!==(r=t.msg)&&void 0!==r?r:""}`),"WARNING"===t.level&&(0,n.showDialog)({title:i.__("Warning"),body:i.__(m,t.path),buttons:[n.Dialog.okButton()]}))}));const l=new Map,d=(e,o)=>{const r=t.getLogger(o.context.path);l.set(o.context.localPath,r),o.disposed.connect((e=>{l.delete(e.context.localPath)}))};o&&o.widgetAdded.connect(d),r&&r.widgetAdded.connect(d),(async()=>{var t,o;const{events:r}=e.serviceManager;for await(const e of r.stream)if(e.schema_id===s){const r=l.get(e.path);null==r||r.log({type:"text",level:e.level.toLowerCase(),data:`[${e.room}] ${null!==(t=e.action)&&void 0!==t?t:""}: ${null!==(o=e.msg)&&void 0!==o?o:""}`}),"WARNING"===e.level&&(0,n.showDialog)({title:i.__("Warning"),body:i.__(m,e.path),buttons:[n.Dialog.warnButton({label:i.__("Ok")})]})}})()}};var k;!function(e){e.restoreBrowser=async function(e,t,o,a,n){const i="jp-mod-restoring";if(e.addClass(i),!o)return await e.model.restore(e.id),await e.model.refresh(),void e.removeClass(i);const s=async()=>{o.routed.disconnect(s);const l=await(null==a?void 0:a.paths);(null==l?void 0:l.file)||(null==l?void 0:l.browser)?(await e.model.restore(e.id,!1),l.file&&await t.execute(r.openPath,{path:l.file,dontShowBrowser:!0}),l.browser&&await t.execute(r.openPath,{path:l.browser,dontShowBrowser:!0})):(await e.model.restore(e.id),await e.model.refresh()),e.removeClass(i),(null==n?void 0:n.isEmpty("main"))&&t.execute("launcher:create")};o.routed.connect(s)}}(k||(k={}));const S=[y,f,x,_,j,{id:"@jupyter/docprovider-extension:notebook-cell-executor",description:"Add notebook cell executor that uses REST API instead of kernel protocol over WebSocket.",autoStart:!0,provides:u.INotebookCellExecutor,activate:e=>"true"===w.PageConfig.getOption("serverSideExecution")?new b.NotebookCellServerExecutor({serverSettings:e.serviceManager.serverSettings}):Object.freeze({runCell:u.runCell})},I]}}]);
|
jupyter_docprovider-1.0.0rc1/jupyter_docprovider/labextension/static/576.36471ca07f7437678515.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[576],{907:e=>{var t,s,n=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function c(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(s){try{return t.call(null,e,0)}catch(s){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(e){t=r}try{s="function"==typeof clearTimeout?clearTimeout:o}catch(e){s=o}}();var a,i=[],l=!1,h=-1;function u(){l&&a&&(l=!1,a.length?i=a.concat(i):h=-1,i.length&&d())}function d(){if(!l){var e=c(u);l=!0;for(var t=i.length;t;){for(a=i,i=[];++h<t;)a&&a[h].run();h=-1,t=i.length}a=null,l=!1,function(e){if(s===clearTimeout)return clearTimeout(e);if((s===o||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{return s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)t[s-1]=arguments[s];i.push(new f(e,t)),1!==i.length||l||c(d)},f.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(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},576:(e,t,s)=>{"use strict";s.r(t),s.d(t,{WebsocketProvider:()=>Ce,messageAuth:()=>_e,messageAwareness:()=>ve,messageQueryAwareness:()=>ye,messageSync:()=>me});var n=s(206);const r=()=>new Map,o=(e,t,s)=>{let n=e.get(t);return void 0===n&&e.set(t,n=s()),n},c=()=>new Set,a=String.fromCharCode,i=(String.fromCodePoint,a(65535),/^\s*/g),l=/([A-Z])/g,h=(e,t)=>(e=>e.replace(i,""))(e.replace(l,(e=>`${t}${(e=>e.toLowerCase())(e)}`))),u="undefined"!=typeof TextEncoder?new TextEncoder:null,d=u?e=>u.encode(e):e=>{const t=unescape(encodeURIComponent(e)),s=t.length,n=new Uint8Array(s);for(let e=0;e<s;e++)n[e]=t.codePointAt(e);return n};let f="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});f&&1===f.decode(new Uint8Array).length&&(f=null);let p=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}},g=!0;try{"undefined"!=typeof localStorage&&localStorage&&(p=localStorage,g=!1)}catch(e){}const b=p,w=Array.from,m=(Array.isArray,Object.assign,Object.keys),y=e=>m(e).length,v=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),_=(e,t)=>{if(null==e||null==t)return((e,t)=>e===t)(e,t);if(e.constructor!==t.constructor)return!1;if(e===t)return!0;switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;break;case Set:if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;break;case Map:if(e.size!==t.size)return!1;for(const s of e.keys())if(!t.has(s)||!_(e.get(s),t.get(s)))return!1;break;case Object:if(y(e)!==y(t))return!1;for(const s in e)if(!v(e,s)||!_(e[s],t[s]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(!_(e[s],t[s]))return!1;break;default:return!1}return!0};var I=s(907);const S=void 0!==I&&I.release&&/node|io\.js/.test(I.release.name)&&"[object process]"===Object.prototype.toString.call(void 0!==I?I:0),U="undefined"!=typeof window&&"undefined"!=typeof document&&!S;let A;"undefined"!=typeof navigator&&/Mac/.test(navigator.platform);const k=[],C=e=>(()=>{if(void 0===A)if(S){A=r();const e=I.argv;let t=null;for(let s=0;s<e.length;s++){const n=e[s];"-"===n[0]?(null!==t&&A.set(t,""),t=n):null!==t?(A.set(t,n),t=null):k.push(n)}null!==t&&A.set(t,"")}else"object"==typeof location?(A=r(),(location.search||"?").slice(1).split("&").forEach((e=>{if(0!==e.length){const[t,s]=e.split("=");A.set(`--${h(t,"-")}`,s),A.set(`-${h(t,"-")}`,s)}}))):A=r();return A})().has(e),L=e=>{return void 0===(t=S?I.env[e.toUpperCase().replaceAll("-","_")]:b.getItem(e))?null:t;var t},T=e=>C("--"+e)||null!==L(e);var M;T("production"),S&&(M=I.env.FORCE_COLOR,["true","1","2"].includes(M))||!C("--no-colors")&&!T("no-color")&&(!S||I.stdout.isTTY)&&(!S||C("--color")||null!==L("COLORTERM")||(L("TERM")||"").includes("color"));const E=U?e=>{let t="";for(let s=0;s<e.byteLength;s++)t+=a(e[s]);return btoa(t)}:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),R=U?e=>{const t=atob(e),s=(n=t.length,new Uint8Array(n));var n;for(let e=0;e<t.length;e++)s[e]=t.charCodeAt(e);return s}:e=>{const t=Buffer.from(e,"base64");return s=t.buffer,n=t.byteOffset,r=t.byteLength,new Uint8Array(s,n,r);var s,n,r},O=new Map,x="undefined"==typeof BroadcastChannel?class{constructor(e){var t;this.room=e,this.onmessage=null,this._onChange=t=>t.key===e&&null!==this.onmessage&&this.onmessage({data:R(t.newValue||"")}),t=this._onChange,g||addEventListener("storage",t)}postMessage(e){b.setItem(this.room,E(new Uint8Array(e)))}close(){var e;e=this._onChange,g||removeEventListener("storage",e)}}:BroadcastChannel,B=e=>o(O,e,(()=>{const t=c(),s=new x(e);return s.onmessage=e=>t.forEach((t=>t(e.data,"broadcastchannel"))),{bc:s,subs:t}})),D=(e,t,s=null)=>{const n=B(e);n.bc.postMessage(t),n.subs.forEach((e=>e(t,s)))},N=Date.now,j=Math.floor,P=(Math.ceil,Math.abs,Math.imul,Math.round,Math.log10,Math.log2,Math.log,Math.sqrt,(e,t)=>e<t?e:t),H=(Number.isNaN,Math.pow),$=(Math.sign,128),z=127;class W{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const F=()=>new W,V=e=>{let t=e.cpos;for(let s=0;s<e.bufs.length;s++)t+=e.bufs[s].length;return t},G=e=>{const t=new Uint8Array(V(e));let s=0;for(let n=0;n<e.bufs.length;n++){const r=e.bufs[n];t.set(r,s),s+=r.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),s),t},J=(e,t)=>{const s=e.cbuf.length;e.cpos===s&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*s),e.cpos=0),e.cbuf[e.cpos++]=t},Y=(e,t)=>{for(;t>z;)J(e,$|z&t),t=j(t/128);J(e,z&t)},q=new Uint8Array(3e4),Q=q.length/3,X=u&&u.encodeInto?(e,t)=>{if(t.length<Q){const s=u.encodeInto(t,q).written||0;Y(e,s);for(let t=0;t<s;t++)J(e,q[t])}else Z(e,d(t))}:(e,t)=>{const s=unescape(encodeURIComponent(t)),n=s.length;Y(e,n);for(let t=0;t<n;t++)J(e,s.codePointAt(t))},Z=(e,t)=>{Y(e,t.byteLength),((e,t)=>{const s=e.cbuf.length,n=e.cpos,r=P(s-n,t.length),o=t.length-r;var c,a;e.cbuf.set(t.subarray(0,r),n),e.cpos+=r,o>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array((c=2*s)>(a=o)?c:a),e.cbuf.set(t.subarray(r)),e.cpos=o)})(e,t)};new DataView(new ArrayBuffer(4));const K=Number.MAX_SAFE_INTEGER,ee=(Number.MIN_SAFE_INTEGER,Number.isInteger,Number.isNaN,Number.parseInt,e=>new Error(e)),te=ee("Unexpected end of array"),se=ee("Integer out of Range");class ne{constructor(e){this.arr=e,this.pos=0}}const re=e=>new ne(e),oe=e=>((e,t)=>{const s=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,s})(e,ae(e)),ce=e=>e.arr[e.pos++],ae=e=>{let t=0,s=1;const n=e.arr.length;for(;e.pos<n;){const n=e.arr[e.pos++];if(t+=(n&z)*s,s*=128,n<$)return t;if(t>K)throw se}throw te},ie=f?e=>f.decode(oe(e)):e=>{let t=ae(e);if(0===t)return"";{let s=String.fromCodePoint(ce(e));if(--t<100)for(;t--;)s+=String.fromCodePoint(ce(e));else for(;t>0;){const n=t<1e4?t:1e4,r=e.arr.subarray(e.pos,e.pos+n);e.pos+=n,s+=String.fromCodePoint.apply(null,r),t-=n}return decodeURIComponent(escape(s))}},le=(e,t)=>{Y(e,0);const s=n.encodeStateVector(t);Z(e,s)},he=(e,t,s)=>{Y(e,1),Z(e,n.encodeStateAsUpdate(t,s))},ue=(e,t,s)=>{try{n.applyUpdate(t,oe(e),s)}catch(e){console.error("Caught error while handling a Yjs update",e)}},de=ue;class fe{constructor(){this._observers=r()}on(e,t){o(this._observers,e,c).add(t)}once(e,t){const s=(...n)=>{this.off(e,s),t(...n)};this.on(e,s)}off(e,t){const s=this._observers.get(e);void 0!==s&&(s.delete(t),0===s.size&&this._observers.delete(e))}emit(e,t){return w((this._observers.get(e)||r()).values()).forEach((e=>e(...t)))}destroy(){this._observers=r()}}class pe extends fe{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval((()=>{const e=N();null!==this.getLocalState()&&15e3<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const t=[];this.meta.forEach(((s,n)=>{n!==this.clientID&&3e4<=e-s.lastUpdated&&this.states.has(n)&&t.push(n)})),t.length>0&&ge(this,t,"timeout")}),j(3e3)),e.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(e){const t=this.clientID,s=this.meta.get(t),n=void 0===s?0:s.clock+1,r=this.states.get(t);null===e?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:n,lastUpdated:N()});const o=[],c=[],a=[],i=[];null===e?i.push(t):null==r?null!=e&&o.push(t):(c.push(t),_(r,e)||a.push(t)),(o.length>0||a.length>0||i.length>0)&&this.emit("change",[{added:o,updated:a,removed:i},"local"]),this.emit("update",[{added:o,updated:c,removed:i},"local"])}setLocalStateField(e,t){const s=this.getLocalState();null!==s&&this.setLocalState({...s,[e]:t})}getStates(){return this.states}}const ge=(e,t,s)=>{const n=[];for(let s=0;s<t.length;s++){const r=t[s];if(e.states.has(r)){if(e.states.delete(r),r===e.clientID){const t=e.meta.get(r);e.meta.set(r,{clock:t.clock+1,lastUpdated:N()})}n.push(r)}}n.length>0&&(e.emit("change",[{added:[],updated:[],removed:n},s]),e.emit("update",[{added:[],updated:[],removed:n},s]))},be=(e,t,s=e.states)=>{const n=t.length,r=F();Y(r,n);for(let o=0;o<n;o++){const n=t[o],c=s.get(n)||null,a=e.meta.get(n).clock;Y(r,n),Y(r,a),X(r,JSON.stringify(c))}return G(r)};var we=s(907);const me=0,ye=3,ve=1,_e=2,Ie=[];Ie[me]=(e,t,s,n,r)=>{Y(e,me);const o=((e,t,s,n)=>{const r=ae(e);switch(r){case 0:((e,t,s)=>{he(t,s,oe(e))})(e,t,s);break;case 1:ue(e,s,n);break;case 2:de(e,s,n);break;default:throw new Error("Unknown message type")}return r})(t,e,s.doc,s);n&&1===o&&!s.synced&&(s.synced=!0)},Ie[ye]=(e,t,s,n,r)=>{Y(e,ve),Z(e,be(s.awareness,Array.from(s.awareness.getStates().keys())))},Ie[ve]=(e,t,s,n,r)=>{((e,t,s)=>{const n=re(t),r=N(),o=[],c=[],a=[],i=[],l=ae(n);for(let t=0;t<l;t++){const t=ae(n);let s=ae(n);const l=JSON.parse(ie(n)),h=e.meta.get(t),u=e.states.get(t),d=void 0===h?0:h.clock;(d<s||d===s&&null===l&&e.states.has(t))&&(null===l?t===e.clientID&&null!=e.getLocalState()?s++:e.states.delete(t):e.states.set(t,l),e.meta.set(t,{clock:s,lastUpdated:r}),void 0===h&&null!==l?o.push(t):void 0!==h&&null===l?i.push(t):null!==l&&(_(l,u)||a.push(t),c.push(t)))}(o.length>0||a.length>0||i.length>0)&&e.emit("change",[{added:o,updated:a,removed:i},s]),(o.length>0||c.length>0||i.length>0)&&e.emit("update",[{added:o,updated:c,removed:i},s])})(s.awareness,oe(t),s)},Ie[_e]=(e,t,s,n,r)=>{((e,t,s)=>{0===ae(e)&&s(0,ie(e))})(t,s.doc,((e,t)=>Se(s,t)))};const Se=(e,t)=>console.warn(`Permission denied to access ${e.url}.\n${t}`),Ue=(e,t,s)=>{const n=re(t),r=F(),o=ae(n),c=e.messageHandlers[o];return c?c(r,n,e,s,o):console.error("Unable to compute message"),r},Ae=e=>{if(e.shouldConnect&&null===e.ws){const t=new e._WS(e.url);t.binaryType="arraybuffer",e.ws=t,e.wsconnecting=!0,e.wsconnected=!1,e.synced=!1,t.onmessage=s=>{e.wsLastMessageReceived=N();const n=Ue(e,new Uint8Array(s.data),!0);V(n)>1&&t.send(G(n))},t.onerror=t=>{e.emit("connection-error",[t,e])},t.onclose=t=>{e.emit("connection-close",[t,e]),e.ws=null,e.wsconnecting=!1,e.wsconnected?(e.wsconnected=!1,e.synced=!1,ge(e.awareness,Array.from(e.awareness.getStates().keys()).filter((t=>t!==e.doc.clientID)),e),e.emit("status",[{status:"disconnected"}])):e.wsUnsuccessfulReconnects++,setTimeout(Ae,P(100*H(2,e.wsUnsuccessfulReconnects),e.maxBackoffTime),e)},t.onopen=()=>{e.wsLastMessageReceived=N(),e.wsconnecting=!1,e.wsconnected=!0,e.wsUnsuccessfulReconnects=0,e.emit("status",[{status:"connected"}]);const s=F();if(Y(s,me),le(s,e.doc),t.send(G(s)),null!==e.awareness.getLocalState()){const s=F();Y(s,ve),Z(s,be(e.awareness,[e.doc.clientID])),t.send(G(s))}},e.emit("status",[{status:"connecting"}])}},ke=(e,t)=>{const s=e.ws;e.wsconnected&&s&&s.readyState===s.OPEN&&s.send(t),e.bcconnected&&D(e.bcChannel,t,e)};class Ce extends fe{constructor(e,t,s,{connect:n=!0,awareness:r=new pe(s),params:o={},WebSocketPolyfill:c=WebSocket,resyncInterval:a=-1,maxBackoffTime:i=2500,disableBc:l=!1}={}){for(super();"/"===e[e.length-1];)e=e.slice(0,e.length-1);const h=(e=>((e,t)=>{const s=[];for(const n in e)s.push(t(e[n],n));return s})(e,((e,t)=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&"))(o);this.maxBackoffTime=i,this.bcChannel=e+"/"+t,this.url=e+"/"+t+(0===h.length?"":"?"+h),this.roomname=t,this.doc=s,this._WS=c,this.awareness=r,this.wsconnected=!1,this.wsconnecting=!1,this.bcconnected=!1,this.disableBc=l,this.wsUnsuccessfulReconnects=0,this.messageHandlers=Ie.slice(),this._synced=!1,this.ws=null,this.wsLastMessageReceived=0,this.shouldConnect=n,this._resyncInterval=0,a>0&&(this._resyncInterval=setInterval((()=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){const e=F();Y(e,me),le(e,s),this.ws.send(G(e))}}),a)),this._bcSubscriber=(e,t)=>{if(t!==this){const t=Ue(this,new Uint8Array(e),!1);V(t)>1&&D(this.bcChannel,G(t),this)}},this._updateHandler=(e,t)=>{if(t!==this){const t=F();Y(t,me),((e,t)=>{Y(e,2),Z(e,t)})(t,e),ke(this,G(t))}},this.doc.on("update",this._updateHandler),this._awarenessUpdateHandler=({added:e,updated:t,removed:s},n)=>{const o=e.concat(t).concat(s),c=F();Y(c,ve),Z(c,be(r,o)),ke(this,G(c))},this._exitHandler=()=>{ge(this.awareness,[s.clientID],"app closed")},S&&void 0!==we&&we.on("exit",this._exitHandler),r.on("update",this._awarenessUpdateHandler),this._checkInterval=setInterval((()=>{this.wsconnected&&3e4<N()-this.wsLastMessageReceived&&this.ws.close()}),3e3),n&&this.connect()}get synced(){return this._synced}set synced(e){this._synced!==e&&(this._synced=e,this.emit("synced",[e]),this.emit("sync",[e]))}destroy(){0!==this._resyncInterval&&clearInterval(this._resyncInterval),clearInterval(this._checkInterval),this.disconnect(),S&&void 0!==we&&we.off("exit",this._exitHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.doc.off("update",this._updateHandler),super.destroy()}connectBc(){if(this.disableBc)return;var e,t;this.bcconnected||(e=this.bcChannel,t=this._bcSubscriber,B(e).subs.add(t),this.bcconnected=!0);const s=F();Y(s,me),le(s,this.doc),D(this.bcChannel,G(s),this);const n=F();Y(n,me),he(n,this.doc),D(this.bcChannel,G(n),this);const r=F();Y(r,ye),D(this.bcChannel,G(r),this);const o=F();Y(o,ve),Z(o,be(this.awareness,[this.doc.clientID])),D(this.bcChannel,G(o),this)}disconnectBc(){const e=F();Y(e,ve),Z(e,be(this.awareness,[this.doc.clientID],new Map)),ke(this,G(e)),this.bcconnected&&(((e,t)=>{const s=B(e);s.subs.delete(t)&&0===s.subs.size&&(s.bc.close(),O.delete(e))})(this.bcChannel,this._bcSubscriber),this.bcconnected=!1)}disconnect(){this.shouldConnect=!1,this.disconnectBc(),null!==this.ws&&this.ws.close()}connect(){this.shouldConnect=!0,this.wsconnected||null!==this.ws||(Ae(this),this.connectBc())}}}}]);
|
jupyter_docprovider-1.0.0rc1/jupyter_docprovider/labextension/static/618.28407d2343b911e61b63.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[]).push([[618],{68:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(758),r=n.n(o),s=n(935),i=n.n(s)()(r());i.push([e.id,"/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|---------------------------------------------------------------------------- */\n\n.jp-timelineSliderWrapper .jp-sliderContainer{\n display: flex;\n align-items: center;\n}\n\n.jp-Slider {\n height: 4.5px\n}\n\n#jp-slider-status-bar {\n display: flex;\n}\n\n.jp-timestampDisplay {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n}\n\n.jp-restoreBtnContainer {\n width: 192px;\n}\n\n.jp-ToolbarButtonComponent.jp-restoreBtn {\n cursor: pointer;\n color: var(--jp-layout-color2);\n width: 100%;\n background: var(--jp-accept-color-normal)\n}\n",""]);const a=i},935:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(i[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);o&&i[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}},758:e=>{e.exports=function(e){return e[1]}},591:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var s={},i=[],a=0;a<e.length;a++){var c=e[a],l=o.base?c[0]+o.base:c[0],d=s[l]||0,h="".concat(l," ").concat(d);s[l]=d+1;var u=n(h),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==u)t[u].references++,t[u].updater(p);else{var m=r(p,o);o.byIndex=a,t.splice(a,0,{identifier:h,updater:m,references:1})}i.push(h)}return i}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var s=o(e=e||[],r=r||{});return function(e){e=e||[];for(var i=0;i<s.length;i++){var a=n(s[i]);t[a].references--}for(var c=o(e,r),l=0;l<s.length;l++){var d=n(s[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},128:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},51:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},855:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},740:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},656:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},618:(e,t,n)=>{n.r(t),n.d(t,{NotebookCellServerExecutor:()=>l,TimelineWidget:()=>A,WebSocketAwarenessProvider:()=>r,WebSocketProvider:()=>g,YDrive:()=>w,requestDocSession:()=>p,requestDocumentTimeline:()=>m,requestUndoRedo:()=>f});var o=n(560);class r extends o.WebsocketProvider{constructor(e){super(e.url,e.roomID,e.awareness.doc,{awareness:e.awareness}),this._isDisposed=!1,this._awareness=e.awareness,this._user=e.user,this._user.ready.then((()=>this._onUserChanged(this._user))).catch((e=>console.error(e))),this._user.userChanged.connect(this._onUserChanged,this)}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._user.userChanged.disconnect(this._onUserChanged,this),this._isDisposed=!0,this.destroy())}_onUserChanged(e){this._awareness.setLocalStateField("user",e.identity)}}var s=n(200),i=n(473),a=n(354),c=n(678);class l{constructor(e){var t;this._serverSettings=null!==(t=e.serverSettings)&&void 0!==t?t:a.ServerConnection.makeSettings()}async runCell({cell:e,notebook:t,notebookConfig:n,onCellExecuted:o,onCellExecutionScheduled:r,sessionContext:l,sessionDialogs:d,translator:h}){var u,p,m;const f=(h=null!=h?h:c.nullTranslator).load("jupyterlab");switch(e.model.type){case"markdown":e.rendered=!0,e.inputHidden=!1,o({cell:e,success:!0});break;case"code":if(l){if(l.isTerminating){await(0,s.showDialog)({title:f.__("Kernel Terminating"),body:f.__("The kernel for %1 appears to be terminating. You can not run any cell for now.",null===(u=l.session)||void 0===u?void 0:u.path),buttons:[s.Dialog.okButton()]});break}if(l.pendingInput)return await(0,s.showDialog)({title:f.__("Cell not executed due to pending input"),body:f.__("The cell has not been executed to avoid kernel deadlock as there is another pending input! Submit your pending input and try again."),buttons:[s.Dialog.okButton()]}),!1;if(l.hasNoKernel&&await l.startKernel()&&d&&await d.selectKernel(l),l.hasNoKernel)return e.model.sharedModel.transact((()=>{e.model.clearExecution()})),!0;const n=null===(m=null===(p=null==l?void 0:l.session)||void 0===p?void 0:p.kernel)||void 0===m?void 0:m.id,c=i.URLExt.join(this._serverSettings.baseUrl,`api/kernels/${n}/execute`),h=e.model.sharedModel.getId(),v=t.sharedModel.getState("document_id"),y={method:"POST",body:JSON.stringify({cell_id:h,document_id:v})};r({cell:e});let g=!1;try{g=(await a.ServerConnection.makeRequest(c,y,this._serverSettings)).ok}catch(t){if(o({cell:e,success:!1}),e.isDisposed)return!1;throw t}return o({cell:e,success:g}),!0}e.model.sharedModel.transact((()=>{e.model.clearExecution()}),!1)}return Promise.resolve(!0)}}const d="api/collaboration/session",h="api/collaboration/undo_redo",u="api/collaboration/timeline";async function p(e,t,n){const o=a.ServerConnection.makeSettings(),r=i.URLExt.join(o.baseUrl,d,encodeURIComponent(n)),s={method:"PUT",body:JSON.stringify({format:e,type:t})};let c;try{c=await a.ServerConnection.makeRequest(r,s,o)}catch(e){throw new a.ServerConnection.NetworkError(e)}let l=await c.text();if(l.length>0)try{l=JSON.parse(l)}catch(e){console.log("Not a JSON response body.",c)}if(!c.ok)throw new a.ServerConnection.ResponseError(c,l.message||l);return l}async function m(e,t,n){const o=a.ServerConnection.makeSettings();let r=i.URLExt.join(o.baseUrl,u,n);r=r.concat(`?format=${e}&&type=${t}`);const s={method:"GET"};let c;try{c=await a.ServerConnection.makeRequest(r,s,o)}catch(e){throw new a.ServerConnection.NetworkError(e)}return c}async function f(e,t,n,o){const r=a.ServerConnection.makeSettings();let s=i.URLExt.join(r.baseUrl,h,encodeURIComponent(e));s=s.concat(`?action=${t}&&steps=${n}&&forkRoom=${o}`);const c={method:"PUT"};let l;try{l=await a.ServerConnection.makeRequest(s,c,r)}catch(e){throw new a.ServerConnection.NetworkError(e)}let d=await l.text();if(d.length>0)try{d=JSON.parse(d)}catch(e){console.log("Not a JSON response body.",l)}if(!l.ok)throw new a.ServerConnection.ResponseError(l,d.message||d);return d}var v=n(602),y=n(262);class g{constructor(e){this._onConnectionClosed=e=>{1003===e.code&&(console.error("Document provider closed:",e.reason),(0,s.showErrorMessage)(this._trans.__("Document session error"),e.reason,[s.Dialog.okButton()]),this._sharedModel.dispose())},this._onSync=e=>{e&&(this._yWebsocketProvider&&(this._yWebsocketProvider.off("sync",this._onSync),this._sharedModel.ydoc.getMap("state").set("document_id",this._yWebsocketProvider.roomname)),this._ready.resolve())},this._ready=new y.PromiseDelegate,this._isDisposed=!1,this._path=e.path,this._contentType=e.contentType,this._format=e.format,this._serverUrl=e.url,this._sharedModel=e.model,this._awareness=e.model.awareness,this._yWebsocketProvider=null,this._trans=e.translator;const t=e.user;t.ready.then((()=>{this._onUserChanged(t)})).catch((e=>console.error(e))),t.userChanged.connect(this._onUserChanged,this),this._connect().catch((e=>console.warn(e)))}get isDisposed(){return this._isDisposed}get ready(){return this._ready.promise}get contentType(){return this._contentType}get format(){return this._format}dispose(){var e,t,n;this.isDisposed||(this._isDisposed=!0,null===(e=this._yWebsocketProvider)||void 0===e||e.off("connection-close",this._onConnectionClosed),null===(t=this._yWebsocketProvider)||void 0===t||t.off("sync",this._onSync),null===(n=this._yWebsocketProvider)||void 0===n||n.destroy(),this._disconnect(),v.Signal.clearData(this))}async reconnect(){this._disconnect(),this._connect()}async _connect(){const e=await p(this._format,this._contentType,this._path);this._yWebsocketProvider=new o.WebsocketProvider(this._serverUrl,`${e.format}:${e.type}:${e.fileId}`,this._sharedModel.ydoc,{disableBc:!0,params:{sessionId:e.sessionId},awareness:this._awareness}),this._yWebsocketProvider.on("sync",this._onSync),this._yWebsocketProvider.on("connection-close",this._onConnectionClosed)}async connectToForkDoc(e,t){this._disconnect(),this._yWebsocketProvider=new o.WebsocketProvider(this._serverUrl,e,this._sharedModel.ydoc,{disableBc:!0,params:{sessionId:t},awareness:this._awareness})}get wsProvider(){return this._yWebsocketProvider}_disconnect(){var e,t,n;null===(e=this._yWebsocketProvider)||void 0===e||e.off("connection-close",this._onConnectionClosed),null===(t=this._yWebsocketProvider)||void 0===t||t.off("sync",this._onSync),null===(n=this._yWebsocketProvider)||void 0===n||n.destroy(),this._yWebsocketProvider=null}_onUserChanged(e){this._awareness.setLocalStateField("user",e.identity)}}const _="true"===i.PageConfig.getOption("disableRTC");class w extends a.Drive{constructor(e,t,n){super({name:"RTC"}),this._onCreate=(e,t)=>{var n,o;if("string"==typeof e.format)try{const r=new g({url:i.URLExt.join(this.serverSettings.wsUrl,"api/collaboration/room"),path:e.path,format:e.format,contentType:e.contentType,model:t,user:this._user,translator:this._trans}),s=((null===(n=this._globalAwareness)||void 0===n?void 0:n.getLocalState())||{}).documents||[];s.includes(e.path)||(s.push(`${this.name}:${e.path}`),null===(o=this._globalAwareness)||void 0===o||o.setLocalStateField("documents",s));const a=`${e.format}:${e.contentType}:${e.path}`;this._providers.set(a,r),t.changed.connect((async(t,n)=>{if(!n.stateChange)return;const o=n.stateChange.filter((e=>"hash"===e.name));if(0===o.length)return;o.length>1&&console.error("Unexpected multiple changes to hash value in a single transaction");const r=o[0],s=await this.get(e.path,{content:!1});this._ydriveFileChanged.emit({type:"save",newValue:{...s,hash:r.newValue},oldValue:{hash:r.oldValue}})})),t.disposed.connect((()=>{var t,n;const o=this._providers.get(a);o&&(o.dispose(),this._providers.delete(a));const r=((null===(t=this._globalAwareness)||void 0===t?void 0:t.getLocalState())||{}).documents||[],s=r.indexOf(`${this.name}:${e.path}`);s>-1&&r.splice(s,1),null===(n=this._globalAwareness)||void 0===n||n.setLocalStateField("documents",r)}))}catch(t){console.error(`Failed to open websocket connection for ${e.path}.\n:${t}`)}},this._ydriveFileChanged=new v.Signal(this),this._user=e,this._trans=t,this._globalAwareness=n,this._providers=new Map,this.sharedModelFactory=new b(this._onCreate),super.fileChanged.connect(((e,t)=>{this._ydriveFileChanged.emit(t)}))}get providers(){return this._providers}dispose(){this.isDisposed||(this._providers.forEach((e=>e.dispose())),this._providers.clear(),super.dispose())}async get(e,t){if(t&&t.format&&t.type){const n=`${t.format}:${t.type}:${e}`,o=this._providers.get(n);if(o){const[n]=await Promise.all([super.get(e,{...t,content:!1}),o.ready]);return{...n,format:t.format}}}return super.get(e,t)}async save(e,t={}){if(t.format&&t.type){const n=`${t.format}:${t.type}:${e}`;if(this._providers.get(n)){const n={type:t.type,format:t.format,content:!1};return this.get(e,n)}}return super.save(e,t)}get fileChanged(){return this._ydriveFileChanged}}class b{constructor(e){this._onCreate=e,this.collaborative=!_,this.documentFactories=new Map}registerDocumentFactory(e,t){if(this.documentFactories.has(e))throw new Error(`The content type ${e} already exists`);this.documentFactories.set(e,t)}createNew(e){if("string"==typeof e.format){if(this.collaborative&&e.collaborative&&this.documentFactories.has(e.contentType)){const t=this.documentFactories.get(e.contentType)(e);return this._onCreate(e,t),t}}else console.warn(`Only defined format are supported; got ${e.format}.`)}}var C=n(345),S=n.n(C),k=n(591),x=n.n(k),T=n(740),D=n.n(T),E=n(128),$=n.n(E),R=n(855),U=n.n(R),P=n(51),N=n.n(P),j=n(656),W=n.n(j),I=n(68),M={};M.styleTagTransform=W(),M.setAttributes=U(),M.insert=$().bind(null,"head"),M.domAPI=D(),M.insertStyleElement=N(),x()(I.A,M),I.A&&I.A.locals&&I.A.locals;var L=n(460);const F=({apiURL:e,provider:t,contentType:n,format:o})=>{const[r,i]=(0,C.useState)({roomId:"",timestamps:[],forkRoom:"",sessionId:""}),[a,c]=(0,C.useState)(r.timestamps.length-1),[l,d]=(0,C.useState)(!1),[h,u]=(0,C.useState)(!1),v=(0,C.useRef)(!0),y=(0,C.useRef)(!0),g=(0,C.useRef)(null);function _(e){try{const t=new URL(e).pathname.split("/");return t.slice(4-t.length).join("/")}catch(e){return console.error("Invalid URL:",e),""}}return S().createElement("div",{className:"jp-sliderContainer"},S().createElement("div",{onClick:()=>{!async function(r){try{if(v.current){const a=await m(o,n,r);if(!a.ok)throw 404===a.status?new Error("Not found"):503===a.status?new Error("WebSocket closed"):new Error(`Failed to fetch data: ${a.statusText}`);const l=await a.text();let h={roomId:"",timestamps:[],forkRoom:"",sessionId:""};return l&&(s.Notification.warning("Document is now in read-only mode. Changes will not be saved.",{autoClose:2500}),h=JSON.parse(l),i(h),c(h.timestamps.length-1),t.connectToForkDoc(h.forkRoom,h.sessionId),g.current=await p(o,n,_(e))),d(!0),v.current=!1,h}}catch(e){console.error("Error fetching data:",e)}}(_(e))},className:"jp-mod-highlighted",title:"Document Timeline"},S().createElement(L.historyIcon.react,{marginRight:"4px"})),l&&S().createElement("div",{className:"jp-timestampDisplay"},S().createElement("input",{type:"range",min:0,max:r.timestamps.length-1,value:a,onChange:async e=>{const t=parseInt(e.target.value),n=Math.abs(t-a);try{const e=function(e){return e<a?"undo":"redo"}(t);if(c(t),y.current&&(u(!0),y.current=!1),!g.current)return void console.error("Session is not initialized");await f(`${g.current.format}:${g.current.type}:${g.current.fileId}`,e,n,r.forkRoom)}catch(e){console.error("Error fetching or applying updates:",e)}},className:"jp-Slider"}),S().createElement("div",null,S().createElement("strong",null,_(e).split("/").pop()," ")," "),h&&S().createElement("div",{className:"jp-restoreBtnContainer"},S().createElement("button",{onClick:async()=>{if(!g.current)return void console.error("Session is not initialized");const e=await f(`${g.current.format}:${g.current.type}:${g.current.fileId}`,"restore",0,r.forkRoom);200===e.code?(s.Notification.success(e.status,{autoClose:4e3}),t.reconnect(),d(!1),v.current=!0):s.Notification.error(e.status,{autoClose:4e3})},className:"jp-ToolbarButtonComponent jp-restoreBtn"},"Restore version"," ",(e=>{const t=new Date(1e3*e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")} ${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}:${String(t.getSeconds()).padStart(2,"0")}`})(r.timestamps[a])))))};class A extends s.ReactWidget{constructor(e,t,n,o){super(),this.apiURL=e,this.provider=t,this.contentType=n,this.format=o,this.addClass("jp-timelineSliderWrapper")}render(){return C.createElement(F,{key:this.apiURL,apiURL:this.apiURL,provider:this.provider,contentType:this.contentType,format:this.format})}updateContent(e,t){this.apiURL=e,this.provider=t,this.contentType=this.provider.contentType,this.format=this.provider.format,this.update()}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _JUPYTERLAB;(()=>{"use strict";var e,r,t,o,a,n,i,l,u,d,f,s,c,p,v,h,b,y,m,g,j,w,P,k={496:(e,r,t)=>{var o={"./index":()=>Promise.all([t.e(823),t.e(544)]).then((()=>()=>t(544))),"./extension":()=>Promise.all([t.e(823),t.e(544)]).then((()=>()=>t(544))),"./style":()=>t.e(944).then((()=>()=>t(944)))},a=(e,r)=>(t.R=r,r=t.o(o,e)?o[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),n=(e,r)=>{if(t.S){var o="default",a=t.S[o];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[o]=e,t.I(o,r)}};t.d(r,{get:()=>a,init:()=>n})}},S={};function x(e){var r=S[e];if(void 0!==r)return r.exports;var t=S[e]={id:e,exports:{}};return k[e](t,t.exports,x),t.exports}x.m=k,x.c=S,x.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return x.d(r,{a:r}),r},x.d=(e,r)=>{for(var t in r)x.o(r,t)&&!x.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},x.f={},x.e=e=>Promise.all(Object.keys(x.f).reduce(((r,t)=>(x.f[t](e,r),r)),[])),x.u=e=>e+"."+{206:"84c5901f15f0fa0bd745",262:"0cc35b53ffb65372f245",444:"12adfae9a2b50e91531f",544:"254effc7f474950ceae5",576:"36471ca07f7437678515",618:"28407d2343b911e61b63",823:"7ffe7ee89772c5a0cfc8",944:"b85c55dff0f14165f872"}[e]+".js?v="+{206:"84c5901f15f0fa0bd745",262:"0cc35b53ffb65372f245",444:"12adfae9a2b50e91531f",544:"254effc7f474950ceae5",576:"36471ca07f7437678515",618:"28407d2343b911e61b63",823:"7ffe7ee89772c5a0cfc8",944:"b85c55dff0f14165f872"}[e],x.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),x.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@jupyter/docprovider-extension:",x.l=(t,o,a,n)=>{if(e[t])e[t].push(o);else{var i,l;if(void 0!==a)for(var u=document.getElementsByTagName("script"),d=0;d<u.length;d++){var f=u[d];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+a){i=f;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,x.nc&&i.setAttribute("nonce",x.nc),i.setAttribute("data-webpack",r+a),i.src=t),e[t]=[o];var s=(r,o)=>{i.onerror=i.onload=null,clearTimeout(c);var a=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(o))),r)return r(o)},c=setTimeout(s.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=s.bind(null,i.onerror),i.onload=s.bind(null,i.onload),l&&document.head.appendChild(i)}},x.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{x.S={};var e={},r={};x.I=(t,o)=>{o||(o=[]);var a=r[t];if(a||(a=r[t]={}),!(o.indexOf(a)>=0)){if(o.push(a),e[t])return e[t];x.o(x.S,t)||(x.S[t]={});var n=x.S[t],i="@jupyter/docprovider-extension",l=(e,r,t,o)=>{var a=n[e]=n[e]||{},l=a[r];(!l||!l.loaded&&(!o!=!l.eager?o:i>l.from))&&(a[r]={get:t,from:i,eager:!!o})},u=[];return"default"===t&&(l("@jupyter/collaborative-drive","3.0.0-rc.1",(()=>Promise.all([x.e(262),x.e(444)]).then((()=>()=>x(444))))),l("@jupyter/docprovider-extension","3.0.0-rc.1",(()=>Promise.all([x.e(823),x.e(544)]).then((()=>()=>x(544))))),l("@jupyter/docprovider","3.0.0-rc.1",(()=>Promise.all([x.e(262),x.e(618),x.e(823)]).then((()=>()=>x(618))))),l("y-websocket","1.5.4",(()=>Promise.all([x.e(576),x.e(206)]).then((()=>()=>x(576)))))),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;x.g.importScripts&&(e=x.g.location+"");var r=x.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),x.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),o=t[1]?r(t[1]):[];return t[2]&&(o.length++,o.push.apply(o,r(t[2]))),t[3]&&(o.push([]),o.push.apply(o,r(t[3]))),o},o=(e,r)=>{e=t(e),r=t(r);for(var o=0;;){if(o>=e.length)return o<r.length&&"u"!=(typeof r[o])[0];var a=e[o],n=(typeof a)[0];if(o>=r.length)return"u"==n;var i=r[o],l=(typeof i)[0];if(n!=l)return"o"==n&&"n"==l||"s"==l||"u"==n;if("o"!=n&&"u"!=n&&a!=i)return a<i;o++}},a=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var o=1,n=1;n<e.length;n++)o--,t+="u"==(typeof(l=e[n]))[0]?"-":(o>0?".":"")+(o=2,l);return t}var i=[];for(n=1;n<e.length;n++){var l=e[n];i.push(0===l?"not("+u()+")":1===l?"("+u()+" || "+u()+")":2===l?i.pop()+" "+i.pop():a(l))}return u();function u(){return i.pop().replace(/^\((.+)\)$/,"$1")}},n=(e,r)=>{if(0 in e){r=t(r);var o=e[0],a=o<0;a&&(o=-o-1);for(var i=0,l=1,u=!0;;l++,i++){var d,f,s=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(f=(typeof(d=r[i]))[0]))return!u||("u"==s?l>o&&!a:""==s!=a);if("u"==f){if(!u||"u"!=s)return!1}else if(u)if(s==f)if(l<=o){if(d!=e[l])return!1}else{if(a?d>e[l]:d<e[l])return!1;d!=e[l]&&(u=!1)}else if("s"!=s&&"n"!=s){if(a||l<=o)return!1;u=!1,l--}else{if(l<=o||f<s!=a)return!1;u=!1}else"s"!=s&&"n"!=s&&(u=!1,l--)}}var c=[],p=c.pop.bind(c);for(i=1;i<e.length;i++){var v=e[i];c.push(1==v?p()|p():2==v?p()&p():v?n(v,r):!p())}return!!p()},i=(e,r)=>e&&x.o(e,r),l=e=>(e.loaded=1,e.get()),u=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),d=(e,r,t,a)=>{var i=a?u(e[r]):e[r];return(r=Object.keys(i).reduce(((e,r)=>!n(t,r)||e&&!o(e,r)?e:r),0))&&i[r]},f=(e,r,t)=>{var a=t?u(e[r]):e[r];return Object.keys(a).reduce(((e,r)=>!e||!a[e].loaded&&o(e,r)?r:e),0)},s=(e,r,t,o)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+a(o)+")",c=(e,r,t,o,n)=>{var i=e[t];return"No satisfying version ("+a(o)+")"+(n?" for eager consumption":"")+" of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(i).map((e=>e+" from "+i[e].from)).join(", ")},p=e=>{throw new Error(e)},v=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},b=(e,r,t)=>t?t():((e,r)=>p("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),y=(h=e=>function(r,t,o,a,n){var i=x.I(r);return i&&i.then&&!o?i.then(e.bind(e,r,x.S[r],t,!1,a,n)):e(r,x.S[r],t,o,a,n)})(((e,r,t,o,a,n)=>{if(!i(r,t))return b(e,t,n);var u=d(r,t,a,o);return u?l(u):n?n():void p(c(r,e,t,a,o))})),m=h(((e,r,t,o,a,u)=>{if(!i(r,t))return b(e,t,u);var d=f(r,t,o);return n(a,d)||v(s(r,t,d,a)),l(r[t][d])})),g={},j={200:()=>m("default","@jupyterlab/apputils",!1,[1,4,3,5]),473:()=>m("default","@jupyterlab/coreutils",!1,[1,6,2,5]),678:()=>m("default","@jupyterlab/translation",!1,[1,4,2,5]),132:()=>m("default","@jupyter/docprovider",!1,[1,3,0,0,,"rc",1],(()=>Promise.all([x.e(262),x.e(618)]).then((()=>()=>x(618))))),154:()=>m("default","@jupyterlab/logconsole",!1,[1,4,2,5]),256:()=>m("default","@lumino/widgets",!1,[1,2,3,1,,"alpha",0]),313:()=>m("default","@jupyterlab/filebrowser",!1,[1,4,2,5]),374:()=>m("default","@jupyter/collaborative-drive",!1,[1,3,0,0,,"rc",1],(()=>Promise.all([x.e(262),x.e(444)]).then((()=>()=>x(444))))),480:()=>m("default","@jupyterlab/notebook",!1,[1,4,2,5]),614:()=>m("default","@jupyterlab/settingregistry",!1,[1,4,2,5]),697:()=>m("default","@jupyter/ydoc",!1,[1,2,0,1]),710:()=>m("default","@jupyterlab/fileeditor",!1,[1,4,2,5]),909:()=>m("default","@jupyterlab/application",!1,[1,4,2,5]),922:()=>m("default","@jupyterlab/statusbar",!1,[1,4,2,5]),262:()=>m("default","@lumino/coreutils",!1,[1,2,0,0]),345:()=>m("default","react",!1,[1,18,2,0]),354:()=>m("default","@jupyterlab/services",!1,[1,7,2,5]),460:()=>m("default","@jupyterlab/ui-components",!1,[1,4,2,5]),560:()=>y("default","y-websocket",!1,[1,1,3,15],(()=>Promise.all([x.e(576),x.e(206)]).then((()=>()=>x(576))))),602:()=>m("default","@lumino/signaling",!1,[1,2,0,0]),206:()=>m("default","yjs",!1,[1,13,5,40])},w={206:[206],262:[262],544:[132,154,256,313,374,480,614,697,710,909,922],618:[345,354,460,560,602],823:[200,473,678]},P={},x.f.consumes=(e,r)=>{x.o(w,e)&&w[e].forEach((e=>{if(x.o(g,e))return r.push(g[e]);if(!P[e]){var t=r=>{g[e]=0,x.m[e]=t=>{delete x.c[e],t.exports=r()}};P[e]=!0;var o=r=>{delete g[e],x.m[e]=t=>{throw delete x.c[e],r}};try{var a=j[e]();a.then?r.push(g[e]=a.then(t).catch(o)):t(a)}catch(e){o(e)}}}))},(()=>{var e={552:0};x.f.j=(r,t)=>{var o=x.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else if(/^(206|262|823)$/.test(r))e[r]=0;else{var a=new Promise(((t,a)=>o=e[r]=[t,a]));t.push(o[2]=a);var n=x.p+x.u(r),i=new Error;x.l(n,(t=>{if(x.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var a=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+n+")",i.name="ChunkLoadError",i.type=a,i.request=n,o[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var o,a,[n,i,l]=t,u=0;if(n.some((r=>0!==e[r]))){for(o in i)x.o(i,o)&&(x.m[o]=i[o]);l&&l(x)}for(r&&r(t);u<n.length;u++)a=n[u],x.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=self.webpackChunk_jupyter_docprovider_extension=self.webpackChunk_jupyter_docprovider_extension||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),x.nc=void 0;var E=x(496);(_JUPYTERLAB=void 0===_JUPYTERLAB?{}:_JUPYTERLAB)["@jupyter/docprovider-extension"]=E})();
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/jupyter_docprovider/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/babel.config.js
RENAMED
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/jest.config.js
RENAMED
|
File without changes
|
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/awareness.ts
RENAMED
|
File without changes
|
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/src/yprovider.ts
RENAMED
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/style/base.css
RENAMED
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/style/index.css
RENAMED
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/style/index.js
RENAMED
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/style/slider.css
RENAMED
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/tsconfig.json
RENAMED
|
File without changes
|
{jupyter_docprovider-1.0.0rc1 → jupyter_docprovider-1.1.0a0}/packages/docprovider/tsconfig.test.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|