notebook 7.1.0rc1__py3-none-any.whl → 7.1.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 (198) hide show
  1. notebook/__init__.py +1 -1
  2. notebook/_version.py +1 -1
  3. notebook/static/1198.bundle.js +1 -1
  4. notebook/static/131.bundle.js +1 -1
  5. notebook/static/1337.bundle.js +1 -1
  6. notebook/static/134.bundle.js +1 -1
  7. notebook/static/1388.bundle.js +1 -1
  8. notebook/static/1408.bundle.js +1 -1
  9. notebook/static/1495.bundle.js +1 -1
  10. notebook/static/1496.bundle.js +1 -1
  11. notebook/static/1647.bundle.js +1 -1
  12. notebook/static/1650.bundle.js +1 -1
  13. notebook/static/1664.bundle.js +1 -1
  14. notebook/static/1682.bundle.js +1 -1
  15. notebook/static/1684.bundle.js +1 -1
  16. notebook/static/1809.bundle.js +1 -1
  17. notebook/static/1827.bundle.js +1 -1
  18. notebook/static/1833.bundle.js +1 -1
  19. notebook/static/1835.bundle.js +1 -1
  20. notebook/static/1846.bundle.js +1 -1
  21. notebook/static/1950.bundle.js +1 -1
  22. notebook/static/1958.bundle.js +1 -1
  23. notebook/static/2007.bundle.js +1 -1
  24. notebook/static/2067.bundle.js +1 -1
  25. notebook/static/2088.bundle.js +1 -1
  26. notebook/static/2089.bundle.js +1 -1
  27. notebook/static/2122.bundle.js +1 -1
  28. notebook/static/214.bundle.js +1 -1
  29. notebook/static/2167.bundle.js +1 -1
  30. notebook/static/2184.bundle.js +1 -1
  31. notebook/static/2241.bundle.js +1 -1
  32. notebook/static/2311.bundle.js +1 -1
  33. notebook/static/2324.bundle.js +1 -1
  34. notebook/static/2401.bundle.js +1 -1
  35. notebook/static/2479.bundle.js +1 -1
  36. notebook/static/2489.bundle.js +1 -1
  37. notebook/static/2512.bundle.js +1 -1
  38. notebook/static/2520.bundle.js +1 -1
  39. notebook/static/2577.bundle.js +1 -1
  40. notebook/static/2607.bundle.js +1 -1
  41. notebook/static/261.bundle.js +1 -1
  42. notebook/static/2615.bundle.js +1 -1
  43. notebook/static/2682.bundle.js +1 -1
  44. notebook/static/2692.bundle.js +1 -1
  45. notebook/static/2866.bundle.js +1 -1
  46. notebook/static/2924.bundle.js +1 -1
  47. notebook/static/2944.bundle.js +1 -1
  48. notebook/static/3129.bundle.js +1 -1
  49. notebook/static/3146.bundle.js +1 -1
  50. notebook/static/3154.bundle.js +1 -1
  51. notebook/static/3187.bundle.js +1 -1
  52. notebook/static/3213.bundle.js +1 -1
  53. notebook/static/3301.bundle.js +1 -1
  54. notebook/static/3340.bundle.js +1 -1
  55. notebook/static/3360.bundle.js +1 -1
  56. notebook/static/3466.bundle.js +1 -1
  57. notebook/static/3488.bundle.js +1 -1
  58. notebook/static/3512.bundle.js +1 -1
  59. notebook/static/3654.bundle.js +1 -1
  60. notebook/static/3676.bundle.js +1 -1
  61. notebook/static/3680.bundle.js +1 -1
  62. notebook/static/3768.bundle.js +1 -1
  63. notebook/static/377.bundle.js +1 -1
  64. notebook/static/3863.bundle.js +1 -1
  65. notebook/static/3881.bundle.js +1 -1
  66. notebook/static/4035.bundle.js +1 -1
  67. notebook/static/4042.bundle.js +1 -1
  68. notebook/static/4131.bundle.js +1 -1
  69. notebook/static/4212.bundle.js +1 -1
  70. notebook/static/4382.bundle.js +1 -1
  71. notebook/static/4558.bundle.js +1 -1
  72. notebook/static/4630.bundle.js +1 -1
  73. notebook/static/4645.bundle.js +1 -1
  74. notebook/static/4811.bundle.js +1 -1
  75. notebook/static/5088.bundle.js +1 -1
  76. notebook/static/5099.bundle.js +1 -1
  77. notebook/static/5135.bundle.js +1 -1
  78. notebook/static/514.bundle.js +1 -1
  79. notebook/static/5313.bundle.js +1 -1
  80. notebook/static/5325.bundle.js +1 -1
  81. notebook/static/5346.bundle.js +1 -1
  82. notebook/static/5426.bundle.js +1 -1
  83. notebook/static/5573.bundle.js +1 -1
  84. notebook/static/5601.bundle.js +1 -1
  85. notebook/static/5649.bundle.js +3 -3
  86. notebook/static/5733.bundle.js +1 -1
  87. notebook/static/5912.bundle.js +1 -1
  88. notebook/static/5921.bundle.js +1 -1
  89. notebook/static/6017.bundle.js +1 -1
  90. notebook/static/6139.bundle.js +1 -1
  91. notebook/static/62.bundle.js +1 -1
  92. notebook/static/6256.bundle.js +1 -1
  93. notebook/static/6281.bundle.js +1 -1
  94. notebook/static/6345.bundle.js +1 -1
  95. notebook/static/6417.bundle.js +1 -1
  96. notebook/static/6604.bundle.js +1 -1
  97. notebook/static/6621.bundle.js +1 -1
  98. notebook/static/6627.bundle.js +1 -1
  99. notebook/static/6640.bundle.js +1 -1
  100. notebook/static/6667.bundle.js +1 -1
  101. notebook/static/6815.bundle.js +1 -1
  102. notebook/static/6853.bundle.js +1 -1
  103. notebook/static/6893.bundle.js +1 -1
  104. notebook/static/690.bundle.js +1 -1
  105. notebook/static/6962.bundle.js +1 -1
  106. notebook/static/6999.bundle.js +1 -1
  107. notebook/static/{1608.bundle.js → 7005.bundle.js} +1 -1
  108. notebook/static/7097.bundle.js +1 -1
  109. notebook/static/7153.bundle.js +1 -1
  110. notebook/static/7226.bundle.js +1 -1
  111. notebook/static/7252.bundle.js +1 -1
  112. notebook/static/7302.bundle.js +1 -1
  113. notebook/static/7386.bundle.js +1 -1
  114. notebook/static/7391.bundle.js +1 -1
  115. notebook/static/7394.bundle.js +1 -1
  116. notebook/static/7427.bundle.js +1 -1
  117. notebook/static/755.bundle.js +1 -1
  118. notebook/static/7603.bundle.js +1 -1
  119. notebook/static/7639.bundle.js +1 -1
  120. notebook/static/7684.bundle.js +1 -1
  121. notebook/static/771.bundle.js +1 -0
  122. notebook/static/7811.bundle.js +1 -1
  123. notebook/static/7812.bundle.js +1 -1
  124. notebook/static/7819.bundle.js +1 -1
  125. notebook/static/7900.bundle.js +1 -1
  126. notebook/static/7906.bundle.js +1 -1
  127. notebook/static/7995.bundle.js +1 -1
  128. notebook/static/8579.bundle.js +1 -1
  129. notebook/static/8633.bundle.js +1 -1
  130. notebook/static/8768.bundle.js +1 -1
  131. notebook/static/8771.bundle.js +1 -1
  132. notebook/static/8781.bundle.js +1 -1
  133. notebook/static/8801.bundle.js +1 -1
  134. notebook/static/8875.bundle.js +1 -1
  135. notebook/static/8907.bundle.js +1 -1
  136. notebook/static/8928.bundle.js +1 -1
  137. notebook/static/8929.bundle.js +1 -1
  138. notebook/static/893.bundle.js +1 -1
  139. notebook/static/901.bundle.js +1 -1
  140. notebook/static/9068.bundle.js +1 -1
  141. notebook/static/911.bundle.js +1 -1
  142. notebook/static/9151.bundle.js +1 -1
  143. notebook/static/9161.bundle.js +1 -1
  144. notebook/static/9268.bundle.js +1 -1
  145. notebook/static/9335.bundle.js +1 -1
  146. notebook/static/9341.bundle.js +1 -1
  147. notebook/static/9380.bundle.js +1 -1
  148. notebook/static/9605.bundle.js +1 -1
  149. notebook/static/9638.bundle.js +1 -1
  150. notebook/static/9680.bundle.js +1 -1
  151. notebook/static/9685.bundle.js +1 -1
  152. notebook/static/9752.bundle.js +1 -1
  153. notebook/static/9821.bundle.js +1 -1
  154. notebook/static/9852.bundle.js +1 -1
  155. notebook/static/9866.bundle.js +1 -1
  156. notebook/static/bundle.js +1 -1
  157. notebook/static/third-party-licenses.json +99 -99
  158. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
  159. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
  160. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
  161. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
  162. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
  163. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
  164. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
  165. notebook-7.1.0rc1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/913.ed31b967ed65df80c2cf.js → notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/355.1213f16419258c4671ec.js +1 -1
  166. notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.c74a681c6a303d4da718.js +1 -0
  167. notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.32f48ad22cd5f6a8da04.js +1 -0
  168. notebook-7.1.0rc1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js → notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.d3d4e56f2f961c2c2a13.js +1 -1
  169. notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.330dffb5180b5b71100a.js +1 -0
  170. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
  171. {notebook-7.1.0rc1.dist-info → notebook-7.1.1.dist-info}/METADATA +2 -2
  172. {notebook-7.1.0rc1.dist-info → notebook-7.1.1.dist-info}/RECORD +194 -194
  173. notebook/static/4837.bundle.js +0 -1
  174. notebook-7.1.0rc1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.7c69f17d842172804b2c.js +0 -1
  175. notebook-7.1.0rc1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.bf68c8ab6c905f205d45.js +0 -1
  176. notebook-7.1.0rc1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.de9e68f80570f96cb86a.js +0 -1
  177. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
  178. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
  179. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
  180. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
  181. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
  182. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
  183. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
  184. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
  185. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
  186. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
  187. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
  188. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
  189. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
  190. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
  191. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
  192. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
  193. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
  194. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
  195. {notebook-7.1.0rc1.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
  196. {notebook-7.1.0rc1.dist-info → notebook-7.1.1.dist-info}/WHEEL +0 -0
  197. {notebook-7.1.0rc1.dist-info → notebook-7.1.1.dist-info}/entry_points.txt +0 -0
  198. {notebook-7.1.0rc1.dist-info → notebook-7.1.1.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2512],{32512:(e,t,o)=>{o.r(t),o.d(t,{commandEditItem:()=>Y,default:()=>be,executionIndicator:()=>G,exportPlugin:()=>X,notebookTrustItem:()=>Q});var n=o(17260),l=o(98244),a=o(58601),r=o(69319),d=o(70788),i=o(88546),s=o(7267),c=o(91919),u=o(7328),b=o(91298),m=o(96795),p=o(78353),g=o(59105),C=o(59012),k=o(77990),v=o(87718),h=o(59932),f=o(8627),w=o(80864),x=o(97511),_=o(80890),A=o(94972),y=o(42539),S=o(70397),E=o(33625),N=o(20998),I=o(2549),M=o(49503),T=o(31516),R=o(13682),O=o(69825);const B={activate:function(e,t,o){function n(e){function t(t,n,l){if(O.KernelMessage.isDisplayDataMsg(t)||O.KernelMessage.isStreamMsg(t)||O.KernelMessage.isErrorMsg(t)||O.KernelMessage.isExecuteResultMsg(t)){const a=o.getLogger(e.context.path);a.rendermime=e.content.rendermime;const r={...t.content,output_type:t.header.msg_type};let d=n;(O.KernelMessage.isErrorMsg(t)||O.KernelMessage.isStreamMsg(t)&&"stderr"===t.content.name)&&(d=l),a.log({type:"output",data:r,level:d})}}e.context.sessionContext.iopubMessage.connect(((e,o)=>t(o,"info","info"))),e.context.sessionContext.unhandledMessage.connect(((e,o)=>t(o,"warning","error")))}o&&(t.forEach((e=>n(e))),t.widgetAdded.connect(((e,t)=>n(t))))},id:"@jupyterlab/notebook-extension:log-output",description:"Adds cell outputs log to the application logger.",requires:[v.INotebookTracker],optional:[R.ILoggerRegistry],autoStart:!0};var P=o(78156),H=o.n(P),j=o(97934);class L extends v.NotebookTools.Tool{constructor(e){super();const{languages:t}=e;this._tracker=e.tracker,this.addClass("jp-ActiveCellTool"),this.layout=new T.PanelLayout,this._inputPrompt=new a.InputPrompt,this.layout.addWidget(this._inputPrompt);const o=document.createElement("div");o.classList.add("jp-ActiveCellTool-Content");const n=o.appendChild(document.createElement("div")),l=n.appendChild(document.createElement("pre"));n.className="jp-ActiveCellTool-CellContent",this._editorEl=l,this.layout.addWidget(new T.Widget({node:o})),this._refreshDebouncer=new j.Debouncer((async()=>{var e,o;this._editorEl.innerHTML="","code"===(null===(e=this._cellModel)||void 0===e?void 0:e.type)?(this._inputPrompt.executionCount=`${null!==(o=this._cellModel.executionCount)&&void 0!==o?o:""}`,this._inputPrompt.show()):(this._inputPrompt.executionCount=null,this._inputPrompt.hide()),this._cellModel&&await t.highlight(this._cellModel.sharedModel.getSource().split("\n")[0],t.findByMIME(this._cellModel.mimeType),this._editorEl)}),150)}render(e){var t,o;const n=this._tracker.activeCell;return n&&(this._cellModel=(null==n?void 0:n.model)||null),(null===(t=this._cellModel)||void 0===t?void 0:t.sharedModel).changed.connect(this.refresh,this),null===(o=this._cellModel)||void 0===o||o.mimeTypeChanged.connect(this.refresh,this),this.refresh().then((()=>{})).catch((()=>{})),H().createElement("div",{ref:e=>null==e?void 0:e.appendChild(this.node)})}async refresh(){await this._refreshDebouncer.invoke()}}var D,W=o(50007);class K extends v.NotebookTools.MetadataEditorTool{constructor(e){super(e),this._tracker=e.tracker,this.editor.editorHostNode.addEventListener("blur",this.editor,!0),this.editor.editorHostNode.addEventListener("click",this.editor,!0),this.editor.headerNode.addEventListener("click",this.editor)}_onSourceChanged(){var e;this.editor.source&&(null===(e=this._tracker.activeCell)||void 0===e||e.model.sharedModel.setMetadata(this.editor.source.toJSON()))}render(e){var t;const o=this._tracker.activeCell;return this.editor.source=o?new W.ObservableJSON({values:o.model.metadata}):null,null===(t=this.editor.source)||void 0===t||t.changed.connect(this._onSourceChanged,this),H().createElement("div",{className:"jp-CellMetadataEditor"},H().createElement("div",{ref:e=>null==e?void 0:e.appendChild(this.node)}))}}class F extends v.NotebookTools.MetadataEditorTool{constructor(e){super(e),this._tracker=e.tracker,this.editor.editorHostNode.addEventListener("blur",this.editor,!0),this.editor.editorHostNode.addEventListener("click",this.editor,!0),this.editor.headerNode.addEventListener("click",this.editor)}_onSourceChanged(){var e,t;this.editor.source&&(null===(t=null===(e=this._tracker.currentWidget)||void 0===e?void 0:e.model)||void 0===t||t.sharedModel.setMetadata(this.editor.source.toJSON()))}render(e){var t,o;const n=this._tracker.currentWidget;return this.editor.source=n?new W.ObservableJSON({values:null===(t=n.model)||void 0===t?void 0:t.metadata}):null,null===(o=this.editor.source)||void 0===o||o.changed.connect(this._onSourceChanged,this),H().createElement("div",{className:"jp-NotebookMetadataEditor"},H().createElement("div",{ref:e=>null==e?void 0:e.appendChild(this.node)}))}}!function(e){e.createNew="notebook:create-new",e.interrupt="notebook:interrupt-kernel",e.restart="notebook:restart-kernel",e.restartClear="notebook:restart-clear-output",e.restartAndRunToSelected="notebook:restart-and-run-to-selected",e.restartRunAll="notebook:restart-run-all",e.reconnectToKernel="notebook:reconnect-to-kernel",e.changeKernel="notebook:change-kernel",e.getKernel="notebook:get-kernel",e.createConsole="notebook:create-console",e.createOutputView="notebook:create-output-view",e.clearAllOutputs="notebook:clear-all-cell-outputs",e.shutdown="notebook:shutdown-kernel",e.closeAndShutdown="notebook:close-and-shutdown",e.trust="notebook:trust",e.exportToFormat="notebook:export-to-format",e.run="notebook:run-cell",e.runAndAdvance="notebook:run-cell-and-select-next",e.runAndInsert="notebook:run-cell-and-insert-below",e.runInConsole="notebook:run-in-console",e.runAll="notebook:run-all-cells",e.runAllAbove="notebook:run-all-above",e.runAllBelow="notebook:run-all-below",e.renderAllMarkdown="notebook:render-all-markdown",e.toCode="notebook:change-cell-to-code",e.toMarkdown="notebook:change-cell-to-markdown",e.toRaw="notebook:change-cell-to-raw",e.cut="notebook:cut-cell",e.copy="notebook:copy-cell",e.pasteAbove="notebook:paste-cell-above",e.pasteBelow="notebook:paste-cell-below",e.duplicateBelow="notebook:duplicate-below",e.pasteAndReplace="notebook:paste-and-replace-cell",e.moveUp="notebook:move-cell-up",e.moveDown="notebook:move-cell-down",e.clearOutputs="notebook:clear-cell-output",e.deleteCell="notebook:delete-cell",e.insertAbove="notebook:insert-cell-above",e.insertBelow="notebook:insert-cell-below",e.selectAbove="notebook:move-cursor-up",e.selectBelow="notebook:move-cursor-down",e.selectHeadingAboveOrCollapse="notebook:move-cursor-heading-above-or-collapse",e.selectHeadingBelowOrExpand="notebook:move-cursor-heading-below-or-expand",e.insertHeadingAbove="notebook:insert-heading-above",e.insertHeadingBelow="notebook:insert-heading-below",e.extendAbove="notebook:extend-marked-cells-above",e.extendTop="notebook:extend-marked-cells-top",e.extendBelow="notebook:extend-marked-cells-below",e.extendBottom="notebook:extend-marked-cells-bottom",e.selectAll="notebook:select-all",e.deselectAll="notebook:deselect-all",e.editMode="notebook:enter-edit-mode",e.merge="notebook:merge-cells",e.mergeAbove="notebook:merge-cell-above",e.mergeBelow="notebook:merge-cell-below",e.split="notebook:split-cell-at-cursor",e.commandMode="notebook:enter-command-mode",e.toggleAllLines="notebook:toggle-all-cell-line-numbers",e.undoCellAction="notebook:undo-cell-action",e.redoCellAction="notebook:redo-cell-action",e.redo="notebook:redo",e.undo="notebook:undo",e.markdown1="notebook:change-cell-to-heading-1",e.markdown2="notebook:change-cell-to-heading-2",e.markdown3="notebook:change-cell-to-heading-3",e.markdown4="notebook:change-cell-to-heading-4",e.markdown5="notebook:change-cell-to-heading-5",e.markdown6="notebook:change-cell-to-heading-6",e.hideCode="notebook:hide-cell-code",e.showCode="notebook:show-cell-code",e.hideAllCode="notebook:hide-all-cell-code",e.showAllCode="notebook:show-all-cell-code",e.hideOutput="notebook:hide-cell-outputs",e.showOutput="notebook:show-cell-outputs",e.hideAllOutputs="notebook:hide-all-cell-outputs",e.showAllOutputs="notebook:show-all-cell-outputs",e.toggleRenderSideBySideCurrentNotebook="notebook:toggle-render-side-by-side-current",e.setSideBySideRatio="notebook:set-side-by-side-ratio",e.enableOutputScrolling="notebook:enable-output-scrolling",e.disableOutputScrolling="notebook:disable-output-scrolling",e.selectLastRunCell="notebook:select-last-run-cell",e.replaceSelection="notebook:replace-selection",e.autoClosingBrackets="notebook:toggle-autoclosing-brackets",e.toggleCollapseCmd="notebook:toggle-heading-collapse",e.collapseAllCmd="notebook:collapse-all-headings",e.expandAllCmd="notebook:expand-all-headings",e.copyToClipboard="notebook:copy-to-clipboard",e.invokeCompleter="completer:invoke-notebook",e.selectCompleter="completer:select-notebook",e.tocRunCells="toc:run-cells",e.accessPreviousHistory="notebook:access-previous-history-entry",e.accessNextHistory="notebook:access-next-history-entry",e.virtualScrollbar="notebook:toggle-virtual-scrollbar"}(D||(D={}));const U="Notebook",q=["notebook","python","custom"],V="jp-NotebookExtension-sideBySideMargins",$={id:"@jupyterlab/notebook-extension:tracker",description:"Provides the notebook widget tracker.",provides:v.INotebookTracker,requires:[v.INotebookWidgetFactory,i.IEditorExtensionRegistry],optional:[l.ICommandPalette,m.IDefaultFileBrowser,p.ILauncher,n.ILayoutRestorer,C.IMainMenu,n.IRouter,w.ISettingRegistry,l.ISessionContextDialogs,y.ITranslator,S.IFormRendererRegistry],activate:function(e,t,o,n,a,r,d,i,s,c,u,b,m){const p=null!=b?b:y.nullTranslator,g=null!=u?u:new l.SessionContextDialogs({translator:p}),C=p.load("jupyterlab"),k=e.serviceManager,{commands:h,shell:f}=e,w=new v.NotebookTracker({namespace:"notebook"});null==s||s.routed.connect((function(e,t){t.hash&&w.currentWidget&&w.currentWidget.setFragment(t.hash)}));const x=()=>ge.isEnabled(f,w),_=e=>document.documentElement.style.setProperty("--jp-side-by-side-output-size",`${e}fr`);if((c?c.load($.id):Promise.reject(new Error(`No setting registry for ${$.id}`))).then((t=>{O(t),t.changed.connect((()=>{O(t),h.notifyCommandChanged(D.virtualScrollbar)}));const n=(e,o)=>{const{newValue:n,oldValue:l}=o,a=n.autoStartDefault;"boolean"==typeof a&&a!==l.autoStartDefault&&a!==t.get("autoStartDefaultKernel").composite&&t.set("autoStartDefaultKernel",a).catch((e=>{console.error(`Failed to set ${t.id}.autoStartDefaultKernel`)}))},a=new WeakSet,r=e=>{const t=e.context.sessionContext;t.isDisposed||a.has(t)||(a.add(t),t.kernelPreferenceChanged.connect(n),t.disposed.connect((()=>{t.kernelPreferenceChanged.disconnect(n)})))};w.forEach(r),w.widgetAdded.connect(((e,t)=>{r(t)})),h.addCommand(D.autoClosingBrackets,{execute:e=>{var o;const n=t.get("codeCellConfig").composite,l=t.get("markdownCellConfig").composite,a=t.get("rawCellConfig").composite,r=n.autoClosingBrackets||l.autoClosingBrackets||a.autoClosingBrackets,d=!!(null!==(o=e.force)&&void 0!==o?o:!r);[n.autoClosingBrackets,l.autoClosingBrackets,a.autoClosingBrackets]=[d,d,d],t.set("codeCellConfig",n),t.set("markdownCellConfig",l),t.set("rawCellConfig",a)},label:C.__("Auto Close Brackets for All Notebook Cell Types"),isToggled:()=>["codeCellConfig","markdownCellConfig","rawCellConfig"].some((e=>{var n;return!0===(null!==(n=t.get(e).composite.autoClosingBrackets)&&void 0!==n?n:o.baseConfiguration.autoClosingBrackets)}))}),h.addCommand(D.setSideBySideRatio,{label:C.__("Set side-by-side ratio"),execute:e=>{l.InputDialog.getNumber({title:C.__("Width of the output in side-by-side mode"),value:t.get("sideBySideOutputRatio").composite}).then((e=>{_(e.value),e.value&&t.set("sideBySideOutputRatio",e.value)})).catch(console.error)}}),pe(e,w,p,g,t,x)})).catch((o=>{console.warn(o.message),R({editorConfig:t.editorConfig,notebookConfig:t.notebookConfig,kernelShutdown:t.shutdownOnClose,autoStartDefault:t.autoStartDefault}),pe(e,w,p,g,null,x)})),m){const e=m.getRenderer("@jupyterlab/codemirror-extension:plugin.defaultConfig");e&&(m.addRenderer("@jupyterlab/notebook-extension:tracker.codeCellConfig",e),m.addRenderer("@jupyterlab/notebook-extension:tracker.markdownCellConfig",e),m.addRenderer("@jupyterlab/notebook-extension:tracker.rawCellConfig",e))}d&&d.restore(w,{command:"docmanager:open",args:e=>({path:e.context.path,factory:U}),name:e=>e.context.path,when:k.ready});const A=e.docRegistry,E=new v.NotebookModelFactory({disableDocumentWideUndoRedo:t.notebookConfig.disableDocumentWideUndoRedo,collaborative:!0});A.addModelFactory(E),n&&function(e,t){const o=t.load("jupyterlab");let n=o.__("Notebook Operations");[D.interrupt,D.restart,D.restartClear,D.restartRunAll,D.runAll,D.renderAllMarkdown,D.runAllAbove,D.runAllBelow,D.restartAndRunToSelected,D.selectAll,D.deselectAll,D.clearAllOutputs,D.toggleAllLines,D.editMode,D.commandMode,D.changeKernel,D.reconnectToKernel,D.createConsole,D.closeAndShutdown,D.trust,D.toggleCollapseCmd,D.collapseAllCmd,D.expandAllCmd,D.accessPreviousHistory,D.accessNextHistory].forEach((t=>{e.addItem({command:t,category:n})})),e.addItem({command:D.createNew,category:n,args:{isPalette:!0}}),n=o.__("Notebook Cell Operations"),[D.run,D.runAndAdvance,D.runAndInsert,D.runInConsole,D.clearOutputs,D.toCode,D.toMarkdown,D.toRaw,D.cut,D.copy,D.pasteBelow,D.pasteAbove,D.pasteAndReplace,D.deleteCell,D.split,D.merge,D.mergeAbove,D.mergeBelow,D.insertAbove,D.insertBelow,D.selectAbove,D.selectBelow,D.selectHeadingAboveOrCollapse,D.selectHeadingBelowOrExpand,D.insertHeadingAbove,D.insertHeadingBelow,D.extendAbove,D.extendTop,D.extendBelow,D.extendBottom,D.moveDown,D.moveUp,D.undoCellAction,D.redoCellAction,D.markdown1,D.markdown2,D.markdown3,D.markdown4,D.markdown5,D.markdown6,D.hideCode,D.showCode,D.hideAllCode,D.showAllCode,D.hideOutput,D.showOutput,D.hideAllOutputs,D.showAllOutputs,D.toggleRenderSideBySideCurrentNotebook,D.setSideBySideRatio,D.enableOutputScrolling,D.disableOutputScrolling].forEach((t=>{e.addItem({command:t,category:n})}))}(n,p);let M=0;const T=e.docRegistry.getFileType("notebook");function R(e){w.forEach((t=>{t.setConfig(e)})),"full"!==e.notebookConfig.windowingMode&&w.forEach((e=>{e.content.scrollbar&&(e.content.scrollbar=!1)}))}function O(e){const o={...v.StaticNotebook.defaultEditorConfig.code,...e.get("codeCellConfig").composite},n={...v.StaticNotebook.defaultEditorConfig.markdown,...e.get("markdownCellConfig").composite},l={...v.StaticNotebook.defaultEditorConfig.raw,...e.get("rawCellConfig").composite};t.editorConfig={code:o,markdown:n,raw:l},t.notebookConfig={enableKernelInitNotification:e.get("enableKernelInitNotification").composite,showHiddenCellsButton:e.get("showHiddenCellsButton").composite,scrollPastEnd:e.get("scrollPastEnd").composite,defaultCell:e.get("defaultCell").composite,recordTiming:e.get("recordTiming").composite,overscanCount:e.get("overscanCount").composite,inputHistoryScope:e.get("inputHistoryScope").composite,maxNumberOutputs:e.get("maxNumberOutputs").composite,showEditorForReadOnlyMarkdown:e.get("showEditorForReadOnlyMarkdown").composite,disableDocumentWideUndoRedo:!e.get("documentWideUndoRedo").composite,renderingLayout:e.get("renderingLayout").composite,sideBySideLeftMarginOverride:e.get("sideBySideLeftMarginOverride").composite,sideBySideRightMarginOverride:e.get("sideBySideRightMarginOverride").composite,sideBySideOutputRatio:e.get("sideBySideOutputRatio").composite,windowingMode:e.get("windowingMode").composite,accessKernelHistory:e.get("accessKernelHistory").composite},_(t.notebookConfig.sideBySideOutputRatio);const a=`.jp-mod-sideBySide.jp-Notebook .jp-Notebook-cell {\n margin-left: ${t.notebookConfig.sideBySideLeftMarginOverride} !important;\n margin-right: ${t.notebookConfig.sideBySideRightMarginOverride} !important;`,r=document.getElementById(V);r?r.innerText=a:document.head.insertAdjacentHTML("beforeend",`<style id="${V}">${a}}</style>`),t.autoStartDefault=e.get("autoStartDefaultKernel").composite,t.shutdownOnClose=e.get("kernelShutdown").composite,E.disableDocumentWideUndoRedo=!e.get("documentWideUndoRedo").composite,R({editorConfig:t.editorConfig,notebookConfig:t.notebookConfig,kernelShutdown:t.shutdownOnClose,autoStartDefault:t.autoStartDefault})}return t.widgetCreated.connect(((e,t)=>{var o,n;t.id=t.id||"notebook-"+ ++M,t.title.icon=null==T?void 0:T.icon,t.title.iconClass=null!==(o=null==T?void 0:T.iconClass)&&void 0!==o?o:"",t.title.iconLabel=null!==(n=null==T?void 0:T.iconLabel)&&void 0!==n?n:"",t.context.pathChanged.connect((()=>{w.save(t)})),w.add(t)})),i&&function(e,t){e.editMenu.undoers.redo.add({id:D.redo,isEnabled:t}),e.editMenu.undoers.undo.add({id:D.undo,isEnabled:t}),e.editMenu.clearers.clearAll.add({id:D.clearAllOutputs,isEnabled:t}),e.editMenu.clearers.clearCurrent.add({id:D.clearOutputs,isEnabled:t}),e.fileMenu.consoleCreators.add({id:D.createConsole,isEnabled:t}),e.fileMenu.closeAndCleaners.add({id:D.closeAndShutdown,isEnabled:t}),e.kernelMenu.kernelUsers.changeKernel.add({id:D.changeKernel,isEnabled:t}),e.kernelMenu.kernelUsers.clearWidget.add({id:D.clearAllOutputs,isEnabled:t}),e.kernelMenu.kernelUsers.interruptKernel.add({id:D.interrupt,isEnabled:t}),e.kernelMenu.kernelUsers.reconnectToKernel.add({id:D.reconnectToKernel,isEnabled:t}),e.kernelMenu.kernelUsers.restartKernel.add({id:D.restart,isEnabled:t}),e.kernelMenu.kernelUsers.shutdownKernel.add({id:D.shutdown,isEnabled:t}),e.viewMenu.editorViewers.toggleLineNumbers.add({id:D.toggleAllLines,isEnabled:t}),e.runMenu.codeRunners.restart.add({id:D.restart,isEnabled:t}),e.runMenu.codeRunners.run.add({id:D.runAndAdvance,isEnabled:t}),e.runMenu.codeRunners.runAll.add({id:D.runAll,isEnabled:t}),e.helpMenu.getKernel.add({id:D.getKernel,isEnabled:t})}(i,x),h.addCommand(D.createNew,{label:e=>{var t,o,n;const l=e.kernelName||"";return e.isLauncher&&e.kernelName&&k.kernelspecs?null!==(n=null===(o=null===(t=k.kernelspecs.specs)||void 0===t?void 0:t.kernelspecs[l])||void 0===o?void 0:o.display_name)&&void 0!==n?n:"":e.isPalette||e.isContextMenu?C.__("New Notebook"):C.__("Notebook")},caption:C.__("Create a new notebook"),icon:e=>e.isPalette?void 0:S.notebookIcon,execute:e=>{var t;return(async(e,t,o)=>{const n=await h.execute("docmanager:new-untitled",{path:e,type:"notebook"});if(void 0!==n){const e=await h.execute("docmanager:open",{path:n.path,factory:U,kernel:{id:t,name:o}});return e.isUntitled=!0,e}})(e.cwd||(null!==(t=null==a?void 0:a.model.path)&&void 0!==t?t:""),e.kernelId||"",e.kernelName||"")}}),r&&k.ready.then((()=>{let e=null;const t=()=>{e&&(e.dispose(),e=null);const t=k.kernelspecs.specs;if(t){e=new I.DisposableSet;for(const o in t.kernelspecs){const n=o===t.default?0:1/0,l=t.kernelspecs[o],a=l.resources["logo-svg"]||l.resources["logo-64x64"];e.add(r.add({command:D.createNew,args:{isLauncher:!0,kernelName:o},category:C.__("Notebook"),rank:n,kernelIconUrl:a,metadata:{kernel:N.JSONExt.deepCopy(l.metadata||{})}}))}}};t(),k.kernelspecs.specsChanged.connect(t)})),w},autoStart:!0},J={id:"@jupyterlab/notebook-extension:factory",description:"Provides the notebook cell factory.",provides:v.NotebookPanel.IContentFactory,requires:[r.IEditorServices],autoStart:!0,activate:(e,t)=>{const o=t.factoryService.newInlineEditor;return new v.NotebookPanel.ContentFactory({editorFactory:o})}},z={activate:function(e,t,o,n,l,a,r){const d=a.load("jupyterlab"),i="notebook-tools",s=new v.NotebookTools({tracker:t,translator:a});return s.title.icon=S.buildIcon,s.title.caption=d.__("Notebook Tools"),s.id=i,M.MessageLoop.installMessageHook(s,((e,t)=>{switch(t.type){case"activate-request":l.save(i,{open:!0});break;case"after-hide":case"close-request":l.remove(i)}return!0})),r&&t.widgetAdded.connect(((e,t)=>{r.register(t).render(s)})),s},provides:v.INotebookTools,id:"@jupyterlab/notebook-extension:tools",description:"Provides the notebook tools.",autoStart:!0,requires:[v.INotebookTracker,r.IEditorServices,i.IEditorLanguageRegistry,x.IStateDB,y.ITranslator],optional:[h.IPropertyInspectorProvider]},Y={id:"@jupyterlab/notebook-extension:mode-status",description:"Adds a notebook mode status widget.",autoStart:!0,requires:[v.INotebookTracker,y.ITranslator],optional:[_.IStatusBar],activate:(e,t,o,n)=>{if(!n)return;const{shell:l}=e,a=new v.CommandEditStatus(o);t.currentChanged.connect((()=>{const e=t.currentWidget;a.model.notebook=e&&e.content})),n.registerStatusItem("@jupyterlab/notebook-extension:mode-status",{priority:1,item:a,align:"right",rank:4,isActive:()=>!!l.currentWidget&&!!t.currentWidget&&l.currentWidget===t.currentWidget})}},G={id:"@jupyterlab/notebook-extension:execution-indicator",description:"Adds a notebook execution status widget.",autoStart:!0,requires:[v.INotebookTracker,n.ILabShell,y.ITranslator],optional:[_.IStatusBar,w.ISettingRegistry],activate:(e,t,o,n,l,a)=>{let r,d,i;const s=e=>{var a,s;let{showOnToolBar:c,showProgress:u}=e;if(c)i&&(o.currentChanged.disconnect(d),i.dispose());else{if(!l)return;(null==r?void 0:r.model)||(r=new v.ExecutionIndicator(n),d=(e,o)=>{const{newValue:n}=o;if(n&&t.has(n)){const e=n;r.model.attachNotebook({content:e.content,context:e.sessionContext})}},i=l.registerStatusItem("@jupyterlab/notebook-extension:execution-indicator",{item:r,align:"left",rank:3,isActive:()=>{const e=o.currentWidget;return!!e&&t.has(e)}}),r.model.attachNotebook({content:null===(a=t.currentWidget)||void 0===a?void 0:a.content,context:null===(s=t.currentWidget)||void 0===s?void 0:s.sessionContext}),o.currentChanged.connect(d),r.disposed.connect((()=>{o.currentChanged.disconnect(d)}))),r.model.displayOption={showOnToolBar:c,showProgress:u}}};if(a){const t=a.load($.id);Promise.all([t,e.restored]).then((([e])=>{s(v.ExecutionIndicator.getSettingValue(e)),e.changed.connect((e=>s(v.ExecutionIndicator.getSettingValue(e))))})).catch((e=>{console.error(e.message)}))}}},X={id:"@jupyterlab/notebook-extension:export",description:"Adds the export notebook commands.",autoStart:!0,requires:[y.ITranslator,v.INotebookTracker],optional:[C.IMainMenu,l.ICommandPalette],activate:(e,t,o,n,l)=>{var a;const r=t.load("jupyterlab"),{commands:i,shell:s}=e,c=e.serviceManager;let u;i.addCommand(D.exportToFormat,{label:e=>{if(void 0===e.label)return r.__("Save and Export Notebook to the given `format`.");const t=e.label;return e.isPalette?r.__("Save and Export Notebook: %1",t):t},execute:e=>{const t=me(o,s,e);if(!t)return;const n=d.PageConfig.getNBConvertURL({format:e.format,download:!0,path:t.context.path}),{context:l}=t;return l.model.dirty&&!l.model.readOnly?l.save().then((()=>{window.open(n,"_blank","noopener")})):new Promise((e=>{window.open(n,"_blank","noopener"),e(void 0)}))},isEnabled:()=>ge.isEnabled(s,o)}),n&&(u=null===(a=n.fileMenu.items.find((e=>{var t;return"submenu"===e.type&&"jp-mainmenu-file-notebookexport"===(null===(t=e.submenu)||void 0===t?void 0:t.id)})))||void 0===a?void 0:a.submenu);let b=!1;const m=async()=>{if(b)return;o.widgetAdded.disconnect(m),b=!0;const e=await c.nbconvert.getExportFormats(!1);if(!e)return;const n=ge.getFormatLabels(t);Object.keys(e).forEach((function(e){const t=r.__(e[0].toUpperCase()+e.substr(1)),o=n[e]?n[e]:t;let a={format:e,label:o,isPalette:!1};if(-1===q.indexOf(e)&&(u&&u.addItem({command:D.exportToFormat,args:a}),l)){a={format:e,label:o,isPalette:!0};const t=r.__("Notebook Operations");l.addItem({command:D.exportToFormat,category:t,args:a})}}))};o.widgetAdded.connect(m)}},Q={id:"@jupyterlab/notebook-extension:trust-status",description:"Adds the notebook trusted status widget.",autoStart:!0,requires:[v.INotebookTracker,y.ITranslator],optional:[_.IStatusBar],activate:(e,t,o,n)=>{if(!n)return;const{shell:l}=e,a=new v.NotebookTrustStatus(o);t.currentChanged.connect((()=>{const e=t.currentWidget;a.model.notebook=e&&e.content})),n.registerStatusItem("@jupyterlab/notebook-extension:trust-status",{item:a,align:"right",rank:3,isActive:()=>!!l.currentWidget&&!!t.currentWidget&&l.currentWidget===t.currentWidget})}},Z={id:"@jupyterlab/notebook-extension:widget-factory",description:"Provides the notebook widget factory.",provides:v.INotebookWidgetFactory,requires:[v.NotebookPanel.IContentFactory,r.IEditorServices,f.IRenderMimeRegistry,l.IToolbarWidgetRegistry],optional:[w.ISettingRegistry,l.ISessionContextDialogs,y.ITranslator],activate:function(e,t,o,n,a,r,i,s){const c=null!=s?s:y.nullTranslator,b=null!=i?i:new l.SessionContextDialogs({translator:c}),m=d.PageConfig.getOption("notebookStartsKernel"),p=""===m||"true"===m.toLowerCase(),{commands:g}=e;let C;a.addFactory(U,"save",(e=>u.ToolbarItems.createSaveButton(g,e.context.fileChanged))),a.addFactory(U,"cellType",(e=>v.ToolbarItems.createCellTypeItem(e,c))),a.addFactory(U,"kernelName",(e=>l.Toolbar.createKernelNameItem(e.sessionContext,b,c))),a.addFactory(U,"executionProgress",(e=>{const t=null==r?void 0:r.load($.id),o=v.ExecutionIndicator.createExecutionIndicatorItem(e,c,t);return null==t||t.then((t=>{e.disposed.connect((()=>{t.dispose()}))})),o})),r&&(C=(0,l.createToolbarFactory)(a,r,U,"@jupyterlab/notebook-extension:panel",c));const k=c.load("jupyterlab"),h=new v.NotebookWidgetFactory({name:U,label:k.__("Notebook"),fileTypes:["notebook"],modelName:"notebook",defaultFor:["notebook"],preferKernel:p,canStartKernel:!0,rendermime:n,contentFactory:t,editorConfig:v.StaticNotebook.defaultEditorConfig,notebookConfig:v.StaticNotebook.defaultNotebookConfig,mimeTypeService:o.mimeTypeService,toolbarFactory:C,translator:c});return e.docRegistry.addWidgetFactory(h),h},autoStart:!0},ee={id:"@jupyterlab/notebook-extension:cloned-outputs",description:"Adds the clone output feature.",requires:[c.IDocumentManager,v.INotebookTracker,y.ITranslator],optional:[n.ILayoutRestorer],activate:function(e,t,o,n,a){const r=n.load("jupyterlab"),d=new l.WidgetTracker({namespace:"cloned-outputs"});a&&a.restore(d,{command:D.createOutputView,args:e=>({path:e.content.path,index:e.content.index}),name:e=>`${e.content.path}:${e.content.index}`,when:o.restored});const{commands:i,shell:s}=e;i.addCommand(D.createOutputView,{label:r.__("Create New View for Cell Output"),execute:async e=>{var a;let r,i;const s=e.path;let c=e.index;if(s&&null!=c){if(i=t.findWidget(s,U),!i)return}else{if(i=o.currentWidget,!i)return;r=i.content.activeCell,c=i.content.activeCellIndex}const u=new ge.ClonedOutputArea({notebook:i,cell:r,index:c,translator:n}),b=new l.MainAreaWidget({content:u});i.context.addSibling(b,{ref:i.id,mode:"split-bottom",type:"Cloned Output"});const m=()=>{d.save(b)};i.context.pathChanged.connect(m),null===(a=i.context.model)||void 0===a||a.cells.changed.connect(m),d.add(b),i.content.disposed.connect((()=>{var e;i.context.pathChanged.disconnect(m),null===(e=i.context.model)||void 0===e||e.cells.changed.disconnect(m),b.dispose()}))},isEnabled:()=>ge.isEnabledAndSingleSelected(s,o)})},autoStart:!0},te={id:"@jupyterlab/notebook-extension:code-console",description:"Adds the notebook code consoles features.",requires:[v.INotebookTracker,y.ITranslator],activate:function(e,t,o){const n=o.load("jupyterlab"),{commands:l,shell:a}=e,r=()=>ge.isEnabled(a,t);l.addCommand(D.createConsole,{label:n.__("New Console for Notebook"),execute:e=>{const o=t.currentWidget;if(o)return ge.createConsole(l,o,e.activate)},isEnabled:r}),l.addCommand(D.runInConsole,{label:n.__("Run Selected Text or Current Line in Console"),execute:async e=>{var o,n;const a=t.currentWidget;if(!a)return;const{context:r,content:d}=a,i=d.activeCell,s=null==i?void 0:i.model.metadata,c=r.path;if(!i||"code"!==i.model.type)return;let u;const b=i.editor;if(!b)return;const m=b.getSelection(),{start:p,end:g}=m;if(p.column!==g.column||p.line!==g.line){const e=b.getOffsetAt(m.start),t=b.getOffsetAt(m.end);u=b.model.sharedModel.getSource().substring(e,t)}else{const e=b.getCursorPosition(),t=b.model.sharedModel.getSource().split("\n");let l=m.start.line;for(;l<b.lineCount&&!t[l].replace(/\s/g,"").length;)l+=1;let r=l>0,d=0,i=d+1;for(;;){u=t.slice(d,i).join("\n");const s=await(null===(n=null===(o=a.context.sessionContext.session)||void 0===o?void 0:o.kernel)||void 0===n?void 0:n.requestIsComplete({code:u+"\n\n"}));if("complete"===(null==s?void 0:s.content.status)){if(l<i){for(;i<b.lineCount&&!t[i].replace(/\s/g,"").length;)i+=1;b.setCursorPosition({line:i,column:e.column});break}d=i,i=d+1}else if(i<b.lineCount)i+=1;else{if(!r){for(u=t[l];l+1<b.lineCount&&!t[l+1].replace(/\s/g,"").length;)l+=1;b.setCursorPosition({line:l+1,column:e.column});break}d=l,i=l+1,r=!1}}}u&&(await l.execute("console:open",{activate:!1,insertMode:"split-bottom",path:c}),await l.execute("console:inject",{activate:!1,code:u,path:c,metadata:s}))},isEnabled:r})},autoStart:!0},oe={id:"@jupyterlab/notebook-extension:copy-output",description:"Adds the copy cell outputs feature.",activate:function(e,t,o){const n=t.load("jupyterlab");e.commands.addCommand(D.copyToClipboard,{label:n.__("Copy Output to Clipboard"),execute:e=>{var t;const n=null===(t=o.currentWidget)||void 0===t?void 0:t.content.activeCell;if(null==n)return;const l=n.outputArea.outputTracker.currentWidget;if(null==l)return;const a=l.node.getElementsByClassName("jp-OutputArea-output");a.length>0&&function(e){const t=window.getSelection();if(null==t)return;const o=[];for(let e=0;e<t.rangeCount;++e)o[e]=t.getRangeAt(e).cloneRange();const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges(),o.forEach((e=>t.addRange(e)))}(a[0])}}),e.contextMenu.addItem({command:D.copyToClipboard,selector:".jp-OutputArea-child",rank:0})},requires:[y.ITranslator,v.INotebookTracker],autoStart:!0},ne={id:"@jupyterlab/notebook-extension:kernel-status",description:"Adds the notebook kernel status.",activate:(e,t,o)=>{o.addSessionProvider((e=>e&&t.has(e)?e.sessionContext:null))},requires:[v.INotebookTracker,l.IKernelStatusModel],autoStart:!0},le={id:"@jupyterlab/notebook-extension:cursor-position",description:"Adds the notebook cursor position status.",activate:(e,t,o)=>{let n=null;o.addEditorProvider((async e=>{let l=null;if(e!==n){if(null==n||n.content.activeCellChanged.disconnect(o.update),n=null,e&&t.has(e)){e.content.activeCellChanged.connect(o.update);const t=e.content.activeCell;l=null,t&&(await t.ready,l=t.editor),n=e}}else if(e){const t=e.content.activeCell;l=null,t&&(await t.ready,l=t.editor)}return l}))},requires:[v.INotebookTracker,r.IPositionModel],autoStart:!0},ae={id:"@jupyterlab/notebook-extension:completer",description:"Adds the code completion capability to notebooks.",requires:[v.INotebookTracker],optional:[s.ICompletionProviderManager,y.ITranslator,l.ISanitizer],activate:function(e,t,o,n,a){if(!o)return;const r=(null!=n?n:y.nullTranslator).load("jupyterlab"),d=null!=a?a:new l.Sanitizer;e.commands.addCommand(D.invokeCompleter,{label:r.__("Display the completion helper."),execute:e=>{var n;const l=t.currentWidget;l&&"code"===(null===(n=l.content.activeCell)||void 0===n?void 0:n.model.type)&&o.invoke(l.id)}}),e.commands.addCommand(D.selectCompleter,{label:r.__("Select the completion suggestion."),execute:()=>{const e=t.currentWidget&&t.currentWidget.id;if(e)return o.select(e)}}),e.commands.addKeyBinding({command:D.selectCompleter,keys:["Enter"],selector:".jp-Notebook .jp-mod-completer-active"});const i=async(e,t)=>{var n,l;const a={editor:null!==(l=null===(n=t.content.activeCell)||void 0===n?void 0:n.editor)&&void 0!==l?l:null,session:t.sessionContext.session,widget:t,sanitizer:d};await o.updateCompleter(a),t.content.activeCellChanged.connect(((e,n)=>{null==n||n.ready.then((()=>{const e={editor:n.editor,session:t.sessionContext.session,widget:t,sanitizer:d};return o.updateCompleter(e)})).catch(console.error)})),t.sessionContext.sessionChanged.connect((()=>{var e;null===(e=t.content.activeCell)||void 0===e||e.ready.then((()=>{var e,n;const l={editor:null!==(n=null===(e=t.content.activeCell)||void 0===e?void 0:e.editor)&&void 0!==n?n:null,session:t.sessionContext.session,widget:t};return o.updateCompleter(l)})).catch(console.error)}))};t.widgetAdded.connect(i),o.activeProvidersChanged.connect((()=>{t.forEach((e=>{i(0,e).catch((e=>console.error(e)))}))}))},autoStart:!0},re={id:"@jupyterlab/notebook-extension:search",description:"Adds search capability to notebooks.",requires:[b.ISearchProviderRegistry],autoStart:!0,activate:(e,t)=>{t.add("jp-notebookSearchProvider",v.NotebookSearchProvider)}},de={id:"@jupyterlab/notebook-extension:toc",description:"Adds table of content capability to the notebooks",requires:[v.INotebookTracker,A.ITableOfContentsRegistry,l.ISanitizer],optional:[f.IMarkdownParser,w.ISettingRegistry],autoStart:!0,activate:(e,t,o,n,l,a)=>{const r=new v.NotebookToCFactory(t,l,n);o.add(r),a&&Promise.all([e.restored,a.load($.id)]).then((([e,t])=>{const o=()=>{var e;r.scrollToTop=null===(e=t.composite.scrollHeadingToTop)||void 0===e||e};o(),t.changed.connect(o)})).catch((e=>{console.error("Failed to load notebook table of content settings.",e)}))}},ie={id:"@jupyterlab/notebook-extension:language-server",description:"Adds language server capability to the notebooks.",requires:[v.INotebookTracker,g.ILSPDocumentConnectionManager,g.ILSPFeatureManager,g.ILSPCodeExtractorsManager,g.IWidgetLSPAdapterTracker],activate:function(e,t,o,n,l,a){t.widgetAdded.connect((async(e,t)=>{const r=new v.NotebookAdapter(t,{connectionManager:o,featureManager:n,foreignCodeExtractorsManager:l});a.add(r)}))},autoStart:!0},se={id:"@jupyterlab/notebook-extension:update-raw-mimetype",description:"Adds metadata form editor for raw cell mimetype.",autoStart:!0,requires:[v.INotebookTracker,k.IMetadataFormProvider,y.ITranslator],activate:(e,t,o,n)=>{const l=n.load("jupyterlab");let a=!1;t.widgetAdded.connect((async function r(){if(a)return;if(!o.get("commonToolsSection"))return;const d=o.get("commonToolsSection").getProperties("/raw_mimetype");if(!d)return;t.widgetAdded.disconnect(r),a=!0;const i=e.serviceManager,s=await i.nbconvert.getExportFormats(!1);if(!s)return;const c=Object.keys(s),u=ge.getFormatLabels(n);c.forEach((function(e){var t;if(!((null===(t=d.oneOf)||void 0===t?void 0:t.filter((t=>t.const===e)).length)>0)){const t=l.__(e[0].toUpperCase()+e.substr(1)),o=u[e]?u[e]:t,n=s[e].output_mimetype;d.oneOf.push({const:n,title:o})}})),o.get("commonToolsSection").setProperties("/raw_mimetype",d)}))}},ce={id:"@jupyterlab/notebook-extension:metadata-editor",description:"Adds metadata form for full metadata editor.",autoStart:!0,requires:[v.INotebookTracker,r.IEditorServices,S.IFormRendererRegistry],optional:[y.ITranslator],activate:(e,t,o,n,l)=>{const a=e=>o.factoryService.newInlineEditor(e),r={fieldRenderer:e=>new K({editorFactory:a,tracker:t,label:"Cell metadata",translator:l}).render(e)};n.addRenderer("@jupyterlab/notebook-extension:metadata-editor.cell-metadata",r);const d={fieldRenderer:e=>new F({editorFactory:a,tracker:t,label:"Notebook metadata",translator:l}).render(e)};n.addRenderer("@jupyterlab/notebook-extension:metadata-editor.notebook-metadata",d)}},ue={id:"@jupyterlab/notebook-extension:active-cell-tool",description:"Adds active cell field in the metadata editor tab.",autoStart:!0,requires:[v.INotebookTracker,S.IFormRendererRegistry,i.IEditorLanguageRegistry],activate:(e,t,o,n)=>{const l={fieldRenderer:e=>new L({tracker:t,languages:n}).render(e)};o.addRenderer("@jupyterlab/notebook-extension:active-cell-tool.renderer",l)}},be=[J,$,G,X,z,Y,Q,Z,B,ee,te,oe,ne,le,ae,re,de,ie,se,ce,ue];function me(e,t,o){const n=e.currentWidget;return!1!==o.activate&&n&&t.activateById(n.id),n}function pe(e,t,o,n,r,d){const i=o.load("jupyterlab"),{commands:s,shell:c}=e,u=()=>ge.isEnabledAndSingleSelected(c,t);t.currentChanged.connect(((e,t)=>{var o,n;(null===(n=null===(o=null==t?void 0:t.content)||void 0===o?void 0:o.model)||void 0===n?void 0:n.cells)&&(t.content.model.cells.changed.connect(((e,o)=>{(e=>{var t,o;for(const n of e.widgets)n instanceof a.MarkdownCell&&n.headingCollapsed&&v.NotebookActions.setHeadingCollapse(n,!0,e),n.model.id===(null===(o=null===(t=e.activeCell)||void 0===t?void 0:t.model)||void 0===o?void 0:o.id)&&v.NotebookActions.expandParent(n,e)})(t.content)})),t.content.activeCellChanged.connect(((e,t)=>{v.NotebookActions.expandParent(t,e)})))})),t.selectionChanged.connect((()=>{s.notifyCommandChanged(D.duplicateBelow),s.notifyCommandChanged(D.deleteCell),s.notifyCommandChanged(D.copy),s.notifyCommandChanged(D.cut),s.notifyCommandChanged(D.pasteBelow),s.notifyCommandChanged(D.pasteAbove),s.notifyCommandChanged(D.pasteAndReplace),s.notifyCommandChanged(D.moveUp),s.notifyCommandChanged(D.moveDown),s.notifyCommandChanged(D.run),s.notifyCommandChanged(D.runAll),s.notifyCommandChanged(D.runAndAdvance),s.notifyCommandChanged(D.runAndInsert)})),t.activeCellChanged.connect((()=>{s.notifyCommandChanged(D.moveUp),s.notifyCommandChanged(D.moveDown)})),s.addCommand(D.runAndAdvance,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Run Selected Cell","Run Selected Cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Run this cell and advance","Run these %1 cells and advance",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.runAndAdvance(t,e.sessionContext,n,o)}},isEnabled:e=>!!e.toolbar||d(),icon:e=>e.toolbar?S.runIcon:void 0}),s.addCommand(D.run,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Run Selected Cell and Do not Advance","Run Selected Cells and Do not Advance",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.run(t,e.sessionContext,n,o)}},isEnabled:d}),s.addCommand(D.runAndInsert,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Run Selected Cell and Insert Below","Run Selected Cells and Insert Below",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.runAndInsert(t,e.sessionContext,n,o)}},isEnabled:d}),s.addCommand(D.runAll,{label:i.__("Run All Cells"),caption:i.__("Run all cells"),execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.runAll(t,e.sessionContext,n,o)}},isEnabled:d}),s.addCommand(D.runAllAbove,{label:i.__("Run All Above Selected Cell"),execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.runAllAbove(t,e.sessionContext,n,o)}},isEnabled:()=>u()&&0!==t.currentWidget.content.activeCellIndex}),s.addCommand(D.runAllBelow,{label:i.__("Run Selected Cell and All Below"),execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.runAllBelow(t,e.sessionContext,n,o)}},isEnabled:()=>u()&&t.currentWidget.content.activeCellIndex!==t.currentWidget.content.widgets.length-1}),s.addCommand(D.renderAllMarkdown,{label:i.__("Render All Markdown Cells"),execute:e=>{const o=me(t,c,e);if(o){const{content:e}=o;return v.NotebookActions.renderAllMarkdown(e)}},isEnabled:d}),s.addCommand(D.restart,{label:i.__("Restart Kernel…"),caption:i.__("Restart the kernel"),execute:e=>{const o=me(t,c,e);if(o)return n.restart(o.sessionContext)},isEnabled:e=>!!e.toolbar||d(),icon:e=>e.toolbar?S.refreshIcon:void 0}),s.addCommand(D.shutdown,{label:i.__("Shut Down Kernel"),execute:e=>{const o=me(t,c,e);if(o)return o.context.sessionContext.shutdown()},isEnabled:d}),s.addCommand(D.closeAndShutdown,{label:i.__("Close and Shut Down Notebook"),execute:e=>{const o=me(t,c,e);if(!o)return;const n=o.title.label;return(0,l.showDialog)({title:i.__("Shut down the notebook?"),body:i.__('Are you sure you want to close "%1"?',n),buttons:[l.Dialog.cancelButton(),l.Dialog.warnButton()]}).then((e=>{if(e.button.accept)return s.execute(D.shutdown,{activate:!1}).then((()=>{o.dispose()}))}))},isEnabled:d}),s.addCommand(D.trust,{label:()=>i.__("Trust Notebook"),execute:e=>{const o=me(t,c,e);if(o){const{context:e,content:t}=o;return v.NotebookActions.trust(t).then((()=>e.save()))}},isEnabled:d}),s.addCommand(D.restartClear,{label:i.__("Restart Kernel and Clear Outputs of All Cells…"),caption:i.__("Restart the kernel and clear all outputs of all cells"),execute:async()=>{await s.execute(D.restart,{activate:!1})&&await s.execute(D.clearAllOutputs)},isEnabled:d}),s.addCommand(D.restartAndRunToSelected,{label:i.__("Restart Kernel and Run up to Selected Cell…"),execute:async e=>{const l=me(t,c,{activate:!1,...e});if(!l)return;const{context:a,content:r}=l,d=r.widgets.slice(0,r.activeCellIndex+1);return await n.restart(l.sessionContext)?v.NotebookActions.runCells(r,d,a.sessionContext,n,o):void 0},isEnabled:u}),s.addCommand(D.restartRunAll,{label:i.__("Restart Kernel and Run All Cells…"),caption:i.__("Restart the kernel and run all cells"),execute:async e=>{const l=me(t,c,{activate:!1,...e});if(!l)return;const{context:a,content:r}=l,d=r.widgets;return await n.restart(l.sessionContext)?v.NotebookActions.runCells(r,d,a.sessionContext,n,o):void 0},isEnabled:e=>!!e.toolbar||d(),icon:e=>e.toolbar?S.fastForwardIcon:void 0}),s.addCommand(D.clearAllOutputs,{label:i.__("Clear Outputs of All Cells"),caption:i.__("Clear all outputs of all cells"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.clearAllOutputs(o.content)},isEnabled:d}),s.addCommand(D.clearOutputs,{label:i.__("Clear Cell Output"),caption:i.__("Clear outputs for the selected cells"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.clearOutputs(o.content)},isEnabled:d}),s.addCommand(D.interrupt,{label:i.__("Interrupt Kernel"),caption:i.__("Interrupt the kernel"),execute:e=>{var o;const n=me(t,c,e);if(!n)return;const l=null===(o=n.context.sessionContext.session)||void 0===o?void 0:o.kernel;return l?l.interrupt():void 0},isEnabled:e=>!!e.toolbar||d(),icon:e=>e.toolbar?S.stopIcon:void 0}),s.addCommand(D.toCode,{label:i.__("Change to Code Cell Type"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.changeCellType(o.content,"code")},isEnabled:d}),s.addCommand(D.toMarkdown,{label:i.__("Change to Markdown Cell Type"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.changeCellType(o.content,"markdown")},isEnabled:d}),s.addCommand(D.toRaw,{label:i.__("Change to Raw Cell Type"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.changeCellType(o.content,"raw")},isEnabled:d}),s.addCommand(D.cut,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Cut Cell","Cut Cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Cut this cell","Cut these %1 cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.cut(o.content)},icon:e=>e.toolbar?S.cutIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.copy,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Copy Cell","Copy Cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Copy this cell","Copy these %1 cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.copy(o.content)},icon:e=>e.toolbar?S.copyIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.pasteBelow,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Paste Cell Below","Paste Cells Below",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Paste this cell from the clipboard","Paste these %1 cells from the clipboard",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.paste(o.content,"below")},icon:e=>e.toolbar?S.pasteIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.pasteAbove,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Paste Cell Above","Paste Cells Above",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Paste this cell from the clipboard","Paste these %1 cells from the clipboard",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.paste(o.content,"above")},isEnabled:d}),s.addCommand(D.duplicateBelow,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Duplicate Cell Below","Duplicate Cells Below",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Create a duplicate of this cell below","Create duplicates of %1 cells below",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);o&&v.NotebookActions.duplicate(o.content,"belowSelected")},icon:e=>e.toolbar?S.duplicateIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.pasteAndReplace,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Paste Cell and Replace","Paste Cells and Replace",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.paste(o.content,"replace")},isEnabled:d}),s.addCommand(D.deleteCell,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Delete Cell","Delete Cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Delete this cell","Delete these %1 cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.deleteCells(o.content)},isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.split,{label:i.__("Split Cell"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.splitCell(o.content)},isEnabled:d}),s.addCommand(D.merge,{label:i.__("Merge Selected Cells"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.mergeCells(o.content)},isEnabled:d}),s.addCommand(D.mergeAbove,{label:i.__("Merge Cell Above"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.mergeCells(o.content,!0)},isEnabled:d}),s.addCommand(D.mergeBelow,{label:i.__("Merge Cell Below"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.mergeCells(o.content,!1)},isEnabled:d}),s.addCommand(D.insertAbove,{label:i.__("Insert Cell Above"),caption:i.__("Insert a cell above"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.insertAbove(o.content)},icon:e=>e.toolbar?S.addAboveIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.insertBelow,{label:i.__("Insert Cell Below"),caption:i.__("Insert a cell below"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.insertBelow(o.content)},icon:e=>e.toolbar?S.addBelowIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.selectAbove,{label:i.__("Select Cell Above"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectAbove(o.content)},isEnabled:d}),s.addCommand(D.selectBelow,{label:i.__("Select Cell Below"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectBelow(o.content)},isEnabled:d}),s.addCommand(D.insertHeadingAbove,{label:i.__("Insert Heading Above Current Heading"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.insertSameLevelHeadingAbove(o.content)},isEnabled:d}),s.addCommand(D.insertHeadingBelow,{label:i.__("Insert Heading Below Current Heading"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.insertSameLevelHeadingBelow(o.content)},isEnabled:d}),s.addCommand(D.selectHeadingAboveOrCollapse,{label:i.__("Select Heading Above or Collapse Heading"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectHeadingAboveOrCollapseHeading(o.content)},isEnabled:d}),s.addCommand(D.selectHeadingBelowOrExpand,{label:i.__("Select Heading Below or Expand Heading"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectHeadingBelowOrExpandHeading(o.content)},isEnabled:d}),s.addCommand(D.extendAbove,{label:i.__("Extend Selection Above"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.extendSelectionAbove(o.content)},isEnabled:d}),s.addCommand(D.extendTop,{label:i.__("Extend Selection to Top"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.extendSelectionAbove(o.content,!0)},isEnabled:d}),s.addCommand(D.extendBelow,{label:i.__("Extend Selection Below"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.extendSelectionBelow(o.content)},isEnabled:d}),s.addCommand(D.extendBottom,{label:i.__("Extend Selection to Bottom"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.extendSelectionBelow(o.content,!0)},isEnabled:d}),s.addCommand(D.selectAll,{label:i.__("Select All Cells"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectAll(o.content)},isEnabled:d}),s.addCommand(D.deselectAll,{label:i.__("Deselect All Cells"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.deselectAll(o.content)},isEnabled:d}),s.addCommand(D.moveUp,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Move Cell Up","Move Cells Up",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Move this cell up","Move these %1 cells up",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);o&&(v.NotebookActions.moveUp(o.content),ge.raiseSilentNotification(i.__("Notebook cell shifted up successfully"),o.node))},isEnabled:e=>{const o=me(t,c,{...e,activate:!1});return!!o&&o.content.activeCellIndex>=1},icon:e=>e.toolbar?S.moveUpIcon:void 0}),s.addCommand(D.moveDown,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Move Cell Down","Move Cells Down",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Move this cell down","Move these %1 cells down",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);o&&(v.NotebookActions.moveDown(o.content),ge.raiseSilentNotification(i.__("Notebook cell shifted down successfully"),o.node))},isEnabled:e=>{const o=me(t,c,{...e,activate:!1});if(!o||!o.content.model)return!1;const n=o.content.model.cells.length;return o.content.activeCellIndex<n-1},icon:e=>e.toolbar?S.moveDownIcon:void 0}),s.addCommand(D.toggleAllLines,{label:i.__("Show Line Numbers"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.toggleAllLineNumbers(o.content)},isEnabled:d,isToggled:e=>{const o=me(t,c,{...e,activate:!1});if(o){const e=o.content.editorConfig;return!!(e.code.lineNumbers&&e.markdown.lineNumbers&&e.raw.lineNumbers)}return!1}}),s.addCommand(D.commandMode,{label:i.__("Enter Command Mode"),execute:e=>{const o=me(t,c,e);o&&(o.content.mode="command")},isEnabled:d}),s.addCommand(D.editMode,{label:i.__("Enter Edit Mode"),execute:e=>{const o=me(t,c,e);o&&(o.content.mode="edit")},isEnabled:d}),s.addCommand(D.undoCellAction,{label:i.__("Undo Cell Operation"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.undo(o.content)},isEnabled:d}),s.addCommand(D.redoCellAction,{label:i.__("Redo Cell Operation"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.redo(o.content)},isEnabled:d}),s.addCommand(D.redo,{label:i.__("Redo"),execute:e=>{var o;const n=me(t,c,e);if(n){const e=n.content.activeCell;if(e)return e.inputHidden=!1,null===(o=e.editor)||void 0===o?void 0:o.redo()}}}),s.addCommand(D.undo,{label:i.__("Undo"),execute:e=>{var o;const n=me(t,c,e);if(n){const e=n.content.activeCell;if(e)return e.inputHidden=!1,null===(o=e.editor)||void 0===o?void 0:o.undo()}}}),s.addCommand(D.changeKernel,{label:i.__("Change Kernel…"),execute:e=>{const o=me(t,c,e);if(o)return n.selectKernel(o.context.sessionContext)},isEnabled:d}),s.addCommand(D.getKernel,{label:i.__("Get Kernel"),execute:e=>{var o;const n=me(t,c,{activate:!1,...e});if(n)return null===(o=n.sessionContext.session)||void 0===o?void 0:o.kernel},isEnabled:d}),s.addCommand(D.reconnectToKernel,{label:i.__("Reconnect to Kernel"),execute:e=>{var o;const n=me(t,c,e);if(!n)return;const l=null===(o=n.context.sessionContext.session)||void 0===o?void 0:o.kernel;return l?l.reconnect():void 0},isEnabled:d}),s.addCommand(D.markdown1,{label:i.__("Change to Heading 1"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,1)},isEnabled:d}),s.addCommand(D.markdown2,{label:i.__("Change to Heading 2"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,2)},isEnabled:d}),s.addCommand(D.markdown3,{label:i.__("Change to Heading 3"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,3)},isEnabled:d}),s.addCommand(D.markdown4,{label:i.__("Change to Heading 4"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,4)},isEnabled:d}),s.addCommand(D.markdown5,{label:i.__("Change to Heading 5"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,5)},isEnabled:d}),s.addCommand(D.markdown6,{label:i.__("Change to Heading 6"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,6)},isEnabled:d}),s.addCommand(D.hideCode,{label:i.__("Collapse Selected Code"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.hideCode(o.content)},isEnabled:d}),s.addCommand(D.showCode,{label:i.__("Expand Selected Code"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.showCode(o.content)},isEnabled:d}),s.addCommand(D.hideAllCode,{label:i.__("Collapse All Code"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.hideAllCode(o.content)},isEnabled:d}),s.addCommand(D.showAllCode,{label:i.__("Expand All Code"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.showAllCode(o.content)},isEnabled:d}),s.addCommand(D.hideOutput,{label:i.__("Collapse Selected Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.hideOutput(o.content)},isEnabled:d}),s.addCommand(D.showOutput,{label:i.__("Expand Selected Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.showOutput(o.content)},isEnabled:d}),s.addCommand(D.hideAllOutputs,{label:i.__("Collapse All Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.hideAllOutputs(o.content)},isEnabled:d}),s.addCommand(D.toggleRenderSideBySideCurrentNotebook,{label:i.__("Render Side-by-Side"),execute:e=>{const o=me(t,c,e);if(o)return"side-by-side"===o.content.renderingLayout?v.NotebookActions.renderDefault(o.content):v.NotebookActions.renderSideBySide(o.content)},isEnabled:d,isToggled:e=>{const o=me(t,c,{...e,activate:!1});return!!o&&"side-by-side"===o.content.renderingLayout}}),s.addCommand(D.showAllOutputs,{label:i.__("Expand All Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.showAllOutputs(o.content)},isEnabled:d}),s.addCommand(D.enableOutputScrolling,{label:i.__("Enable Scrolling for Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.enableOutputScrolling(o.content)},isEnabled:d}),s.addCommand(D.disableOutputScrolling,{label:i.__("Disable Scrolling for Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.disableOutputScrolling(o.content)},isEnabled:d}),s.addCommand(D.selectLastRunCell,{label:i.__("Select current running or last run cell"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectLastRunCell(o.content)},isEnabled:d}),s.addCommand(D.replaceSelection,{label:i.__("Replace Selection in Notebook Cell"),execute:e=>{const o=me(t,c,e),n=e.text||"";if(o)return v.NotebookActions.replaceSelection(o.content,n)},isEnabled:d}),s.addCommand(D.toggleCollapseCmd,{label:i.__("Toggle Collapse Notebook Heading"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.toggleCurrentHeadingCollapse(o.content)},isEnabled:()=>ge.isEnabledAndHeadingSelected(c,t)}),s.addCommand(D.collapseAllCmd,{label:i.__("Collapse All Headings"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.collapseAllHeadings(o.content)}}),s.addCommand(D.expandAllCmd,{label:i.__("Expand All Headings"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.expandAllHeadings(o.content)}}),s.addCommand(D.tocRunCells,{label:i.__("Select and Run Cell(s) for this Heading"),execute:e=>{const l=me(t,c,{activate:!1,...e});if(null===l)return;const r=l.content.activeCell;let d=l.content.activeCellIndex;if(r instanceof a.MarkdownCell){const e=l.content.widgets,t=r.headingInfo.level;for(let o=l.content.activeCellIndex+1;o<e.length;o++){const n=e[o];if(n instanceof a.MarkdownCell&&n.headingInfo.level>=0&&n.headingInfo.level<=t)break;d=o}}l.content.extendContiguousSelectionTo(d),v.NotebookActions.run(l.content,l.sessionContext,n,o)}}),s.addCommand(D.accessPreviousHistory,{label:i.__("Access Previous Kernel History Entry"),execute:async e=>{const o=me(t,c,e);if(o)return await v.NotebookActions.accessPreviousHistory(o.content)}}),s.addCommand(D.accessNextHistory,{label:i.__("Access Next Kernel History Entry"),execute:async e=>{const o=me(t,c,e);if(o)return await v.NotebookActions.accessNextHistory(o.content)}}),s.addCommand(D.virtualScrollbar,{label:i.__("Virtual Scrollbar"),caption:i.__("Toggle virtual scrollbar (enabled with windowing mode: full)"),execute:e=>{const o=me(t,c,e);o&&(o.content.scrollbar=!o.content.scrollbar)},icon:e=>e.toolbar?S.tableRowsIcon:void 0,isEnabled:e=>{var t;return(!!e.toolbar||d())&&null!==(t="full"===(null==r?void 0:r.composite.windowingMode))&&void 0!==t&&t},isVisible:e=>{var t;return(!!e.toolbar||d())&&null!==(t="full"===(null==r?void 0:r.composite.windowingMode))&&void 0!==t&&t}})}var ge;!function(e){e.createConsole=function(e,t,o){const n={path:t.context.path,preferredLanguage:t.context.model.defaultKernelLanguage,activate:o,ref:t.id,insertMode:"split-bottom",type:"Linked Console"};return e.execute("console:create",n)},e.isEnabled=function(e,t){return null!==t.currentWidget&&t.currentWidget===e.currentWidget},e.isEnabledAndSingleSelected=function(t,o){if(!e.isEnabled(t,o))return!1;const{content:n}=o.currentWidget,l=n.activeCellIndex;for(let e=0;e<n.widgets.length;++e)if(n.isSelected(n.widgets[e])&&e!==l)return!1;return!0},e.isEnabledAndHeadingSelected=function(t,o){if(!e.isEnabled(t,o))return!1;const{content:n}=o.currentWidget,l=n.activeCellIndex;if(!(n.activeCell instanceof a.MarkdownCell))return!1;for(let e=0;e<n.widgets.length;++e)if(n.isSelected(n.widgets[e])&&e!==l)return!1;return!0},e.getFormatLabels=function(e){const t=(e=e||y.nullTranslator).load("jupyterlab");return{html:t.__("HTML"),latex:t.__("LaTeX"),markdown:t.__("Markdown"),pdf:t.__("PDF"),rst:t.__("ReStructured Text"),script:t.__("Executable Script"),slides:t.__("Reveal.js Slides")}},e.raiseSilentNotification=function(e,t){const o=`sr-message-container-${t.id}`,n=document.getElementById(o)||document.createElement("div");n.getAttribute("id")!==o&&(n.classList.add("sr-only"),n.setAttribute("id",o),n.setAttribute("role","alert"),n.hidden=!0,t.appendChild(n)),n.innerText=e};class t extends T.Panel{constructor(e){super(),this._cell=null;const t=(e.translator||y.nullTranslator).load("jupyterlab");this._notebook=e.notebook,this._index=void 0!==e.index?e.index:-1,this._cell=e.cell||null,this.id=`LinkedOutputView-${N.UUID.uuid4()}`,this.title.label="Output View",this.title.icon=S.notebookIcon,this.title.caption=this._notebook.title.label?t.__("For Notebook: %1",this._notebook.title.label):t.__("For Notebook:"),this.addClass("jp-LinkedOutputView"),this._notebook.context.ready.then((()=>{if(this._cell||(this._cell=this._notebook.content.widgets[this._index]),!this._cell||"code"!==this._cell.model.type)return void this.dispose();const e=this._cell.cloneOutputArea();this.addWidget(e)}))}get index(){return this._cell?E.ArrayExt.findFirstIndex(this._notebook.content.widgets,(e=>e===this._cell)):this._index}get path(){return this._notebook.context.path}}e.ClonedOutputArea=t}(ge||(ge={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2512],{32512:(e,t,o)=>{o.r(t),o.d(t,{commandEditItem:()=>Y,default:()=>be,executionIndicator:()=>G,exportPlugin:()=>X,notebookTrustItem:()=>Q});var n=o(49880),l=o(57797),a=o(41300),r=o(2749),d=o(74787),i=o(37682),s=o(65538),c=o(46454),u=o(83890),b=o(11404),m=o(97655),p=o(87098),g=o(94358),C=o(34127),k=o(82375),v=o(69072),h=o(14837),f=o(56761),w=o(6312),x=o(78956),_=o(22629),A=o(547),y=o(11523),S=o(52018),E=o(33625),N=o(20998),I=o(2549),M=o(49503),T=o(31516),R=o(84469),O=o(5390);const B={activate:function(e,t,o){function n(e){function t(t,n,l){if(O.KernelMessage.isDisplayDataMsg(t)||O.KernelMessage.isStreamMsg(t)||O.KernelMessage.isErrorMsg(t)||O.KernelMessage.isExecuteResultMsg(t)){const a=o.getLogger(e.context.path);a.rendermime=e.content.rendermime;const r={...t.content,output_type:t.header.msg_type};let d=n;(O.KernelMessage.isErrorMsg(t)||O.KernelMessage.isStreamMsg(t)&&"stderr"===t.content.name)&&(d=l),a.log({type:"output",data:r,level:d})}}e.context.sessionContext.iopubMessage.connect(((e,o)=>t(o,"info","info"))),e.context.sessionContext.unhandledMessage.connect(((e,o)=>t(o,"warning","error")))}o&&(t.forEach((e=>n(e))),t.widgetAdded.connect(((e,t)=>n(t))))},id:"@jupyterlab/notebook-extension:log-output",description:"Adds cell outputs log to the application logger.",requires:[v.INotebookTracker],optional:[R.ILoggerRegistry],autoStart:!0};var P=o(78156),H=o.n(P),j=o(97934);class L extends v.NotebookTools.Tool{constructor(e){super();const{languages:t}=e;this._tracker=e.tracker,this.addClass("jp-ActiveCellTool"),this.layout=new T.PanelLayout,this._inputPrompt=new a.InputPrompt,this.layout.addWidget(this._inputPrompt);const o=document.createElement("div");o.classList.add("jp-ActiveCellTool-Content");const n=o.appendChild(document.createElement("div")),l=n.appendChild(document.createElement("pre"));n.className="jp-ActiveCellTool-CellContent",this._editorEl=l,this.layout.addWidget(new T.Widget({node:o})),this._refreshDebouncer=new j.Debouncer((async()=>{var e,o;this._editorEl.innerHTML="","code"===(null===(e=this._cellModel)||void 0===e?void 0:e.type)?(this._inputPrompt.executionCount=`${null!==(o=this._cellModel.executionCount)&&void 0!==o?o:""}`,this._inputPrompt.show()):(this._inputPrompt.executionCount=null,this._inputPrompt.hide()),this._cellModel&&await t.highlight(this._cellModel.sharedModel.getSource().split("\n")[0],t.findByMIME(this._cellModel.mimeType),this._editorEl)}),150)}render(e){var t,o;const n=this._tracker.activeCell;return n&&(this._cellModel=(null==n?void 0:n.model)||null),(null===(t=this._cellModel)||void 0===t?void 0:t.sharedModel).changed.connect(this.refresh,this),null===(o=this._cellModel)||void 0===o||o.mimeTypeChanged.connect(this.refresh,this),this.refresh().then((()=>{})).catch((()=>{})),H().createElement("div",{ref:e=>null==e?void 0:e.appendChild(this.node)})}async refresh(){await this._refreshDebouncer.invoke()}}var D,W=o(50892);class K extends v.NotebookTools.MetadataEditorTool{constructor(e){super(e),this._tracker=e.tracker,this.editor.editorHostNode.addEventListener("blur",this.editor,!0),this.editor.editorHostNode.addEventListener("click",this.editor,!0),this.editor.headerNode.addEventListener("click",this.editor)}_onSourceChanged(){var e;this.editor.source&&(null===(e=this._tracker.activeCell)||void 0===e||e.model.sharedModel.setMetadata(this.editor.source.toJSON()))}render(e){var t;const o=this._tracker.activeCell;return this.editor.source=o?new W.ObservableJSON({values:o.model.metadata}):null,null===(t=this.editor.source)||void 0===t||t.changed.connect(this._onSourceChanged,this),H().createElement("div",{className:"jp-CellMetadataEditor"},H().createElement("div",{ref:e=>null==e?void 0:e.appendChild(this.node)}))}}class F extends v.NotebookTools.MetadataEditorTool{constructor(e){super(e),this._tracker=e.tracker,this.editor.editorHostNode.addEventListener("blur",this.editor,!0),this.editor.editorHostNode.addEventListener("click",this.editor,!0),this.editor.headerNode.addEventListener("click",this.editor)}_onSourceChanged(){var e,t;this.editor.source&&(null===(t=null===(e=this._tracker.currentWidget)||void 0===e?void 0:e.model)||void 0===t||t.sharedModel.setMetadata(this.editor.source.toJSON()))}render(e){var t,o;const n=this._tracker.currentWidget;return this.editor.source=n?new W.ObservableJSON({values:null===(t=n.model)||void 0===t?void 0:t.metadata}):null,null===(o=this.editor.source)||void 0===o||o.changed.connect(this._onSourceChanged,this),H().createElement("div",{className:"jp-NotebookMetadataEditor"},H().createElement("div",{ref:e=>null==e?void 0:e.appendChild(this.node)}))}}!function(e){e.createNew="notebook:create-new",e.interrupt="notebook:interrupt-kernel",e.restart="notebook:restart-kernel",e.restartClear="notebook:restart-clear-output",e.restartAndRunToSelected="notebook:restart-and-run-to-selected",e.restartRunAll="notebook:restart-run-all",e.reconnectToKernel="notebook:reconnect-to-kernel",e.changeKernel="notebook:change-kernel",e.getKernel="notebook:get-kernel",e.createConsole="notebook:create-console",e.createOutputView="notebook:create-output-view",e.clearAllOutputs="notebook:clear-all-cell-outputs",e.shutdown="notebook:shutdown-kernel",e.closeAndShutdown="notebook:close-and-shutdown",e.trust="notebook:trust",e.exportToFormat="notebook:export-to-format",e.run="notebook:run-cell",e.runAndAdvance="notebook:run-cell-and-select-next",e.runAndInsert="notebook:run-cell-and-insert-below",e.runInConsole="notebook:run-in-console",e.runAll="notebook:run-all-cells",e.runAllAbove="notebook:run-all-above",e.runAllBelow="notebook:run-all-below",e.renderAllMarkdown="notebook:render-all-markdown",e.toCode="notebook:change-cell-to-code",e.toMarkdown="notebook:change-cell-to-markdown",e.toRaw="notebook:change-cell-to-raw",e.cut="notebook:cut-cell",e.copy="notebook:copy-cell",e.pasteAbove="notebook:paste-cell-above",e.pasteBelow="notebook:paste-cell-below",e.duplicateBelow="notebook:duplicate-below",e.pasteAndReplace="notebook:paste-and-replace-cell",e.moveUp="notebook:move-cell-up",e.moveDown="notebook:move-cell-down",e.clearOutputs="notebook:clear-cell-output",e.deleteCell="notebook:delete-cell",e.insertAbove="notebook:insert-cell-above",e.insertBelow="notebook:insert-cell-below",e.selectAbove="notebook:move-cursor-up",e.selectBelow="notebook:move-cursor-down",e.selectHeadingAboveOrCollapse="notebook:move-cursor-heading-above-or-collapse",e.selectHeadingBelowOrExpand="notebook:move-cursor-heading-below-or-expand",e.insertHeadingAbove="notebook:insert-heading-above",e.insertHeadingBelow="notebook:insert-heading-below",e.extendAbove="notebook:extend-marked-cells-above",e.extendTop="notebook:extend-marked-cells-top",e.extendBelow="notebook:extend-marked-cells-below",e.extendBottom="notebook:extend-marked-cells-bottom",e.selectAll="notebook:select-all",e.deselectAll="notebook:deselect-all",e.editMode="notebook:enter-edit-mode",e.merge="notebook:merge-cells",e.mergeAbove="notebook:merge-cell-above",e.mergeBelow="notebook:merge-cell-below",e.split="notebook:split-cell-at-cursor",e.commandMode="notebook:enter-command-mode",e.toggleAllLines="notebook:toggle-all-cell-line-numbers",e.undoCellAction="notebook:undo-cell-action",e.redoCellAction="notebook:redo-cell-action",e.redo="notebook:redo",e.undo="notebook:undo",e.markdown1="notebook:change-cell-to-heading-1",e.markdown2="notebook:change-cell-to-heading-2",e.markdown3="notebook:change-cell-to-heading-3",e.markdown4="notebook:change-cell-to-heading-4",e.markdown5="notebook:change-cell-to-heading-5",e.markdown6="notebook:change-cell-to-heading-6",e.hideCode="notebook:hide-cell-code",e.showCode="notebook:show-cell-code",e.hideAllCode="notebook:hide-all-cell-code",e.showAllCode="notebook:show-all-cell-code",e.hideOutput="notebook:hide-cell-outputs",e.showOutput="notebook:show-cell-outputs",e.hideAllOutputs="notebook:hide-all-cell-outputs",e.showAllOutputs="notebook:show-all-cell-outputs",e.toggleRenderSideBySideCurrentNotebook="notebook:toggle-render-side-by-side-current",e.setSideBySideRatio="notebook:set-side-by-side-ratio",e.enableOutputScrolling="notebook:enable-output-scrolling",e.disableOutputScrolling="notebook:disable-output-scrolling",e.selectLastRunCell="notebook:select-last-run-cell",e.replaceSelection="notebook:replace-selection",e.autoClosingBrackets="notebook:toggle-autoclosing-brackets",e.toggleCollapseCmd="notebook:toggle-heading-collapse",e.collapseAllCmd="notebook:collapse-all-headings",e.expandAllCmd="notebook:expand-all-headings",e.copyToClipboard="notebook:copy-to-clipboard",e.invokeCompleter="completer:invoke-notebook",e.selectCompleter="completer:select-notebook",e.tocRunCells="toc:run-cells",e.accessPreviousHistory="notebook:access-previous-history-entry",e.accessNextHistory="notebook:access-next-history-entry",e.virtualScrollbar="notebook:toggle-virtual-scrollbar"}(D||(D={}));const U="Notebook",q=["notebook","python","custom"],V="jp-NotebookExtension-sideBySideMargins",$={id:"@jupyterlab/notebook-extension:tracker",description:"Provides the notebook widget tracker.",provides:v.INotebookTracker,requires:[v.INotebookWidgetFactory,i.IEditorExtensionRegistry],optional:[l.ICommandPalette,m.IDefaultFileBrowser,p.ILauncher,n.ILayoutRestorer,C.IMainMenu,n.IRouter,w.ISettingRegistry,l.ISessionContextDialogs,y.ITranslator,S.IFormRendererRegistry],activate:function(e,t,o,n,a,r,d,i,s,c,u,b,m){const p=null!=b?b:y.nullTranslator,g=null!=u?u:new l.SessionContextDialogs({translator:p}),C=p.load("jupyterlab"),k=e.serviceManager,{commands:h,shell:f}=e,w=new v.NotebookTracker({namespace:"notebook"});null==s||s.routed.connect((function(e,t){t.hash&&w.currentWidget&&w.currentWidget.setFragment(t.hash)}));const x=()=>ge.isEnabled(f,w),_=e=>document.documentElement.style.setProperty("--jp-side-by-side-output-size",`${e}fr`);if((c?c.load($.id):Promise.reject(new Error(`No setting registry for ${$.id}`))).then((t=>{O(t),t.changed.connect((()=>{O(t),h.notifyCommandChanged(D.virtualScrollbar)}));const n=(e,o)=>{const{newValue:n,oldValue:l}=o,a=n.autoStartDefault;"boolean"==typeof a&&a!==l.autoStartDefault&&a!==t.get("autoStartDefaultKernel").composite&&t.set("autoStartDefaultKernel",a).catch((e=>{console.error(`Failed to set ${t.id}.autoStartDefaultKernel`)}))},a=new WeakSet,r=e=>{const t=e.context.sessionContext;t.isDisposed||a.has(t)||(a.add(t),t.kernelPreferenceChanged.connect(n),t.disposed.connect((()=>{t.kernelPreferenceChanged.disconnect(n)})))};w.forEach(r),w.widgetAdded.connect(((e,t)=>{r(t)})),h.addCommand(D.autoClosingBrackets,{execute:e=>{var o;const n=t.get("codeCellConfig").composite,l=t.get("markdownCellConfig").composite,a=t.get("rawCellConfig").composite,r=n.autoClosingBrackets||l.autoClosingBrackets||a.autoClosingBrackets,d=!!(null!==(o=e.force)&&void 0!==o?o:!r);[n.autoClosingBrackets,l.autoClosingBrackets,a.autoClosingBrackets]=[d,d,d],t.set("codeCellConfig",n),t.set("markdownCellConfig",l),t.set("rawCellConfig",a)},label:C.__("Auto Close Brackets for All Notebook Cell Types"),isToggled:()=>["codeCellConfig","markdownCellConfig","rawCellConfig"].some((e=>{var n;return!0===(null!==(n=t.get(e).composite.autoClosingBrackets)&&void 0!==n?n:o.baseConfiguration.autoClosingBrackets)}))}),h.addCommand(D.setSideBySideRatio,{label:C.__("Set side-by-side ratio"),execute:e=>{l.InputDialog.getNumber({title:C.__("Width of the output in side-by-side mode"),value:t.get("sideBySideOutputRatio").composite}).then((e=>{_(e.value),e.value&&t.set("sideBySideOutputRatio",e.value)})).catch(console.error)}}),pe(e,w,p,g,t,x)})).catch((o=>{console.warn(o.message),R({editorConfig:t.editorConfig,notebookConfig:t.notebookConfig,kernelShutdown:t.shutdownOnClose,autoStartDefault:t.autoStartDefault}),pe(e,w,p,g,null,x)})),m){const e=m.getRenderer("@jupyterlab/codemirror-extension:plugin.defaultConfig");e&&(m.addRenderer("@jupyterlab/notebook-extension:tracker.codeCellConfig",e),m.addRenderer("@jupyterlab/notebook-extension:tracker.markdownCellConfig",e),m.addRenderer("@jupyterlab/notebook-extension:tracker.rawCellConfig",e))}d&&d.restore(w,{command:"docmanager:open",args:e=>({path:e.context.path,factory:U}),name:e=>e.context.path,when:k.ready});const A=e.docRegistry,E=new v.NotebookModelFactory({disableDocumentWideUndoRedo:t.notebookConfig.disableDocumentWideUndoRedo,collaborative:!0});A.addModelFactory(E),n&&function(e,t){const o=t.load("jupyterlab");let n=o.__("Notebook Operations");[D.interrupt,D.restart,D.restartClear,D.restartRunAll,D.runAll,D.renderAllMarkdown,D.runAllAbove,D.runAllBelow,D.restartAndRunToSelected,D.selectAll,D.deselectAll,D.clearAllOutputs,D.toggleAllLines,D.editMode,D.commandMode,D.changeKernel,D.reconnectToKernel,D.createConsole,D.closeAndShutdown,D.trust,D.toggleCollapseCmd,D.collapseAllCmd,D.expandAllCmd,D.accessPreviousHistory,D.accessNextHistory].forEach((t=>{e.addItem({command:t,category:n})})),e.addItem({command:D.createNew,category:n,args:{isPalette:!0}}),n=o.__("Notebook Cell Operations"),[D.run,D.runAndAdvance,D.runAndInsert,D.runInConsole,D.clearOutputs,D.toCode,D.toMarkdown,D.toRaw,D.cut,D.copy,D.pasteBelow,D.pasteAbove,D.pasteAndReplace,D.deleteCell,D.split,D.merge,D.mergeAbove,D.mergeBelow,D.insertAbove,D.insertBelow,D.selectAbove,D.selectBelow,D.selectHeadingAboveOrCollapse,D.selectHeadingBelowOrExpand,D.insertHeadingAbove,D.insertHeadingBelow,D.extendAbove,D.extendTop,D.extendBelow,D.extendBottom,D.moveDown,D.moveUp,D.undoCellAction,D.redoCellAction,D.markdown1,D.markdown2,D.markdown3,D.markdown4,D.markdown5,D.markdown6,D.hideCode,D.showCode,D.hideAllCode,D.showAllCode,D.hideOutput,D.showOutput,D.hideAllOutputs,D.showAllOutputs,D.toggleRenderSideBySideCurrentNotebook,D.setSideBySideRatio,D.enableOutputScrolling,D.disableOutputScrolling].forEach((t=>{e.addItem({command:t,category:n})}))}(n,p);let M=0;const T=e.docRegistry.getFileType("notebook");function R(e){w.forEach((t=>{t.setConfig(e)})),"full"!==e.notebookConfig.windowingMode&&w.forEach((e=>{e.content.scrollbar&&(e.content.scrollbar=!1)}))}function O(e){const o={...v.StaticNotebook.defaultEditorConfig.code,...e.get("codeCellConfig").composite},n={...v.StaticNotebook.defaultEditorConfig.markdown,...e.get("markdownCellConfig").composite},l={...v.StaticNotebook.defaultEditorConfig.raw,...e.get("rawCellConfig").composite};t.editorConfig={code:o,markdown:n,raw:l},t.notebookConfig={enableKernelInitNotification:e.get("enableKernelInitNotification").composite,showHiddenCellsButton:e.get("showHiddenCellsButton").composite,scrollPastEnd:e.get("scrollPastEnd").composite,defaultCell:e.get("defaultCell").composite,recordTiming:e.get("recordTiming").composite,overscanCount:e.get("overscanCount").composite,inputHistoryScope:e.get("inputHistoryScope").composite,maxNumberOutputs:e.get("maxNumberOutputs").composite,showEditorForReadOnlyMarkdown:e.get("showEditorForReadOnlyMarkdown").composite,disableDocumentWideUndoRedo:!e.get("documentWideUndoRedo").composite,renderingLayout:e.get("renderingLayout").composite,sideBySideLeftMarginOverride:e.get("sideBySideLeftMarginOverride").composite,sideBySideRightMarginOverride:e.get("sideBySideRightMarginOverride").composite,sideBySideOutputRatio:e.get("sideBySideOutputRatio").composite,windowingMode:e.get("windowingMode").composite,accessKernelHistory:e.get("accessKernelHistory").composite},_(t.notebookConfig.sideBySideOutputRatio);const a=`.jp-mod-sideBySide.jp-Notebook .jp-Notebook-cell {\n margin-left: ${t.notebookConfig.sideBySideLeftMarginOverride} !important;\n margin-right: ${t.notebookConfig.sideBySideRightMarginOverride} !important;`,r=document.getElementById(V);r?r.innerText=a:document.head.insertAdjacentHTML("beforeend",`<style id="${V}">${a}}</style>`),t.autoStartDefault=e.get("autoStartDefaultKernel").composite,t.shutdownOnClose=e.get("kernelShutdown").composite,E.disableDocumentWideUndoRedo=!e.get("documentWideUndoRedo").composite,R({editorConfig:t.editorConfig,notebookConfig:t.notebookConfig,kernelShutdown:t.shutdownOnClose,autoStartDefault:t.autoStartDefault})}return t.widgetCreated.connect(((e,t)=>{var o,n;t.id=t.id||"notebook-"+ ++M,t.title.icon=null==T?void 0:T.icon,t.title.iconClass=null!==(o=null==T?void 0:T.iconClass)&&void 0!==o?o:"",t.title.iconLabel=null!==(n=null==T?void 0:T.iconLabel)&&void 0!==n?n:"",t.context.pathChanged.connect((()=>{w.save(t)})),w.add(t)})),i&&function(e,t){e.editMenu.undoers.redo.add({id:D.redo,isEnabled:t}),e.editMenu.undoers.undo.add({id:D.undo,isEnabled:t}),e.editMenu.clearers.clearAll.add({id:D.clearAllOutputs,isEnabled:t}),e.editMenu.clearers.clearCurrent.add({id:D.clearOutputs,isEnabled:t}),e.fileMenu.consoleCreators.add({id:D.createConsole,isEnabled:t}),e.fileMenu.closeAndCleaners.add({id:D.closeAndShutdown,isEnabled:t}),e.kernelMenu.kernelUsers.changeKernel.add({id:D.changeKernel,isEnabled:t}),e.kernelMenu.kernelUsers.clearWidget.add({id:D.clearAllOutputs,isEnabled:t}),e.kernelMenu.kernelUsers.interruptKernel.add({id:D.interrupt,isEnabled:t}),e.kernelMenu.kernelUsers.reconnectToKernel.add({id:D.reconnectToKernel,isEnabled:t}),e.kernelMenu.kernelUsers.restartKernel.add({id:D.restart,isEnabled:t}),e.kernelMenu.kernelUsers.shutdownKernel.add({id:D.shutdown,isEnabled:t}),e.viewMenu.editorViewers.toggleLineNumbers.add({id:D.toggleAllLines,isEnabled:t}),e.runMenu.codeRunners.restart.add({id:D.restart,isEnabled:t}),e.runMenu.codeRunners.run.add({id:D.runAndAdvance,isEnabled:t}),e.runMenu.codeRunners.runAll.add({id:D.runAll,isEnabled:t}),e.helpMenu.getKernel.add({id:D.getKernel,isEnabled:t})}(i,x),h.addCommand(D.createNew,{label:e=>{var t,o,n;const l=e.kernelName||"";return e.isLauncher&&e.kernelName&&k.kernelspecs?null!==(n=null===(o=null===(t=k.kernelspecs.specs)||void 0===t?void 0:t.kernelspecs[l])||void 0===o?void 0:o.display_name)&&void 0!==n?n:"":e.isPalette||e.isContextMenu?C.__("New Notebook"):C.__("Notebook")},caption:C.__("Create a new notebook"),icon:e=>e.isPalette?void 0:S.notebookIcon,execute:e=>{var t;return(async(e,t,o)=>{const n=await h.execute("docmanager:new-untitled",{path:e,type:"notebook"});if(void 0!==n){const e=await h.execute("docmanager:open",{path:n.path,factory:U,kernel:{id:t,name:o}});return e.isUntitled=!0,e}})(e.cwd||(null!==(t=null==a?void 0:a.model.path)&&void 0!==t?t:""),e.kernelId||"",e.kernelName||"")}}),r&&k.ready.then((()=>{let e=null;const t=()=>{e&&(e.dispose(),e=null);const t=k.kernelspecs.specs;if(t){e=new I.DisposableSet;for(const o in t.kernelspecs){const n=o===t.default?0:1/0,l=t.kernelspecs[o],a=l.resources["logo-svg"]||l.resources["logo-64x64"];e.add(r.add({command:D.createNew,args:{isLauncher:!0,kernelName:o},category:C.__("Notebook"),rank:n,kernelIconUrl:a,metadata:{kernel:N.JSONExt.deepCopy(l.metadata||{})}}))}}};t(),k.kernelspecs.specsChanged.connect(t)})),w},autoStart:!0},J={id:"@jupyterlab/notebook-extension:factory",description:"Provides the notebook cell factory.",provides:v.NotebookPanel.IContentFactory,requires:[r.IEditorServices],autoStart:!0,activate:(e,t)=>{const o=t.factoryService.newInlineEditor;return new v.NotebookPanel.ContentFactory({editorFactory:o})}},z={activate:function(e,t,o,n,l,a,r){const d=a.load("jupyterlab"),i="notebook-tools",s=new v.NotebookTools({tracker:t,translator:a});return s.title.icon=S.buildIcon,s.title.caption=d.__("Notebook Tools"),s.id=i,M.MessageLoop.installMessageHook(s,((e,t)=>{switch(t.type){case"activate-request":l.save(i,{open:!0});break;case"after-hide":case"close-request":l.remove(i)}return!0})),r&&t.widgetAdded.connect(((e,t)=>{r.register(t).render(s)})),s},provides:v.INotebookTools,id:"@jupyterlab/notebook-extension:tools",description:"Provides the notebook tools.",autoStart:!0,requires:[v.INotebookTracker,r.IEditorServices,i.IEditorLanguageRegistry,x.IStateDB,y.ITranslator],optional:[h.IPropertyInspectorProvider]},Y={id:"@jupyterlab/notebook-extension:mode-status",description:"Adds a notebook mode status widget.",autoStart:!0,requires:[v.INotebookTracker,y.ITranslator],optional:[_.IStatusBar],activate:(e,t,o,n)=>{if(!n)return;const{shell:l}=e,a=new v.CommandEditStatus(o);t.currentChanged.connect((()=>{const e=t.currentWidget;a.model.notebook=e&&e.content})),n.registerStatusItem("@jupyterlab/notebook-extension:mode-status",{priority:1,item:a,align:"right",rank:4,isActive:()=>!!l.currentWidget&&!!t.currentWidget&&l.currentWidget===t.currentWidget})}},G={id:"@jupyterlab/notebook-extension:execution-indicator",description:"Adds a notebook execution status widget.",autoStart:!0,requires:[v.INotebookTracker,n.ILabShell,y.ITranslator],optional:[_.IStatusBar,w.ISettingRegistry],activate:(e,t,o,n,l,a)=>{let r,d,i;const s=e=>{var a,s;let{showOnToolBar:c,showProgress:u}=e;if(c)i&&(o.currentChanged.disconnect(d),i.dispose());else{if(!l)return;(null==r?void 0:r.model)||(r=new v.ExecutionIndicator(n),d=(e,o)=>{const{newValue:n}=o;if(n&&t.has(n)){const e=n;r.model.attachNotebook({content:e.content,context:e.sessionContext})}},i=l.registerStatusItem("@jupyterlab/notebook-extension:execution-indicator",{item:r,align:"left",rank:3,isActive:()=>{const e=o.currentWidget;return!!e&&t.has(e)}}),r.model.attachNotebook({content:null===(a=t.currentWidget)||void 0===a?void 0:a.content,context:null===(s=t.currentWidget)||void 0===s?void 0:s.sessionContext}),o.currentChanged.connect(d),r.disposed.connect((()=>{o.currentChanged.disconnect(d)}))),r.model.displayOption={showOnToolBar:c,showProgress:u}}};if(a){const t=a.load($.id);Promise.all([t,e.restored]).then((([e])=>{s(v.ExecutionIndicator.getSettingValue(e)),e.changed.connect((e=>s(v.ExecutionIndicator.getSettingValue(e))))})).catch((e=>{console.error(e.message)}))}}},X={id:"@jupyterlab/notebook-extension:export",description:"Adds the export notebook commands.",autoStart:!0,requires:[y.ITranslator,v.INotebookTracker],optional:[C.IMainMenu,l.ICommandPalette],activate:(e,t,o,n,l)=>{var a;const r=t.load("jupyterlab"),{commands:i,shell:s}=e,c=e.serviceManager;let u;i.addCommand(D.exportToFormat,{label:e=>{if(void 0===e.label)return r.__("Save and Export Notebook to the given `format`.");const t=e.label;return e.isPalette?r.__("Save and Export Notebook: %1",t):t},execute:e=>{const t=me(o,s,e);if(!t)return;const n=d.PageConfig.getNBConvertURL({format:e.format,download:!0,path:t.context.path}),{context:l}=t;return l.model.dirty&&!l.model.readOnly?l.save().then((()=>{window.open(n,"_blank","noopener")})):new Promise((e=>{window.open(n,"_blank","noopener"),e(void 0)}))},isEnabled:()=>ge.isEnabled(s,o)}),n&&(u=null===(a=n.fileMenu.items.find((e=>{var t;return"submenu"===e.type&&"jp-mainmenu-file-notebookexport"===(null===(t=e.submenu)||void 0===t?void 0:t.id)})))||void 0===a?void 0:a.submenu);let b=!1;const m=async()=>{if(b)return;o.widgetAdded.disconnect(m),b=!0;const e=await c.nbconvert.getExportFormats(!1);if(!e)return;const n=ge.getFormatLabels(t);Object.keys(e).forEach((function(e){const t=r.__(e[0].toUpperCase()+e.substr(1)),o=n[e]?n[e]:t;let a={format:e,label:o,isPalette:!1};if(-1===q.indexOf(e)&&(u&&u.addItem({command:D.exportToFormat,args:a}),l)){a={format:e,label:o,isPalette:!0};const t=r.__("Notebook Operations");l.addItem({command:D.exportToFormat,category:t,args:a})}}))};o.widgetAdded.connect(m)}},Q={id:"@jupyterlab/notebook-extension:trust-status",description:"Adds the notebook trusted status widget.",autoStart:!0,requires:[v.INotebookTracker,y.ITranslator],optional:[_.IStatusBar],activate:(e,t,o,n)=>{if(!n)return;const{shell:l}=e,a=new v.NotebookTrustStatus(o);t.currentChanged.connect((()=>{const e=t.currentWidget;a.model.notebook=e&&e.content})),n.registerStatusItem("@jupyterlab/notebook-extension:trust-status",{item:a,align:"right",rank:3,isActive:()=>!!l.currentWidget&&!!t.currentWidget&&l.currentWidget===t.currentWidget})}},Z={id:"@jupyterlab/notebook-extension:widget-factory",description:"Provides the notebook widget factory.",provides:v.INotebookWidgetFactory,requires:[v.NotebookPanel.IContentFactory,r.IEditorServices,f.IRenderMimeRegistry,l.IToolbarWidgetRegistry],optional:[w.ISettingRegistry,l.ISessionContextDialogs,y.ITranslator],activate:function(e,t,o,n,a,r,i,s){const c=null!=s?s:y.nullTranslator,b=null!=i?i:new l.SessionContextDialogs({translator:c}),m=d.PageConfig.getOption("notebookStartsKernel"),p=""===m||"true"===m.toLowerCase(),{commands:g}=e;let C;a.addFactory(U,"save",(e=>u.ToolbarItems.createSaveButton(g,e.context.fileChanged))),a.addFactory(U,"cellType",(e=>v.ToolbarItems.createCellTypeItem(e,c))),a.addFactory(U,"kernelName",(e=>l.Toolbar.createKernelNameItem(e.sessionContext,b,c))),a.addFactory(U,"executionProgress",(e=>{const t=null==r?void 0:r.load($.id),o=v.ExecutionIndicator.createExecutionIndicatorItem(e,c,t);return null==t||t.then((t=>{e.disposed.connect((()=>{t.dispose()}))})),o})),r&&(C=(0,l.createToolbarFactory)(a,r,U,"@jupyterlab/notebook-extension:panel",c));const k=c.load("jupyterlab"),h=new v.NotebookWidgetFactory({name:U,label:k.__("Notebook"),fileTypes:["notebook"],modelName:"notebook",defaultFor:["notebook"],preferKernel:p,canStartKernel:!0,rendermime:n,contentFactory:t,editorConfig:v.StaticNotebook.defaultEditorConfig,notebookConfig:v.StaticNotebook.defaultNotebookConfig,mimeTypeService:o.mimeTypeService,toolbarFactory:C,translator:c});return e.docRegistry.addWidgetFactory(h),h},autoStart:!0},ee={id:"@jupyterlab/notebook-extension:cloned-outputs",description:"Adds the clone output feature.",requires:[c.IDocumentManager,v.INotebookTracker,y.ITranslator],optional:[n.ILayoutRestorer],activate:function(e,t,o,n,a){const r=n.load("jupyterlab"),d=new l.WidgetTracker({namespace:"cloned-outputs"});a&&a.restore(d,{command:D.createOutputView,args:e=>({path:e.content.path,index:e.content.index}),name:e=>`${e.content.path}:${e.content.index}`,when:o.restored});const{commands:i,shell:s}=e;i.addCommand(D.createOutputView,{label:r.__("Create New View for Cell Output"),execute:async e=>{var a;let r,i;const s=e.path;let c=e.index;if(s&&null!=c){if(i=t.findWidget(s,U),!i)return}else{if(i=o.currentWidget,!i)return;r=i.content.activeCell,c=i.content.activeCellIndex}const u=new ge.ClonedOutputArea({notebook:i,cell:r,index:c,translator:n}),b=new l.MainAreaWidget({content:u});i.context.addSibling(b,{ref:i.id,mode:"split-bottom",type:"Cloned Output"});const m=()=>{d.save(b)};i.context.pathChanged.connect(m),null===(a=i.context.model)||void 0===a||a.cells.changed.connect(m),d.add(b),i.content.disposed.connect((()=>{var e;i.context.pathChanged.disconnect(m),null===(e=i.context.model)||void 0===e||e.cells.changed.disconnect(m),b.dispose()}))},isEnabled:()=>ge.isEnabledAndSingleSelected(s,o)})},autoStart:!0},te={id:"@jupyterlab/notebook-extension:code-console",description:"Adds the notebook code consoles features.",requires:[v.INotebookTracker,y.ITranslator],activate:function(e,t,o){const n=o.load("jupyterlab"),{commands:l,shell:a}=e,r=()=>ge.isEnabled(a,t);l.addCommand(D.createConsole,{label:n.__("New Console for Notebook"),execute:e=>{const o=t.currentWidget;if(o)return ge.createConsole(l,o,e.activate)},isEnabled:r}),l.addCommand(D.runInConsole,{label:n.__("Run Selected Text or Current Line in Console"),execute:async e=>{var o,n;const a=t.currentWidget;if(!a)return;const{context:r,content:d}=a,i=d.activeCell,s=null==i?void 0:i.model.metadata,c=r.path;if(!i||"code"!==i.model.type)return;let u;const b=i.editor;if(!b)return;const m=b.getSelection(),{start:p,end:g}=m;if(p.column!==g.column||p.line!==g.line){const e=b.getOffsetAt(m.start),t=b.getOffsetAt(m.end);u=b.model.sharedModel.getSource().substring(e,t)}else{const e=b.getCursorPosition(),t=b.model.sharedModel.getSource().split("\n");let l=m.start.line;for(;l<b.lineCount&&!t[l].replace(/\s/g,"").length;)l+=1;let r=l>0,d=0,i=d+1;for(;;){u=t.slice(d,i).join("\n");const s=await(null===(n=null===(o=a.context.sessionContext.session)||void 0===o?void 0:o.kernel)||void 0===n?void 0:n.requestIsComplete({code:u+"\n\n"}));if("complete"===(null==s?void 0:s.content.status)){if(l<i){for(;i<b.lineCount&&!t[i].replace(/\s/g,"").length;)i+=1;b.setCursorPosition({line:i,column:e.column});break}d=i,i=d+1}else if(i<b.lineCount)i+=1;else{if(!r){for(u=t[l];l+1<b.lineCount&&!t[l+1].replace(/\s/g,"").length;)l+=1;b.setCursorPosition({line:l+1,column:e.column});break}d=l,i=l+1,r=!1}}}u&&(await l.execute("console:open",{activate:!1,insertMode:"split-bottom",path:c}),await l.execute("console:inject",{activate:!1,code:u,path:c,metadata:s}))},isEnabled:r})},autoStart:!0},oe={id:"@jupyterlab/notebook-extension:copy-output",description:"Adds the copy cell outputs feature.",activate:function(e,t,o){const n=t.load("jupyterlab");e.commands.addCommand(D.copyToClipboard,{label:n.__("Copy Output to Clipboard"),execute:e=>{var t;const n=null===(t=o.currentWidget)||void 0===t?void 0:t.content.activeCell;if(null==n)return;const l=n.outputArea.outputTracker.currentWidget;if(null==l)return;const a=l.node.getElementsByClassName("jp-OutputArea-output");a.length>0&&function(e){const t=window.getSelection();if(null==t)return;const o=[];for(let e=0;e<t.rangeCount;++e)o[e]=t.getRangeAt(e).cloneRange();const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges(),o.forEach((e=>t.addRange(e)))}(a[0])}}),e.contextMenu.addItem({command:D.copyToClipboard,selector:".jp-OutputArea-child",rank:0})},requires:[y.ITranslator,v.INotebookTracker],autoStart:!0},ne={id:"@jupyterlab/notebook-extension:kernel-status",description:"Adds the notebook kernel status.",activate:(e,t,o)=>{o.addSessionProvider((e=>e&&t.has(e)?e.sessionContext:null))},requires:[v.INotebookTracker,l.IKernelStatusModel],autoStart:!0},le={id:"@jupyterlab/notebook-extension:cursor-position",description:"Adds the notebook cursor position status.",activate:(e,t,o)=>{let n=null;o.addEditorProvider((async e=>{let l=null;if(e!==n){if(null==n||n.content.activeCellChanged.disconnect(o.update),n=null,e&&t.has(e)){e.content.activeCellChanged.connect(o.update);const t=e.content.activeCell;l=null,t&&(await t.ready,l=t.editor),n=e}}else if(e){const t=e.content.activeCell;l=null,t&&(await t.ready,l=t.editor)}return l}))},requires:[v.INotebookTracker,r.IPositionModel],autoStart:!0},ae={id:"@jupyterlab/notebook-extension:completer",description:"Adds the code completion capability to notebooks.",requires:[v.INotebookTracker],optional:[s.ICompletionProviderManager,y.ITranslator,l.ISanitizer],activate:function(e,t,o,n,a){if(!o)return;const r=(null!=n?n:y.nullTranslator).load("jupyterlab"),d=null!=a?a:new l.Sanitizer;e.commands.addCommand(D.invokeCompleter,{label:r.__("Display the completion helper."),execute:e=>{var n;const l=t.currentWidget;l&&"code"===(null===(n=l.content.activeCell)||void 0===n?void 0:n.model.type)&&o.invoke(l.id)}}),e.commands.addCommand(D.selectCompleter,{label:r.__("Select the completion suggestion."),execute:()=>{const e=t.currentWidget&&t.currentWidget.id;if(e)return o.select(e)}}),e.commands.addKeyBinding({command:D.selectCompleter,keys:["Enter"],selector:".jp-Notebook .jp-mod-completer-active"});const i=async(e,t)=>{var n,l;const a={editor:null!==(l=null===(n=t.content.activeCell)||void 0===n?void 0:n.editor)&&void 0!==l?l:null,session:t.sessionContext.session,widget:t,sanitizer:d};await o.updateCompleter(a),t.content.activeCellChanged.connect(((e,n)=>{null==n||n.ready.then((()=>{const e={editor:n.editor,session:t.sessionContext.session,widget:t,sanitizer:d};return o.updateCompleter(e)})).catch(console.error)})),t.sessionContext.sessionChanged.connect((()=>{var e;null===(e=t.content.activeCell)||void 0===e||e.ready.then((()=>{var e,n;const l={editor:null!==(n=null===(e=t.content.activeCell)||void 0===e?void 0:e.editor)&&void 0!==n?n:null,session:t.sessionContext.session,widget:t};return o.updateCompleter(l)})).catch(console.error)}))};t.widgetAdded.connect(i),o.activeProvidersChanged.connect((()=>{t.forEach((e=>{i(0,e).catch((e=>console.error(e)))}))}))},autoStart:!0},re={id:"@jupyterlab/notebook-extension:search",description:"Adds search capability to notebooks.",requires:[b.ISearchProviderRegistry],autoStart:!0,activate:(e,t)=>{t.add("jp-notebookSearchProvider",v.NotebookSearchProvider)}},de={id:"@jupyterlab/notebook-extension:toc",description:"Adds table of content capability to the notebooks",requires:[v.INotebookTracker,A.ITableOfContentsRegistry,l.ISanitizer],optional:[f.IMarkdownParser,w.ISettingRegistry],autoStart:!0,activate:(e,t,o,n,l,a)=>{const r=new v.NotebookToCFactory(t,l,n);o.add(r),a&&Promise.all([e.restored,a.load($.id)]).then((([e,t])=>{const o=()=>{var e;r.scrollToTop=null===(e=t.composite.scrollHeadingToTop)||void 0===e||e};o(),t.changed.connect(o)})).catch((e=>{console.error("Failed to load notebook table of content settings.",e)}))}},ie={id:"@jupyterlab/notebook-extension:language-server",description:"Adds language server capability to the notebooks.",requires:[v.INotebookTracker,g.ILSPDocumentConnectionManager,g.ILSPFeatureManager,g.ILSPCodeExtractorsManager,g.IWidgetLSPAdapterTracker],activate:function(e,t,o,n,l,a){t.widgetAdded.connect((async(e,t)=>{const r=new v.NotebookAdapter(t,{connectionManager:o,featureManager:n,foreignCodeExtractorsManager:l});a.add(r)}))},autoStart:!0},se={id:"@jupyterlab/notebook-extension:update-raw-mimetype",description:"Adds metadata form editor for raw cell mimetype.",autoStart:!0,requires:[v.INotebookTracker,k.IMetadataFormProvider,y.ITranslator],activate:(e,t,o,n)=>{const l=n.load("jupyterlab");let a=!1;t.widgetAdded.connect((async function r(){if(a)return;if(!o.get("commonToolsSection"))return;const d=o.get("commonToolsSection").getProperties("/raw_mimetype");if(!d)return;t.widgetAdded.disconnect(r),a=!0;const i=e.serviceManager,s=await i.nbconvert.getExportFormats(!1);if(!s)return;const c=Object.keys(s),u=ge.getFormatLabels(n);c.forEach((function(e){var t;if(!((null===(t=d.oneOf)||void 0===t?void 0:t.filter((t=>t.const===e)).length)>0)){const t=l.__(e[0].toUpperCase()+e.substr(1)),o=u[e]?u[e]:t,n=s[e].output_mimetype;d.oneOf.push({const:n,title:o})}})),o.get("commonToolsSection").setProperties("/raw_mimetype",d)}))}},ce={id:"@jupyterlab/notebook-extension:metadata-editor",description:"Adds metadata form for full metadata editor.",autoStart:!0,requires:[v.INotebookTracker,r.IEditorServices,S.IFormRendererRegistry],optional:[y.ITranslator],activate:(e,t,o,n,l)=>{const a=e=>o.factoryService.newInlineEditor(e),r={fieldRenderer:e=>new K({editorFactory:a,tracker:t,label:"Cell metadata",translator:l}).render(e)};n.addRenderer("@jupyterlab/notebook-extension:metadata-editor.cell-metadata",r);const d={fieldRenderer:e=>new F({editorFactory:a,tracker:t,label:"Notebook metadata",translator:l}).render(e)};n.addRenderer("@jupyterlab/notebook-extension:metadata-editor.notebook-metadata",d)}},ue={id:"@jupyterlab/notebook-extension:active-cell-tool",description:"Adds active cell field in the metadata editor tab.",autoStart:!0,requires:[v.INotebookTracker,S.IFormRendererRegistry,i.IEditorLanguageRegistry],activate:(e,t,o,n)=>{const l={fieldRenderer:e=>new L({tracker:t,languages:n}).render(e)};o.addRenderer("@jupyterlab/notebook-extension:active-cell-tool.renderer",l)}},be=[J,$,G,X,z,Y,Q,Z,B,ee,te,oe,ne,le,ae,re,de,ie,se,ce,ue];function me(e,t,o){const n=e.currentWidget;return!1!==o.activate&&n&&t.activateById(n.id),n}function pe(e,t,o,n,r,d){const i=o.load("jupyterlab"),{commands:s,shell:c}=e,u=()=>ge.isEnabledAndSingleSelected(c,t);t.currentChanged.connect(((e,t)=>{var o,n;(null===(n=null===(o=null==t?void 0:t.content)||void 0===o?void 0:o.model)||void 0===n?void 0:n.cells)&&(t.content.model.cells.changed.connect(((e,o)=>{(e=>{var t,o;for(const n of e.widgets)n instanceof a.MarkdownCell&&n.headingCollapsed&&v.NotebookActions.setHeadingCollapse(n,!0,e),n.model.id===(null===(o=null===(t=e.activeCell)||void 0===t?void 0:t.model)||void 0===o?void 0:o.id)&&v.NotebookActions.expandParent(n,e)})(t.content)})),t.content.activeCellChanged.connect(((e,t)=>{v.NotebookActions.expandParent(t,e)})))})),t.selectionChanged.connect((()=>{s.notifyCommandChanged(D.duplicateBelow),s.notifyCommandChanged(D.deleteCell),s.notifyCommandChanged(D.copy),s.notifyCommandChanged(D.cut),s.notifyCommandChanged(D.pasteBelow),s.notifyCommandChanged(D.pasteAbove),s.notifyCommandChanged(D.pasteAndReplace),s.notifyCommandChanged(D.moveUp),s.notifyCommandChanged(D.moveDown),s.notifyCommandChanged(D.run),s.notifyCommandChanged(D.runAll),s.notifyCommandChanged(D.runAndAdvance),s.notifyCommandChanged(D.runAndInsert)})),t.activeCellChanged.connect((()=>{s.notifyCommandChanged(D.moveUp),s.notifyCommandChanged(D.moveDown)})),s.addCommand(D.runAndAdvance,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Run Selected Cell","Run Selected Cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Run this cell and advance","Run these %1 cells and advance",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.runAndAdvance(t,e.sessionContext,n,o)}},isEnabled:e=>!!e.toolbar||d(),icon:e=>e.toolbar?S.runIcon:void 0}),s.addCommand(D.run,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Run Selected Cell and Do not Advance","Run Selected Cells and Do not Advance",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.run(t,e.sessionContext,n,o)}},isEnabled:d}),s.addCommand(D.runAndInsert,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Run Selected Cell and Insert Below","Run Selected Cells and Insert Below",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.runAndInsert(t,e.sessionContext,n,o)}},isEnabled:d}),s.addCommand(D.runAll,{label:i.__("Run All Cells"),caption:i.__("Run all cells"),execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.runAll(t,e.sessionContext,n,o)}},isEnabled:d}),s.addCommand(D.runAllAbove,{label:i.__("Run All Above Selected Cell"),execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.runAllAbove(t,e.sessionContext,n,o)}},isEnabled:()=>u()&&0!==t.currentWidget.content.activeCellIndex}),s.addCommand(D.runAllBelow,{label:i.__("Run Selected Cell and All Below"),execute:e=>{const l=me(t,c,e);if(l){const{context:e,content:t}=l;return v.NotebookActions.runAllBelow(t,e.sessionContext,n,o)}},isEnabled:()=>u()&&t.currentWidget.content.activeCellIndex!==t.currentWidget.content.widgets.length-1}),s.addCommand(D.renderAllMarkdown,{label:i.__("Render All Markdown Cells"),execute:e=>{const o=me(t,c,e);if(o){const{content:e}=o;return v.NotebookActions.renderAllMarkdown(e)}},isEnabled:d}),s.addCommand(D.restart,{label:i.__("Restart Kernel…"),caption:i.__("Restart the kernel"),execute:e=>{const o=me(t,c,e);if(o)return n.restart(o.sessionContext)},isEnabled:e=>!!e.toolbar||d(),icon:e=>e.toolbar?S.refreshIcon:void 0}),s.addCommand(D.shutdown,{label:i.__("Shut Down Kernel"),execute:e=>{const o=me(t,c,e);if(o)return o.context.sessionContext.shutdown()},isEnabled:d}),s.addCommand(D.closeAndShutdown,{label:i.__("Close and Shut Down Notebook"),execute:e=>{const o=me(t,c,e);if(!o)return;const n=o.title.label;return(0,l.showDialog)({title:i.__("Shut down the notebook?"),body:i.__('Are you sure you want to close "%1"?',n),buttons:[l.Dialog.cancelButton(),l.Dialog.warnButton()]}).then((e=>{if(e.button.accept)return s.execute(D.shutdown,{activate:!1}).then((()=>{o.dispose()}))}))},isEnabled:d}),s.addCommand(D.trust,{label:()=>i.__("Trust Notebook"),execute:e=>{const o=me(t,c,e);if(o){const{context:e,content:t}=o;return v.NotebookActions.trust(t).then((()=>e.save()))}},isEnabled:d}),s.addCommand(D.restartClear,{label:i.__("Restart Kernel and Clear Outputs of All Cells…"),caption:i.__("Restart the kernel and clear all outputs of all cells"),execute:async()=>{await s.execute(D.restart,{activate:!1})&&await s.execute(D.clearAllOutputs)},isEnabled:d}),s.addCommand(D.restartAndRunToSelected,{label:i.__("Restart Kernel and Run up to Selected Cell…"),execute:async e=>{const l=me(t,c,{activate:!1,...e});if(!l)return;const{context:a,content:r}=l,d=r.widgets.slice(0,r.activeCellIndex+1);return await n.restart(l.sessionContext)?v.NotebookActions.runCells(r,d,a.sessionContext,n,o):void 0},isEnabled:u}),s.addCommand(D.restartRunAll,{label:i.__("Restart Kernel and Run All Cells…"),caption:i.__("Restart the kernel and run all cells"),execute:async e=>{const l=me(t,c,{activate:!1,...e});if(!l)return;const{context:a,content:r}=l,d=r.widgets;return await n.restart(l.sessionContext)?v.NotebookActions.runCells(r,d,a.sessionContext,n,o):void 0},isEnabled:e=>!!e.toolbar||d(),icon:e=>e.toolbar?S.fastForwardIcon:void 0}),s.addCommand(D.clearAllOutputs,{label:i.__("Clear Outputs of All Cells"),caption:i.__("Clear all outputs of all cells"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.clearAllOutputs(o.content)},isEnabled:d}),s.addCommand(D.clearOutputs,{label:i.__("Clear Cell Output"),caption:i.__("Clear outputs for the selected cells"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.clearOutputs(o.content)},isEnabled:d}),s.addCommand(D.interrupt,{label:i.__("Interrupt Kernel"),caption:i.__("Interrupt the kernel"),execute:e=>{var o;const n=me(t,c,e);if(!n)return;const l=null===(o=n.context.sessionContext.session)||void 0===o?void 0:o.kernel;return l?l.interrupt():void 0},isEnabled:e=>!!e.toolbar||d(),icon:e=>e.toolbar?S.stopIcon:void 0}),s.addCommand(D.toCode,{label:i.__("Change to Code Cell Type"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.changeCellType(o.content,"code")},isEnabled:d}),s.addCommand(D.toMarkdown,{label:i.__("Change to Markdown Cell Type"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.changeCellType(o.content,"markdown")},isEnabled:d}),s.addCommand(D.toRaw,{label:i.__("Change to Raw Cell Type"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.changeCellType(o.content,"raw")},isEnabled:d}),s.addCommand(D.cut,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Cut Cell","Cut Cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Cut this cell","Cut these %1 cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.cut(o.content)},icon:e=>e.toolbar?S.cutIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.copy,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Copy Cell","Copy Cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Copy this cell","Copy these %1 cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.copy(o.content)},icon:e=>e.toolbar?S.copyIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.pasteBelow,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Paste Cell Below","Paste Cells Below",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Paste this cell from the clipboard","Paste these %1 cells from the clipboard",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.paste(o.content,"below")},icon:e=>e.toolbar?S.pasteIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.pasteAbove,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Paste Cell Above","Paste Cells Above",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Paste this cell from the clipboard","Paste these %1 cells from the clipboard",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.paste(o.content,"above")},isEnabled:d}),s.addCommand(D.duplicateBelow,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Duplicate Cell Below","Duplicate Cells Below",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Create a duplicate of this cell below","Create duplicates of %1 cells below",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);o&&v.NotebookActions.duplicate(o.content,"belowSelected")},icon:e=>e.toolbar?S.duplicateIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.pasteAndReplace,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Paste Cell and Replace","Paste Cells and Replace",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.paste(o.content,"replace")},isEnabled:d}),s.addCommand(D.deleteCell,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Delete Cell","Delete Cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Delete this cell","Delete these %1 cells",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.deleteCells(o.content)},isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.split,{label:i.__("Split Cell"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.splitCell(o.content)},isEnabled:d}),s.addCommand(D.merge,{label:i.__("Merge Selected Cells"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.mergeCells(o.content)},isEnabled:d}),s.addCommand(D.mergeAbove,{label:i.__("Merge Cell Above"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.mergeCells(o.content,!0)},isEnabled:d}),s.addCommand(D.mergeBelow,{label:i.__("Merge Cell Below"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.mergeCells(o.content,!1)},isEnabled:d}),s.addCommand(D.insertAbove,{label:i.__("Insert Cell Above"),caption:i.__("Insert a cell above"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.insertAbove(o.content)},icon:e=>e.toolbar?S.addAboveIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.insertBelow,{label:i.__("Insert Cell Below"),caption:i.__("Insert a cell below"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.insertBelow(o.content)},icon:e=>e.toolbar?S.addBelowIcon:void 0,isEnabled:e=>!!e.toolbar||d()}),s.addCommand(D.selectAbove,{label:i.__("Select Cell Above"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectAbove(o.content)},isEnabled:d}),s.addCommand(D.selectBelow,{label:i.__("Select Cell Below"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectBelow(o.content)},isEnabled:d}),s.addCommand(D.insertHeadingAbove,{label:i.__("Insert Heading Above Current Heading"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.insertSameLevelHeadingAbove(o.content)},isEnabled:d}),s.addCommand(D.insertHeadingBelow,{label:i.__("Insert Heading Below Current Heading"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.insertSameLevelHeadingBelow(o.content)},isEnabled:d}),s.addCommand(D.selectHeadingAboveOrCollapse,{label:i.__("Select Heading Above or Collapse Heading"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectHeadingAboveOrCollapseHeading(o.content)},isEnabled:d}),s.addCommand(D.selectHeadingBelowOrExpand,{label:i.__("Select Heading Below or Expand Heading"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectHeadingBelowOrExpandHeading(o.content)},isEnabled:d}),s.addCommand(D.extendAbove,{label:i.__("Extend Selection Above"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.extendSelectionAbove(o.content)},isEnabled:d}),s.addCommand(D.extendTop,{label:i.__("Extend Selection to Top"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.extendSelectionAbove(o.content,!0)},isEnabled:d}),s.addCommand(D.extendBelow,{label:i.__("Extend Selection Below"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.extendSelectionBelow(o.content)},isEnabled:d}),s.addCommand(D.extendBottom,{label:i.__("Extend Selection to Bottom"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.extendSelectionBelow(o.content,!0)},isEnabled:d}),s.addCommand(D.selectAll,{label:i.__("Select All Cells"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectAll(o.content)},isEnabled:d}),s.addCommand(D.deselectAll,{label:i.__("Deselect All Cells"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.deselectAll(o.content)},isEnabled:d}),s.addCommand(D.moveUp,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Move Cell Up","Move Cells Up",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Move this cell up","Move these %1 cells up",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);o&&(v.NotebookActions.moveUp(o.content),ge.raiseSilentNotification(i.__("Notebook cell shifted up successfully"),o.node))},isEnabled:e=>{const o=me(t,c,{...e,activate:!1});return!!o&&o.content.activeCellIndex>=1},icon:e=>e.toolbar?S.moveUpIcon:void 0}),s.addCommand(D.moveDown,{label:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Move Cell Down","Move Cells Down",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},caption:e=>{var o;const n=me(t,c,{...e,activate:!1});return i._n("Move this cell down","Move these %1 cells down",null!==(o=null==n?void 0:n.content.selectedCells.length)&&void 0!==o?o:1)},execute:e=>{const o=me(t,c,e);o&&(v.NotebookActions.moveDown(o.content),ge.raiseSilentNotification(i.__("Notebook cell shifted down successfully"),o.node))},isEnabled:e=>{const o=me(t,c,{...e,activate:!1});if(!o||!o.content.model)return!1;const n=o.content.model.cells.length;return o.content.activeCellIndex<n-1},icon:e=>e.toolbar?S.moveDownIcon:void 0}),s.addCommand(D.toggleAllLines,{label:i.__("Show Line Numbers"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.toggleAllLineNumbers(o.content)},isEnabled:d,isToggled:e=>{const o=me(t,c,{...e,activate:!1});if(o){const e=o.content.editorConfig;return!!(e.code.lineNumbers&&e.markdown.lineNumbers&&e.raw.lineNumbers)}return!1}}),s.addCommand(D.commandMode,{label:i.__("Enter Command Mode"),execute:e=>{const o=me(t,c,e);o&&(o.content.mode="command")},isEnabled:d}),s.addCommand(D.editMode,{label:i.__("Enter Edit Mode"),execute:e=>{const o=me(t,c,e);o&&(o.content.mode="edit")},isEnabled:d}),s.addCommand(D.undoCellAction,{label:i.__("Undo Cell Operation"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.undo(o.content)},isEnabled:d}),s.addCommand(D.redoCellAction,{label:i.__("Redo Cell Operation"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.redo(o.content)},isEnabled:d}),s.addCommand(D.redo,{label:i.__("Redo"),execute:e=>{var o;const n=me(t,c,e);if(n){const e=n.content.activeCell;if(e)return e.inputHidden=!1,null===(o=e.editor)||void 0===o?void 0:o.redo()}}}),s.addCommand(D.undo,{label:i.__("Undo"),execute:e=>{var o;const n=me(t,c,e);if(n){const e=n.content.activeCell;if(e)return e.inputHidden=!1,null===(o=e.editor)||void 0===o?void 0:o.undo()}}}),s.addCommand(D.changeKernel,{label:i.__("Change Kernel…"),execute:e=>{const o=me(t,c,e);if(o)return n.selectKernel(o.context.sessionContext)},isEnabled:d}),s.addCommand(D.getKernel,{label:i.__("Get Kernel"),execute:e=>{var o;const n=me(t,c,{activate:!1,...e});if(n)return null===(o=n.sessionContext.session)||void 0===o?void 0:o.kernel},isEnabled:d}),s.addCommand(D.reconnectToKernel,{label:i.__("Reconnect to Kernel"),execute:e=>{var o;const n=me(t,c,e);if(!n)return;const l=null===(o=n.context.sessionContext.session)||void 0===o?void 0:o.kernel;return l?l.reconnect():void 0},isEnabled:d}),s.addCommand(D.markdown1,{label:i.__("Change to Heading 1"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,1)},isEnabled:d}),s.addCommand(D.markdown2,{label:i.__("Change to Heading 2"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,2)},isEnabled:d}),s.addCommand(D.markdown3,{label:i.__("Change to Heading 3"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,3)},isEnabled:d}),s.addCommand(D.markdown4,{label:i.__("Change to Heading 4"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,4)},isEnabled:d}),s.addCommand(D.markdown5,{label:i.__("Change to Heading 5"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,5)},isEnabled:d}),s.addCommand(D.markdown6,{label:i.__("Change to Heading 6"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.setMarkdownHeader(o.content,6)},isEnabled:d}),s.addCommand(D.hideCode,{label:i.__("Collapse Selected Code"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.hideCode(o.content)},isEnabled:d}),s.addCommand(D.showCode,{label:i.__("Expand Selected Code"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.showCode(o.content)},isEnabled:d}),s.addCommand(D.hideAllCode,{label:i.__("Collapse All Code"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.hideAllCode(o.content)},isEnabled:d}),s.addCommand(D.showAllCode,{label:i.__("Expand All Code"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.showAllCode(o.content)},isEnabled:d}),s.addCommand(D.hideOutput,{label:i.__("Collapse Selected Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.hideOutput(o.content)},isEnabled:d}),s.addCommand(D.showOutput,{label:i.__("Expand Selected Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.showOutput(o.content)},isEnabled:d}),s.addCommand(D.hideAllOutputs,{label:i.__("Collapse All Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.hideAllOutputs(o.content)},isEnabled:d}),s.addCommand(D.toggleRenderSideBySideCurrentNotebook,{label:i.__("Render Side-by-Side"),execute:e=>{const o=me(t,c,e);if(o)return"side-by-side"===o.content.renderingLayout?v.NotebookActions.renderDefault(o.content):v.NotebookActions.renderSideBySide(o.content)},isEnabled:d,isToggled:e=>{const o=me(t,c,{...e,activate:!1});return!!o&&"side-by-side"===o.content.renderingLayout}}),s.addCommand(D.showAllOutputs,{label:i.__("Expand All Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.showAllOutputs(o.content)},isEnabled:d}),s.addCommand(D.enableOutputScrolling,{label:i.__("Enable Scrolling for Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.enableOutputScrolling(o.content)},isEnabled:d}),s.addCommand(D.disableOutputScrolling,{label:i.__("Disable Scrolling for Outputs"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.disableOutputScrolling(o.content)},isEnabled:d}),s.addCommand(D.selectLastRunCell,{label:i.__("Select current running or last run cell"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.selectLastRunCell(o.content)},isEnabled:d}),s.addCommand(D.replaceSelection,{label:i.__("Replace Selection in Notebook Cell"),execute:e=>{const o=me(t,c,e),n=e.text||"";if(o)return v.NotebookActions.replaceSelection(o.content,n)},isEnabled:d}),s.addCommand(D.toggleCollapseCmd,{label:i.__("Toggle Collapse Notebook Heading"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.toggleCurrentHeadingCollapse(o.content)},isEnabled:()=>ge.isEnabledAndHeadingSelected(c,t)}),s.addCommand(D.collapseAllCmd,{label:i.__("Collapse All Headings"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.collapseAllHeadings(o.content)}}),s.addCommand(D.expandAllCmd,{label:i.__("Expand All Headings"),execute:e=>{const o=me(t,c,e);if(o)return v.NotebookActions.expandAllHeadings(o.content)}}),s.addCommand(D.tocRunCells,{label:i.__("Select and Run Cell(s) for this Heading"),execute:e=>{const l=me(t,c,{activate:!1,...e});if(null===l)return;const r=l.content.activeCell;let d=l.content.activeCellIndex;if(r instanceof a.MarkdownCell){const e=l.content.widgets,t=r.headingInfo.level;for(let o=l.content.activeCellIndex+1;o<e.length;o++){const n=e[o];if(n instanceof a.MarkdownCell&&n.headingInfo.level>=0&&n.headingInfo.level<=t)break;d=o}}l.content.extendContiguousSelectionTo(d),v.NotebookActions.run(l.content,l.sessionContext,n,o)}}),s.addCommand(D.accessPreviousHistory,{label:i.__("Access Previous Kernel History Entry"),execute:async e=>{const o=me(t,c,e);if(o)return await v.NotebookActions.accessPreviousHistory(o.content)}}),s.addCommand(D.accessNextHistory,{label:i.__("Access Next Kernel History Entry"),execute:async e=>{const o=me(t,c,e);if(o)return await v.NotebookActions.accessNextHistory(o.content)}}),s.addCommand(D.virtualScrollbar,{label:i.__("Virtual Scrollbar"),caption:i.__("Toggle virtual scrollbar (enabled with windowing mode: full)"),execute:e=>{const o=me(t,c,e);o&&(o.content.scrollbar=!o.content.scrollbar)},icon:e=>e.toolbar?S.tableRowsIcon:void 0,isEnabled:e=>{var t;return(!!e.toolbar||d())&&null!==(t="full"===(null==r?void 0:r.composite.windowingMode))&&void 0!==t&&t},isVisible:e=>{var t;return(!!e.toolbar||d())&&null!==(t="full"===(null==r?void 0:r.composite.windowingMode))&&void 0!==t&&t}})}var ge;!function(e){e.createConsole=function(e,t,o){const n={path:t.context.path,preferredLanguage:t.context.model.defaultKernelLanguage,activate:o,ref:t.id,insertMode:"split-bottom",type:"Linked Console"};return e.execute("console:create",n)},e.isEnabled=function(e,t){return null!==t.currentWidget&&t.currentWidget===e.currentWidget},e.isEnabledAndSingleSelected=function(t,o){if(!e.isEnabled(t,o))return!1;const{content:n}=o.currentWidget,l=n.activeCellIndex;for(let e=0;e<n.widgets.length;++e)if(n.isSelected(n.widgets[e])&&e!==l)return!1;return!0},e.isEnabledAndHeadingSelected=function(t,o){if(!e.isEnabled(t,o))return!1;const{content:n}=o.currentWidget,l=n.activeCellIndex;if(!(n.activeCell instanceof a.MarkdownCell))return!1;for(let e=0;e<n.widgets.length;++e)if(n.isSelected(n.widgets[e])&&e!==l)return!1;return!0},e.getFormatLabels=function(e){const t=(e=e||y.nullTranslator).load("jupyterlab");return{html:t.__("HTML"),latex:t.__("LaTeX"),markdown:t.__("Markdown"),pdf:t.__("PDF"),rst:t.__("ReStructured Text"),script:t.__("Executable Script"),slides:t.__("Reveal.js Slides")}},e.raiseSilentNotification=function(e,t){const o=`sr-message-container-${t.id}`,n=document.getElementById(o)||document.createElement("div");n.getAttribute("id")!==o&&(n.classList.add("sr-only"),n.setAttribute("id",o),n.setAttribute("role","alert"),n.hidden=!0,t.appendChild(n)),n.innerText=e};class t extends T.Panel{constructor(e){super(),this._cell=null;const t=(e.translator||y.nullTranslator).load("jupyterlab");this._notebook=e.notebook,this._index=void 0!==e.index?e.index:-1,this._cell=e.cell||null,this.id=`LinkedOutputView-${N.UUID.uuid4()}`,this.title.label="Output View",this.title.icon=S.notebookIcon,this.title.caption=this._notebook.title.label?t.__("For Notebook: %1",this._notebook.title.label):t.__("For Notebook:"),this.addClass("jp-LinkedOutputView"),this._notebook.context.ready.then((()=>{if(this._cell||(this._cell=this._notebook.content.widgets[this._index]),!this._cell||"code"!==this._cell.model.type)return void this.dispose();const e=this._cell.cloneOutputArea();this.addWidget(e)}))}get index(){return this._cell?E.ArrayExt.findFirstIndex(this._notebook.content.widgets,(e=>e===this._cell)):this._index}get path(){return this._notebook.context.path}}e.ClonedOutputArea=t}(ge||(ge={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2520],{62520:(t,i,e)=>{e.d(i,{diagram:()=>d});var a=e(24028),n=e(23617),r=(e(27693),e(7608),e(86599),function(){var t=function(t,i,e,a){for(e=e||{},a=t.length;a--;e[t[a]]=i);return e},i=[1,3],e=[1,4],a=[1,5],n=[1,6],r=[1,7],s=[1,5,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],l=[1,5,6,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],o=[32,33,34],h=[2,7],c=[1,13],d=[1,17],u=[1,18],x=[1,19],g=[1,20],f=[1,21],y=[1,22],p=[1,23],q=[1,24],T=[1,25],A=[1,26],m=[1,27],_=[1,30],b=[1,31],S=[1,32],k=[1,33],F=[1,34],P=[1,35],v=[1,36],L=[1,37],C=[1,38],z=[1,39],E=[1,40],D=[1,41],I=[1,42],B=[1,57],R=[1,58],w=[5,22,26,32,33,34,40,41,42,43,44,45,46,47,48,49,50,51],W={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,SPACE:5,QUADRANT:6,document:7,line:8,statement:9,axisDetails:10,quadrantDetails:11,points:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,text:21,point_start:22,point_x:23,point_y:24,"X-AXIS":25,"AXIS-TEXT-DELIMITER":26,"Y-AXIS":27,QUADRANT_1:28,QUADRANT_2:29,QUADRANT_3:30,QUADRANT_4:31,NEWLINE:32,SEMI:33,EOF:34,alphaNumToken:35,textNoTagsToken:36,STR:37,MD_STR:38,alphaNum:39,PUNCTUATION:40,AMP:41,NUM:42,ALPHA:43,COMMA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,UNDERSCORE:50,MINUS:51,$accept:0,$end:1},terminals_:{2:"error",5:"SPACE",6:"QUADRANT",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",22:"point_start",23:"point_x",24:"point_y",25:"X-AXIS",26:"AXIS-TEXT-DELIMITER",27:"Y-AXIS",28:"QUADRANT_1",29:"QUADRANT_2",30:"QUADRANT_3",31:"QUADRANT_4",32:"NEWLINE",33:"SEMI",34:"EOF",37:"STR",38:"MD_STR",40:"PUNCTUATION",41:"AMP",42:"NUM",43:"ALPHA",44:"COMMA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"UNDERSCORE",51:"MINUS"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,1],[9,1],[9,1],[9,2],[9,2],[9,2],[9,1],[9,1],[12,4],[10,4],[10,3],[10,2],[10,4],[10,3],[10,2],[11,2],[11,2],[11,2],[11,2],[4,1],[4,1],[4,1],[21,1],[21,2],[21,1],[21,1],[39,1],[39,2],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[36,1],[36,1],[36,1]],performAction:function(t,i,e,a,n,r,s){var l=r.length-1;switch(n){case 12:this.$=r[l].trim(),a.setDiagramTitle(this.$);break;case 13:this.$=r[l].trim(),a.setAccTitle(this.$);break;case 14:case 15:this.$=r[l].trim(),a.setAccDescription(this.$);break;case 16:a.addSection(r[l].substr(8)),this.$=r[l].substr(8);break;case 17:a.addPoint(r[l-3],r[l-1],r[l]);break;case 18:a.setXAxisLeftText(r[l-2]),a.setXAxisRightText(r[l]);break;case 19:r[l-1].text+=" ⟶ ",a.setXAxisLeftText(r[l-1]);break;case 20:a.setXAxisLeftText(r[l]);break;case 21:a.setYAxisBottomText(r[l-2]),a.setYAxisTopText(r[l]);break;case 22:r[l-1].text+=" ⟶ ",a.setYAxisBottomText(r[l-1]);break;case 23:a.setYAxisBottomText(r[l]);break;case 24:a.setQuadrant1Text(r[l]);break;case 25:a.setQuadrant2Text(r[l]);break;case 26:a.setQuadrant3Text(r[l]);break;case 27:a.setQuadrant4Text(r[l]);break;case 31:case 33:this.$={text:r[l],type:"text"};break;case 32:this.$={text:r[l-1].text+""+r[l],type:r[l-1].type};break;case 34:this.$={text:r[l],type:"markdown"};break;case 35:this.$=r[l];break;case 36:this.$=r[l-1]+""+r[l]}},table:[{3:1,4:2,5:i,6:e,32:a,33:n,34:r},{1:[3]},{3:8,4:2,5:i,6:e,32:a,33:n,34:r},{3:9,4:2,5:i,6:e,32:a,33:n,34:r},t(s,[2,4],{7:10}),t(l,[2,28]),t(l,[2,29]),t(l,[2,30]),{1:[2,1]},{1:[2,2]},t(o,h,{8:11,9:12,10:14,11:15,12:16,21:28,35:29,1:[2,3],5:c,13:d,15:u,17:x,19:g,20:f,25:y,27:p,28:q,29:T,30:A,31:m,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I}),t(s,[2,5]),{4:43,32:a,33:n,34:r},t(o,h,{10:14,11:15,12:16,21:28,35:29,9:44,5:c,13:d,15:u,17:x,19:g,20:f,25:y,27:p,28:q,29:T,30:A,31:m,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I}),t(o,[2,9]),t(o,[2,10]),t(o,[2,11]),{14:[1,45]},{16:[1,46]},{18:[1,47]},t(o,[2,15]),t(o,[2,16]),{21:48,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{21:49,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{21:50,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{21:51,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{21:52,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{21:53,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{5:B,22:[1,54],35:56,36:55,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R},t(w,[2,31]),t(w,[2,33]),t(w,[2,34]),t(w,[2,37]),t(w,[2,38]),t(w,[2,39]),t(w,[2,40]),t(w,[2,41]),t(w,[2,42]),t(w,[2,43]),t(w,[2,44]),t(w,[2,45]),t(w,[2,46]),t(w,[2,47]),t(s,[2,6]),t(o,[2,8]),t(o,[2,12]),t(o,[2,13]),t(o,[2,14]),t(o,[2,20],{36:55,35:56,5:B,26:[1,59],40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,23],{36:55,35:56,5:B,26:[1,60],40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,24],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,25],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,26],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,27],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),{23:[1,61]},t(w,[2,32]),t(w,[2,48]),t(w,[2,49]),t(w,[2,50]),t(o,[2,19],{35:29,21:62,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I}),t(o,[2,22],{35:29,21:63,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I}),{24:[1,64]},t(o,[2,18],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,21],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,17])],defaultActions:{8:[2,1],9:[2,2]},parseError:function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},parse:function(t){var i=[0],e=[],a=[null],n=[],r=this.table,s="",l=0,o=0,h=n.slice.call(arguments,1),c=Object.create(this.lexer),d={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(d.yy[u]=this.yy[u]);c.setInput(t,d.yy),d.yy.lexer=c,d.yy.parser=this,void 0===c.yylloc&&(c.yylloc={});var x=c.yylloc;n.push(x);var g=c.options&&c.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,y,p,q,T,A,m,_,b,S={};;){if(y=i[i.length-1],this.defaultActions[y]?p=this.defaultActions[y]:(null==f&&(b=void 0,"number"!=typeof(b=e.pop()||c.lex()||1)&&(b instanceof Array&&(b=(e=b).pop()),b=this.symbols_[b]||b),f=b),p=r[y]&&r[y][f]),void 0===p||!p.length||!p[0]){var k;for(T in _=[],r[y])this.terminals_[T]&&T>2&&_.push("'"+this.terminals_[T]+"'");k=c.showPosition?"Parse error on line "+(l+1)+":\n"+c.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(k,{text:c.match,token:this.terminals_[f]||f,line:c.yylineno,loc:x,expected:_})}if(p[0]instanceof Array&&p.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+f);switch(p[0]){case 1:i.push(f),a.push(c.yytext),n.push(c.yylloc),i.push(p[1]),f=null,o=c.yyleng,s=c.yytext,l=c.yylineno,x=c.yylloc;break;case 2:if(A=this.productions_[p[1]][1],S.$=a[a.length-A],S._$={first_line:n[n.length-(A||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(A||1)].first_column,last_column:n[n.length-1].last_column},g&&(S._$.range=[n[n.length-(A||1)].range[0],n[n.length-1].range[1]]),void 0!==(q=this.performAction.apply(S,[s,o,l,d.yy,p[1],a,n].concat(h))))return q;A&&(i=i.slice(0,-1*A*2),a=a.slice(0,-1*A),n=n.slice(0,-1*A)),i.push(this.productions_[p[1]][0]),a.push(S.$),n.push(S._$),m=r[i[i.length-2]][i[i.length-1]],i.push(m);break;case 3:return!0}}return!0}},U={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||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 i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var a=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),e.length-1&&(this.yylineno-=e.length-1);var n=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:e?(e.length===a.length?this.yylloc.first_column:0)+a[a.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),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(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var e,a,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.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],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,e,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((e=this._input.match(this.rules[n[r]]))&&(!i||e[0].length>i[0].length)){if(i=e,a=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[r])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[a]))&&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,i,e,a){switch(e){case 0:case 1:case 3:break;case 2:return 32;case 4:return this.begin("title"),13;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),15;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),17;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 22:case 24:case 28:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 25;case 14:return 27;case 15:return 26;case 16:return 28;case 17:return 29;case 18:return 30;case 19:return 31;case 20:this.begin("md_string");break;case 21:return"MD_STR";case 23:this.begin("string");break;case 25:return"STR";case 26:return this.begin("point_start"),22;case 27:return this.begin("point_x"),23;case 29:this.popState(),this.begin("point_y");break;case 30:return this.popState(),24;case 31:return 6;case 32:return 43;case 33:return"COLON";case 34:return 45;case 35:return 44;case 36:case 37:return 46;case 38:return 47;case 39:return 49;case 40:return 50;case 41:return 48;case 42:return 41;case 43:return 51;case 44:return 42;case 45:return 5;case 46:return 33;case 47:return 40;case 48:return 34}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{point_y:{rules:[30],inclusive:!1},point_x:{rules:[29],inclusive:!1},point_start:{rules:[27,28],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[21,22],inclusive:!1},string:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,23,26,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};function N(){this.yy={}}return W.lexer=U,N.prototype=W,W.Parser=N,new N}());r.parser=r;const s=r,l=(0,a.D)(),o=(0,a.c)();function h(t){return(0,a.d)(t.trim(),o)}const c=new class{constructor(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var t,i,e,n,r,s,l,o,h,c,d,u,x,g,f,y,p,q;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(t=a.A.quadrantChart)?void 0:t.chartWidth)||500,chartWidth:(null==(i=a.A.quadrantChart)?void 0:i.chartHeight)||500,titlePadding:(null==(e=a.A.quadrantChart)?void 0:e.titlePadding)||10,titleFontSize:(null==(n=a.A.quadrantChart)?void 0:n.titleFontSize)||20,quadrantPadding:(null==(r=a.A.quadrantChart)?void 0:r.quadrantPadding)||5,xAxisLabelPadding:(null==(s=a.A.quadrantChart)?void 0:s.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(l=a.A.quadrantChart)?void 0:l.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(o=a.A.quadrantChart)?void 0:o.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(h=a.A.quadrantChart)?void 0:h.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(c=a.A.quadrantChart)?void 0:c.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(d=a.A.quadrantChart)?void 0:d.quadrantTextTopPadding)||5,pointTextPadding:(null==(u=a.A.quadrantChart)?void 0:u.pointTextPadding)||5,pointLabelFontSize:(null==(x=a.A.quadrantChart)?void 0:x.pointLabelFontSize)||12,pointRadius:(null==(g=a.A.quadrantChart)?void 0:g.pointRadius)||5,xAxisPosition:(null==(f=a.A.quadrantChart)?void 0:f.xAxisPosition)||"top",yAxisPosition:(null==(y=a.A.quadrantChart)?void 0:y.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(p=a.A.quadrantChart)?void 0:p.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(q=a.A.quadrantChart)?void 0:q.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:l.quadrant1Fill,quadrant2Fill:l.quadrant2Fill,quadrant3Fill:l.quadrant3Fill,quadrant4Fill:l.quadrant4Fill,quadrant1TextFill:l.quadrant1TextFill,quadrant2TextFill:l.quadrant2TextFill,quadrant3TextFill:l.quadrant3TextFill,quadrant4TextFill:l.quadrant4TextFill,quadrantPointFill:l.quadrantPointFill,quadrantPointTextFill:l.quadrantPointTextFill,quadrantXAxisTextFill:l.quadrantXAxisTextFill,quadrantYAxisTextFill:l.quadrantYAxisTextFill,quadrantTitleFill:l.quadrantTitleFill,quadrantInternalBorderStrokeFill:l.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:l.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),a.l.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}setConfig(t){a.l.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){a.l.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,i,e,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,r={top:"top"===t&&i?n:0,bottom:"bottom"===t&&i?n:0},s=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,l={left:"left"===this.config.yAxisPosition&&e?s:0,right:"right"===this.config.yAxisPosition&&e?s:0},o=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?o:0},c=this.config.quadrantPadding+l.left,d=this.config.quadrantPadding+r.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-l.left-l.right,x=this.config.chartHeight-2*this.config.quadrantPadding-r.top-r.bottom-h.top;return{xAxisSpace:r,yAxisSpace:l,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,i,e,a){const{quadrantSpace:n,titleSpace:r}=a,{quadrantHalfHeight:s,quadrantHeight:l,quadrantLeft:o,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&i&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+r.top:this.config.xAxisLabelPadding+c+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&i&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+r.top:this.config.xAxisLabelPadding+c+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&e&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+d+this.config.quadrantPadding,y:c+l-(x?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&e&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+d+this.config.quadrantPadding,y:c+s-(x?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:i}=t,{quadrantHalfHeight:e,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:r}=i,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:r,width:n,height:e,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:r,width:n,height:e,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:r+e,width:n,height:e,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:r+e,width:n,height:e,fill:this.themeConfig.quadrant4Fill}];for(const t of s)t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return s}getQuadrantPoints(t){const{quadrantSpace:i}=t,{quadrantHeight:e,quadrantLeft:a,quadrantTop:r,quadrantWidth:s}=i,l=(0,n.BYU)().domain([0,1]).range([a,s+a]),o=(0,n.BYU)().domain([0,1]).range([e+r,r]);return this.data.points.map((t=>({x:l(t.x),y:o(t.y),fill:this.themeConfig.quadrantPointFill,radius:this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:l(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0}})))}getBorders(t){const i=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:e}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:r,quadrantHalfWidth:s,quadrantTop:l,quadrantWidth:o}=e;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r-i,y1:l,x2:r+o+i,y2:l},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r+o,y1:l+i,x2:r+o,y2:l+n-i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r-i,y1:l+n,x2:r+o+i,y2:l+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r,y1:l+i,x2:r,y2:l+n-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:r+s,y1:l+i,x2:r+s,y2:l+n-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:r+i,y1:l+a,x2:r+o-i,y2:l+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),i=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),e=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,i,e);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,i,n),borderLines:this.getBorders(n),title:this.getTitle(e)}}},d={parser:s,db:{setWidth:function(t){c.setConfig({chartWidth:t})},setHeight:function(t){c.setConfig({chartHeight:t})},setQuadrant1Text:function(t){c.setData({quadrant1Text:h(t.text)})},setQuadrant2Text:function(t){c.setData({quadrant2Text:h(t.text)})},setQuadrant3Text:function(t){c.setData({quadrant3Text:h(t.text)})},setQuadrant4Text:function(t){c.setData({quadrant4Text:h(t.text)})},setXAxisLeftText:function(t){c.setData({xAxisLeftText:h(t.text)})},setXAxisRightText:function(t){c.setData({xAxisRightText:h(t.text)})},setYAxisTopText:function(t){c.setData({yAxisTopText:h(t.text)})},setYAxisBottomText:function(t){c.setData({yAxisBottomText:h(t.text)})},addPoint:function(t,i,e){c.addPoints([{x:i,y:e,text:h(t.text)}])},getQuadrantData:function(){const t=(0,a.c)(),{themeVariables:i,quadrantChart:e}=t;return e&&c.setConfig(e),c.setThemeConfig({quadrant1Fill:i.quadrant1Fill,quadrant2Fill:i.quadrant2Fill,quadrant3Fill:i.quadrant3Fill,quadrant4Fill:i.quadrant4Fill,quadrant1TextFill:i.quadrant1TextFill,quadrant2TextFill:i.quadrant2TextFill,quadrant3TextFill:i.quadrant3TextFill,quadrant4TextFill:i.quadrant4TextFill,quadrantPointFill:i.quadrantPointFill,quadrantPointTextFill:i.quadrantPointTextFill,quadrantXAxisTextFill:i.quadrantXAxisTextFill,quadrantYAxisTextFill:i.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:i.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:i.quadrantInternalBorderStrokeFill,quadrantTitleFill:i.quadrantTitleFill}),c.setData({titleText:(0,a.r)()}),c.build()},clear:function(){c.clear(),(0,a.t)()},setAccTitle:a.s,getAccTitle:a.g,setDiagramTitle:a.q,getDiagramTitle:a.r,getAccDescription:a.a,setAccDescription:a.b},renderer:{draw:(t,i,e,r)=>{var s,l,o;function h(t){return"top"===t?"hanging":"middle"}function c(t){return"left"===t?"start":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}const u=(0,a.c)();a.l.debug("Rendering quadrant chart\n"+t);const x=u.securityLevel;let g;"sandbox"===x&&(g=(0,n.Ys)("#i"+i));const f=("sandbox"===x?(0,n.Ys)(g.nodes()[0].contentDocument.body):(0,n.Ys)("body")).select(`[id="${i}"]`),y=f.append("g").attr("class","main"),p=(null==(s=u.quadrantChart)?void 0:s.chartWidth)||500,q=(null==(l=u.quadrantChart)?void 0:l.chartHeight)||500;(0,a.i)(f,q,p,(null==(o=u.quadrantChart)?void 0:o.useMaxWidth)||!0),f.attr("viewBox","0 0 "+p+" "+q),r.db.setHeight(q),r.db.setWidth(p);const T=r.db.getQuadrantData(),A=y.append("g").attr("class","quadrants"),m=y.append("g").attr("class","border"),_=y.append("g").attr("class","data-points"),b=y.append("g").attr("class","labels"),S=y.append("g").attr("class","title");T.title&&S.append("text").attr("x",0).attr("y",0).attr("fill",T.title.fill).attr("font-size",T.title.fontSize).attr("dominant-baseline",h(T.title.horizontalPos)).attr("text-anchor",c(T.title.verticalPos)).attr("transform",d(T.title)).text(T.title.text),T.borderLines&&m.selectAll("line").data(T.borderLines).enter().append("line").attr("x1",(t=>t.x1)).attr("y1",(t=>t.y1)).attr("x2",(t=>t.x2)).attr("y2",(t=>t.y2)).style("stroke",(t=>t.strokeFill)).style("stroke-width",(t=>t.strokeWidth));const k=A.selectAll("g.quadrant").data(T.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),k.append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>h(t.text.horizontalPos))).attr("text-anchor",(t=>c(t.text.verticalPos))).attr("transform",(t=>d(t.text))).text((t=>t.text.text)),b.selectAll("g.label").data(T.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((t=>t.text)).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>h(t.horizontalPos))).attr("text-anchor",(t=>c(t.verticalPos))).attr("transform",(t=>d(t)));const F=_.selectAll("g.data-point").data(T.points).enter().append("g").attr("class","data-point");F.append("circle").attr("cx",(t=>t.x)).attr("cy",(t=>t.y)).attr("r",(t=>t.radius)).attr("fill",(t=>t.fill)),F.append("text").attr("x",0).attr("y",0).text((t=>t.text.text)).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>h(t.text.horizontalPos))).attr("text-anchor",(t=>c(t.text.verticalPos))).attr("transform",(t=>d(t.text)))}},styles:()=>""}}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2520],{62520:(t,i,e)=>{e.d(i,{diagram:()=>d});var a=e(24028),n=e(23617),r=(e(27693),e(7608),e(31699),function(){var t=function(t,i,e,a){for(e=e||{},a=t.length;a--;e[t[a]]=i);return e},i=[1,3],e=[1,4],a=[1,5],n=[1,6],r=[1,7],s=[1,5,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],l=[1,5,6,13,15,17,19,20,25,27,28,29,30,31,32,33,34,37,38,40,41,42,43,44,45,46,47,48,49,50],o=[32,33,34],h=[2,7],c=[1,13],d=[1,17],u=[1,18],x=[1,19],g=[1,20],f=[1,21],y=[1,22],p=[1,23],q=[1,24],T=[1,25],A=[1,26],m=[1,27],_=[1,30],b=[1,31],S=[1,32],k=[1,33],F=[1,34],P=[1,35],v=[1,36],L=[1,37],C=[1,38],z=[1,39],E=[1,40],D=[1,41],I=[1,42],B=[1,57],R=[1,58],w=[5,22,26,32,33,34,40,41,42,43,44,45,46,47,48,49,50,51],W={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,SPACE:5,QUADRANT:6,document:7,line:8,statement:9,axisDetails:10,quadrantDetails:11,points:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,text:21,point_start:22,point_x:23,point_y:24,"X-AXIS":25,"AXIS-TEXT-DELIMITER":26,"Y-AXIS":27,QUADRANT_1:28,QUADRANT_2:29,QUADRANT_3:30,QUADRANT_4:31,NEWLINE:32,SEMI:33,EOF:34,alphaNumToken:35,textNoTagsToken:36,STR:37,MD_STR:38,alphaNum:39,PUNCTUATION:40,AMP:41,NUM:42,ALPHA:43,COMMA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,UNDERSCORE:50,MINUS:51,$accept:0,$end:1},terminals_:{2:"error",5:"SPACE",6:"QUADRANT",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",22:"point_start",23:"point_x",24:"point_y",25:"X-AXIS",26:"AXIS-TEXT-DELIMITER",27:"Y-AXIS",28:"QUADRANT_1",29:"QUADRANT_2",30:"QUADRANT_3",31:"QUADRANT_4",32:"NEWLINE",33:"SEMI",34:"EOF",37:"STR",38:"MD_STR",40:"PUNCTUATION",41:"AMP",42:"NUM",43:"ALPHA",44:"COMMA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"UNDERSCORE",51:"MINUS"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,1],[9,1],[9,1],[9,2],[9,2],[9,2],[9,1],[9,1],[12,4],[10,4],[10,3],[10,2],[10,4],[10,3],[10,2],[11,2],[11,2],[11,2],[11,2],[4,1],[4,1],[4,1],[21,1],[21,2],[21,1],[21,1],[39,1],[39,2],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[35,1],[36,1],[36,1],[36,1]],performAction:function(t,i,e,a,n,r,s){var l=r.length-1;switch(n){case 12:this.$=r[l].trim(),a.setDiagramTitle(this.$);break;case 13:this.$=r[l].trim(),a.setAccTitle(this.$);break;case 14:case 15:this.$=r[l].trim(),a.setAccDescription(this.$);break;case 16:a.addSection(r[l].substr(8)),this.$=r[l].substr(8);break;case 17:a.addPoint(r[l-3],r[l-1],r[l]);break;case 18:a.setXAxisLeftText(r[l-2]),a.setXAxisRightText(r[l]);break;case 19:r[l-1].text+=" ⟶ ",a.setXAxisLeftText(r[l-1]);break;case 20:a.setXAxisLeftText(r[l]);break;case 21:a.setYAxisBottomText(r[l-2]),a.setYAxisTopText(r[l]);break;case 22:r[l-1].text+=" ⟶ ",a.setYAxisBottomText(r[l-1]);break;case 23:a.setYAxisBottomText(r[l]);break;case 24:a.setQuadrant1Text(r[l]);break;case 25:a.setQuadrant2Text(r[l]);break;case 26:a.setQuadrant3Text(r[l]);break;case 27:a.setQuadrant4Text(r[l]);break;case 31:case 33:this.$={text:r[l],type:"text"};break;case 32:this.$={text:r[l-1].text+""+r[l],type:r[l-1].type};break;case 34:this.$={text:r[l],type:"markdown"};break;case 35:this.$=r[l];break;case 36:this.$=r[l-1]+""+r[l]}},table:[{3:1,4:2,5:i,6:e,32:a,33:n,34:r},{1:[3]},{3:8,4:2,5:i,6:e,32:a,33:n,34:r},{3:9,4:2,5:i,6:e,32:a,33:n,34:r},t(s,[2,4],{7:10}),t(l,[2,28]),t(l,[2,29]),t(l,[2,30]),{1:[2,1]},{1:[2,2]},t(o,h,{8:11,9:12,10:14,11:15,12:16,21:28,35:29,1:[2,3],5:c,13:d,15:u,17:x,19:g,20:f,25:y,27:p,28:q,29:T,30:A,31:m,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I}),t(s,[2,5]),{4:43,32:a,33:n,34:r},t(o,h,{10:14,11:15,12:16,21:28,35:29,9:44,5:c,13:d,15:u,17:x,19:g,20:f,25:y,27:p,28:q,29:T,30:A,31:m,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I}),t(o,[2,9]),t(o,[2,10]),t(o,[2,11]),{14:[1,45]},{16:[1,46]},{18:[1,47]},t(o,[2,15]),t(o,[2,16]),{21:48,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{21:49,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{21:50,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{21:51,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{21:52,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{21:53,35:29,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I},{5:B,22:[1,54],35:56,36:55,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R},t(w,[2,31]),t(w,[2,33]),t(w,[2,34]),t(w,[2,37]),t(w,[2,38]),t(w,[2,39]),t(w,[2,40]),t(w,[2,41]),t(w,[2,42]),t(w,[2,43]),t(w,[2,44]),t(w,[2,45]),t(w,[2,46]),t(w,[2,47]),t(s,[2,6]),t(o,[2,8]),t(o,[2,12]),t(o,[2,13]),t(o,[2,14]),t(o,[2,20],{36:55,35:56,5:B,26:[1,59],40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,23],{36:55,35:56,5:B,26:[1,60],40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,24],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,25],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,26],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,27],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),{23:[1,61]},t(w,[2,32]),t(w,[2,48]),t(w,[2,49]),t(w,[2,50]),t(o,[2,19],{35:29,21:62,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I}),t(o,[2,22],{35:29,21:63,37:_,38:b,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I}),{24:[1,64]},t(o,[2,18],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,21],{36:55,35:56,5:B,40:S,41:k,42:F,43:P,44:v,45:L,46:C,47:z,48:E,49:D,50:I,51:R}),t(o,[2,17])],defaultActions:{8:[2,1],9:[2,2]},parseError:function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},parse:function(t){var i=[0],e=[],a=[null],n=[],r=this.table,s="",l=0,o=0,h=n.slice.call(arguments,1),c=Object.create(this.lexer),d={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(d.yy[u]=this.yy[u]);c.setInput(t,d.yy),d.yy.lexer=c,d.yy.parser=this,void 0===c.yylloc&&(c.yylloc={});var x=c.yylloc;n.push(x);var g=c.options&&c.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,y,p,q,T,A,m,_,b,S={};;){if(y=i[i.length-1],this.defaultActions[y]?p=this.defaultActions[y]:(null==f&&(b=void 0,"number"!=typeof(b=e.pop()||c.lex()||1)&&(b instanceof Array&&(b=(e=b).pop()),b=this.symbols_[b]||b),f=b),p=r[y]&&r[y][f]),void 0===p||!p.length||!p[0]){var k;for(T in _=[],r[y])this.terminals_[T]&&T>2&&_.push("'"+this.terminals_[T]+"'");k=c.showPosition?"Parse error on line "+(l+1)+":\n"+c.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(k,{text:c.match,token:this.terminals_[f]||f,line:c.yylineno,loc:x,expected:_})}if(p[0]instanceof Array&&p.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+f);switch(p[0]){case 1:i.push(f),a.push(c.yytext),n.push(c.yylloc),i.push(p[1]),f=null,o=c.yyleng,s=c.yytext,l=c.yylineno,x=c.yylloc;break;case 2:if(A=this.productions_[p[1]][1],S.$=a[a.length-A],S._$={first_line:n[n.length-(A||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(A||1)].first_column,last_column:n[n.length-1].last_column},g&&(S._$.range=[n[n.length-(A||1)].range[0],n[n.length-1].range[1]]),void 0!==(q=this.performAction.apply(S,[s,o,l,d.yy,p[1],a,n].concat(h))))return q;A&&(i=i.slice(0,-1*A*2),a=a.slice(0,-1*A),n=n.slice(0,-1*A)),i.push(this.productions_[p[1]][0]),a.push(S.$),n.push(S._$),m=r[i[i.length-2]][i[i.length-1]],i.push(m);break;case 3:return!0}}return!0}},U={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||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 i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var a=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),e.length-1&&(this.yylineno-=e.length-1);var n=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:e?(e.length===a.length?this.yylloc.first_column:0)+a[a.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),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(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var e,a,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.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],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,e,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((e=this._input.match(this.rules[n[r]]))&&(!i||e[0].length>i[0].length)){if(i=e,a=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[r])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[a]))&&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,i,e,a){switch(e){case 0:case 1:case 3:break;case 2:return 32;case 4:return this.begin("title"),13;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),15;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),17;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 22:case 24:case 28:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 25;case 14:return 27;case 15:return 26;case 16:return 28;case 17:return 29;case 18:return 30;case 19:return 31;case 20:this.begin("md_string");break;case 21:return"MD_STR";case 23:this.begin("string");break;case 25:return"STR";case 26:return this.begin("point_start"),22;case 27:return this.begin("point_x"),23;case 29:this.popState(),this.begin("point_y");break;case 30:return this.popState(),24;case 31:return 6;case 32:return 43;case 33:return"COLON";case 34:return 45;case 35:return 44;case 36:case 37:return 46;case 38:return 47;case 39:return 49;case 40:return 50;case 41:return 48;case 42:return 41;case 43:return 51;case 44:return 42;case 45:return 5;case 46:return 33;case 47:return 40;case 48:return 34}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{point_y:{rules:[30],inclusive:!1},point_x:{rules:[29],inclusive:!1},point_start:{rules:[27,28],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[21,22],inclusive:!1},string:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,23,26,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};function N(){this.yy={}}return W.lexer=U,N.prototype=W,W.Parser=N,new N}());r.parser=r;const s=r,l=(0,a.D)(),o=(0,a.c)();function h(t){return(0,a.d)(t.trim(),o)}const c=new class{constructor(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var t,i,e,n,r,s,l,o,h,c,d,u,x,g,f,y,p,q;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(t=a.A.quadrantChart)?void 0:t.chartWidth)||500,chartWidth:(null==(i=a.A.quadrantChart)?void 0:i.chartHeight)||500,titlePadding:(null==(e=a.A.quadrantChart)?void 0:e.titlePadding)||10,titleFontSize:(null==(n=a.A.quadrantChart)?void 0:n.titleFontSize)||20,quadrantPadding:(null==(r=a.A.quadrantChart)?void 0:r.quadrantPadding)||5,xAxisLabelPadding:(null==(s=a.A.quadrantChart)?void 0:s.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(l=a.A.quadrantChart)?void 0:l.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(o=a.A.quadrantChart)?void 0:o.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(h=a.A.quadrantChart)?void 0:h.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(c=a.A.quadrantChart)?void 0:c.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(d=a.A.quadrantChart)?void 0:d.quadrantTextTopPadding)||5,pointTextPadding:(null==(u=a.A.quadrantChart)?void 0:u.pointTextPadding)||5,pointLabelFontSize:(null==(x=a.A.quadrantChart)?void 0:x.pointLabelFontSize)||12,pointRadius:(null==(g=a.A.quadrantChart)?void 0:g.pointRadius)||5,xAxisPosition:(null==(f=a.A.quadrantChart)?void 0:f.xAxisPosition)||"top",yAxisPosition:(null==(y=a.A.quadrantChart)?void 0:y.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(p=a.A.quadrantChart)?void 0:p.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(q=a.A.quadrantChart)?void 0:q.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:l.quadrant1Fill,quadrant2Fill:l.quadrant2Fill,quadrant3Fill:l.quadrant3Fill,quadrant4Fill:l.quadrant4Fill,quadrant1TextFill:l.quadrant1TextFill,quadrant2TextFill:l.quadrant2TextFill,quadrant3TextFill:l.quadrant3TextFill,quadrant4TextFill:l.quadrant4TextFill,quadrantPointFill:l.quadrantPointFill,quadrantPointTextFill:l.quadrantPointTextFill,quadrantXAxisTextFill:l.quadrantXAxisTextFill,quadrantYAxisTextFill:l.quadrantYAxisTextFill,quadrantTitleFill:l.quadrantTitleFill,quadrantInternalBorderStrokeFill:l.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:l.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),a.l.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}setConfig(t){a.l.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){a.l.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,i,e,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,r={top:"top"===t&&i?n:0,bottom:"bottom"===t&&i?n:0},s=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,l={left:"left"===this.config.yAxisPosition&&e?s:0,right:"right"===this.config.yAxisPosition&&e?s:0},o=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?o:0},c=this.config.quadrantPadding+l.left,d=this.config.quadrantPadding+r.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-l.left-l.right,x=this.config.chartHeight-2*this.config.quadrantPadding-r.top-r.bottom-h.top;return{xAxisSpace:r,yAxisSpace:l,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,i,e,a){const{quadrantSpace:n,titleSpace:r}=a,{quadrantHalfHeight:s,quadrantHeight:l,quadrantLeft:o,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&i&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+r.top:this.config.xAxisLabelPadding+c+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&i&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+r.top:this.config.xAxisLabelPadding+c+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&e&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+d+this.config.quadrantPadding,y:c+l-(x?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&e&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+d+this.config.quadrantPadding,y:c+s-(x?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:i}=t,{quadrantHalfHeight:e,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:r}=i,s=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:r,width:n,height:e,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:r,width:n,height:e,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:r+e,width:n,height:e,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:r+e,width:n,height:e,fill:this.themeConfig.quadrant4Fill}];for(const t of s)t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return s}getQuadrantPoints(t){const{quadrantSpace:i}=t,{quadrantHeight:e,quadrantLeft:a,quadrantTop:r,quadrantWidth:s}=i,l=(0,n.BYU)().domain([0,1]).range([a,s+a]),o=(0,n.BYU)().domain([0,1]).range([e+r,r]);return this.data.points.map((t=>({x:l(t.x),y:o(t.y),fill:this.themeConfig.quadrantPointFill,radius:this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:l(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0}})))}getBorders(t){const i=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:e}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:r,quadrantHalfWidth:s,quadrantTop:l,quadrantWidth:o}=e;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r-i,y1:l,x2:r+o+i,y2:l},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r+o,y1:l+i,x2:r+o,y2:l+n-i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r-i,y1:l+n,x2:r+o+i,y2:l+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:r,y1:l+i,x2:r,y2:l+n-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:r+s,y1:l+i,x2:r+s,y2:l+n-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:r+i,y1:l+a,x2:r+o-i,y2:l+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),i=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),e=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,i,e);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,i,n),borderLines:this.getBorders(n),title:this.getTitle(e)}}},d={parser:s,db:{setWidth:function(t){c.setConfig({chartWidth:t})},setHeight:function(t){c.setConfig({chartHeight:t})},setQuadrant1Text:function(t){c.setData({quadrant1Text:h(t.text)})},setQuadrant2Text:function(t){c.setData({quadrant2Text:h(t.text)})},setQuadrant3Text:function(t){c.setData({quadrant3Text:h(t.text)})},setQuadrant4Text:function(t){c.setData({quadrant4Text:h(t.text)})},setXAxisLeftText:function(t){c.setData({xAxisLeftText:h(t.text)})},setXAxisRightText:function(t){c.setData({xAxisRightText:h(t.text)})},setYAxisTopText:function(t){c.setData({yAxisTopText:h(t.text)})},setYAxisBottomText:function(t){c.setData({yAxisBottomText:h(t.text)})},addPoint:function(t,i,e){c.addPoints([{x:i,y:e,text:h(t.text)}])},getQuadrantData:function(){const t=(0,a.c)(),{themeVariables:i,quadrantChart:e}=t;return e&&c.setConfig(e),c.setThemeConfig({quadrant1Fill:i.quadrant1Fill,quadrant2Fill:i.quadrant2Fill,quadrant3Fill:i.quadrant3Fill,quadrant4Fill:i.quadrant4Fill,quadrant1TextFill:i.quadrant1TextFill,quadrant2TextFill:i.quadrant2TextFill,quadrant3TextFill:i.quadrant3TextFill,quadrant4TextFill:i.quadrant4TextFill,quadrantPointFill:i.quadrantPointFill,quadrantPointTextFill:i.quadrantPointTextFill,quadrantXAxisTextFill:i.quadrantXAxisTextFill,quadrantYAxisTextFill:i.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:i.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:i.quadrantInternalBorderStrokeFill,quadrantTitleFill:i.quadrantTitleFill}),c.setData({titleText:(0,a.r)()}),c.build()},clear:function(){c.clear(),(0,a.t)()},setAccTitle:a.s,getAccTitle:a.g,setDiagramTitle:a.q,getDiagramTitle:a.r,getAccDescription:a.a,setAccDescription:a.b},renderer:{draw:(t,i,e,r)=>{var s,l,o;function h(t){return"top"===t?"hanging":"middle"}function c(t){return"left"===t?"start":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}const u=(0,a.c)();a.l.debug("Rendering quadrant chart\n"+t);const x=u.securityLevel;let g;"sandbox"===x&&(g=(0,n.Ys)("#i"+i));const f=("sandbox"===x?(0,n.Ys)(g.nodes()[0].contentDocument.body):(0,n.Ys)("body")).select(`[id="${i}"]`),y=f.append("g").attr("class","main"),p=(null==(s=u.quadrantChart)?void 0:s.chartWidth)||500,q=(null==(l=u.quadrantChart)?void 0:l.chartHeight)||500;(0,a.i)(f,q,p,(null==(o=u.quadrantChart)?void 0:o.useMaxWidth)||!0),f.attr("viewBox","0 0 "+p+" "+q),r.db.setHeight(q),r.db.setWidth(p);const T=r.db.getQuadrantData(),A=y.append("g").attr("class","quadrants"),m=y.append("g").attr("class","border"),_=y.append("g").attr("class","data-points"),b=y.append("g").attr("class","labels"),S=y.append("g").attr("class","title");T.title&&S.append("text").attr("x",0).attr("y",0).attr("fill",T.title.fill).attr("font-size",T.title.fontSize).attr("dominant-baseline",h(T.title.horizontalPos)).attr("text-anchor",c(T.title.verticalPos)).attr("transform",d(T.title)).text(T.title.text),T.borderLines&&m.selectAll("line").data(T.borderLines).enter().append("line").attr("x1",(t=>t.x1)).attr("y1",(t=>t.y1)).attr("x2",(t=>t.x2)).attr("y2",(t=>t.y2)).style("stroke",(t=>t.strokeFill)).style("stroke-width",(t=>t.strokeWidth));const k=A.selectAll("g.quadrant").data(T.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),k.append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>h(t.text.horizontalPos))).attr("text-anchor",(t=>c(t.text.verticalPos))).attr("transform",(t=>d(t.text))).text((t=>t.text.text)),b.selectAll("g.label").data(T.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((t=>t.text)).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>h(t.horizontalPos))).attr("text-anchor",(t=>c(t.verticalPos))).attr("transform",(t=>d(t)));const F=_.selectAll("g.data-point").data(T.points).enter().append("g").attr("class","data-point");F.append("circle").attr("cx",(t=>t.x)).attr("cy",(t=>t.y)).attr("r",(t=>t.radius)).attr("fill",(t=>t.fill)),F.append("text").attr("x",0).attr("y",0).text((t=>t.text.text)).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>h(t.text.horizontalPos))).attr("text-anchor",(t=>c(t.text.verticalPos))).attr("transform",(t=>d(t.text)))}},styles:()=>""}}}]);