@abi-software/simulationvuer 0.4.6 → 0.5.2
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.
- package/dist/simulationvuer.common.js +970 -352
- package/dist/simulationvuer.common.js.map +1 -1
- package/dist/simulationvuer.css +1 -1
- package/dist/simulationvuer.umd.js +970 -352
- package/dist/simulationvuer.umd.js.map +1 -1
- package/dist/simulationvuer.umd.min.js +1 -1
- package/dist/simulationvuer.umd.min.js.map +1 -1
- package/package.json +3 -2
- package/src/.DS_Store +0 -0
- package/src/App.vue +16 -12
- package/src/components/SimulationVuer.vue +161 -271
- package/src/components/SimulationVuerInput.vue +150 -0
- package/src/components/common.js +29 -0
- package/src/components/json.js +376 -0
- package/src/components/ui.js +80 -0
|
@@ -96,15 +96,40 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
96
96
|
/************************************************************************/
|
|
97
97
|
/******/ ({
|
|
98
98
|
|
|
99
|
-
/***/ "
|
|
99
|
+
/***/ "12e0":
|
|
100
100
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
101
101
|
|
|
102
102
|
"use strict";
|
|
103
|
-
/* harmony import */ var
|
|
104
|
-
/* harmony import */ var
|
|
103
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_1_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("82f6");
|
|
104
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_1_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_1_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
105
105
|
/* unused harmony reexport * */
|
|
106
106
|
|
|
107
107
|
|
|
108
|
+
/***/ }),
|
|
109
|
+
|
|
110
|
+
/***/ "13e3":
|
|
111
|
+
/***/ (function(module, exports) {
|
|
112
|
+
|
|
113
|
+
module.exports = require("core-js/modules/web.dom-collections.for-each.js");
|
|
114
|
+
|
|
115
|
+
/***/ }),
|
|
116
|
+
|
|
117
|
+
/***/ "1b6b":
|
|
118
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
119
|
+
|
|
120
|
+
"use strict";
|
|
121
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuerInput_vue_vue_type_style_index_0_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9e8b");
|
|
122
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuerInput_vue_vue_type_style_index_0_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuerInput_vue_vue_type_style_index_0_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
123
|
+
/* unused harmony reexport * */
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
/***/ }),
|
|
127
|
+
|
|
128
|
+
/***/ "30df":
|
|
129
|
+
/***/ (function(module, exports) {
|
|
130
|
+
|
|
131
|
+
module.exports = require("core-js/modules/es.regexp.to-string.js");
|
|
132
|
+
|
|
108
133
|
/***/ }),
|
|
109
134
|
|
|
110
135
|
/***/ "4391":
|
|
@@ -121,72 +146,88 @@ module.exports = require("core-js/modules/es.symbol.description.js");
|
|
|
121
146
|
|
|
122
147
|
/***/ }),
|
|
123
148
|
|
|
124
|
-
/***/ "
|
|
149
|
+
/***/ "49bc":
|
|
125
150
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
126
151
|
|
|
127
152
|
"use strict";
|
|
128
|
-
/* harmony import */ var
|
|
129
|
-
/* harmony import */ var
|
|
153
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_loading_css_vue_type_style_index_3_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6505");
|
|
154
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_loading_css_vue_type_style_index_3_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_loading_css_vue_type_style_index_3_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
130
155
|
/* unused harmony reexport * */
|
|
131
156
|
|
|
132
157
|
|
|
133
158
|
/***/ }),
|
|
134
159
|
|
|
135
|
-
/***/ "
|
|
136
|
-
/***/ (function(module,
|
|
160
|
+
/***/ "5b75":
|
|
161
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
137
162
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
163
|
+
// extracted by mini-css-extract-plugin
|
|
164
|
+
|
|
165
|
+
/***/ }),
|
|
166
|
+
|
|
167
|
+
/***/ "5cd4":
|
|
168
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
142
169
|
|
|
170
|
+
// extracted by mini-css-extract-plugin
|
|
143
171
|
|
|
144
172
|
/***/ }),
|
|
145
173
|
|
|
146
|
-
/***/ "
|
|
147
|
-
/***/ (function(module,
|
|
174
|
+
/***/ "5f72":
|
|
175
|
+
/***/ (function(module, exports) {
|
|
148
176
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
177
|
+
module.exports = require("element-ui");
|
|
178
|
+
|
|
179
|
+
/***/ }),
|
|
180
|
+
|
|
181
|
+
/***/ "6378":
|
|
182
|
+
/***/ (function(module, exports) {
|
|
183
|
+
|
|
184
|
+
module.exports = require("core-js/modules/es.string.replace.js");
|
|
185
|
+
|
|
186
|
+
/***/ }),
|
|
187
|
+
|
|
188
|
+
/***/ "6505":
|
|
189
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
153
190
|
|
|
191
|
+
// extracted by mini-css-extract-plugin
|
|
154
192
|
|
|
155
193
|
/***/ }),
|
|
156
194
|
|
|
157
|
-
/***/ "
|
|
195
|
+
/***/ "68c9":
|
|
158
196
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
159
197
|
|
|
160
198
|
"use strict";
|
|
161
|
-
/* harmony import */ var
|
|
162
|
-
/* harmony import */ var
|
|
199
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_4_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5b75");
|
|
200
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_4_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_4_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
163
201
|
/* unused harmony reexport * */
|
|
164
202
|
|
|
165
203
|
|
|
166
204
|
/***/ }),
|
|
167
205
|
|
|
168
|
-
/***/ "
|
|
169
|
-
/***/ (function(module, exports) {
|
|
206
|
+
/***/ "82f6":
|
|
207
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
170
208
|
|
|
171
|
-
|
|
209
|
+
// extracted by mini-css-extract-plugin
|
|
172
210
|
|
|
173
211
|
/***/ }),
|
|
174
212
|
|
|
175
|
-
/***/ "
|
|
213
|
+
/***/ "8468":
|
|
176
214
|
/***/ (function(module, exports, __webpack_require__) {
|
|
177
215
|
|
|
178
216
|
// extracted by mini-css-extract-plugin
|
|
179
217
|
|
|
180
218
|
/***/ }),
|
|
181
219
|
|
|
182
|
-
/***/ "
|
|
183
|
-
/***/ (function(module,
|
|
220
|
+
/***/ "85f7":
|
|
221
|
+
/***/ (function(module, exports) {
|
|
184
222
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
223
|
+
module.exports = require("core-js/modules/es.array.includes.js");
|
|
224
|
+
|
|
225
|
+
/***/ }),
|
|
226
|
+
|
|
227
|
+
/***/ "86d1":
|
|
228
|
+
/***/ (function(module, exports) {
|
|
189
229
|
|
|
230
|
+
module.exports = require("core-js/modules/es.regexp.constructor.js");
|
|
190
231
|
|
|
191
232
|
/***/ }),
|
|
192
233
|
|
|
@@ -197,10 +238,10 @@ module.exports = require("vue");
|
|
|
197
238
|
|
|
198
239
|
/***/ }),
|
|
199
240
|
|
|
200
|
-
/***/ "
|
|
201
|
-
/***/ (function(module, exports
|
|
241
|
+
/***/ "97d3":
|
|
242
|
+
/***/ (function(module, exports) {
|
|
202
243
|
|
|
203
|
-
|
|
244
|
+
module.exports = require("core-js/modules/es.object.to-string.js");
|
|
204
245
|
|
|
205
246
|
/***/ }),
|
|
206
247
|
|
|
@@ -218,49 +259,71 @@ module.exports = require("@soda/get-current-script");
|
|
|
218
259
|
|
|
219
260
|
/***/ }),
|
|
220
261
|
|
|
221
|
-
/***/ "
|
|
262
|
+
/***/ "9e8b":
|
|
263
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
264
|
+
|
|
265
|
+
// extracted by mini-css-extract-plugin
|
|
266
|
+
|
|
267
|
+
/***/ }),
|
|
268
|
+
|
|
269
|
+
/***/ "9e9d":
|
|
270
|
+
/***/ (function(module, exports) {
|
|
271
|
+
|
|
272
|
+
module.exports = require("jsonschema");
|
|
273
|
+
|
|
274
|
+
/***/ }),
|
|
275
|
+
|
|
276
|
+
/***/ "a447":
|
|
222
277
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
223
278
|
|
|
224
279
|
"use strict";
|
|
225
|
-
/* harmony import */ var
|
|
226
|
-
/* harmony import */ var
|
|
280
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_input_number_css_vue_type_style_index_1_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5cd4");
|
|
281
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_input_number_css_vue_type_style_index_1_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_input_number_css_vue_type_style_index_1_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
227
282
|
/* unused harmony reexport * */
|
|
228
283
|
|
|
229
284
|
|
|
230
285
|
/***/ }),
|
|
231
286
|
|
|
232
|
-
/***/ "
|
|
287
|
+
/***/ "b01d":
|
|
233
288
|
/***/ (function(module, exports, __webpack_require__) {
|
|
234
289
|
|
|
235
290
|
// extracted by mini-css-extract-plugin
|
|
236
291
|
|
|
237
292
|
/***/ }),
|
|
238
293
|
|
|
239
|
-
/***/ "
|
|
240
|
-
/***/ (function(module, exports
|
|
294
|
+
/***/ "be94":
|
|
295
|
+
/***/ (function(module, exports) {
|
|
241
296
|
|
|
242
|
-
|
|
297
|
+
module.exports = require("core-js/modules/es.array.join.js");
|
|
243
298
|
|
|
244
299
|
/***/ }),
|
|
245
300
|
|
|
246
|
-
/***/ "
|
|
247
|
-
/***/ (function(module,
|
|
301
|
+
/***/ "c048":
|
|
302
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
303
|
+
|
|
304
|
+
"use strict";
|
|
305
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_divider_css_vue_type_style_index_2_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b01d");
|
|
306
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_divider_css_vue_type_style_index_2_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_divider_css_vue_type_style_index_2_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
307
|
+
/* unused harmony reexport * */
|
|
248
308
|
|
|
249
|
-
// extracted by mini-css-extract-plugin
|
|
250
309
|
|
|
251
310
|
/***/ }),
|
|
252
311
|
|
|
253
|
-
/***/ "
|
|
254
|
-
/***/ (function(module, exports
|
|
312
|
+
/***/ "c8a6":
|
|
313
|
+
/***/ (function(module, exports) {
|
|
255
314
|
|
|
256
|
-
|
|
315
|
+
module.exports = require("core-js/modules/es.regexp.exec.js");
|
|
257
316
|
|
|
258
317
|
/***/ }),
|
|
259
318
|
|
|
260
|
-
/***/ "
|
|
261
|
-
/***/ (function(module,
|
|
319
|
+
/***/ "cb09":
|
|
320
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
321
|
+
|
|
322
|
+
"use strict";
|
|
323
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_option_css_vue_type_style_index_2_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e2bf");
|
|
324
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_option_css_vue_type_style_index_2_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_option_css_vue_type_style_index_2_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
325
|
+
/* unused harmony reexport * */
|
|
262
326
|
|
|
263
|
-
// extracted by mini-css-extract-plugin
|
|
264
327
|
|
|
265
328
|
/***/ }),
|
|
266
329
|
|
|
@@ -278,28 +341,42 @@ module.exports = require("core-js/modules/es.function.name.js");
|
|
|
278
341
|
|
|
279
342
|
/***/ }),
|
|
280
343
|
|
|
281
|
-
/***/ "
|
|
344
|
+
/***/ "e2bf":
|
|
345
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
346
|
+
|
|
347
|
+
// extracted by mini-css-extract-plugin
|
|
348
|
+
|
|
349
|
+
/***/ }),
|
|
350
|
+
|
|
351
|
+
/***/ "ea64":
|
|
352
|
+
/***/ (function(module, exports) {
|
|
353
|
+
|
|
354
|
+
module.exports = require("core-js/modules/es.object.keys.js");
|
|
355
|
+
|
|
356
|
+
/***/ }),
|
|
357
|
+
|
|
358
|
+
/***/ "ea79":
|
|
282
359
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
283
360
|
|
|
284
361
|
"use strict";
|
|
285
|
-
/* harmony import */ var
|
|
286
|
-
/* harmony import */ var
|
|
362
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_select_css_vue_type_style_index_3_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fdaa");
|
|
363
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_select_css_vue_type_style_index_3_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_select_css_vue_type_style_index_3_id_ca4c3b6e_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
287
364
|
/* unused harmony reexport * */
|
|
288
365
|
|
|
289
366
|
|
|
290
367
|
/***/ }),
|
|
291
368
|
|
|
292
|
-
/***/ "
|
|
293
|
-
/***/ (function(module, exports
|
|
369
|
+
/***/ "f164":
|
|
370
|
+
/***/ (function(module, exports) {
|
|
294
371
|
|
|
295
|
-
|
|
372
|
+
module.exports = require("@abi-software/plotvuer");
|
|
296
373
|
|
|
297
374
|
/***/ }),
|
|
298
375
|
|
|
299
|
-
/***/ "
|
|
376
|
+
/***/ "f989":
|
|
300
377
|
/***/ (function(module, exports) {
|
|
301
378
|
|
|
302
|
-
module.exports = require("
|
|
379
|
+
module.exports = require("core-js/modules/es.number.constructor.js");
|
|
303
380
|
|
|
304
381
|
/***/ }),
|
|
305
382
|
|
|
@@ -337,18 +414,21 @@ if (typeof window !== 'undefined') {
|
|
|
337
414
|
// Indicate to webpack that this file can be concatenated
|
|
338
415
|
/* harmony default export */ var setPublicPath = (null);
|
|
339
416
|
|
|
340
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
341
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.
|
|
417
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5acd8079-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SimulationVuer.vue?vue&type=template&id=d2c3a0be&scoped=true&
|
|
418
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.showUserMessage),expression:"showUserMessage"}],staticClass:"simulation-vuer",attrs:{"element-loading-text":_vm.userMessage}},[(!_vm.hasValidSimulationUiInformation && !_vm.showUserMessage)?_c('p',{staticClass:"default error"},[_c('span',{staticClass:"error"},[_vm._v("Error:")]),_vm._v(" an unknown or invalid model was provided.")]):_vm._e(),(_vm.hasValidSimulationUiInformation)?_c('div',{staticClass:"main"},[_c('div',{staticClass:"main-left"},[_c('p',{staticClass:"default title"},[_vm._v(_vm._s(_vm.title))]),_c('el-divider'),_c('p',{staticClass:"default input-parameters"},[_vm._v("Input parameters")]),_c('div',_vm._l((_vm.simulationUiInformation.input),function(input,index){return _c('SimulationVuerInput',{key:("input-" + index),attrs:{"defaultValue":input.defaultValue,"firstScalarInput":_vm.firstScalarInput[index],"name":input.name,"maximumValue":input.maximumValue,"minimumValue":input.minimumValue,"possibleValues":input.possibleValues}})}),1),_c('div',{ref:"input"}),_c('div',{staticClass:"primary-button"},[_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.runSimulation()}}},[_vm._v("Run simulation")])],1),_c('div',{staticClass:"secondary-button"},[_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.goToOsparc()}}},[_vm._v("Go to oSPARC")])],1),_c('div',{staticClass:"secondary-button"},[_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.viewDataset()}}},[_vm._v("View dataset")])],1),_c('p',{staticClass:"default note"},[_vm._v("Additional parameters are available on oSPARC")])],1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isSimulationValid),expression:"isSimulationValid"}],ref:"output",staticClass:"main-right"},_vm._l((_vm.simulationUiInformation.output.plots),function(outputPlot,index){return _c('PlotVuer',{key:("output-" + index),attrs:{"layout-input":_vm.layout[index],"dataInput":_vm.simulationData[index],"plotType":'plotly-only'}})}),1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.isSimulationValid),expression:"!isSimulationValid"}],staticClass:"main-right"},[_c('p',{staticClass:"default error"},[_c('span',{staticClass:"error"},[_vm._v("Error:")]),_vm._v(" "),_c('span',{domProps:{"innerHTML":_vm._s(_vm.errorMessage)}}),_vm._v(".")])])]):_vm._e()])}
|
|
342
419
|
var staticRenderFns = []
|
|
343
420
|
|
|
344
421
|
|
|
345
|
-
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=template&id=
|
|
422
|
+
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=template&id=d2c3a0be&scoped=true&
|
|
346
423
|
|
|
347
424
|
// EXTERNAL MODULE: external "core-js/modules/es.function.name.js"
|
|
348
425
|
var es_function_name_js_ = __webpack_require__("db0a");
|
|
349
426
|
|
|
350
|
-
// EXTERNAL MODULE: external "core-js/modules/
|
|
351
|
-
var
|
|
427
|
+
// EXTERNAL MODULE: external "core-js/modules/web.dom-collections.for-each.js"
|
|
428
|
+
var web_dom_collections_for_each_js_ = __webpack_require__("13e3");
|
|
429
|
+
|
|
430
|
+
// EXTERNAL MODULE: external "core-js/modules/es.object.keys.js"
|
|
431
|
+
var es_object_keys_js_ = __webpack_require__("ea64");
|
|
352
432
|
|
|
353
433
|
// EXTERNAL MODULE: external "core-js/modules/es.symbol.js"
|
|
354
434
|
var es_symbol_js_ = __webpack_require__("9b22");
|
|
@@ -366,13 +446,125 @@ var plotvuer_ = __webpack_require__("f164");
|
|
|
366
446
|
// EXTERNAL MODULE: external "@abi-software/plotvuer/dist/plotvuer.css"
|
|
367
447
|
var plotvuer_css_ = __webpack_require__("d856");
|
|
368
448
|
|
|
449
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5acd8079-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SimulationVuerInput.vue?vue&type=template&id=ca4c3b6e&scoped=true&
|
|
450
|
+
var SimulationVuerInputvue_type_template_id_ca4c3b6e_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('p',{class:_vm.labelClasses},[_vm._v(_vm._s(_vm.name))]),(_vm.isDiscrete)?_c('el-select',{staticClass:"discrete",attrs:{"popper-class":"discrete-popper","size":"mini","disabled":!_vm.enabled,"popper-append-to-body":false},on:{"change":function($event){return _vm.updateUi()}},model:{value:(_vm.vModel),callback:function ($$v) {_vm.vModel=$$v},expression:"vModel"}},_vm._l((_vm.possibleValues),function(possibleValue){return _c('el-option',{key:possibleValue.value,attrs:{"label":possibleValue.name,"value":possibleValue.value}})}),1):_vm._e(),(!_vm.isDiscrete)?_c('div',{staticClass:"sliders-and-fields"},[_c('el-slider',{attrs:{"disabled":!_vm.enabled,"max":_vm.maximumValue,"min":_vm.minimumValue,"show-input":false,"show-tooltip":false},on:{"change":function($event){return _vm.updateUi()}},model:{value:(_vm.vModel),callback:function ($$v) {_vm.vModel=$$v},expression:"vModel"}}),_c('el-input-number',{staticClass:"scalar",attrs:{"size":"mini","controls":false,"disabled":!_vm.enabled,"max":_vm.maximumValue,"min":_vm.minimumValue},on:{"input":function($event){return _vm.updateUi()}},model:{value:(_vm.vModel),callback:function ($$v) {_vm.vModel=$$v},expression:"vModel"}})],1):_vm._e()],1)}
|
|
451
|
+
var SimulationVuerInputvue_type_template_id_ca4c3b6e_scoped_true_staticRenderFns = []
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
// CONCATENATED MODULE: ./src/components/SimulationVuerInput.vue?vue&type=template&id=ca4c3b6e&scoped=true&
|
|
455
|
+
|
|
456
|
+
// EXTERNAL MODULE: external "core-js/modules/es.number.constructor.js"
|
|
457
|
+
var es_number_constructor_js_ = __webpack_require__("f989");
|
|
458
|
+
|
|
369
459
|
// EXTERNAL MODULE: external "element-ui"
|
|
370
460
|
var external_element_ui_ = __webpack_require__("5f72");
|
|
371
461
|
|
|
372
|
-
//
|
|
462
|
+
// EXTERNAL MODULE: external "core-js/modules/es.regexp.constructor.js"
|
|
463
|
+
var es_regexp_constructor_js_ = __webpack_require__("86d1");
|
|
373
464
|
|
|
465
|
+
// EXTERNAL MODULE: external "core-js/modules/es.regexp.exec.js"
|
|
466
|
+
var es_regexp_exec_js_ = __webpack_require__("c8a6");
|
|
374
467
|
|
|
468
|
+
// EXTERNAL MODULE: external "core-js/modules/es.regexp.to-string.js"
|
|
469
|
+
var es_regexp_to_string_js_ = __webpack_require__("30df");
|
|
375
470
|
|
|
471
|
+
// EXTERNAL MODULE: external "core-js/modules/es.string.replace.js"
|
|
472
|
+
var es_string_replace_js_ = __webpack_require__("6378");
|
|
473
|
+
|
|
474
|
+
// CONCATENATED MODULE: ./src/components/common.js
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
function doEvaluateValue(value, from, to) {
|
|
482
|
+
if (from !== undefined) {
|
|
483
|
+
var re = new RegExp("\\b".concat(from, "\\b"), 'g');
|
|
484
|
+
value = value.replace(re, to);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return value;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
function evaluateValue(parent, value) {
|
|
491
|
+
var index = -1;
|
|
492
|
+
parent.simulationUiInformation.input.forEach(function (input) {
|
|
493
|
+
++index;
|
|
494
|
+
value = doEvaluateValue(value, input.id, parent.$children[index].vModel);
|
|
495
|
+
});
|
|
496
|
+
return Function("return " + value + ";")();
|
|
497
|
+
}
|
|
498
|
+
function evaluateSimulationValue(parent, results, value, i) {
|
|
499
|
+
parent.simulationUiInformation.output.data.forEach(function (data) {
|
|
500
|
+
value = doEvaluateValue(value, data.id, results[parent.simulationDataId[data.id]][i]);
|
|
501
|
+
});
|
|
502
|
+
return Function("return " + value + ";")();
|
|
503
|
+
}
|
|
504
|
+
// CONCATENATED MODULE: ./src/components/ui.js
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
function initialiseUi(parent) {
|
|
509
|
+
// Initialise some input-related data.
|
|
510
|
+
var index = -1;
|
|
511
|
+
var isPreviousDiscrete = true;
|
|
512
|
+
parent.simulationUiInformation.input.forEach(function (input) {
|
|
513
|
+
var isDiscrete = input.possibleValues !== undefined;
|
|
514
|
+
parent.firstScalarInput[++index] = !isDiscrete && isPreviousDiscrete;
|
|
515
|
+
isPreviousDiscrete = isDiscrete;
|
|
516
|
+
}); // Initialise some output-related data.
|
|
517
|
+
|
|
518
|
+
parent.simulationUiInformation.output.data.forEach(function (data) {
|
|
519
|
+
parent.simulationDataId[data.id] = data.name;
|
|
520
|
+
});
|
|
521
|
+
index = -1;
|
|
522
|
+
parent.simulationUiInformation.output.plots.forEach(function (outputPlot) {
|
|
523
|
+
++index;
|
|
524
|
+
parent.layout[index] = {
|
|
525
|
+
xaxis: {
|
|
526
|
+
title: {
|
|
527
|
+
text: outputPlot.xAxisTitle,
|
|
528
|
+
font: {
|
|
529
|
+
size: 10
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
yaxis: {
|
|
534
|
+
title: {
|
|
535
|
+
text: outputPlot.yAxisTitle,
|
|
536
|
+
font: {
|
|
537
|
+
size: 10
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
parent.simulationData[index] = [{}];
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
function finaliseUi(parent) {
|
|
546
|
+
// Finalise our UI, but only if we haven't already done so, we are mounted,
|
|
547
|
+
// and we have some valid simulation UI information.
|
|
548
|
+
if (!parent.hasFinalisedUi && parent.isMounted && parent.hasValidSimulationUiInformation) {
|
|
549
|
+
// Configure the PlotVuer's.
|
|
550
|
+
parent.$refs.output.classList.add("x" + parent.simulationUiInformation.output.plots.length); // Make sure that our UI is up to date.
|
|
551
|
+
|
|
552
|
+
ui_updateUi(parent);
|
|
553
|
+
parent.hasFinalisedUi = true;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
function ui_updateUi(parent) {
|
|
557
|
+
// Enable/disable all the elements.
|
|
558
|
+
// Note: we do this using $nextTick() to be ensure that the UI has been fully
|
|
559
|
+
// mounted.
|
|
560
|
+
parent.$nextTick(function () {
|
|
561
|
+
var index = -1;
|
|
562
|
+
parent.simulationUiInformation.input.forEach(function (input) {
|
|
563
|
+
parent.$children[++index].enabled = input.enabled === undefined ? true : evaluateValue(parent, input.enabled);
|
|
564
|
+
});
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SimulationVuerInput.vue?vue&type=script&lang=js&
|
|
376
568
|
|
|
377
569
|
//
|
|
378
570
|
//
|
|
@@ -387,313 +579,89 @@ var external_element_ui_ = __webpack_require__("5f72");
|
|
|
387
579
|
//
|
|
388
580
|
//
|
|
389
581
|
//
|
|
390
|
-
//
|
|
391
|
-
//
|
|
392
|
-
//
|
|
393
|
-
//
|
|
394
|
-
//
|
|
395
|
-
//
|
|
396
|
-
//
|
|
397
|
-
//
|
|
398
|
-
//
|
|
399
|
-
//
|
|
400
|
-
//
|
|
401
|
-
//
|
|
402
|
-
//
|
|
403
|
-
//
|
|
404
|
-
//
|
|
405
|
-
//
|
|
406
|
-
//
|
|
407
|
-
//
|
|
408
|
-
//
|
|
409
|
-
//
|
|
410
|
-
//
|
|
411
|
-
//
|
|
412
|
-
//
|
|
413
|
-
//
|
|
414
|
-
//
|
|
415
|
-
//
|
|
416
|
-
//
|
|
417
|
-
//
|
|
418
|
-
//
|
|
419
|
-
//
|
|
420
|
-
//
|
|
421
|
-
//
|
|
422
|
-
//
|
|
423
|
-
//
|
|
424
|
-
//
|
|
425
|
-
//
|
|
426
|
-
//
|
|
427
|
-
//
|
|
428
|
-
//
|
|
429
|
-
//
|
|
430
|
-
//
|
|
431
|
-
//
|
|
432
|
-
//
|
|
433
|
-
//
|
|
434
|
-
|
|
435
582
|
|
|
436
583
|
|
|
437
584
|
|
|
438
|
-
var NoSimulationData = [{}];
|
|
439
|
-
external_vue_default.a.use(external_element_ui_["Aside"]);
|
|
440
|
-
external_vue_default.a.use(external_element_ui_["Button"]);
|
|
441
|
-
external_vue_default.a.use(external_element_ui_["Container"]);
|
|
442
|
-
external_vue_default.a.use(external_element_ui_["Divider"]);
|
|
443
585
|
external_vue_default.a.use(external_element_ui_["InputNumber"]);
|
|
444
|
-
external_vue_default.a.use(external_element_ui_["Loading"]);
|
|
445
|
-
external_vue_default.a.use(external_element_ui_["Main"]);
|
|
446
586
|
external_vue_default.a.use(external_element_ui_["Option"]);
|
|
447
587
|
external_vue_default.a.use(external_element_ui_["Select"]);
|
|
448
588
|
external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
449
|
-
/* harmony default export */ var
|
|
450
|
-
name: "
|
|
451
|
-
components: {
|
|
452
|
-
PlotVuer: plotvuer_["PlotVuer"]
|
|
453
|
-
},
|
|
589
|
+
/* harmony default export */ var SimulationVuerInputvue_type_script_lang_js_ = ({
|
|
590
|
+
name: "SimulationVuerInput",
|
|
454
591
|
props: {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
592
|
+
defaultValue: {
|
|
593
|
+
required: true,
|
|
594
|
+
type: Number
|
|
458
595
|
},
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
596
|
+
firstScalarInput: {
|
|
597
|
+
type: Boolean
|
|
598
|
+
},
|
|
599
|
+
maximumValue: {
|
|
600
|
+
type: Number
|
|
601
|
+
},
|
|
602
|
+
minimumValue: {
|
|
603
|
+
type: Number
|
|
604
|
+
},
|
|
605
|
+
name: {
|
|
606
|
+
required: true,
|
|
607
|
+
type: String
|
|
608
|
+
},
|
|
609
|
+
possibleValues: {
|
|
610
|
+
type: Array
|
|
464
611
|
}
|
|
465
612
|
},
|
|
466
613
|
data: function data() {
|
|
467
|
-
var title = this.entry ? this.entry.name : "";
|
|
468
614
|
return {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
simulationMode: 0,
|
|
474
|
-
simulationModes: [{
|
|
475
|
-
label: "Normal sinus rhythm",
|
|
476
|
-
value: 0
|
|
477
|
-
}, {
|
|
478
|
-
label: "Stellate stimulation",
|
|
479
|
-
value: 1
|
|
480
|
-
}, {
|
|
481
|
-
label: "Vagal stimulation",
|
|
482
|
-
value: 2
|
|
483
|
-
}],
|
|
484
|
-
simulationSpikeLayout: {
|
|
485
|
-
xaxis: {
|
|
486
|
-
title: {
|
|
487
|
-
text: "Time (s)",
|
|
488
|
-
font: {
|
|
489
|
-
size: 10
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
},
|
|
493
|
-
yaxis: {
|
|
494
|
-
title: {
|
|
495
|
-
text: "Spike amplitude",
|
|
496
|
-
font: {
|
|
497
|
-
size: 10
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
},
|
|
502
|
-
simulationSpikeFrequency: 300,
|
|
503
|
-
simulationSpikeNumber: 10,
|
|
504
|
-
simulationSpikeAmplitude: 10,
|
|
505
|
-
// The real value is 100 times smaller.
|
|
506
|
-
simulationSpikeData: NoSimulationData,
|
|
507
|
-
simulationPotentialLayout: {
|
|
508
|
-
xaxis: {
|
|
509
|
-
title: {
|
|
510
|
-
text: "Time (s)",
|
|
511
|
-
font: {
|
|
512
|
-
size: 10
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
},
|
|
516
|
-
yaxis: {
|
|
517
|
-
title: {
|
|
518
|
-
text: "Membrane potential (mV)",
|
|
519
|
-
font: {
|
|
520
|
-
size: 10
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
},
|
|
525
|
-
simulationPotentialData: NoSimulationData,
|
|
526
|
-
simulationBeingComputed: false,
|
|
527
|
-
simulationBeingComputedLabel: "Loading simulation results...",
|
|
528
|
-
simulationValid: true,
|
|
529
|
-
title: title
|
|
615
|
+
enabled: true,
|
|
616
|
+
isDiscrete: this.possibleValues !== undefined,
|
|
617
|
+
labelClasses: "default " + (this.possibleValues !== undefined ? "discrete" : this.firstScalarInput ? "first-scalar" : "scalar"),
|
|
618
|
+
vModel: this.defaultValue
|
|
530
619
|
};
|
|
531
620
|
},
|
|
532
621
|
methods: {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
},
|
|
543
|
-
runSimulation: function runSimulation() {
|
|
544
|
-
var _this = this;
|
|
545
|
-
|
|
546
|
-
this.simulationBeingComputed = true;
|
|
547
|
-
var request = {
|
|
548
|
-
model_url: this.entry.resource,
|
|
549
|
-
json_config: {
|
|
550
|
-
output: ["Membrane/V"]
|
|
551
|
-
}
|
|
552
|
-
}; // Specify the ending point and point interval for the normal mode (since
|
|
553
|
-
// our resource is a CellML file).
|
|
622
|
+
updateUi: function updateUi() {
|
|
623
|
+
ui_updateUi(this.$parent);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
// CONCATENATED MODULE: ./src/components/SimulationVuerInput.vue?vue&type=script&lang=js&
|
|
628
|
+
/* harmony default export */ var components_SimulationVuerInputvue_type_script_lang_js_ = (SimulationVuerInputvue_type_script_lang_js_);
|
|
629
|
+
// EXTERNAL MODULE: ./src/components/SimulationVuerInput.vue?vue&type=style&index=0&id=ca4c3b6e&scoped=true&lang=css&
|
|
630
|
+
var SimulationVuerInputvue_type_style_index_0_id_ca4c3b6e_scoped_true_lang_css_ = __webpack_require__("1b6b");
|
|
554
631
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
"Ending point": 3,
|
|
558
|
-
"Point interval": 0.001
|
|
559
|
-
};
|
|
560
|
-
} // Apply a stellate/vagal stimulation, if needed.
|
|
561
|
-
// Notes:
|
|
562
|
-
// - this.simulationMode:
|
|
563
|
-
// - 0: normal sinus rhythm;
|
|
564
|
-
// - 1: stellate stimulation; and
|
|
565
|
-
// - 2: vagal stimulation.
|
|
566
|
-
// - this.stimulationLevel has a value in [0; 10], but to compute ACh, we
|
|
567
|
-
// need a value in [0; 1].
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
if (this.simulationMode !== 0) {
|
|
571
|
-
request.json_config["parameters"] = {
|
|
572
|
-
"Rate_modulation_experiments/Iso_1_uM": 1.0,
|
|
573
|
-
"Rate_modulation_experiments/ACh": this.simulationMode === 1 ? (1.0 - 0.1 * this.stimulationLevel) * 22.0e-6 : 22.0e-6 + 0.1 * this.stimulationLevel * (38.0e-6 - 22.0e-6)
|
|
574
|
-
};
|
|
575
|
-
} // Apply the spike settings, if needed.
|
|
632
|
+
// EXTERNAL MODULE: ./src/styles/purple/input-number.css?vue&type=style&index=1&id=ca4c3b6e&scoped=true&lang=css&
|
|
633
|
+
var input_numbervue_type_style_index_1_id_ca4c3b6e_scoped_true_lang_css_ = __webpack_require__("a447");
|
|
576
634
|
|
|
635
|
+
// EXTERNAL MODULE: ./src/styles/purple/option.css?vue&type=style&index=2&id=ca4c3b6e&scoped=true&lang=css&
|
|
636
|
+
var optionvue_type_style_index_2_id_ca4c3b6e_scoped_true_lang_css_ = __webpack_require__("cb09");
|
|
577
637
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
"Brain_stem/t_period": this.simulationSpikeFrequency,
|
|
581
|
-
"Brain_stem/w_n": this.simulationSpikeNumber,
|
|
582
|
-
"Brain_stem/w_value": 0.01 * this.simulationSpikeAmplitude
|
|
583
|
-
};
|
|
584
|
-
} // Request the spikes if we are in composite mode.
|
|
638
|
+
// EXTERNAL MODULE: ./src/styles/purple/select.css?vue&type=style&index=3&id=ca4c3b6e&scoped=true&lang=css&
|
|
639
|
+
var selectvue_type_style_index_3_id_ca4c3b6e_scoped_true_lang_css_ = __webpack_require__("ea79");
|
|
585
640
|
|
|
641
|
+
// EXTERNAL MODULE: ./src/styles/purple/slider.css?vue&type=style&index=4&id=ca4c3b6e&scoped=true&lang=css&
|
|
642
|
+
var slidervue_type_style_index_4_id_ca4c3b6e_scoped_true_lang_css_ = __webpack_require__("68c9");
|
|
586
643
|
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
} // Run the simulation.
|
|
644
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
645
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
590
646
|
|
|
647
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
648
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
649
|
+
// be included in the final webpack user bundle.
|
|
591
650
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
// amplitude is 0.1, but we normalise it to 10.)
|
|
607
|
-
if (_this.mode === 1) {
|
|
608
|
-
_this.simulationSpikeData = [{
|
|
609
|
-
x: response.results["environment/time"],
|
|
610
|
-
y: response.results["Brain_stem/w"].map(function (element) {
|
|
611
|
-
return 100 * element;
|
|
612
|
-
})
|
|
613
|
-
}];
|
|
614
|
-
} // Retrieve the potential data.
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
_this.simulationPotentialData = [{
|
|
618
|
-
x: response.results["environment/time"],
|
|
619
|
-
y: response.results["Membrane/V"]
|
|
620
|
-
}];
|
|
621
|
-
} else {
|
|
622
|
-
_this.errorMessage = response.description;
|
|
623
|
-
}
|
|
624
|
-
} else {
|
|
625
|
-
_this.simulationValid = false;
|
|
626
|
-
_this.errorMessage = xmlhttp.statusText.toLowerCase() + " (<a href='https://httpstatuses.com/" + xmlhttp.status + "/' target='_blank'>" + xmlhttp.status + "</a>)";
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
};
|
|
630
|
-
|
|
631
|
-
xmlhttp.send(JSON.stringify(request));
|
|
632
|
-
}
|
|
633
|
-
},
|
|
634
|
-
mounted: function mounted() {
|
|
635
|
-
// Determine the mode in which we should run:
|
|
636
|
-
// - -1: unknown mode;
|
|
637
|
-
// - 0: normal mode; and
|
|
638
|
-
// - 1: composite mode.
|
|
639
|
-
this.mode = -1;
|
|
640
|
-
|
|
641
|
-
if (this.entry) {
|
|
642
|
-
if (this.entry.resource === "https://models.physiomeproject.org/workspace/486/rawfile/55879cbc485e2d4c41f3dc6d60424b849f94c4ee/HumanSAN_Fabbri_Fantini_Wilders_Severi_2017.cellml") {
|
|
643
|
-
this.mode = 0;
|
|
644
|
-
} else if (this.entry.resource === "https://models.physiomeproject.org/workspace/698/rawfile/f3fc911063ac72ed44e84c0c5af28df41c25d452/fabbri_et_al_based_composite_SAN_model.sedml") {
|
|
645
|
-
this.mode = 1;
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
});
|
|
650
|
-
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=script&lang=js&
|
|
651
|
-
/* harmony default export */ var components_SimulationVuervue_type_script_lang_js_ = (SimulationVuervue_type_script_lang_js_);
|
|
652
|
-
// EXTERNAL MODULE: ./src/components/SimulationVuer.vue?vue&type=style&index=0&id=6fb0452b&scoped=true&lang=css&
|
|
653
|
-
var SimulationVuervue_type_style_index_0_id_6fb0452b_scoped_true_lang_css_ = __webpack_require__("5c02");
|
|
654
|
-
|
|
655
|
-
// EXTERNAL MODULE: ./src/styles/purple/aside.css?vue&type=style&index=1&id=6fb0452b&scoped=true&lang=css&
|
|
656
|
-
var asidevue_type_style_index_1_id_6fb0452b_scoped_true_lang_css_ = __webpack_require__("dcc3");
|
|
657
|
-
|
|
658
|
-
// EXTERNAL MODULE: ./src/styles/purple/button.css?vue&type=style&index=2&id=6fb0452b&scoped=true&lang=css&
|
|
659
|
-
var buttonvue_type_style_index_2_id_6fb0452b_scoped_true_lang_css_ = __webpack_require__("5382");
|
|
660
|
-
|
|
661
|
-
// EXTERNAL MODULE: ./src/styles/purple/container.css?vue&type=style&index=3&id=6fb0452b&scoped=true&lang=css&
|
|
662
|
-
var containervue_type_style_index_3_id_6fb0452b_scoped_true_lang_css_ = __webpack_require__("1725");
|
|
663
|
-
|
|
664
|
-
// EXTERNAL MODULE: ./src/styles/purple/input-number.css?vue&type=style&index=4&id=6fb0452b&scoped=true&lang=css&
|
|
665
|
-
var input_numbervue_type_style_index_4_id_6fb0452b_scoped_true_lang_css_ = __webpack_require__("4a72");
|
|
666
|
-
|
|
667
|
-
// EXTERNAL MODULE: ./src/styles/purple/option.css?vue&type=style&index=5&id=6fb0452b&scoped=true&lang=css&
|
|
668
|
-
var optionvue_type_style_index_5_id_6fb0452b_scoped_true_lang_css_ = __webpack_require__("4ebd");
|
|
669
|
-
|
|
670
|
-
// EXTERNAL MODULE: ./src/styles/purple/select.css?vue&type=style&index=6&id=6fb0452b&scoped=true&lang=css&
|
|
671
|
-
var selectvue_type_style_index_6_id_6fb0452b_scoped_true_lang_css_ = __webpack_require__("8547");
|
|
672
|
-
|
|
673
|
-
// EXTERNAL MODULE: ./src/styles/purple/slider.css?vue&type=style&index=7&id=6fb0452b&scoped=true&lang=css&
|
|
674
|
-
var slidervue_type_style_index_7_id_6fb0452b_scoped_true_lang_css_ = __webpack_require__("9bf6");
|
|
675
|
-
|
|
676
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
677
|
-
/* globals __VUE_SSR_CONTEXT__ */
|
|
678
|
-
|
|
679
|
-
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
680
|
-
// This module is a runtime utility for cleaner component module output and will
|
|
681
|
-
// be included in the final webpack user bundle.
|
|
682
|
-
|
|
683
|
-
function normalizeComponent (
|
|
684
|
-
scriptExports,
|
|
685
|
-
render,
|
|
686
|
-
staticRenderFns,
|
|
687
|
-
functionalTemplate,
|
|
688
|
-
injectStyles,
|
|
689
|
-
scopeId,
|
|
690
|
-
moduleIdentifier, /* server only */
|
|
691
|
-
shadowMode /* vue-cli only */
|
|
692
|
-
) {
|
|
693
|
-
// Vue.extend constructor export interop
|
|
694
|
-
var options = typeof scriptExports === 'function'
|
|
695
|
-
? scriptExports.options
|
|
696
|
-
: scriptExports
|
|
651
|
+
function normalizeComponent (
|
|
652
|
+
scriptExports,
|
|
653
|
+
render,
|
|
654
|
+
staticRenderFns,
|
|
655
|
+
functionalTemplate,
|
|
656
|
+
injectStyles,
|
|
657
|
+
scopeId,
|
|
658
|
+
moduleIdentifier, /* server only */
|
|
659
|
+
shadowMode /* vue-cli only */
|
|
660
|
+
) {
|
|
661
|
+
// Vue.extend constructor export interop
|
|
662
|
+
var options = typeof scriptExports === 'function'
|
|
663
|
+
? scriptExports.options
|
|
664
|
+
: scriptExports
|
|
697
665
|
|
|
698
666
|
// render functions
|
|
699
667
|
if (render) {
|
|
@@ -773,7 +741,7 @@ function normalizeComponent (
|
|
|
773
741
|
}
|
|
774
742
|
}
|
|
775
743
|
|
|
776
|
-
// CONCATENATED MODULE: ./src/components/
|
|
744
|
+
// CONCATENATED MODULE: ./src/components/SimulationVuerInput.vue
|
|
777
745
|
|
|
778
746
|
|
|
779
747
|
|
|
@@ -784,23 +752,648 @@ function normalizeComponent (
|
|
|
784
752
|
|
|
785
753
|
|
|
786
754
|
|
|
755
|
+
/* normalize component */
|
|
756
|
+
|
|
757
|
+
var component = normalizeComponent(
|
|
758
|
+
components_SimulationVuerInputvue_type_script_lang_js_,
|
|
759
|
+
SimulationVuerInputvue_type_template_id_ca4c3b6e_scoped_true_render,
|
|
760
|
+
SimulationVuerInputvue_type_template_id_ca4c3b6e_scoped_true_staticRenderFns,
|
|
761
|
+
false,
|
|
762
|
+
null,
|
|
763
|
+
"ca4c3b6e",
|
|
764
|
+
null
|
|
765
|
+
|
|
766
|
+
)
|
|
767
|
+
|
|
768
|
+
/* harmony default export */ var SimulationVuerInput = (component.exports);
|
|
769
|
+
// EXTERNAL MODULE: external "core-js/modules/es.object.to-string.js"
|
|
770
|
+
var es_object_to_string_js_ = __webpack_require__("97d3");
|
|
771
|
+
|
|
772
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.map.js"
|
|
773
|
+
var es_array_map_js_ = __webpack_require__("4391");
|
|
774
|
+
|
|
775
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.includes.js"
|
|
776
|
+
var es_array_includes_js_ = __webpack_require__("85f7");
|
|
777
|
+
|
|
778
|
+
// EXTERNAL MODULE: external "core-js/modules/es.string.includes.js"
|
|
779
|
+
var es_string_includes_js_ = __webpack_require__("fd22");
|
|
780
|
+
|
|
781
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.join.js"
|
|
782
|
+
var es_array_join_js_ = __webpack_require__("be94");
|
|
783
|
+
|
|
784
|
+
// EXTERNAL MODULE: external "jsonschema"
|
|
785
|
+
var external_jsonschema_ = __webpack_require__("9e9d");
|
|
786
|
+
|
|
787
|
+
// CONCATENATED MODULE: ./src/components/json.js
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
function validJson(json) {
|
|
797
|
+
// Check the JSON against our schema.
|
|
798
|
+
var validator = new external_jsonschema_["Validator"]();
|
|
799
|
+
var schema = {
|
|
800
|
+
additionalProperties: false,
|
|
801
|
+
properties: {
|
|
802
|
+
input: {
|
|
803
|
+
items: {
|
|
804
|
+
oneOf: [{
|
|
805
|
+
additionalProperties: false,
|
|
806
|
+
properties: {
|
|
807
|
+
defaultValue: {
|
|
808
|
+
required: true,
|
|
809
|
+
type: "number"
|
|
810
|
+
},
|
|
811
|
+
enabled: {
|
|
812
|
+
type: "string"
|
|
813
|
+
},
|
|
814
|
+
id: {
|
|
815
|
+
type: "string"
|
|
816
|
+
},
|
|
817
|
+
name: {
|
|
818
|
+
required: true,
|
|
819
|
+
type: "string"
|
|
820
|
+
},
|
|
821
|
+
possibleValues: {
|
|
822
|
+
items: {
|
|
823
|
+
additionalProperties: false,
|
|
824
|
+
properties: {
|
|
825
|
+
name: {
|
|
826
|
+
required: true,
|
|
827
|
+
type: "string"
|
|
828
|
+
},
|
|
829
|
+
value: {
|
|
830
|
+
required: true,
|
|
831
|
+
type: "number"
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
type: "object"
|
|
835
|
+
},
|
|
836
|
+
minItems: 1,
|
|
837
|
+
required: true,
|
|
838
|
+
type: "array"
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}, {
|
|
842
|
+
additionalProperties: false,
|
|
843
|
+
properties: {
|
|
844
|
+
defaultValue: {
|
|
845
|
+
required: true,
|
|
846
|
+
type: "number"
|
|
847
|
+
},
|
|
848
|
+
enabled: {
|
|
849
|
+
type: "string"
|
|
850
|
+
},
|
|
851
|
+
id: {
|
|
852
|
+
type: "string"
|
|
853
|
+
},
|
|
854
|
+
maximumValue: {
|
|
855
|
+
required: true,
|
|
856
|
+
type: "number"
|
|
857
|
+
},
|
|
858
|
+
minimumValue: {
|
|
859
|
+
required: true,
|
|
860
|
+
type: "number"
|
|
861
|
+
},
|
|
862
|
+
name: {
|
|
863
|
+
required: true,
|
|
864
|
+
type: "string"
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}],
|
|
868
|
+
type: "object"
|
|
869
|
+
},
|
|
870
|
+
minItems: 1,
|
|
871
|
+
type: "array"
|
|
872
|
+
},
|
|
873
|
+
output: {
|
|
874
|
+
additionalProperties: false,
|
|
875
|
+
properties: {
|
|
876
|
+
data: {
|
|
877
|
+
items: {
|
|
878
|
+
additionalProperties: false,
|
|
879
|
+
properties: {
|
|
880
|
+
id: {
|
|
881
|
+
type: "string"
|
|
882
|
+
},
|
|
883
|
+
name: {
|
|
884
|
+
required: true,
|
|
885
|
+
type: "string"
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
type: "object"
|
|
889
|
+
},
|
|
890
|
+
type: "array"
|
|
891
|
+
},
|
|
892
|
+
plots: {
|
|
893
|
+
items: {
|
|
894
|
+
additionalProperties: false,
|
|
895
|
+
properties: {
|
|
896
|
+
xAxisTitle: {
|
|
897
|
+
required: true,
|
|
898
|
+
type: "string"
|
|
899
|
+
},
|
|
900
|
+
xValue: {
|
|
901
|
+
required: true,
|
|
902
|
+
type: "string"
|
|
903
|
+
},
|
|
904
|
+
yAxisTitle: {
|
|
905
|
+
required: true,
|
|
906
|
+
type: "string"
|
|
907
|
+
},
|
|
908
|
+
yValue: {
|
|
909
|
+
required: true,
|
|
910
|
+
type: "string"
|
|
911
|
+
}
|
|
912
|
+
},
|
|
913
|
+
type: "object"
|
|
914
|
+
},
|
|
915
|
+
maxItems: 9,
|
|
916
|
+
minItems: 1,
|
|
917
|
+
required: true,
|
|
918
|
+
type: "array"
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
required: true,
|
|
922
|
+
type: "object"
|
|
923
|
+
},
|
|
924
|
+
parameters: {
|
|
925
|
+
items: {
|
|
926
|
+
additionalProperties: false,
|
|
927
|
+
properties: {
|
|
928
|
+
name: {
|
|
929
|
+
required: true,
|
|
930
|
+
type: "string"
|
|
931
|
+
},
|
|
932
|
+
value: {
|
|
933
|
+
required: true,
|
|
934
|
+
type: "string"
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
type: "object"
|
|
938
|
+
},
|
|
939
|
+
type: "array"
|
|
940
|
+
},
|
|
941
|
+
simulation: {
|
|
942
|
+
additionalProperties: false,
|
|
943
|
+
properties: {
|
|
944
|
+
endingPoint: {
|
|
945
|
+
required: true,
|
|
946
|
+
type: "number"
|
|
947
|
+
},
|
|
948
|
+
pointInterval: {
|
|
949
|
+
required: true,
|
|
950
|
+
type: "number"
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
type: "object"
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
type: "object"
|
|
957
|
+
};
|
|
958
|
+
var result = validator.validate(json, schema, {
|
|
959
|
+
nestedErrors: true
|
|
960
|
+
});
|
|
961
|
+
|
|
962
|
+
if (!result.valid) {
|
|
963
|
+
console.warn(result.toString());
|
|
964
|
+
return false;
|
|
965
|
+
} // Make sure that the input information makes sense.
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
var inputIdUsed = [];
|
|
969
|
+
var inputValid = json.input.every(function (input) {
|
|
970
|
+
if (input.id !== undefined) {
|
|
971
|
+
if (input.id === "") {
|
|
972
|
+
console.warn("JSON: an input id must not be empty.");
|
|
973
|
+
return false;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
if (inputIdUsed[input.id]) {
|
|
977
|
+
console.warn("JSON: an input id must be unique (" + input.id + " is used more than once).");
|
|
978
|
+
return false;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
inputIdUsed[input.id] = true;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
if (input.name === "") {
|
|
985
|
+
console.warn("JSON: an input name must not be empty.");
|
|
986
|
+
return false;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
if (input.possibleValues !== undefined) {
|
|
990
|
+
if (!input.possibleValues.every(function (possibleValue) {
|
|
991
|
+
if (possibleValue.name === "") {
|
|
992
|
+
console.warn("JSON: an input possible value must not have an empty name.");
|
|
993
|
+
return false;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
return true;
|
|
997
|
+
})) {
|
|
998
|
+
return false;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
var values = input.possibleValues.map(function (value) {
|
|
1002
|
+
return value.value;
|
|
1003
|
+
});
|
|
1004
|
+
var valueUsed = [];
|
|
1005
|
+
|
|
1006
|
+
if (!values.every(function (value) {
|
|
1007
|
+
if (valueUsed[value]) {
|
|
1008
|
+
console.warn("JSON: an input possible value must have a unique value (" + value + " is used more than once).");
|
|
1009
|
+
return false;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
valueUsed[value] = true;
|
|
1013
|
+
return true;
|
|
1014
|
+
})) {
|
|
1015
|
+
return false;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
if (!values.includes(input.defaultValue)) {
|
|
1019
|
+
console.warn("JSON: the input default value (" + input.defaultValue + ") must be one of the possible values (" + values.join(", ") + ").");
|
|
1020
|
+
return false;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
if (input.enabled !== undefined) {
|
|
1025
|
+
if (input.enabled === "") {
|
|
1026
|
+
console.warn("JSON: an input enabled must not be empty.");
|
|
1027
|
+
return false;
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
if (input.minimumValue !== undefined && input.maximumValue !== undefined) {
|
|
1032
|
+
if (input.minimumValue >= input.maximumValue) {
|
|
1033
|
+
console.warn("JSON: the input minimum value (" + input.minimumValue + ") must be lower than the maximum value (" + input.maximumValue + ").");
|
|
1034
|
+
return false;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
if (input.defaultValue < input.minimumValue || input.defaultValue > input.maximumValue) {
|
|
1038
|
+
console.warn("JSON: the input default value (" + input.defaultValue + ") must be greater or equal to the minimum value (" + input.minimumValue + ") and lower or equal to the maximum value (" + input.maximumValue + ").");
|
|
1039
|
+
return false;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
return true;
|
|
1044
|
+
});
|
|
1045
|
+
|
|
1046
|
+
if (!inputValid) {
|
|
1047
|
+
return false;
|
|
1048
|
+
} // Make sure that the output information makes sense.
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
var outputIdUsed = [];
|
|
1052
|
+
var outputDataValid = json.output.data.every(function (outputData) {
|
|
1053
|
+
if (outputData.id !== undefined) {
|
|
1054
|
+
if (outputData.id === "") {
|
|
1055
|
+
console.warn("JSON: an output data id must not be empty.");
|
|
1056
|
+
return false;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
if (outputIdUsed[outputData.id]) {
|
|
1060
|
+
console.warn("JSON: an output data id must be unique (" + outputData.id + " is used more than once).");
|
|
1061
|
+
return false;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
outputIdUsed[outputData.id] = true;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
if (outputData.name === "") {
|
|
1068
|
+
console.warn("JSON: an output data name must not be empty.");
|
|
1069
|
+
return false;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
return true;
|
|
1073
|
+
});
|
|
1074
|
+
|
|
1075
|
+
if (!outputDataValid) {
|
|
1076
|
+
return false;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
var outputPlotsValid = json.output.plots.every(function (outputPlot) {
|
|
1080
|
+
if (outputPlot.xAxisTitle === "") {
|
|
1081
|
+
console.warn("JSON: an output plot X axis title must not be empty.");
|
|
1082
|
+
return false;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
if (outputPlot.xValue === "") {
|
|
1086
|
+
console.warn("JSON: an output plot X value must not be empty.");
|
|
1087
|
+
return false;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
if (outputPlot.yAxisTitle === "") {
|
|
1091
|
+
console.warn("JSON: an output plot Y axis title must not be empty.");
|
|
1092
|
+
return false;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
if (outputPlot.yValue === "") {
|
|
1096
|
+
console.warn("JSON: an output plot Y value must not be empty.");
|
|
1097
|
+
return false;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
return true;
|
|
1101
|
+
});
|
|
1102
|
+
|
|
1103
|
+
if (!outputPlotsValid) {
|
|
1104
|
+
return false;
|
|
1105
|
+
} // Make sure that the parameters information makes sense.
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
var parametersValid = json.parameters.every(function (parameter) {
|
|
1109
|
+
if (parameter.name === "") {
|
|
1110
|
+
console.warn("JSON: a parameter name must not be empty.");
|
|
1111
|
+
return false;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
if (parameter.value === "") {
|
|
1115
|
+
console.warn("JSON: a parameter value must not be empty.");
|
|
1116
|
+
return false;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
return true;
|
|
1120
|
+
});
|
|
1121
|
+
|
|
1122
|
+
if (!parametersValid) {
|
|
1123
|
+
return false;
|
|
1124
|
+
} // Make sure that the simulation information makes sense.
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
if (json.simulation !== undefined) {
|
|
1128
|
+
if (json.simulation.endingPoint <= 0.0) {
|
|
1129
|
+
console.warn("JSON: a simulation ending point must be greater than zero.");
|
|
1130
|
+
return false;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
if (json.simulation.pointInterval <= 0.0) {
|
|
1134
|
+
console.warn("JSON: a simulation point interval must be greater than zero.");
|
|
1135
|
+
return false;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
return true;
|
|
1140
|
+
}
|
|
1141
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SimulationVuer.vue?vue&type=script&lang=js&
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
//
|
|
1148
|
+
//
|
|
1149
|
+
//
|
|
1150
|
+
//
|
|
1151
|
+
//
|
|
1152
|
+
//
|
|
1153
|
+
//
|
|
1154
|
+
//
|
|
1155
|
+
//
|
|
1156
|
+
//
|
|
1157
|
+
//
|
|
1158
|
+
//
|
|
1159
|
+
//
|
|
1160
|
+
//
|
|
1161
|
+
//
|
|
1162
|
+
//
|
|
1163
|
+
//
|
|
1164
|
+
//
|
|
1165
|
+
//
|
|
1166
|
+
//
|
|
1167
|
+
//
|
|
1168
|
+
//
|
|
1169
|
+
//
|
|
1170
|
+
//
|
|
1171
|
+
//
|
|
1172
|
+
//
|
|
1173
|
+
//
|
|
1174
|
+
//
|
|
1175
|
+
//
|
|
1176
|
+
//
|
|
1177
|
+
//
|
|
1178
|
+
//
|
|
1179
|
+
//
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
external_vue_default.a.use(external_element_ui_["Button"]);
|
|
1189
|
+
external_vue_default.a.use(external_element_ui_["Divider"]);
|
|
1190
|
+
external_vue_default.a.use(external_element_ui_["Loading"]);
|
|
1191
|
+
/* harmony default export */ var SimulationVuervue_type_script_lang_js_ = ({
|
|
1192
|
+
name: "SimulationVuer",
|
|
1193
|
+
components: {
|
|
1194
|
+
PlotVuer: plotvuer_["PlotVuer"],
|
|
1195
|
+
SimulationVuerInput: SimulationVuerInput
|
|
1196
|
+
},
|
|
1197
|
+
props: {
|
|
1198
|
+
apiLocation: {
|
|
1199
|
+
required: true,
|
|
1200
|
+
type: String
|
|
1201
|
+
},
|
|
1202
|
+
entry: {
|
|
1203
|
+
required: true,
|
|
1204
|
+
type: Object
|
|
1205
|
+
}
|
|
1206
|
+
},
|
|
1207
|
+
data: function data() {
|
|
1208
|
+
return {
|
|
1209
|
+
errorMessage: "",
|
|
1210
|
+
firstScalarInput: [],
|
|
1211
|
+
hasFinalisedUi: false,
|
|
1212
|
+
hasValidSimulationUiInformation: false,
|
|
1213
|
+
isMounted: false,
|
|
1214
|
+
isSimulationValid: true,
|
|
1215
|
+
layout: [],
|
|
1216
|
+
showUserMessage: false,
|
|
1217
|
+
simulationData: [],
|
|
1218
|
+
simulationDataId: {},
|
|
1219
|
+
simulationUiInformation: {},
|
|
1220
|
+
userMessage: "",
|
|
1221
|
+
title: this.entry !== undefined ? this.entry.name : "",
|
|
1222
|
+
ui: null
|
|
1223
|
+
};
|
|
1224
|
+
},
|
|
1225
|
+
methods: {
|
|
1226
|
+
goToOsparc: function goToOsparc() {
|
|
1227
|
+
window.open("https://osparc.io/", "_blank");
|
|
1228
|
+
},
|
|
1229
|
+
viewDataset: function viewDataset() {
|
|
1230
|
+
window.open(this.entry.dataset, "_blank");
|
|
1231
|
+
},
|
|
1232
|
+
runSimulation: function runSimulation() {
|
|
1233
|
+
var _this = this;
|
|
1234
|
+
|
|
1235
|
+
this.userMessage = "Loading simulation results...";
|
|
1236
|
+
this.showUserMessage = true;
|
|
1237
|
+
var request = {
|
|
1238
|
+
model_url: this.entry.resource,
|
|
1239
|
+
json_config: {}
|
|
1240
|
+
}; // Specify the ending point and point interval, if we have some simulation
|
|
1241
|
+
// data.
|
|
1242
|
+
|
|
1243
|
+
if (this.simulationUiInformation.simulation !== undefined) {
|
|
1244
|
+
request.json_config.simulation = {
|
|
1245
|
+
"Ending point": this.simulationUiInformation.simulation.endingPoint,
|
|
1246
|
+
"Point interval": this.simulationUiInformation.simulation.pointInterval
|
|
1247
|
+
};
|
|
1248
|
+
} // Specify the simulation parameters.
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
if (this.simulationUiInformation.parameters != undefined) {
|
|
1252
|
+
request.json_config.parameters = {};
|
|
1253
|
+
this.simulationUiInformation.parameters.forEach(function (parameter) {
|
|
1254
|
+
request.json_config.parameters[parameter.name] = evaluateValue(_this, parameter.value);
|
|
1255
|
+
});
|
|
1256
|
+
} // Specify what we want to retrieve.
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
if (this.simulationUiInformation.output.data !== undefined) {
|
|
1260
|
+
var index = -1;
|
|
1261
|
+
request.json_config.output = [];
|
|
1262
|
+
this.simulationUiInformation.output.data.forEach(function (outputData) {
|
|
1263
|
+
request.json_config.output[++index] = outputData.name;
|
|
1264
|
+
});
|
|
1265
|
+
} // Run the simulation.
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
var xmlhttp = new XMLHttpRequest();
|
|
1269
|
+
xmlhttp.open("POST", this.apiLocation + "/simulation", true);
|
|
1270
|
+
xmlhttp.setRequestHeader("Content-type", "application/json");
|
|
1271
|
+
|
|
1272
|
+
xmlhttp.onreadystatechange = function () {
|
|
1273
|
+
if (xmlhttp.readyState === 4) {
|
|
1274
|
+
_this.showUserMessage = false;
|
|
1275
|
+
|
|
1276
|
+
if (xmlhttp.status === 200) {
|
|
1277
|
+
var response = JSON.parse(xmlhttp.responseText);
|
|
1278
|
+
_this.isSimulationValid = response.status === "ok";
|
|
1279
|
+
|
|
1280
|
+
if (_this.isSimulationValid) {
|
|
1281
|
+
// Retrieve and post-process the simulation data.
|
|
1282
|
+
var _index = -1;
|
|
1283
|
+
|
|
1284
|
+
var iMax = response.results[_this.simulationDataId[Object.keys(_this.simulationDataId)[0]]].length;
|
|
1285
|
+
|
|
1286
|
+
_this.simulationUiInformation.output.plots.forEach(function (outputPlot) {
|
|
1287
|
+
var xValue = [];
|
|
1288
|
+
var yValue = [];
|
|
1289
|
+
|
|
1290
|
+
for (var i = 0; i < iMax; ++i) {
|
|
1291
|
+
xValue[i] = evaluateSimulationValue(_this, response.results, outputPlot.xValue, i);
|
|
1292
|
+
yValue[i] = evaluateSimulationValue(_this, response.results, outputPlot.yValue, i);
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
_this.simulationData[++_index] = [{
|
|
1296
|
+
x: xValue,
|
|
1297
|
+
y: yValue
|
|
1298
|
+
}];
|
|
1299
|
+
});
|
|
1300
|
+
} else {
|
|
1301
|
+
_this.errorMessage = response.description;
|
|
1302
|
+
}
|
|
1303
|
+
} else {
|
|
1304
|
+
_this.isSimulationValid = false;
|
|
1305
|
+
_this.errorMessage = xmlhttp.statusText.toLowerCase() + " (<a href='https://httpstatuses.com/" + xmlhttp.status + "/' target='_blank'>" + xmlhttp.status + "</a>)";
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
};
|
|
1309
|
+
|
|
1310
|
+
xmlhttp.send(JSON.stringify(request));
|
|
1311
|
+
}
|
|
1312
|
+
},
|
|
1313
|
+
created: function created() {
|
|
1314
|
+
var _this2 = this;
|
|
1315
|
+
|
|
1316
|
+
this.userMessage = "Retrieving UI information...";
|
|
1317
|
+
this.showUserMessage = true; // Retrieve the simulation UI file for the given dataset.
|
|
1318
|
+
|
|
1319
|
+
var xmlhttp = new XMLHttpRequest();
|
|
1320
|
+
xmlhttp.open("GET", this.apiLocation + "/simulation_ui_file/" + this.entry.datasetId, true);
|
|
1321
|
+
xmlhttp.setRequestHeader("Content-type", "application/json");
|
|
1322
|
+
|
|
1323
|
+
xmlhttp.onreadystatechange = function () {
|
|
1324
|
+
if (xmlhttp.readyState === 4) {
|
|
1325
|
+
// Keep track of the simulation UI information.
|
|
1326
|
+
_this2.simulationUiInformation = JSON.parse(xmlhttp.responseText); // Make sure that the simulation UI information is valid.
|
|
1327
|
+
|
|
1328
|
+
_this2.hasValidSimulationUiInformation = validJson(_this2.simulationUiInformation);
|
|
1329
|
+
|
|
1330
|
+
if (!_this2.hasValidSimulationUiInformation) {
|
|
1331
|
+
_this2.showUserMessage = false;
|
|
1332
|
+
return;
|
|
1333
|
+
} // Initialise our UI.
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
initialiseUi(_this2); // Finalise our UI.
|
|
1337
|
+
// Note: we try both here and in the mounded() function since we have no
|
|
1338
|
+
// idea how long it's going to take to retrieve the simulation UI
|
|
1339
|
+
// information.
|
|
1340
|
+
|
|
1341
|
+
_this2.$nextTick(function () {
|
|
1342
|
+
finaliseUi(_this2);
|
|
1343
|
+
_this2.showUserMessage = false;
|
|
1344
|
+
});
|
|
1345
|
+
}
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1348
|
+
xmlhttp.send();
|
|
1349
|
+
},
|
|
1350
|
+
mounted: function mounted() {
|
|
1351
|
+
// Finalise our UI.
|
|
1352
|
+
// Note: we try both here and in the created() function since we have no
|
|
1353
|
+
// idea how long it's going to take to retrieve the simulation UI
|
|
1354
|
+
// information.
|
|
1355
|
+
this.isMounted = true;
|
|
1356
|
+
finaliseUi(this);
|
|
1357
|
+
}
|
|
1358
|
+
});
|
|
1359
|
+
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=script&lang=js&
|
|
1360
|
+
/* harmony default export */ var components_SimulationVuervue_type_script_lang_js_ = (SimulationVuervue_type_script_lang_js_);
|
|
1361
|
+
// EXTERNAL MODULE: ./src/components/SimulationVuer.vue?vue&type=style&index=0&id=d2c3a0be&scoped=true&lang=css&
|
|
1362
|
+
var SimulationVuervue_type_style_index_0_id_d2c3a0be_scoped_true_lang_css_ = __webpack_require__("feac");
|
|
1363
|
+
|
|
1364
|
+
// EXTERNAL MODULE: ./src/styles/purple/button.css?vue&type=style&index=1&id=d2c3a0be&scoped=true&lang=css&
|
|
1365
|
+
var buttonvue_type_style_index_1_id_d2c3a0be_scoped_true_lang_css_ = __webpack_require__("12e0");
|
|
1366
|
+
|
|
1367
|
+
// EXTERNAL MODULE: ./src/styles/purple/divider.css?vue&type=style&index=2&id=d2c3a0be&scoped=true&lang=css&
|
|
1368
|
+
var dividervue_type_style_index_2_id_d2c3a0be_scoped_true_lang_css_ = __webpack_require__("c048");
|
|
1369
|
+
|
|
1370
|
+
// EXTERNAL MODULE: ./src/styles/purple/loading.css?vue&type=style&index=3&id=d2c3a0be&scoped=true&lang=css&
|
|
1371
|
+
var loadingvue_type_style_index_3_id_d2c3a0be_scoped_true_lang_css_ = __webpack_require__("49bc");
|
|
1372
|
+
|
|
1373
|
+
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
787
1380
|
|
|
788
1381
|
|
|
789
1382
|
|
|
790
1383
|
/* normalize component */
|
|
791
1384
|
|
|
792
|
-
var
|
|
1385
|
+
var SimulationVuer_component = normalizeComponent(
|
|
793
1386
|
components_SimulationVuervue_type_script_lang_js_,
|
|
794
1387
|
render,
|
|
795
1388
|
staticRenderFns,
|
|
796
1389
|
false,
|
|
797
1390
|
null,
|
|
798
|
-
"
|
|
1391
|
+
"d2c3a0be",
|
|
799
1392
|
null
|
|
800
1393
|
|
|
801
1394
|
)
|
|
802
1395
|
|
|
803
|
-
/* harmony default export */ var SimulationVuer = (
|
|
1396
|
+
/* harmony default export */ var SimulationVuer = (SimulationVuer_component.exports);
|
|
804
1397
|
// CONCATENATED MODULE: ./src/components/index.js
|
|
805
1398
|
// The Vue build version to load with the `import` command
|
|
806
1399
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
|
@@ -811,6 +1404,31 @@ var component = normalizeComponent(
|
|
|
811
1404
|
|
|
812
1405
|
|
|
813
1406
|
|
|
1407
|
+
/***/ }),
|
|
1408
|
+
|
|
1409
|
+
/***/ "fd22":
|
|
1410
|
+
/***/ (function(module, exports) {
|
|
1411
|
+
|
|
1412
|
+
module.exports = require("core-js/modules/es.string.includes.js");
|
|
1413
|
+
|
|
1414
|
+
/***/ }),
|
|
1415
|
+
|
|
1416
|
+
/***/ "fdaa":
|
|
1417
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1418
|
+
|
|
1419
|
+
// extracted by mini-css-extract-plugin
|
|
1420
|
+
|
|
1421
|
+
/***/ }),
|
|
1422
|
+
|
|
1423
|
+
/***/ "feac":
|
|
1424
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1425
|
+
|
|
1426
|
+
"use strict";
|
|
1427
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuer_vue_vue_type_style_index_0_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8468");
|
|
1428
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuer_vue_vue_type_style_index_0_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuer_vue_vue_type_style_index_0_id_d2c3a0be_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
1429
|
+
/* unused harmony reexport * */
|
|
1430
|
+
|
|
1431
|
+
|
|
814
1432
|
/***/ })
|
|
815
1433
|
|
|
816
1434
|
/******/ });
|