@datagrok/compute 1.44.6 → 1.45.1
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/CHANGELOG.md +12 -2
- package/CREDITS.md +41 -0
- package/README.md +5 -7
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +12 -8
- package/scripts/complexInputs.js +13 -0
- package/scripts/globalValidationTest.js +11 -0
- package/scripts/lorenz-attractor.js +1 -1
- package/scripts/simpleInputs.js +16 -0
- package/scripts/simpleInputsDefaultValues.js +15 -0
- package/scripts/validationTest.js +11 -0
- package/src/package-api.ts +17 -27
- package/src/package-test.ts +4 -1
- package/src/package.g.ts +31 -53
- package/src/package.ts +83 -147
- package/src/tests/rich-function-view-direct-tests.ts +403 -0
- package/src/tests/rich-function-view-tests.ts +512 -0
- package/src/tests/snapshots/fc1.json +1 -0
- package/src/tests/utils.ts +8 -0
- package/tsconfig.json +1 -0
- package/dist/148.js +0 -2
- package/dist/148.js.map +0 -1
- package/dist/377.js +0 -2
- package/dist/377.js.map +0 -1
- package/dist/508.js +0 -2
- package/dist/508.js.map +0 -1
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
import * as DG from 'datagrok-api/dg';
|
|
2
|
+
import {category, test, before, delay} from '@datagrok-libraries/test/src/test';
|
|
3
|
+
import {createRFV, initComputeApi} from '@datagrok-libraries/compute-api';
|
|
4
|
+
import {take, filter} from 'rxjs/operators';
|
|
5
|
+
import {applyTransformations} from '@datagrok-libraries/utils/src/json-serialization';
|
|
6
|
+
import {getFuncCallIO} from './utils';
|
|
7
|
+
import {expectDeepEqual} from '@datagrok-libraries/utils/src/expect';
|
|
8
|
+
import fc1 from './snapshots/fc1.json';
|
|
9
|
+
import {InputVariants} from '@datagrok-libraries/compute-utils/old-views/src/rich-function-view';
|
|
10
|
+
|
|
11
|
+
category('Compute API: RFV Inputs', async () => {
|
|
12
|
+
before(async () => {
|
|
13
|
+
await initComputeApi();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test('Simple inputs setParamValue', async () => {
|
|
17
|
+
const view = createRFV('Compute:simpleInputs', {historyEnabled: false, isTabbed: false});
|
|
18
|
+
const inputValues: Record<string, any> = {
|
|
19
|
+
a: 1,
|
|
20
|
+
b: 2.2,
|
|
21
|
+
c: 'test',
|
|
22
|
+
};
|
|
23
|
+
const inputsMap: Record<string, InputVariants> = {};
|
|
24
|
+
view.afterInputPropertyRender.subscribe(({prop, input}) => {
|
|
25
|
+
inputsMap[prop.name] = input;
|
|
26
|
+
});
|
|
27
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
28
|
+
view.funcCall.setParamValue('a', 1);
|
|
29
|
+
view.funcCall.setParamValue('b', 2.2);
|
|
30
|
+
view.funcCall.setParamValue('c', 'test');
|
|
31
|
+
await view.doRun();
|
|
32
|
+
const expected = {
|
|
33
|
+
'inputs': [
|
|
34
|
+
[
|
|
35
|
+
'a',
|
|
36
|
+
1,
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
'b',
|
|
40
|
+
2.2,
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
'c',
|
|
44
|
+
'test',
|
|
45
|
+
],
|
|
46
|
+
],
|
|
47
|
+
'outputs': [
|
|
48
|
+
[
|
|
49
|
+
'aout',
|
|
50
|
+
1,
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
'bout',
|
|
54
|
+
2.2,
|
|
55
|
+
],
|
|
56
|
+
[
|
|
57
|
+
'cout',
|
|
58
|
+
'test',
|
|
59
|
+
],
|
|
60
|
+
],
|
|
61
|
+
};
|
|
62
|
+
expectDeepEqual(getFuncCallIO(view.funcCall), expected, {prefix: 'funcCall'});
|
|
63
|
+
expectDeepEqual(getFuncCallIO(view.lastCall!), expected, {prefix: 'lastCall'});
|
|
64
|
+
for (const [name, val] of Object.entries(inputValues))
|
|
65
|
+
expectDeepEqual(inputsMap[name].value, val, {prefix: `input ${name}`});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test('Simple inputs inputs tweak', async () => {
|
|
69
|
+
const view = createRFV('Compute:simpleInputs', {historyEnabled: false, isTabbed: false});
|
|
70
|
+
const inputValues: Record<string, any> = {
|
|
71
|
+
a: 1,
|
|
72
|
+
b: 2.2,
|
|
73
|
+
c: 'test',
|
|
74
|
+
};
|
|
75
|
+
const inputsMap: Record<string, InputVariants> = {};
|
|
76
|
+
view.afterInputPropertyRender.subscribe(({prop, input}) => {
|
|
77
|
+
inputsMap[prop.name] = input;
|
|
78
|
+
});
|
|
79
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
80
|
+
await delay(100);
|
|
81
|
+
for (const [name, input] of Object.entries(inputsMap)) {
|
|
82
|
+
input.value = inputValues[name];
|
|
83
|
+
const element = (input as any).input;
|
|
84
|
+
element.dispatchEvent(new Event('input', {bubbles: true}));
|
|
85
|
+
}
|
|
86
|
+
await delay(300);
|
|
87
|
+
await view.doRun();
|
|
88
|
+
const expected = {
|
|
89
|
+
'inputs': [
|
|
90
|
+
[
|
|
91
|
+
'a',
|
|
92
|
+
1,
|
|
93
|
+
],
|
|
94
|
+
[
|
|
95
|
+
'b',
|
|
96
|
+
2.2,
|
|
97
|
+
],
|
|
98
|
+
[
|
|
99
|
+
'c',
|
|
100
|
+
'test',
|
|
101
|
+
],
|
|
102
|
+
],
|
|
103
|
+
'outputs': [
|
|
104
|
+
[
|
|
105
|
+
'aout',
|
|
106
|
+
1,
|
|
107
|
+
],
|
|
108
|
+
[
|
|
109
|
+
'bout',
|
|
110
|
+
2.2,
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
'cout',
|
|
114
|
+
'test',
|
|
115
|
+
],
|
|
116
|
+
],
|
|
117
|
+
};
|
|
118
|
+
expectDeepEqual(getFuncCallIO(view.funcCall), expected, {prefix: 'funcCall'});
|
|
119
|
+
expectDeepEqual(getFuncCallIO(view.lastCall!), expected, {prefix: 'lastCall'});
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
test('Simple inputs setParamValue rerun', async () => {
|
|
123
|
+
const view = createRFV('Compute:simpleInputsDefaultValues', {historyEnabled: false, isTabbed: false});
|
|
124
|
+
const inputValues: Record<string, any> = {
|
|
125
|
+
a: 2,
|
|
126
|
+
b: 3.2,
|
|
127
|
+
c: 'test2',
|
|
128
|
+
};
|
|
129
|
+
const inputsMap: Record<string, InputVariants> = {};
|
|
130
|
+
view.afterInputPropertyRender.subscribe(({prop, input}) => {
|
|
131
|
+
inputsMap[prop.name] = input;
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
135
|
+
await delay(100);
|
|
136
|
+
await view.doRun();
|
|
137
|
+
view.funcCall.setParamValue('a', 2);
|
|
138
|
+
view.funcCall.setParamValue('b', 3.2);
|
|
139
|
+
view.funcCall.setParamValue('c', 'test2');
|
|
140
|
+
await view.doRun();
|
|
141
|
+
const expected = {
|
|
142
|
+
'inputs': [
|
|
143
|
+
[
|
|
144
|
+
'a',
|
|
145
|
+
2,
|
|
146
|
+
],
|
|
147
|
+
[
|
|
148
|
+
'b',
|
|
149
|
+
3.2,
|
|
150
|
+
],
|
|
151
|
+
[
|
|
152
|
+
'c',
|
|
153
|
+
'test2',
|
|
154
|
+
],
|
|
155
|
+
],
|
|
156
|
+
'outputs': [
|
|
157
|
+
[
|
|
158
|
+
'aout',
|
|
159
|
+
2,
|
|
160
|
+
],
|
|
161
|
+
[
|
|
162
|
+
'bout',
|
|
163
|
+
3.2,
|
|
164
|
+
],
|
|
165
|
+
[
|
|
166
|
+
'cout',
|
|
167
|
+
'test2',
|
|
168
|
+
],
|
|
169
|
+
],
|
|
170
|
+
};
|
|
171
|
+
expectDeepEqual(getFuncCallIO(view.funcCall), expected, {prefix: 'funcCall'});
|
|
172
|
+
expectDeepEqual(getFuncCallIO(view.lastCall!), expected, {prefix: 'lastCall'});
|
|
173
|
+
for (const [name, val] of Object.entries(inputValues))
|
|
174
|
+
expectDeepEqual(inputsMap[name].value, val, {prefix: `input ${name}`});
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
test('Simple inputs inputs tweak rerun', async () => {
|
|
178
|
+
const view = createRFV('Compute:simpleInputsDefaultValues', {historyEnabled: false, isTabbed: false});
|
|
179
|
+
const inputValues: Record<string, any> = {
|
|
180
|
+
a: 2,
|
|
181
|
+
b: 3.2,
|
|
182
|
+
c: 'test2',
|
|
183
|
+
};
|
|
184
|
+
const inputsMap: Record<string, InputVariants> = {};
|
|
185
|
+
view.afterInputPropertyRender.subscribe(({prop, input}) => {
|
|
186
|
+
inputsMap[prop.name] = input;
|
|
187
|
+
});
|
|
188
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
189
|
+
await delay(100);
|
|
190
|
+
await view.doRun();
|
|
191
|
+
await delay(100);
|
|
192
|
+
for (const [name, input] of Object.entries(inputsMap)) {
|
|
193
|
+
input.value = inputValues[name];
|
|
194
|
+
const element = (input as any).input;
|
|
195
|
+
element.dispatchEvent(new Event('input', {bubbles: true}));
|
|
196
|
+
}
|
|
197
|
+
await delay(300);
|
|
198
|
+
await view.doRun();
|
|
199
|
+
const expected = {
|
|
200
|
+
'inputs': [
|
|
201
|
+
[
|
|
202
|
+
'a',
|
|
203
|
+
2,
|
|
204
|
+
],
|
|
205
|
+
[
|
|
206
|
+
'b',
|
|
207
|
+
3.2,
|
|
208
|
+
],
|
|
209
|
+
[
|
|
210
|
+
'c',
|
|
211
|
+
'test2',
|
|
212
|
+
],
|
|
213
|
+
],
|
|
214
|
+
'outputs': [
|
|
215
|
+
[
|
|
216
|
+
'aout',
|
|
217
|
+
2,
|
|
218
|
+
],
|
|
219
|
+
[
|
|
220
|
+
'bout',
|
|
221
|
+
3.2,
|
|
222
|
+
],
|
|
223
|
+
[
|
|
224
|
+
'cout',
|
|
225
|
+
'test2',
|
|
226
|
+
],
|
|
227
|
+
],
|
|
228
|
+
};
|
|
229
|
+
expectDeepEqual(getFuncCallIO(view.funcCall), expected, {prefix: 'funcCall'});
|
|
230
|
+
expectDeepEqual(getFuncCallIO(view.lastCall!), expected, {prefix: 'lastCall'});
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
test('Simple inputs default values', async () => {
|
|
234
|
+
const view = createRFV('Compute:simpleInputsDefaultValues', {historyEnabled: false, isTabbed: false});
|
|
235
|
+
|
|
236
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
237
|
+
await delay(100);
|
|
238
|
+
const expected = {
|
|
239
|
+
'inputs': [
|
|
240
|
+
[
|
|
241
|
+
'a',
|
|
242
|
+
1,
|
|
243
|
+
],
|
|
244
|
+
[
|
|
245
|
+
'b',
|
|
246
|
+
2.2,
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
'c',
|
|
250
|
+
'test',
|
|
251
|
+
],
|
|
252
|
+
],
|
|
253
|
+
};
|
|
254
|
+
expectDeepEqual(getFuncCallIO(view.funcCall).inputs, expected.inputs);
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
test('Complex inputs setParamValue', async () => {
|
|
258
|
+
const view = createRFV('Compute:complexInputs', {historyEnabled: false, isTabbed: false});
|
|
259
|
+
const inputValues: Record<string, any> = {
|
|
260
|
+
df: DG.DataFrame.fromColumns([
|
|
261
|
+
DG.Column.fromList('double', 'col', [1.1, 2.2, 3.3]),
|
|
262
|
+
]),
|
|
263
|
+
data: JSON.stringify({a: 1, b: 'test'}),
|
|
264
|
+
};
|
|
265
|
+
const inputsMap: Record<string, InputVariants> = {};
|
|
266
|
+
view.afterInputPropertyRender.subscribe(({prop, input}) => {
|
|
267
|
+
inputsMap[prop.name] = input;
|
|
268
|
+
});
|
|
269
|
+
view.funcCall.setParamValue('df', inputValues['df']);
|
|
270
|
+
view.funcCall.setParamValue('data', inputValues['data']);
|
|
271
|
+
await view.doRun();
|
|
272
|
+
expectDeepEqual(getFuncCallIO(view.funcCall), applyTransformations(fc1), {prefix: 'funcCall'});
|
|
273
|
+
expectDeepEqual(getFuncCallIO(view.lastCall!), applyTransformations(fc1), {prefix: 'lastCall'});
|
|
274
|
+
expectDeepEqual(inputsMap.data.value, inputValues.data, {prefix: 'data'});
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
test('Complex inputs inputs tweak', async () => {
|
|
278
|
+
const view = createRFV('Compute:complexInputs', {historyEnabled: false, isTabbed: false});
|
|
279
|
+
const inputValues: Record<string, any> = {
|
|
280
|
+
df: DG.DataFrame.fromColumns([
|
|
281
|
+
DG.Column.fromList('double', 'col', [1.1, 2.2, 3.3]),
|
|
282
|
+
]),
|
|
283
|
+
data: JSON.stringify({a: 1, b: 'test'}),
|
|
284
|
+
};
|
|
285
|
+
const inputsMap: Record<string, InputVariants> = {};
|
|
286
|
+
view.afterInputPropertyRender.subscribe(({prop, input}) => {
|
|
287
|
+
inputsMap[prop.name] = input;
|
|
288
|
+
});
|
|
289
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
290
|
+
await delay(100);
|
|
291
|
+
inputsMap['data'].value = inputValues['data'];
|
|
292
|
+
// TODO: test df input, not rly used rn
|
|
293
|
+
view.funcCall.setParamValue('df', inputValues['df']);
|
|
294
|
+
await delay(300);
|
|
295
|
+
await view.doRun();
|
|
296
|
+
expectDeepEqual(getFuncCallIO(view.funcCall), applyTransformations(fc1), {prefix: 'funcCall'});
|
|
297
|
+
expectDeepEqual(getFuncCallIO(view.lastCall!), applyTransformations(fc1), {prefix: 'lastCall'});
|
|
298
|
+
expectDeepEqual(inputsMap.data.value, inputValues.data, {prefix: 'data'});
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
test('Complex inputs setParamValue rerun', async () => {
|
|
302
|
+
const view = createRFV('Compute:complexInputs', {historyEnabled: false, isTabbed: false});
|
|
303
|
+
const inputValuesPre: Record<string, any> = {
|
|
304
|
+
df: DG.DataFrame.fromColumns([
|
|
305
|
+
DG.Column.fromList('double', 'col', [11.1, 12.2, 13.3]),
|
|
306
|
+
]),
|
|
307
|
+
data: JSON.stringify({a: 2, b: 'pretest'}),
|
|
308
|
+
};
|
|
309
|
+
const inputsMap: Record<string, InputVariants> = {};
|
|
310
|
+
view.afterInputPropertyRender.subscribe(({prop, input}) => {
|
|
311
|
+
inputsMap[prop.name] = input;
|
|
312
|
+
});
|
|
313
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
314
|
+
view.funcCall.setParamValue('df', inputValuesPre['df']);
|
|
315
|
+
view.funcCall.setParamValue('data', inputValuesPre['data']);
|
|
316
|
+
await view.doRun();
|
|
317
|
+
const inputValues: Record<string, any> = {
|
|
318
|
+
df: DG.DataFrame.fromColumns([
|
|
319
|
+
DG.Column.fromList('double', 'col', [1.1, 2.2, 3.3]),
|
|
320
|
+
]),
|
|
321
|
+
data: JSON.stringify({a: 1, b: 'test'}),
|
|
322
|
+
};
|
|
323
|
+
view.funcCall.setParamValue('df', inputValues['df']);
|
|
324
|
+
view.funcCall.setParamValue('data', inputValues['data']);
|
|
325
|
+
await view.doRun();
|
|
326
|
+
expectDeepEqual(getFuncCallIO(view.funcCall), applyTransformations(fc1), {prefix: 'funcCall'});
|
|
327
|
+
expectDeepEqual(getFuncCallIO(view.lastCall!), applyTransformations(fc1), {prefix: 'lastCall'});
|
|
328
|
+
expectDeepEqual(inputsMap.data.value, inputValues.data, {prefix: 'data'});
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
test('Complex inputs inputs tweak rerun', async () => {
|
|
332
|
+
const view = createRFV('Compute:complexInputs', {historyEnabled: false, isTabbed: false});
|
|
333
|
+
const inputValuesPre: Record<string, any> = {
|
|
334
|
+
df: DG.DataFrame.fromColumns([
|
|
335
|
+
DG.Column.fromList('double', 'col', [11.1, 12.2, 13.3]),
|
|
336
|
+
]),
|
|
337
|
+
data: JSON.stringify({a: 2, b: 'pretest'}),
|
|
338
|
+
};
|
|
339
|
+
const inputsMap: Record<string, InputVariants> = {};
|
|
340
|
+
view.afterInputPropertyRender.subscribe(({prop, input}) => {
|
|
341
|
+
inputsMap[prop.name] = input;
|
|
342
|
+
});
|
|
343
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
344
|
+
await delay(100);
|
|
345
|
+
inputsMap['data'].value = inputValuesPre['data'];
|
|
346
|
+
// TODO: test df input, not rly used rn
|
|
347
|
+
view.funcCall.setParamValue('df', inputValuesPre['df']);
|
|
348
|
+
await delay(300);
|
|
349
|
+
await view.doRun();
|
|
350
|
+
const inputValues: Record<string, any> = {
|
|
351
|
+
df: DG.DataFrame.fromColumns([
|
|
352
|
+
DG.Column.fromList('double', 'col', [1.1, 2.2, 3.3]),
|
|
353
|
+
]),
|
|
354
|
+
data: JSON.stringify({a: 1, b: 'test'}),
|
|
355
|
+
};
|
|
356
|
+
inputsMap['data'].value = inputValues['data'];
|
|
357
|
+
// TODO: test df input, not rly used rn
|
|
358
|
+
view.funcCall.setParamValue('df', inputValues['df']);
|
|
359
|
+
await delay(300);
|
|
360
|
+
await view.doRun();
|
|
361
|
+
expectDeepEqual(getFuncCallIO(view.funcCall), applyTransformations(fc1), {prefix: 'funcCall'});
|
|
362
|
+
expectDeepEqual(getFuncCallIO(view.lastCall!), applyTransformations(fc1), {prefix: 'lastCall'});
|
|
363
|
+
expectDeepEqual(inputsMap.data.value, inputValues.data, {prefix: 'data'});
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
category('Compute API: RFV Validation', async () => {
|
|
368
|
+
before(async () => {
|
|
369
|
+
await initComputeApi();
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
test('Validate on start', async () => {
|
|
373
|
+
const view = createRFV('Compute:validationTest', {historyEnabled: false, isTabbed: false});
|
|
374
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
375
|
+
await delay(1500);
|
|
376
|
+
const results = view.getValidationState();
|
|
377
|
+
expectDeepEqual(
|
|
378
|
+
results,
|
|
379
|
+
{
|
|
380
|
+
'a': {
|
|
381
|
+
'errors': [
|
|
382
|
+
{
|
|
383
|
+
'description': 'Missing value',
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
'description': 'Out of range [1, 10] value: null',
|
|
387
|
+
},
|
|
388
|
+
],
|
|
389
|
+
'warnings': [],
|
|
390
|
+
'notifications': [],
|
|
391
|
+
'revalidate': [],
|
|
392
|
+
'context': {},
|
|
393
|
+
},
|
|
394
|
+
'b': {
|
|
395
|
+
'errors': [
|
|
396
|
+
{
|
|
397
|
+
'description': 'Missing value',
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
'description': 'Out of range [20, 100] value: null',
|
|
401
|
+
},
|
|
402
|
+
],
|
|
403
|
+
'warnings': [],
|
|
404
|
+
'notifications': [],
|
|
405
|
+
'revalidate': [],
|
|
406
|
+
'context': {},
|
|
407
|
+
},
|
|
408
|
+
'x': {
|
|
409
|
+
'errors': [],
|
|
410
|
+
'warnings': [
|
|
411
|
+
{
|
|
412
|
+
'description': 'Try non-null value',
|
|
413
|
+
},
|
|
414
|
+
],
|
|
415
|
+
'notifications': [],
|
|
416
|
+
'revalidate': [],
|
|
417
|
+
'context': {},
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
);
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
test('Validate on input', async () => {
|
|
424
|
+
const view = createRFV('Compute:validationTest', {historyEnabled: false, isTabbed: false});
|
|
425
|
+
const inputValues: Record<string, any> = {
|
|
426
|
+
a: 2.3,
|
|
427
|
+
b: 3.2,
|
|
428
|
+
x: -1,
|
|
429
|
+
};
|
|
430
|
+
const inputsMap: Record<string, InputVariants> = {};
|
|
431
|
+
view.afterInputPropertyRender.subscribe(({prop, input}) => {
|
|
432
|
+
inputsMap[prop.name] = input;
|
|
433
|
+
});
|
|
434
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
435
|
+
await delay(1500);
|
|
436
|
+
for (const [name, input] of Object.entries(inputsMap)) {
|
|
437
|
+
input.value = inputValues[name];
|
|
438
|
+
const element = (input as any).input;
|
|
439
|
+
element.dispatchEvent(new Event('input', {bubbles: true}));
|
|
440
|
+
}
|
|
441
|
+
await delay(400);
|
|
442
|
+
|
|
443
|
+
const results = view.getValidationState();
|
|
444
|
+
expectDeepEqual(
|
|
445
|
+
results,
|
|
446
|
+
{
|
|
447
|
+
'b': {
|
|
448
|
+
'errors': [
|
|
449
|
+
{
|
|
450
|
+
'description': 'Out of range [20, 100] value: 3.2',
|
|
451
|
+
},
|
|
452
|
+
],
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
);
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
test('Revalidation sequence', async () => {
|
|
459
|
+
const view = createRFV('Compute:globalValidationTest', {historyEnabled: false, isTabbed: false});
|
|
460
|
+
const inputValues: Record<string, any> = {
|
|
461
|
+
a: 30,
|
|
462
|
+
b: 40,
|
|
463
|
+
c: 50,
|
|
464
|
+
};
|
|
465
|
+
const inputsMap: Record<string, InputVariants> = {};
|
|
466
|
+
view.afterInputPropertyRender.subscribe(({prop, input}) => {
|
|
467
|
+
inputsMap[prop.name] = input;
|
|
468
|
+
});
|
|
469
|
+
await view.isReady.pipe(filter((x) => x), take(1)).toPromise();
|
|
470
|
+
await delay(1500);
|
|
471
|
+
for (const [name, input] of Object.entries(inputsMap)) {
|
|
472
|
+
input.value = inputValues[name];
|
|
473
|
+
const element = (input as any).input;
|
|
474
|
+
element.dispatchEvent(new Event('input', {bubbles: true}));
|
|
475
|
+
}
|
|
476
|
+
await delay(1000);
|
|
477
|
+
const results = view.getValidationState();
|
|
478
|
+
expectDeepEqual(
|
|
479
|
+
results,
|
|
480
|
+
{
|
|
481
|
+
'a': {
|
|
482
|
+
'revalidate': [
|
|
483
|
+
'b',
|
|
484
|
+
'c',
|
|
485
|
+
],
|
|
486
|
+
'context': {
|
|
487
|
+
'isOk': false,
|
|
488
|
+
},
|
|
489
|
+
'warnings': [
|
|
490
|
+
{
|
|
491
|
+
'description': 'Try lowering a value',
|
|
492
|
+
},
|
|
493
|
+
],
|
|
494
|
+
},
|
|
495
|
+
'b': {
|
|
496
|
+
'warnings': [
|
|
497
|
+
{
|
|
498
|
+
'description': 'Try lowering a value as well',
|
|
499
|
+
},
|
|
500
|
+
],
|
|
501
|
+
},
|
|
502
|
+
'c': {
|
|
503
|
+
'warnings': [
|
|
504
|
+
{
|
|
505
|
+
'description': 'Try lowering a value as well',
|
|
506
|
+
},
|
|
507
|
+
],
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
);
|
|
511
|
+
});
|
|
512
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":[["df",{"_DG_CUSTOM_SERIALIZED_TOKEN_":"DataFrame","value":"KaAAAAAAAAAIQAAAAAAAAPA/A6EAAAAAAAAUQGRmb3V0KqABAAAAA6EAAAAAAAAIQC5pZAOhAAAAAAAAQkBlNDk0MWE2MC05YjAwLTExZWYtY2JjMC1jOTUzNzQ3OGNkZTcooAOhAAAAAAAACEBjb2wDoQAAAAAAABhAZG91YmxlKqACAAAAA6EAAAAAAAAIQC5pZAOhAAAAAAAAQkBlNDRhOGU0MC05YjAwLTExZWYtZDA4ZC0yM2QxNzBmZGJiY2IDoQAAAAAAADxALnNlbWFudGljLWRldGVjdGlvbi1kdXJhdGlvbgOhAAAAAAAA8D8zBQAAAAEAAAACoQAAAAAAAAhAzcyMP83MDEAzM1NAA6EAAAAAAFCDQHsiI3R5cGUiOiJUYWJsZXNCbG9iIiwidmVyc2lvbiI6IjAuNi4wLTMwYTc1NjlkIiwidGFibGVzIjpbeyJjb2x1bW5zIjpbeyJuYW1lIjoiY29sIiwidHlwZSI6ImRvdWJsZSIsImlkIjoiZTQ0YThlNDAtOWIwMC0xMWVmLWQwOGQtMjNkMTcwZmRiYmNiIiwiZnJpZW5kbHlOYW1lIjoiQ29sIiwiZW50aXR5VGFncyI6W3sidGFnIjoiLmlkIiwiaWQiOiJlNGVlZTQ5MC05YjAwLTExZWYtZGNhZi1iM2JlNTZkYWFiMjEifSx7InRhZyI6Ii5zZW1hbnRpYy1kZXRlY3Rpb24tZHVyYXRpb24iLCJpZCI6ImU0ZWVlNDkwLTliMDAtMTFlZi1kZmM2LWM5ODIzZjZmZWMyYSJ9XSwibWV0YVBhcmFtcyI6eyIuaWQiOiJlNDRhOGU0MC05YjAwLTExZWYtZDA4ZC0yM2QxNzBmZGJiY2IiLCIuc2VtYW50aWMtZGV0ZWN0aW9uLWR1cmF0aW9uIjoiMyJ9fV0sInJvd0NvdW50IjozLCJjb2xDb3VudCI6MSwiaWQiOiJlNDk0MWE2MC05YjAwLTExZWYtY2JjMC1jOTUzNzQ3OGNkZTciLCJuYW1lIjoiRGZvdXQiLCJmcmllbmRseU5hbWUiOiJkZm91dCIsImVudGl0eVRhZ3MiOlt7InRhZyI6Ii5pZCIsImlkIjoiZTRlZWU0OTAtOWIwMC0xMWVmLWY1YzMtYjVlNTEyZTlkMDQ1In1dLCJtZXRhUGFyYW1zIjp7fX1dfQihAAAAAAAA8D8AAAAACKEAAAAAAADwP2IAAAADoQAAAAAAACxAMC42LjAtMzBhNzU2OWSoAgAA"}],["data","{\"a\":1,\"b\":\"test\"}"]],"outputs":[["dfout",{"_DG_CUSTOM_SERIALIZED_TOKEN_":"DataFrame","value":"KaAAAAAAAAAIQAAAAAAAAPA/A6EAAAAAAAAUQGRmb3V0KqABAAAAA6EAAAAAAAAIQC5pZAOhAAAAAAAAQkBlNDU5MGQzMC05YjAwLTExZWYtYmM0Mi1iYmZhMDBhYzUxM2IooAOhAAAAAAAACEBjb2wDoQAAAAAAABhAZG91YmxlKqACAAAAA6EAAAAAAAAIQC5pZAOhAAAAAAAAQkBlNDRhOGU0MC05YjAwLTExZWYtZDA4ZC0yM2QxNzBmZGJiY2IDoQAAAAAAADxALnNlbWFudGljLWRldGVjdGlvbi1kdXJhdGlvbgOhAAAAAAAA8D8zBQAAAAEAAAACoQAAAAAAAAhAzcyMP83MDEAzM1NAA6EAAAAAAFCDQHsiI3R5cGUiOiJUYWJsZXNCbG9iIiwidmVyc2lvbiI6IjAuNi4wLTMwYTc1NjlkIiwidGFibGVzIjpbeyJjb2x1bW5zIjpbeyJuYW1lIjoiY29sIiwidHlwZSI6ImRvdWJsZSIsImlkIjoiZTQ0YThlNDAtOWIwMC0xMWVmLWQwOGQtMjNkMTcwZmRiYmNiIiwiZnJpZW5kbHlOYW1lIjoiQ29sIiwiZW50aXR5VGFncyI6W3sidGFnIjoiLmlkIiwiaWQiOiJlNGVmMGJhMC05YjAwLTExZWYtOTEwZC02OTA2ZDYxM2FjMDEifSx7InRhZyI6Ii5zZW1hbnRpYy1kZXRlY3Rpb24tZHVyYXRpb24iLCJpZCI6ImU0ZWYzMmIwLTliMDAtMTFlZi1iZmUxLTBkYmZmMzQxYTRmZiJ9XSwibWV0YVBhcmFtcyI6eyIuaWQiOiJlNDRhOGU0MC05YjAwLTExZWYtZDA4ZC0yM2QxNzBmZGJiY2IiLCIuc2VtYW50aWMtZGV0ZWN0aW9uLWR1cmF0aW9uIjoiMyJ9fV0sInJvd0NvdW50IjozLCJjb2xDb3VudCI6MSwiaWQiOiJlNDU5MGQzMC05YjAwLTExZWYtYmM0Mi1iYmZhMDBhYzUxM2IiLCJuYW1lIjoiRGZvdXQiLCJmcmllbmRseU5hbWUiOiJkZm91dCIsImVudGl0eVRhZ3MiOlt7InRhZyI6Ii5pZCIsImlkIjoiZTRlZjMyYjAtOWIwMC0xMWVmLTkzZDAtNmI4MjEwMDE4OTFhIn1dLCJtZXRhUGFyYW1zIjp7fX1dfQihAAAAAAAA8D8AAAAACKEAAAAAAADwP2IAAAADoQAAAAAAACxAMC42LjAtMzBhNzU2OWSoAgAA"}],["dataout","{\"a\":1,\"b\":\"test\"}"]]}
|
package/tsconfig.json
CHANGED
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
// "types": [], /* Type declaration files to be included in compilation. */
|
|
52
52
|
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
53
53
|
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
54
|
+
"resolveJsonModule": true, /* Allow importing JSON modules. */
|
|
54
55
|
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
55
56
|
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
56
57
|
|
package/dist/148.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var compute;(()=>{"use strict";var t,e,n={241:(t,e,n)=>{n.d(e,{t:()=>i});var o=function(t,e,n,o){return new(n||(n=Promise))(function(a,r){function i(t){try{s(o.next(t))}catch(t){r(t)}}function l(t){try{s(o.throw(t))}catch(t){r(t)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(i,l)}s((o=o.apply(t,e||[])).next())})};function a(t,e,n,o){for(let a=0;a<e;a++){let r=0;for(let t=0;t<e+1;t++)t!=n&&(r+=o[t][a]);t[a]=r/e}}function r(t,e,n,o,a,r){for(let i=0;i<r;i++)e[i]=t[i],e[i]+=a*(t[i]-o[n][i])}new Map([["tolerance",{default:1e-6,min:1e-20,max:.1,caption:"tolerance",tooltipText:"How precise the result should be. Lower value = more accurate result, but longer computation",inputType:"Float"}],["maxIter",{default:50,min:1,max:1e4,caption:"max iterations",tooltipText:"Maximum number of iterations. Higher = better fit",inputType:"Int"}],["nonZeroParam",{default:1e-4,min:1e-20,max:.1,caption:"non-zero param",tooltipText:"Minimum parameter value (to avoid zero values)",inputType:"Float"}],["initialScale",{default:.02,min:1e-20,max:.1,caption:"initial scale",tooltipText:"Size of the initial search area. Higher value = wider search area",inputType:"Float"}],["scaleReflaction",{default:1,min:1,max:2,caption:"scale reflection",tooltipText:"How far the algorithm 'bounces back' from failed attempts",inputType:"Float"}],["scaleExpansion",{default:2,min:1,max:2,caption:"scale expansion",tooltipText:"How much the algorithm expands search in a promising direction",inputType:"Float"}],["scaleContraction",{default:-.5,min:-.5,max:0,caption:"scale contraction",tooltipText:"How much the algorithm narrows the search area when approaching the result",inputType:"Float"}]]);const i=function(t,e,n,i){return o(this,void 0,void 0,function*(){var l,s,c,u;const f=n.get("tolerance"),p=n.get("maxIter"),m=n.get("scaleReflaction"),E=n.get("scaleExpansion"),I=n.get("scaleContraction"),h=e.length+1,T=e.length,A=2*(null!==(l=yield t(e))&&void 0!==l?l:1/0),[d,S]=yield function(t,e,n,a){return o(this,void 0,void 0,function*(){var o;const r=n.length+1,i=n.length,l=e.get("nonZeroParam"),s=e.get("initialScale"),c=new Array(r),u=new Array(r);for(let e=0;e<r;e++){c[e]=new Float64Array(i);for(let t=0;t<i;t++)c[e][t]=n[t],0!=e&&e-1===t&&(0==n[t]?c[e][t]=l:c[e][t]+=s*n[e-1]);u[e]=null!==(o=yield t(c[e]))&&void 0!==o?o:a}return[c,u]})}(t,n,e,A),g=new Array(h);for(let t=0;t<h;t++)g[t]=t;const L=g.length-1;let _=0,v=0,M=0,R=0;const O=new Float64Array(T),y=new Float64Array(T),w=new Float64Array(T),D=new Float64Array(T),x=new Array(p);if(h>1){for(;g.sort((t,e)=>S[t]-S[e]),!(_>p);){if(0==_&&(v=S[0],M=2*S[g[0]]),x[_]=v,++_,v=S[g[0]],M-v>f)R=0;else if(++R,R>2*h)break;if(null!=i&&v<=i)break;M=v,a(O,T,g[L],d),r(O,y,g[L],d,m,T);const e=null!==(s=yield t(y))&&void 0!==s?s:A;if(e<S[g[L]]){r(O,w,g[L],d,E,T);const n=null!==(c=yield t(w))&&void 0!==c?c:A;if(n<e){S[g[L]]=n;for(let t=0;t<T;t++)d[g[L]][t]=w[t];continue}S[g[L]]=e;for(let t=0;t<T;t++)d[g[L]][t]=y[t];continue}r(O,D,g[L],d,I,T);const n=null!==(u=yield t(D))&&void 0!==u?u:A;if(!(n<S[g[L]]))break;S[g[L]]=n;for(let t=0;t<T;t++)d[g[L]][t]=D[t]}for(let t=_;t<p;t++)x[t]=S[g[0]]}return{point:d[g[0]],cost:S[g[0]],iterCosts:x,iterCount:_-1}})}},4204:(t,e,n)=>{var o,a,r,i,l,s,c,u,f,p;n.d(e,{YI:()=>a,_z:()=>m,eJ:()=>E}),function(t){t.NELDER_MEAD="Nelder-Mead",t.GRAD_DESC="Gradient descent"}(o||(o={})),new Map([[o.NELDER_MEAD,"The Nelder-Mead method"],[o.GRAD_DESC,"The gradient descent method"]]),function(t){t.MAD="MAD",t.RMSE="RMSE"}(a||(a={})),new Map([[a.MAD,"Maximum Absolute Deviation (MAD) - measures only the single largest deviation, ignoring smaller deviations"],[a.RMSE,"Root Mean Square Error (RMSE) - measures average deviation, penalizing larger deviations more heavily"]]),function(t){t[t.LOSS_COL_WIDTH=60]="LOSS_COL_WIDTH",t[t.ROW_HEIGHT=280]="ROW_HEIGHT",t[t.LOSS_GRAPH_WIDTH=320]="LOSS_GRAPH_WIDTH",t[t.GOF_VIEWER_WIDTH=320]="GOF_VIEWER_WIDTH",t[t.RADAR_WIDTH=280]="RADAR_WIDTH",t[t.BAR_HEIGHT=100]="BAR_HEIGHT"}(r||(r={})),function(t){t.ITER="Iteration",t.LOSS="Loss",t.LOSS_GRAPH="Fitting profile",t.TARGET="Target",t.FIT="Fit",t.METHOD="method",t.VALUE="Value",t.OBJECTIVE="Target",t.SAMPLES="initial points",t.ID="id",t.OBTAINED="Simulation",t.LOSS_LOW="loss",t.SIMILARITY="similarity"}(i||(i={})),function(t){t.GOAL="`Goal`",t.FIT="`Fit`",t.MIN="`min`",t.MAX="`max`",t.TARGET="`Target`",t.METHOD="`method`",t.CONTEXT="`Context Panel (F4)`",t.SAMPLES="`initial points`",t.LOSS="`loss`",t.SIMILARITY="`similarity`"}(l||(l={})),function(t){t[t.MS_TO_SLEEP=5]="MS_TO_SLEEP",t[t.STYLE_TIMEOUT=3e3]="STYLE_TIMEOUT",t[t.RADAR=200]="RADAR"}(s||(s={})),function(t){t[t.SIMILARITY_MIN=0]="SIMILARITY_MIN",t[t.SIMILARITY_MAX=100]="SIMILARITY_MAX",t[t.SIMILARITY_DEFAULT=10]="SIMILARITY_DEFAULT",t[t.SAMPLES=10]="SAMPLES"}(c||(c={})),function(t){t[t.SINGLE_VAL=0]="SINGLE_VAL",t[t.SINGLE_CAT=1]="SINGLE_CAT",t[t.DOUBLE_VAL1=0]="DOUBLE_VAL1",t[t.DOUBLE_VAL2=1]="DOUBLE_VAL2",t[t.DOUBLE_CAT=2]="DOUBLE_CAT",t[t.DIFF_STUDIO_OUTPUT=0]="DIFF_STUDIO_OUTPUT",t[t.SCALAR_VALS_COL=1]="SCALAR_VALS_COL",t[t.OLIVE=8]="OLIVE",t[t.LIGHT_OLIVE=16]="LIGHT_OLIVE",t[t.GREY=7]="GREY",t[t.LIGHT_GREY=15]="LIGHT_GREY",t[t.BLUE=0]="BLUE",t[t.ORANGE=1]="ORANGE"}(u||(u={})),function(t){t.CATEGORY="__Category__",t.SIZE="__Size__",t.SIMULATION="Simulation",t.TARGET="Target",t.SCALARS="Scalars",t.NULL="Null"}(f||(f={})),function(t){t[t.LINE_CHART_LINE_WIDTH=2]="LINE_CHART_LINE_WIDTH",t[t.SIMULATION=1]="SIMULATION",t[t.TARGET=2]="TARGET",t[t.MIN_MARKER=1]="MIN_MARKER",t[t.MAX_MARKER=7]="MAX_MARKER",t[t.LIGHTER_PERC=50]="LIGHTER_PERC"}(p||(p={}));const m=1e-5,E=1},5925:(t,e,n)=>{n.d(e,{Uj:()=>f});var o=n(508),a=n(241),r=n(8384),i=n(4204),l=function(t,e,n,o){return new(n||(n=Promise))(function(a,r){function i(t){try{s(o.next(t))}catch(t){r(t)}}function l(t){try{s(o.throw(t))}catch(t){r(t)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(i,l)}s((o=o.apply(t,e||[])).next())})};function s(t,e){const n=e.length,o=Math.min(t.length,n),a=new Uint32Array(o);let r=0,i=0,l=0;for(let s=0;s<o;++s){for(;;){if(i=Math.abs(e[r]-t[s]),++r,!(r<n)){--r;break}if(l=Math.abs(e[r]-t[s]),l>i){--r;break}i=l}a[s]=r}return a}function c(t,e,n,o,a){let r=0;const i=n.length;let l=0;const c=s(t,o),u=c.length;for(let t=0;t<i;++t){l=0;for(let n=0;n<u;++n)l=Math.max(l,Math.abs(e[t][n]-a[t][c[n]]));r=Math.max(r,l/n[t])}return r}function u(t,e,n,o,a){let r=0;const i=n.length;let l=0,c=0,u=0;const f=s(t,o),p=f.length;for(let t=0;t<i;++t){l=n[t],c=0;for(let n=0;n<p;++n)c+=Math.pow((e[t][n]-a[t][f[n]])/l,2),++u;r+=c}return Math.sqrt(r/u)}function f(t,e){return l(this,void 0,void 0,function*(){var n;const s=t.ivp2ww,f=t.pipeline,p=r.Zg+s.deqsCount+s.paramNames.length,m=new Float64Array(p),E=t.nonParamNames.concat(s.paramNames),I=t.outputNames;let h=0,T=0;for(const n of E)T=t.fixedInputsNames.indexOf(n),T>-1?m[h]=t.fixedInputsVals[T]:(T=t.variedInputNames.indexOf(n),m[h]=e[T]),++h;const A=t.variedInputNames.map(t=>E.indexOf(t)),d=t.targetNames.slice(1).map(t=>{const e=I.indexOf(t);if(e<0)throw new Error(`Inconsistent target dataframe: no ${t} column in the model's output.`);return e}),S=e.length,g=t.targetVals[0],L=t.targetVals.slice(1),_=t.scaleVals.slice(1),v=t.loss==i.YI.MAD?c:u;let M;const R=t=>l(this,void 0,void 0,function*(){for(let e=0;e<S;++e)m[A[e]]=t[e];return M=(0,o.V)(f,s,m),v(g,L,_,M[r.Wt],d.map(t=>M[t]))}),O=new Float64Array(S);for(let e=0;e<S;++e)O[e]=t.variedInpMin[e]+Math.random()*(t.variedInpMax[e]-t.variedInpMin[e]);R(O);const y=new Map(t.settingNames.map((e,n)=>[e,t.settingVals[n]])),w=t.earlyStoppingSettings.useEarlyStopping?null!==(n=t.earlyStoppingSettings.costFuncThreshold)&&void 0!==n?n:i._z:void 0;return yield(0,a.t)(R,e,y,w)})}},7148:(t,e,n)=>{var o=n(5925),a=n(8384),r=n(4204);onmessage=function(t){return e=this,n=void 0,l=function*(){var e,n;try{const i=t.data.task,l=t.data.startPoints,s=l.length,c=new Array(s),u=[];let f=0;const p=i.earlyStoppingSettings.useEarlyStopping,m=null!==(e=i.earlyStoppingSettings.stopAfter)&&void 0!==e?e:r.eJ,E=null!==(n=i.earlyStoppingSettings.costFuncThreshold)&&void 0!==n?n:r._z;for(let t=0;t<s;++t)try{const e=yield(0,o.Uj)(i,l[t]);if(u.push(e),c[t]=a.Un,p&&e.cost<=E&&(++f,f>=m))break}catch(e){c[t]=e instanceof Error?e.message:"Platform issue: in-webworker optimization failed"}postMessage({callResult:a.OW.SUCCEED,extremums:u,fitRes:c})}catch(t){postMessage({callResult:a.OW.FAILED,msg:t instanceof Error?t.message:"Platform issue: in-webworker optimization failed"})}},new((i=void 0)||(i=Promise))(function(t,o){function a(t){try{s(l.next(t))}catch(t){o(t)}}function r(t){try{s(l.throw(t))}catch(t){o(t)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof i?n:new i(function(t){t(n)})).then(a,r)}s((l=l.apply(e,n||[])).next())});var e,n,i,l}},8384:(t,e,n)=>{n.d(e,{OW:()=>i,Un:()=>o,Wt:()=>r,Zg:()=>a});const o="Success",a=3,r=0;var i;!function(t){t[t.SUCCEED=0]="SUCCEED",t[t.FAILED=1]="FAILED"}(i||(i={}))}},o={};function a(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return n[t](r,r.exports,a),r.exports}a.m=n,a.x=()=>{var t=a.O(void 0,[508],()=>a(7148));return a.O(t)},t=[],a.O=(e,n,o,r)=>{if(!n){var i=1/0;for(u=0;u<t.length;u++){for(var[n,o,r]=t[u],l=!0,s=0;s<n.length;s++)(!1&r||i>=r)&&Object.keys(a.O).every(t=>a.O[t](n[s]))?n.splice(s--,1):(l=!1,r<i&&(i=r));if(l){t.splice(u--,1);var c=o();void 0!==c&&(e=c)}}return e}r=r||0;for(var u=t.length;u>0&&t[u-1][2]>r;u--)t[u]=t[u-1];t[u]=[n,o,r]},a.d=(t,e)=>{for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce((e,n)=>(a.f[n](t,e),e),[])),a.u=t=>t+".js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=n[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),(()=>{var t={148:1};a.f.i=(e,n)=>{t[e]||importScripts(a.p+a.u(e))};var e=self.webpackChunkcompute=self.webpackChunkcompute||[],n=e.push.bind(e);e.push=e=>{var[o,r,i]=e;for(var l in r)a.o(r,l)&&(a.m[l]=r[l]);for(i&&i(a);o.length;)t[o.pop()]=1;n(e)}})(),e=a.x,a.x=()=>a.e(508).then(e);var r=a.x();compute=r})();
|
|
2
|
-
//# sourceMappingURL=148.js.map
|