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