Created
October 15, 2024 14:48
-
-
Save alonsosilvaallende/97f2d9c29fdf743644b5d760fedd38b9 to your computer and use it in GitHub Desktop.
Untitled48.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"provenance": [], | |
"authorship_tag": "ABX9TyP74LiSoUtxnhhz+ST/0m0h", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"language_info": { | |
"name": "python" | |
}, | |
"widgets": { | |
"application/vnd.jupyter.widget-state+json": { | |
"f15af6510190464184d470ed7ad7f941": { | |
"model_module": "jupyter-vue", | |
"model_name": "HtmlModel", | |
"model_module_version": "^1.11.1", | |
"state": { | |
"_dom_classes": [], | |
"_events": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vue", | |
"_model_module_version": "^1.11.1", | |
"_model_name": "HtmlModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vue", | |
"_view_module_version": "^1.11.1", | |
"_view_name": "VueView", | |
"attributes": {}, | |
"children": [], | |
"class_": null, | |
"layout": null, | |
"slot": null, | |
"style_": "display: none", | |
"tag": "span", | |
"v_model": "!!disabled!!", | |
"v_on": null, | |
"v_slots": [] | |
} | |
}, | |
"02dc739d23be4522a3515ba385d7dd55": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"cc465fd1b1964bc6883b083fc2290dfc": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"77915af0d79548fe8a71c2e86d9a3b3d": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "TextareaModel", | |
"model_module_version": "^1.8.5", | |
"state": { | |
"_dom_classes": [], | |
"_events": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_metadata": null, | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.8.5", | |
"_model_name": "TextareaModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.8.5", | |
"_view_name": "VuetifyView", | |
"append_icon": null, | |
"append_outer_icon": null, | |
"attributes": {}, | |
"auto_grow": true, | |
"autofocus": null, | |
"background_color": null, | |
"children": [], | |
"class_": null, | |
"clear_icon": null, | |
"clearable": null, | |
"color": null, | |
"counter": null, | |
"dark": null, | |
"dense": null, | |
"disabled": false, | |
"error": false, | |
"error_count": null, | |
"error_messages": null, | |
"filled": null, | |
"flat": null, | |
"full_width": null, | |
"height": null, | |
"hide_details": true, | |
"hint": null, | |
"id": null, | |
"label": "Enter some text:", | |
"layout": null, | |
"light": null, | |
"loader_height": null, | |
"loading": null, | |
"messages": [], | |
"no_resize": null, | |
"outlined": true, | |
"persistent_hint": null, | |
"placeholder": null, | |
"prefix": null, | |
"prepend_icon": null, | |
"prepend_inner_icon": null, | |
"readonly": null, | |
"reverse": null, | |
"rounded": null, | |
"row_height": null, | |
"rows": 5, | |
"rules": null, | |
"shaped": null, | |
"single_line": null, | |
"slot": null, | |
"solo": true, | |
"solo_inverted": null, | |
"style_": null, | |
"success": null, | |
"success_messages": null, | |
"suffix": null, | |
"type": null, | |
"v_model": "Hello\n\nThis is great!", | |
"v_on": null, | |
"v_slots": [], | |
"validate_on_blur": null, | |
"value": null | |
} | |
}, | |
"6f2f01d1e7b042c39aece0c5a54b6419": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_cc465fd1b1964bc6883b083fc2290dfc", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"e488cb58d68c484ba12ca9f573d60af0": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "SheetModel", | |
"model_module_version": "^1.8.5", | |
"state": { | |
"_dom_classes": [], | |
"_events": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_metadata": null, | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.8.5", | |
"_model_name": "SheetModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.8.5", | |
"_view_name": "VuetifyView", | |
"attributes": {}, | |
"children": [ | |
"IPY_MODEL_77915af0d79548fe8a71c2e86d9a3b3d", | |
"IPY_MODEL_0c1f33ad5b0f41c2876eaf6dc2df9bb9" | |
], | |
"class_": "d-flex ma-0", | |
"color": null, | |
"dark": null, | |
"elevation": 0, | |
"height": null, | |
"layout": null, | |
"light": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"slot": null, | |
"style_": "flex-direction: column; align-items: stretch; row-gap: 12px;;", | |
"tag": null, | |
"tile": null, | |
"v_model": "!!disabled!!", | |
"v_on": null, | |
"v_slots": [], | |
"width": null | |
} | |
}, | |
"dc2b7feba0334ee5b5a266c75460eddf": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "ColModel", | |
"model_module_version": "^1.8.5", | |
"state": { | |
"_dom_classes": [], | |
"_events": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_metadata": null, | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.8.5", | |
"_model_name": "ColModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.8.5", | |
"_view_name": "VuetifyView", | |
"align_self": null, | |
"attributes": {}, | |
"children": [ | |
"IPY_MODEL_e488cb58d68c484ba12ca9f573d60af0" | |
], | |
"class_": null, | |
"cols": 12, | |
"layout": null, | |
"lg": null, | |
"md": null, | |
"offset": null, | |
"offset_lg": null, | |
"offset_md": null, | |
"offset_sm": null, | |
"offset_xl": null, | |
"order": null, | |
"order_lg": null, | |
"order_md": null, | |
"order_sm": null, | |
"order_xl": null, | |
"slot": null, | |
"sm": null, | |
"style_": null, | |
"tag": null, | |
"v_model": "!!disabled!!", | |
"v_on": null, | |
"v_slots": [], | |
"xl": null | |
} | |
}, | |
"236b5a265eb547989fcbd6cd18c642f3": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "RowModel", | |
"model_module_version": "^1.8.5", | |
"state": { | |
"_dom_classes": [], | |
"_events": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_metadata": null, | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.8.5", | |
"_model_name": "RowModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.8.5", | |
"_view_name": "VuetifyView", | |
"align": null, | |
"align_content": null, | |
"align_content_lg": null, | |
"align_content_md": null, | |
"align_content_sm": null, | |
"align_content_xl": null, | |
"align_lg": null, | |
"align_md": null, | |
"align_sm": null, | |
"align_xl": null, | |
"attributes": {}, | |
"children": [ | |
"IPY_MODEL_dc2b7feba0334ee5b5a266c75460eddf" | |
], | |
"class_": "solara-content-main", | |
"dense": null, | |
"justify": null, | |
"justify_lg": null, | |
"justify_md": null, | |
"justify_sm": null, | |
"justify_xl": null, | |
"layout": null, | |
"no_gutters": false, | |
"slot": null, | |
"style_": null, | |
"tag": null, | |
"v_model": "!!disabled!!", | |
"v_on": null, | |
"v_slots": [] | |
} | |
}, | |
"eba364c8a6f541fdbbc51706b128ac91": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "HtmlModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_dom_classes": [], | |
"_events": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "HtmlModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"attributes": {}, | |
"children": [ | |
"IPY_MODEL_236b5a265eb547989fcbd6cd18c642f3" | |
], | |
"class_": null, | |
"layout": null, | |
"slot": null, | |
"style_": null, | |
"tag": "div", | |
"v_model": "!!disabled!!", | |
"v_on": null, | |
"v_slots": [] | |
} | |
}, | |
"60e81dd878c24a6aa3dd3d01df72e92f": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "VBoxModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "VBoxModel", | |
"_view_count": 1, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "VBoxView", | |
"box_style": "", | |
"children": [ | |
"IPY_MODEL_eba364c8a6f541fdbbc51706b128ac91" | |
], | |
"layout": "IPY_MODEL_02dc739d23be4522a3515ba385d7dd55" | |
} | |
}, | |
"3132abacf66a408d9203165697bbb634": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"8ea962bcc0314c628228e83fba370ce2": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_3132abacf66a408d9203165697bbb634", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>H</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"fa1fc5950cb54c4389d5c9099bf7b9c1": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"a31c78d66105405e92803ffab2e1f40b": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_fa1fc5950cb54c4389d5c9099bf7b9c1", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hell</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"7e82ad3a7ebe42b9912a936de43145b7": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"42079c3ed0404b338716711d6482e015": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_7e82ad3a7ebe42b9912a936de43145b7", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"d53f448cd59f4c3a9ffaee0fb46521a3": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"bbf443b9fe49487ca61ad30259c71989": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_d53f448cd59f4c3a9ffaee0fb46521a3", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"e539068d9b1e4c6b8067cf5786d272ce": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"6cb2ab24a7f042edaacc540bf127c171": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_e539068d9b1e4c6b8067cf5786d272ce", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This i</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"08520190ac244f9b9e09898b5c4a342d": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"73fe17c49b4648ba8b657c6e1e3b517f": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_08520190ac244f9b9e09898b5c4a342d", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"4d2109e71ea641af8c6b3338582fd2f5": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"9e530d83fb99492f89360069e6ef0e4d": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_4d2109e71ea641af8c6b3338582fd2f5", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is grea</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"36c6d75ea72b4d308767329a3dae2160": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"c4091eec05b741ab9cfb26886cb4df0b": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_36c6d75ea72b4d308767329a3dae2160", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"a133882c42d34a6b9fa73cf30014847f": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"7ee82010ff6341b08f186d44835ae3e5": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_a133882c42d34a6b9fa73cf30014847f", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great </p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"2b427a2fc91b486ca4004f2f839276c4": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"ad8401845fb94716a7732af2955e7af3": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_2b427a2fc91b486ca4004f2f839276c4", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"7afbb75c60b94aa680aa51d7735aa64c": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"d117cdd43b8a40a4abe4b77a1a96f3be": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_7afbb75c60b94aa680aa51d7735aa64c", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for LL</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"e1b014f7eb9b43aab711b15f247acaf2": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"95e363911d604008ad3d907909786fb7": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_e1b014f7eb9b43aab711b15f247acaf2", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for LLMS</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"8fa8c54f1f794878907d4bc43bec8fb6": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"1fa94689d0de4c679be37be0e141946f": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_8fa8c54f1f794878907d4bc43bec8fb6", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for LLM</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"bd4cee60ef724ff8b25507842218a08e": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"39e8bf0e7dd24b7caf9f87a2446b28e7": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_bd4cee60ef724ff8b25507842218a08e", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for LLMs</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"887a300b163d49e79523fea51747bbf4": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"a700a5e0ad6d4f58bc7e7673d041a578": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_887a300b163d49e79523fea51747bbf4", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for l</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"36441b5e80e64652b79c5424860af4c6": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"7e2158a6c306484bbb3c021deab645c1": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_36441b5e80e64652b79c5424860af4c6", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for long</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"00f3a91febf7478ebeba382415aef32c": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"7fc8e7a1b5f540d7b9644a2dee904483": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_00f3a91febf7478ebeba382415aef32c", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for long p</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"4fc95acb15b2408f9e9b2306cf3e2b7e": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"f8aa76c42d85405abbbe06c83830aabe": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_4fc95acb15b2408f9e9b2306cf3e2b7e", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for long promp</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"1f84329c156f4f7cb967b715817678e5": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"353b746162864fcda6c70be7e0072b98": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_1f84329c156f4f7cb967b715817678e5", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for long prompts</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"9e3b37e999af42c48850598378eabcdc": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"3a761a41aa49449fa2a2c4d77fa24cdc": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_9e3b37e999af42c48850598378eabcdc", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for long prompts </p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"9da0bb183a744faba7a0b29c5b1d131b": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"62a8a763f90442249734794ede30c4f5": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_9da0bb183a744faba7a0b29c5b1d131b", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for long prompts for </p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"604e0aee6a7e48328c33169bacfa0562": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"b98d09ae4edd41bfabbe8ab9e95f56e1": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_604e0aee6a7e48328c33169bacfa0562", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for long prompts for LL</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"3d6f646bab4a4ce484d458feaec7eee8": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"9253dc571de741afae4c1befc63e79d4": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_3d6f646bab4a4ce484d458feaec7eee8", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great for long prompts for LLMs</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"d581daef9984452683d7fa0750b786f3": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"0c1f33ad5b0f41c2876eaf6dc2df9bb9": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.10.0", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_4716d723ca9f4e8e9b7409cb6031d6bf", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.10.0", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.10.0", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_d581daef9984452683d7fa0750b786f3", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><p>Hello</p>\n<p>This is great!</p></div>\n</template>\n\n<script>\nmodule.exports = {\n async mounted() {\n this.cdn = 'https://cdn.jsdelivr.net/npm/';\n await this.loadRequire();\n this.mermaid = await this.loadMermaid();\n this.mermaid.init();\n this.latexSettings = {\n delimiters: [\n {left: \"$$\", right: \"$$\", display: true},\n {left: \"$\", right: \"$\", display: false},\n {left: \"\\\\[\", right: \"\\\\]\", display: true},\n {left: \"\\\\(\", right: \"\\\\)\", display: false}\n ]\n };\n if (window.renderMathInElement) {\n window.renderMathInElement(this.$el, this.latexSettings);\n } else if (window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement = await this.loadKatexExt();\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n }\n let authLink = href.startsWith(\"/_solara/auth/\");\n if( (href.startsWith(\"./\") || href.startsWith(\"/\")) && !authLink) {\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n },\n async loadKatex() {\n require.config({\n map: {\n '*': {\n 'katex': `${this.getCdn()}/[email protected]/dist/katex.min.js`,\n }\n }\n });\n const link = document.createElement('link');\n link.type = \"text/css\";\n link.rel = \"stylesheet\";\n link.href = `${this.getCdn()}/[email protected]/dist/katex.min.css`;\n document.head.appendChild(link);\n },\n async loadKatexExt() {\n this.loadKatex();\n return (await this.import([`${this.getCdn()}/[email protected]/dist/contrib/auto-render.min.js`]))[0]\n },\n async loadMermaid() {\n return (await this.import([`${this.getCdn()}/[email protected]/dist/mermaid.min.js`]))[0]\n },\n import(dependencies) {\n return this.loadRequire().then(\n () => {\n if (window.jupyterVue) {\n // in jupyterlab, we take Vue from ipyvue/jupyterVue\n define(\"vue\", [], () => window.jupyterVue.Vue);\n } else {\n define(\"vue\", ['jupyter-vue'], jupyterVue => jupyterVue.Vue);\n }\n return new Promise((resolve, reject) => {\n requirejs(dependencies, (...modules) => resolve(modules));\n })\n }\n );\n },\n loadRequire() {\n if (window.requirejs) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.min.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getJupyterBaseUrl() {\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return this.cdn || (window.solara ? window.solara.cdn : `${this.getJupyterBaseUrl()}_solara/cdn`);\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n this.mermaid.init();\n\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n } else {\n window.renderMathInElement(this.$el, this.latexSettings);\n }\n }\n}\n</script>\n " | |
} | |
} | |
} | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/alonsosilvaallende/97f2d9c29fdf743644b5d760fedd38b9/untitled48.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"id": "iuvPg9m8mqCe" | |
}, | |
"outputs": [], | |
"source": [ | |
"%pip install --upgrade --quiet solara" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"import solara\n", | |
"\n", | |
"@solara.component\n", | |
"def Page():\n", | |
" text = solara.use_reactive(\"\")\n", | |
" solara.InputTextArea(\"Enter some text:\", value=text, continuous_update=True)\n", | |
" solara.Markdown(text.value)" | |
], | |
"metadata": { | |
"id": "YeP4GVhVms27" | |
}, | |
"execution_count": 2, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"Page()" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 257, | |
"referenced_widgets": [ | |
"f15af6510190464184d470ed7ad7f941", | |
"02dc739d23be4522a3515ba385d7dd55", | |
"cc465fd1b1964bc6883b083fc2290dfc", | |
"77915af0d79548fe8a71c2e86d9a3b3d", | |
"6f2f01d1e7b042c39aece0c5a54b6419", | |
"e488cb58d68c484ba12ca9f573d60af0", | |
"dc2b7feba0334ee5b5a266c75460eddf", | |
"236b5a265eb547989fcbd6cd18c642f3", | |
"eba364c8a6f541fdbbc51706b128ac91", | |
"60e81dd878c24a6aa3dd3d01df72e92f", | |
"3132abacf66a408d9203165697bbb634", | |
"8ea962bcc0314c628228e83fba370ce2", | |
"fa1fc5950cb54c4389d5c9099bf7b9c1", | |
"a31c78d66105405e92803ffab2e1f40b", | |
"7e82ad3a7ebe42b9912a936de43145b7", | |
"42079c3ed0404b338716711d6482e015", | |
"d53f448cd59f4c3a9ffaee0fb46521a3", | |
"bbf443b9fe49487ca61ad30259c71989", | |
"e539068d9b1e4c6b8067cf5786d272ce", | |
"6cb2ab24a7f042edaacc540bf127c171", | |
"08520190ac244f9b9e09898b5c4a342d", | |
"73fe17c49b4648ba8b657c6e1e3b517f", | |
"4d2109e71ea641af8c6b3338582fd2f5", | |
"9e530d83fb99492f89360069e6ef0e4d", | |
"36c6d75ea72b4d308767329a3dae2160", | |
"c4091eec05b741ab9cfb26886cb4df0b", | |
"a133882c42d34a6b9fa73cf30014847f", | |
"7ee82010ff6341b08f186d44835ae3e5", | |
"2b427a2fc91b486ca4004f2f839276c4", | |
"ad8401845fb94716a7732af2955e7af3", | |
"7afbb75c60b94aa680aa51d7735aa64c", | |
"d117cdd43b8a40a4abe4b77a1a96f3be", | |
"e1b014f7eb9b43aab711b15f247acaf2", | |
"95e363911d604008ad3d907909786fb7", | |
"8fa8c54f1f794878907d4bc43bec8fb6", | |
"1fa94689d0de4c679be37be0e141946f", | |
"bd4cee60ef724ff8b25507842218a08e", | |
"39e8bf0e7dd24b7caf9f87a2446b28e7", | |
"887a300b163d49e79523fea51747bbf4", | |
"a700a5e0ad6d4f58bc7e7673d041a578", | |
"36441b5e80e64652b79c5424860af4c6", | |
"7e2158a6c306484bbb3c021deab645c1", | |
"00f3a91febf7478ebeba382415aef32c", | |
"7fc8e7a1b5f540d7b9644a2dee904483", | |
"4fc95acb15b2408f9e9b2306cf3e2b7e", | |
"f8aa76c42d85405abbbe06c83830aabe", | |
"1f84329c156f4f7cb967b715817678e5", | |
"353b746162864fcda6c70be7e0072b98", | |
"9e3b37e999af42c48850598378eabcdc", | |
"3a761a41aa49449fa2a2c4d77fa24cdc", | |
"9da0bb183a744faba7a0b29c5b1d131b", | |
"62a8a763f90442249734794ede30c4f5", | |
"604e0aee6a7e48328c33169bacfa0562", | |
"b98d09ae4edd41bfabbe8ab9e95f56e1", | |
"3d6f646bab4a4ce484d458feaec7eee8", | |
"9253dc571de741afae4c1befc63e79d4", | |
"d581daef9984452683d7fa0750b786f3", | |
"0c1f33ad5b0f41c2876eaf6dc2df9bb9" | |
] | |
}, | |
"id": "hCkriwb-nHa7", | |
"outputId": "4104f9da-f1de-4aa2-cb6e-2fd220c8dee8" | |
}, | |
"execution_count": 3, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"Html(layout=None, style_='display: none', tag='span')" | |
], | |
"application/vnd.jupyter.widget-view+json": { | |
"version_major": 2, | |
"version_minor": 0, | |
"model_id": "f15af6510190464184d470ed7ad7f941" | |
} | |
}, | |
"metadata": { | |
"application/vnd.jupyter.widget-view+json": { | |
"colab": { | |
"custom_widget_manager": { | |
"url": "https://ssl.gstatic.com/colaboratory-static/widgets/colab-cdn-widget-manager/2b70e893a8ba7c0f/manager.min.js" | |
} | |
} | |
} | |
} | |
}, | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"Cannot show ipywidgets in text" | |
], | |
"text/html": [ | |
"Cannot show widget. You probably want to rerun the code cell above (<i>Click in the code cell, and press Shift+Enter <kbd>⇧</kbd>+<kbd>↩</kbd></i>)." | |
], | |
"application/vnd.jupyter.widget-view+json": { | |
"version_major": 2, | |
"version_minor": 0, | |
"model_id": "60e81dd878c24a6aa3dd3d01df72e92f" | |
} | |
}, | |
"metadata": { | |
"application/vnd.jupyter.widget-view+json": { | |
"colab": { | |
"custom_widget_manager": { | |
"url": "https://ssl.gstatic.com/colaboratory-static/widgets/colab-cdn-widget-manager/2b70e893a8ba7c0f/manager.min.js" | |
} | |
} | |
} | |
} | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [], | |
"metadata": { | |
"id": "yB9BnzeynIvL" | |
}, | |
"execution_count": 3, | |
"outputs": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment