jupyterlab-unianalytics-dashboard 4.0.6__py3-none-any.whl → 4.0.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. jupyterlab_unianalytics_dashboard/__init__.py +29 -1
  2. jupyterlab_unianalytics_dashboard/_version.py +1 -1
  3. jupyterlab_unianalytics_dashboard/handlers.py +53 -0
  4. jupyterlab_unianalytics_dashboard/tests/__init__.py +1 -0
  5. jupyterlab_unianalytics_dashboard/tests/test_handlers.py +7 -0
  6. jupyterlab_unianalytics_dashboard-4.0.8.data/data/etc/jupyter/jupyter_server_config.d/jupyterlab_unianalytics_dashboard.json +7 -0
  7. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/package.json +49 -28
  8. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/schemas/jupyterlab_unianalytics_dashboard/package.json.orig +48 -27
  9. jupyterlab_unianalytics_dashboard-4.0.8.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/120.f9ab87c96623964d015f.js +1 -0
  10. jupyterlab_unianalytics_dashboard-4.0.8.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/18.759fbf2374edc42b5c3e.js +2 -0
  11. jupyterlab_unianalytics_dashboard-4.0.8.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/308.d9da4ce35f354c6f12e1.js +1 -0
  12. jupyterlab_unianalytics_dashboard-4.0.8.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/426.a7015f9dfda310972c1b.js +1 -0
  13. jupyterlab_unianalytics_dashboard-4.0.8.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/546.a8f5ba1be2a764c64287.js +1 -0
  14. jupyterlab_unianalytics_dashboard-4.0.8.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/638.d37271636c4d956096de.js +1 -0
  15. jupyterlab_unianalytics_dashboard-4.0.8.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/708.323c3614d31a5918cfaf.js +2 -0
  16. jupyterlab_unianalytics_dashboard-4.0.6.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/708.8d6156d603ddfa7e363d.js.LICENSE.txt → jupyterlab_unianalytics_dashboard-4.0.8.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/708.323c3614d31a5918cfaf.js.LICENSE.txt +1 -1
  17. jupyterlab_unianalytics_dashboard-4.0.8.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/remoteEntry.8cd70c149b116f11f59e.js +1 -0
  18. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/third-party-licenses.json +18 -18
  19. {jupyterlab_unianalytics_dashboard-4.0.6.dist-info → jupyterlab_unianalytics_dashboard-4.0.8.dist-info}/METADATA +52 -6
  20. jupyterlab_unianalytics_dashboard-4.0.8.dist-info/RECORD +33 -0
  21. {jupyterlab_unianalytics_dashboard-4.0.6.dist-info → jupyterlab_unianalytics_dashboard-4.0.8.dist-info}/WHEEL +1 -1
  22. {jupyterlab_unianalytics_dashboard-4.0.6.dist-info → jupyterlab_unianalytics_dashboard-4.0.8.dist-info}/licenses/LICENSE +1 -1
  23. jupyterlab_unianalytics_dashboard-4.0.6.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/18.7ff03b96ce4c1ba53ee1.js +0 -2
  24. jupyterlab_unianalytics_dashboard-4.0.6.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/308.52850e2a1110e4767a49.js +0 -1
  25. jupyterlab_unianalytics_dashboard-4.0.6.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/426.3f483e930d772b4f379a.js +0 -1
  26. jupyterlab_unianalytics_dashboard-4.0.6.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/546.8d39a8d86318c82a94bc.js +0 -1
  27. jupyterlab_unianalytics_dashboard-4.0.6.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/638.707471a39fb6c87b1554.js +0 -1
  28. jupyterlab_unianalytics_dashboard-4.0.6.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/694.d59084cb175b38ecc1a9.js +0 -1
  29. jupyterlab_unianalytics_dashboard-4.0.6.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/708.8d6156d603ddfa7e363d.js +0 -2
  30. jupyterlab_unianalytics_dashboard-4.0.6.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/remoteEntry.27b69645f536048bd908.js +0 -1
  31. jupyterlab_unianalytics_dashboard-4.0.6.dist-info/RECORD +0 -29
  32. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/install.json +0 -0
  33. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/schemas/jupyterlab_unianalytics_dashboard/plugin.json +0 -0
  34. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/10.1e5c908a94fc4b83c2e5.js +0 -0
  35. /jupyterlab_unianalytics_dashboard-4.0.6.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/18.7ff03b96ce4c1ba53ee1.js.LICENSE.txt → /jupyterlab_unianalytics_dashboard-4.0.8.data/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/18.759fbf2374edc42b5c3e.js.LICENSE.txt +0 -0
  36. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/39.5a3b28a79ba693a9b627.js +0 -0
  37. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/563.b613f734176cb51510ef.js +0 -0
  38. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/744.329dc4d1ed2f5c918266.js +0 -0
  39. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/798.33a8f0893a66574e9259.js +0 -0
  40. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/981.ebb9e1d6122980b5ff0e.js +0 -0
  41. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/981.ebb9e1d6122980b5ff0e.js.LICENSE.txt +0 -0
  42. {jupyterlab_unianalytics_dashboard-4.0.6.data → jupyterlab_unianalytics_dashboard-4.0.8.data}/data/share/jupyter/labextensions/jupyterlab_unianalytics_dashboard/static/style.js +0 -0
@@ -1,4 +1,13 @@
1
- from ._version import __version__
1
+ try:
2
+ from ._version import __version__
3
+ except ImportError:
4
+ # Fallback when using the package in dev mode without installing
5
+ # in editable mode with pip. It is highly recommended to install
6
+ # the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
7
+ import warnings
8
+ warnings.warn("Importing 'jupyterlab_unianalytics_dashboard' outside a proper installation.")
9
+ __version__ = "dev"
10
+ from .handlers import setup_handlers
2
11
 
3
12
 
4
13
  def _jupyter_labextension_paths():
@@ -6,3 +15,22 @@ def _jupyter_labextension_paths():
6
15
  "src": "labextension",
7
16
  "dest": "jupyterlab_unianalytics_dashboard"
8
17
  }]
18
+
19
+
20
+ def _jupyter_server_extension_points():
21
+ return [{
22
+ "module": "jupyterlab_unianalytics_dashboard"
23
+ }]
24
+
25
+
26
+ def _load_jupyter_server_extension(server_app):
27
+ """Registers the API handler to receive HTTP requests from the frontend extension.
28
+
29
+ Parameters
30
+ ----------
31
+ server_app: jupyterlab.labapp.LabApp
32
+ JupyterLab application instance
33
+ """
34
+ setup_handlers(server_app.web_app)
35
+ name = "jupyterlab_unianalytics_dashboard"
36
+ server_app.log.info(f"Registered {name} server extension")
@@ -1,4 +1,4 @@
1
1
  # This file is auto-generated by Hatchling. As such, do not:
2
2
  # - modify
3
3
  # - track in version control e.g. be sure to add to .gitignore
4
- __version__ = VERSION = '4.0.6'
4
+ __version__ = VERSION = '4.0.8'
@@ -0,0 +1,53 @@
1
+ import os
2
+ import uuid
3
+ from hashlib import sha256
4
+ from jupyter_server.config_manager import BaseJSONConfigManager
5
+
6
+ from jupyter_server.base.handlers import APIHandler
7
+ from jupyter_server.utils import url_path_join
8
+ import tornado
9
+
10
+ SECRET_SALT = '5ea06c48dbb6a90cdee78f88b8a08e673efda3d28c8019e62e326ce817ee8900'
11
+ def hash_user_id_with_salt(prehashed_id):
12
+ return sha256(prehashed_id.encode('utf-8') + SECRET_SALT.encode('utf-8')).hexdigest()
13
+
14
+ class RouteHandler(APIHandler):
15
+ # the following decorator should be present on all verb methods (head, get, post,
16
+ # patch, put, delete, options) to ensure only authorized user can request the
17
+ # Jupyter server
18
+ @tornado.web.authenticated
19
+ def get(self):
20
+ # return the anonymized user identifier
21
+ self.finish(self.anonymized_user_id)
22
+
23
+ def __init__(self, *args, **kwargs):
24
+ super().__init__(*args, **kwargs)
25
+
26
+ # get the SCIPER identifier if available
27
+ user_id = os.getenv('JUPYTERHUB_USER')
28
+
29
+ if not user_id :
30
+
31
+ # get randomly generated user_id from persisting config, and create one if not found
32
+ config_dir_path = os.path.join(os.path.expanduser('~'), '.jupyter/lab/user-settings/jupyterlab_unianalytics')
33
+ json_filename = 'unianalytics_user_info'
34
+
35
+ cm = BaseJSONConfigManager(config_dir=config_dir_path)
36
+ cm.ensure_config_dir_exists()
37
+
38
+ user_id = cm.get(json_filename).get('user_id')
39
+
40
+ if not user_id :
41
+ user_id = str(uuid.uuid4())
42
+ cm.set(json_filename, { 'user_id': user_id })
43
+
44
+ # anonymize the user_id
45
+ self.anonymized_user_id = hash_user_id_with_salt(user_id)
46
+
47
+ def setup_handlers(web_app):
48
+ host_pattern = ".*$"
49
+
50
+ base_url = web_app.settings["base_url"]
51
+ route_pattern = url_path_join(base_url, "jupyterlab-unianalytics-dashboard", "get_anonymized_user_id")
52
+ handlers = [(route_pattern, RouteHandler)]
53
+ web_app.add_handlers(host_pattern, handlers)
@@ -0,0 +1 @@
1
+ """Python unit tests for jupyterlab_unianalytics_dashboard."""
@@ -0,0 +1,7 @@
1
+
2
+ async def test_get_example(jp_fetch):
3
+ # When
4
+ response = await jp_fetch("jupyterlab-unianalytics-dashboard", "get_anonymized_user_id")
5
+
6
+ # Then
7
+ assert response.code == 200
@@ -0,0 +1,7 @@
1
+ {
2
+ "ServerApp": {
3
+ "jpserver_extensions": {
4
+ "jupyterlab_unianalytics_dashboard": true
5
+ }
6
+ }
7
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_unianalytics_dashboard",
3
- "version": "4.0.6",
3
+ "version": "4.0.8",
4
4
  "description": "A JupyterLab dashboard extension to visualize data from students.",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -14,11 +14,12 @@
14
14
  "license": "BSD-3-Clause",
15
15
  "author": {
16
16
  "name": "Raphael Marietan",
17
- "email": "me@test.com"
17
+ "email": "raphael.marietan@hotmail.com"
18
18
  },
19
19
  "files": [
20
20
  "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
21
21
  "style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
22
+ "src/**/*.{ts,tsx}",
22
23
  "schema/*.json"
23
24
  ],
24
25
  "main": "lib/index.js",
@@ -58,16 +59,14 @@
58
59
  "dependencies": {
59
60
  "@juggle/resize-observer": "^3.4.0",
60
61
  "@jupyterlab/application": "^4.0.0",
61
- "@jupyterlab/launcher": "^4.0.1",
62
+ "@jupyterlab/coreutils": "^6.0.0",
63
+ "@jupyterlab/services": "^7.0.0",
62
64
  "@jupyterlab/settingregistry": "^4.0.0",
63
- "@jupyterlab/toc": "^6.0.2",
64
65
  "@reduxjs/toolkit": "^1.9.5",
65
- "bootstrap": "^5.2.3",
66
- "chart.js": "^4.3.0",
67
- "crypto-js": "^4.1.1",
68
- "jszip": "^3.10.1",
69
- "marked": "^9.1.6",
70
- "react-bootstrap": "^2.7.4",
66
+ "bootstrap": "^5.3.2",
67
+ "chart.js": "^4.4.1",
68
+ "marked": "^11.1.1",
69
+ "react-bootstrap": "^2.10.0",
71
70
  "react-bootstrap-icons": "^1.10.3",
72
71
  "react-chartjs-2": "^5.2.0",
73
72
  "react-redux": "^8.0.5"
@@ -75,29 +74,29 @@
75
74
  "devDependencies": {
76
75
  "@jupyterlab/builder": "^4.0.0",
77
76
  "@jupyterlab/testutils": "^4.0.0",
78
- "@types/crypto-js": "^4.1.1",
79
77
  "@types/jest": "^29.2.0",
80
78
  "@types/json-schema": "^7.0.11",
81
79
  "@types/react": "^18.0.26",
82
- "@types/react-dom": "^18.2.14",
83
- "@types/uuid": "^9.0.2",
84
- "@typescript-eslint/eslint-plugin": "^5.55.0",
85
- "@typescript-eslint/parser": "^5.55.0",
80
+ "@types/react-addons-linked-state-mixin": "^0.14.22",
81
+ "@types/react-dom": "^18.2.18",
82
+ "@typescript-eslint/eslint-plugin": "^6.1.0",
83
+ "@typescript-eslint/parser": "^6.1.0",
86
84
  "css-loader": "^6.7.1",
87
85
  "eslint": "^8.36.0",
88
- "eslint-config-prettier": "^8.7.0",
89
- "eslint-plugin-prettier": "^4.2.1",
86
+ "eslint-config-prettier": "^8.8.0",
87
+ "eslint-plugin-prettier": "^5.0.0",
90
88
  "jest": "^29.2.0",
89
+ "mkdirp": "^1.0.3",
91
90
  "npm-run-all": "^4.1.5",
92
- "prettier": "^2.8.7",
93
- "rimraf": "^4.4.1",
91
+ "prettier": "^3.0.0",
92
+ "rimraf": "^5.0.1",
94
93
  "source-map-loader": "^1.0.2",
95
94
  "style-loader": "^3.3.1",
96
- "stylelint": "^14.9.1",
97
- "stylelint-config-prettier": "^9.0.4",
98
- "stylelint-config-recommended": "^8.0.0",
99
- "stylelint-config-standard": "^26.0.0",
100
- "stylelint-prettier": "^2.0.0",
95
+ "stylelint": "^15.10.1",
96
+ "stylelint-config-recommended": "^13.0.0",
97
+ "stylelint-config-standard": "^34.0.0",
98
+ "stylelint-csstree-validator": "^3.0.0",
99
+ "stylelint-prettier": "^4.0.0",
101
100
  "typescript": "~5.0.2",
102
101
  "yjs": "^13.5.0"
103
102
  },
@@ -110,11 +109,21 @@
110
109
  "access": "public"
111
110
  },
112
111
  "jupyterlab": {
112
+ "discovery": {
113
+ "server": {
114
+ "managers": [
115
+ "pip"
116
+ ],
117
+ "base": {
118
+ "name": "jupyterlab_unianalytics_dashboard"
119
+ }
120
+ }
121
+ },
113
122
  "extension": true,
114
123
  "outputDir": "jupyterlab_unianalytics_dashboard/labextension",
115
124
  "schemaDir": "schema",
116
125
  "_build": {
117
- "load": "static/remoteEntry.27b69645f536048bd908.js",
126
+ "load": "static/remoteEntry.8cd70c149b116f11f59e.js",
118
127
  "extension": "./extension",
119
128
  "style": "./style"
120
129
  }
@@ -186,7 +195,15 @@
186
195
  "singleQuote": true,
187
196
  "trailingComma": "none",
188
197
  "arrowParens": "avoid",
189
- "endOfLine": "auto"
198
+ "endOfLine": "auto",
199
+ "overrides": [
200
+ {
201
+ "files": "package.json",
202
+ "options": {
203
+ "tabWidth": 4
204
+ }
205
+ }
206
+ ]
190
207
  },
191
208
  "stylelint": {
192
209
  "extends": [
@@ -194,11 +211,15 @@
194
211
  "stylelint-config-standard",
195
212
  "stylelint-prettier/recommended"
196
213
  ],
214
+ "plugins": [
215
+ "stylelint-csstree-validator"
216
+ ],
197
217
  "rules": {
218
+ "csstree/validator": true,
198
219
  "property-no-vendor-prefix": null,
220
+ "selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
199
221
  "selector-no-vendor-prefix": null,
200
- "value-no-vendor-prefix": null,
201
- "selector-class-pattern": null
222
+ "value-no-vendor-prefix": null
202
223
  }
203
224
  }
204
225
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_unianalytics_dashboard",
3
- "version": "4.0.6",
3
+ "version": "4.0.8",
4
4
  "description": "A JupyterLab dashboard extension to visualize data from students.",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -14,11 +14,12 @@
14
14
  "license": "BSD-3-Clause",
15
15
  "author": {
16
16
  "name": "Raphael Marietan",
17
- "email": "me@test.com"
17
+ "email": "raphael.marietan@hotmail.com"
18
18
  },
19
19
  "files": [
20
20
  "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
21
21
  "style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
22
+ "src/**/*.{ts,tsx}",
22
23
  "schema/*.json"
23
24
  ],
24
25
  "main": "lib/index.js",
@@ -58,16 +59,14 @@
58
59
  "dependencies": {
59
60
  "@juggle/resize-observer": "^3.4.0",
60
61
  "@jupyterlab/application": "^4.0.0",
61
- "@jupyterlab/launcher": "^4.0.1",
62
+ "@jupyterlab/coreutils": "^6.0.0",
63
+ "@jupyterlab/services": "^7.0.0",
62
64
  "@jupyterlab/settingregistry": "^4.0.0",
63
- "@jupyterlab/toc": "^6.0.2",
64
65
  "@reduxjs/toolkit": "^1.9.5",
65
- "bootstrap": "^5.2.3",
66
- "chart.js": "^4.3.0",
67
- "crypto-js": "^4.1.1",
68
- "jszip": "^3.10.1",
69
- "marked": "^9.1.6",
70
- "react-bootstrap": "^2.7.4",
66
+ "bootstrap": "^5.3.2",
67
+ "chart.js": "^4.4.1",
68
+ "marked": "^11.1.1",
69
+ "react-bootstrap": "^2.10.0",
71
70
  "react-bootstrap-icons": "^1.10.3",
72
71
  "react-chartjs-2": "^5.2.0",
73
72
  "react-redux": "^8.0.5"
@@ -75,29 +74,29 @@
75
74
  "devDependencies": {
76
75
  "@jupyterlab/builder": "^4.0.0",
77
76
  "@jupyterlab/testutils": "^4.0.0",
78
- "@types/crypto-js": "^4.1.1",
79
77
  "@types/jest": "^29.2.0",
80
78
  "@types/json-schema": "^7.0.11",
81
79
  "@types/react": "^18.0.26",
82
- "@types/react-dom": "^18.2.14",
83
- "@types/uuid": "^9.0.2",
84
- "@typescript-eslint/eslint-plugin": "^5.55.0",
85
- "@typescript-eslint/parser": "^5.55.0",
80
+ "@types/react-addons-linked-state-mixin": "^0.14.22",
81
+ "@types/react-dom": "^18.2.18",
82
+ "@typescript-eslint/eslint-plugin": "^6.1.0",
83
+ "@typescript-eslint/parser": "^6.1.0",
86
84
  "css-loader": "^6.7.1",
87
85
  "eslint": "^8.36.0",
88
- "eslint-config-prettier": "^8.7.0",
89
- "eslint-plugin-prettier": "^4.2.1",
86
+ "eslint-config-prettier": "^8.8.0",
87
+ "eslint-plugin-prettier": "^5.0.0",
90
88
  "jest": "^29.2.0",
89
+ "mkdirp": "^1.0.3",
91
90
  "npm-run-all": "^4.1.5",
92
- "prettier": "^2.8.7",
93
- "rimraf": "^4.4.1",
91
+ "prettier": "^3.0.0",
92
+ "rimraf": "^5.0.1",
94
93
  "source-map-loader": "^1.0.2",
95
94
  "style-loader": "^3.3.1",
96
- "stylelint": "^14.9.1",
97
- "stylelint-config-prettier": "^9.0.4",
98
- "stylelint-config-recommended": "^8.0.0",
99
- "stylelint-config-standard": "^26.0.0",
100
- "stylelint-prettier": "^2.0.0",
95
+ "stylelint": "^15.10.1",
96
+ "stylelint-config-recommended": "^13.0.0",
97
+ "stylelint-config-standard": "^34.0.0",
98
+ "stylelint-csstree-validator": "^3.0.0",
99
+ "stylelint-prettier": "^4.0.0",
101
100
  "typescript": "~5.0.2",
102
101
  "yjs": "^13.5.0"
103
102
  },
@@ -110,6 +109,16 @@
110
109
  "access": "public"
111
110
  },
112
111
  "jupyterlab": {
112
+ "discovery": {
113
+ "server": {
114
+ "managers": [
115
+ "pip"
116
+ ],
117
+ "base": {
118
+ "name": "jupyterlab_unianalytics_dashboard"
119
+ }
120
+ }
121
+ },
113
122
  "extension": true,
114
123
  "outputDir": "jupyterlab_unianalytics_dashboard/labextension",
115
124
  "schemaDir": "schema"
@@ -181,7 +190,15 @@
181
190
  "singleQuote": true,
182
191
  "trailingComma": "none",
183
192
  "arrowParens": "avoid",
184
- "endOfLine": "auto"
193
+ "endOfLine": "auto",
194
+ "overrides": [
195
+ {
196
+ "files": "package.json",
197
+ "options": {
198
+ "tabWidth": 4
199
+ }
200
+ }
201
+ ]
185
202
  },
186
203
  "stylelint": {
187
204
  "extends": [
@@ -189,11 +206,15 @@
189
206
  "stylelint-config-standard",
190
207
  "stylelint-prettier/recommended"
191
208
  ],
209
+ "plugins": [
210
+ "stylelint-csstree-validator"
211
+ ],
192
212
  "rules": {
213
+ "csstree/validator": true,
193
214
  "property-no-vendor-prefix": null,
215
+ "selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$",
194
216
  "selector-no-vendor-prefix": null,
195
- "value-no-vendor-prefix": null,
196
- "selector-class-pattern": null
217
+ "value-no-vendor-prefix": null
197
218
  }
198
219
  }
199
220
  }
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkjupyterlab_unianalytics_dashboard=self.webpackChunkjupyterlab_unianalytics_dashboard||[]).push([[120],{8859:(e,t,o)=>{o.r(t),o.d(t,{CURRENT_NOTEBOOK_ID:()=>wt,PERSISTENT_USER_ID:()=>Ct,default:()=>Et,setCurrentNotebookId:()=>vt});var n=o(7750),a=o(6249),s=o(8547),l=o(4991);let i,r;o(4039),i="https://api.unianalytics.ch",r="wss://ax5pzl8bwk.execute-api.eu-north-1.amazonaws.com/production/";const c="jupyterlab_unianalytics_dashboard",d=`${c}:plugin`,h=`${c}_access_token`,m=`${c}_refresh_token`;var u;!function(e){e.dashboardOpenVisu=`${c}:dashboard-open-visu`,e.uploadNotebook=`${c}:dashboard-upload-notebook`,e.copyDownloadLink=`${c}:dashboard-copy-download-link`}(u||(u={}));const p='.jp-DirListing-item[data-file-type="notebook"]',g="unianalytics";var _,b;!function(e){e.notebookId=`${g}_notebook_id`,e.cellMapping=`${g}_cell_mapping`}(_||(_={}));class w{static async setJupyterVersion(e){w._jupyterVersion=e,await w._setEditorLanguageRegistry(),await w._asyncImports()}static async _setEditorLanguageRegistry(){if(4===w._jupyterVersion){const{StreamLanguage:e}=await o.e(373).then(o.t.bind(o,1373,23)),{EditorLanguageRegistry:t,parseMathIPython:n}=await Promise.resolve().then(o.t.bind(o,7388,23)),a=new t;t.getDefaultLanguages().forEach((e=>{a.addLanguage(e)})),a.addLanguage({name:"ipythongfm",mime:"text/x-ipythongfm",load:async()=>{const[t,s]=await Promise.all([Promise.all([o.e(638),o.e(211),o.e(373),o.e(376)]).then(o.bind(o,8638)),o.e(10).then(o.bind(o,8010))]);return t.markdown({base:t.markdownLanguage,codeLanguages:e=>a.findBest(e),extensions:[n(e.define(s.stexMath).parser)]})}}),w._editorDefaultLanguages=a}}static async _asyncImports(){if(4===w._jupyterVersion){const{EditorView:e}=await o.e(211).then(o.t.bind(o,6211,23));this._EditorView=e;const{jupyterTheme:t}=await Promise.resolve().then(o.t.bind(o,7388,23));this._jupyterTheme=t}}static checkJupyterVersionSet(){if(null===w._jupyterVersion)throw new Error("JupyterLab version is not set in CompatibilityManager before trying to access it.")}static observeEditorVisibility(e){return 3===w._jupyterVersion?new IntersectionObserver((t=>{t[0].isIntersecting&&e.refresh()}),{root:null,threshold:.5}):null}}b=w,w._jupyterVersion=null,w._editorDefaultLanguages=void 0,w._EditorView=void 0,w._jupyterTheme=void 0,w.getMetadataComp=(e,t)=>{var o;return w.checkJupyterVersionSet(),4===w._jupyterVersion?null==e?void 0:e.getMetadata(t):null===(o=null==e?void 0:e.metadata)||void 0===o?void 0:o.get(t)},w.setMetadataComp=(e,t,o)=>{var n;w.checkJupyterVersionSet(),4===w._jupyterVersion?null==e||e.setMetadata(t,o):null===(n=null==e?void 0:e.metadata)||void 0===n||n.set(t,o)},w.deleteMetadataComp=(e,t)=>{var o;return w.checkJupyterVersionSet(),4===w._jupyterVersion?null==e?void 0:e.deleteMetadata(t):null===(o=null==e?void 0:e.metadata)||void 0===o?void 0:o.delete(t)},w.getFileComp=e=>{var t;w.checkJupyterVersionSet();const o=null===(t=e.tracker.currentWidget)||void 0===t?void 0:t.selectedItems().next();return 4===w._jupyterVersion?null==o?void 0:o.value:o},w.getCellsArrComp=e=>(w.checkJupyterVersionSet(),e?Array.from({length:e.length},((t,o)=>e.get(o))):null),w.getCodeMirrorOptionsComp=()=>(w.checkJupyterVersionSet(),4===w._jupyterVersion?{extensions:[b._jupyterTheme,b._EditorView.lineWrapping,b._EditorView.editable.of(!1)],languages:w._editorDefaultLanguages}:{config:{readOnly:!0}}),w.getNextWidgetValueComp=e=>{var t;return w.checkJupyterVersionSet(),4===w._jupyterVersion?null===(t=e.next())||void 0===t?void 0:t.value:e.next()};const v=async(e,t)=>{const o=await C(e,t);if(401===o.status){const n=await o.json();if("expired_token"===(null==n?void 0:n.status)){if(await k())return C(e,t);console.log(`${c}: Token refresh failed.`)}}return o},C=async(e,t)=>{const o={headers:{Authorization:`Bearer ${sessionStorage.getItem(h)}`}},n={...o,...t,headers:{...o.headers,...(null==t?void 0:t.headers)||{}}};return fetch(e,n)},k=async()=>{const e=await fetch(`${i}/auth/refresh`,{method:"POST",headers:{Authorization:`Bearer ${sessionStorage.getItem(m)}`}});if(e.ok){const t=await e.json();if(null==t?void 0:t.access_token)return sessionStorage.setItem(h,t.access_token),!0}return!1},E=e=>!!(e&&!e.isDisposed&&e.context.isReady&&w.getMetadataComp(e.context.model,_.notebookId)&&w.getMetadataComp(e.context.model,_.cellMapping));var f=o(6029),y=o.n(f),S=o(8448),O=o(7403);const D=e=>{const[t,o]=(0,f.useState)(!1);return y().createElement("div",null,y().createElement("p",null,"Successfully uploaded, can be downloaded accessing:"),y().createElement("div",{className:"unianalytics-link-container"},y().createElement("div",{className:"unianalytics-link"},e.url),y().createElement("div",{className:"unianalytics-link-button-container"},y().createElement("button",{className:"unianalytics-link-button",onClick:()=>{navigator.clipboard.writeText(e.url).then((()=>{o(!0)})).catch((e=>{console.error(`${c}: Error copying to clipboard: `,e)}))}},t?y().createElement(S.checkIcon.react,null):y().createElement(S.copyIcon.react,null)))))};const x=new S.LabIcon({name:`${c}:visu-icon`,svgstr:'<svg height="200px" width="200px" viewBox="0 0 512 512.001"\nxmlns="http://www.w3.org/2000/svg">\n <g id="SVGRepo_bgCarrier" stroke-width="0"></g>\n <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>\n <g id="SVGRepo_iconCarrier"> \n <g> <g> \n <g> <path xmlns="http://www.w3.org/2000/svg" fill="#616161" class="jp-custom-icon jp-icon3 jp-icon-selectable" d="M105.094,307.2h129.347c16.345,0,29.642-13.298,29.642-29.642v-43.116c0-16.344-13.297-29.642-29.642-29.642H105.094 c-16.344,0-29.642,13.298-29.642,29.642v43.116C75.452,293.902,88.75,307.2,105.094,307.2z M91.621,234.442 c0-7.43,6.044-13.474,13.474-13.474h129.347c7.43,0,13.474,6.044,13.474,13.474v43.116c0,7.43-6.044,13.474-13.474,13.474 H105.094c-7.43,0-13.474-6.044-13.474-13.474V234.442z"></path> \n <path xmlns="http://www.w3.org/2000/svg" fill="#616161" class="jp-custom-icon jp-icon3 jp-icon-selectable" d="M509.633,476.642l-21.558-21.558c-3.157-3.156-8.275-3.156-11.433,0c-3.157,3.157-3.157,8.275,0,11.433l7.758,7.757H51.2 c-7.43,0-13.474-6.044-13.474-13.474V27.601l7.758,7.758c3.156,3.156,8.275,3.156,11.432,0c3.157-3.157,3.157-8.275,0-11.433 L35.358,2.367c-3.156-3.156-8.275-3.156-11.432,0L2.368,23.925c-3.157,3.157-3.157,8.275,0,11.433 c3.156,3.156,8.275,3.156,11.432,0l7.758-7.758V460.8c0,16.344,13.298,29.642,29.642,29.643h433.198l-7.758,7.757 c-3.157,3.157-3.157,8.275,0,11.433c1.579,1.578,3.649,2.367,5.717,2.367c2.068,0,4.138-0.789,5.717-2.367l21.558-21.558 C512.79,484.917,512.79,479.799,509.633,476.642z"></path>\n <path xmlns="http://www.w3.org/2000/svg" fill="#616161" class="jp-custom-icon jp-icon3 jp-icon-selectable" d="M105.094,177.853h377.263c16.344,0,29.642-13.298,29.642-29.642v-43.116c0-16.344-13.298-29.642-29.642-29.642H105.094 c-16.344,0-29.642,13.298-29.642,29.642v43.116C75.452,164.555,88.75,177.853,105.094,177.853z M91.621,105.095 c0-7.43,6.045-13.474,13.474-13.474h377.263c7.43,0,13.474,6.044,13.474,13.474v43.116c0,7.43-6.044,13.474-13.474,13.474 H105.094c-7.43,0-13.474-6.044-13.474-13.474V105.095z"></path> \n <path xmlns="http://www.w3.org/2000/svg" fill="#616161" class="jp-custom-icon jp-icon3 jp-icon-selectable" d="M105.094,436.548H353.01c16.344,0,29.642-13.298,29.642-29.642V363.79c0-16.344-13.298-29.642-29.642-29.642H105.094 c-16.344,0-29.642,13.298-29.642,29.642v43.116C75.452,423.25,88.75,436.548,105.094,436.548z M91.621,363.79 c0-7.43,6.044-13.474,13.474-13.474H353.01c7.43,0,13.474,6.044,13.474,13.474v43.116c0,7.43-6.044,13.474-13.474,13.474H105.094 c-7.43,0-13.474-6.044-13.474-13.474V363.79z"></path> </g>\n </g> </g> </g>\n </svg>'}),N=new S.LabIcon({name:`${c}:hide-icon`,svgstr:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash-fill" viewBox="0 0 16 16">\n <path d="m10.79 12.912-1.614-1.615a3.5 3.5 0 0 1-4.474-4.474l-2.06-2.06C.938 6.278 0 8 0 8s3 5.5 8 5.5a7.029 7.029 0 0 0 2.79-.588zM5.21 3.088A7.028 7.028 0 0 1 8 2.5c5 0 8 5.5 8 5.5s-.939 1.721-2.641 3.238l-2.062-2.062a3.5 3.5 0 0 0-4.474-4.474L5.21 3.089z"/>\n <path d="M5.525 7.646a2.5 2.5 0 0 0 2.829 2.829l-2.83-2.829zm4.95.708-2.829-2.83a2.5 2.5 0 0 1 2.829 2.829zm3.171 6-12-12 .708-.708 12 12-.708.708z"/>\n</svg>'}),T=new S.LabIcon({name:`${c}:show-icon`,svgstr:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-fill" viewBox="0 0 16 16">\n <path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>\n <path d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"/>\n</svg>'});var R=o(3748);const I={displayDashboard:!0,hasNotebookId:!1},L=(0,R.createSlice)({name:"tocdashboard",initialState:I,reducers:{setDisplayHideDashboard:(e,t)=>{e.displayDashboard=t.payload},setHasNotebookId:(e,t)=>{e.hasNotebookId=t.payload}}}),{setDisplayHideDashboard:A,setHasNotebookId:M}=L.actions,B=L.reducer,H={navigationState:[{pageName:"Notebook"}]},$=(0,R.createSlice)({name:"sidedashboard",initialState:H,reducers:{navigateToNotebook:(e,t)=>{e.navigationState=[{pageName:"Notebook"}]},navigateToCell:(e,t)=>{e.navigationState=[{pageName:"Notebook"},{pageName:"Cell",content:{cellId:t.payload.cellId}}]},navigateToHistory:(e,t)=>{e.navigationState=e.navigationState.slice(0,t.payload+1)},resetNavigationState:(e,t)=>{e.navigationState=H.navigationState}}}),{navigateToNotebook:U,navigateToCell:F,navigateToHistory:V,resetNavigationState:z}=$.actions,P=$.reducer,W=(0,R.createSlice)({name:"commondashboard",initialState:{notebookCells:null,timeWindow:"null",refreshBoolean:!1,displayRealTime:!0},reducers:{setTimeWindow:(e,t)=>{e.timeWindow=t.payload},setNotebookCells:(e,t)=>{e.notebookCells=t.payload},refreshDashboards:e=>{e.refreshBoolean=!e.refreshBoolean},displayRealTime:(e,t)=>{e.displayRealTime=t.payload}}}),{setTimeWindow:j,setNotebookCells:K,refreshDashboards:G,displayRealTime:J}=W.actions,q=W.reducer,X=(0,R.configureStore)({reducer:{tocdashboard:B,sidedashboard:P,commondashboard:q}});var Z,Q,Y=o(2445),ee=o(4351),te=o(4901);class oe{}!function(e){e.LOADING="Loading",e.NOTFOUND="Notebook not Registered",e.USERNOTAUTHORIZED="No User Permission for this Notebook",e.EXPIREDTOKEN="Expired Login Token",e.INVALIDCREDENTIALS="Invalid Credentials",e.ERROR="Fetching Error",e.SUCCESS="Success"}(Z||(Z={})),function(e){e.RIGHT_DASHBOARD_SHOW_HIDE="RIGHT_DASHBOARD_SHOW_HIDE",e.TOC_DASHBOARD_SHOW_HIDE="TOC_DASHBOARD_SHOW_HIDE",e.NOTEBOOK_CELL_BUTTON="NOTEBOOK_CELL_BUTTON",e.NOTEBOOK_TOOLBAR_BUTTON="NOTEBOOK_TOOLBAR_BUTTON",e.TOC_OPEN_CELL_DASHBOARD="TOC_OPEN_CELL_DASHBOARD",e.TOC_HEADING_CLICKED="TOC_HEADING_CLICKED",e.TOC_COLLAPSE_HEADERS="TOC_COLLAPSE_HEADERS",e.BREADCRUMB_TO_NOTEBOOK="BREADCRUMB_TO_NOTEBOOK",e.BREADCRUMB_TO_CELL="BREADCRUMB_TO_CELL",e.DASHBOARD_REFRESH_BUTTON="DASHBOARD_REFRESH_BUTTON",e.DASHBOARD_FILTER_TIME="DASHBOARD_FILTER_TIME",e.CELL_DASHBOARD_FILTER_SORT="CELL_DASHBOARD_FILTER_SORT",e.CELL_DASHBOARD_FILTER_CODE_INPUT="CELL_DASHBOARD_FILTER_CODE_INPUT",e.CELL_DASHBOARD_FILTER_CODE_OUTPUT="CELL_DASHBOARD_FILTER_CODE_OUTPUT",e.CELL_DASHBOARD_FILTER_EXECUTION="CELL_DASHBOARD_FILTER_EXECUTION",e.TOC_TOOLBAR_CODE="TOC_TOOLBAR_CODE",e.TOC_TOOLBAR_MARKDOWN="TOC_TOOLBAR_MARKDOWN",e.TOC_TOOLBAR_NUMBERED="TOC_TOOLBAR_NUMBERED",e.TOC_TOOLBAR_SHOW_HIDE="TOC_TOOLBAR_SHOW_HIDE",e.TOC_TOOLBAR_REFRESH="TOC_TOOLBAR_REFRESH"}(Q||(Q={}));const ne=X.dispatch;class ae{constructor(){this._socket=null,this._ongoingConnectionInfo=null,this._pingInterval=54e4,this._pingTimer=null}_createSocket(e){this._socket=new WebSocket(`wss://ax5pzl8bwk.execute-api.eu-north-1.amazonaws.com/production/?nbId=${e.notebookId}&conType=TEACHER`),this._socket.addEventListener("open",(()=>{console.log(`${c}: WebSocket connection opened for`,e),this._startPingTimer()})),this._socket.addEventListener("message",(e=>{const t=JSON.parse(e.data);"refreshDashboard"===t.action&&ne(G()),console.log(`${c}: Received message from server:`,t)})),this._socket.addEventListener("close",(t=>{console.log(`${c}: WebSocket connection closed for `,e,t),this._stopPingTimer()})),this._socket.addEventListener("error",(e=>{console.error(`${c}: WebSocket error`,e)}))}establishSocketConnection(e){this._closeSocketConnection(),this._ongoingConnectionInfo=e,e&&this._createSocket(e)}_closeSocketConnection(){this._socket&&this._socket.close(),this._socket=null}terminateSocketConnection(){this._closeSocketConnection(),this._ongoingConnectionInfo=null}_startPingTimer(){this._pingTimer=window.setInterval((()=>{this._socket&&this._socket.readyState===WebSocket.OPEN&&this._socket.send('{ "action":"ping" }')}),this._pingInterval)}_stopPingTimer(){this._pingTimer&&(clearInterval(this._pingTimer),this._pingTimer=null)}}const se=X.dispatch;class le{constructor(){this._panelUpdatedSignal=new te.Signal(this),this._panelSwitchedSignal=new te.Signal(this),this._ongoingContextId="",this._ongoingCheckId="",this._panel=null,this._monitor=null,this._validityChecks={tag:null,registered:Z.LOADING},this._websocketManager=new ae}get validityChecks(){return this._validityChecks}get notebookCells(){return this._notebookCells}get panel(){return this._panel}set panel(e){if(this._panel===e)return;if(this._panel&&this._panel.disposed.disconnect(this._onPanelDisposed,this),vt(null),this._validityChecks={tag:null,registered:Z.LOADING},this._websocketManager.terminateSocketConnection(),this._panel=e,this._onPanelSwitched(),this._panel&&this._panel.disposed.connect(this._onPanelDisposed,this),this._monitor&&(this._monitor.dispose(),this._monitor=null),!this._panel)return void this._onPanelUpdated();const t=crypto.randomUUID();this._ongoingContextId=t,this._panel.sessionContext.ready.then((()=>{if(this._ongoingContextId===t&&this._panel&&!this._panel.isDisposed){if(this._monitor=new ee.ActivityMonitor({signal:this._panel.context.model.contentChanged,timeout:1e3}),this._monitor.activityStopped.connect(this._onPanelUpdated,this),E(this._panel)){const e=w.getMetadataComp(this._panel.model,_.notebookId);vt(e),this._validityChecks={tag:e,registered:Z.LOADING},this._performRegistrationCheck()}this._onPanelUpdated()}}))}_performRegistrationCheck(){const e=crypto.randomUUID();this._ongoingCheckId=e;let t=Z.ERROR;v(`${i}/dashboard/${this._validityChecks.tag}/check`).then((e=>e.json())).then((e=>{(null==e?void 0:e.status)?"expired_token"===e.status?t=Z.EXPIREDTOKEN:"not_found"===e.status?t=Z.NOTFOUND:"no_user_permission"===e.status?t=Z.USERNOTAUTHORIZED:"success"===e.status&&(t=Z.SUCCESS):t=Z.INVALIDCREDENTIALS})).catch((e=>{console.log(`${c}: Notebook check fetching error (check your connection).`+e)})).finally((()=>{this._ongoingCheckId===e&&this._panel&&!this._panel.isDisposed&&(this._validityChecks.registered=t,this._validityChecks.registered===Z.SUCCESS&&(se(z()),this._websocketManager.establishSocketConnection({notebookId:this._validityChecks.tag})),this._panelUpdatedSignal.emit(void 0))}))}_onPanelDisposed(e){this.panel=null}get panelSwitched(){return this._panelSwitchedSignal}_onPanelSwitched(){this._panelSwitchedSignal.emit(void 0)}get panelUpdated(){return this._panelUpdatedSignal}_onPanelUpdated(){this._updateCellList(),this._panelUpdatedSignal.emit(void 0)}_updateCellList(){var e,t;const o=w.getCellsArrComp(null===(t=null===(e=this.panel)||void 0===e?void 0:e.model)||void 0===t?void 0:t.cells);if(o){const e=o.map((e=>e.id));if(n=e,a=this._notebookCells,!(n&&a&&n.length===a.length&&n.every(((e,t)=>e===a[t])))){this._notebookCells=e;const t=o.map((e=>({id:e.id,cellType:e.type})));return se(K(t)),!0}}else this._notebookCells=null;var n,a;return!1}}var ie=o(7760),re=o(8559);const ce=()=>y().createElement("div",{style:{width:"100%",textAlign:"center",margin:"50px 0"}},y().createElement(re.Spinner,{style:{width:"50px",height:"50px",fontSize:"x-large"},animation:"border",role:"status",variant:"primary"})),de=({title:e,placeholderText:t="No data for the opened notebook"})=>y().createElement("div",{className:"dashboard-TableOfContents"},y().createElement("div",{className:"dashboard-stack-panel-header"},"Side Panel Dashboard"),y().createElement("div",{className:"dashboard-TableOfContents-placeholder"},y().createElement("div",{className:"dashboard-TableOfContents-placeholderContent"},y().createElement("h3",null,e),y().createElement("p",null,t))));class he extends O.ReactWidget{constructor(e){super(),this.addClass("dashboard-panel"),this._panelManager=e,e.panelUpdated.connect((()=>this.update()),this)}onAfterShow(e){this.update()}onUpdateRequest(e){super.onUpdateRequest(e)}render(){if(!this._panelManager.panel)return f.createElement(de,{title:"No Notebook",placeholderText:"Open a notebook to start viewing its content."});if(!this._panelManager.panel.context.isReady)return f.createElement(ce,null);if(!this._panelManager.validityChecks.tag)return f.createElement(de,{title:"Notebook not Tagged for Tracking"});switch(this._panelManager.validityChecks.registered){case Z.LOADING:return f.createElement(ce,null);case Z.SUCCESS:return f.createElement(ie.Provider,{store:X},this.computeComponentToRender());default:return f.createElement(de,{title:this._panelManager.validityChecks.registered})}}}const me=he;class ue{static setPermission(e){ue._isInteractionRecordingEnabled=e}}ue._isInteractionRecordingEnabled=!1,ue.sendInteraction=e=>{ue._isInteractionRecordingEnabled&&fetch(`${i}/dashboard_interaction/add`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,dashboard_user_id:Ct,time:(new Date).toISOString(),notebook_id:wt})})};const pe=X.dispatch,ge=()=>{const e=(0,ie.useSelector)((e=>e.sidedashboard.navigationState));return y().createElement(re.Stack,{className:"breadcrumb-container",direction:"horizontal",gap:2},e.map(((t,o)=>y().createElement("div",{className:o===e.length-1?"breadcrumb-tile-active breadcrumb-tile":"breadcrumb-tile",onClick:()=>{"Notebook"===t.pageName?ue.sendInteraction({click_type:"ON",signal_origin:Q.BREADCRUMB_TO_NOTEBOOK}):"Cell"===t.pageName&&ue.sendInteraction({click_type:"ON",signal_origin:Q.BREADCRUMB_TO_CELL}),o!==e.length-1&&pe(V(o))}},t.pageName))),y().createElement("div",{className:"breadcrumb-buttons-container"},y().createElement(re.Button,{className:"breadcrumb-button",onClick:()=>{ue.sendInteraction({click_type:"ON",signal_origin:Q.DASHBOARD_REFRESH_BUTTON}),pe(G())}},y().createElement(S.refreshIcon.react,{elementSize:"large",className:"labicon-logo"}))))};var _e=o(2535);const be=X.dispatch,we=()=>y().createElement(re.DropdownButton,{id:"time-window-dropdown",title:y().createElement(_e.CalendarWeek,{className:"logo"}),variant:"outline-secondary",onSelect:e=>{e&&(ue.sendInteraction({click_type:"ON",signal_origin:Q.DASHBOARD_FILTER_TIME}),be(j(e)))},className:"custom-dropdown"},y().createElement(re.Dropdown.Header,null,"Data to keep"),y().createElement(re.Dropdown.Divider,null),y().createElement(re.Dropdown.Item,{eventKey:"60"},"Last minute"),y().createElement(re.Dropdown.Item,{eventKey:"600"},"Last 10 minutes"),y().createElement(re.Dropdown.Item,{eventKey:"3600"},"Last hour"),y().createElement(re.Dropdown.Item,{eventKey:"86400"},"Last day"),y().createElement(re.Dropdown.Item,{eventKey:"604800"},"Last week"),y().createElement(re.Dropdown.Item,{eventKey:"2592000"},"Last month"),y().createElement(re.Dropdown.Item,{eventKey:"15768000"},"Last 6 months"),y().createElement(re.Dropdown.Item,{eventKey:"null"},"All")),ve=({PassedComponent:e,title:t})=>y().createElement(re.Row,{className:"mb-4"},y().createElement(re.Card,{className:"chart-card"},y().createElement(re.Card.Title,{className:"chart-card-title"},t),y().createElement(re.Card.Body,{className:"chart-card-body"},e)));var Ce=o(7885);const ke={maintainAspectRatio:!1,plugins:{legend:{labels:{color:"#969696"}}},scales:{x:{title:{display:!0,text:"Code cell",color:"#969696"},ticks:{color:"#969696"}},y:{ticks:{beginAtZero:!0,precision:0,color:"#969696"},title:{display:!0,text:"Cumulated total across all users",color:"#969696"}}}},Ee={maintainAspectRatio:!1,plugins:{legend:{display:!0,labels:{usePointStyle:!0,color:"#969696"}},tooltip:{callbacks:{title:function(e){return`Cell ${e[0].raw.x}`},label:function(e){return`t: ${e.raw.y}`}}}},scales:{x:{type:"category",ticks:{color:"#969696"},title:{display:!0,text:"Cell (markdown & code)",color:"#969696"}},y:{ticks:{beginAtZero:!0,precision:0,color:"#969696"},title:{display:!0,text:"Time spent on a cell [s]",color:"#969696"}}}},fe=e=>{const[t,o]=(0,f.useState)({labels:[],datasets:[]}),n=(0,ie.useSelector)((e=>e.commondashboard.displayRealTime));return(0,f.useEffect)((()=>{v(`${i}/dashboard/${e.notebookId}/user_code_execution?timeWindow=${e.timeWindow}&displayRealTime=${n}`).then((e=>e.json())).then((t=>{var n;const a=(null===(n=e.notebookCells)||void 0===n?void 0:n.filter((e=>"code"===e.cellType)))||[],s={labels:Array.from({length:a.length},((e,t)=>t+1)),datasets:[{label:"clicks",data:Array(a.length).fill(null),backgroundColor:"rgba(51, 187, 238, 0.3)",borderColor:"rgba(51, 187, 238, 0.3)",borderWidth:1},{label:"executions",data:Array(a.length).fill(null),backgroundColor:"rgba(0, 119, 187, 0.6)",borderColor:"rgba(0, 119, 187, 0.6)",borderWidth:1},{label:"executions without errors",data:Array(a.length).fill(null),backgroundColor:"rgba(0, 153, 136, 0.9)",borderColor:"rgba(0, 153, 136, 0.9)",borderWidth:1}]};a.forEach(((e,o)=>{const n=t.find((t=>t.cell===e.id));n&&(s.datasets[0].data[o]=parseFloat(n.cell_click_pct),s.datasets[1].data[o]=parseFloat(n.code_exec_pct),s.datasets[2].data[o]=parseFloat(n.code_exec_ok_pct))})),o(s)}))}),[e.timeWindow,e.refreshRequired]),y().createElement(ve,{PassedComponent:y().createElement(Ce.Bar,{data:t,options:ke}),title:"Code cell execution across users"})},ye=e=>{const[t,o]=(0,f.useState)({labels:[],datasets:[]}),n=(0,ie.useSelector)((e=>e.commondashboard.displayRealTime));return(0,f.useEffect)((()=>{v(`${i}/dashboard/${e.notebookId}/user_cell_time?timeWindow=${e.timeWindow}&displayRealTime=${n}`).then((e=>e.json())).then((t=>{var n;const a={labels:e.notebookCells?Array.from({length:e.notebookCells.length},((e,t)=>t+1)):[],datasets:[{label:"time spent on a cell by a user",data:(null===(n=e.notebookCells)||void 0===n?void 0:n.flatMap(((e,o)=>{const n=t.find((t=>t.cell===e.id));return n?n.durations.map((e=>({x:o+1,y:e}))):[]})))||[],backgroundColor:"rgba(54, 162, 235, 0.2)",borderColor:"rgba(54, 162, 235, 1)",borderWidth:1,pointRadius:1}]};o(a)}))}),[e.timeWindow,e.refreshRequired]),y().createElement(ve,{PassedComponent:y().createElement(Ce.Scatter,{data:t,options:Ee}),title:"Amount of time spent on each cell"})},Se=e=>{const t=(0,ie.useSelector)((e=>e.commondashboard.timeWindow)),o=(0,ie.useSelector)((e=>e.commondashboard.refreshBoolean)),n=(0,ie.useSelector)((e=>e.commondashboard.notebookCells));return y().createElement(y().Fragment,null,y().createElement("div",{className:"dashboard-title-container"},y().createElement("div",{className:"dashboard-title-text"},e.notebookName),y().createElement("div",{className:"dashboard-dropdown-container"},y().createElement(we,null))),y().createElement(re.Row,null,y().createElement(re.Col,null,y().createElement(fe,{notebookId:e.notebookId,timeWindow:t,refreshRequired:o,notebookCells:n}),y().createElement(ye,{notebookId:e.notebookId,timeWindow:t,refreshRequired:o,notebookCells:n}))))};var Oe=o(3074);const De=new s.RenderMimeRegistry({initialFactories:s.standardRendererFactories}),xe=({cell_output_model:e})=>{const t=(0,f.useRef)(null),o=new Oe.OutputAreaModel;return(0,f.useEffect)((()=>{o.clear(),o.fromJSON(e);const n=t.current;if(n){n.innerHTML="";for(let e=0;e<o.length;++e){const t=o.get(e),a=De.preferredMimeType(t.data);if(a){const e=De.createRenderer(a);e.renderModel(t),n.appendChild(e.node)}}}}),[e]),y().createElement("div",{ref:t,className:"cell-content-container"})};var Ne=o(7388),Te=o(1121);const Re=({cell_input:e,language_mimetype:t,className:o})=>{const n=(0,f.useRef)(null);return(0,f.useEffect)((()=>{const o=n.current;if(o){o.innerHTML="";const n=new Te.CodeEditor.Model;n.mimeType=t,n.sharedModel.setSource(e);const a=new Ne.CodeMirrorEditor({host:o,model:n,...w.getCodeMirrorOptionsComp()}),s=w.observeEditorVisibility(a);return s&&s.observe(o),()=>{s&&s.disconnect()}}}),[e,t]),y().createElement("div",{ref:n,className:o})},Ie=({setOrderBy:e})=>y().createElement(re.DropdownButton,{id:"order-by-dropdown",title:y().createElement(_e.SortUp,{className:"logo"}),variant:"outline-secondary",onSelect:t=>{t&&(ue.sendInteraction({click_type:"ON",signal_origin:Q.CELL_DASHBOARD_FILTER_SORT}),e(t))},className:"custom-dropdown"},y().createElement(re.Dropdown.Header,null,"Sort cells by"),y().createElement(re.Dropdown.Divider,null),y().createElement(re.Dropdown.Item,{eventKey:"timeDesc"},"Time (most recent 1st)"),y().createElement(re.Dropdown.Item,{eventKey:"timeAsc"},"Time (oldest 1st)"),y().createElement(re.Dropdown.Item,{eventKey:"inputAsc"},"Input (shortest 1st)"),y().createElement(re.Dropdown.Item,{eventKey:"inputDesc"},"Input (longest 1st)"),y().createElement(re.Dropdown.Item,{eventKey:"outputAsc"},"Output (shortest 1st)"),y().createElement(re.Dropdown.Item,{eventKey:"outputDesc"},"Output (longest 1st)"));var Le=o(2779);const Ae=e=>{const[t,o]=(0,f.useState)(null);return(0,f.useEffect)((()=>{(()=>{const t=Le.marked.parser(Le.marked.lexer(e.markdownContent));o(e.sanitizer.sanitize(t))})()}),[e.markdownContent]),y().createElement("div",{className:"cell-content-container"},t&&y().createElement("div",{className:"jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput",dangerouslySetInnerHTML:{__html:t}}))},Me=e=>{const t=(0,f.useRef)([]),[o,n]=(0,f.useState)([]);let a=!1;const s=(0,ie.useSelector)((e=>e.sidedashboard.navigationState)),l=(0,ie.useSelector)((e=>e.commondashboard.timeWindow)),r=(0,ie.useSelector)((e=>e.commondashboard.refreshBoolean)),c=(0,ie.useSelector)((e=>e.commondashboard.displayRealTime)),[d,h]=(0,f.useState)(!0),[m,u]=(0,f.useState)(!0),[p,g]=(0,f.useState)(1),[_,b]=((e=800)=>{const[t,o]=(0,f.useState)(""),[n,a]=(0,f.useState)("");return(0,f.useEffect)((()=>{const t=setTimeout((()=>o(n)),e);return()=>clearTimeout(t)}),[n,e]),[t,a]})(),w=[{name:"All",value:1,status:"all"},{name:"Success",value:2,status:"ok"},{name:"Error",value:3,status:"error"}],C=w.map((e=>e.status)),[k,E]=(0,f.useState)("timeDesc"),S=e=>{const t=_.toLowerCase();t.length>0&&(e=e.filter((e=>{var o;return(null===(o=e.cell_input)||void 0===o?void 0:o.toLowerCase().includes(t))||e.cell_output_model&&JSON.stringify(e.cell_output_model).toLowerCase().includes(t)}))),e.sort(((e,t)=>{switch(k){case"timeDesc":return new Date(e.t_finish)<new Date(t.t_finish)?1:-1;case"timeAsc":return new Date(e.t_finish)>new Date(t.t_finish)?1:-1;case"inputAsc":return e.cell_input.length-t.cell_input.length;case"inputDesc":return t.cell_input.length-e.cell_input.length;case"outputAsc":return e.cell_output_length-t.cell_output_length;case"outputDesc":return t.cell_output_length-e.cell_output_length;default:return 0}})),n(e)},O=s[s.length-1].content;return(0,f.useEffect)((()=>{a=!0,v(`${i}/dashboard/${e.notebookId}/cell/${O.cellId}?timeWindow=${l}&displayRealTime=${c}`).then((e=>e.json())).then((e=>{t.current=e,S(e),a=!1}))}),[s,l,r]),(0,f.useEffect)((()=>{if(!a){const e=[...t.current];S(e)}}),[k,_]),y().createElement(y().Fragment,null,y().createElement("div",{className:"dashboard-title-container"},y().createElement("div",{className:"dashboard-title-text"},"Cell (",O.cellId,")"),y().createElement("div",{className:"dashboard-dropdown-container"},y().createElement(Ie,{setOrderBy:E}),y().createElement(we,null))),y().createElement(re.Form,{className:"cell-filter-container"},y().createElement("div",{className:"cell-radio-container"},y().createElement(re.ButtonGroup,{size:"sm"},y().createElement(re.ToggleButton,{style:{marginRight:"3px"},key:"0",id:"code-checkbox",type:"radio",variant:"outline-primary",value:"Code",checked:d,onClick:e=>{d&&!m?e.preventDefault():(ue.sendInteraction({click_type:d?"OFF":"ON",signal_origin:Q.CELL_DASHBOARD_FILTER_CODE_INPUT}),h(!d))}},"Code"),y().createElement(re.ToggleButton,{key:"1",id:"output-checkbox",type:"radio",variant:"outline-primary",value:"Output",checked:m,onClick:e=>{!d&&m?e.preventDefault():(ue.sendInteraction({click_type:m?"OFF":"ON",signal_origin:Q.CELL_DASHBOARD_FILTER_CODE_OUTPUT}),u(!m))}},"Output"))),y().createElement("div",{className:"cell-radio-container"},y().createElement(re.ButtonGroup,{size:"sm"},w.map(((e,t)=>y().createElement(re.ToggleButton,{key:t,id:`filter-${t}`,type:"radio",variant:"outline-primary",name:"radio",value:e.value,checked:p===e.value,onChange:e=>{ue.sendInteraction({click_type:"ON",signal_origin:Q.CELL_DASHBOARD_FILTER_EXECUTION}),g(Number(e.currentTarget.value))}},e.name))))),y().createElement(re.Form.Control,{size:"sm",type:"text",placeholder:"Type text to filter...",onChange:e=>b(e.target.value)})),y().createElement(y().Fragment,null,o.map(((t,o)=>y().createElement(re.Row,{key:o},"MarkdownExecution"===t.cell_type&&["all","ok"].includes(C[p-1])?y().createElement(re.Col,{md:12},y().createElement(re.Card,{className:"cell-card"},y().createElement(re.Card.Body,{style:{gap:"10px"}},y().createElement(re.Row,{className:"cell-card-wrapper"},y().createElement(re.Col,{md:12,className:"cell-user-title"},y().createElement(re.Card.Text,null,"User ",o+1)),y().createElement(re.Col,{md:12},y().createElement(Ae,{markdownContent:t.cell_input,sanitizer:e.sanitizer})))))):y().createElement(y().Fragment,null,(1===p||C[p-1]===t.status)&&y().createElement(re.Col,{md:12},y().createElement(re.Card,{className:"cell-card"},y().createElement(re.Card.Body,{style:{gap:"10px"}},y().createElement(re.Row,{className:"cell-card-wrapper"},y().createElement(re.Col,{md:12,className:"cell-user-title"},y().createElement(re.Card.Text,null,"User ",o+1)),y().createElement(re.Col,{md:12},d&&y().createElement(Re,{cell_input:t.cell_input,language_mimetype:t.language_mimetype,className:"cell-content-container"}),d&&m&&t.cell_output_model.length>0&&y().createElement("br",null),m&&t.cell_output_model.length>0&&y().createElement(xe,{cell_output_model:t.cell_output_model}))))))))))))};var Be=o(8352);Be.Chart.register(...Be.registerables);const He=e=>{const t=(0,ie.useSelector)((e=>e.sidedashboard.navigationState));return y().createElement("div",{className:"page-container"},y().createElement(ge,null),(()=>{switch(t[t.length-1].pageName){case"Notebook":return y().createElement(Se,{notebookId:e.notebookId,notebookName:e.notebookName});case"Cell":return y().createElement(Me,{notebookId:e.notebookId,sanitizer:e.sanitizer});default:return null}})())};class $e extends me{constructor(e,t){super(e),this.addClass("dashboard-react-widget"),this.title.caption="Side Dashboard",this.title.icon=x,this.id="side-dashboard",this.node.setAttribute("role","region"),this.node.setAttribute("aria-label","Side dashboard section"),this._sanitizer=t}onBeforeShow(e){ue.sendInteraction({click_type:"ON",signal_origin:Q.RIGHT_DASHBOARD_SHOW_HIDE})}onBeforeHide(e){ue.sendInteraction({click_type:"OFF",signal_origin:Q.RIGHT_DASHBOARD_SHOW_HIDE})}computeComponentToRender(){const e=this._panelManager.panel,t=this._panelManager.validityChecks.tag;return e&&t?f.createElement(He,{notebookId:t,notebookName:e.sessionContext.name,sanitizer:this._sanitizer}):f.createElement(f.Fragment,null)}}const Ue=(e,t)=>{const o=3*e/t+.1;return Math.min(1,o)},Fe=({data:e,cellId:t,commands:o})=>y().createElement(y().Fragment,null,e&&e[0]&&e[1]?y().createElement("div",{onClick:e=>{e.preventDefault(),o.execute(u.dashboardOpenVisu,{from:"Toc",cell_id:t})},className:"dashboard-toc-react-component",style:{backgroundColor:`rgba(25, 118, 210, ${Ue(e[0],e[1])})`}},y().createElement("span",{className:"dashboard-toc-react-text"},e[0]+"/"+e[1])):y().createElement("div",{className:"dashboard-toc-react-component"}));class Ve extends y().Component{render(){const{panel:e,heading:t,headings:o,addReactComponent:n,isFirstCellOccurrence:a,tocDashboardData:s,commands:l}=this.props,i=this.props.itemRenderer(e,t,o);return i?y().createElement("li",{className:"dashboard-tocItem",onClick:e=>{ue.sendInteraction({click_type:"ON",signal_origin:Q.TOC_HEADING_CLICKED}),e.preventDefault(),e.stopPropagation(),t.onClick()}},i,n&&y().createElement(Fe,{cellId:t.cellRef.model.id,data:a?s:null,commands:l})):null}}const ze=e=>{const[t,o]=(0,f.useState)(null),n=(0,ie.useSelector)((e=>e.tocdashboard.displayDashboard)),a=(0,ie.useSelector)((e=>e.commondashboard.refreshBoolean)),s=(0,ie.useSelector)((e=>e.commondashboard.timeWindow)),l=(0,ie.useSelector)((e=>e.commondashboard.displayRealTime));(0,f.useEffect)((()=>(d(),()=>{o(null)})),[e.notebookCells,e.notebookPanel]),(0,f.useEffect)((()=>{d()}),[a,s]);const r=(0,f.useRef)("12345678"),d=async()=>{const t=w.getMetadataComp(e.notebookPanel.model,_.notebookId);if(t&&e.notebookCells){try{const e=crypto.randomUUID();r.current=e;const n=await v(`${i}/dashboard/${t}/toc?timeWindow=${s}&displayRealTime=${l}`);if(e===r.current){if(n.ok){const e=await n.json();return void o(e.data)}console.log(`${c}: Error:`,n.status)}}catch(e){console.log(`${c}: Toc Fetch Error:`,e)}o(null)}},h=(t=>{const o=e.headings.map((e=>e.cellRef.model.id)),n=[...new Set(o)],a={},s=e.notebookCells;if(s&&t){const e=n.map((e=>s.indexOf(e)));e[0]=0,e.push(s.length);let o=0;for(let l=0;l<n.length;l++){const i=e[l],r=e[l+1];let c=0;if(-1===i)c=0;else for(let e=i;e<r;e++)c+=t.location_count[s[e]]||0;a[n[l]]=c,o+=c}a.total_count=o}return a})(t),m=new Set;return y().createElement("ul",{className:"dashboard-TableOfContents-content"},e.headings.map(((t,o)=>{const a=t.cellRef.model.id,s=!m.has(a);return s&&m.add(a),y().createElement(Ve,{panel:e.notebookPanel,heading:t,headings:e.headings,itemRenderer:e.itemRenderer,addReactComponent:n,isFirstCellOccurrence:s,tocDashboardData:[h[a],h.total_count],commands:e.commands,key:`${t.text}-${t.level}-${o++}`})})))};class Pe extends oe{constructor(e,t){super(),this._preRenderedToolbar=null,this._showCode=!1,this._showMarkdown=!1,this._numbering=t.numbering,this._numberingH1=t.numberingH1,this._syncCollapseState=t.syncCollapseState,this._widget=e,this.sanitizer=t.sanitizer,this._collapseChanged=new te.Signal(this)}set numberingH1(e){this._numberingH1!==e&&(this._numberingH1=e,this._widget.update())}get numberingH1(){return this._numberingH1}set syncCollapseState(e){this._syncCollapseState!==e&&(this._syncCollapseState=e,this._widget.update())}get syncCollapseState(){return this._syncCollapseState}setNotebookMetadata(e,t){null!==t&&t.model&&w.setMetadataComp(t.model,e[0],e[1])}setNumbering(e,t){this._numbering=e,this._widget.update(),this.setNotebookMetadata(["dashboard-toc-autonumbering",this._numbering],t)}get numbering(){return this._numbering}setShowCode(e,t){this._showCode=e,this.setNotebookMetadata(["dashboard-toc-showcode",this._showCode],t),this._widget.update()}get showCode(){return this._showCode}setShowMarkdown(e,t){this._showMarkdown=e,this.setNotebookMetadata(["dashboard-toc-showmarkdowntxt",this._showMarkdown],t),this._widget.update()}get showMarkdown(){return this._showMarkdown}get collapseChanged(){return this._collapseChanged}set preRenderedToolbar(e){this._preRenderedToolbar=e}get preRenderedToolbar(){return this._preRenderedToolbar}updateWidget(){this._widget.update()}updateAndCollapse(e){this._collapseChanged.emit(e),this._widget.update()}initializeOptions(e,t,o,n,a){this._numbering=e,this._numberingH1=t,this._syncCollapseState=o,this._showCode=n,this._showMarkdown=a,this._widget.update()}}function We(e){if(e.length>0){let t=e.length-1;for(;t>=0;){if("header"===e[t].type)return e[t].level;t-=1}}return 0}const je="jp-MarkdownHeadingCollapsed",Ke="dashboard-toc-hr-collapsed";function Ge(e,t,o,n,a,s){const l=[];if(e){const i=e.split("\n"),r=Math.min(i.length,3);let c="",d=0;for(;d<r-1;d++)c+=i[d]+"\n";c+=i[d],l.push({text:c,level:n+1,onClick:t(0),type:"code",prompt:o,cellRef:a,hasChild:!1,index:s})}return l[0]}function Je(e,t,o,n){if(t&&t.text){if(o&&"header"===o.type)for(let t=e.length-1;t>=0;t--)e[t]===o&&(e[t].hasChild=!0);n<0&&e.push(t),o=t}return[e,o]}const qe={allowedTags:["p","blockquote","b","i","strong","em","strike","code","br","div","span","pre","del"],allowedAttributes:{code:["class"],span:["class"],div:["class"],p:["class"],pre:["class"]}};function Xe(e,t,o,n,a,s=!1,l=!0,i,r){const c=e.querySelectorAll("h1, h2, h3, h4, h5, h6, p");let d=a;const h=[];for(const e of c){if("p"===e.nodeName.toLowerCase()){if(e.innerHTML){const n=o.sanitize(e.innerHTML,qe);h.push({level:d+1,html:n.replace("¶",""),text:e.textContent?e.textContent:"",onClick:t(e),type:"markdown",cellRef:i,hasChild:!1,index:r})}continue}e.getElementsByClassName("numbering-entry").length>0&&e.removeChild(e.getElementsByClassName("numbering-entry")[0]);let a=o.sanitize(e.innerHTML,qe);a=a.replace("¶","");let c=parseInt(e.tagName[1],10);l||(c-=1),d=c;const m=Ye(n,c);if(s){const t=document.createElement("span");t.classList.add("numbering-entry"),t.textContent=null!=m?m:"",e.insertBefore(t,e.firstChild)}h.push({level:c,text:e.textContent?e.textContent:"",numbering:m,html:a,onClick:t(e),type:"header",cellRef:i,hasChild:!1,index:r})}return h}function Ze(e,t,o,n,a,s){return e&&"markdown"===e.type&&s?[t,o]=Je(t,e,o,n):e&&"header"===e.type&&([t,o,n]=function(e,t,o,n,a){const s=e.length;if(o&&"header"===o.type&&o.level<t.level)for(let t=s-1;t>=0;t--)e[t]===o&&(e[t].hasChild=!0);return(n>=t.level||n<0)&&(e.push(t),n=a?t.level:-1),[e,o=t,n]}(t,e,o,n,a)),[t,o,n]}const Qe=6;function Ye(e,t){if(null===e)return;let o="";if(e=function(e,t){for(let o=t+1;o<=Qe;o++)void 0!==e[o]&&(e[o]=void 0);return void 0===e[t]?e[t]=1:e[t]+=1,e}(e,t),t>=1){for(let n=1;n<=t;n++)o+=(void 0===e[n]?"0":e[n])+".";o+=" "}return o}function et(e){const t=e.split("\n");let o=t[0].match(/^([#]{1,6}) (.*)/);return o?{text:o[2].replace(/\[(.+)\]\(.+\)/g,"$1"),level:o[1].length,type:"markdown"}:t.length>1&&(o=t[1].match(/^ {0,3}([=]{2,}|[-]{2,})\s*$/),o)?{text:t[0].replace(/\[(.+)\]\(.+\)/g,"$1"),level:"="===o[1][0]?1:2,type:"markdown-alt"}:(o=t[0].match(/<h([1-6]).*>(.*)<\/h\1>/i),o?{text:o[2],level:parseInt(o[1],10),type:"html"}:null)}function tt(e,t,o,n,a,s){const l=t(0),i=[];let r=n;for(const t of e.split("\n"))if(t){const e=et(t);e?(i.push({text:e.text,level:e.level,numbering:Ye(o,e.level),onClick:l,type:"header",cellRef:a,hasChild:!1,index:s}),r=e.level):i.push({text:t,level:r+1,onClick:l,type:"markdown",cellRef:a,hasChild:!1,index:s})}return i}function ot(e,t,o){if(t.index>-1||(null==o?void 0:o.length)){const n=e.content.activeCellIndex,a=t.index;if(n&&a<n){const e=o.indexOf(t)+1;if(e>=o.length)return!0;if((null==o?void 0:o[e].index)>n)return!0}}return!1}const nt=X.dispatch;function at(e,t,o){let n=!0,a=!1;o&&o.composite.tocDashboardSettings&&(n=o.composite.tocDashboardSettings.numberingH1,a=o.composite.tocDashboardSettings.syncCollapseState);const s=new Pe(e,{numbering:!1,numberingH1:n,syncCollapseState:a,sanitizer:t});return o&&o.composite.tocDashboardSettings&&o.changed.connect((()=>{s.numberingH1=o.composite.tocDashboardSettings.numberingH1,s.syncCollapseState=o.composite.tocDashboardSettings.syncCollapseState})),{options:s,toolbarGenerator:function(e){return function(e,t){return class extends f.Component{constructor(o){super(o),this.state={showCode:!0,showMarkdown:!1,numbering:!1,showVisuDashboard:I.displayDashboard},t.context.ready.then((()=>{if(t){t.content.activeCellChanged.connect((()=>{e.updateWidget()}));const o=w.getMetadataComp(t.model,"dashboard-toc-autonumbering"),n=w.getMetadataComp(t.model,"dashboard-toc-showcode"),a=w.getMetadataComp(t.model,"dashboard-toc-showmarkdowntxt");e.initializeOptions(o||e.numbering,e.numberingH1,e.syncCollapseState,n||e.showCode,a||e.showMarkdown),this.setState({showCode:e.showCode,showMarkdown:e.showMarkdown,numbering:e.numbering})}}))}toggleCode(){ue.sendInteraction({click_type:e.showCode?"OFF":"ON",signal_origin:Q.TOC_TOOLBAR_CODE}),e.setShowCode(!e.showCode,t),this.setState({showCode:e.showCode})}toggleMarkdown(){ue.sendInteraction({click_type:e.showMarkdown?"OFF":"ON",signal_origin:Q.TOC_TOOLBAR_MARKDOWN}),e.setShowMarkdown(!e.showMarkdown,t),this.setState({showMarkdown:e.showMarkdown})}toggleNumbering(){ue.sendInteraction({click_type:e.numbering?"OFF":"ON",signal_origin:Q.TOC_TOOLBAR_NUMBERED}),e.setNumbering(!e.numbering,t),this.setState({numbering:e.numbering})}toggleShowVisuDashboard(){const e=this.state.showVisuDashboard;ue.sendInteraction({click_type:e?"OFF":"ON",signal_origin:Q.TOC_TOOLBAR_SHOW_HIDE}),nt(A(!e)),this.setState({showVisuDashboard:!e})}refreshDashboard(){ue.sendInteraction({click_type:"ON",signal_origin:Q.TOC_TOOLBAR_REFRESH}),nt(G())}render(){const e=f.createElement("div",{onClick:e=>this.toggleCode(),role:"text","aria-label":"Toggle Code Cells",title:"Toggle Code Cells",className:this.state.showCode?"dashboard-toc-toolbar-icon-selected":"dashboard-toc-toolbar-icon"},f.createElement(S.codeIcon.react,null)),t=f.createElement("div",{onClick:e=>this.toggleMarkdown(),role:"text","aria-label":"Toggle Markdown Text Cells",title:"Toggle Markdown Text Cells",className:this.state.showMarkdown?"dashboard-toc-toolbar-icon-selected":"dashboard-toc-toolbar-icon"},f.createElement(S.markdownIcon.react,null)),o=f.createElement("div",{onClick:e=>this.toggleNumbering(),role:"text","aria-label":"Toggle Auto-Numbering",title:"Toggle Auto-Numbering",className:this.state.numbering?"dashboard-toc-toolbar-icon-selected":"dashboard-toc-toolbar-icon"},f.createElement(S.numberingIcon.react,null)),n=f.createElement("div",{onClick:e=>this.toggleShowVisuDashboard(),role:"text","aria-label":this.state.showVisuDashboard?"Hide Visualization Dashboard":"Show Visualization Dashboard",title:this.state.showVisuDashboard?"Hide Visualization Dashboard":"Show Visualization Dashboard",className:"dashboard-toc-toolbar-icon"},this.state.showVisuDashboard?f.createElement(N.react,null):f.createElement(T.react,null)),a=f.createElement("div",{onClick:e=>this.refreshDashboard(),role:"text","aria-label":"Refresh Dashboard",title:"Refresh Dashboard",className:"dashboard-toc-toolbar-icon"},f.createElement(S.refreshIcon.react,null));return f.createElement("div",null,f.createElement("div",{className:"dashboard-toc-toolbar"},f.createElement("div",{className:"dashboard-toc-toolbar-compartment"},e,t,o),f.createElement("div",{className:"dashboard-toc-toolbar-compartment"},n,a)))}}}(s,e)},itemRenderer:function(e,t,o=[]){return function(e,t,o,n=[]){var a;if("markdown"===o.type||"header"===o.type){let a="dashboard-toc-level-size-default";const s=o.numbering&&e.numbering?o.numbering:"",l=e.syncCollapseState?je:Ke;if("header"!==o.type&&"markdown"!==o.type||(a="dashboard-toc-level-size-"+o.level),"header"===o.type||e.showMarkdown){let i;i=o.html?f.createElement("span",{dangerouslySetInnerHTML:{__html:s+e.sanitizer.sanitize(o.html,qe)},className:"dashboard-"+o.type+"-cell dashboard-toc-cell-item"}):f.createElement("span",{className:"dashboard-"+o.type+"-cell dashboard-toc-cell-item"},s+o.text);let r=null;return"header"===o.type&&(r=f.createElement("div",{className:"jp-Collapser p-Widget lm-Widget",onClick:n=>{n.stopPropagation(),function(t,o,n){let a=!1;const s=e.syncCollapseState,l=w.getMetadataComp(null==n?void 0:n.cellRef.model,o);l&&(a=l),n?(ue.sendInteraction({click_type:a?"OFF":"ON",signal_origin:Q.TOC_COLLAPSE_HEADERS}),s?t&&Y.NotebookActions.setHeadingCollapse(null==n?void 0:n.cellRef,!a,t.content):a?w.deleteMetadataComp(n.cellRef.model,o):w.setMetadataComp(n.cellRef.model,o,!0),e.updateAndCollapse({heading:n,collapsedState:a})):e.updateWidget()}(t,l,o)}},f.createElement("div",{className:"dashboard-toc-Collapser-child"}))),i=f.createElement("div",{className:"dashboard-toc-entry-holder "+a+(t.content.activeCell===o.cellRef||ot(t,o,n)?" dashboard-toc-active-cell":"")},r,i),i}return null}if(t&&"code"===o.type&&e.showCode){const e=(null===(a=w.getMetadataComp(t.model,"language_info"))||void 0===a?void 0:a.mimetype)||"text";return f.createElement("div",{className:"dashboard-toc-code-cell-div"},f.createElement("div",{className:"dashboard-toc-code-cell-prompt"},o.prompt),f.createElement("span",{className:"dashboard-toc-code-span"},f.createElement(Re,{cell_input:o.text,language_mimetype:e,className:"dashboard-toc-cell-input"})))}return null}(s,e,t,o)},generate:function(o){let n=[],a=-1;const l={};let i=null;for(let r=0;r<o.content.widgets.length;r++){const c=o.content.widgets[r],d=c.model,h=s.syncCollapseState?je:Ke;let m=w.getMetadataComp(d,h);if(m=m||!1,"code"!==d.type){if("markdown"===d.type){const e=c;let h;const u=We(n);if(e.rendered&&!e.inputHidden){const d=t=>()=>{e.rendered?(o.content.mode="command",c.node.scrollIntoView(),o.content.activeCellIndex=r):(o.content.activeCellIndex=r,t.scrollIntoView())},p=Xe(c.node,d,t,l,u,s.numbering,s.numberingH1,c,r);for(h of p)[n,i,a]=Ze(h,n,i,a,m,s.showMarkdown)}else{const e=e=>()=>{o.content.activeCellIndex=r,c.node.scrollIntoView()},t=tt(d.sharedModel.getSource(),e,l,u,c,r);for(h of t)[n,i,a]=Ze(h,n,i,a,m,s.showMarkdown)}}}else if(!e||e&&s.showCode){const e=e=>()=>{o.content.activeCellIndex=r,c.node.scrollIntoView()},t=c.model.executionCount,s=null!==t?"["+t+"]: ":"[ ]: ",l=Ge(d.sharedModel.getSource(),e,s,We(n),c,r);[n,i]=Je(n,l,i,a)}}return n},collapseChanged:s.collapseChanged}}const st=e=>e.toLocaleString("sv-SE").slice(0,-3),lt=e=>{const[t,o]=(0,f.useState)(e.startT1),[n,a]=(0,f.useState)(e.startT2),s=st(new Date),l=t=>{o(t),e.t1Callback(t)},i=t=>{a(t),e.t2Callback(t)};return y().createElement("div",{className:"dashboard-export-dialog-container"},y().createElement("p",null,"Select the time range of the data you want to export (the past week selected by default)."),y().createElement("div",{className:"dashboard-export-dialog-calendar-container"},y().createElement("div",{className:"dashboard-export-dialog-calendar"},y().createElement("p",null,"Start Date :"),y().createElement("input",{className:"dashboard-calendar-input",type:"datetime-local",value:st(t),onChange:e=>(e=>{const t=new Date(e);l(t),t>=n&&i(t)})(e.target.value),max:st(n)})),y().createElement("div",{className:"dashboard-export-dialog-calendar"},y().createElement("p",null,"End Date :"),y().createElement("input",{className:"dashboard-calendar-input",type:"datetime-local",value:st(n),onChange:e=>(e=>{const o=new Date(e);i(o),o<=t&&l(o)})(e.target.value),max:s}))))},it=e=>{const[t,o]=(0,f.useState)(!1);return y().createElement("div",{className:"dashboard-toc-download-button"+(t?"-disabled":""),onClick:()=>{t||(e=>{let t=new Date,n=new Date;n.setDate(t.getDate()-7),(0,O.showDialog)({title:"Download Notebook Data",body:y().createElement(lt,{startT1:n,startT2:t,t1Callback:e=>n=e,t2Callback:e=>t=e}),buttons:[{accept:!0,actions:[],ariaLabel:"Export",caption:"",className:"",displayType:"default",iconClass:"",iconLabel:"",label:"Export"},O.Dialog.cancelButton()]}).then((a=>{a.button.accept&&((e,t,n)=>{o(!0);let a="";v(`${i}/dashboard/${e}/download_csv?t1=${t.toISOString()}&t2=${n.toISOString()}`).then((e=>{var t;if(e.ok){const o=e.headers.get("Content-Disposition");return a=(null===(t=null==o?void 0:o.match(/filename=(.+)/))||void 0===t?void 0:t[1])||"",e.blob()}})).then((e=>{if(e){const t=window.URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.download=a,document.body.appendChild(o),o.click(),o.remove()}})).finally((()=>{o(!1)}))})(e,n,t)}))})(e.notebookId)}},y().createElement(S.downloadIcon.react,{className:"dashboard-toc-download-icon"}),"Export")};class rt extends me{constructor(e,t,o,n){super(e),this.title.caption="Dashboard ToC",this.title.icon=x,this.id="dashboard-toc-code",this.node.setAttribute("role","region"),this.node.setAttribute("aria-label","Dashboard ToC section"),this._commands=t,this._notebookGenerator=at(this,o,n),this._toolbar=null,e.panelSwitched.connect(this._onPanelSwitched,this)}onBeforeShow(e){ue.sendInteraction({click_type:"ON",signal_origin:Q.TOC_DASHBOARD_SHOW_HIDE})}onBeforeHide(e){ue.sendInteraction({click_type:"OFF",signal_origin:Q.TOC_DASHBOARD_SHOW_HIDE})}_onPanelSwitched(e){this._panelManager.panel?this._toolbar=this._notebookGenerator.toolbarGenerator(this._panelManager.panel):this._toolbar=null}computeComponentToRender(){const e=this._panelManager.panel;return e?f.createElement("div",{className:"dashboard-TableOfContents"},f.createElement("div",{className:"dashboard-stack-panel-header"},f.createElement("span",{className:"dashboard-toc-header-title"},ee.PathExt.basename(e.context.localPath)),f.createElement(it,{notebookId:this._panelManager.validityChecks.tag})),this._toolbar&&f.createElement(this._toolbar,null),f.createElement(ze,{headings:this._notebookGenerator.generate(e),itemRenderer:this._notebookGenerator.itemRenderer,notebookPanel:e,commands:this._commands,notebookCells:this._panelManager.notebookCells})):f.createElement(f.Fragment,null)}}var ct=o(4882);const dt="cell-dashboard-button-container";class ht extends ct.Widget{constructor(e,t){super(),this.addClass(dt);const o=document.createElement("button");o.className="cell-dashboard-button",o.innerHTML=x.svgstr,o.title=o.disabled?"No notebook identifier":"Open Cell Dashboard",o.onclick=()=>{e.execute(u.dashboardOpenVisu,{from:"Cell",cell_id:t})},this.node.appendChild(o)}dispose(){super.dispose()}}class mt{constructor(e){this._commands=e}createNew(e){return new ut(e,this._commands)}}class ut{constructor(e,t){this._isDisposed=!1,this._panel=e,this._commands=t,this._previousActiveCell=this._panel.content.activeCell,e.context.ready.then((()=>{E(e)?(e.revealed.then((()=>{e&&!e.isDisposed&&setTimeout((()=>{this._onActiveCellChanged(e.content)}),1e3/60)})),e.content.renderingLayoutChanged.connect(this._onActiveCellChanged,this),e.content.activeCellChanged.connect(this._onActiveCellChanged,this),e.disposed.connect((()=>{e.content.activeCellChanged.disconnect(this._onActiveCellChanged)}))):this.dispose()}))}_addCellButton(e){const t=this._getCell(e);if(t){const e=new ht(this._commands,t.model.id);t.layout.insertWidget(0,e)}}_onActiveCellChanged(e){this._previousActiveCell&&!this._previousActiveCell.isDisposed&&this._removeCellButton(this._previousActiveCell.model);const t=e.activeCell;null!==t&&(this._addCellButton(t.model),this._previousActiveCell=t)}_getCell(e){var t;return null===(t=this._panel)||void 0===t?void 0:t.content.widgets.find((t=>t.model===e))}_removeCellButton(e){const t=this._getCell(e);t&&this._findCellButtonWidgets(t).forEach((e=>{e.dispose()}))}_findCellButtonWidgets(e){return e.layout.widgets.filter((e=>e.hasClass(dt)))||[]}get isDisposed(){return this._isDisposed}dispose(){var e;if(this.isDisposed)return;this._isDisposed=!0;const t=w.getCellsArrComp(null===(e=this._panel)||void 0===e?void 0:e.context.model.cells);if(t)for(const e of t)this._removeCellButton(e);this._panel=null,te.Signal.clearData(this)}}var pt=o(7717);class gt{constructor(e){this._commands=e}createNew(e){const t=new O.ToolbarButton({className:"open-visu-button",icon:x,onClick:()=>{this._commands.execute(u.dashboardOpenVisu,{from:"Notebook"})},tooltip:"Open Notebook Visualization"});return e.context.ready.then((()=>{E(e)&&e.toolbar.insertItem(10,"openVisu",t)})),new pt.DisposableDelegate((()=>{t.dispose()}))}}const _t=X.dispatch;var bt=o(1810);let wt=null;function vt(e){wt=e}let Ct=null;const kt={id:d,autoStart:!0,requires:[a.IFileBrowserFactory,n.ILayoutRestorer,n.ILabShell,s.IRenderMimeRegistry,l.ISettingRegistry],optional:[],activate:(e,t,o,n,a,s)=>{console.log(`JupyterLab extension ${c} is activated!`);const l="3.1.0",r=e.version.match(/[0-9]+/g),d=async function(e="",t={}){const o=bt.ServerConnection.makeSettings(),n=ee.URLExt.join(o.baseUrl,"jupyterlab-unianalytics-dashboard",e);let a;try{a=await bt.ServerConnection.makeRequest(n,t,o)}catch(e){throw new bt.ServerConnection.NetworkError(e)}const s=await a.text();if(!a.ok)throw new bt.ServerConnection.ResponseError(a,s.message||s);return s}("get_anonymized_user_id");if(r&&((e,t)=>{const o=e.split(/[^0-9]+/).map(Number),n=t.split(/[^0-9]+/).map(Number);for(let e=0;e<Math.min(o.length,n.length);e++){const t=o[e],a=n[e];if(t!==a)return t-a}const a=e.replace(/[0-9]+/g,""),s=t.replace(/[0-9]+/g,"");return a.localeCompare(s)})(e.version,l)>=0){const l=parseInt(r[0]);w.setJupyterVersion(l).then((()=>{d.then((l=>{Ct=l;let r=[];fetch(`${i}/auth/login`,{method:"POST",headers:{"Unianalytics-User-Id":Ct}}).then((e=>{if(e.ok)return e.json();throw new Error("Unauthorized user")})).then((l=>{"logged_in"===l.status?(r=l.auth_notebooks||[],sessionStorage.setItem(h,l.access_token),sessionStorage.setItem(m,l.refresh_token),function(e,t){console.log(`JupyterLab extension ${c}: upload plugin is activated!`),e.commands.addCommand(u.uploadNotebook,{label:"Upload notebook to unianalytics",icon:e=>e.isContextMenu?S.fileUploadIcon:void 0,execute:o=>{const n=w.getFileComp(t);n&&e.serviceManager.contents.get(n.path).then((t=>{var o,a;(o=t.content,a=n.name,new Promise(((e,t)=>{const n=new FormData;n.append("notebook_content",JSON.stringify(o)),n.append("name",a),v(i+"/notebook/upload",{method:"POST",body:n}).then((o=>{o.ok?e(o.json()):t(new Error("Failed to upload notebook on the backend"))})).catch((e=>{console.log(`${c}: Error occurred while uploading notebook:`,e),t(e)}))}))).then((o=>{const a={...t,content:o};e.serviceManager.contents.save(n.path,a).then((e=>{const t=o.metadata[_.notebookId],a=`${i}/notebook/download/${t}`;(0,O.showDialog)({title:n.name,body:y().createElement(D,{url:a,fileName:n.name}),buttons:[O.Dialog.okButton()]}).catch((e=>console.log(e)))}))})).catch((e=>{(0,O.showDialog)({title:n.name,body:"Error uploading the file",buttons:[O.Dialog.cancelButton()]}).catch((e=>console.log(e)))}))}))}}),e.commands.addCommand(u.copyDownloadLink,{label:"Copy unianalytics notebook link",icon:e=>e.isContextMenu?S.linkIcon:void 0,execute:o=>{const n=w.getFileComp(t);n&&e.serviceManager.contents.get(n.path).then((e=>{const t=e.content.metadata;if(t){const e=t[_.notebookId];e?navigator.clipboard.writeText(`${i}/notebook/download/${e}`).catch((e=>{console.error(`${c}: Error copying link: `,e)})):console.log(`${c}: Notebook not tagged`)}}))}}),e.contextMenu.addItem({selector:p,type:"separator",rank:0}),e.contextMenu.addItem({args:{isContextMenu:!0},command:u.uploadNotebook,selector:p,rank:0}),e.contextMenu.addItem({args:{isContextMenu:!0},command:u.copyDownloadLink,selector:p,rank:0}),e.contextMenu.addItem({selector:p,type:"separator",rank:0})}(e,t),async function(e,t,o,n,a){let s;if(console.log(`JupyterLab extension ${c}: dashboard plugins activated!`),n)try{s=await n.load(`${c}:plugin`),h(s),s.changed.connect(h)}catch(e){console.error(`${c}: Failed to load settings.\n${e}`)}(e=>{const t=e.shell.widgets();let o=w.getNextWidgetValueComp(t);for(;o;){if(o instanceof Y.NotebookPanel){const t=o,n=new gt(e.commands),a=new mt(e.commands),s=n.createNew(t),l=a.createNew(t);t.disposed.connect((()=>{s.dispose(),l.dispose()}))}o=w.getNextWidgetValueComp(t)}e.docRegistry.addWidgetExtension("Notebook",new mt(e.commands)),e.docRegistry.addWidgetExtension("Notebook",new gt(e.commands))})(e);const l=new le,i=new $e(l,a.sanitizer),r=new rt(l,e.commands,a.sanitizer,s);function d(){const t=e.shell.currentWidget;if(!t)return;if(!(t instanceof Y.NotebookPanel))return void(l.panel&&l.panel.isDisposed&&(l.panel=null));const o=t;l.panel=o}function h(e){var t,o;const n=e.composite.commonDashboardSettings;let a;n?(a=n.realTime,ue.setPermission(n.dashboardCollection||!1)):(a=null===(t=e.default("commonDashboardSettings"))||void 0===t?void 0:t.realTime,ue.setPermission((null===(o=e.default("commonDashboardSettings"))||void 0===o?void 0:o.dashboardCollection)||!1)),null===a&&void 0===a||_t(J(a))}o.add(i,"right",{rank:1e3}),o.add(r,"left",{rank:1e3}),e.commands.addCommand(u.dashboardOpenVisu,{label:"Notebook Visualizations",caption:"Open Notebook Dashboard",icon:x,iconClass:"jp-icon3",execute:t=>{"Notebook"===t.from?(ue.sendInteraction({click_type:"ON",signal_origin:Q.NOTEBOOK_TOOLBAR_BUTTON}),_t(U())):"Cell"===t.from?(ue.sendInteraction({click_type:"ON",signal_origin:Q.NOTEBOOK_CELL_BUTTON}),_t(F({cellId:t.cell_id}))):"Toc"===t.from&&(ue.sendInteraction({click_type:"ON",signal_origin:Q.TOC_OPEN_CELL_DASHBOARD}),_t(F({cellId:t.cell_id}))),i.isVisible||e.shell.activateById(i.id)}}),t&&(t.add(i,`${c}:dashboard-notebook-restorer`),t.add(r,`${c}:dashboard-toc-restorer`)),o&&o.currentChanged.connect(d),e.restored.then((()=>{d()}))}(e,o,n,s,a)):console.log(`${c}: User not authenticated`)})).catch((e=>{console.log(`${c}: Authentication error, ${e}`)})).finally((()=>{window.postMessage({identifier:"unianalytics",authNotebooks:r},window.origin)}))})).catch((e=>{console.error(`${c}: Failed to access userId, the jupyterlab_unianalytics_dashboard server extension appears to be missing.\n${e}`)}))}))}else console.log(`${c}: Use a more recent version of JupyterLab (>=${l})`)}},Et=kt},2204:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e"},9609:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e"},2469:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e"},7486:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e"},991:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%28255, 255, 255, 0.25%29%27/%3e%3c/svg%3e"},4144:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e"},6254:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z%27/%3e%3c/svg%3e"},5321:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23052c65%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},3460:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23212529%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},1281:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%236ea8fe%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},5647:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z%27/%3e%3c/svg%3e"},1692:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z%27/%3e%3c/svg%3e"},6770:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e"},6711:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23dee2e6%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e"},8931:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e"},6199:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27m6 10 3 3 6-6%27/%3e%3c/svg%3e"},2956:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},2221:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%2833, 37, 41, 0.75%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e"},5122:e=>{e.exports="data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e"}}]);