notebook 7.2.0rc0__py3-none-any.whl → 7.2.1__py3-none-any.whl

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.

Potentially problematic release.


This version of notebook might be problematic. Click here for more details.

Files changed (175) hide show
  1. notebook/_version.py +1 -1
  2. notebook/static/113.bundle.js +1 -1
  3. notebook/static/1198.bundle.js +1 -1
  4. notebook/static/134.bundle.js +1 -1
  5. notebook/static/1388.bundle.js +1 -1
  6. notebook/static/1408.bundle.js +1 -1
  7. notebook/static/1496.bundle.js +1 -1
  8. notebook/static/1647.bundle.js +1 -1
  9. notebook/static/1650.bundle.js +1 -1
  10. notebook/static/1684.bundle.js +1 -1
  11. notebook/static/1809.bundle.js +1 -1
  12. notebook/static/1827.bundle.js +1 -1
  13. notebook/static/1833.bundle.js +1 -1
  14. notebook/static/1846.bundle.js +1 -1
  15. notebook/static/1958.bundle.js +1 -1
  16. notebook/static/1962.bundle.js +1 -1
  17. notebook/static/2007.bundle.js +1 -1
  18. notebook/static/2088.bundle.js +1 -1
  19. notebook/static/2089.bundle.js +1 -1
  20. notebook/static/2122.bundle.js +1 -1
  21. notebook/static/2167.bundle.js +1 -1
  22. notebook/static/2184.bundle.js +1 -1
  23. notebook/static/2311.bundle.js +1 -1
  24. notebook/static/2401.bundle.js +1 -1
  25. notebook/static/2479.bundle.js +1 -1
  26. notebook/static/2489.bundle.js +1 -1
  27. notebook/static/2607.bundle.js +1 -1
  28. notebook/static/2615.bundle.js +1 -1
  29. notebook/static/2636.bundle.js +1 -1
  30. notebook/static/2692.bundle.js +1 -1
  31. notebook/static/2924.bundle.js +1 -1
  32. notebook/static/2944.bundle.js +1 -1
  33. notebook/static/3129.bundle.js +1 -1
  34. notebook/static/3146.bundle.js +1 -1
  35. notebook/static/3154.bundle.js +1 -1
  36. notebook/static/3187.bundle.js +1 -1
  37. notebook/static/3213.bundle.js +1 -1
  38. notebook/static/3340.bundle.js +1 -1
  39. notebook/static/3360.bundle.js +1 -1
  40. notebook/static/3466.bundle.js +1 -1
  41. notebook/static/3512.bundle.js +1 -1
  42. notebook/static/3676.bundle.js +1 -1
  43. notebook/static/3680.bundle.js +1 -1
  44. notebook/static/374.bundle.js +1 -1
  45. notebook/static/3768.bundle.js +1 -1
  46. notebook/static/377.bundle.js +1 -1
  47. notebook/static/3863.bundle.js +1 -1
  48. notebook/static/3881.bundle.js +1 -1
  49. notebook/static/4042.bundle.js +1 -1
  50. notebook/static/4212.bundle.js +1 -1
  51. notebook/static/4382.bundle.js +1 -1
  52. notebook/static/4630.bundle.js +1 -1
  53. notebook/static/4645.bundle.js +1 -1
  54. notebook/static/4811.bundle.js +1 -1
  55. notebook/static/4837.bundle.js +1 -1
  56. notebook/static/5099.bundle.js +1 -1
  57. notebook/static/5135.bundle.js +1 -1
  58. notebook/static/5254.bundle.js +1 -1
  59. notebook/static/5263.bundle.js +1 -1
  60. notebook/static/5313.bundle.js +1 -1
  61. notebook/static/5325.bundle.js +1 -1
  62. notebook/static/5346.bundle.js +1 -1
  63. notebook/static/5425.bundle.js +1 -1
  64. notebook/static/5426.bundle.js +1 -1
  65. notebook/static/545.bundle.js +1 -1
  66. notebook/static/5573.bundle.js +1 -1
  67. notebook/static/5601.bundle.js +1 -1
  68. notebook/static/5733.bundle.js +1 -1
  69. notebook/static/5912.bundle.js +1 -1
  70. notebook/static/5921.bundle.js +1 -1
  71. notebook/static/6017.bundle.js +1 -1
  72. notebook/static/{1053.bundle.js → 6078.bundle.js} +1 -1
  73. notebook/static/6139.bundle.js +1 -1
  74. notebook/static/62.bundle.js +1 -1
  75. notebook/static/6281.bundle.js +1 -1
  76. notebook/static/6345.bundle.js +1 -1
  77. notebook/static/6417.bundle.js +1 -1
  78. notebook/static/6604.bundle.js +1 -1
  79. notebook/static/6621.bundle.js +1 -1
  80. notebook/static/6627.bundle.js +1 -1
  81. notebook/static/6640.bundle.js +1 -1
  82. notebook/static/6748.bundle.js +1 -1
  83. notebook/static/6815.bundle.js +1 -1
  84. notebook/static/6853.bundle.js +1 -1
  85. notebook/static/6893.bundle.js +1 -1
  86. notebook/static/690.bundle.js +1 -1
  87. notebook/static/6962.bundle.js +1 -1
  88. notebook/static/6999.bundle.js +1 -1
  89. notebook/static/7097.bundle.js +1 -1
  90. notebook/static/7153.bundle.js +1 -1
  91. notebook/static/7226.bundle.js +1 -1
  92. notebook/static/7252.bundle.js +1 -1
  93. notebook/static/7259.bundle.js +1 -1
  94. notebook/static/7302.bundle.js +1 -1
  95. notebook/static/7386.bundle.js +1 -1
  96. notebook/static/7391.bundle.js +1 -1
  97. notebook/static/7471.bundle.js +1 -1
  98. notebook/static/7506.bundle.js +2 -2
  99. notebook/static/7543.bundle.js +1 -1
  100. notebook/static/7603.bundle.js +1 -1
  101. notebook/static/7639.bundle.js +1 -1
  102. notebook/static/7655.bundle.js +1 -1
  103. notebook/static/7684.bundle.js +1 -1
  104. notebook/static/7812.bundle.js +1 -1
  105. notebook/static/7819.bundle.js +1 -1
  106. notebook/static/7854.bundle.js +1 -1
  107. notebook/static/7900.bundle.js +1 -1
  108. notebook/static/7906.bundle.js +1 -1
  109. notebook/static/8471.bundle.js +1 -1
  110. notebook/static/8579.bundle.js +1 -1
  111. notebook/static/8633.bundle.js +1 -1
  112. notebook/static/8771.bundle.js +1 -1
  113. notebook/static/8781.bundle.js +1 -1
  114. notebook/static/8845.bundle.js +1 -1
  115. notebook/static/8875.bundle.js +1 -1
  116. notebook/static/8907.bundle.js +1 -1
  117. notebook/static/8928.bundle.js +1 -1
  118. notebook/static/893.bundle.js +1 -1
  119. notebook/static/901.bundle.js +1 -1
  120. notebook/static/9068.bundle.js +1 -1
  121. notebook/static/9136.bundle.js +1 -1
  122. notebook/static/9151.bundle.js +1 -1
  123. notebook/static/9161.bundle.js +1 -1
  124. notebook/static/9268.bundle.js +1 -1
  125. notebook/static/9335.bundle.js +1 -1
  126. notebook/static/9341.bundle.js +1 -1
  127. notebook/static/9380.bundle.js +1 -1
  128. notebook/static/9605.bundle.js +1 -1
  129. notebook/static/9638.bundle.js +1 -1
  130. notebook/static/9680.bundle.js +1 -1
  131. notebook/static/9685.bundle.js +1 -1
  132. notebook/static/9752.bundle.js +1 -1
  133. notebook/static/9821.bundle.js +1 -1
  134. notebook/static/9852.bundle.js +1 -1
  135. notebook/static/bundle.js +1 -1
  136. notebook/static/third-party-licenses.json +101 -101
  137. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
  138. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
  139. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
  140. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
  141. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
  142. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
  143. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
  144. notebook-7.2.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.c842f59b09a70d32fbf5.js → notebook-7.2.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.9cd06af416befd593828.js +1 -1
  145. notebook-7.2.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/678.af323c3ff765541c6aa4.js +1 -0
  146. notebook-7.2.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.0be57dd4ecbedec78b46.js → notebook-7.2.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.6d26fccf0ddab13bf5bb.js +1 -1
  147. notebook-7.2.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.d04be841d48ffe2a9bdd.js +1 -0
  148. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
  149. {notebook-7.2.0rc0.dist-info → notebook-7.2.1.dist-info}/METADATA +2 -2
  150. {notebook-7.2.0rc0.dist-info → notebook-7.2.1.dist-info}/RECORD +173 -173
  151. notebook-7.2.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/546.f643d3e7381a2d9b834f.js +0 -1
  152. notebook-7.2.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.dbe55a308c2bef40bd5e.js +0 -1
  153. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
  154. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
  155. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
  156. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
  157. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
  158. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
  159. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
  160. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
  161. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
  162. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
  163. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
  164. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
  165. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
  166. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
  167. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
  168. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
  169. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
  170. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
  171. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
  172. {notebook-7.2.0rc0.data → notebook-7.2.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
  173. {notebook-7.2.0rc0.dist-info → notebook-7.2.1.dist-info}/WHEEL +0 -0
  174. {notebook-7.2.0rc0.dist-info → notebook-7.2.1.dist-info}/entry_points.txt +0 -0
  175. {notebook-7.2.0rc0.dist-info → notebook-7.2.1.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2607,2007],{12007:(e,n,s)=>{s.r(n),s.d(n,{EditMenu:()=>d,FileMenu:()=>m,HelpMenu:()=>o,IMainMenu:()=>k,KernelMenu:()=>c,MainMenu:()=>p,RunMenu:()=>l,SettingsMenu:()=>M,TabsMenu:()=>h,ViewMenu:()=>_});var t,r=s(22620),i=s(33625),a=s(63485),u=s(96049);class d extends r.RankedMenu{constructor(e){super(e),this.undoers={redo:new u.SemanticCommand,undo:new u.SemanticCommand},this.clearers={clearAll:new u.SemanticCommand,clearCurrent:new u.SemanticCommand},this.goToLiners=new u.SemanticCommand}}class m extends r.RankedMenu{constructor(e){super(e),this.quitEntry=!1,this.closeAndCleaners=new u.SemanticCommand,this.consoleCreators=new u.SemanticCommand}get newMenu(){var e,n;return this._newMenu||(this._newMenu=null!==(n=null===(e=(0,i.find)(this.items,(e=>{var n;return"jp-mainmenu-file-new"===(null===(n=e.submenu)||void 0===n?void 0:n.id)})))||void 0===e?void 0:e.submenu)&&void 0!==n?n:new r.RankedMenu({commands:this.commands})),this._newMenu}dispose(){var e;null===(e=this._newMenu)||void 0===e||e.dispose(),super.dispose()}}class o extends r.RankedMenu{constructor(e){super(e),this.getKernel=new u.SemanticCommand}}class c extends r.RankedMenu{constructor(e){super(e),this.kernelUsers={changeKernel:new u.SemanticCommand,clearWidget:new u.SemanticCommand,interruptKernel:new u.SemanticCommand,reconnectToKernel:new u.SemanticCommand,restartKernel:new u.SemanticCommand,shutdownKernel:new u.SemanticCommand}}}class l extends r.RankedMenu{constructor(e){super(e),this.codeRunners={restart:new u.SemanticCommand,run:new u.SemanticCommand,runAll:new u.SemanticCommand}}}class M extends r.RankedMenu{constructor(e){super(e)}}class h extends r.RankedMenu{constructor(e){super(e)}}class _ extends r.RankedMenu{constructor(e){super(e),this.editorViewers={toggleLineNumbers:new u.SemanticCommand,toggleMatchBrackets:new u.SemanticCommand,toggleWordWrap:new u.SemanticCommand}}}class p extends a.MenuBar{constructor(e){super({forceItemsPosition:{forceX:!1,forceY:!0}}),this._items=[],this._commands=e}get editMenu(){return this._editMenu||(this._editMenu=new d({commands:this._commands,rank:2,renderer:r.MenuSvg.defaultRenderer})),this._editMenu}get fileMenu(){return this._fileMenu||(this._fileMenu=new m({commands:this._commands,rank:1,renderer:r.MenuSvg.defaultRenderer})),this._fileMenu}get helpMenu(){return this._helpMenu||(this._helpMenu=new o({commands:this._commands,rank:1e3,renderer:r.MenuSvg.defaultRenderer})),this._helpMenu}get kernelMenu(){return this._kernelMenu||(this._kernelMenu=new c({commands:this._commands,rank:5,renderer:r.MenuSvg.defaultRenderer})),this._kernelMenu}get runMenu(){return this._runMenu||(this._runMenu=new l({commands:this._commands,rank:4,renderer:r.MenuSvg.defaultRenderer})),this._runMenu}get settingsMenu(){return this._settingsMenu||(this._settingsMenu=new M({commands:this._commands,rank:999,renderer:r.MenuSvg.defaultRenderer})),this._settingsMenu}get viewMenu(){return this._viewMenu||(this._viewMenu=new _({commands:this._commands,rank:3,renderer:r.MenuSvg.defaultRenderer})),this._viewMenu}get tabsMenu(){return this._tabsMenu||(this._tabsMenu=new h({commands:this._commands,rank:500,renderer:r.MenuSvg.defaultRenderer})),this._tabsMenu}addMenu(e,n=!0,s={}){if(i.ArrayExt.firstIndexOf(this.menus,e)>-1)return;r.MenuSvg.overrideDefaultRenderer(e);const a={menu:e,rank:"rank"in s?s.rank:"rank"in e?e.rank:r.IRankedMenu.DEFAULT_RANK},u=i.ArrayExt.upperBound(this._items,a,t.itemCmp);switch(e.disposed.connect(this._onMenuDisposed,this),i.ArrayExt.insert(this._items,u,a),this.insertMenu(u,e),e.id){case"jp-mainmenu-file":!this._fileMenu&&e instanceof m&&(this._fileMenu=e);break;case"jp-mainmenu-edit":!this._editMenu&&e instanceof d&&(this._editMenu=e);break;case"jp-mainmenu-view":!this._viewMenu&&e instanceof _&&(this._viewMenu=e);break;case"jp-mainmenu-run":!this._runMenu&&e instanceof l&&(this._runMenu=e);break;case"jp-mainmenu-kernel":!this._kernelMenu&&e instanceof c&&(this._kernelMenu=e);break;case"jp-mainmenu-tabs":!this._tabsMenu&&e instanceof h&&(this._tabsMenu=e);break;case"jp-mainmenu-settings":!this._settingsMenu&&e instanceof M&&(this._settingsMenu=e);break;case"jp-mainmenu-help":!this._helpMenu&&e instanceof o&&(this._helpMenu=e)}}dispose(){var e,n,s,t,r,i,a,u;null===(e=this._editMenu)||void 0===e||e.dispose(),null===(n=this._fileMenu)||void 0===n||n.dispose(),null===(s=this._helpMenu)||void 0===s||s.dispose(),null===(t=this._kernelMenu)||void 0===t||t.dispose(),null===(r=this._runMenu)||void 0===r||r.dispose(),null===(i=this._settingsMenu)||void 0===i||i.dispose(),null===(a=this._viewMenu)||void 0===a||a.dispose(),null===(u=this._tabsMenu)||void 0===u||u.dispose(),super.dispose()}static generateMenu(e,n,s){let t;const{id:i,label:a,rank:u}=n;switch(i){case"jp-mainmenu-file":t=new m({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-edit":t=new d({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-view":t=new _({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-run":t=new l({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-kernel":t=new c({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-tabs":t=new h({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-settings":t=new M({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-help":t=new o({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;default:t=new r.RankedMenu({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer})}return a&&(t.title.label=s._p("menu",a)),t}_onMenuDisposed(e){this.removeMenu(e);const n=i.ArrayExt.findFirstIndex(this._items,(n=>n.menu===e));-1!==n&&i.ArrayExt.removeAt(this._items,n)}}!function(e){e.itemCmp=function(e,n){return e.rank-n.rank}}(t||(t={}));const k=new(s(20998).Token)("@jupyterlab/mainmenu:IMainMenu","A service for the main menu bar for the application.\n Use this if you want to add your own menu items or provide implementations for standardized menu items for specific activities.")}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2607,2007],{12007:(e,n,s)=>{s.r(n),s.d(n,{EditMenu:()=>d,FileMenu:()=>m,HelpMenu:()=>o,IMainMenu:()=>k,KernelMenu:()=>c,MainMenu:()=>p,RunMenu:()=>l,SettingsMenu:()=>M,TabsMenu:()=>h,ViewMenu:()=>_});var t,r=s(35613),i=s(33625),a=s(63485),u=s(53312);class d extends r.RankedMenu{constructor(e){super(e),this.undoers={redo:new u.SemanticCommand,undo:new u.SemanticCommand},this.clearers={clearAll:new u.SemanticCommand,clearCurrent:new u.SemanticCommand},this.goToLiners=new u.SemanticCommand}}class m extends r.RankedMenu{constructor(e){super(e),this.quitEntry=!1,this.closeAndCleaners=new u.SemanticCommand,this.consoleCreators=new u.SemanticCommand}get newMenu(){var e,n;return this._newMenu||(this._newMenu=null!==(n=null===(e=(0,i.find)(this.items,(e=>{var n;return"jp-mainmenu-file-new"===(null===(n=e.submenu)||void 0===n?void 0:n.id)})))||void 0===e?void 0:e.submenu)&&void 0!==n?n:new r.RankedMenu({commands:this.commands})),this._newMenu}dispose(){var e;null===(e=this._newMenu)||void 0===e||e.dispose(),super.dispose()}}class o extends r.RankedMenu{constructor(e){super(e),this.getKernel=new u.SemanticCommand}}class c extends r.RankedMenu{constructor(e){super(e),this.kernelUsers={changeKernel:new u.SemanticCommand,clearWidget:new u.SemanticCommand,interruptKernel:new u.SemanticCommand,reconnectToKernel:new u.SemanticCommand,restartKernel:new u.SemanticCommand,shutdownKernel:new u.SemanticCommand}}}class l extends r.RankedMenu{constructor(e){super(e),this.codeRunners={restart:new u.SemanticCommand,run:new u.SemanticCommand,runAll:new u.SemanticCommand}}}class M extends r.RankedMenu{constructor(e){super(e)}}class h extends r.RankedMenu{constructor(e){super(e)}}class _ extends r.RankedMenu{constructor(e){super(e),this.editorViewers={toggleLineNumbers:new u.SemanticCommand,toggleMatchBrackets:new u.SemanticCommand,toggleWordWrap:new u.SemanticCommand}}}class p extends a.MenuBar{constructor(e){super({forceItemsPosition:{forceX:!1,forceY:!0}}),this._items=[],this._commands=e}get editMenu(){return this._editMenu||(this._editMenu=new d({commands:this._commands,rank:2,renderer:r.MenuSvg.defaultRenderer})),this._editMenu}get fileMenu(){return this._fileMenu||(this._fileMenu=new m({commands:this._commands,rank:1,renderer:r.MenuSvg.defaultRenderer})),this._fileMenu}get helpMenu(){return this._helpMenu||(this._helpMenu=new o({commands:this._commands,rank:1e3,renderer:r.MenuSvg.defaultRenderer})),this._helpMenu}get kernelMenu(){return this._kernelMenu||(this._kernelMenu=new c({commands:this._commands,rank:5,renderer:r.MenuSvg.defaultRenderer})),this._kernelMenu}get runMenu(){return this._runMenu||(this._runMenu=new l({commands:this._commands,rank:4,renderer:r.MenuSvg.defaultRenderer})),this._runMenu}get settingsMenu(){return this._settingsMenu||(this._settingsMenu=new M({commands:this._commands,rank:999,renderer:r.MenuSvg.defaultRenderer})),this._settingsMenu}get viewMenu(){return this._viewMenu||(this._viewMenu=new _({commands:this._commands,rank:3,renderer:r.MenuSvg.defaultRenderer})),this._viewMenu}get tabsMenu(){return this._tabsMenu||(this._tabsMenu=new h({commands:this._commands,rank:500,renderer:r.MenuSvg.defaultRenderer})),this._tabsMenu}addMenu(e,n=!0,s={}){if(i.ArrayExt.firstIndexOf(this.menus,e)>-1)return;r.MenuSvg.overrideDefaultRenderer(e);const a={menu:e,rank:"rank"in s?s.rank:"rank"in e?e.rank:r.IRankedMenu.DEFAULT_RANK},u=i.ArrayExt.upperBound(this._items,a,t.itemCmp);switch(e.disposed.connect(this._onMenuDisposed,this),i.ArrayExt.insert(this._items,u,a),this.insertMenu(u,e),e.id){case"jp-mainmenu-file":!this._fileMenu&&e instanceof m&&(this._fileMenu=e);break;case"jp-mainmenu-edit":!this._editMenu&&e instanceof d&&(this._editMenu=e);break;case"jp-mainmenu-view":!this._viewMenu&&e instanceof _&&(this._viewMenu=e);break;case"jp-mainmenu-run":!this._runMenu&&e instanceof l&&(this._runMenu=e);break;case"jp-mainmenu-kernel":!this._kernelMenu&&e instanceof c&&(this._kernelMenu=e);break;case"jp-mainmenu-tabs":!this._tabsMenu&&e instanceof h&&(this._tabsMenu=e);break;case"jp-mainmenu-settings":!this._settingsMenu&&e instanceof M&&(this._settingsMenu=e);break;case"jp-mainmenu-help":!this._helpMenu&&e instanceof o&&(this._helpMenu=e)}}dispose(){var e,n,s,t,r,i,a,u;null===(e=this._editMenu)||void 0===e||e.dispose(),null===(n=this._fileMenu)||void 0===n||n.dispose(),null===(s=this._helpMenu)||void 0===s||s.dispose(),null===(t=this._kernelMenu)||void 0===t||t.dispose(),null===(r=this._runMenu)||void 0===r||r.dispose(),null===(i=this._settingsMenu)||void 0===i||i.dispose(),null===(a=this._viewMenu)||void 0===a||a.dispose(),null===(u=this._tabsMenu)||void 0===u||u.dispose(),super.dispose()}static generateMenu(e,n,s){let t;const{id:i,label:a,rank:u}=n;switch(i){case"jp-mainmenu-file":t=new m({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-edit":t=new d({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-view":t=new _({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-run":t=new l({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-kernel":t=new c({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-tabs":t=new h({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-settings":t=new M({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;case"jp-mainmenu-help":t=new o({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer});break;default:t=new r.RankedMenu({commands:e,rank:u,renderer:r.MenuSvg.defaultRenderer})}return a&&(t.title.label=s._p("menu",a)),t}_onMenuDisposed(e){this.removeMenu(e);const n=i.ArrayExt.findFirstIndex(this._items,(n=>n.menu===e));-1!==n&&i.ArrayExt.removeAt(this._items,n)}}!function(e){e.itemCmp=function(e,n){return e.rank-n.rank}}(t||(t={}));const k=new(s(20998).Token)("@jupyterlab/mainmenu:IMainMenu","A service for the main menu bar for the application.\n Use this if you want to add your own menu items or provide implementations for standardized menu items for specific activities.")}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2615],{92615:(e,t,a)=>{a.r(t),a.d(t,{DETAILS_CLASS:()=>u,IMermaidManager:()=>h,IMermaidMarkdown:()=>M,MERMAID_CLASS:()=>l,MERMAID_CODE_CLASS:()=>c,MERMAID_DARK_THEME:()=>m,MERMAID_DEFAULT_THEME:()=>d,MERMAID_FILE_EXTENSIONS:()=>s,MERMAID_MIME_TYPE:()=>i,MermaidManager:()=>p,MermaidMarkdown:()=>_,RenderedMermaid:()=>w,SUMMARY_CLASS:()=>g,WARNING_CLASS:()=>o,rendererFactory:()=>T});var r=a(20998),n=a(1167);const i="text/vnd.mermaid",s=[".mmd",".mermaid"],d="default",m="dark",l="jp-RenderedMermaid",c="mermaid",o="jp-mod-warning",u="jp-RenderedMermaid-Details",g="jp-RenderedMermaid-Summary",h=new r.Token("@jupyterlab/mermaid:IMermaidManager","a manager for rendering mermaid text-based diagrams"),M=new r.Token("@jupyterlab/mermaid:IMermaidMarkdown","a manager for rendering mermaid text-based diagrams in markdown fenced code blocks");class p{constructor(e={}){this._diagrams=new n.LruCache({maxSize:e.maxCacheSize||null}),e.themes&&(E.initThemes(e.themes||null),e.themes.themeChanged.connect(this.initialize,this))}static cleanMermaidSvg(e){return e.replace(E.RE_VOID_ELEMENT,E.replaceVoidElement)}initialize(){this._diagrams.clear(),E.initMermaid()}async getMermaid(){return await E.ensureMermaid()}getMermaidVersion(){return E.version()}getCachedFigure(e){return this._diagrams.get(e)}async renderSvg(e){const t=await this.getMermaid(),a=`jp-mermaid-${E.nextMermaidId()}`,r=document.createElement("div");document.body.appendChild(r);try{let{svg:n}=await t.render(a,e,r);n=p.cleanMermaidSvg(n);const i=(new DOMParser).parseFromString(n,"image/svg+xml"),s={text:e,svg:n},d=i.querySelector("svg"),{maxWidth:m}=(null==d?void 0:d.style)||{};s.width=m?parseFloat(m):null;const l=i.querySelector("title"),c=i.querySelector("desc");return l&&(s.accessibleTitle=l.textContent),c&&(s.accessibleDescription=c.textContent),s}finally{r.remove()}}async renderFigure(e){let t=this._diagrams.get(e);if(null!=t)return t;let a=l,r=null;t=document.createElement("div"),t.className=a;try{const t=await this.renderSvg(e);r=this.makeMermaidFigure(t)}catch(a){t.classList.add(o),r=await this.makeMermaidError(e)}let n=this.getMermaidVersion();return n&&(r.dataset.jpMermaidVersion=n),t.appendChild(r),this._diagrams.set(e,t),t}makeMermaidCode(e){const t=document.createElement("pre"),a=document.createElement("code");return a.innerText=e,t.appendChild(a),a.className=c,a.textContent=e,t}async makeMermaidError(e){const t=await this.getMermaid();let a="";try{await t.parse(e)}catch(e){a=`${e}`}const r=document.createElement("details");r.className=u;const n=document.createElement("summary");n.className=g,n.appendChild(this.makeMermaidCode(e)),r.appendChild(n);const i=document.createElement("pre");return i.innerText=a,r.appendChild(i),r}makeMermaidFigure(e){const t=document.createElement("figure"),a=document.createElement("img");if(t.appendChild(a),a.setAttribute("src",`data:image/svg+xml,${encodeURIComponent(e.svg)}`),e.width&&(a.width=e.width),e.accessibleTitle&&a.setAttribute("alt",e.accessibleTitle),t.appendChild(this.makeMermaidCode(e.text)),e.accessibleDescription){const a=document.createElement("figcaption");a.className="sr-only",a.textContent=e.accessibleDescription,t.appendChild(a)}return t}}var E;!function(e){let t=null,n=null,i=null,s=0,l=null;function c(){if(!n)return!1;let e=d;if(t){const a=t.theme;e=a&&t.isLight(a)?d:m}const a=window.getComputedStyle(document.body).getPropertyValue("--jp-ui-font-family");return n.mermaidAPI.globalReset(),n.mermaidAPI.initialize({theme:e,fontFamily:a,securityLevel:"strict",maxTextSize:1e5,maxEdges:1e5,startOnLoad:!1}),!0}e.initThemes=function(e){t=e},e.version=function(){return l},e.initMermaid=c,e.getMermaid=function(){return n},e.nextMermaidId=function(){return s++},e.ensureMermaid=async function(){return null!=n?n:i?i.promise:(i=new r.PromiseDelegate,l=(await a.e(1169).then(a.t.bind(a,21169,19))).version,n=(await Promise.all([a.e(4499),a.e(4630)]).then(a.bind(a,84630))).default,c(),i.resolve(n),n)},e.RE_VOID_ELEMENT=/<\s*(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)\s*([^>]*?)\s*>/gi,e.replaceVoidElement=function(e,t,a){return(a=a.trim()).endsWith("/")||(a=`${a} /`),`<${t} ${a}>`}}(E||(E={}));class _{constructor(e){this.languages=["mermaid"],this.rank=100,this._mermaid=e.mermaid}async walk(e){await this._mermaid.renderFigure(e)}render(e){let t=this._mermaid.getCachedFigure(e);return t?t.outerHTML:null}}var y=a(63485);const C="image/svg+xml";class w extends y.Widget{constructor(e){super(),this._lastRendered=null,this._mimeType=e.mimeType,this.addClass(l)}static set manager(e){w._manager?console.warn("Mermaid manager may only be set once, and is already set."):(w._manager=e,w._managerReady.resolve(e))}async renderModel(e){const t=await w._managerReady.promise,a=e.data[this._mimeType];if(null==a||a===this._lastRendered)return;this._lastRendered=a;const r=await t.renderFigure(a);if(r.classList.contains(o)?this.node.classList.add(o):this.node.classList.remove(o),!r.firstChild)return;this.node.innerHTML!==r.innerHTML&&(this.node.innerHTML=r.innerHTML);const n=t.getMermaidVersion(),s={...e.metadata[i]||{},version:n},d={...e.metadata,[i]:s},m=r.querySelector("img");if(m){const t=decodeURIComponent(m.src.split(",")[1]);t!==e.data[C]&&e.setData({data:{...e.data,[C]:t},metadata:d})}else{const t={...e.data};delete t[C],e.setData({data:t,metadata:d})}}}w._manager=null,w._managerReady=new r.PromiseDelegate;const T={safe:!0,mimeTypes:[i],createRenderer:e=>new w(e)}}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2615],{92615:(e,t,a)=>{a.r(t),a.d(t,{DETAILS_CLASS:()=>u,IMermaidManager:()=>h,IMermaidMarkdown:()=>M,MERMAID_CLASS:()=>l,MERMAID_CODE_CLASS:()=>c,MERMAID_DARK_THEME:()=>m,MERMAID_DEFAULT_THEME:()=>d,MERMAID_FILE_EXTENSIONS:()=>s,MERMAID_MIME_TYPE:()=>i,MermaidManager:()=>p,MermaidMarkdown:()=>_,RenderedMermaid:()=>w,SUMMARY_CLASS:()=>g,WARNING_CLASS:()=>o,rendererFactory:()=>T});var r=a(20998),n=a(68722);const i="text/vnd.mermaid",s=[".mmd",".mermaid"],d="default",m="dark",l="jp-RenderedMermaid",c="mermaid",o="jp-mod-warning",u="jp-RenderedMermaid-Details",g="jp-RenderedMermaid-Summary",h=new r.Token("@jupyterlab/mermaid:IMermaidManager","a manager for rendering mermaid text-based diagrams"),M=new r.Token("@jupyterlab/mermaid:IMermaidMarkdown","a manager for rendering mermaid text-based diagrams in markdown fenced code blocks");class p{constructor(e={}){this._diagrams=new n.LruCache({maxSize:e.maxCacheSize||null}),e.themes&&(E.initThemes(e.themes||null),e.themes.themeChanged.connect(this.initialize,this))}static cleanMermaidSvg(e){return e.replace(E.RE_VOID_ELEMENT,E.replaceVoidElement)}initialize(){this._diagrams.clear(),E.initMermaid()}async getMermaid(){return await E.ensureMermaid()}getMermaidVersion(){return E.version()}getCachedFigure(e){return this._diagrams.get(e)}async renderSvg(e){const t=await this.getMermaid(),a=`jp-mermaid-${E.nextMermaidId()}`,r=document.createElement("div");document.body.appendChild(r);try{let{svg:n}=await t.render(a,e,r);n=p.cleanMermaidSvg(n);const i=(new DOMParser).parseFromString(n,"image/svg+xml"),s={text:e,svg:n},d=i.querySelector("svg"),{maxWidth:m}=(null==d?void 0:d.style)||{};s.width=m?parseFloat(m):null;const l=i.querySelector("title"),c=i.querySelector("desc");return l&&(s.accessibleTitle=l.textContent),c&&(s.accessibleDescription=c.textContent),s}finally{r.remove()}}async renderFigure(e){let t=this._diagrams.get(e);if(null!=t)return t;let a=l,r=null;t=document.createElement("div"),t.className=a;try{const t=await this.renderSvg(e);r=this.makeMermaidFigure(t)}catch(a){t.classList.add(o),r=await this.makeMermaidError(e)}let n=this.getMermaidVersion();return n&&(r.dataset.jpMermaidVersion=n),t.appendChild(r),this._diagrams.set(e,t),t}makeMermaidCode(e){const t=document.createElement("pre"),a=document.createElement("code");return a.innerText=e,t.appendChild(a),a.className=c,a.textContent=e,t}async makeMermaidError(e){const t=await this.getMermaid();let a="";try{await t.parse(e)}catch(e){a=`${e}`}const r=document.createElement("details");r.className=u;const n=document.createElement("summary");n.className=g,n.appendChild(this.makeMermaidCode(e)),r.appendChild(n);const i=document.createElement("pre");return i.innerText=a,r.appendChild(i),r}makeMermaidFigure(e){const t=document.createElement("figure"),a=document.createElement("img");if(t.appendChild(a),a.setAttribute("src",`data:image/svg+xml,${encodeURIComponent(e.svg)}`),e.width&&(a.width=e.width),e.accessibleTitle&&a.setAttribute("alt",e.accessibleTitle),t.appendChild(this.makeMermaidCode(e.text)),e.accessibleDescription){const a=document.createElement("figcaption");a.className="sr-only",a.textContent=e.accessibleDescription,t.appendChild(a)}return t}}var E;!function(e){let t=null,n=null,i=null,s=0,l=null;function c(){if(!n)return!1;let e=d;if(t){const a=t.theme;e=a&&t.isLight(a)?d:m}const a=window.getComputedStyle(document.body).getPropertyValue("--jp-ui-font-family");return n.mermaidAPI.globalReset(),n.mermaidAPI.initialize({theme:e,fontFamily:a,securityLevel:"strict",maxTextSize:1e5,maxEdges:1e5,startOnLoad:!1}),!0}e.initThemes=function(e){t=e},e.version=function(){return l},e.initMermaid=c,e.getMermaid=function(){return n},e.nextMermaidId=function(){return s++},e.ensureMermaid=async function(){return null!=n?n:i?i.promise:(i=new r.PromiseDelegate,l=(await a.e(1169).then(a.t.bind(a,21169,19))).version,n=(await Promise.all([a.e(4499),a.e(4630)]).then(a.bind(a,84630))).default,c(),i.resolve(n),n)},e.RE_VOID_ELEMENT=/<\s*(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)\s*([^>]*?)\s*>/gi,e.replaceVoidElement=function(e,t,a){return(a=a.trim()).endsWith("/")||(a=`${a} /`),`<${t} ${a}>`}}(E||(E={}));class _{constructor(e){this.languages=["mermaid"],this.rank=100,this._mermaid=e.mermaid}async walk(e){await this._mermaid.renderFigure(e)}render(e){let t=this._mermaid.getCachedFigure(e);return t?t.outerHTML:null}}var y=a(63485);const C="image/svg+xml";class w extends y.Widget{constructor(e){super(),this._lastRendered=null,this._mimeType=e.mimeType,this.addClass(l)}static set manager(e){w._manager?console.warn("Mermaid manager may only be set once, and is already set."):(w._manager=e,w._managerReady.resolve(e))}async renderModel(e){const t=await w._managerReady.promise,a=e.data[this._mimeType];if(null==a||a===this._lastRendered)return;this._lastRendered=a;const r=await t.renderFigure(a);if(r.classList.contains(o)?this.node.classList.add(o):this.node.classList.remove(o),!r.firstChild)return;this.node.innerHTML!==r.innerHTML&&(this.node.innerHTML=r.innerHTML);const n=t.getMermaidVersion(),s={...e.metadata[i]||{},version:n},d={...e.metadata,[i]:s},m=r.querySelector("img");if(m){const t=decodeURIComponent(m.src.split(",")[1]);t!==e.data[C]&&e.setData({data:{...e.data,[C]:t},metadata:d})}else{const t={...e.data};delete t[C],e.setData({data:t,metadata:d})}}}w._manager=null,w._managerReady=new r.PromiseDelegate;const T={safe:!0,mimeTypes:[i],createRenderer:e=>new w(e)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2636],{72636:(e,t,s)=>{s.r(t),s.d(t,{CodeConsole:()=>D,ConsoleHistory:()=>a,ConsolePanel:()=>S,ForeignHandler:()=>r,IConsoleCellExecutor:()=>E,IConsoleTracker:()=>F,runCell:()=>n});var o=s(67406);async function n({cell:e,onCellExecuted:t,sessionContext:s}){return o.CodeCell.execute(e,s).then((s=>{if(s&&"ok"===s.content.status){const o=s.content;if(o.payload&&o.payload.length){const t=o.payload.filter((e=>"set_next_input"===e.source))[0];if(t){const s=t.text;e.model.sharedModel.setSource(s)}}return t({cell:e,executionDate:new Date,success:!0}),!0}if(s&&"error"===s.content.status){const o=s.content.ename,n=s.content.evalue;return t({cell:e,executionDate:new Date,success:!1,error:new Error(`KernelReplyNotOK: ${o} ${n}`)}),!1}return t({cell:e,executionDate:new Date,success:!1}),!1}),(s=>(t({cell:e,executionDate:new Date,success:!1,error:new Error(s)}),!1)))}var i,l=s(81997);class r{constructor(e){this._enabled=!1,this._isDisposed=!1,this.sessionContext=e.sessionContext,this.sessionContext.iopubMessage.connect(this.onIOPubMessage,this),this._parent=e.parent}get enabled(){return this._enabled}set enabled(e){this._enabled=e}get parent(){return this._parent}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,l.Signal.clearData(this))}onIOPubMessage(e,t){var s;if(!this._enabled)return!1;const o=null===(s=this.sessionContext.session)||void 0===s?void 0:s.kernel;if(!o)return!1;const n=this._parent;if(t.parent_header.session===o.clientId)return!1;const i=t.header.msg_type,l=t.parent_header.msg_id;let r;switch(i){case"execute_input":{const e=t;r=this._newCell(l);const s=r.model;return s.executionCount=e.content.execution_count,s.sharedModel.setSource(e.content.code),s.trusted=!0,n.update(),!0}case"execute_result":case"display_data":case"stream":case"error":{if(r=this._parent.getCell(l),!r)return!1;const e={...t.content,output_type:i};return r.model.outputs.add(e),n.update(),!0}case"clear_output":{const e=t.content.wait;return r=this._parent.getCell(l),r&&r.model.outputs.clear(e),!0}default:return!1}}_newCell(e){const t=this.parent.createCodeCell();return t.addClass("jp-CodeConsole-foreignCell"),this._parent.addCell(t,e),t}}class a{constructor(e){this._cursor=0,this._hasSession=!1,this._history=[],this._placeholder="",this._setByHistory=!1,this._isDisposed=!1,this._editor=null,this._filtered=[];const{sessionContext:t}=e;t&&(this.sessionContext=t,this._handleKernel(),this.sessionContext.kernelChanged.connect(this._handleKernel,this))}get editor(){return this._editor}set editor(e){if(this._editor===e)return;const t=this._editor;t&&(t.edgeRequested.disconnect(this.onEdgeRequest,this),t.model.sharedModel.changed.disconnect(this.onTextChange,this)),this._editor=e,e&&(e.edgeRequested.connect(this.onEdgeRequest,this),e.model.sharedModel.changed.connect(this.onTextChange,this))}get placeholder(){return this._placeholder}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed=!0,this._history.length=0,l.Signal.clearData(this)}back(e){this._hasSession||(this._hasSession=!0,this._placeholder=e,this.setFilter(e),this._cursor=this._filtered.length-1),--this._cursor,this._cursor=Math.max(0,this._cursor);const t=this._filtered[this._cursor];return Promise.resolve(t)}forward(e){this._hasSession||(this._hasSession=!0,this._placeholder=e,this.setFilter(e),this._cursor=this._filtered.length),++this._cursor,this._cursor=Math.min(this._filtered.length-1,this._cursor);const t=this._filtered[this._cursor];return Promise.resolve(t)}push(e){e&&e!==this._history[this._history.length-1]&&this._history.push(e),this.reset()}reset(){this._cursor=this._history.length,this._hasSession=!1,this._placeholder=""}onHistory(e){this._history.length=0;let t="",s="";if("ok"===e.content.status)for(let o=0;o<e.content.history.length;o++)s=e.content.history[o][2],s!==t&&this._history.push(t=s);this._cursor=this._history.length}onTextChange(){this._setByHistory?this._setByHistory=!1:this.reset()}onEdgeRequest(e,t){const s=e.model.sharedModel,o=s.getSource();"top"===t||"topLine"===t?this.back(o).then((t=>{if(this.isDisposed||!t)return;if(s.getSource()===t)return;this._setByHistory=!0,s.setSource(t);let o=0;o=t.indexOf("\n"),o<0&&(o=t.length),e.setCursorPosition({line:0,column:o})})):this.forward(o).then((t=>{if(this.isDisposed)return;const o=t||this.placeholder;if(s.getSource()===o)return;this._setByHistory=!0,s.setSource(o);const n=e.getPositionAt(o.length);n&&e.setCursorPosition(n)}))}async _handleKernel(){var e,t;const s=null===(t=null===(e=this.sessionContext)||void 0===e?void 0:e.session)||void 0===t?void 0:t.kernel;if(s)return s.requestHistory(i.initialRequest).then((e=>{this.onHistory(e)}));this._history.length=0}setFilter(e=""){this._filtered.length=0;let t="",s="";for(let o=0;o<this._history.length;o++)s=this._history[o],s!==t&&e===s.slice(0,e.length)&&this._filtered.push(t=s);this._filtered.push(e)}}!function(e){e.initialRequest={output:!1,raw:!0,hist_access_type:"tail",n:500}}(i||(i={}));var c=s(96049),h=s(1167),d=s(13408),u=s(37267),p=s(22620),_=s(20998),C=s(63485),m=s(89843),g=s(3546),y=s(57508),f=s(58959),v=s(99615);const x="jp-Console-cell",w="jp-CodeConsole-promptCell";class D extends C.Widget{constructor(e){var t,s,o;super(),this.editorConfig=D.defaultEditorConfig,this._banner=null,this._executed=new l.Signal(this),this._mimetype="text/x-ipython",this._msgIds=new Map,this._msgIdCells=new Map,this._promptCellCreated=new l.Signal(this),this._dragData=null,this._drag=null,this._focusedCell=null,this._translator=null!==(t=e.translator)&&void 0!==t?t:u.nullTranslator,this._executor=null!==(s=e.executor)&&void 0!==s?s:Object.freeze({runCell:n}),this.addClass("jp-CodeConsole"),this.node.dataset.jpKernelUser="true",this.node.dataset.jpCodeRunner="true",this.node.dataset.jpUndoer="true",this.node.tabIndex=-1;const i=this.layout=new C.PanelLayout;this._cells=new f.ObservableList,this._content=new C.Panel,this._input=new C.Panel,this.contentFactory=e.contentFactory,this.modelFactory=null!==(o=e.modelFactory)&&void 0!==o?o:D.defaultModelFactory,this.rendermime=e.rendermime,this.sessionContext=e.sessionContext,this._mimeTypeService=e.mimeTypeService,this._content.addClass("jp-CodeConsole-content"),this._input.addClass("jp-CodeConsole-input"),i.addWidget(this._content),i.addWidget(this._input),this._history=new a({sessionContext:this.sessionContext}),this._onKernelChanged(),this.sessionContext.kernelChanged.connect(this._onKernelChanged,this),this.sessionContext.statusChanged.connect(this._onKernelStatusChanged,this)}get executed(){return this._executed}get promptCellCreated(){return this._promptCellCreated}get cells(){return this._cells}get promptCell(){return this._input.layout.widgets[0]||null}addCell(e,t){e.addClass(x),this._content.addWidget(e),this._cells.push(e),t&&(this._msgIds.set(t,e),this._msgIdCells.set(e,t)),e.disposed.connect(this._onCellDisposed,this),this.update()}addBanner(){if(this._banner){const e=this._banner;this._cells.push(this._banner),e.disposed.connect(this._onCellDisposed,this)}const e=this.modelFactory.createRawCell({sharedModel:(0,y.createStandaloneCell)({cell_type:"raw",source:"..."})}),t=(this._banner=new o.RawCell({model:e,contentFactory:this.contentFactory,placeholder:!1,editorConfig:{autoClosingBrackets:!1,codeFolding:!1,highlightActiveLine:!1,highlightTrailingWhitespace:!1,highlightWhitespace:!1,indentUnit:"4",lineNumbers:!1,lineWrap:!0,matchBrackets:!1,readOnly:!0,rulers:[],scrollPastEnd:!1,smartIndent:!1,tabSize:4,theme:"jupyter"}})).initializeState();t.addClass("jp-CodeConsole-banner"),t.readOnly=!0,this._content.addWidget(t)}clear(){const e=this._cells;for(;e.length>0;)e.get(0).dispose()}createCodeCell(){const e=this.contentFactory,t=this._createCodeCellOptions(),s=e.createCodeCell(t);return s.readOnly=!0,s.model.mimeType=this._mimetype,s}dispose(){this.isDisposed||(this._msgIdCells=null,this._msgIds=null,this._history.dispose(),super.dispose())}async execute(e=!1,t=250){var s,o;if("dead"===(null===(o=null===(s=this.sessionContext.session)||void 0===s?void 0:s.kernel)||void 0===o?void 0:o.status))return;const n=this.promptCell;if(!n)throw new Error("Cannot execute without a prompt cell");if(n.model.trusted=!0,e)return this.newPromptCell(),void await this._execute(n);const i=await this._shouldExecute(t);this.isDisposed||(i?(this.newPromptCell(),this.promptCell.editor.focus(),await this._execute(n)):n.editor.newIndentedLine())}getCell(e){return this._msgIds.get(e)}inject(e,t={}){const s=this.createCodeCell();s.model.sharedModel.setSource(e);for(const e of Object.keys(t))s.model.setMetadata(e,t[e]);return this.addCell(s),this._execute(s)}insertLinebreak(){const e=this.promptCell;e&&e.editor.newIndentedLine()}replaceSelection(e){var t,s;const o=this.promptCell;o&&(null===(s=(t=o.editor).replaceSelection)||void 0===s||s.call(t,e))}serialize(){const e=[];for(const t of this._cells){const s=t.model;(0,o.isCodeCellModel)(s)&&e.push(s.toJSON())}return this.promptCell&&e.push(this.promptCell.model.toJSON()),e}_evtMouseDown(e){const{button:t,shiftKey:s}=e;if(0!==t&&2!==t||s&&2===t)return;let n=e.target;const i=e=>e.classList.contains(x);let l=o.CellDragUtils.findCell(n,this._cells,i);if(-1===l&&(n=document.elementFromPoint(e.clientX,e.clientY),l=o.CellDragUtils.findCell(n,this._cells,i)),-1===l)return;const r=this._cells.get(l);"prompt"===o.CellDragUtils.detectTargetArea(r,e.target)&&(this._dragData={pressX:e.clientX,pressY:e.clientY,index:l},this._focusedCell=r,document.addEventListener("mouseup",this,!0),document.addEventListener("mousemove",this,!0),e.preventDefault())}_evtMouseMove(e){const t=this._dragData;t&&o.CellDragUtils.shouldStartDrag(t.pressX,t.pressY,e.clientX,e.clientY)&&this._startDrag(t.index,e.clientX,e.clientY)}_startDrag(e,t,s){const n=this._focusedCell.model,i=[n.toJSON()],l=o.CellDragUtils.createCellDragImage(this._focusedCell,i);this._drag=new v.Drag({mimeData:new _.MimeData,dragImage:l,proposedAction:"copy",supportedActions:"copy",source:this}),this._drag.mimeData.setData("application/vnd.jupyter.cells",i);const r=n.sharedModel.getSource();return this._drag.mimeData.setData("text/plain",r),this._focusedCell=null,document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),this._drag.start(t,s).then((()=>{this.isDisposed||(this._drag=null,this._dragData=null)}))}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseup":this._evtMouseUp(e);break;case"focusin":this._evtFocusIn(e);break;case"focusout":this._evtFocusOut(e)}}onAfterAttach(e){const t=this.node;t.addEventListener("keydown",this,!0),t.addEventListener("click",this),t.addEventListener("mousedown",this),t.addEventListener("focusin",this),t.addEventListener("focusout",this),this.promptCell?(this.promptCell.editor.focus(),this.update()):this.newPromptCell()}onBeforeDetach(e){const t=this.node;t.removeEventListener("keydown",this,!0),t.removeEventListener("click",this),t.removeEventListener("focusin",this),t.removeEventListener("focusout",this)}onActivateRequest(e){const t=this.promptCell&&this.promptCell.editor;t&&t.focus(),this.update()}newPromptCell(){var e;let t=this.promptCell;const s=this._input;if(t){t.readOnly=!0,t.removeClass(w);const o=t;requestIdleCallback((()=>{l.Signal.clearData(o.editor)})),null===(e=t.editor)||void 0===e||e.blur(),s.widgets[0].parent=null,this.addCell(t)}const o=this.contentFactory,n=this._createCodeCellOptions();t=o.createCodeCell(n),t.model.mimeType=this._mimetype,t.addClass(w),this._input.addWidget(t),this._history.editor=t.editor,this._promptCellCreated.emit(t)}onUpdateRequest(e){b.scrollToBottom(this._content.node)}_evtKeyDown(e){const t=this.promptCell&&this.promptCell.editor;t&&(13!==e.keyCode||t.hasFocus()?27===e.keyCode&&t.hasFocus()&&(e.preventDefault(),e.stopPropagation(),this.node.focus()):(e.preventDefault(),t.focus()))}_evtMouseUp(e){this.promptCell&&this.promptCell.node.contains(e.target)&&this.promptCell.editor.focus()}_evtFocusIn(e){this._updateReadWrite()}_evtFocusOut(e){this._updateReadWrite()}async _execute(e){const t=e.model.sharedModel.getSource();if(this._history.push(t),"clear"===t||"%clear"===t)return this.clear(),Promise.resolve(void 0);e.model.contentChanged.connect(this.update,this);const s={cell:e,sessionContext:this.sessionContext,onCellExecuted:e=>{if(this._executed.emit(e.executionDate),e.error)for(const e of this._cells)null===e.model.executionCount&&e.setPrompt("")}};try{await this._executor.runCell(s)}finally{this.isDisposed||(e.model.contentChanged.disconnect(this.update,this),this.update())}}_handleInfo(e){if("ok"!==e.status)return void this._banner.model.sharedModel.setSource("Error in getting kernel banner");this._banner.model.sharedModel.setSource(e.banner);const t=e.language_info;this._mimetype=this._mimeTypeService.getMimeTypeByLanguage(t),this.promptCell&&(this.promptCell.model.mimeType=this._mimetype)}_createCodeCellOptions(){const{node:e}=this,t=this.contentFactory,s=this.modelFactory.createCodeCell({}),o=this.rendermime,n=this.editorConfig,i=g.EditorView.domEventHandlers({keydown:(t,s)=>13===t.keyCode&&"terminal"===e.dataset.jpInteractionMode&&(t.preventDefault(),!0)});return{model:s,rendermime:o,contentFactory:t,editorConfig:n,editorExtensions:[m.Prec.high(i)],placeholder:!1,translator:this._translator}}_onCellDisposed(e,t){if(!this.isDisposed){this._cells.removeValue(e);const t=this._msgIdCells.get(e);t&&(this._msgIdCells.delete(e),this._msgIds.delete(t))}}_shouldExecute(e){const t=this.promptCell;if(!t)return Promise.resolve(!1);const s=t.model.sharedModel.getSource();return new Promise(((t,o)=>{var n;const i=setTimeout((()=>{t(!0)}),e),l=null===(n=this.sessionContext.session)||void 0===n?void 0:n.kernel;l?l.requestIsComplete({code:s}).then((e=>{clearTimeout(i),this.isDisposed&&t(!1),"incomplete"===e.content.status?t(!1):t(!0)})).catch((()=>{t(!0)})):t(!1)}))}async _onKernelChanged(){var e;this.clear(),this._banner&&(this._banner.dispose(),this._banner=null),this.addBanner(),(null===(e=this.sessionContext.session)||void 0===e?void 0:e.kernel)&&this._handleInfo(await this.sessionContext.session.kernel.info)}async _onKernelStatusChanged(){var e;const t=null===(e=this.sessionContext.session)||void 0===e?void 0:e.kernel;"restarting"===(null==t?void 0:t.status)&&(this.addBanner(),this._handleInfo(await(null==t?void 0:t.info)))}_updateReadWrite(){const e=c.DOMUtils.hasActiveEditableElement(this.node);this.node.classList.toggle("jp-mod-readWrite",e)}}var b,k;!function(e){e.defaultEditorConfig={codeFolding:!1,lineNumbers:!1};class t extends o.Cell.ContentFactory{createCodeCell(e){return new o.CodeCell(e).initializeState()}createRawCell(e){return new o.RawCell(e).initializeState()}}e.ContentFactory=t;class s{constructor(e={}){this.codeCellContentFactory=e.codeCellContentFactory||o.CodeCellModel.defaultContentFactory}createCodeCell(e={}){return e.contentFactory||(e.contentFactory=this.codeCellContentFactory),new o.CodeCellModel(e)}createRawCell(e){return new o.RawCellModel(e)}}e.ModelFactory=s,e.defaultModelFactory=new s({})}(D||(D={})),function(e){e.scrollToBottom=function(e){e.scrollTop=e.scrollHeight-e.clientHeight}}(b||(b={}));class S extends c.MainAreaWidget{constructor(e){super({content:new C.Panel}),this._executed=null,this._connected=null,this.addClass("jp-ConsolePanel");let{executor:t,rendermime:s,mimeTypeService:o,path:n,basePath:i,name:l,manager:r,modelFactory:a,sessionContext:m,translator:g}=e;this.translator=null!=g?g:u.nullTranslator;const y=this.translator.load("jupyterlab"),f=this.contentFactory=e.contentFactory,v=k.count++;n||(n=h.PathExt.join(i||"",`console-${v}-${_.UUID.uuid4()}`)),m=this._sessionContext=null!=m?m:new c.SessionContext({sessionManager:r.sessions,specsManager:r.kernelspecs,path:r.contents.localPath(n),name:l||y.__("Console %1",v),type:"console",kernelPreference:e.kernelPreference,setBusy:e.setBusy});const x=new d.RenderMimeRegistry.UrlResolver({path:n,contents:r.contents});s=s.clone({resolver:x}),this.console=f.createConsole({executor:t,rendermime:s,sessionContext:m,mimeTypeService:o,contentFactory:f,modelFactory:a,translator:g}),this.content.addWidget(this.console),m.initialize().then((async t=>{var s;t&&await(null!==(s=e.sessionDialogs)&&void 0!==s?s:new c.SessionContextDialogs({translator:g})).selectKernel(m),this._connected=new Date,this._updateTitlePanel()})),this.console.executed.connect(this._onExecuted,this),this._updateTitlePanel(),m.kernelChanged.connect(this._updateTitlePanel,this),m.propertyChanged.connect(this._updateTitlePanel,this),this.title.icon=p.consoleIcon,this.title.closable=!0,this.id=`console-${v}`}get sessionContext(){return this._sessionContext}dispose(){this.sessionContext.dispose(),this.console.dispose(),super.dispose()}onActivateRequest(e){const t=this.console.promptCell;t&&t.editor.focus()}onCloseRequest(e){super.onCloseRequest(e),this.dispose()}_onExecuted(e,t){this._executed=t,this._updateTitlePanel()}_updateTitlePanel(){k.updateTitle(this,this._connected,this._executed,this.translator)}}!function(e){class t extends D.ContentFactory{createConsole(e){return new D(e)}}e.ContentFactory=t,e.IContentFactory=new _.Token("@jupyterlab/console:IContentFactory","A factory object that creates new code consoles. Use this if you want to create and host code consoles in your own UI elements.")}(S||(S={})),function(e){e.count=1,e.updateTitle=function(e,t,s,o){const n=(o=o||u.nullTranslator).load("jupyterlab"),i=e.console.sessionContext.session;if(i){let o=n.__("Name: %1\n",i.name)+n.__("Directory: %1\n",h.PathExt.dirname(i.path))+n.__("Kernel: %1",e.console.sessionContext.kernelDisplayName);t&&(o+=n.__("\nConnected: %1",h.Time.format(t.toISOString()))),s&&(o+=n.__("\nLast Execution: %1")),e.title.label=i.name,e.title.caption=o}else e.title.label=n.__("Console"),e.title.caption=""}}(k||(k={}));const F=new _.Token("@jupyterlab/console:IConsoleTracker","A widget tracker for code consoles.\n Use this if you want to be able to iterate over and interact with code consoles\n created by the application."),E=new _.Token("@jupyterlab/console:IConsoleCellExecutor","The console cell executor")}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2636],{72636:(e,t,s)=>{s.r(t),s.d(t,{CodeConsole:()=>D,ConsoleHistory:()=>a,ConsolePanel:()=>S,ForeignHandler:()=>r,IConsoleCellExecutor:()=>E,IConsoleTracker:()=>F,runCell:()=>n});var o=s(73166);async function n({cell:e,onCellExecuted:t,sessionContext:s}){return o.CodeCell.execute(e,s).then((s=>{if(s&&"ok"===s.content.status){const o=s.content;if(o.payload&&o.payload.length){const t=o.payload.filter((e=>"set_next_input"===e.source))[0];if(t){const s=t.text;e.model.sharedModel.setSource(s)}}return t({cell:e,executionDate:new Date,success:!0}),!0}if(s&&"error"===s.content.status){const o=s.content.ename,n=s.content.evalue;return t({cell:e,executionDate:new Date,success:!1,error:new Error(`KernelReplyNotOK: ${o} ${n}`)}),!1}return t({cell:e,executionDate:new Date,success:!1}),!1}),(s=>(t({cell:e,executionDate:new Date,success:!1,error:new Error(s)}),!1)))}var i,l=s(81997);class r{constructor(e){this._enabled=!1,this._isDisposed=!1,this.sessionContext=e.sessionContext,this.sessionContext.iopubMessage.connect(this.onIOPubMessage,this),this._parent=e.parent}get enabled(){return this._enabled}set enabled(e){this._enabled=e}get parent(){return this._parent}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,l.Signal.clearData(this))}onIOPubMessage(e,t){var s;if(!this._enabled)return!1;const o=null===(s=this.sessionContext.session)||void 0===s?void 0:s.kernel;if(!o)return!1;const n=this._parent;if(t.parent_header.session===o.clientId)return!1;const i=t.header.msg_type,l=t.parent_header.msg_id;let r;switch(i){case"execute_input":{const e=t;r=this._newCell(l);const s=r.model;return s.executionCount=e.content.execution_count,s.sharedModel.setSource(e.content.code),s.trusted=!0,n.update(),!0}case"execute_result":case"display_data":case"stream":case"error":{if(r=this._parent.getCell(l),!r)return!1;const e={...t.content,output_type:i};return r.model.outputs.add(e),n.update(),!0}case"clear_output":{const e=t.content.wait;return r=this._parent.getCell(l),r&&r.model.outputs.clear(e),!0}default:return!1}}_newCell(e){const t=this.parent.createCodeCell();return t.addClass("jp-CodeConsole-foreignCell"),this._parent.addCell(t,e),t}}class a{constructor(e){this._cursor=0,this._hasSession=!1,this._history=[],this._placeholder="",this._setByHistory=!1,this._isDisposed=!1,this._editor=null,this._filtered=[];const{sessionContext:t}=e;t&&(this.sessionContext=t,this._handleKernel(),this.sessionContext.kernelChanged.connect(this._handleKernel,this))}get editor(){return this._editor}set editor(e){if(this._editor===e)return;const t=this._editor;t&&(t.edgeRequested.disconnect(this.onEdgeRequest,this),t.model.sharedModel.changed.disconnect(this.onTextChange,this)),this._editor=e,e&&(e.edgeRequested.connect(this.onEdgeRequest,this),e.model.sharedModel.changed.connect(this.onTextChange,this))}get placeholder(){return this._placeholder}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed=!0,this._history.length=0,l.Signal.clearData(this)}back(e){this._hasSession||(this._hasSession=!0,this._placeholder=e,this.setFilter(e),this._cursor=this._filtered.length-1),--this._cursor,this._cursor=Math.max(0,this._cursor);const t=this._filtered[this._cursor];return Promise.resolve(t)}forward(e){this._hasSession||(this._hasSession=!0,this._placeholder=e,this.setFilter(e),this._cursor=this._filtered.length),++this._cursor,this._cursor=Math.min(this._filtered.length-1,this._cursor);const t=this._filtered[this._cursor];return Promise.resolve(t)}push(e){e&&e!==this._history[this._history.length-1]&&this._history.push(e),this.reset()}reset(){this._cursor=this._history.length,this._hasSession=!1,this._placeholder=""}onHistory(e){this._history.length=0;let t="",s="";if("ok"===e.content.status)for(let o=0;o<e.content.history.length;o++)s=e.content.history[o][2],s!==t&&this._history.push(t=s);this._cursor=this._history.length}onTextChange(){this._setByHistory?this._setByHistory=!1:this.reset()}onEdgeRequest(e,t){const s=e.model.sharedModel,o=s.getSource();"top"===t||"topLine"===t?this.back(o).then((t=>{if(this.isDisposed||!t)return;if(s.getSource()===t)return;this._setByHistory=!0,s.setSource(t);let o=0;o=t.indexOf("\n"),o<0&&(o=t.length),e.setCursorPosition({line:0,column:o})})):this.forward(o).then((t=>{if(this.isDisposed)return;const o=t||this.placeholder;if(s.getSource()===o)return;this._setByHistory=!0,s.setSource(o);const n=e.getPositionAt(o.length);n&&e.setCursorPosition(n)}))}async _handleKernel(){var e,t;const s=null===(t=null===(e=this.sessionContext)||void 0===e?void 0:e.session)||void 0===t?void 0:t.kernel;if(s)return s.requestHistory(i.initialRequest).then((e=>{this.onHistory(e)}));this._history.length=0}setFilter(e=""){this._filtered.length=0;let t="",s="";for(let o=0;o<this._history.length;o++)s=this._history[o],s!==t&&e===s.slice(0,e.length)&&this._filtered.push(t=s);this._filtered.push(e)}}!function(e){e.initialRequest={output:!1,raw:!0,hist_access_type:"tail",n:500}}(i||(i={}));var c=s(53312),h=s(68722),d=s(81221),u=s(12030),p=s(35613),_=s(20998),C=s(63485),m=s(89843),g=s(3546),y=s(57508),f=s(31231),v=s(99615);const x="jp-Console-cell",w="jp-CodeConsole-promptCell";class D extends C.Widget{constructor(e){var t,s,o;super(),this.editorConfig=D.defaultEditorConfig,this._banner=null,this._executed=new l.Signal(this),this._mimetype="text/x-ipython",this._msgIds=new Map,this._msgIdCells=new Map,this._promptCellCreated=new l.Signal(this),this._dragData=null,this._drag=null,this._focusedCell=null,this._translator=null!==(t=e.translator)&&void 0!==t?t:u.nullTranslator,this._executor=null!==(s=e.executor)&&void 0!==s?s:Object.freeze({runCell:n}),this.addClass("jp-CodeConsole"),this.node.dataset.jpKernelUser="true",this.node.dataset.jpCodeRunner="true",this.node.dataset.jpUndoer="true",this.node.tabIndex=-1;const i=this.layout=new C.PanelLayout;this._cells=new f.ObservableList,this._content=new C.Panel,this._input=new C.Panel,this.contentFactory=e.contentFactory,this.modelFactory=null!==(o=e.modelFactory)&&void 0!==o?o:D.defaultModelFactory,this.rendermime=e.rendermime,this.sessionContext=e.sessionContext,this._mimeTypeService=e.mimeTypeService,this._content.addClass("jp-CodeConsole-content"),this._input.addClass("jp-CodeConsole-input"),i.addWidget(this._content),i.addWidget(this._input),this._history=new a({sessionContext:this.sessionContext}),this._onKernelChanged(),this.sessionContext.kernelChanged.connect(this._onKernelChanged,this),this.sessionContext.statusChanged.connect(this._onKernelStatusChanged,this)}get executed(){return this._executed}get promptCellCreated(){return this._promptCellCreated}get cells(){return this._cells}get promptCell(){return this._input.layout.widgets[0]||null}addCell(e,t){e.addClass(x),this._content.addWidget(e),this._cells.push(e),t&&(this._msgIds.set(t,e),this._msgIdCells.set(e,t)),e.disposed.connect(this._onCellDisposed,this),this.update()}addBanner(){if(this._banner){const e=this._banner;this._cells.push(this._banner),e.disposed.connect(this._onCellDisposed,this)}const e=this.modelFactory.createRawCell({sharedModel:(0,y.createStandaloneCell)({cell_type:"raw",source:"..."})}),t=(this._banner=new o.RawCell({model:e,contentFactory:this.contentFactory,placeholder:!1,editorConfig:{autoClosingBrackets:!1,codeFolding:!1,highlightActiveLine:!1,highlightTrailingWhitespace:!1,highlightWhitespace:!1,indentUnit:"4",lineNumbers:!1,lineWrap:!0,matchBrackets:!1,readOnly:!0,rulers:[],scrollPastEnd:!1,smartIndent:!1,tabSize:4,theme:"jupyter"}})).initializeState();t.addClass("jp-CodeConsole-banner"),t.readOnly=!0,this._content.addWidget(t)}clear(){const e=this._cells;for(;e.length>0;)e.get(0).dispose()}createCodeCell(){const e=this.contentFactory,t=this._createCodeCellOptions(),s=e.createCodeCell(t);return s.readOnly=!0,s.model.mimeType=this._mimetype,s}dispose(){this.isDisposed||(this._msgIdCells=null,this._msgIds=null,this._history.dispose(),super.dispose())}async execute(e=!1,t=250){var s,o;if("dead"===(null===(o=null===(s=this.sessionContext.session)||void 0===s?void 0:s.kernel)||void 0===o?void 0:o.status))return;const n=this.promptCell;if(!n)throw new Error("Cannot execute without a prompt cell");if(n.model.trusted=!0,e)return this.newPromptCell(),void await this._execute(n);const i=await this._shouldExecute(t);this.isDisposed||(i?(this.newPromptCell(),this.promptCell.editor.focus(),await this._execute(n)):n.editor.newIndentedLine())}getCell(e){return this._msgIds.get(e)}inject(e,t={}){const s=this.createCodeCell();s.model.sharedModel.setSource(e);for(const e of Object.keys(t))s.model.setMetadata(e,t[e]);return this.addCell(s),this._execute(s)}insertLinebreak(){const e=this.promptCell;e&&e.editor.newIndentedLine()}replaceSelection(e){var t,s;const o=this.promptCell;o&&(null===(s=(t=o.editor).replaceSelection)||void 0===s||s.call(t,e))}serialize(){const e=[];for(const t of this._cells){const s=t.model;(0,o.isCodeCellModel)(s)&&e.push(s.toJSON())}return this.promptCell&&e.push(this.promptCell.model.toJSON()),e}_evtMouseDown(e){const{button:t,shiftKey:s}=e;if(0!==t&&2!==t||s&&2===t)return;let n=e.target;const i=e=>e.classList.contains(x);let l=o.CellDragUtils.findCell(n,this._cells,i);if(-1===l&&(n=document.elementFromPoint(e.clientX,e.clientY),l=o.CellDragUtils.findCell(n,this._cells,i)),-1===l)return;const r=this._cells.get(l);"prompt"===o.CellDragUtils.detectTargetArea(r,e.target)&&(this._dragData={pressX:e.clientX,pressY:e.clientY,index:l},this._focusedCell=r,document.addEventListener("mouseup",this,!0),document.addEventListener("mousemove",this,!0),e.preventDefault())}_evtMouseMove(e){const t=this._dragData;t&&o.CellDragUtils.shouldStartDrag(t.pressX,t.pressY,e.clientX,e.clientY)&&this._startDrag(t.index,e.clientX,e.clientY)}_startDrag(e,t,s){const n=this._focusedCell.model,i=[n.toJSON()],l=o.CellDragUtils.createCellDragImage(this._focusedCell,i);this._drag=new v.Drag({mimeData:new _.MimeData,dragImage:l,proposedAction:"copy",supportedActions:"copy",source:this}),this._drag.mimeData.setData("application/vnd.jupyter.cells",i);const r=n.sharedModel.getSource();return this._drag.mimeData.setData("text/plain",r),this._focusedCell=null,document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),this._drag.start(t,s).then((()=>{this.isDisposed||(this._drag=null,this._dragData=null)}))}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"mouseup":this._evtMouseUp(e);break;case"focusin":this._evtFocusIn(e);break;case"focusout":this._evtFocusOut(e)}}onAfterAttach(e){const t=this.node;t.addEventListener("keydown",this,!0),t.addEventListener("click",this),t.addEventListener("mousedown",this),t.addEventListener("focusin",this),t.addEventListener("focusout",this),this.promptCell?(this.promptCell.editor.focus(),this.update()):this.newPromptCell()}onBeforeDetach(e){const t=this.node;t.removeEventListener("keydown",this,!0),t.removeEventListener("click",this),t.removeEventListener("focusin",this),t.removeEventListener("focusout",this)}onActivateRequest(e){const t=this.promptCell&&this.promptCell.editor;t&&t.focus(),this.update()}newPromptCell(){var e;let t=this.promptCell;const s=this._input;if(t){t.readOnly=!0,t.removeClass(w);const o=t;requestIdleCallback((()=>{l.Signal.clearData(o.editor)})),null===(e=t.editor)||void 0===e||e.blur(),s.widgets[0].parent=null,this.addCell(t)}const o=this.contentFactory,n=this._createCodeCellOptions();t=o.createCodeCell(n),t.model.mimeType=this._mimetype,t.addClass(w),this._input.addWidget(t),this._history.editor=t.editor,this._promptCellCreated.emit(t)}onUpdateRequest(e){b.scrollToBottom(this._content.node)}_evtKeyDown(e){const t=this.promptCell&&this.promptCell.editor;t&&(13!==e.keyCode||t.hasFocus()?27===e.keyCode&&t.hasFocus()&&(e.preventDefault(),e.stopPropagation(),this.node.focus()):(e.preventDefault(),t.focus()))}_evtMouseUp(e){this.promptCell&&this.promptCell.node.contains(e.target)&&this.promptCell.editor.focus()}_evtFocusIn(e){this._updateReadWrite()}_evtFocusOut(e){this._updateReadWrite()}async _execute(e){const t=e.model.sharedModel.getSource();if(this._history.push(t),"clear"===t||"%clear"===t)return this.clear(),Promise.resolve(void 0);e.model.contentChanged.connect(this.update,this);const s={cell:e,sessionContext:this.sessionContext,onCellExecuted:e=>{if(this._executed.emit(e.executionDate),e.error)for(const e of this._cells)null===e.model.executionCount&&e.setPrompt("")}};try{await this._executor.runCell(s)}finally{this.isDisposed||(e.model.contentChanged.disconnect(this.update,this),this.update())}}_handleInfo(e){if("ok"!==e.status)return void this._banner.model.sharedModel.setSource("Error in getting kernel banner");this._banner.model.sharedModel.setSource(e.banner);const t=e.language_info;this._mimetype=this._mimeTypeService.getMimeTypeByLanguage(t),this.promptCell&&(this.promptCell.model.mimeType=this._mimetype)}_createCodeCellOptions(){const{node:e}=this,t=this.contentFactory,s=this.modelFactory.createCodeCell({}),o=this.rendermime,n=this.editorConfig,i=g.EditorView.domEventHandlers({keydown:(t,s)=>13===t.keyCode&&"terminal"===e.dataset.jpInteractionMode&&(t.preventDefault(),!0)});return{model:s,rendermime:o,contentFactory:t,editorConfig:n,editorExtensions:[m.Prec.high(i)],placeholder:!1,translator:this._translator}}_onCellDisposed(e,t){if(!this.isDisposed){this._cells.removeValue(e);const t=this._msgIdCells.get(e);t&&(this._msgIdCells.delete(e),this._msgIds.delete(t))}}_shouldExecute(e){const t=this.promptCell;if(!t)return Promise.resolve(!1);const s=t.model.sharedModel.getSource();return new Promise(((t,o)=>{var n;const i=setTimeout((()=>{t(!0)}),e),l=null===(n=this.sessionContext.session)||void 0===n?void 0:n.kernel;l?l.requestIsComplete({code:s}).then((e=>{clearTimeout(i),this.isDisposed&&t(!1),"incomplete"===e.content.status?t(!1):t(!0)})).catch((()=>{t(!0)})):t(!1)}))}async _onKernelChanged(){var e;this.clear(),this._banner&&(this._banner.dispose(),this._banner=null),this.addBanner(),(null===(e=this.sessionContext.session)||void 0===e?void 0:e.kernel)&&this._handleInfo(await this.sessionContext.session.kernel.info)}async _onKernelStatusChanged(){var e;const t=null===(e=this.sessionContext.session)||void 0===e?void 0:e.kernel;"restarting"===(null==t?void 0:t.status)&&(this.addBanner(),this._handleInfo(await(null==t?void 0:t.info)))}_updateReadWrite(){const e=c.DOMUtils.hasActiveEditableElement(this.node);this.node.classList.toggle("jp-mod-readWrite",e)}}var b,k;!function(e){e.defaultEditorConfig={codeFolding:!1,lineNumbers:!1};class t extends o.Cell.ContentFactory{createCodeCell(e){return new o.CodeCell(e).initializeState()}createRawCell(e){return new o.RawCell(e).initializeState()}}e.ContentFactory=t;class s{constructor(e={}){this.codeCellContentFactory=e.codeCellContentFactory||o.CodeCellModel.defaultContentFactory}createCodeCell(e={}){return e.contentFactory||(e.contentFactory=this.codeCellContentFactory),new o.CodeCellModel(e)}createRawCell(e){return new o.RawCellModel(e)}}e.ModelFactory=s,e.defaultModelFactory=new s({})}(D||(D={})),function(e){e.scrollToBottom=function(e){e.scrollTop=e.scrollHeight-e.clientHeight}}(b||(b={}));class S extends c.MainAreaWidget{constructor(e){super({content:new C.Panel}),this._executed=null,this._connected=null,this.addClass("jp-ConsolePanel");let{executor:t,rendermime:s,mimeTypeService:o,path:n,basePath:i,name:l,manager:r,modelFactory:a,sessionContext:m,translator:g}=e;this.translator=null!=g?g:u.nullTranslator;const y=this.translator.load("jupyterlab"),f=this.contentFactory=e.contentFactory,v=k.count++;n||(n=h.PathExt.join(i||"",`console-${v}-${_.UUID.uuid4()}`)),m=this._sessionContext=null!=m?m:new c.SessionContext({sessionManager:r.sessions,specsManager:r.kernelspecs,path:r.contents.localPath(n),name:l||y.__("Console %1",v),type:"console",kernelPreference:e.kernelPreference,setBusy:e.setBusy});const x=new d.RenderMimeRegistry.UrlResolver({path:n,contents:r.contents});s=s.clone({resolver:x}),this.console=f.createConsole({executor:t,rendermime:s,sessionContext:m,mimeTypeService:o,contentFactory:f,modelFactory:a,translator:g}),this.content.addWidget(this.console),m.initialize().then((async t=>{var s;t&&await(null!==(s=e.sessionDialogs)&&void 0!==s?s:new c.SessionContextDialogs({translator:g})).selectKernel(m),this._connected=new Date,this._updateTitlePanel()})),this.console.executed.connect(this._onExecuted,this),this._updateTitlePanel(),m.kernelChanged.connect(this._updateTitlePanel,this),m.propertyChanged.connect(this._updateTitlePanel,this),this.title.icon=p.consoleIcon,this.title.closable=!0,this.id=`console-${v}`}get sessionContext(){return this._sessionContext}dispose(){this.sessionContext.dispose(),this.console.dispose(),super.dispose()}onActivateRequest(e){const t=this.console.promptCell;t&&t.editor.focus()}onCloseRequest(e){super.onCloseRequest(e),this.dispose()}_onExecuted(e,t){this._executed=t,this._updateTitlePanel()}_updateTitlePanel(){k.updateTitle(this,this._connected,this._executed,this.translator)}}!function(e){class t extends D.ContentFactory{createConsole(e){return new D(e)}}e.ContentFactory=t,e.IContentFactory=new _.Token("@jupyterlab/console:IContentFactory","A factory object that creates new code consoles. Use this if you want to create and host code consoles in your own UI elements.")}(S||(S={})),function(e){e.count=1,e.updateTitle=function(e,t,s,o){const n=(o=o||u.nullTranslator).load("jupyterlab"),i=e.console.sessionContext.session;if(i){let o=n.__("Name: %1\n",i.name)+n.__("Directory: %1\n",h.PathExt.dirname(i.path))+n.__("Kernel: %1",e.console.sessionContext.kernelDisplayName);t&&(o+=n.__("\nConnected: %1",h.Time.format(t.toISOString()))),s&&(o+=n.__("\nLast Execution: %1")),e.title.label=i.name,e.title.caption=o}else e.title.label=n.__("Console"),e.title.caption=""}}(k||(k={}));const F=new _.Token("@jupyterlab/console:IConsoleTracker","A widget tracker for code consoles.\n Use this if you want to be able to iterate over and interact with code consoles\n created by the application."),E=new _.Token("@jupyterlab/console:IConsoleCellExecutor","The console cell executor")}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2692],{22692:(t,e,r)=>{r.d(e,{diagram:()=>M});var i=r(24028),a=r(29197),n=r(23617),s=r(7259);const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const c=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,l=function(t){if(!function(t){return"string"==typeof t&&c.test(t)}(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r};function h(t,e,r,i){switch(t){case 0:return e&r^~e&i;case 1:case 3:return e^r^i;case 2:return e&r^e&i^r&i}}function d(t,e){return t<<e|t>>>32-e}const y=function(t,e,r){function i(t,e,r,i){var a;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}(t)),"string"==typeof e&&(e=l(e)),16!==(null===(a=e)||void 0===a?void 0:a.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let n=new Uint8Array(16+t.length);if(n.set(e),n.set(t,e.length),n=function(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const i=t.length/4+2,a=Math.ceil(i/16),n=new Array(a);for(let e=0;e<a;++e){const r=new Uint32Array(16);for(let i=0;i<16;++i)r[i]=t[64*e+4*i]<<24|t[64*e+4*i+1]<<16|t[64*e+4*i+2]<<8|t[64*e+4*i+3];n[e]=r}n[a-1][14]=8*(t.length-1)/Math.pow(2,32),n[a-1][14]=Math.floor(n[a-1][14]),n[a-1][15]=8*(t.length-1)&4294967295;for(let t=0;t<a;++t){const i=new Uint32Array(80);for(let e=0;e<16;++e)i[e]=n[t][e];for(let t=16;t<80;++t)i[t]=d(i[t-3]^i[t-8]^i[t-14]^i[t-16],1);let a=r[0],s=r[1],o=r[2],c=r[3],l=r[4];for(let t=0;t<80;++t){const r=Math.floor(t/20),n=d(a,5)+h(r,s,o,c)+l+e[r]+i[t]>>>0;l=c,c=o,o=d(s,30)>>>0,s=a,a=n}r[0]=r[0]+a>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+c>>>0,r[4]=r[4]+l>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}(n),n[6]=15&n[6]|80,n[8]=63&n[8]|128,r){i=i||0;for(let t=0;t<16;++t)r[i+t]=n[t];return r}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(n)}try{i.name="v5"}catch(t){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i}();r(27693),r(7608),r(31699);var u=function(){var t=function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},e=[6,8,10,20,22,24,26,27,28],r=[1,10],i=[1,11],a=[1,12],n=[1,13],s=[1,14],o=[1,15],c=[1,21],l=[1,22],h=[1,23],d=[1,24],y=[1,25],u=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],p=[1,34],_=[27,28,46,47],f=[41,42,43,44,45],E=[17,34],m=[1,54],g=[1,53],O=[17,34,36,38],b={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:function(t,e,r,i,a,n,s){var o=n.length-1;switch(a){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:case 19:case 43:case 27:case 28:case 31:this.$=n[o];break;case 8:i.addEntity(n[o-4]),i.addEntity(n[o-2]),i.addRelationship(n[o-4],n[o],n[o-2],n[o-3]);break;case 9:i.addEntity(n[o-3]),i.addAttributes(n[o-3],n[o-1]);break;case 10:i.addEntity(n[o-2]);break;case 11:i.addEntity(n[o]);break;case 12:i.addEntity(n[o-6],n[o-4]),i.addAttributes(n[o-6],n[o-1]);break;case 13:i.addEntity(n[o-5],n[o-3]);break;case 14:i.addEntity(n[o-3],n[o-1]);break;case 15:case 16:this.$=n[o].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),i.setAccDescription(this.$);break;case 20:case 41:case 42:case 32:this.$=n[o].replace(/"/g,"");break;case 21:case 29:this.$=[n[o]];break;case 22:n[o].push(n[o-1]),this.$=n[o];break;case 23:this.$={attributeType:n[o-1],attributeName:n[o]};break;case 24:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeKeyTypeList:n[o]};break;case 25:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeComment:n[o]};break;case 26:this.$={attributeType:n[o-3],attributeName:n[o-2],attributeKeyTypeList:n[o-1],attributeComment:n[o]};break;case 30:n[o-2].push(n[o]),this.$=n[o-2];break;case 33:this.$={cardA:n[o],relType:n[o-1],cardB:n[o-2]};break;case 34:this.$=i.Cardinality.ZERO_OR_ONE;break;case 35:this.$=i.Cardinality.ZERO_OR_MORE;break;case 36:this.$=i.Cardinality.ONE_OR_MORE;break;case 37:this.$=i.Cardinality.ONLY_ONE;break;case 38:this.$=i.Cardinality.MD_PARENT;break;case 39:this.$=i.Identification.NON_IDENTIFYING;break;case 40:this.$=i.Identification.IDENTIFYING}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:i,24:a,26:n,27:s,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:i,24:a,26:n,27:s,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:c,42:l,43:h,44:d,45:y}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(u,[2,19]),t(u,[2,20]),t(e,[2,4]),{11:29,27:s,28:o},{16:30,17:[1,31],29:32,30:33,34:p},{11:35,27:s,28:o},{40:36,46:[1,37],47:[1,38]},t(_,[2,34]),t(_,[2,35]),t(_,[2,36]),t(_,[2,37]),t(_,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:p},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:c,42:l,43:h,44:d,45:y},t(f,[2,39]),t(f,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(E,[2,23],{32:50,33:51,35:52,37:m,38:g}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(E,[2,24],{33:56,36:[1,57],38:g}),t(E,[2,25]),t(O,[2,29]),t(E,[2,32]),t(O,[2,31]),{16:58,17:[1,59],29:32,30:33,34:p},t(E,[2,26]),{35:60,37:m},{17:[1,61]},t(e,[2,13]),t(O,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=[0],r=[],i=[null],a=[],n=this.table,s="",o=0,c=0,l=a.slice.call(arguments,1),h=Object.create(this.lexer),d={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(d.yy[y]=this.yy[y]);h.setInput(t,d.yy),d.yy.lexer=h,d.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var u=h.yylloc;a.push(u);var p=h.options&&h.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,f,E,m,g,O,b,k,R,N={};;){if(f=e[e.length-1],this.defaultActions[f]?E=this.defaultActions[f]:(null==_&&(R=void 0,"number"!=typeof(R=r.pop()||h.lex()||1)&&(R instanceof Array&&(R=(r=R).pop()),R=this.symbols_[R]||R),_=R),E=n[f]&&n[f][_]),void 0===E||!E.length||!E[0]){var T;for(g in k=[],n[f])this.terminals_[g]&&g>2&&k.push("'"+this.terminals_[g]+"'");T=h.showPosition?"Parse error on line "+(o+1)+":\n"+h.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(T,{text:h.match,token:this.terminals_[_]||_,line:h.yylineno,loc:u,expected:k})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+_);switch(E[0]){case 1:e.push(_),i.push(h.yytext),a.push(h.yylloc),e.push(E[1]),_=null,c=h.yyleng,s=h.yytext,o=h.yylineno,u=h.yylloc;break;case 2:if(O=this.productions_[E[1]][1],N.$=i[i.length-O],N._$={first_line:a[a.length-(O||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(O||1)].first_column,last_column:a[a.length-1].last_column},p&&(N._$.range=[a[a.length-(O||1)].range[0],a[a.length-1].range[1]]),void 0!==(m=this.performAction.apply(N,[s,c,o,d.yy,E[1],i,a].concat(l))))return m;O&&(e=e.slice(0,-1*O*2),i=i.slice(0,-1*O),a=a.slice(0,-1*O)),e.push(this.productions_[E[1]][0]),i.push(N.$),a.push(N._$),b=n[e[e.length-2]][e[e.length-1]],e.push(b);break;case 3:return!0}}return!0}},k={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,i,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((r=this._input.match(this.rules[a[n]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,a[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,i){switch(r){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:case 15:case 20:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 16:return 37;case 17:case 18:return 34;case 19:return 38;case 21:return this.popState(),17;case 22:case 54:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:case 29:case 30:case 43:return 41;case 26:case 27:case 28:case 36:case 38:case 45:return 43;case 31:case 32:case 33:case 34:case 35:case 37:case 44:return 42;case 39:case 40:case 41:case 42:return 44;case 46:return 45;case 47:case 50:case 51:case 52:return 46;case 48:case 49:return 47;case 53:return 27;case 55:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};function R(){this.yy={}}return b.lexer=k,R.prototype=b,b.Parser=R,new R}();u.parser=u;const p=u;let _={},f=[];const E=function(t,e=void 0){return void 0===_[t]?(_[t]={attributes:[],alias:e},i.l.info("Added new entity :",t)):_[t]&&!_[t].alias&&e&&(_[t].alias=e,i.l.info(`Add alias '${e}' to entity '${t}'`)),_[t]},m={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},getConfig:()=>(0,i.c)().er,addEntity:E,addAttributes:function(t,e){let r,a=E(t);for(r=e.length-1;r>=0;r--)a.attributes.push(e[r]),i.l.debug("Added attribute ",e[r].attributeName)},getEntities:()=>_,addRelationship:function(t,e,r,a){let n={entityA:t,roleA:e,entityB:r,relSpec:a};f.push(n),i.l.debug("Added new relationship :",n)},getRelationships:()=>f,clear:function(){_={},f=[],(0,i.t)()},setAccTitle:i.s,getAccTitle:i.g,setAccDescription:i.b,getAccDescription:i.a,setDiagramTitle:i.q,getDiagramTitle:i.r},g={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},O=g,b=/[^\dA-Za-z](\W)*/g;let k={},R=new Map;const N=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")};let T=0;const x="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function A(t=""){return t.length>0?`${t}-`:""}const M={parser:p,db:m,renderer:{setConf:function(t){const e=Object.keys(t);for(const r of e)k[r]=t[r]},draw:function(t,e,r,o){k=(0,i.c)().er,i.l.info("Drawing ER diagram");const c=(0,i.c)().securityLevel;let l;"sandbox"===c&&(l=(0,n.Ys)("#i"+e));const h=("sandbox"===c?(0,n.Ys)(l.nodes()[0].contentDocument.body):(0,n.Ys)("body")).select(`[id='${e}']`);let d;(function(t,e){let r;t.append("defs").append("marker").attr("id",g.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",g.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",g.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",g.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",g.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",g.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",g.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",g.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",g.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",g.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")})(h,k),d=new a.k({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:k.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const u=function(t,e,r){let a;return Object.keys(e).forEach((function(n){const s=function(t="",e=""){const r=t.replace(b,"");return`${A(e)}${A(r)}${y(t,x)}`}(n,"entity");R.set(n,s);const o=t.append("g").attr("id",s);a=void 0===a?s:a;const c="text-"+s,l=o.append("text").classed("er entityLabel",!0).attr("id",c).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",(0,i.c)().fontFamily).style("font-size",k.fontSize+"px").text(e[n].alias??n),{width:h,height:d}=((t,e,r)=>{const a=k.entityPadding/3,n=k.entityPadding/3,s=.85*k.fontSize,o=e.node().getBBox(),c=[];let l=!1,h=!1,d=0,y=0,u=0,p=0,_=o.height+2*a,f=1;r.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(l=!0),void 0!==t.attributeComment&&(h=!0)})),r.forEach((r=>{const n=`${e.node().id}-attr-${f}`;let o=0;const E=(0,i.v)(r.attributeType),m=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(E),g=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(r.attributeName),O={};O.tn=m,O.nn=g;const b=m.node().getBBox(),k=g.node().getBBox();if(d=Math.max(d,b.width),y=Math.max(y,k.width),o=Math.max(b.height,k.height),l){const e=void 0!==r.attributeKeyTypeList?r.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(e);O.kn=a;const c=a.node().getBBox();u=Math.max(u,c.width),o=Math.max(o,c.height)}if(h){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(r.attributeComment||"");O.cn=e;const a=e.node().getBBox();p=Math.max(p,a.width),o=Math.max(o,a.height)}O.height=o,c.push(O),_+=o+2*a,f+=1}));let E=4;l&&(E+=2),h&&(E+=2);const m=d+y+u+p,g={width:Math.max(k.minEntityWidth,Math.max(o.width+2*k.entityPadding,m+n*E)),height:r.length>0?_:Math.max(k.minEntityHeight,o.height+2*k.entityPadding)};if(r.length>0){const r=Math.max(0,(g.width-m-n*E)/(E/2));e.attr("transform","translate("+g.width/2+","+(a+o.height/2)+")");let i=o.height+2*a,s="attributeBoxOdd";c.forEach((e=>{const o=i+a+e.height/2;e.tn.attr("transform","translate("+n+","+o+")");const c=t.insert("rect","#"+e.tn.node().id).classed(`er ${s}`,!0).attr("x",0).attr("y",i).attr("width",d+2*n+r).attr("height",e.height+2*a),_=parseFloat(c.attr("x"))+parseFloat(c.attr("width"));e.nn.attr("transform","translate("+(_+n)+","+o+")");const f=t.insert("rect","#"+e.nn.node().id).classed(`er ${s}`,!0).attr("x",_).attr("y",i).attr("width",y+2*n+r).attr("height",e.height+2*a);let E=parseFloat(f.attr("x"))+parseFloat(f.attr("width"));if(l){e.kn.attr("transform","translate("+(E+n)+","+o+")");const c=t.insert("rect","#"+e.kn.node().id).classed(`er ${s}`,!0).attr("x",E).attr("y",i).attr("width",u+2*n+r).attr("height",e.height+2*a);E=parseFloat(c.attr("x"))+parseFloat(c.attr("width"))}h&&(e.cn.attr("transform","translate("+(E+n)+","+o+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${s}`,"true").attr("x",E).attr("y",i).attr("width",p+2*n+r).attr("height",e.height+2*a)),i+=e.height+2*a,s="attributeBoxOdd"===s?"attributeBoxEven":"attributeBoxOdd"}))}else g.height=Math.max(k.minEntityHeight,_),e.attr("transform","translate("+g.width/2+","+g.height/2+")");return g})(o,l,e[n].attributes),u=o.insert("rect","#"+c).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",h).attr("height",d).node().getBBox();r.setNode(s,{width:u.width,height:u.height,shape:"rect",id:s})})),a}(h,o.db.getEntities(),d),p=function(t,e){return t.forEach((function(t){e.setEdge(R.get(t.entityA),R.get(t.entityB),{relationship:t},N(t))})),t}(o.db.getRelationships(),d);var _,f;(0,s.bK)(d),_=h,(f=d).nodes().forEach((function(t){void 0!==t&&void 0!==f.node(t)&&_.select("#"+t).attr("transform","translate("+(f.node(t).x-f.node(t).width/2)+","+(f.node(t).y-f.node(t).height/2)+" )")})),p.forEach((function(t){!function(t,e,r,a,s){T++;const o=r.edge(R.get(e.entityA),R.get(e.entityB),N(e)),c=(0,n.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(n.$0Z),l=t.insert("path","#"+a).classed("er relationshipLine",!0).attr("d",c(o.points)).style("stroke",k.stroke).style("fill","none");e.relSpec.relType===s.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let h="";switch(k.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case s.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+h+"#"+O.ZERO_OR_ONE_END+")");break;case s.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+h+"#"+O.ZERO_OR_MORE_END+")");break;case s.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+h+"#"+O.ONE_OR_MORE_END+")");break;case s.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+h+"#"+O.ONLY_ONE_END+")");break;case s.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+h+"#"+O.MD_PARENT_END+")")}switch(e.relSpec.cardB){case s.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+h+"#"+O.ZERO_OR_ONE_START+")");break;case s.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+h+"#"+O.ZERO_OR_MORE_START+")");break;case s.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+h+"#"+O.ONE_OR_MORE_START+")");break;case s.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+h+"#"+O.ONLY_ONE_START+")");break;case s.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+h+"#"+O.MD_PARENT_START+")")}const d=l.node().getTotalLength(),y=l.node().getPointAtLength(.5*d),u="rel"+T,p=t.append("text").classed("er relationshipLabel",!0).attr("id",u).attr("x",y.x).attr("y",y.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",(0,i.c)().fontFamily).style("font-size",k.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+u).classed("er relationshipLabelBox",!0).attr("x",y.x-p.width/2).attr("y",y.y-p.height/2).attr("width",p.width).attr("height",p.height)}(h,t,d,u,o)}));const E=k.diagramPadding;i.u.insertTitle(h,"entityTitleText",k.titleTopMargin,o.db.getDiagramTitle());const m=h.node().getBBox(),M=m.width+2*E,w=m.height+2*E;(0,i.i)(h,w,M,k.useMaxWidth),h.attr("viewBox",`${m.x-E} ${m.y-E} ${M} ${w}`)}},styles:t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n`}}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2692],{22692:(t,e,r)=>{r.d(e,{diagram:()=>M});var i=r(24028),a=r(67406),n=r(23617),s=r(7259);const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const c=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,l=function(t){if(!function(t){return"string"==typeof t&&c.test(t)}(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r};function h(t,e,r,i){switch(t){case 0:return e&r^~e&i;case 1:case 3:return e^r^i;case 2:return e&r^e&i^r&i}}function d(t,e){return t<<e|t>>>32-e}const y=function(t,e,r){function i(t,e,r,i){var a;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}(t)),"string"==typeof e&&(e=l(e)),16!==(null===(a=e)||void 0===a?void 0:a.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let n=new Uint8Array(16+t.length);if(n.set(e),n.set(t,e.length),n=function(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const i=t.length/4+2,a=Math.ceil(i/16),n=new Array(a);for(let e=0;e<a;++e){const r=new Uint32Array(16);for(let i=0;i<16;++i)r[i]=t[64*e+4*i]<<24|t[64*e+4*i+1]<<16|t[64*e+4*i+2]<<8|t[64*e+4*i+3];n[e]=r}n[a-1][14]=8*(t.length-1)/Math.pow(2,32),n[a-1][14]=Math.floor(n[a-1][14]),n[a-1][15]=8*(t.length-1)&4294967295;for(let t=0;t<a;++t){const i=new Uint32Array(80);for(let e=0;e<16;++e)i[e]=n[t][e];for(let t=16;t<80;++t)i[t]=d(i[t-3]^i[t-8]^i[t-14]^i[t-16],1);let a=r[0],s=r[1],o=r[2],c=r[3],l=r[4];for(let t=0;t<80;++t){const r=Math.floor(t/20),n=d(a,5)+h(r,s,o,c)+l+e[r]+i[t]>>>0;l=c,c=o,o=d(s,30)>>>0,s=a,a=n}r[0]=r[0]+a>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+c>>>0,r[4]=r[4]+l>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}(n),n[6]=15&n[6]|80,n[8]=63&n[8]|128,r){i=i||0;for(let t=0;t<16;++t)r[i+t]=n[t];return r}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(n)}try{i.name="v5"}catch(t){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i}();r(27693),r(7608),r(31699);var u=function(){var t=function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},e=[6,8,10,20,22,24,26,27,28],r=[1,10],i=[1,11],a=[1,12],n=[1,13],s=[1,14],o=[1,15],c=[1,21],l=[1,22],h=[1,23],d=[1,24],y=[1,25],u=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],p=[1,34],_=[27,28,46,47],f=[41,42,43,44,45],E=[17,34],m=[1,54],g=[1,53],O=[17,34,36,38],b={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:function(t,e,r,i,a,n,s){var o=n.length-1;switch(a){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:case 19:case 43:case 27:case 28:case 31:this.$=n[o];break;case 8:i.addEntity(n[o-4]),i.addEntity(n[o-2]),i.addRelationship(n[o-4],n[o],n[o-2],n[o-3]);break;case 9:i.addEntity(n[o-3]),i.addAttributes(n[o-3],n[o-1]);break;case 10:i.addEntity(n[o-2]);break;case 11:i.addEntity(n[o]);break;case 12:i.addEntity(n[o-6],n[o-4]),i.addAttributes(n[o-6],n[o-1]);break;case 13:i.addEntity(n[o-5],n[o-3]);break;case 14:i.addEntity(n[o-3],n[o-1]);break;case 15:case 16:this.$=n[o].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),i.setAccDescription(this.$);break;case 20:case 41:case 42:case 32:this.$=n[o].replace(/"/g,"");break;case 21:case 29:this.$=[n[o]];break;case 22:n[o].push(n[o-1]),this.$=n[o];break;case 23:this.$={attributeType:n[o-1],attributeName:n[o]};break;case 24:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeKeyTypeList:n[o]};break;case 25:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeComment:n[o]};break;case 26:this.$={attributeType:n[o-3],attributeName:n[o-2],attributeKeyTypeList:n[o-1],attributeComment:n[o]};break;case 30:n[o-2].push(n[o]),this.$=n[o-2];break;case 33:this.$={cardA:n[o],relType:n[o-1],cardB:n[o-2]};break;case 34:this.$=i.Cardinality.ZERO_OR_ONE;break;case 35:this.$=i.Cardinality.ZERO_OR_MORE;break;case 36:this.$=i.Cardinality.ONE_OR_MORE;break;case 37:this.$=i.Cardinality.ONLY_ONE;break;case 38:this.$=i.Cardinality.MD_PARENT;break;case 39:this.$=i.Identification.NON_IDENTIFYING;break;case 40:this.$=i.Identification.IDENTIFYING}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:i,24:a,26:n,27:s,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:i,24:a,26:n,27:s,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:c,42:l,43:h,44:d,45:y}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(u,[2,19]),t(u,[2,20]),t(e,[2,4]),{11:29,27:s,28:o},{16:30,17:[1,31],29:32,30:33,34:p},{11:35,27:s,28:o},{40:36,46:[1,37],47:[1,38]},t(_,[2,34]),t(_,[2,35]),t(_,[2,36]),t(_,[2,37]),t(_,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:p},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:c,42:l,43:h,44:d,45:y},t(f,[2,39]),t(f,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(E,[2,23],{32:50,33:51,35:52,37:m,38:g}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(E,[2,24],{33:56,36:[1,57],38:g}),t(E,[2,25]),t(O,[2,29]),t(E,[2,32]),t(O,[2,31]),{16:58,17:[1,59],29:32,30:33,34:p},t(E,[2,26]),{35:60,37:m},{17:[1,61]},t(e,[2,13]),t(O,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=[0],r=[],i=[null],a=[],n=this.table,s="",o=0,c=0,l=a.slice.call(arguments,1),h=Object.create(this.lexer),d={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(d.yy[y]=this.yy[y]);h.setInput(t,d.yy),d.yy.lexer=h,d.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var u=h.yylloc;a.push(u);var p=h.options&&h.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,f,E,m,g,O,b,k,R,N={};;){if(f=e[e.length-1],this.defaultActions[f]?E=this.defaultActions[f]:(null==_&&(R=void 0,"number"!=typeof(R=r.pop()||h.lex()||1)&&(R instanceof Array&&(R=(r=R).pop()),R=this.symbols_[R]||R),_=R),E=n[f]&&n[f][_]),void 0===E||!E.length||!E[0]){var T;for(g in k=[],n[f])this.terminals_[g]&&g>2&&k.push("'"+this.terminals_[g]+"'");T=h.showPosition?"Parse error on line "+(o+1)+":\n"+h.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(T,{text:h.match,token:this.terminals_[_]||_,line:h.yylineno,loc:u,expected:k})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+_);switch(E[0]){case 1:e.push(_),i.push(h.yytext),a.push(h.yylloc),e.push(E[1]),_=null,c=h.yyleng,s=h.yytext,o=h.yylineno,u=h.yylloc;break;case 2:if(O=this.productions_[E[1]][1],N.$=i[i.length-O],N._$={first_line:a[a.length-(O||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(O||1)].first_column,last_column:a[a.length-1].last_column},p&&(N._$.range=[a[a.length-(O||1)].range[0],a[a.length-1].range[1]]),void 0!==(m=this.performAction.apply(N,[s,c,o,d.yy,E[1],i,a].concat(l))))return m;O&&(e=e.slice(0,-1*O*2),i=i.slice(0,-1*O),a=a.slice(0,-1*O)),e.push(this.productions_[E[1]][0]),i.push(N.$),a.push(N._$),b=n[e[e.length-2]][e[e.length-1]],e.push(b);break;case 3:return!0}}return!0}},k={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,i,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((r=this._input.match(this.rules[a[n]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,a[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,i){switch(r){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:case 15:case 20:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 16:return 37;case 17:case 18:return 34;case 19:return 38;case 21:return this.popState(),17;case 22:case 54:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:case 29:case 30:case 43:return 41;case 26:case 27:case 28:case 36:case 38:case 45:return 43;case 31:case 32:case 33:case 34:case 35:case 37:case 44:return 42;case 39:case 40:case 41:case 42:return 44;case 46:return 45;case 47:case 50:case 51:case 52:return 46;case 48:case 49:return 47;case 53:return 27;case 55:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};function R(){this.yy={}}return b.lexer=k,R.prototype=b,b.Parser=R,new R}();u.parser=u;const p=u;let _={},f=[];const E=function(t,e=void 0){return void 0===_[t]?(_[t]={attributes:[],alias:e},i.l.info("Added new entity :",t)):_[t]&&!_[t].alias&&e&&(_[t].alias=e,i.l.info(`Add alias '${e}' to entity '${t}'`)),_[t]},m={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},getConfig:()=>(0,i.c)().er,addEntity:E,addAttributes:function(t,e){let r,a=E(t);for(r=e.length-1;r>=0;r--)a.attributes.push(e[r]),i.l.debug("Added attribute ",e[r].attributeName)},getEntities:()=>_,addRelationship:function(t,e,r,a){let n={entityA:t,roleA:e,entityB:r,relSpec:a};f.push(n),i.l.debug("Added new relationship :",n)},getRelationships:()=>f,clear:function(){_={},f=[],(0,i.t)()},setAccTitle:i.s,getAccTitle:i.g,setAccDescription:i.b,getAccDescription:i.a,setDiagramTitle:i.q,getDiagramTitle:i.r},g={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},O=g,b=/[^\dA-Za-z](\W)*/g;let k={},R=new Map;const N=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")};let T=0;const x="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function A(t=""){return t.length>0?`${t}-`:""}const M={parser:p,db:m,renderer:{setConf:function(t){const e=Object.keys(t);for(const r of e)k[r]=t[r]},draw:function(t,e,r,o){k=(0,i.c)().er,i.l.info("Drawing ER diagram");const c=(0,i.c)().securityLevel;let l;"sandbox"===c&&(l=(0,n.Ys)("#i"+e));const h=("sandbox"===c?(0,n.Ys)(l.nodes()[0].contentDocument.body):(0,n.Ys)("body")).select(`[id='${e}']`);let d;(function(t,e){let r;t.append("defs").append("marker").attr("id",g.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",g.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",g.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",g.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",g.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",g.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",g.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",g.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",g.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",g.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")})(h,k),d=new a.k({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:k.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const u=function(t,e,r){let a;return Object.keys(e).forEach((function(n){const s=function(t="",e=""){const r=t.replace(b,"");return`${A(e)}${A(r)}${y(t,x)}`}(n,"entity");R.set(n,s);const o=t.append("g").attr("id",s);a=void 0===a?s:a;const c="text-"+s,l=o.append("text").classed("er entityLabel",!0).attr("id",c).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",(0,i.c)().fontFamily).style("font-size",k.fontSize+"px").text(e[n].alias??n),{width:h,height:d}=((t,e,r)=>{const a=k.entityPadding/3,n=k.entityPadding/3,s=.85*k.fontSize,o=e.node().getBBox(),c=[];let l=!1,h=!1,d=0,y=0,u=0,p=0,_=o.height+2*a,f=1;r.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(l=!0),void 0!==t.attributeComment&&(h=!0)})),r.forEach((r=>{const n=`${e.node().id}-attr-${f}`;let o=0;const E=(0,i.v)(r.attributeType),m=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(E),g=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(r.attributeName),O={};O.tn=m,O.nn=g;const b=m.node().getBBox(),k=g.node().getBBox();if(d=Math.max(d,b.width),y=Math.max(y,k.width),o=Math.max(b.height,k.height),l){const e=void 0!==r.attributeKeyTypeList?r.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(e);O.kn=a;const c=a.node().getBBox();u=Math.max(u,c.width),o=Math.max(o,c.height)}if(h){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.c)().fontFamily).style("font-size",s+"px").text(r.attributeComment||"");O.cn=e;const a=e.node().getBBox();p=Math.max(p,a.width),o=Math.max(o,a.height)}O.height=o,c.push(O),_+=o+2*a,f+=1}));let E=4;l&&(E+=2),h&&(E+=2);const m=d+y+u+p,g={width:Math.max(k.minEntityWidth,Math.max(o.width+2*k.entityPadding,m+n*E)),height:r.length>0?_:Math.max(k.minEntityHeight,o.height+2*k.entityPadding)};if(r.length>0){const r=Math.max(0,(g.width-m-n*E)/(E/2));e.attr("transform","translate("+g.width/2+","+(a+o.height/2)+")");let i=o.height+2*a,s="attributeBoxOdd";c.forEach((e=>{const o=i+a+e.height/2;e.tn.attr("transform","translate("+n+","+o+")");const c=t.insert("rect","#"+e.tn.node().id).classed(`er ${s}`,!0).attr("x",0).attr("y",i).attr("width",d+2*n+r).attr("height",e.height+2*a),_=parseFloat(c.attr("x"))+parseFloat(c.attr("width"));e.nn.attr("transform","translate("+(_+n)+","+o+")");const f=t.insert("rect","#"+e.nn.node().id).classed(`er ${s}`,!0).attr("x",_).attr("y",i).attr("width",y+2*n+r).attr("height",e.height+2*a);let E=parseFloat(f.attr("x"))+parseFloat(f.attr("width"));if(l){e.kn.attr("transform","translate("+(E+n)+","+o+")");const c=t.insert("rect","#"+e.kn.node().id).classed(`er ${s}`,!0).attr("x",E).attr("y",i).attr("width",u+2*n+r).attr("height",e.height+2*a);E=parseFloat(c.attr("x"))+parseFloat(c.attr("width"))}h&&(e.cn.attr("transform","translate("+(E+n)+","+o+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${s}`,"true").attr("x",E).attr("y",i).attr("width",p+2*n+r).attr("height",e.height+2*a)),i+=e.height+2*a,s="attributeBoxOdd"===s?"attributeBoxEven":"attributeBoxOdd"}))}else g.height=Math.max(k.minEntityHeight,_),e.attr("transform","translate("+g.width/2+","+g.height/2+")");return g})(o,l,e[n].attributes),u=o.insert("rect","#"+c).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",h).attr("height",d).node().getBBox();r.setNode(s,{width:u.width,height:u.height,shape:"rect",id:s})})),a}(h,o.db.getEntities(),d),p=function(t,e){return t.forEach((function(t){e.setEdge(R.get(t.entityA),R.get(t.entityB),{relationship:t},N(t))})),t}(o.db.getRelationships(),d);var _,f;(0,s.bK)(d),_=h,(f=d).nodes().forEach((function(t){void 0!==t&&void 0!==f.node(t)&&_.select("#"+t).attr("transform","translate("+(f.node(t).x-f.node(t).width/2)+","+(f.node(t).y-f.node(t).height/2)+" )")})),p.forEach((function(t){!function(t,e,r,a,s){T++;const o=r.edge(R.get(e.entityA),R.get(e.entityB),N(e)),c=(0,n.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(n.$0Z),l=t.insert("path","#"+a).classed("er relationshipLine",!0).attr("d",c(o.points)).style("stroke",k.stroke).style("fill","none");e.relSpec.relType===s.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let h="";switch(k.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case s.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+h+"#"+O.ZERO_OR_ONE_END+")");break;case s.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+h+"#"+O.ZERO_OR_MORE_END+")");break;case s.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+h+"#"+O.ONE_OR_MORE_END+")");break;case s.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+h+"#"+O.ONLY_ONE_END+")");break;case s.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+h+"#"+O.MD_PARENT_END+")")}switch(e.relSpec.cardB){case s.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+h+"#"+O.ZERO_OR_ONE_START+")");break;case s.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+h+"#"+O.ZERO_OR_MORE_START+")");break;case s.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+h+"#"+O.ONE_OR_MORE_START+")");break;case s.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+h+"#"+O.ONLY_ONE_START+")");break;case s.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+h+"#"+O.MD_PARENT_START+")")}const d=l.node().getTotalLength(),y=l.node().getPointAtLength(.5*d),u="rel"+T,p=t.append("text").classed("er relationshipLabel",!0).attr("id",u).attr("x",y.x).attr("y",y.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",(0,i.c)().fontFamily).style("font-size",k.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+u).classed("er relationshipLabelBox",!0).attr("x",y.x-p.width/2).attr("y",y.y-p.height/2).attr("width",p.width).attr("height",p.height)}(h,t,d,u,o)}));const E=k.diagramPadding;i.u.insertTitle(h,"entityTitleText",k.titleTopMargin,o.db.getDiagramTitle());const m=h.node().getBBox(),M=m.width+2*E,w=m.height+2*E;(0,i.i)(h,w,M,k.useMaxWidth),h.attr("viewBox",`${m.x-E} ${m.y-E} ${M} ${w}`)}},styles:t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n`}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2924,9852],{22924:(t,e,o)=>{o.r(e),o.d(e,{FormWidget:()=>r,IMetadataFormProvider:()=>g,MetadataFormProvider:()=>v,MetadataFormWidget:()=>_});var a=o(96049),i=o(22620),s=o(27478),l=o.n(s),d=o(78156),n=o.n(d);class r extends a.ReactWidget{constructor(t){super(),this.addClass("jp-FormWidget"),this._props=t}render(){const t={defaultFormData:this._props.settings.default(),updateMetadata:this._props.metadataFormWidget.updateMetadata};return n().createElement(i.FormComponent,{validator:l(),schema:this._props.properties,formData:this._props.formData,formContext:t,uiSchema:this._props.uiSchema,liveValidate:!0,idPrefix:`jp-MetadataForm-${this._props.pluginId}`,onChange:t=>{this._props.metadataFormWidget.updateMetadata(t.formData||{})},compact:!0,showModifiedFromDefault:this._props.showModified,translator:this._props.translator})}}var h,m=o(17894),p=o(24554),c=o(37267),u=o(20998),f=o(63485);class _ extends m.NotebookTools.Tool{constructor(t){super(),this.updateMetadata=(t,e)=>{var o,a,i,s,l,d,n,r;if(null==this.notebookTools)return;const m=this.notebookTools.activeNotebookPanel,p=this.notebookTools.activeCell;if(null==p)return;this._updatingMetadata=!0;const c={},u={};for(let[e,f]of Object.entries(t)){if(!this.metadataKeys.includes(e))continue;if("notebook"===(null===(o=this._metaInformation[e])||void 0===o?void 0:o.level)&&this._notebookModelNull)continue;if((null===(a=this._metaInformation[e])||void 0===a?void 0:a.cellTypes)&&!(null===(s=null===(i=this._metaInformation[e])||void 0===i?void 0:i.cellTypes)||void 0===s?void 0:s.includes(p.model.type)))continue;let t,_;"notebook"===(null===(l=this._metaInformation[e])||void 0===l?void 0:l.level)?(t=m.model.metadata,_=u):(t=p.model.metadata,_=c);let v=e.replace(/^\/+/,"").replace(/\/+$/,"").split("/"),g=v[0];if(null==g)continue;let b=void 0!==f&&(null===(n=null===(d=this._metaInformation[e])||void 0===d?void 0:d.writeDefault)||void 0===n||n||f!==(null===(r=this._metaInformation[e])||void 0===r?void 0:r.default));if(1==v.length){_[g]=b?f:void 0;continue}let M=v.slice(1,-1),k=v[v.length-1];g in _||(_[g]=t[g]),void 0===_[g]&&(_[g]={});let C=_[g],w=!0;for(let t of M){if(!(t in C)){if(!b){w=!1;break}C[t]={}}C=C[t]}w&&(b?C[k]=f:delete C[k]),b||(_[g]=h.deleteEmptyNested(_[g],v.slice(1)),Object.keys(_[g]).length||(_[g]=void 0))}for(let[t,e]of Object.entries(c))void 0===e?p.model.deleteMetadata(t):p.model.setMetadata(t,e);if(!this._notebookModelNull)for(let[t,e]of Object.entries(u))void 0===e?m.model.deleteMetadata(t):m.model.setMetadata(t,e);this._updatingMetadata=!1,e&&this._update()},this._notebookModelNull=!1,this._metadataSchema=t.metadataSchema,this._metaInformation=t.metaInformation,this._uiSchema=t.uiSchema||{},this._pluginId=t.pluginId,this._showModified=t.showModified||!1,this.translator=t.translator||c.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._updatingMetadata=!1;const e=this.layout=new f.SingletonLayout,o=document.createElement("div"),a=document.createElement("div");a.textContent=this._trans.__("No metadata."),a.className="jp-MetadataForm-placeholderContent",o.appendChild(a),this._placeholder=new f.Widget({node:o}),this._placeholder.addClass("jp-MetadataForm-placeholder"),e.widget=this._placeholder}get form(){return this._form}get metadataKeys(){var t;const e=[];for(let t of Object.keys(this._metadataSchema.properties))e.push(t);return null===(t=this._metadataSchema.allOf)||void 0===t||t.forEach((t=>{if(void 0!==t.then&&void 0!==t.then.properties){let o=t.then.properties;for(let t of Object.keys(o))e.includes(t)||e.push(t)}if(void 0!==t.else&&void 0!==t.else.properties){let o=t.else.properties;for(let t of Object.keys(o))e.includes(t)||e.push(t)}})),e}getProperties(t){return u.JSONExt.deepCopy(this._metadataSchema.properties[t])||null}setProperties(t,e){Object.entries(e).forEach((([e,o])=>{this._metadataSchema.properties[t][e]=o}))}setContent(t){const e=this.layout;e.widget&&(e.widget.removeClass("jp-MetadataForm-content"),e.removeWidget(e.widget)),t||(t=this._placeholder),t.addClass("jp-MetadataForm-content"),e.widget=t}buildWidget(t){this._form=new r(t),this._form.addClass("jp-MetadataForm"),this.setContent(this._form)}onAfterShow(t){this._update()}onActiveCellChanged(t){this.isVisible&&this._update()}onActiveCellMetadataChanged(t){!this._updatingMetadata&&this.isVisible&&this._update()}onActiveNotebookPanelChanged(t){const e=this.notebookTools.activeNotebookPanel;this._notebookModelNull=null===e||null===e.model,!this._updatingMetadata&&this.isVisible&&this._update()}onActiveNotebookPanelMetadataChanged(t){!this._updatingMetadata&&this.isVisible&&this._update()}_update(){var t,e,o,a,i;const s=this.notebookTools.activeNotebookPanel,l=this.notebookTools.activeCell;if(null==l)return;const d=u.JSONExt.deepCopy(this._metadataSchema),n={};for(let r of Object.keys(this._metadataSchema.properties||u.JSONExt.emptyObject)){if("notebook"===(null===(t=this._metaInformation[r])||void 0===t?void 0:t.level)&&this._notebookModelNull){delete d.properties[r];continue}if((null===(e=this._metaInformation[r])||void 0===e?void 0:e.cellTypes)&&!(null===(a=null===(o=this._metaInformation[r])||void 0===o?void 0:o.cellTypes)||void 0===a?void 0:a.includes(l.model.type))){delete d.properties[r];continue}let h,m=r.replace(/^\/+/,"").replace(/\/+$/,"").split("/");h="notebook"===(null===(i=this._metaInformation[r])||void 0===i?void 0:i.level)?s.model.metadata:l.model.metadata;let p=!0;for(let t of m){if(!(t in h)){p=!1;break}h=h[t]}p&&(n[r]=h)}this.buildWidget({properties:d,settings:new p.BaseSettings({schema:this._metadataSchema}),uiSchema:this._uiSchema,translator:this.translator||null,formData:n,metadataFormWidget:this,showModified:this._showModified,pluginId:this._pluginId})}}!function(t){t.deleteEmptyNested=function t(e,o){let a=o.shift();return void 0!==a&&a in e&&(Object.keys(e[a]).length&&(e[a]=t(e[a],o)),Object.keys(e[a]).length||delete e[a]),e}}(h||(h={}));class v{constructor(){this._items={}}add(t,e){this._items[t]?console.warn(`A MetadataformWidget is already registered with id ${t}`):this._items[t]=e}get(t){if(this._items[t])return this._items[t];console.warn(`There is no MetadataformWidget registered with id ${t}`)}}const g=new u.Token("@jupyterlab/metadataform:IMetadataFormProvider","A service to register new metadata editor widgets.")}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2924,9852],{22924:(t,e,o)=>{o.r(e),o.d(e,{FormWidget:()=>r,IMetadataFormProvider:()=>g,MetadataFormProvider:()=>v,MetadataFormWidget:()=>_});var a=o(53312),i=o(35613),s=o(27478),l=o.n(s),d=o(78156),n=o.n(d);class r extends a.ReactWidget{constructor(t){super(),this.addClass("jp-FormWidget"),this._props=t}render(){const t={defaultFormData:this._props.settings.default(),updateMetadata:this._props.metadataFormWidget.updateMetadata};return n().createElement(i.FormComponent,{validator:l(),schema:this._props.properties,formData:this._props.formData,formContext:t,uiSchema:this._props.uiSchema,liveValidate:!0,idPrefix:`jp-MetadataForm-${this._props.pluginId}`,onChange:t=>{this._props.metadataFormWidget.updateMetadata(t.formData||{})},compact:!0,showModifiedFromDefault:this._props.showModified,translator:this._props.translator})}}var h,m=o(25460),p=o(23295),c=o(12030),u=o(20998),f=o(63485);class _ extends m.NotebookTools.Tool{constructor(t){super(),this.updateMetadata=(t,e)=>{var o,a,i,s,l,d,n,r;if(null==this.notebookTools)return;const m=this.notebookTools.activeNotebookPanel,p=this.notebookTools.activeCell;if(null==p)return;this._updatingMetadata=!0;const c={},u={};for(let[e,f]of Object.entries(t)){if(!this.metadataKeys.includes(e))continue;if("notebook"===(null===(o=this._metaInformation[e])||void 0===o?void 0:o.level)&&this._notebookModelNull)continue;if((null===(a=this._metaInformation[e])||void 0===a?void 0:a.cellTypes)&&!(null===(s=null===(i=this._metaInformation[e])||void 0===i?void 0:i.cellTypes)||void 0===s?void 0:s.includes(p.model.type)))continue;let t,_;"notebook"===(null===(l=this._metaInformation[e])||void 0===l?void 0:l.level)?(t=m.model.metadata,_=u):(t=p.model.metadata,_=c);let v=e.replace(/^\/+/,"").replace(/\/+$/,"").split("/"),g=v[0];if(null==g)continue;let b=void 0!==f&&(null===(n=null===(d=this._metaInformation[e])||void 0===d?void 0:d.writeDefault)||void 0===n||n||f!==(null===(r=this._metaInformation[e])||void 0===r?void 0:r.default));if(1==v.length){_[g]=b?f:void 0;continue}let M=v.slice(1,-1),k=v[v.length-1];g in _||(_[g]=t[g]),void 0===_[g]&&(_[g]={});let C=_[g],w=!0;for(let t of M){if(!(t in C)){if(!b){w=!1;break}C[t]={}}C=C[t]}w&&(b?C[k]=f:delete C[k]),b||(_[g]=h.deleteEmptyNested(_[g],v.slice(1)),Object.keys(_[g]).length||(_[g]=void 0))}for(let[t,e]of Object.entries(c))void 0===e?p.model.deleteMetadata(t):p.model.setMetadata(t,e);if(!this._notebookModelNull)for(let[t,e]of Object.entries(u))void 0===e?m.model.deleteMetadata(t):m.model.setMetadata(t,e);this._updatingMetadata=!1,e&&this._update()},this._notebookModelNull=!1,this._metadataSchema=t.metadataSchema,this._metaInformation=t.metaInformation,this._uiSchema=t.uiSchema||{},this._pluginId=t.pluginId,this._showModified=t.showModified||!1,this.translator=t.translator||c.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._updatingMetadata=!1;const e=this.layout=new f.SingletonLayout,o=document.createElement("div"),a=document.createElement("div");a.textContent=this._trans.__("No metadata."),a.className="jp-MetadataForm-placeholderContent",o.appendChild(a),this._placeholder=new f.Widget({node:o}),this._placeholder.addClass("jp-MetadataForm-placeholder"),e.widget=this._placeholder}get form(){return this._form}get metadataKeys(){var t;const e=[];for(let t of Object.keys(this._metadataSchema.properties))e.push(t);return null===(t=this._metadataSchema.allOf)||void 0===t||t.forEach((t=>{if(void 0!==t.then&&void 0!==t.then.properties){let o=t.then.properties;for(let t of Object.keys(o))e.includes(t)||e.push(t)}if(void 0!==t.else&&void 0!==t.else.properties){let o=t.else.properties;for(let t of Object.keys(o))e.includes(t)||e.push(t)}})),e}getProperties(t){return u.JSONExt.deepCopy(this._metadataSchema.properties[t])||null}setProperties(t,e){Object.entries(e).forEach((([e,o])=>{this._metadataSchema.properties[t][e]=o}))}setContent(t){const e=this.layout;e.widget&&(e.widget.removeClass("jp-MetadataForm-content"),e.removeWidget(e.widget)),t||(t=this._placeholder),t.addClass("jp-MetadataForm-content"),e.widget=t}buildWidget(t){this._form=new r(t),this._form.addClass("jp-MetadataForm"),this.setContent(this._form)}onAfterShow(t){this._update()}onActiveCellChanged(t){this.isVisible&&this._update()}onActiveCellMetadataChanged(t){!this._updatingMetadata&&this.isVisible&&this._update()}onActiveNotebookPanelChanged(t){const e=this.notebookTools.activeNotebookPanel;this._notebookModelNull=null===e||null===e.model,!this._updatingMetadata&&this.isVisible&&this._update()}onActiveNotebookPanelMetadataChanged(t){!this._updatingMetadata&&this.isVisible&&this._update()}_update(){var t,e,o,a,i;const s=this.notebookTools.activeNotebookPanel,l=this.notebookTools.activeCell;if(null==l)return;const d=u.JSONExt.deepCopy(this._metadataSchema),n={};for(let r of Object.keys(this._metadataSchema.properties||u.JSONExt.emptyObject)){if("notebook"===(null===(t=this._metaInformation[r])||void 0===t?void 0:t.level)&&this._notebookModelNull){delete d.properties[r];continue}if((null===(e=this._metaInformation[r])||void 0===e?void 0:e.cellTypes)&&!(null===(a=null===(o=this._metaInformation[r])||void 0===o?void 0:o.cellTypes)||void 0===a?void 0:a.includes(l.model.type))){delete d.properties[r];continue}let h,m=r.replace(/^\/+/,"").replace(/\/+$/,"").split("/");h="notebook"===(null===(i=this._metaInformation[r])||void 0===i?void 0:i.level)?s.model.metadata:l.model.metadata;let p=!0;for(let t of m){if(!(t in h)){p=!1;break}h=h[t]}p&&(n[r]=h)}this.buildWidget({properties:d,settings:new p.BaseSettings({schema:this._metadataSchema}),uiSchema:this._uiSchema,translator:this.translator||null,formData:n,metadataFormWidget:this,showModified:this._showModified,pluginId:this._pluginId})}}!function(t){t.deleteEmptyNested=function t(e,o){let a=o.shift();return void 0!==a&&a in e&&(Object.keys(e[a]).length&&(e[a]=t(e[a],o)),Object.keys(e[a]).length||delete e[a]),e}}(h||(h={}));class v{constructor(){this._items={}}add(t,e){this._items[t]?console.warn(`A MetadataformWidget is already registered with id ${t}`):this._items[t]=e}get(t){if(this._items[t])return this._items[t];console.warn(`There is no MetadataformWidget registered with id ${t}`)}}const g=new u.Token("@jupyterlab/metadataform:IMetadataFormProvider","A service to register new metadata editor widgets.")}}]);