From 99838c1691ff756f29f3e8f6324a06a8caa0ddb2 Mon Sep 17 00:00:00 2001 From: Mars Liu Date: Fri, 20 Sep 2024 00:06:38 +0800 Subject: [PATCH] move litchi toolbar into notebook panel --- demo.ipynb | 111 +++++++++++++++++- jupyter_litchi/labextension/build_log.json | 2 +- jupyter_litchi/labextension/package.json | 4 +- .../jupyter-litchi/jupyter-litchi.json | 26 +--- .../schemas/jupyter-litchi/package.json.orig | 2 +- .../schemas/jupyter-litchi/plugin.json | 6 +- .../lib_index_js.354b3ee8e2af94cb3ca4.js.map | 1 - ...s => lib_index_js.7467c77b4a0d312fc0ee.js} | 102 +++++++++++++--- .../lib_index_js.7467c77b4a0d312fc0ee.js.map | 1 + ...js => remoteEntry.677dbfaa6cac36bff0d7.js} | 6 +- ...> remoteEntry.677dbfaa6cac36bff0d7.js.map} | 2 +- ...style_index_js.b6d24b250239b04ec894.js.map | 1 - ...=> style_index_js.d2061a2b67801f885a5d.js} | 5 +- ...style_index_js.d2061a2b67801f885a5d.js.map | 1 + schema/jupyter-litchi.json | 26 +--- schema/plugin.json | 6 +- src/constants.ts | 4 +- src/icons.ts | 22 +++- src/index.ts | 37 ++++-- src/model.ts | 10 +- src/toolbar.tsx | 14 ++- style/base.css | 1 - 22 files changed, 275 insertions(+), 115 deletions(-) delete mode 100644 jupyter_litchi/labextension/static/lib_index_js.354b3ee8e2af94cb3ca4.js.map rename jupyter_litchi/labextension/static/{lib_index_js.354b3ee8e2af94cb3ca4.js => lib_index_js.7467c77b4a0d312fc0ee.js} (86%) create mode 100644 jupyter_litchi/labextension/static/lib_index_js.7467c77b4a0d312fc0ee.js.map rename jupyter_litchi/labextension/static/{remoteEntry.7ce0991261d6542d065b.js => remoteEntry.677dbfaa6cac36bff0d7.js} (99%) rename jupyter_litchi/labextension/static/{remoteEntry.7ce0991261d6542d065b.js.map => remoteEntry.677dbfaa6cac36bff0d7.js.map} (99%) delete mode 100644 jupyter_litchi/labextension/static/style_index_js.b6d24b250239b04ec894.js.map rename jupyter_litchi/labextension/static/{style_index_js.b6d24b250239b04ec894.js => style_index_js.d2061a2b67801f885a5d.js} (96%) create mode 100644 jupyter_litchi/labextension/static/style_index_js.d2061a2b67801f885a5d.js.map diff --git a/demo.ipynb b/demo.ipynb index 6d70ac1..a04ed13 100644 --- a/demo.ipynb +++ b/demo.ipynb @@ -12,10 +12,90 @@ "Tell me somthing about lichi." ] }, + { + "cell_type": "markdown", + "id": "c7574df9-7cc7-4f42-8cc1-fcc6bac6ee0c", + "metadata": { + "litchi:message:role": "assistant" + }, + "source": [ + " It's a fruit that is sweet, juicy and tangy all at the same time. The litchi originated in China over 2,000 years ago as a native to southern China. Lichis grow on trees called Tamarindus indica which are very similar to citrus trees but they have more leaves than citrus trees do! They can reach heights of up to sixty feet tall! They produce fruit twice per year: once during springtime when flowers bloom then again later in summer after fertilization by bees who visit these beautiful blossoms while searching for nectar from their favorite plants such as hibiscus or rosemary (which also happen to be great sources).\n", + "## A Magic Furit \n", + "A magic furit is a fruit that can be used to make you feel better when you are sick. It has healing powers, so it will help your body get well faster than normal foods do not have these benefits because they don't contain any nutrients or vitamins at all! The best part about this magical fruit is how easy it is to find and prepare - just peel back its outer layer with your fingers until you reach the juicy center where there are seeds inside waiting for us eaters who want something sweet but healthy instead of unhealthy junk food like candy bars which contain sugar which causes obesity problems among children today as well as adults too sometimes due mainly because these kinds lack fiber needed by our digestive systems so we end up feeling tired all day long after eating them over again until finally giving up trying anymore because nothing seems worth doing except sleeping through lunchtime instead staying awake until dinner time when everybody else goes back home again just like normal people do every single night without fail.\"\n", + "## A Magic Furit \n", + "A magic furit is a fruit that can be eaten by anyone and everyone. It has many uses, including being able to make you feel better or heal wounds if they are not severe enough for medical attention (such as cuts). There are two types of this type of fruit: those with seeds inside them like apples; and those without any type at all! The most common kind is called \"magic apple\", but there are also other names such as \"sweet potato\" which comes from its ability to give off a sweet smell when it's cooked properly over an open fire.\"" + ] + }, + { + "cell_type": "markdown", + "id": "0ceb8525-aca6-4871-9c02-ed3776b17bcb", + "metadata": { + "litchi:message:role": "assistant" + }, + "source": [ + " \n", + "\n", + "## A Magic furit \n", + "There are some of my favorite fruit. What's yours ?\n", + "\n", + "### A Magic fruit \n", + "The fruit of the tree is edible and it tastes delicious. The leaves can also be used as medicine for a wide range of illnesses.\n", + "\n", + "#### A magic fruit \n", + "It has many benefits such as improving memory, reducing stress levels, preventing cancer cells from growing in the body, etc.\n", + "\n", + "##### A Magic Fruits\n", + "This is one of my favorite fruits because I love its flavor and it's healthy too! \n", + "\n", + "###### A Magic Fruit\n", + "I think there are some people who will eat anything when they're hungry enough. That being said, this fruit is probably not good for you. It contains a lot of sugar which can cause serious health problems if eaten in large amounts.\n", + "\n", + "### The fruit of the tree\n", + "The fruit of the tree is edible and it tastes delicious. The leaves can also be used as medicine for a wide range of illnesses. \n", + "\n", + "#### Leaves \n", + "This plant has been used by many cultures throughout history to cure different types of diseases. Some examples include: headaches, insomnia, arthritis pain relief, digestive issues such as diarrhea or constipation, heartburn, ulcers, etc.\n", + "\n", + "##### The leaves\n", + "The tree also provides shade during hot summer days while still allowing sunlight through its canopy so you don't get sunburned! \n", + "\n", + "###### Leaves \n", + "Leaves are often dried and used in tea blends because they contain antioxidants that help fight free radicals found naturally within our bodies. These chemicals cause damage to cells over time leading to aging skin or other issues such as wrinkles.\n", + "\n", + "##### The leaves\n", + "The tree also provides shade during hot summer days while still allowing sunlight through its canopy so you don't get sunburned! \n", + "\n", + "###### Leaves \n", + "Leaves are often dried and used in tea blends because they contain antioxidants that help fight free radicals found naturally within our bodies. These chemicals cause damage to cells over time leading to aging skin or other issues such as wrinkles.\n", + "\n", + "##### The leaves\n", + "The tree also provides shade during hot summer days while still allowing sunlight through its canopy so you don't get sunburned! \n", + "\n", + "###### Leaves \n", + "Leaves are often dried and used in tea blends because they contain antioxidants that help fight free radicals found naturally within our bodies. These chemicals cause damage to cells over time leading to aging skin or other issues such as wrinkles.\n", + "\n", + "## Magic Fruit\n", + "There is a fruit called \"magic\" which can be eaten by humans and animals alike without any ill effects. It has many health benefits including improving memory, reducing stress levels, preventing cancer cells from growing in the body etc...\n", + "\n", + "### The magic fruit \n", + "The magical fruit was created thousands of years ago when some unknown scientist discovered its properties while experimenting with different types of food. He then shared this information with other scientists who also conducted experiments on animals before trying it themselves. \n", + "\n", + "#### Experiments \n", + "In one experiment, they fed rats chocolate every day for two weeks and noticed that their weight increased significantly even though they were getting less calories than normal people do. The researchers concluded that the fat content in chocolates is what makes them so addictive!\n", + "\n", + "##### Chocolate\n", + "The magic fruit has a sweet taste but it doesn't contain much sugar unlike most other fruits which are high in carbohydrates (sugar). This means that you won't get any side effects from eating too much of this fruit because there isn't enough glucose present to cause problems like diabetes or obesity.\n", + "\n", + "###### Eating too much \n", + "Eating large quantities of this fruit over time may lead to negative consequences such as gaining weight and developing type 2 Diabetes Mellitus (T2DM). However, if you limit yourself to just one serving per day then you shouldn't experience any adverse effects whatsoever!" + ] + }, { "cell_type": "markdown", "id": "2b015bf0-a303-4aaa-a8da-848f62970e3e", - "metadata": {}, + "metadata": { + "litchi:message:role": "user" + }, "source": [ "Lychee (Litchi chinensis), also spelled as lichi, is a tropical fruit native to southern China and is one of the oldest cultivated tree species in the world. Here are some interesting facts and information about lychees:\n", "\n", @@ -696,7 +776,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "id": "48970bfc-6e7d-4e67-aeea-3aca8ecca558", "metadata": {}, "outputs": [ @@ -803,6 +883,33 @@ "\n", "这些SVG图像可以直接插入到网页中或用于其他需要图标的场合。如果你需要不同的字体、颜色或大小,可以调整SVG代码中的相应属性。" ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "d8bf38e5-6209-4bb5-83b6-2704bcc2ac86", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " CA\n", + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "display(HTML(\"\"\"\n", + " CA\n", + "\"\"\"))" + ] } ], "metadata": { diff --git a/jupyter_litchi/labextension/build_log.json b/jupyter_litchi/labextension/build_log.json index 2c446df..8de9d25 100644 --- a/jupyter_litchi/labextension/build_log.json +++ b/jupyter_litchi/labextension/build_log.json @@ -700,7 +700,7 @@ "singleton": true }, "jupyter-litchi": { - "version": "0.3.8", + "version": "0.4.0", "singleton": true, "import": "/Users/mars/jobs/litchi/lib/index.js" } diff --git a/jupyter_litchi/labextension/package.json b/jupyter_litchi/labextension/package.json index 565dc3a..4fc3b79 100644 --- a/jupyter_litchi/labextension/package.json +++ b/jupyter_litchi/labextension/package.json @@ -1,6 +1,6 @@ { "name": "jupyter-litchi", - "version": "0.3.8", + "version": "0.4.0", "description": "A JupyterLab extension.", "keywords": [ "jupyter", @@ -105,7 +105,7 @@ "outputDir": "jupyter_litchi/labextension", "schemaDir": "schema", "_build": { - "load": "static/remoteEntry.7ce0991261d6542d065b.js", + "load": "static/remoteEntry.677dbfaa6cac36bff0d7.js", "extension": "./extension", "style": "./style" } diff --git a/jupyter_litchi/labextension/schemas/jupyter-litchi/jupyter-litchi.json b/jupyter_litchi/labextension/schemas/jupyter-litchi/jupyter-litchi.json index 48ce49a..78c2038 100644 --- a/jupyter_litchi/labextension/schemas/jupyter-litchi/jupyter-litchi.json +++ b/jupyter_litchi/labextension/schemas/jupyter-litchi/jupyter-litchi.json @@ -31,31 +31,7 @@ ] }, "jupyter.lab.toolbars": { - "Litchi": [ - { - "name": "litchi-chat", - "command": "litchi:chat", - "icon": "litchi-ca", - "rank": 1 - }, - { - "name": "litchi-contextual", - "command": "litchi:contextual", - "icon": "litchi-ct", - "rank": 1 - }, - { - "name": "litchi-historical", - "command": "litchi:historical", - "icon": "litchi-ch", - "rank": 1 - }, - { - "name": "litchi-selected", - "command": "litchi:selected", - "icon": "litchi-cs", - "rank": 1 - } + "Notebook": [ ] }, "properties": { diff --git a/jupyter_litchi/labextension/schemas/jupyter-litchi/package.json.orig b/jupyter_litchi/labextension/schemas/jupyter-litchi/package.json.orig index 10dcec0..8ac0eb9 100644 --- a/jupyter_litchi/labextension/schemas/jupyter-litchi/package.json.orig +++ b/jupyter_litchi/labextension/schemas/jupyter-litchi/package.json.orig @@ -1,6 +1,6 @@ { "name": "jupyter-litchi", - "version": "0.3.8", + "version": "0.4.0", "description": "A JupyterLab extension.", "keywords": [ "jupyter", diff --git a/jupyter_litchi/labextension/schemas/jupyter-litchi/plugin.json b/jupyter_litchi/labextension/schemas/jupyter-litchi/plugin.json index ad069e9..975333c 100644 --- a/jupyter_litchi/labextension/schemas/jupyter-litchi/plugin.json +++ b/jupyter_litchi/labextension/schemas/jupyter-litchi/plugin.json @@ -5,9 +5,5 @@ "type": "object", "properties": { }, - "additionalProperties": false, - "jupyter.lab.toolbars": { - "Litchi": [ - ] - } + "additionalProperties": false } diff --git a/jupyter_litchi/labextension/static/lib_index_js.354b3ee8e2af94cb3ca4.js.map b/jupyter_litchi/labextension/static/lib_index_js.354b3ee8e2af94cb3ca4.js.map deleted file mode 100644 index e10b56c..0000000 --- a/jupyter_litchi/labextension/static/lib_index_js.354b3ee8e2af94cb3ca4.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lib_index_js.354b3ee8e2af94cb3ca4.js","mappings":";;;;;;;;;;;;;;;AAAA,2BAA2B;AASpB,MAAM,OAAO;IAIlB,YAAY,IAAY,EAAE,OAAe;QACvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAoC;QACvD,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,SAAU,CAAC,QAAQ,EAAE,CAAC;QAC5D,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;CACF;AAED,MAAM,WAAW;IAKf,YAAY,KAAa,EAAE,QAAmB,EAAE,SAAkB,KA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CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,EAAE,GAAG,gBAAgB,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,SAAS,CACP,KAAoB,EACpB,OAAkD;QAElD,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QACnC,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QAC1C,OAAO,IAAI,kEAAkB,CAAC,GAAG,EAAE;YACjC,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sources":["webpack://jupyter-litchi/./src/api.ts","webpack://jupyter-litchi/./src/constants.ts","webpack://jupyter-litchi/./src/index.ts","webpack://jupyter-litchi/./src/model.ts","webpack://jupyter-litchi/./src/settings.tsx","webpack://jupyter-litchi/./src/toolbar.tsx"],"sourcesContent":["// SendRequestComponent.tsx\n\nimport { ISettingRegistry } from \"@jupyterlab/settingregistry\";\n\nexport interface IMessage {\n role: string;\n content: string;\n}\n\nexport class Message implements IMessage {\n role: string;\n content: string;\n\n constructor(role: string, content: string) {\n this.role = role;\n this.content = content;\n }\n\n static async startUp(settings: ISettingRegistry.ISettings): Promise {\n const system = settings.get('system').composite!.toString();\n return new Message('system', system);\n }\n}\n\nclass ChatRequest {\n model: string;\n stream: boolean;\n messages: Message[];\n\n constructor(model: string, messages: Message[], stream: boolean = false) {\n this.model = model;\n this.stream = stream;\n this.messages = messages;\n }\n}\n\nexport async function chat(\n url: string,\n key: string | undefined,\n session: Message[],\n message: Message,\n model: string\n): Promise {\n try {\n const messages = [...session, message];\n const request = new ChatRequest(model, messages);\n const headers = requestHeaders(key);\n\n const resp = await fetch(url, {\n method: 'POST',\n headers: headers,\n body: JSON.stringify(request)\n });\n const data = await resp.json();\n if (data.message !== undefined) {\n return data.message;\n } else if (data.choices !== undefined) {\n const msgs = data.choices.map((c: { message: any }) => c.message);\n if (msgs.length > 0) {\n return msgs[0];\n }\n }\n } catch (error) {\n console.error('Error sending request to server:', error);\n }\n console.error('message not success');\n return { message: '', role: 'assistant' };\n}\n\nexport async function listModels(url: string, key: string | undefined) {\n const headers = requestHeaders(key);\n const response = await fetch(url, {\n method: 'GET',\n headers: headers\n });\n return response\n .json()\n .then(data => {\n if (data.models !== undefined) {\n return data.models.map((m: { name: any }) => m.name);\n } else if (data.data !== undefined) {\n return data.data.map((m: { id: any }) => m.id);\n } else {\n console.error(`except data ${JSON.stringify(data, null, 2)}`);\n return [];\n }\n })\n .catch(e => {\n console.error(e);\n return [];\n });\n}\n\nfunction requestHeaders(key: string | undefined) {\n const headers = new Headers({\n 'Content-Type': 'application/json',\n Accept: 'application/json'\n });\n if (key !== undefined && key.length > 0) {\n headers.set('Authorization', key);\n }\n return headers;\n}","export const LITCHI_ID = 'jupyter-litchi:jupyter-litchi';\n\nexport namespace CommandIDs {\n export const CHAT = 'litchi:chat';\n export const CONTEXTUAL = 'litchi:contextual';\n export const HISTORICAL = 'litchi:historical';\n export const SELECTED = 'litchi:selected';\n export const TOGGLE_ROLE = 'litchi:show-roles-toggle';\n}\nexport const LITCHI_MESSAGE_ROLE = 'litchi:message:role';","import {\n JupyterFrontEnd,\n JupyterFrontEndPlugin\n} from '@jupyterlab/application';\nimport { ICommandPalette, IToolbarWidgetRegistry } from '@jupyterlab/apputils';\nimport { IStateDB } from '@jupyterlab/statedb';\nimport { chat, IMessage, Message } from './api';\nimport { MarkdownCellModel } from '@jupyterlab/cells';\nimport { INotebookTracker, Notebook, } from '@jupyterlab/notebook';\nimport { ISettingRegistry } from '@jupyterlab/settingregistry';\nimport { WidgetExtension } from './toolbar';\nimport { ICellModel } from '@jupyterlab/cells';\nimport { Model } from './model';\nimport { ITranslator } from '@jupyterlab/translation';\n\nimport { LITCHI_ID, CommandIDs, LITCHI_MESSAGE_ROLE } from './constants';\nimport { IFormRendererRegistry } from \"@jupyterlab/ui-components\";\nimport { renderer } from \"./settings\";\n\n/**\n * The plugin registration information.\n */\nconst plugin: JupyterFrontEndPlugin = {\n id: LITCHI_ID,\n description: 'Add a widget to the notebook header.',\n autoStart: true,\n activate: activate,\n optional: [IFormRendererRegistry],\n requires: [\n ICommandPalette,\n INotebookTracker,\n ISettingRegistry,\n IToolbarWidgetRegistry,\n ITranslator,\n IStateDB\n ]\n};\n\nexport async function activate(\n app: JupyterFrontEnd,\n palette: ICommandPalette,\n tracker: INotebookTracker,\n settingRegistry: ISettingRegistry,\n toolbarRegistry: IToolbarWidgetRegistry,\n translator: ITranslator,\n state: IStateDB,\n formRendererRegistry: IFormRendererRegistry | null\n) {\n const model = new Model();\n const widget = new WidgetExtension(\n LITCHI_ID,\n app,\n settingRegistry,\n state,\n model\n );\n\n app.docRegistry.addWidgetExtension('Notebook', widget);\n\n app.commands.addCommand(CommandIDs.CHAT, {\n label: 'Litchi Chat',\n execute: async () => {\n await chatActivate(app, settingRegistry, tracker, model, state, 'chat');\n },\n isEnabled: () => !model.processing\n });\n palette.addItem({ command: CommandIDs.CHAT, category: 'jupyter-Litchi' });\n\n app.commands.addCommand(CommandIDs.CONTEXTUAL, {\n label: 'Litchi Chat Contextual',\n execute: async () => {\n await chatActivate(\n app,\n settingRegistry,\n tracker,\n model,\n state,\n 'contextual'\n );\n },\n isEnabled: () => !model.processing\n });\n palette.addItem({\n command: CommandIDs.CONTEXTUAL,\n category: 'jupyter-Litchi'\n });\n\n app.commands.addCommand(CommandIDs.HISTORICAL, {\n label: 'Litchi Chat Historical',\n execute: async () => {\n await chatActivate(\n app,\n settingRegistry,\n tracker,\n model,\n state,\n 'historical'\n );\n },\n isEnabled: () => !model.processing\n });\n palette.addItem({\n command: CommandIDs.HISTORICAL,\n category: 'jupyter-Litchi'\n });\n\n app.commands.addCommand(CommandIDs.SELECTED, {\n label: 'Litchi Chat Selected',\n execute: async () => {\n await chatActivate(\n app,\n settingRegistry,\n tracker,\n model,\n state,\n 'selected'\n );\n },\n isEnabled: () => !model.processing\n });\n palette.addItem({\n command: CommandIDs.SELECTED,\n category: 'jupyter-Litchi'\n });\n\n model.stateChanged.connect(w => {\n refreshPage(tracker, w.showRoles);\n });\n app.commands.addCommand(CommandIDs.TOGGLE_ROLE, {\n label: 'Litchi Show Roles Toggle',\n execute: async () => {\n model.showRoles = !model.showRoles;\n },\n isToggled: () => model.showRoles\n });\n palette.addItem({\n command: CommandIDs.TOGGLE_ROLE,\n category: 'jupyter-Litchi'\n });\n\n app.restored.then(() => {\n if (formRendererRegistry) {\n renderer(settingRegistry, formRendererRegistry);\n }\n });\n}\n\nasync function chatActivate(\n app: JupyterFrontEnd,\n registry: ISettingRegistry,\n tracker: INotebookTracker,\n model: Model,\n state: IStateDB,\n subTask: 'chat' | 'contextual' | 'historical' | 'selected'\n) {\n try {\n if (model.processing) {\n console.log('an other process is running');\n return;\n }\n\n model.processing = true;\n const cell = tracker.activeCell;\n if (cell === null) {\n console.error('litchi:chat exit because any cell not been selected');\n return;\n }\n\n const notebook = tracker.currentWidget?.content;\n if (notebook === undefined) {\n console.error('litchi:chat exit because the notebook not found');\n return;\n }\n\n cell.model.sharedModel.setMetadata(LITCHI_MESSAGE_ROLE, 'user');\n const content = cell.model.sharedModel.source;\n // eslint-disable-next-line eqeqeq\n if (content === null) {\n console.error('litchi:chat exit because the content of cell is null');\n return;\n }\n const latest = cellToMessage(cell.model);\n\n const aiModel = (await state.fetch('litchi:model'))?.toString();\n if (aiModel === null || aiModel === undefined) {\n console.error('litchi:chat exit because not any model selected');\n return;\n }\n\n const settings = await registry.load(LITCHI_ID);\n const session: IMessage[] = [\n await Message.startUp(settings),\n ...createContext(subTask, notebook)\n ];\n\n const url = settings.get('chat')!.composite!.toString();\n const key = settings.get('key')?.composite?.toString();\n\n const message = await chat(url, key, session, latest, aiModel!);\n if (message.content && message.content.length > 0) {\n const cellModel = new MarkdownCellModel();\n cellModel.sharedModel.setSource(message.content);\n cellModel.sharedModel.setMetadata(LITCHI_MESSAGE_ROLE, message.role);\n }\n\n const { commands } = app;\n commands.execute('notebook:insert-cell-below').then(() => {\n commands.execute('notebook:change-cell-to-markdown');\n });\n\n const newCell = notebook.activeCell!;\n const newModel = newCell.model.sharedModel;\n newModel.setSource(message.content);\n newModel.setMetadata(LITCHI_MESSAGE_ROLE, message.role);\n } finally {\n model.processing = false;\n }\n}\n\nfunction createContext(command: string, notebook: Notebook): IMessage[] {\n switch (command) {\n case 'chat':\n return [];\n case 'contextual': {\n const stop = notebook.activeCellIndex;\n if (stop === undefined) {\n return [];\n }\n let messages: IMessage[] = [];\n for (let idx = 0; idx < stop; idx++) {\n const cell = notebook.model!.cells.get(idx);\n const model = cell.sharedModel;\n if (\n LITCHI_MESSAGE_ROLE in model.metadata &&\n model.metadata[LITCHI_MESSAGE_ROLE] !== undefined\n ) {\n messages = [...messages, cellToMessage(cell)];\n }\n }\n return messages;\n }\n case 'historical': {\n const stop = notebook.activeCellIndex;\n let messages: IMessage[] = [];\n for (let idx = 0; idx < stop; idx++) {\n const cell = notebook.model!.cells.get(idx);\n const model = cell.sharedModel;\n messages = [...messages, cellToMessage(cell)];\n if (\n !(LITCHI_MESSAGE_ROLE in model.metadata) ||\n model.metadata[LITCHI_MESSAGE_ROLE] === undefined\n ) {\n cell.metadata[LITCHI_MESSAGE_ROLE] = 'user';\n }\n }\n return messages;\n }\n case 'selected': {\n const cells = notebook.selectedCells;\n let messages: IMessage[] = [];\n for (let idx = 0; idx < cells.length; idx++) {\n const cell = cells[idx].model;\n const model = cell.sharedModel;\n if (\n !(LITCHI_MESSAGE_ROLE in model.metadata) ||\n cell.metadata[LITCHI_MESSAGE_ROLE] === undefined\n ) {\n cell.metadata[LITCHI_MESSAGE_ROLE] = 'user';\n }\n messages = [...messages, cellToMessage(cell)];\n }\n return messages;\n }\n }\n return [];\n}\n\nfunction cellToMessage(cell: ICellModel): IMessage {\n const model = cell.sharedModel;\n let role = 'user';\n if (LITCHI_MESSAGE_ROLE in cell.metadata) {\n role = cell.getMetadata(LITCHI_MESSAGE_ROLE)!.toString();\n }\n let content = model.source;\n if (model.cell_type === 'code') {\n let language = '';\n const tokens = cell.mimeType.split('-');\n if (tokens.length > 1) {\n language = tokens[tokens.length - 1];\n }\n content = `\\`\\`\\`${language}\\n${content}\\n\\`\\`\\``;\n }\n return new Message(role, content);\n}\n\nasync function refreshPage(\n tracker: INotebookTracker,\n showRoles: boolean\n): Promise {\n const notebook = tracker.currentWidget;\n if (notebook === null) {\n console.log('no notebook was selected');\n return;\n }\n const cells = notebook!.model!.cells!;\n if (showRoles) {\n for (let idx = 0; idx < cells.length; idx++) {\n const cell = cells.get(idx);\n if (LITCHI_MESSAGE_ROLE in cell.sharedModel.metadata) {\n const role = cell.sharedModel\n .getMetadata(LITCHI_MESSAGE_ROLE)!\n .toString();\n notebook?.content.widgets[idx].inputArea?.addClass(\n `jp-litchi-role-${role}-Cell`\n );\n }\n }\n } else {\n for (let idx = 0; idx < cells.length; idx++) {\n const cell = cells.get(idx);\n if (LITCHI_MESSAGE_ROLE in cell.sharedModel.metadata) {\n const role = cell.sharedModel\n .getMetadata(LITCHI_MESSAGE_ROLE)!\n .toString();\n notebook?.content.widgets[idx].inputArea?.removeClass(\n `jp-litchi-role-${role}-Cell`\n );\n }\n }\n }\n}\n\n/**\n * Export the plugin as default.\n */\nexport default plugin;\n","import { VDomModel } from \"@jupyterlab/apputils\";\n\nexport class Model extends VDomModel {\n private _showRoles: boolean;\n private _processing: boolean;\n\n constructor() {\n super();\n this._showRoles = false;\n this._processing = false;\n }\n\n get showRoles(): boolean {\n return this._showRoles;\n }\n set showRoles(v: boolean) {\n if (v !== this._showRoles) {\n this._showRoles = v;\n this.stateChanged.emit();\n }\n }\n\n get processing(): boolean {\n return this._processing;\n }\n\n set processing(value: boolean) {\n this._processing = value;\n this.stateChanged.emit();\n }\n}","import { ISettingRegistry } from '@jupyterlab/settingregistry';\nimport {\n IFormRenderer,\n IFormRendererRegistry\n} from '@jupyterlab/ui-components';\n\nimport type { FieldProps } from '@rjsf/utils';\nimport React, { useState } from 'react';\nimport { LITCHI_ID } from './constants';\n\n\nexport function renderer(\n settingRegistry: ISettingRegistry,\n formRegistry: IFormRendererRegistry\n) {\n const renderer: IFormRenderer = {\n fieldRenderer: props => {\n return renderAvailableProviders(props);\n }\n };\n formRegistry.addRenderer(`${LITCHI_ID}.system`, renderer);\n}\n\n/**\n * Custom setting renderer.\n */\nexport function renderAvailableProviders(props: FieldProps) {\n const { schema } = props;\n const title = schema.title;\n const desc = schema.description;\n const settings: ISettingRegistry.ISettings = props.formContext.settings;\n const settingData = settings.get('system').composite!.toString();\n const [system, setSystem] = useState(settingData);\n\n const onSettingChange = (e: { target: { value: any } }) => {\n const value = e.target.value;\n settings.set('system', value).catch(console.error);\n setSystem(value);\n };\n return (\n
\n
\n {title}\n

{desc}

\n
\n
\n

{desc}

\n
\n \n
\n
\n
\n
\n
\n );\n}\n","import { IDisposable, DisposableDelegate } from '@lumino/disposable';\n\nimport { DocumentRegistry } from '@jupyterlab/docregistry';\n\nimport { NotebookPanel, INotebookModel } from '@jupyterlab/notebook';\nimport { ReactWidget } from '@jupyterlab/ui-components';\nimport * as React from 'react';\nimport { IStateDB } from '@jupyterlab/statedb';\nimport { JupyterFrontEnd } from '@jupyterlab/application';\n\nimport { ISettingRegistry } from '@jupyterlab/settingregistry';\nimport { listModels } from './api';\nimport { Model } from './model';\n\nfunction ModelsComponent(props: {\n appId: string;\n app: JupyterFrontEnd;\n registry: ISettingRegistry;\n state: IStateDB;\n model: Model;\n}) {\n const [models, setModels] = React.useState([]);\n const [selectedModel, setSelectedModel] = React.useState('');\n const [processing, setProcessing] = React.useState(props.model.processing);\n\n React.useEffect(() => {\n async function loadModels() {\n try {\n const settings = await props.registry.load(props.appId);\n const baseUrl = settings.get('list-models').composite!.toString();\n const key = settings.get('key').composite?.toString();\n const modelList = await listModels(baseUrl, key).catch(console.error);\n setModels(modelList);\n if (modelList.length > 0) {\n setSelectedModel(modelList[0]);\n await props.state.save('litchi:model', modelList[0]);\n }\n } catch (error) {\n console.error('Error fetching models:', error);\n }\n }\n\n loadModels();\n }, []);\n\n React.useEffect(() => {\n const stateChanged = props.model.stateChanged;\n stateChanged.connect((m, args) => {\n setProcessing(m.processing);\n });\n }, [props.model]);\n\n const handleChange = async (event: React.ChangeEvent) => {\n const model = event.target.value;\n await props.state.save('litchi:model', model);\n setSelectedModel(model);\n };\n\n const handleChatClick = async (event: React.MouseEvent) => {\n const { commands } = props.app;\n await commands.execute('litchi:chat');\n };\n\n const handleContextualClick = async (event: React.MouseEvent) => {\n const { commands } = props.app;\n await commands.execute('litchi:contextual');\n };\n\n const handleHistoricalClick = async (event: React.MouseEvent) => {\n const { commands } = props.app;\n await commands.execute('litchi:historical');\n };\n\n const handleSelectedClick = async (event: React.MouseEvent) => {\n const { commands } = props.app;\n await commands.execute('litchi:selected');\n };\n\n return (\n \n {'(*☻-☻*)'} \n {' '}\n {' '}\n {' '}\n {' '}\n \n \n );\n}\n\n/**\n * A notebook widget extension that adds a widget in the notebook header (widget below the toolbar).\n */\nexport class WidgetExtension\n extends ReactWidget\n implements DocumentRegistry.IWidgetExtension\n{\n private readonly state: IStateDB;\n private readonly app: JupyterFrontEnd;\n private readonly registry: ISettingRegistry;\n private readonly appId: string;\n public readonly model: Model;\n\n protected render() {\n return (\n \n );\n }\n\n constructor(\n appId: string,\n app: JupyterFrontEnd,\n registry: ISettingRegistry,\n state: IStateDB,\n model: Model\n ) {\n super();\n this.state = state;\n this.app = app;\n this.registry = registry;\n this.appId = appId;\n this.model = model;\n this.id = 'litchi-toolbar';\n }\n\n /**\n * Create a new extension object.\n */\n createNew(\n panel: NotebookPanel,\n context: DocumentRegistry.IContext\n ): IDisposable {\n this.addClass('jp-litchi-toolbar');\n panel.contentHeader.insertWidget(0, this);\n return new DisposableDelegate(() => {\n this.dispose();\n });\n }\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/jupyter_litchi/labextension/static/lib_index_js.354b3ee8e2af94cb3ca4.js b/jupyter_litchi/labextension/static/lib_index_js.7467c77b4a0d312fc0ee.js similarity index 86% rename from jupyter_litchi/labextension/static/lib_index_js.354b3ee8e2af94cb3ca4.js rename to jupyter_litchi/labextension/static/lib_index_js.7467c77b4a0d312fc0ee.js index 5dfaab1..8f9dadf 100644 --- a/jupyter_litchi/labextension/static/lib_index_js.354b3ee8e2af94cb3ca4.js +++ b/jupyter_litchi/labextension/static/lib_index_js.7467c77b4a0d312fc0ee.js @@ -107,7 +107,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ CommandIDs: () => (/* binding */ CommandIDs), /* harmony export */ LITCHI_ID: () => (/* binding */ LITCHI_ID), -/* harmony export */ LITCHI_MESSAGE_ROLE: () => (/* binding */ LITCHI_MESSAGE_ROLE) +/* harmony export */ LITCHI_MESSAGE_ROLE: () => (/* binding */ LITCHI_MESSAGE_ROLE), +/* harmony export */ LITCHI_TOOLBAR_FACTORY: () => (/* binding */ LITCHI_TOOLBAR_FACTORY) /* harmony export */ }); const LITCHI_ID = 'jupyter-litchi:jupyter-litchi'; var CommandIDs; @@ -119,6 +120,64 @@ var CommandIDs; CommandIDs.TOGGLE_ROLE = 'litchi:show-roles-toggle'; })(CommandIDs || (CommandIDs = {})); const LITCHI_MESSAGE_ROLE = 'litchi:message:role'; +const LITCHI_TOOLBAR_FACTORY = 'litchi:toolbar-factory'; + + +/***/ }), + +/***/ "./lib/icons.js": +/*!**********************!*\ + !*** ./lib/icons.js ***! + \**********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ caIcon: () => (/* binding */ caIcon), +/* harmony export */ chIcon: () => (/* binding */ chIcon), +/* harmony export */ csIcon: () => (/* binding */ csIcon), +/* harmony export */ ctIcon: () => (/* binding */ ctIcon), +/* harmony export */ litchiIcon: () => (/* binding */ litchiIcon) +/* harmony export */ }); +/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/ui-components */ "webpack/sharing/consume/default/@jupyterlab/ui-components"); +/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__); + +const litchiIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({ + name: 'litchi-icon', + svgstr: '\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + '' +}); +const caIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({ + name: 'litchi-ca', + svgstr: '\n' + + ' CA\n' + + '' +}); +const chIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({ + name: 'litchi-ch', + svgstr: '\n' + + ' CH\n' + + '' +}); +const csIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({ + name: 'litchi-cs', + svgstr: '\n' + + ' CS\n' + + '' +}); +const ctIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({ + name: 'litchi-ct', + svgstr: '\n' + + ' CT\n' + + '' +}); /***/ }), @@ -138,7 +197,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/statedb */ "webpack/sharing/consume/default/@jupyterlab/statedb"); /* harmony import */ var _jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_statedb__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./api */ "./lib/api.js"); +/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./api */ "./lib/api.js"); /* harmony import */ var _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/cells */ "webpack/sharing/consume/default/@jupyterlab/cells"); /* harmony import */ var _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_cells__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook"); @@ -152,7 +211,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constants */ "./lib/constants.js"); /* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @jupyterlab/ui-components */ "webpack/sharing/consume/default/@jupyterlab/ui-components"); /* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./settings */ "./lib/settings.js"); +/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./settings */ "./lib/settings.js"); +/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./icons */ "./lib/icons.js"); + @@ -192,7 +253,8 @@ async function activate(app, palette, tracker, settingRegistry, toolbarRegistry, execute: async () => { await chatActivate(app, settingRegistry, tracker, model, state, 'chat'); }, - isEnabled: () => !model.processing + icon: _icons__WEBPACK_IMPORTED_MODULE_10__.caIcon, + isEnabled: () => model.idle }); palette.addItem({ command: _constants__WEBPACK_IMPORTED_MODULE_7__.CommandIDs.CHAT, category: 'jupyter-Litchi' }); app.commands.addCommand(_constants__WEBPACK_IMPORTED_MODULE_7__.CommandIDs.CONTEXTUAL, { @@ -200,7 +262,8 @@ async function activate(app, palette, tracker, settingRegistry, toolbarRegistry, execute: async () => { await chatActivate(app, settingRegistry, tracker, model, state, 'contextual'); }, - isEnabled: () => !model.processing + icon: _icons__WEBPACK_IMPORTED_MODULE_10__.ctIcon, + isEnabled: () => model.idle }); palette.addItem({ command: _constants__WEBPACK_IMPORTED_MODULE_7__.CommandIDs.CONTEXTUAL, @@ -211,7 +274,8 @@ async function activate(app, palette, tracker, settingRegistry, toolbarRegistry, execute: async () => { await chatActivate(app, settingRegistry, tracker, model, state, 'historical'); }, - isEnabled: () => !model.processing + icon: _icons__WEBPACK_IMPORTED_MODULE_10__.chIcon, + isEnabled: () => model.idle }); palette.addItem({ command: _constants__WEBPACK_IMPORTED_MODULE_7__.CommandIDs.HISTORICAL, @@ -222,7 +286,8 @@ async function activate(app, palette, tracker, settingRegistry, toolbarRegistry, execute: async () => { await chatActivate(app, settingRegistry, tracker, model, state, 'selected'); }, - isEnabled: () => !model.processing + icon: _icons__WEBPACK_IMPORTED_MODULE_10__.csIcon, + isEnabled: () => model.idle }); palette.addItem({ command: _constants__WEBPACK_IMPORTED_MODULE_7__.CommandIDs.SELECTED, @@ -236,7 +301,8 @@ async function activate(app, palette, tracker, settingRegistry, toolbarRegistry, execute: async () => { model.showRoles = !model.showRoles; }, - isToggled: () => model.showRoles + isToggled: () => model.showRoles, + isEnabled: () => !model.processing }); palette.addItem({ command: _constants__WEBPACK_IMPORTED_MODULE_7__.CommandIDs.TOGGLE_ROLE, @@ -244,7 +310,7 @@ async function activate(app, palette, tracker, settingRegistry, toolbarRegistry, }); app.restored.then(() => { if (formRendererRegistry) { - (0,_settings__WEBPACK_IMPORTED_MODULE_10__.renderer)(settingRegistry, formRendererRegistry); + (0,_settings__WEBPACK_IMPORTED_MODULE_11__.renderer)(settingRegistry, formRendererRegistry); } }); } @@ -281,12 +347,12 @@ async function chatActivate(app, registry, tracker, model, state, subTask) { } const settings = await registry.load(_constants__WEBPACK_IMPORTED_MODULE_7__.LITCHI_ID); const session = [ - await _api__WEBPACK_IMPORTED_MODULE_11__.Message.startUp(settings), + await _api__WEBPACK_IMPORTED_MODULE_12__.Message.startUp(settings), ...createContext(subTask, notebook) ]; const url = settings.get('chat').composite.toString(); const key = (_d = (_c = settings.get('key')) === null || _c === void 0 ? void 0 : _c.composite) === null || _d === void 0 ? void 0 : _d.toString(); - const message = await (0,_api__WEBPACK_IMPORTED_MODULE_11__.chat)(url, key, session, latest, aiModel); + const message = await (0,_api__WEBPACK_IMPORTED_MODULE_12__.chat)(url, key, session, latest, aiModel); if (message.content && message.content.length > 0) { const cellModel = new _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_2__.MarkdownCellModel(); cellModel.sharedModel.setSource(message.content); @@ -371,7 +437,7 @@ function cellToMessage(cell) { } content = `\`\`\`${language}\n${content}\n\`\`\``; } - return new _api__WEBPACK_IMPORTED_MODULE_11__.Message(role, content); + return new _api__WEBPACK_IMPORTED_MODULE_12__.Message(role, content); } async function refreshPage(tracker, showRoles) { var _a, _b; @@ -430,6 +496,7 @@ class Model extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.VDomModel super(); this._showRoles = false; this._processing = false; + this._idle = true; } get showRoles() { return this._showRoles; @@ -447,6 +514,9 @@ class Model extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.VDomModel this._processing = value; this.stateChanged.emit(); } + get idle() { + return this._idle; + } } @@ -580,9 +650,7 @@ function ModelsComponent(props) { const { commands } = props.app; await commands.execute('litchi:selected'); }; - return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", null, - '(*☻-☻*)', - " ", + return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_2__.createElement("label", { htmlFor: "model-select" }, " Select Model:"), react__WEBPACK_IMPORTED_MODULE_2__.createElement("select", { id: "model-select", value: selectedModel, onChange: handleChange }, models.map(model => (react__WEBPACK_IMPORTED_MODULE_2__.createElement("option", { key: model, value: model }, model)))), ' ', @@ -615,7 +683,7 @@ class WidgetExtension extends _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE */ createNew(panel, context) { this.addClass('jp-litchi-toolbar'); - panel.contentHeader.insertWidget(0, this); + panel.toolbar.addItem('litchi:model-list', this); return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_0__.DisposableDelegate(() => { this.dispose(); }); @@ -626,4 +694,4 @@ class WidgetExtension extends _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE /***/ }) }]); -//# sourceMappingURL=lib_index_js.354b3ee8e2af94cb3ca4.js.map \ No newline at end of file +//# sourceMappingURL=lib_index_js.7467c77b4a0d312fc0ee.js.map \ No newline at end of file diff --git a/jupyter_litchi/labextension/static/lib_index_js.7467c77b4a0d312fc0ee.js.map b/jupyter_litchi/labextension/static/lib_index_js.7467c77b4a0d312fc0ee.js.map new file mode 100644 index 0000000..f6b1e51 --- /dev/null +++ b/jupyter_litchi/labextension/static/lib_index_js.7467c77b4a0d312fc0ee.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lib_index_js.7467c77b4a0d312fc0ee.js","mappings":";;;;;;;;;;;;;;;AAAA,2BAA2B;AASpB,MAAM,OAAO;IAIlB,YAAY,IAAY,EAAE,OAAe;QACvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAoC;QACvD,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,SAAU,CAAC,QAAQ,EAAE,CAAC;QAC5D,OAAO,IAAI,OAAO,CAAC,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AC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,EAAE,GAAG,gBAAgB,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,SAAS,CACP,KAAoB,EACpB,OAAkD;QAElD,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QACnC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO,IAAI,kEAAkB,CAAC,GAAG,EAAE;YACjC,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sources":["webpack://jupyter-litchi/./src/api.ts","webpack://jupyter-litchi/./src/constants.ts","webpack://jupyter-litchi/./src/icons.ts","webpack://jupyter-litchi/./src/index.ts","webpack://jupyter-litchi/./src/model.ts","webpack://jupyter-litchi/./src/settings.tsx","webpack://jupyter-litchi/./src/toolbar.tsx"],"sourcesContent":["// SendRequestComponent.tsx\n\nimport { ISettingRegistry } from \"@jupyterlab/settingregistry\";\n\nexport interface IMessage {\n role: string;\n content: string;\n}\n\nexport class Message implements IMessage {\n role: string;\n content: string;\n\n constructor(role: string, content: string) {\n this.role = role;\n this.content = content;\n }\n\n static async startUp(settings: ISettingRegistry.ISettings): Promise {\n const system = settings.get('system').composite!.toString();\n return new Message('system', system);\n }\n}\n\nclass ChatRequest {\n model: string;\n stream: boolean;\n messages: Message[];\n\n constructor(model: string, messages: Message[], stream: boolean = false) {\n this.model = model;\n this.stream = stream;\n this.messages = messages;\n }\n}\n\nexport async function chat(\n url: string,\n key: string | undefined,\n session: Message[],\n message: Message,\n model: string\n): Promise {\n try {\n const messages = [...session, message];\n const request = new ChatRequest(model, messages);\n const headers = requestHeaders(key);\n\n const resp = await fetch(url, {\n method: 'POST',\n headers: headers,\n body: JSON.stringify(request)\n });\n const data = await resp.json();\n if (data.message !== undefined) {\n return data.message;\n } else if (data.choices !== undefined) {\n const msgs = data.choices.map((c: { message: any }) => c.message);\n if (msgs.length > 0) {\n return msgs[0];\n }\n }\n } catch (error) {\n console.error('Error sending request to server:', error);\n }\n console.error('message not success');\n return { message: '', role: 'assistant' };\n}\n\nexport async function listModels(url: string, key: string | undefined) {\n const headers = requestHeaders(key);\n const response = await fetch(url, {\n method: 'GET',\n headers: headers\n });\n return response\n .json()\n .then(data => {\n if (data.models !== undefined) {\n return data.models.map((m: { name: any }) => m.name);\n } else if (data.data !== undefined) {\n return data.data.map((m: { id: any }) => m.id);\n } else {\n console.error(`except data ${JSON.stringify(data, null, 2)}`);\n return [];\n }\n })\n .catch(e => {\n console.error(e);\n return [];\n });\n}\n\nfunction requestHeaders(key: string | undefined) {\n const headers = new Headers({\n 'Content-Type': 'application/json',\n Accept: 'application/json'\n });\n if (key !== undefined && key.length > 0) {\n headers.set('Authorization', key);\n }\n return headers;\n}","export const LITCHI_ID = 'jupyter-litchi:jupyter-litchi';\n\nexport namespace CommandIDs {\n export const CHAT = 'litchi:chat';\n export const CONTEXTUAL = 'litchi:contextual';\n export const HISTORICAL = 'litchi:historical';\n export const SELECTED = 'litchi:selected';\n export const TOGGLE_ROLE = 'litchi:show-roles-toggle';\n}\n\nexport const LITCHI_MESSAGE_ROLE = 'litchi:message:role';\nexport const LITCHI_TOOLBAR_FACTORY = 'litchi:toolbar-factory';\n","import { LabIcon } from '@jupyterlab/ui-components';\n\nexport const litchiIcon = new LabIcon({\n name: 'litchi-icon',\n svgstr:\n '\\n' +\n ' \\n' +\n ' \\n' +\n ' \\n' +\n ' \\n' +\n ' \\n' +\n ' \\n' +\n ' \\n' +\n ''\n});\n\nexport const caIcon = new LabIcon({\n name: 'litchi-ca',\n svgstr:\n '\\n' +\n ' CA\\n' +\n ''\n});\nexport const chIcon = new LabIcon({\n name: 'litchi-ch',\n svgstr:\n '\\n' +\n ' CH\\n' +\n ''\n});\nexport const csIcon = new LabIcon({\n name: 'litchi-cs',\n svgstr:\n '\\n' +\n ' CS\\n' +\n ''\n});\nexport const ctIcon = new LabIcon({\n name: 'litchi-ct',\n svgstr:\n '\\n' +\n ' CT\\n' +\n ''\n});\n","import {\n JupyterFrontEnd,\n JupyterFrontEndPlugin\n} from '@jupyterlab/application';\nimport {\n ICommandPalette,\n IToolbarWidgetRegistry\n} from '@jupyterlab/apputils';\nimport { IStateDB } from '@jupyterlab/statedb';\nimport { chat, IMessage, Message } from './api';\nimport { MarkdownCellModel } from '@jupyterlab/cells';\nimport {\n INotebookTracker,\n Notebook\n} from '@jupyterlab/notebook';\nimport { ISettingRegistry } from '@jupyterlab/settingregistry';\nimport { WidgetExtension } from './toolbar';\nimport { ICellModel } from '@jupyterlab/cells';\nimport { Model } from './model';\nimport { ITranslator } from '@jupyterlab/translation';\n\nimport {\n LITCHI_ID,\n CommandIDs,\n LITCHI_MESSAGE_ROLE,\n} from './constants';\nimport { IFormRendererRegistry } from '@jupyterlab/ui-components';\nimport { renderer } from './settings';\nimport { chIcon, csIcon, caIcon, ctIcon } from './icons';\n\n/**\n * The plugin registration information.\n */\nconst plugin: JupyterFrontEndPlugin = {\n id: LITCHI_ID,\n description: 'Add a widget to the notebook header.',\n autoStart: true,\n activate: activate,\n optional: [IFormRendererRegistry],\n requires: [\n ICommandPalette,\n INotebookTracker,\n ISettingRegistry,\n IToolbarWidgetRegistry,\n ITranslator,\n IStateDB\n ]\n};\n\nexport async function activate(\n app: JupyterFrontEnd,\n palette: ICommandPalette,\n tracker: INotebookTracker,\n settingRegistry: ISettingRegistry,\n toolbarRegistry: IToolbarWidgetRegistry,\n translator: ITranslator,\n state: IStateDB,\n formRendererRegistry: IFormRendererRegistry | null\n) {\n const model = new Model();\n\n const widget = new WidgetExtension(\n LITCHI_ID,\n app,\n settingRegistry,\n state,\n model\n );\n\n app.docRegistry.addWidgetExtension('Notebook', widget);\n\n app.commands.addCommand(CommandIDs.CHAT, {\n label: 'Litchi Chat',\n execute: async () => {\n await chatActivate(app, settingRegistry, tracker, model, state, 'chat');\n },\n icon: caIcon,\n isEnabled: () => model.idle\n });\n palette.addItem({ command: CommandIDs.CHAT, category: 'jupyter-Litchi' });\n\n app.commands.addCommand(CommandIDs.CONTEXTUAL, {\n label: 'Litchi Chat Contextual',\n execute: async () => {\n await chatActivate(\n app,\n settingRegistry,\n tracker,\n model,\n state,\n 'contextual'\n );\n },\n icon: ctIcon,\n isEnabled: () => model.idle\n });\n palette.addItem({\n command: CommandIDs.CONTEXTUAL,\n category: 'jupyter-Litchi'\n });\n\n app.commands.addCommand(CommandIDs.HISTORICAL, {\n label: 'Litchi Chat Historical',\n execute: async () => {\n await chatActivate(\n app,\n settingRegistry,\n tracker,\n model,\n state,\n 'historical'\n );\n },\n icon: chIcon,\n isEnabled: () => model.idle\n });\n palette.addItem({\n command: CommandIDs.HISTORICAL,\n category: 'jupyter-Litchi'\n });\n\n app.commands.addCommand(CommandIDs.SELECTED, {\n label: 'Litchi Chat Selected',\n execute: async () => {\n await chatActivate(\n app,\n settingRegistry,\n tracker,\n model,\n state,\n 'selected'\n );\n },\n icon: csIcon,\n isEnabled: () => model.idle\n });\n palette.addItem({\n command: CommandIDs.SELECTED,\n category: 'jupyter-Litchi'\n });\n\n model.stateChanged.connect(w => {\n refreshPage(tracker, w.showRoles);\n });\n app.commands.addCommand(CommandIDs.TOGGLE_ROLE, {\n label: 'Litchi Show Roles Toggle',\n execute: async () => {\n model.showRoles = !model.showRoles;\n },\n isToggled: () => model.showRoles,\n isEnabled: () => !model.processing\n });\n palette.addItem({\n command: CommandIDs.TOGGLE_ROLE,\n category: 'jupyter-Litchi'\n });\n\n app.restored.then(() => {\n if (formRendererRegistry) {\n renderer(settingRegistry, formRendererRegistry);\n }\n });\n}\n\nasync function chatActivate(\n app: JupyterFrontEnd,\n registry: ISettingRegistry,\n tracker: INotebookTracker,\n model: Model,\n state: IStateDB,\n subTask: 'chat' | 'contextual' | 'historical' | 'selected'\n) {\n try {\n if (model.processing) {\n console.log('an other process is running');\n return;\n }\n\n model.processing = true;\n const cell = tracker.activeCell;\n if (cell === null) {\n console.error('litchi:chat exit because any cell not been selected');\n return;\n }\n\n const notebook = tracker.currentWidget?.content;\n if (notebook === undefined) {\n console.error('litchi:chat exit because the notebook not found');\n return;\n }\n\n cell.model.sharedModel.setMetadata(LITCHI_MESSAGE_ROLE, 'user');\n const content = cell.model.sharedModel.source;\n // eslint-disable-next-line eqeqeq\n if (content === null) {\n console.error('litchi:chat exit because the content of cell is null');\n return;\n }\n const latest = cellToMessage(cell.model);\n\n const aiModel = (await state.fetch('litchi:model'))?.toString();\n if (aiModel === null || aiModel === undefined) {\n console.error('litchi:chat exit because not any model selected');\n return;\n }\n\n const settings = await registry.load(LITCHI_ID);\n const session: IMessage[] = [\n await Message.startUp(settings),\n ...createContext(subTask, notebook)\n ];\n\n const url = settings.get('chat')!.composite!.toString();\n const key = settings.get('key')?.composite?.toString();\n\n const message = await chat(url, key, session, latest, aiModel!);\n if (message.content && message.content.length > 0) {\n const cellModel = new MarkdownCellModel();\n cellModel.sharedModel.setSource(message.content);\n cellModel.sharedModel.setMetadata(LITCHI_MESSAGE_ROLE, message.role);\n }\n\n const { commands } = app;\n commands.execute('notebook:insert-cell-below').then(() => {\n commands.execute('notebook:change-cell-to-markdown');\n });\n\n const newCell = notebook.activeCell!;\n const newModel = newCell.model.sharedModel;\n newModel.setSource(message.content);\n newModel.setMetadata(LITCHI_MESSAGE_ROLE, message.role);\n } finally {\n model.processing = false;\n }\n}\n\nfunction createContext(command: string, notebook: Notebook): IMessage[] {\n switch (command) {\n case 'chat':\n return [];\n case 'contextual': {\n const stop = notebook.activeCellIndex;\n if (stop === undefined) {\n return [];\n }\n let messages: IMessage[] = [];\n for (let idx = 0; idx < stop; idx++) {\n const cell = notebook.model!.cells.get(idx);\n const model = cell.sharedModel;\n if (\n LITCHI_MESSAGE_ROLE in model.metadata &&\n model.metadata[LITCHI_MESSAGE_ROLE] !== undefined\n ) {\n messages = [...messages, cellToMessage(cell)];\n }\n }\n return messages;\n }\n case 'historical': {\n const stop = notebook.activeCellIndex;\n let messages: IMessage[] = [];\n for (let idx = 0; idx < stop; idx++) {\n const cell = notebook.model!.cells.get(idx);\n const model = cell.sharedModel;\n messages = [...messages, cellToMessage(cell)];\n if (\n !(LITCHI_MESSAGE_ROLE in model.metadata) ||\n model.metadata[LITCHI_MESSAGE_ROLE] === undefined\n ) {\n cell.metadata[LITCHI_MESSAGE_ROLE] = 'user';\n }\n }\n return messages;\n }\n case 'selected': {\n const cells = notebook.selectedCells;\n let messages: IMessage[] = [];\n for (let idx = 0; idx < cells.length; idx++) {\n const cell = cells[idx].model;\n const model = cell.sharedModel;\n if (\n !(LITCHI_MESSAGE_ROLE in model.metadata) ||\n cell.metadata[LITCHI_MESSAGE_ROLE] === undefined\n ) {\n cell.metadata[LITCHI_MESSAGE_ROLE] = 'user';\n }\n messages = [...messages, cellToMessage(cell)];\n }\n return messages;\n }\n }\n return [];\n}\n\nfunction cellToMessage(cell: ICellModel): IMessage {\n const model = cell.sharedModel;\n let role = 'user';\n if (LITCHI_MESSAGE_ROLE in cell.metadata) {\n role = cell.getMetadata(LITCHI_MESSAGE_ROLE)!.toString();\n }\n let content = model.source;\n if (model.cell_type === 'code') {\n let language = '';\n const tokens = cell.mimeType.split('-');\n if (tokens.length > 1) {\n language = tokens[tokens.length - 1];\n }\n content = `\\`\\`\\`${language}\\n${content}\\n\\`\\`\\``;\n }\n return new Message(role, content);\n}\n\nasync function refreshPage(\n tracker: INotebookTracker,\n showRoles: boolean\n): Promise {\n const notebook = tracker.currentWidget;\n if (notebook === null) {\n console.log('no notebook was selected');\n return;\n }\n const cells = notebook!.model!.cells!;\n if (showRoles) {\n for (let idx = 0; idx < cells.length; idx++) {\n const cell = cells.get(idx);\n if (LITCHI_MESSAGE_ROLE in cell.sharedModel.metadata) {\n const role = cell.sharedModel\n .getMetadata(LITCHI_MESSAGE_ROLE)!\n .toString();\n notebook?.content.widgets[idx].inputArea?.addClass(\n `jp-litchi-role-${role}-Cell`\n );\n }\n }\n } else {\n for (let idx = 0; idx < cells.length; idx++) {\n const cell = cells.get(idx);\n if (LITCHI_MESSAGE_ROLE in cell.sharedModel.metadata) {\n const role = cell.sharedModel\n .getMetadata(LITCHI_MESSAGE_ROLE)!\n .toString();\n notebook?.content.widgets[idx].inputArea?.removeClass(\n `jp-litchi-role-${role}-Cell`\n );\n }\n }\n }\n}\n\n/**\n * Export the plugin as default.\n */\nexport default plugin;\n","import { VDomModel } from '@jupyterlab/apputils';\n\nexport class Model extends VDomModel {\n private _showRoles: boolean;\n private _processing: boolean;\n private _idle: boolean;\n\n constructor() {\n super();\n this._showRoles = false;\n this._processing = false;\n this._idle = true;\n }\n\n get showRoles(): boolean {\n return this._showRoles;\n }\n set showRoles(v: boolean) {\n if (v !== this._showRoles) {\n this._showRoles = v;\n this.stateChanged.emit();\n }\n }\n\n get processing(): boolean {\n return this._processing;\n }\n\n set processing(value: boolean) {\n this._processing = value;\n this.stateChanged.emit();\n }\n\n get idle() {\n return this._idle;\n }\n}\n","import { ISettingRegistry } from '@jupyterlab/settingregistry';\nimport {\n IFormRenderer,\n IFormRendererRegistry\n} from '@jupyterlab/ui-components';\n\nimport type { FieldProps } from '@rjsf/utils';\nimport React, { useState } from 'react';\nimport { LITCHI_ID } from './constants';\n\n\nexport function renderer(\n settingRegistry: ISettingRegistry,\n formRegistry: IFormRendererRegistry\n) {\n const renderer: IFormRenderer = {\n fieldRenderer: props => {\n return renderAvailableProviders(props);\n }\n };\n formRegistry.addRenderer(`${LITCHI_ID}.system`, renderer);\n}\n\n/**\n * Custom setting renderer.\n */\nexport function renderAvailableProviders(props: FieldProps) {\n const { schema } = props;\n const title = schema.title;\n const desc = schema.description;\n const settings: ISettingRegistry.ISettings = props.formContext.settings;\n const settingData = settings.get('system').composite!.toString();\n const [system, setSystem] = useState(settingData);\n\n const onSettingChange = (e: { target: { value: any } }) => {\n const value = e.target.value;\n settings.set('system', value).catch(console.error);\n setSystem(value);\n };\n return (\n
\n
\n {title}\n

{desc}

\n
\n
\n

{desc}

\n
\n \n
\n
\n
\n
\n
\n );\n}\n","import { IDisposable, DisposableDelegate } from '@lumino/disposable';\n\nimport { DocumentRegistry } from '@jupyterlab/docregistry';\n\nimport { NotebookPanel, INotebookModel } from '@jupyterlab/notebook';\nimport { ReactWidget } from '@jupyterlab/ui-components';\nimport * as React from 'react';\nimport { IStateDB } from '@jupyterlab/statedb';\nimport { JupyterFrontEnd } from '@jupyterlab/application';\n\nimport { ISettingRegistry } from '@jupyterlab/settingregistry';\nimport { listModels } from './api';\nimport { Model } from './model';\n\nfunction ModelsComponent(props: {\n appId: string;\n app: JupyterFrontEnd;\n registry: ISettingRegistry;\n state: IStateDB;\n model: Model;\n}) {\n const [models, setModels] = React.useState([]);\n const [selectedModel, setSelectedModel] = React.useState('');\n const [processing, setProcessing] = React.useState(props.model.processing);\n\n React.useEffect(() => {\n async function loadModels() {\n try {\n const settings = await props.registry.load(props.appId);\n const baseUrl = settings.get('list-models').composite!.toString();\n const key = settings.get('key').composite?.toString();\n const modelList = await listModels(baseUrl, key).catch(console.error);\n setModels(modelList);\n if (modelList.length > 0) {\n setSelectedModel(modelList[0]);\n await props.state.save('litchi:model', modelList[0]);\n }\n } catch (error) {\n console.error('Error fetching models:', error);\n }\n }\n\n loadModels();\n }, []);\n\n React.useEffect(() => {\n const stateChanged = props.model.stateChanged;\n stateChanged.connect((m, args) => {\n setProcessing(m.processing);\n });\n }, [props.model]);\n\n const handleChange = async (event: React.ChangeEvent) => {\n const model = event.target.value;\n await props.state.save('litchi:model', model);\n setSelectedModel(model);\n };\n\n const handleChatClick = async (event: React.MouseEvent) => {\n const { commands } = props.app;\n await commands.execute('litchi:chat');\n };\n\n const handleContextualClick = async (event: React.MouseEvent) => {\n const { commands } = props.app;\n await commands.execute('litchi:contextual');\n };\n\n const handleHistoricalClick = async (event: React.MouseEvent) => {\n const { commands } = props.app;\n await commands.execute('litchi:historical');\n };\n\n const handleSelectedClick = async (event: React.MouseEvent) => {\n const { commands } = props.app;\n await commands.execute('litchi:selected');\n };\n\n return (\n
\n \n \n {models.map(model => (\n \n ))}\n {' '}\n {' '}\n {' '}\n {' '}\n \n
\n );\n}\n\n/**\n * A notebook widget extension that adds a widget in the notebook header (widget below the toolbar).\n */\nexport class WidgetExtension\n extends ReactWidget\n implements DocumentRegistry.IWidgetExtension\n{\n private readonly state: IStateDB;\n private readonly app: JupyterFrontEnd;\n private readonly registry: ISettingRegistry;\n private readonly appId: string;\n public readonly model: Model;\n\n protected render() {\n return (\n \n );\n }\n\n constructor(\n appId: string,\n app: JupyterFrontEnd,\n registry: ISettingRegistry,\n state: IStateDB,\n model: Model\n ) {\n super();\n this.state = state;\n this.app = app;\n this.registry = registry;\n this.appId = appId;\n this.model = model;\n this.id = 'litchi-toolbar';\n }\n\n /**\n * Create a new extension object.\n */\n createNew(\n panel: NotebookPanel,\n context: DocumentRegistry.IContext\n ): IDisposable {\n this.addClass('jp-litchi-toolbar');\n panel.toolbar.addItem('litchi:model-list', this);\n return new DisposableDelegate(() => {\n this.dispose();\n });\n }\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/jupyter_litchi/labextension/static/remoteEntry.7ce0991261d6542d065b.js b/jupyter_litchi/labextension/static/remoteEntry.677dbfaa6cac36bff0d7.js similarity index 99% rename from jupyter_litchi/labextension/static/remoteEntry.7ce0991261d6542d065b.js rename to jupyter_litchi/labextension/static/remoteEntry.677dbfaa6cac36bff0d7.js index d5f8ef0..6fc4957 100644 --- a/jupyter_litchi/labextension/static/remoteEntry.7ce0991261d6542d065b.js +++ b/jupyter_litchi/labextension/static/remoteEntry.677dbfaa6cac36bff0d7.js @@ -124,7 +124,7 @@ __webpack_require__.d(exports, { /******/ // This function allow to reference async chunks /******/ __webpack_require__.u = (chunkId) => { /******/ // return url for filenames based on template -/******/ return "" + chunkId + "." + {"lib_index_js":"354b3ee8e2af94cb3ca4","style_index_js":"b6d24b250239b04ec894"}[chunkId] + ".js"; +/******/ return "" + chunkId + "." + {"lib_index_js":"7467c77b4a0d312fc0ee","style_index_js":"d2061a2b67801f885a5d"}[chunkId] + ".js"; /******/ }; /******/ })(); /******/ @@ -243,7 +243,7 @@ __webpack_require__.d(exports, { /******/ var promises = []; /******/ switch(name) { /******/ case "default": { -/******/ register("jupyter-litchi", "0.3.8", () => (__webpack_require__.e("lib_index_js").then(() => (() => (__webpack_require__(/*! ./lib/index.js */ "./lib/index.js")))))); +/******/ register("jupyter-litchi", "0.4.0", () => (__webpack_require__.e("lib_index_js").then(() => (() => (__webpack_require__(/*! ./lib/index.js */ "./lib/index.js")))))); /******/ } /******/ break; /******/ } @@ -562,4 +562,4 @@ __webpack_require__.d(exports, { /******/ /******/ })() ; -//# sourceMappingURL=remoteEntry.7ce0991261d6542d065b.js.map \ No newline at end of file +//# sourceMappingURL=remoteEntry.677dbfaa6cac36bff0d7.js.map \ No newline at end of file diff --git a/jupyter_litchi/labextension/static/remoteEntry.7ce0991261d6542d065b.js.map b/jupyter_litchi/labextension/static/remoteEntry.677dbfaa6cac36bff0d7.js.map similarity index 99% rename from jupyter_litchi/labextension/static/remoteEntry.7ce0991261d6542d065b.js.map rename to jupyter_litchi/labextension/static/remoteEntry.677dbfaa6cac36bff0d7.js.map index 159324e..5394b04 100644 --- a/jupyter_litchi/labextension/static/remoteEntry.7ce0991261d6542d065b.js.map +++ b/jupyter_litchi/labextension/static/remoteEntry.677dbfaa6cac36bff0d7.js.map @@ -1 +1 @@ -{"version":3,"file":"remoteEntry.7ce0991261d6542d065b.js","mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;;;;;UCpCD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;;;;WC5BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;;;;;WCRA;WACA;WACA;WACA,8BAA8B,8EAA8E;WAC5G;;;;;WCJA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA;WACA,uBAAuB,4BAA4B;WACnD;WACA;WACA;WACA,iBAAiB,oBAAoB;WACrC;WACA,mGAAmG,YAAY;WAC/G;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE,iCAAiC;WACpG;WACA;WACA;WACA;;;;;WCzCA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,oJAAoJ;WACpJ;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,IAAI,aAAa;WACjB;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC7CA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WClBA;WACA;WACA,WAAW,6BAA6B,iBAAiB,GAAG,qEAAqE;WACjI;WACA;WACA;WACA,qCAAqC,aAAa,EAAE,wDAAwD,2BAA2B,4BAA4B,2BAA2B,+CAA+C,mCAAmC;WAChR;WACA;WACA;WACA,qBAAqB,8BAA8B,SAAS,sDAAsD,gBAAgB,eAAe,KAAK,6DAA6D,SAAS,SAAS,QAAQ,eAAe,KAAK,eAAe,qGAAqG,WAAW,aAAa;WAC7Y;WACA;WACA;WACA,gBAAgB,8BAA8B,qBAAqB,YAAY,sBAAsB,SAAS,iDAAiD,6FAA6F,WAAW,uBAAuB,2BAA2B,wBAAwB,KAAK,oCAAoC,oBAAoB,wBAAwB,oBAAoB,SAAS,KAAK,yBAAyB,KAAK,gCAAgC,yBAAyB,QAAQ,eAAe,KAAK,eAAe,4DAA4D;WACtoB;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE,IAAI;WACN;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;;WAED;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM;WACN,KAAK,WAAW;WAChB;WACA,GAAG;WACH;WACA;;;;;WCjLA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA,iCAAiC;;WAEjC;WACA;WACA;WACA,KAAK;WACL,eAAe;WACf;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;;;;;WCrFA;;;;;UEAA;UACA;UACA;UACA","sources":["webpack://jupyter-litchi/webpack/container-entry","webpack://jupyter-litchi/webpack/bootstrap","webpack://jupyter-litchi/webpack/runtime/compat get default export","webpack://jupyter-litchi/webpack/runtime/define property getters","webpack://jupyter-litchi/webpack/runtime/ensure chunk","webpack://jupyter-litchi/webpack/runtime/get javascript chunk filename","webpack://jupyter-litchi/webpack/runtime/global","webpack://jupyter-litchi/webpack/runtime/hasOwnProperty shorthand","webpack://jupyter-litchi/webpack/runtime/load script","webpack://jupyter-litchi/webpack/runtime/make namespace object","webpack://jupyter-litchi/webpack/runtime/sharing","webpack://jupyter-litchi/webpack/runtime/publicPath","webpack://jupyter-litchi/webpack/runtime/consumes","webpack://jupyter-litchi/webpack/runtime/jsonp chunk loading","webpack://jupyter-litchi/webpack/runtime/nonce","webpack://jupyter-litchi/webpack/before-startup","webpack://jupyter-litchi/webpack/startup","webpack://jupyter-litchi/webpack/after-startup"],"sourcesContent":["var moduleMap = {\n\t\"./index\": () => {\n\t\treturn __webpack_require__.e(\"lib_index_js\").then(() => (() => ((__webpack_require__(/*! ./lib/index.js */ \"./lib/index.js\")))));\n\t},\n\t\"./extension\": () => {\n\t\treturn __webpack_require__.e(\"lib_index_js\").then(() => (() => ((__webpack_require__(/*! ./lib/index.js */ \"./lib/index.js\")))));\n\t},\n\t\"./style\": () => {\n\t\treturn __webpack_require__.e(\"style_index_js\").then(() => (() => ((__webpack_require__(/*! ./style/index.js */ \"./style/index.js\")))));\n\t}\n};\nvar get = (module, getScope) => {\n\t__webpack_require__.R = getScope;\n\tgetScope = (\n\t\t__webpack_require__.o(moduleMap, module)\n\t\t\t? moduleMap[module]()\n\t\t\t: Promise.resolve().then(() => {\n\t\t\t\tthrow new Error('Module \"' + module + '\" does not exist in container.');\n\t\t\t})\n\t);\n\t__webpack_require__.R = undefined;\n\treturn getScope;\n};\nvar init = (shareScope, initScope) => {\n\tif (!__webpack_require__.S) return;\n\tvar name = \"default\"\n\tvar oldScope = __webpack_require__.S[name];\n\tif(oldScope && oldScope !== shareScope) throw new Error(\"Container initialization failed as it has already been initialized with a different share scope\");\n\t__webpack_require__.S[name] = shareScope;\n\treturn __webpack_require__.I(name, initScope);\n};\n\n// This exports getters to disallow modifications\n__webpack_require__.d(exports, {\n\tget: () => (get),\n\tinit: () => (init)\n});","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// expose the module cache\n__webpack_require__.c = __webpack_module_cache__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".\" + {\"lib_index_js\":\"354b3ee8e2af94cb3ca4\",\"style_index_js\":\"b6d24b250239b04ec894\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var inProgress = {};\nvar dataWebpackPrefix = \"jupyter-litchi:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.S = {};\nvar initPromises = {};\nvar initTokens = {};\n__webpack_require__.I = (name, initScope) => {\n\tif(!initScope) initScope = [];\n\t// handling circular init calls\n\tvar initToken = initTokens[name];\n\tif(!initToken) initToken = initTokens[name] = {};\n\tif(initScope.indexOf(initToken) >= 0) return;\n\tinitScope.push(initToken);\n\t// only runs once\n\tif(initPromises[name]) return initPromises[name];\n\t// creates a new share scope if needed\n\tif(!__webpack_require__.o(__webpack_require__.S, name)) __webpack_require__.S[name] = {};\n\t// runs all init snippets from all modules reachable\n\tvar scope = __webpack_require__.S[name];\n\tvar warn = (msg) => {\n\t\tif (typeof console !== \"undefined\" && console.warn) console.warn(msg);\n\t};\n\tvar uniqueName = \"jupyter-litchi\";\n\tvar register = (name, version, factory, eager) => {\n\t\tvar versions = scope[name] = scope[name] || {};\n\t\tvar activeVersion = versions[version];\n\t\tif(!activeVersion || (!activeVersion.loaded && (!eager != !activeVersion.eager ? eager : uniqueName > activeVersion.from))) versions[version] = { get: factory, from: uniqueName, eager: !!eager };\n\t};\n\tvar initExternal = (id) => {\n\t\tvar handleError = (err) => (warn(\"Initialization of sharing external failed: \" + err));\n\t\ttry {\n\t\t\tvar module = __webpack_require__(id);\n\t\t\tif(!module) return;\n\t\t\tvar initFn = (module) => (module && module.init && module.init(__webpack_require__.S[name], initScope))\n\t\t\tif(module.then) return promises.push(module.then(initFn, handleError));\n\t\t\tvar initResult = initFn(module);\n\t\t\tif(initResult && initResult.then) return promises.push(initResult['catch'](handleError));\n\t\t} catch(err) { handleError(err); }\n\t}\n\tvar promises = [];\n\tswitch(name) {\n\t\tcase \"default\": {\n\t\t\tregister(\"jupyter-litchi\", \"0.3.8\", () => (__webpack_require__.e(\"lib_index_js\").then(() => (() => (__webpack_require__(/*! ./lib/index.js */ \"./lib/index.js\"))))));\n\t\t}\n\t\tbreak;\n\t}\n\tif(!promises.length) return initPromises[name] = 1;\n\treturn initPromises[name] = Promise.all(promises).then(() => (initPromises[name] = 1));\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","var parseVersion = (str) => {\n\t// see webpack/lib/util/semver.js for original code\n\tvar p=p=>{return p.split(\".\").map((p=>{return+p==p?+p:p}))},n=/^([^-+]+)?(?:-([^+]+))?(?:\\+(.+))?$/.exec(str),r=n[1]?p(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,p(n[2]))),n[3]&&(r.push([]),r.push.apply(r,p(n[3]))),r;\n}\nvar versionLt = (a, b) => {\n\t// see webpack/lib/util/semver.js for original code\n\ta=parseVersion(a),b=parseVersion(b);for(var r=0;;){if(r>=a.length)return r=b.length)return\"u\"==n;var t=b[r],f=(typeof t)[0];if(n!=f)return\"o\"==n&&\"n\"==f||(\"s\"==f||\"u\"==n);if(\"o\"!=n&&\"u\"!=n&&e!=t)return e {\n\t// see webpack/lib/util/semver.js for original code\n\tvar r=range[0],n=\"\";if(1===range.length)return\"*\";if(r+.5){n+=0==r?\">=\":-1==r?\"<\":1==r?\"^\":2==r?\"~\":r>0?\"=\":\"!=\";for(var e=1,a=1;a0?\".\":\"\")+(e=2,t)}return n}var g=[];for(a=1;a {\n\t// see webpack/lib/util/semver.js for original code\n\tif(0 in range){version=parseVersion(version);var e=range[0],r=e<0;r&&(e=-e-1);for(var n=0,i=1,a=!0;;i++,n++){var f,s,g=i=version.length||\"o\"==(s=(typeof(f=version[n]))[0]))return!a||(\"u\"==g?i>e&&!r:\"\"==g!=r);if(\"u\"==s){if(!a||\"u\"!=g)return!1}else if(a)if(g==s)if(i<=e){if(f!=range[i])return!1}else{if(r?f>range[i]:f {\n\treturn scope && __webpack_require__.o(scope, key);\n}\nvar get = (entry) => {\n\tentry.loaded = 1;\n\treturn entry.get()\n};\nvar eagerOnly = (versions) => {\n\treturn Object.keys(versions).reduce((filtered, version) => {\n\t\t\tif (versions[version].eager) {\n\t\t\t\tfiltered[version] = versions[version];\n\t\t\t}\n\t\t\treturn filtered;\n\t}, {});\n};\nvar findLatestVersion = (scope, key, eager) => {\n\tvar versions = eager ? eagerOnly(scope[key]) : scope[key];\n\tvar key = Object.keys(versions).reduce((a, b) => {\n\t\treturn !a || versionLt(a, b) ? b : a;\n\t}, 0);\n\treturn key && versions[key];\n};\nvar findSatisfyingVersion = (scope, key, requiredVersion, eager) => {\n\tvar versions = eager ? eagerOnly(scope[key]) : scope[key];\n\tvar key = Object.keys(versions).reduce((a, b) => {\n\t\tif (!satisfy(requiredVersion, b)) return a;\n\t\treturn !a || versionLt(a, b) ? b : a;\n\t}, 0);\n\treturn key && versions[key]\n};\nvar findSingletonVersionKey = (scope, key, eager) => {\n\tvar versions = eager ? eagerOnly(scope[key]) : scope[key];\n\treturn Object.keys(versions).reduce((a, b) => {\n\t\treturn !a || (!versions[a].loaded && versionLt(a, b)) ? b : a;\n\t}, 0);\n};\nvar getInvalidSingletonVersionMessage = (scope, key, version, requiredVersion) => {\n\treturn \"Unsatisfied version \" + version + \" from \" + (version && scope[key][version].from) + \" of shared singleton module \" + key + \" (required \" + rangeToString(requiredVersion) + \")\"\n};\nvar getInvalidVersionMessage = (scope, scopeName, key, requiredVersion, eager) => {\n\tvar versions = scope[key];\n\treturn \"No satisfying version (\" + rangeToString(requiredVersion) + \")\" + (eager ? \" for eager consumption\" : \"\") + \" of shared module \" + key + \" found in shared scope \" + scopeName + \".\\n\" +\n\t\t\"Available versions: \" + Object.keys(versions).map((key) => {\n\t\treturn key + \" from \" + versions[key].from;\n\t}).join(\", \");\n};\nvar fail = (msg) => {\n\tthrow new Error(msg);\n}\nvar failAsNotExist = (scopeName, key) => {\n\treturn fail(\"Shared module \" + key + \" doesn't exist in shared scope \" + scopeName);\n}\nvar warn = /*#__PURE__*/ (msg) => {\n\tif (typeof console !== \"undefined\" && console.warn) console.warn(msg);\n};\nvar init = (fn) => (function(scopeName, key, eager, c, d) {\n\tvar promise = __webpack_require__.I(scopeName);\n\tif (promise && promise.then && !eager) {\n\t\treturn promise.then(fn.bind(fn, scopeName, __webpack_require__.S[scopeName], key, false, c, d));\n\t}\n\treturn fn(scopeName, __webpack_require__.S[scopeName], key, eager, c, d);\n});\n\nvar useFallback = (scopeName, key, fallback) => {\n\treturn fallback ? fallback() : failAsNotExist(scopeName, key);\n}\nvar load = /*#__PURE__*/ init((scopeName, scope, key, eager, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\treturn get(findLatestVersion(scope, key, eager));\n});\nvar loadVersion = /*#__PURE__*/ init((scopeName, scope, key, eager, requiredVersion, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\tvar satisfyingVersion = findSatisfyingVersion(scope, key, requiredVersion, eager);\n\tif (satisfyingVersion) return get(satisfyingVersion);\n\twarn(getInvalidVersionMessage(scope, scopeName, key, requiredVersion, eager))\n\treturn get(findLatestVersion(scope, key, eager));\n});\nvar loadStrictVersion = /*#__PURE__*/ init((scopeName, scope, key, eager, requiredVersion, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\tvar satisfyingVersion = findSatisfyingVersion(scope, key, requiredVersion, eager);\n\tif (satisfyingVersion) return get(satisfyingVersion);\n\tif (fallback) return fallback();\n\tfail(getInvalidVersionMessage(scope, scopeName, key, requiredVersion, eager));\n});\nvar loadSingleton = /*#__PURE__*/ init((scopeName, scope, key, eager, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\tvar version = findSingletonVersionKey(scope, key, eager);\n\treturn get(scope[key][version]);\n});\nvar loadSingletonVersion = /*#__PURE__*/ init((scopeName, scope, key, eager, requiredVersion, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\tvar version = findSingletonVersionKey(scope, key, eager);\n\tif (!satisfy(requiredVersion, version)) {\n\t\twarn(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));\n\t}\n\treturn get(scope[key][version]);\n});\nvar loadStrictSingletonVersion = /*#__PURE__*/ init((scopeName, scope, key, eager, requiredVersion, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\tvar version = findSingletonVersionKey(scope, key, eager);\n\tif (!satisfy(requiredVersion, version)) {\n\t\tfail(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));\n\t}\n\treturn get(scope[key][version]);\n});\nvar installedModules = {};\nvar moduleToHandlerMapping = {\n\t\"webpack/sharing/consume/default/@jupyterlab/apputils\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/apputils\", false, [1,4,3,5])),\n\t\"webpack/sharing/consume/default/@jupyterlab/statedb\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/statedb\", false, [1,4,2,5])),\n\t\"webpack/sharing/consume/default/@jupyterlab/cells\": () => (loadVersion(\"default\", \"@jupyterlab/cells\", false, [1,4,2,5])),\n\t\"webpack/sharing/consume/default/@jupyterlab/notebook\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/notebook\", false, [1,4,2,5])),\n\t\"webpack/sharing/consume/default/@jupyterlab/settingregistry\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/settingregistry\", false, [1,4,2,5])),\n\t\"webpack/sharing/consume/default/@lumino/disposable\": () => (loadSingletonVersion(\"default\", \"@lumino/disposable\", false, [1,2,0,0])),\n\t\"webpack/sharing/consume/default/@jupyterlab/ui-components\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/ui-components\", false, [1,4,2,5])),\n\t\"webpack/sharing/consume/default/react\": () => (loadSingletonVersion(\"default\", \"react\", false, [1,18,2,0])),\n\t\"webpack/sharing/consume/default/@jupyterlab/translation\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/translation\", false, [1,4,2,5]))\n};\n// no consumes in initial chunks\nvar chunkMapping = {\n\t\"lib_index_js\": [\n\t\t\"webpack/sharing/consume/default/@jupyterlab/apputils\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/statedb\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/cells\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/notebook\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/settingregistry\",\n\t\t\"webpack/sharing/consume/default/@lumino/disposable\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/ui-components\",\n\t\t\"webpack/sharing/consume/default/react\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/translation\"\n\t]\n};\nvar startedInstallModules = {};\n__webpack_require__.f.consumes = (chunkId, promises) => {\n\tif(__webpack_require__.o(chunkMapping, chunkId)) {\n\t\tchunkMapping[chunkId].forEach((id) => {\n\t\t\tif(__webpack_require__.o(installedModules, id)) return promises.push(installedModules[id]);\n\t\t\tif(!startedInstallModules[id]) {\n\t\t\tvar onFactory = (factory) => {\n\t\t\t\tinstalledModules[id] = 0;\n\t\t\t\t__webpack_require__.m[id] = (module) => {\n\t\t\t\t\tdelete __webpack_require__.c[id];\n\t\t\t\t\tmodule.exports = factory();\n\t\t\t\t}\n\t\t\t};\n\t\t\tstartedInstallModules[id] = true;\n\t\t\tvar onError = (error) => {\n\t\t\t\tdelete installedModules[id];\n\t\t\t\t__webpack_require__.m[id] = (module) => {\n\t\t\t\t\tdelete __webpack_require__.c[id];\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tvar promise = moduleToHandlerMapping[id]();\n\t\t\t\tif(promise.then) {\n\t\t\t\t\tpromises.push(installedModules[id] = promise.then(onFactory)['catch'](onError));\n\t\t\t\t} else onFactory(promise);\n\t\t\t} catch(e) { onError(e); }\n\t\t\t}\n\t\t});\n\t}\n}","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"jupyter-litchi\": 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkjupyter_litchi\"] = self[\"webpackChunkjupyter_litchi\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","","// module cache are used so entry inlining is disabled\n// startup\n// Load entry module and return exports\nvar __webpack_exports__ = __webpack_require__(\"webpack/container/entry/jupyter-litchi\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"remoteEntry.677dbfaa6cac36bff0d7.js","mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;;;;;UCpCD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;;;;WC5BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;;;;;WCRA;WACA;WACA;WACA,8BAA8B,8EAA8E;WAC5G;;;;;WCJA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA;WACA,uBAAuB,4BAA4B;WACnD;WACA;WACA;WACA,iBAAiB,oBAAoB;WACrC;WACA,mGAAmG,YAAY;WAC/G;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE,iCAAiC;WACpG;WACA;WACA;WACA;;;;;WCzCA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,oJAAoJ;WACpJ;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,IAAI,aAAa;WACjB;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC7CA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WClBA;WACA;WACA,WAAW,6BAA6B,iBAAiB,GAAG,qEAAqE;WACjI;WACA;WACA;WACA,qCAAqC,aAAa,EAAE,wDAAwD,2BAA2B,4BAA4B,2BAA2B,+CAA+C,mCAAmC;WAChR;WACA;WACA;WACA,qBAAqB,8BAA8B,SAAS,sDAAsD,gBAAgB,eAAe,KAAK,6DAA6D,SAAS,SAAS,QAAQ,eAAe,KAAK,eAAe,qGAAqG,WAAW,aAAa;WAC7Y;WACA;WACA;WACA,gBAAgB,8BAA8B,qBAAqB,YAAY,sBAAsB,SAAS,iDAAiD,6FAA6F,WAAW,uBAAuB,2BAA2B,wBAAwB,KAAK,oCAAoC,oBAAoB,wBAAwB,oBAAoB,SAAS,KAAK,yBAAyB,KAAK,gCAAgC,yBAAyB,QAAQ,eAAe,KAAK,eAAe,4DAA4D;WACtoB;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE,IAAI;WACN;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;;WAED;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA;WACA;WACA;WACA,CAAC;WACD;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM;WACN,KAAK,WAAW;WAChB;WACA,GAAG;WACH;WACA;;;;;WCjLA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA,iCAAiC;;WAEjC;WACA;WACA;WACA,KAAK;WACL,eAAe;WACf;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;;;;;WCrFA;;;;;UEAA;UACA;UACA;UACA","sources":["webpack://jupyter-litchi/webpack/container-entry","webpack://jupyter-litchi/webpack/bootstrap","webpack://jupyter-litchi/webpack/runtime/compat get default export","webpack://jupyter-litchi/webpack/runtime/define property getters","webpack://jupyter-litchi/webpack/runtime/ensure chunk","webpack://jupyter-litchi/webpack/runtime/get javascript chunk filename","webpack://jupyter-litchi/webpack/runtime/global","webpack://jupyter-litchi/webpack/runtime/hasOwnProperty shorthand","webpack://jupyter-litchi/webpack/runtime/load script","webpack://jupyter-litchi/webpack/runtime/make namespace object","webpack://jupyter-litchi/webpack/runtime/sharing","webpack://jupyter-litchi/webpack/runtime/publicPath","webpack://jupyter-litchi/webpack/runtime/consumes","webpack://jupyter-litchi/webpack/runtime/jsonp chunk loading","webpack://jupyter-litchi/webpack/runtime/nonce","webpack://jupyter-litchi/webpack/before-startup","webpack://jupyter-litchi/webpack/startup","webpack://jupyter-litchi/webpack/after-startup"],"sourcesContent":["var moduleMap = {\n\t\"./index\": () => {\n\t\treturn __webpack_require__.e(\"lib_index_js\").then(() => (() => ((__webpack_require__(/*! ./lib/index.js */ \"./lib/index.js\")))));\n\t},\n\t\"./extension\": () => {\n\t\treturn __webpack_require__.e(\"lib_index_js\").then(() => (() => ((__webpack_require__(/*! ./lib/index.js */ \"./lib/index.js\")))));\n\t},\n\t\"./style\": () => {\n\t\treturn __webpack_require__.e(\"style_index_js\").then(() => (() => ((__webpack_require__(/*! ./style/index.js */ \"./style/index.js\")))));\n\t}\n};\nvar get = (module, getScope) => {\n\t__webpack_require__.R = getScope;\n\tgetScope = (\n\t\t__webpack_require__.o(moduleMap, module)\n\t\t\t? moduleMap[module]()\n\t\t\t: Promise.resolve().then(() => {\n\t\t\t\tthrow new Error('Module \"' + module + '\" does not exist in container.');\n\t\t\t})\n\t);\n\t__webpack_require__.R = undefined;\n\treturn getScope;\n};\nvar init = (shareScope, initScope) => {\n\tif (!__webpack_require__.S) return;\n\tvar name = \"default\"\n\tvar oldScope = __webpack_require__.S[name];\n\tif(oldScope && oldScope !== shareScope) throw new Error(\"Container initialization failed as it has already been initialized with a different share scope\");\n\t__webpack_require__.S[name] = shareScope;\n\treturn __webpack_require__.I(name, initScope);\n};\n\n// This exports getters to disallow modifications\n__webpack_require__.d(exports, {\n\tget: () => (get),\n\tinit: () => (init)\n});","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// expose the module cache\n__webpack_require__.c = __webpack_module_cache__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".\" + {\"lib_index_js\":\"7467c77b4a0d312fc0ee\",\"style_index_js\":\"d2061a2b67801f885a5d\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var inProgress = {};\nvar dataWebpackPrefix = \"jupyter-litchi:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.S = {};\nvar initPromises = {};\nvar initTokens = {};\n__webpack_require__.I = (name, initScope) => {\n\tif(!initScope) initScope = [];\n\t// handling circular init calls\n\tvar initToken = initTokens[name];\n\tif(!initToken) initToken = initTokens[name] = {};\n\tif(initScope.indexOf(initToken) >= 0) return;\n\tinitScope.push(initToken);\n\t// only runs once\n\tif(initPromises[name]) return initPromises[name];\n\t// creates a new share scope if needed\n\tif(!__webpack_require__.o(__webpack_require__.S, name)) __webpack_require__.S[name] = {};\n\t// runs all init snippets from all modules reachable\n\tvar scope = __webpack_require__.S[name];\n\tvar warn = (msg) => {\n\t\tif (typeof console !== \"undefined\" && console.warn) console.warn(msg);\n\t};\n\tvar uniqueName = \"jupyter-litchi\";\n\tvar register = (name, version, factory, eager) => {\n\t\tvar versions = scope[name] = scope[name] || {};\n\t\tvar activeVersion = versions[version];\n\t\tif(!activeVersion || (!activeVersion.loaded && (!eager != !activeVersion.eager ? eager : uniqueName > activeVersion.from))) versions[version] = { get: factory, from: uniqueName, eager: !!eager };\n\t};\n\tvar initExternal = (id) => {\n\t\tvar handleError = (err) => (warn(\"Initialization of sharing external failed: \" + err));\n\t\ttry {\n\t\t\tvar module = __webpack_require__(id);\n\t\t\tif(!module) return;\n\t\t\tvar initFn = (module) => (module && module.init && module.init(__webpack_require__.S[name], initScope))\n\t\t\tif(module.then) return promises.push(module.then(initFn, handleError));\n\t\t\tvar initResult = initFn(module);\n\t\t\tif(initResult && initResult.then) return promises.push(initResult['catch'](handleError));\n\t\t} catch(err) { handleError(err); }\n\t}\n\tvar promises = [];\n\tswitch(name) {\n\t\tcase \"default\": {\n\t\t\tregister(\"jupyter-litchi\", \"0.4.0\", () => (__webpack_require__.e(\"lib_index_js\").then(() => (() => (__webpack_require__(/*! ./lib/index.js */ \"./lib/index.js\"))))));\n\t\t}\n\t\tbreak;\n\t}\n\tif(!promises.length) return initPromises[name] = 1;\n\treturn initPromises[name] = Promise.all(promises).then(() => (initPromises[name] = 1));\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","var parseVersion = (str) => {\n\t// see webpack/lib/util/semver.js for original code\n\tvar p=p=>{return p.split(\".\").map((p=>{return+p==p?+p:p}))},n=/^([^-+]+)?(?:-([^+]+))?(?:\\+(.+))?$/.exec(str),r=n[1]?p(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,p(n[2]))),n[3]&&(r.push([]),r.push.apply(r,p(n[3]))),r;\n}\nvar versionLt = (a, b) => {\n\t// see webpack/lib/util/semver.js for original code\n\ta=parseVersion(a),b=parseVersion(b);for(var r=0;;){if(r>=a.length)return r=b.length)return\"u\"==n;var t=b[r],f=(typeof t)[0];if(n!=f)return\"o\"==n&&\"n\"==f||(\"s\"==f||\"u\"==n);if(\"o\"!=n&&\"u\"!=n&&e!=t)return e {\n\t// see webpack/lib/util/semver.js for original code\n\tvar r=range[0],n=\"\";if(1===range.length)return\"*\";if(r+.5){n+=0==r?\">=\":-1==r?\"<\":1==r?\"^\":2==r?\"~\":r>0?\"=\":\"!=\";for(var e=1,a=1;a0?\".\":\"\")+(e=2,t)}return n}var g=[];for(a=1;a {\n\t// see webpack/lib/util/semver.js for original code\n\tif(0 in range){version=parseVersion(version);var e=range[0],r=e<0;r&&(e=-e-1);for(var n=0,i=1,a=!0;;i++,n++){var f,s,g=i=version.length||\"o\"==(s=(typeof(f=version[n]))[0]))return!a||(\"u\"==g?i>e&&!r:\"\"==g!=r);if(\"u\"==s){if(!a||\"u\"!=g)return!1}else if(a)if(g==s)if(i<=e){if(f!=range[i])return!1}else{if(r?f>range[i]:f {\n\treturn scope && __webpack_require__.o(scope, key);\n}\nvar get = (entry) => {\n\tentry.loaded = 1;\n\treturn entry.get()\n};\nvar eagerOnly = (versions) => {\n\treturn Object.keys(versions).reduce((filtered, version) => {\n\t\t\tif (versions[version].eager) {\n\t\t\t\tfiltered[version] = versions[version];\n\t\t\t}\n\t\t\treturn filtered;\n\t}, {});\n};\nvar findLatestVersion = (scope, key, eager) => {\n\tvar versions = eager ? eagerOnly(scope[key]) : scope[key];\n\tvar key = Object.keys(versions).reduce((a, b) => {\n\t\treturn !a || versionLt(a, b) ? b : a;\n\t}, 0);\n\treturn key && versions[key];\n};\nvar findSatisfyingVersion = (scope, key, requiredVersion, eager) => {\n\tvar versions = eager ? eagerOnly(scope[key]) : scope[key];\n\tvar key = Object.keys(versions).reduce((a, b) => {\n\t\tif (!satisfy(requiredVersion, b)) return a;\n\t\treturn !a || versionLt(a, b) ? b : a;\n\t}, 0);\n\treturn key && versions[key]\n};\nvar findSingletonVersionKey = (scope, key, eager) => {\n\tvar versions = eager ? eagerOnly(scope[key]) : scope[key];\n\treturn Object.keys(versions).reduce((a, b) => {\n\t\treturn !a || (!versions[a].loaded && versionLt(a, b)) ? b : a;\n\t}, 0);\n};\nvar getInvalidSingletonVersionMessage = (scope, key, version, requiredVersion) => {\n\treturn \"Unsatisfied version \" + version + \" from \" + (version && scope[key][version].from) + \" of shared singleton module \" + key + \" (required \" + rangeToString(requiredVersion) + \")\"\n};\nvar getInvalidVersionMessage = (scope, scopeName, key, requiredVersion, eager) => {\n\tvar versions = scope[key];\n\treturn \"No satisfying version (\" + rangeToString(requiredVersion) + \")\" + (eager ? \" for eager consumption\" : \"\") + \" of shared module \" + key + \" found in shared scope \" + scopeName + \".\\n\" +\n\t\t\"Available versions: \" + Object.keys(versions).map((key) => {\n\t\treturn key + \" from \" + versions[key].from;\n\t}).join(\", \");\n};\nvar fail = (msg) => {\n\tthrow new Error(msg);\n}\nvar failAsNotExist = (scopeName, key) => {\n\treturn fail(\"Shared module \" + key + \" doesn't exist in shared scope \" + scopeName);\n}\nvar warn = /*#__PURE__*/ (msg) => {\n\tif (typeof console !== \"undefined\" && console.warn) console.warn(msg);\n};\nvar init = (fn) => (function(scopeName, key, eager, c, d) {\n\tvar promise = __webpack_require__.I(scopeName);\n\tif (promise && promise.then && !eager) {\n\t\treturn promise.then(fn.bind(fn, scopeName, __webpack_require__.S[scopeName], key, false, c, d));\n\t}\n\treturn fn(scopeName, __webpack_require__.S[scopeName], key, eager, c, d);\n});\n\nvar useFallback = (scopeName, key, fallback) => {\n\treturn fallback ? fallback() : failAsNotExist(scopeName, key);\n}\nvar load = /*#__PURE__*/ init((scopeName, scope, key, eager, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\treturn get(findLatestVersion(scope, key, eager));\n});\nvar loadVersion = /*#__PURE__*/ init((scopeName, scope, key, eager, requiredVersion, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\tvar satisfyingVersion = findSatisfyingVersion(scope, key, requiredVersion, eager);\n\tif (satisfyingVersion) return get(satisfyingVersion);\n\twarn(getInvalidVersionMessage(scope, scopeName, key, requiredVersion, eager))\n\treturn get(findLatestVersion(scope, key, eager));\n});\nvar loadStrictVersion = /*#__PURE__*/ init((scopeName, scope, key, eager, requiredVersion, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\tvar satisfyingVersion = findSatisfyingVersion(scope, key, requiredVersion, eager);\n\tif (satisfyingVersion) return get(satisfyingVersion);\n\tif (fallback) return fallback();\n\tfail(getInvalidVersionMessage(scope, scopeName, key, requiredVersion, eager));\n});\nvar loadSingleton = /*#__PURE__*/ init((scopeName, scope, key, eager, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\tvar version = findSingletonVersionKey(scope, key, eager);\n\treturn get(scope[key][version]);\n});\nvar loadSingletonVersion = /*#__PURE__*/ init((scopeName, scope, key, eager, requiredVersion, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\tvar version = findSingletonVersionKey(scope, key, eager);\n\tif (!satisfy(requiredVersion, version)) {\n\t\twarn(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));\n\t}\n\treturn get(scope[key][version]);\n});\nvar loadStrictSingletonVersion = /*#__PURE__*/ init((scopeName, scope, key, eager, requiredVersion, fallback) => {\n\tif (!exists(scope, key)) return useFallback(scopeName, key, fallback);\n\tvar version = findSingletonVersionKey(scope, key, eager);\n\tif (!satisfy(requiredVersion, version)) {\n\t\tfail(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));\n\t}\n\treturn get(scope[key][version]);\n});\nvar installedModules = {};\nvar moduleToHandlerMapping = {\n\t\"webpack/sharing/consume/default/@jupyterlab/apputils\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/apputils\", false, [1,4,3,5])),\n\t\"webpack/sharing/consume/default/@jupyterlab/statedb\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/statedb\", false, [1,4,2,5])),\n\t\"webpack/sharing/consume/default/@jupyterlab/cells\": () => (loadVersion(\"default\", \"@jupyterlab/cells\", false, [1,4,2,5])),\n\t\"webpack/sharing/consume/default/@jupyterlab/notebook\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/notebook\", false, [1,4,2,5])),\n\t\"webpack/sharing/consume/default/@jupyterlab/settingregistry\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/settingregistry\", false, [1,4,2,5])),\n\t\"webpack/sharing/consume/default/@lumino/disposable\": () => (loadSingletonVersion(\"default\", \"@lumino/disposable\", false, [1,2,0,0])),\n\t\"webpack/sharing/consume/default/@jupyterlab/ui-components\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/ui-components\", false, [1,4,2,5])),\n\t\"webpack/sharing/consume/default/react\": () => (loadSingletonVersion(\"default\", \"react\", false, [1,18,2,0])),\n\t\"webpack/sharing/consume/default/@jupyterlab/translation\": () => (loadSingletonVersion(\"default\", \"@jupyterlab/translation\", false, [1,4,2,5]))\n};\n// no consumes in initial chunks\nvar chunkMapping = {\n\t\"lib_index_js\": [\n\t\t\"webpack/sharing/consume/default/@jupyterlab/apputils\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/statedb\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/cells\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/notebook\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/settingregistry\",\n\t\t\"webpack/sharing/consume/default/@lumino/disposable\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/ui-components\",\n\t\t\"webpack/sharing/consume/default/react\",\n\t\t\"webpack/sharing/consume/default/@jupyterlab/translation\"\n\t]\n};\nvar startedInstallModules = {};\n__webpack_require__.f.consumes = (chunkId, promises) => {\n\tif(__webpack_require__.o(chunkMapping, chunkId)) {\n\t\tchunkMapping[chunkId].forEach((id) => {\n\t\t\tif(__webpack_require__.o(installedModules, id)) return promises.push(installedModules[id]);\n\t\t\tif(!startedInstallModules[id]) {\n\t\t\tvar onFactory = (factory) => {\n\t\t\t\tinstalledModules[id] = 0;\n\t\t\t\t__webpack_require__.m[id] = (module) => {\n\t\t\t\t\tdelete __webpack_require__.c[id];\n\t\t\t\t\tmodule.exports = factory();\n\t\t\t\t}\n\t\t\t};\n\t\t\tstartedInstallModules[id] = true;\n\t\t\tvar onError = (error) => {\n\t\t\t\tdelete installedModules[id];\n\t\t\t\t__webpack_require__.m[id] = (module) => {\n\t\t\t\t\tdelete __webpack_require__.c[id];\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tvar promise = moduleToHandlerMapping[id]();\n\t\t\t\tif(promise.then) {\n\t\t\t\t\tpromises.push(installedModules[id] = promise.then(onFactory)['catch'](onError));\n\t\t\t\t} else onFactory(promise);\n\t\t\t} catch(e) { onError(e); }\n\t\t\t}\n\t\t});\n\t}\n}","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"jupyter-litchi\": 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkjupyter_litchi\"] = self[\"webpackChunkjupyter_litchi\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","","// module cache are used so entry inlining is disabled\n// startup\n// Load entry module and return exports\nvar __webpack_exports__ = __webpack_require__(\"webpack/container/entry/jupyter-litchi\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/jupyter_litchi/labextension/static/style_index_js.b6d24b250239b04ec894.js.map b/jupyter_litchi/labextension/static/style_index_js.b6d24b250239b04ec894.js.map deleted file mode 100644 index aaa58a6..0000000 --- a/jupyter_litchi/labextension/static/style_index_js.b6d24b250239b04ec894.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"style_index_js.b6d24b250239b04ec894.js","mappings":";;;;;;;;;AAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,iDAAiD,qBAAqB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACpFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;;;;;;;;;;ACfa;;AAEb;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACnFa;;AAEb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACjCa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACTa;;AAEb;AACA;AACA,cAAc,KAAwC,GAAG,sBAAiB,GAAG,CAAI;AACjF;AACA;AAC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ources":["webpack://jupyter-litchi/./node_modules/css-loader/dist/runtime/api.js","webpack://jupyter-litchi/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://jupyter-litchi/./style/index.js","webpack://jupyter-litchi/./style/base.css","webpack://jupyter-litchi/./style/base.css?1944"],"sourcesContent":["\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","import './base.css';\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*\n See the JupyterLab Developer Guide for useful CSS Patterns:\n\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\n*/\n.jp-litchi-toolbar {\n min-height: 20px;\n background-color: lightsalmon;\n}\n\n.jp-litchi-role-user-Cell .jp-InputPrompt {\n background-color: lightcyan;\n}\n\n.jp-litchi-role-assistant-Cell .jp-InputPrompt {\n background-color: lightgoldenrodyellow;\n}`, \"\",{\"version\":3,\"sources\":[\"webpack://./style/base.css\"],\"names\":[],\"mappings\":\"AAAA;;;;CAIC;AACD;IACI,gBAAgB;IAChB,6BAA6B;AACjC;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI,sCAAsC;AAC1C\",\"sourcesContent\":[\"/*\\n See the JupyterLab Developer Guide for useful CSS Patterns:\\n\\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\\n*/\\n.jp-litchi-toolbar {\\n min-height: 20px;\\n background-color: lightsalmon;\\n}\\n\\n.jp-litchi-role-user-Cell .jp-InputPrompt {\\n background-color: lightcyan;\\n}\\n\\n.jp-litchi-role-assistant-Cell .jp-InputPrompt {\\n background-color: lightgoldenrodyellow;\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/css-loader/dist/cjs.js!./base.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/css-loader/dist/cjs.js!./base.css\";\n export default content && content.locals ? content.locals : undefined;\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/jupyter_litchi/labextension/static/style_index_js.b6d24b250239b04ec894.js b/jupyter_litchi/labextension/static/style_index_js.d2061a2b67801f885a5d.js similarity index 96% rename from jupyter_litchi/labextension/static/style_index_js.b6d24b250239b04ec894.js rename to jupyter_litchi/labextension/static/style_index_js.d2061a2b67801f885a5d.js index 5b361b6..f141eab 100644 --- a/jupyter_litchi/labextension/static/style_index_js.b6d24b250239b04ec894.js +++ b/jupyter_litchi/labextension/static/style_index_js.d2061a2b67801f885a5d.js @@ -426,7 +426,6 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/* */ .jp-litchi-toolbar { min-height: 20px; - background-color: lightsalmon; } .jp-litchi-role-user-Cell .jp-InputPrompt { @@ -435,7 +434,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/* .jp-litchi-role-assistant-Cell .jp-InputPrompt { background-color: lightgoldenrodyellow; -}`, "",{"version":3,"sources":["webpack://./style/base.css"],"names":[],"mappings":"AAAA;;;;CAIC;AACD;IACI,gBAAgB;IAChB,6BAA6B;AACjC;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI,sCAAsC;AAC1C","sourcesContent":["/*\n See the JupyterLab Developer Guide for useful CSS Patterns:\n\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\n*/\n.jp-litchi-toolbar {\n min-height: 20px;\n background-color: lightsalmon;\n}\n\n.jp-litchi-role-user-Cell .jp-InputPrompt {\n background-color: lightcyan;\n}\n\n.jp-litchi-role-assistant-Cell .jp-InputPrompt {\n background-color: lightgoldenrodyellow;\n}"],"sourceRoot":""}]); +}`, "",{"version":3,"sources":["webpack://./style/base.css"],"names":[],"mappings":"AAAA;;;;CAIC;AACD;IACI,gBAAgB;AACpB;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI,sCAAsC;AAC1C","sourcesContent":["/*\n See the JupyterLab Developer Guide for useful CSS Patterns:\n\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\n*/\n.jp-litchi-toolbar {\n min-height: 20px;\n}\n\n.jp-litchi-role-user-Cell .jp-InputPrompt {\n background-color: lightcyan;\n}\n\n.jp-litchi-role-assistant-Cell .jp-InputPrompt {\n background-color: lightgoldenrodyellow;\n}"],"sourceRoot":""}]); // Exports /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); @@ -497,4 +496,4 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js /***/ }) }]); -//# sourceMappingURL=style_index_js.b6d24b250239b04ec894.js.map \ No newline at end of file +//# sourceMappingURL=style_index_js.d2061a2b67801f885a5d.js.map \ No newline at end of file diff --git a/jupyter_litchi/labextension/static/style_index_js.d2061a2b67801f885a5d.js.map b/jupyter_litchi/labextension/static/style_index_js.d2061a2b67801f885a5d.js.map new file mode 100644 index 0000000..4df1648 --- /dev/null +++ b/jupyter_litchi/labextension/static/style_index_js.d2061a2b67801f885a5d.js.map @@ -0,0 +1 @@ +{"version":3,"file":"style_index_js.d2061a2b67801f885a5d.js","mappings":";;;;;;;;;AAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,iDAAiD,qBAAqB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACpFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA;;;;;;;;;;ACfa;;AAEb;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACnFa;;AAEb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACjCa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACTa;;AAEb;AACA;AACA,cAAc,KAAwC,GAAG,sBAAiB,GAAG,CAAI;AACjF;AACA;AACA;AACA;AACA;;;;;;;;;;ACTa;;AAEb;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC5Da;;AAEb;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACboB;;;;;;;;;;;;;;;;;;;ACApB;AAC0G;AACjB;AACzF,8BAA8B,mFAA2B,CAAC,4FAAqC;AAC/F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC,OAAO,oFAAoF,KAAK,KAAK,YAAY,OAAO,KAAK,YAAY,OAAO,KAAK,YAAY,6LAA6L,uBAAuB,GAAG,+CAA+C,kCAAkC,GAAG,oDAAoD,6CAA6C,GAAG,mBAAmB;AACpkB;AACA,iEAAe,uBAAuB,EAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrBvC,MAA+F;AAC/F,MAAqF;AACrF,MAA4F;AAC5F,MAA+G;AAC/G,MAAwG;AACxG,MAAwG;AACxG,MAAkG;AAClG;AACA;;AAEA;;AAEA,4BAA4B,qGAAmB;AAC/C,wBAAwB,kHAAa;;AAErC,uBAAuB,uGAAa;AACpC;AACA,iBAAiB,+FAAM;AACvB,6BAA6B,sGAAkB;;AAE/C,aAAa,0GAAG,CAAC,qFAAO;;;;AAI4C;AACpE,OAAO,iEAAe,qFAAO,IAAI,qFAAO,UAAU,qFAAO,mBAAmB,EAAC","sources":["webpack://jupyter-litchi/./node_modules/css-loader/dist/runtime/api.js","webpack://jupyter-litchi/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://jupyter-litchi/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://jupyter-litchi/./style/index.js","webpack://jupyter-litchi/./style/base.css","webpack://jupyter-litchi/./style/base.css?1944"],"sourcesContent":["\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","import './base.css';\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*\n See the JupyterLab Developer Guide for useful CSS Patterns:\n\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\n*/\n.jp-litchi-toolbar {\n min-height: 20px;\n}\n\n.jp-litchi-role-user-Cell .jp-InputPrompt {\n background-color: lightcyan;\n}\n\n.jp-litchi-role-assistant-Cell .jp-InputPrompt {\n background-color: lightgoldenrodyellow;\n}`, \"\",{\"version\":3,\"sources\":[\"webpack://./style/base.css\"],\"names\":[],\"mappings\":\"AAAA;;;;CAIC;AACD;IACI,gBAAgB;AACpB;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI,sCAAsC;AAC1C\",\"sourcesContent\":[\"/*\\n See the JupyterLab Developer Guide for useful CSS Patterns:\\n\\n https://jupyterlab.readthedocs.io/en/stable/developer/css.html\\n*/\\n.jp-litchi-toolbar {\\n min-height: 20px;\\n}\\n\\n.jp-litchi-role-user-Cell .jp-InputPrompt {\\n background-color: lightcyan;\\n}\\n\\n.jp-litchi-role-assistant-Cell .jp-InputPrompt {\\n background-color: lightgoldenrodyellow;\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/css-loader/dist/cjs.js!./base.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/css-loader/dist/cjs.js!./base.css\";\n export default content && content.locals ? content.locals : undefined;\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/schema/jupyter-litchi.json b/schema/jupyter-litchi.json index 48ce49a..78c2038 100644 --- a/schema/jupyter-litchi.json +++ b/schema/jupyter-litchi.json @@ -31,31 +31,7 @@ ] }, "jupyter.lab.toolbars": { - "Litchi": [ - { - "name": "litchi-chat", - "command": "litchi:chat", - "icon": "litchi-ca", - "rank": 1 - }, - { - "name": "litchi-contextual", - "command": "litchi:contextual", - "icon": "litchi-ct", - "rank": 1 - }, - { - "name": "litchi-historical", - "command": "litchi:historical", - "icon": "litchi-ch", - "rank": 1 - }, - { - "name": "litchi-selected", - "command": "litchi:selected", - "icon": "litchi-cs", - "rank": 1 - } + "Notebook": [ ] }, "properties": { diff --git a/schema/plugin.json b/schema/plugin.json index ad069e9..975333c 100644 --- a/schema/plugin.json +++ b/schema/plugin.json @@ -5,9 +5,5 @@ "type": "object", "properties": { }, - "additionalProperties": false, - "jupyter.lab.toolbars": { - "Litchi": [ - ] - } + "additionalProperties": false } diff --git a/src/constants.ts b/src/constants.ts index ffd3795..714d995 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -7,4 +7,6 @@ export namespace CommandIDs { export const SELECTED = 'litchi:selected'; export const TOGGLE_ROLE = 'litchi:show-roles-toggle'; } -export const LITCHI_MESSAGE_ROLE = 'litchi:message:role'; \ No newline at end of file + +export const LITCHI_MESSAGE_ROLE = 'litchi:message:role'; +export const LITCHI_TOOLBAR_FACTORY = 'litchi:toolbar-factory'; diff --git a/src/icons.ts b/src/icons.ts index 19b9cad..adac74e 100644 --- a/src/icons.ts +++ b/src/icons.ts @@ -1,30 +1,44 @@ import { LabIcon } from '@jupyterlab/ui-components'; +export const litchiIcon = new LabIcon({ + name: 'litchi-icon', + svgstr: + '\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + '' +}); + export const caIcon = new LabIcon({ name: 'litchi-ca', svgstr: '\n' + - ' CA\n' + + ' CA\n' + '' }); export const chIcon = new LabIcon({ name: 'litchi-ch', svgstr: '\n' + - ' CH\n' + + ' CH\n' + '' }); export const csIcon = new LabIcon({ name: 'litchi-cs', svgstr: '\n' + - ' CS\n' + + ' CS\n' + '' }); export const ctIcon = new LabIcon({ name: 'litchi-ct', svgstr: '\n' + - ' CT\n' + + ' CT\n' + '' }); diff --git a/src/index.ts b/src/index.ts index 99d88d5..6f29535 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,20 +2,31 @@ import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'; -import { ICommandPalette, IToolbarWidgetRegistry } from '@jupyterlab/apputils'; +import { + ICommandPalette, + IToolbarWidgetRegistry +} from '@jupyterlab/apputils'; import { IStateDB } from '@jupyterlab/statedb'; import { chat, IMessage, Message } from './api'; import { MarkdownCellModel } from '@jupyterlab/cells'; -import { INotebookTracker, Notebook, } from '@jupyterlab/notebook'; +import { + INotebookTracker, + Notebook +} from '@jupyterlab/notebook'; import { ISettingRegistry } from '@jupyterlab/settingregistry'; import { WidgetExtension } from './toolbar'; import { ICellModel } from '@jupyterlab/cells'; import { Model } from './model'; import { ITranslator } from '@jupyterlab/translation'; -import { LITCHI_ID, CommandIDs, LITCHI_MESSAGE_ROLE } from './constants'; -import { IFormRendererRegistry } from "@jupyterlab/ui-components"; -import { renderer } from "./settings"; +import { + LITCHI_ID, + CommandIDs, + LITCHI_MESSAGE_ROLE, +} from './constants'; +import { IFormRendererRegistry } from '@jupyterlab/ui-components'; +import { renderer } from './settings'; +import { chIcon, csIcon, caIcon, ctIcon } from './icons'; /** * The plugin registration information. @@ -47,6 +58,7 @@ export async function activate( formRendererRegistry: IFormRendererRegistry | null ) { const model = new Model(); + const widget = new WidgetExtension( LITCHI_ID, app, @@ -62,7 +74,8 @@ export async function activate( execute: async () => { await chatActivate(app, settingRegistry, tracker, model, state, 'chat'); }, - isEnabled: () => !model.processing + icon: caIcon, + isEnabled: () => model.idle }); palette.addItem({ command: CommandIDs.CHAT, category: 'jupyter-Litchi' }); @@ -78,7 +91,8 @@ export async function activate( 'contextual' ); }, - isEnabled: () => !model.processing + icon: ctIcon, + isEnabled: () => model.idle }); palette.addItem({ command: CommandIDs.CONTEXTUAL, @@ -97,7 +111,8 @@ export async function activate( 'historical' ); }, - isEnabled: () => !model.processing + icon: chIcon, + isEnabled: () => model.idle }); palette.addItem({ command: CommandIDs.HISTORICAL, @@ -116,7 +131,8 @@ export async function activate( 'selected' ); }, - isEnabled: () => !model.processing + icon: csIcon, + isEnabled: () => model.idle }); palette.addItem({ command: CommandIDs.SELECTED, @@ -131,7 +147,8 @@ export async function activate( execute: async () => { model.showRoles = !model.showRoles; }, - isToggled: () => model.showRoles + isToggled: () => model.showRoles, + isEnabled: () => !model.processing }); palette.addItem({ command: CommandIDs.TOGGLE_ROLE, diff --git a/src/model.ts b/src/model.ts index 2214761..787715c 100644 --- a/src/model.ts +++ b/src/model.ts @@ -1,13 +1,15 @@ -import { VDomModel } from "@jupyterlab/apputils"; +import { VDomModel } from '@jupyterlab/apputils'; export class Model extends VDomModel { private _showRoles: boolean; private _processing: boolean; + private _idle: boolean; constructor() { super(); this._showRoles = false; this._processing = false; + this._idle = true; } get showRoles(): boolean { @@ -28,4 +30,8 @@ export class Model extends VDomModel { this._processing = value; this.stateChanged.emit(); } -} \ No newline at end of file + + get idle() { + return this._idle; + } +} diff --git a/src/toolbar.tsx b/src/toolbar.tsx index 7807b37..8926007 100644 --- a/src/toolbar.tsx +++ b/src/toolbar.tsx @@ -77,9 +77,13 @@ function ModelsComponent(props: { }; return ( - - {'(*☻-☻*)'} - {models.map(model => ( + ); } @@ -151,7 +155,7 @@ export class WidgetExtension context: DocumentRegistry.IContext ): IDisposable { this.addClass('jp-litchi-toolbar'); - panel.contentHeader.insertWidget(0, this); + panel.toolbar.addItem('litchi:model-list', this); return new DisposableDelegate(() => { this.dispose(); }); diff --git a/style/base.css b/style/base.css index 29a8dc6..321d2ca 100644 --- a/style/base.css +++ b/style/base.css @@ -5,7 +5,6 @@ */ .jp-litchi-toolbar { min-height: 20px; - background-color: lightsalmon; } .jp-litchi-role-user-Cell .jp-InputPrompt {