oro-sdk 3.1.2 → 3.3.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/LICENSE +21 -0
- package/dist/helpers/patient-registration.d.ts +17 -1
- package/dist/oro-sdk.cjs.development.js +1154 -610
- package/dist/oro-sdk.cjs.development.js.map +1 -1
- package/dist/oro-sdk.cjs.production.min.js +1 -1
- package/dist/oro-sdk.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk.esm.js +1153 -611
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/helpers/patient-registration.ts +97 -0
|
@@ -9,612 +9,1029 @@ var initApis__default = _interopDefault(initApis);
|
|
|
9
9
|
var oroToolbox = require('oro-toolbox');
|
|
10
10
|
var idbKeyval = require('idb-keyval');
|
|
11
11
|
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function _wrapRegExp() {
|
|
13
|
+
_wrapRegExp = function (re, groups) {
|
|
14
|
+
return new BabelRegExp(re, void 0, groups);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var _super = RegExp.prototype,
|
|
18
|
+
_groups = new WeakMap();
|
|
19
|
+
|
|
20
|
+
function BabelRegExp(re, flags, groups) {
|
|
21
|
+
var _this = new RegExp(re, flags);
|
|
22
|
+
|
|
23
|
+
return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function buildGroups(result, re) {
|
|
27
|
+
var g = _groups.get(re);
|
|
28
|
+
|
|
29
|
+
return Object.keys(g).reduce(function (groups, name) {
|
|
30
|
+
return groups[name] = result[g[name]], groups;
|
|
31
|
+
}, Object.create(null));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
|
|
35
|
+
var result = _super.exec.call(this, str);
|
|
36
|
+
|
|
37
|
+
return result && (result.groups = buildGroups(result, this)), result;
|
|
38
|
+
}, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
|
|
39
|
+
if ("string" == typeof substitution) {
|
|
40
|
+
var groups = _groups.get(this);
|
|
41
|
+
|
|
42
|
+
return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
|
|
43
|
+
return "$" + groups[name];
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if ("function" == typeof substitution) {
|
|
48
|
+
var _this = this;
|
|
49
|
+
|
|
50
|
+
return _super[Symbol.replace].call(this, str, function () {
|
|
51
|
+
var args = arguments;
|
|
52
|
+
return "object" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return _super[Symbol.replace].call(this, str, substitution);
|
|
57
|
+
}, _wrapRegExp.apply(this, arguments);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
61
|
+
try {
|
|
62
|
+
var info = gen[key](arg);
|
|
63
|
+
var value = info.value;
|
|
64
|
+
} catch (error) {
|
|
65
|
+
reject(error);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (info.done) {
|
|
70
|
+
resolve(value);
|
|
71
|
+
} else {
|
|
72
|
+
Promise.resolve(value).then(_next, _throw);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
14
75
|
|
|
15
|
-
|
|
16
|
-
|
|
76
|
+
function _asyncToGenerator(fn) {
|
|
77
|
+
return function () {
|
|
78
|
+
var self = this,
|
|
79
|
+
args = arguments;
|
|
80
|
+
return new Promise(function (resolve, reject) {
|
|
81
|
+
var gen = fn.apply(self, args);
|
|
82
|
+
|
|
83
|
+
function _next(value) {
|
|
84
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function _throw(err) {
|
|
88
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
_next(undefined);
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function _extends() {
|
|
97
|
+
_extends = Object.assign || function (target) {
|
|
98
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
99
|
+
var source = arguments[i];
|
|
100
|
+
|
|
101
|
+
for (var key in source) {
|
|
102
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
103
|
+
target[key] = source[key];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return target;
|
|
17
109
|
};
|
|
18
110
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
111
|
+
return _extends.apply(this, arguments);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function _inherits(subClass, superClass) {
|
|
115
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
116
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
120
|
+
constructor: {
|
|
121
|
+
value: subClass,
|
|
122
|
+
writable: true,
|
|
123
|
+
configurable: true
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(subClass, "prototype", {
|
|
127
|
+
writable: false
|
|
128
|
+
});
|
|
129
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function _inheritsLoose(subClass, superClass) {
|
|
133
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
134
|
+
subClass.prototype.constructor = subClass;
|
|
135
|
+
|
|
136
|
+
_setPrototypeOf(subClass, superClass);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function _getPrototypeOf(o) {
|
|
140
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
141
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
142
|
+
};
|
|
143
|
+
return _getPrototypeOf(o);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function _setPrototypeOf(o, p) {
|
|
147
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
148
|
+
o.__proto__ = p;
|
|
149
|
+
return o;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
return _setPrototypeOf(o, p);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function _isNativeReflectConstruct() {
|
|
156
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
157
|
+
if (Reflect.construct.sham) return false;
|
|
158
|
+
if (typeof Proxy === "function") return true;
|
|
159
|
+
|
|
160
|
+
try {
|
|
161
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
162
|
+
return true;
|
|
163
|
+
} catch (e) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function _construct(Parent, args, Class) {
|
|
169
|
+
if (_isNativeReflectConstruct()) {
|
|
170
|
+
_construct = Reflect.construct;
|
|
171
|
+
} else {
|
|
172
|
+
_construct = function _construct(Parent, args, Class) {
|
|
173
|
+
var a = [null];
|
|
174
|
+
a.push.apply(a, args);
|
|
175
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
176
|
+
var instance = new Constructor();
|
|
177
|
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
178
|
+
return instance;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return _construct.apply(null, arguments);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function _isNativeFunction(fn) {
|
|
186
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function _wrapNativeSuper(Class) {
|
|
190
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
191
|
+
|
|
192
|
+
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
193
|
+
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
194
|
+
|
|
195
|
+
if (typeof Class !== "function") {
|
|
196
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (typeof _cache !== "undefined") {
|
|
200
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
201
|
+
|
|
202
|
+
_cache.set(Class, Wrapper);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function Wrapper() {
|
|
206
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
|
210
|
+
constructor: {
|
|
211
|
+
value: Wrapper,
|
|
212
|
+
enumerable: false,
|
|
213
|
+
writable: true,
|
|
214
|
+
configurable: true
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
return _setPrototypeOf(Wrapper, Class);
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
return _wrapNativeSuper(Class);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
224
|
+
if (source == null) return {};
|
|
225
|
+
var target = {};
|
|
226
|
+
var sourceKeys = Object.keys(source);
|
|
227
|
+
var key, i;
|
|
228
|
+
|
|
229
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
230
|
+
key = sourceKeys[i];
|
|
231
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
232
|
+
target[key] = source[key];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
return target;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
239
|
+
if (!o) return;
|
|
240
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
241
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
242
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
243
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
244
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function _arrayLikeToArray(arr, len) {
|
|
248
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
249
|
+
|
|
250
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
251
|
+
|
|
252
|
+
return arr2;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
256
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
257
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
258
|
+
|
|
259
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
260
|
+
if (it) o = it;
|
|
261
|
+
var i = 0;
|
|
262
|
+
return function () {
|
|
263
|
+
if (i >= o.length) return {
|
|
264
|
+
done: true
|
|
265
|
+
};
|
|
266
|
+
return {
|
|
267
|
+
done: false,
|
|
268
|
+
value: o[i++]
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
function createCommonjsModule(fn, module) {
|
|
277
|
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
var runtime_1 = createCommonjsModule(function (module) {
|
|
281
|
+
/**
|
|
282
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the MIT license found in the
|
|
285
|
+
* LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
var runtime = (function (exports) {
|
|
289
|
+
|
|
290
|
+
var Op = Object.prototype;
|
|
291
|
+
var hasOwn = Op.hasOwnProperty;
|
|
292
|
+
var undefined$1; // More compressible than void 0.
|
|
293
|
+
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
294
|
+
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
295
|
+
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
296
|
+
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
26
297
|
|
|
27
298
|
function define(obj, key, value) {
|
|
28
|
-
|
|
299
|
+
Object.defineProperty(obj, key, {
|
|
29
300
|
value: value,
|
|
30
|
-
enumerable:
|
|
31
|
-
configurable:
|
|
32
|
-
writable:
|
|
33
|
-
})
|
|
301
|
+
enumerable: true,
|
|
302
|
+
configurable: true,
|
|
303
|
+
writable: true
|
|
304
|
+
});
|
|
305
|
+
return obj[key];
|
|
34
306
|
}
|
|
35
|
-
|
|
36
307
|
try {
|
|
308
|
+
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
37
309
|
define({}, "");
|
|
38
310
|
} catch (err) {
|
|
39
|
-
define = function
|
|
311
|
+
define = function(obj, key, value) {
|
|
40
312
|
return obj[key] = value;
|
|
41
313
|
};
|
|
42
314
|
}
|
|
43
315
|
|
|
44
316
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
var state = "suspendedStart";
|
|
50
|
-
return function (method, arg) {
|
|
51
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
52
|
-
|
|
53
|
-
if ("completed" === state) {
|
|
54
|
-
if ("throw" === method) throw arg;
|
|
55
|
-
return doneResult();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
for (context.method = method, context.arg = arg;;) {
|
|
59
|
-
var delegate = context.delegate;
|
|
60
|
-
|
|
61
|
-
if (delegate) {
|
|
62
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
317
|
+
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
318
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
319
|
+
var generator = Object.create(protoGenerator.prototype);
|
|
320
|
+
var context = new Context(tryLocsList || []);
|
|
63
321
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
71
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
72
|
-
context.dispatchException(context.arg);
|
|
73
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
74
|
-
state = "executing";
|
|
75
|
-
var record = tryCatch(innerFn, self, context);
|
|
76
|
-
|
|
77
|
-
if ("normal" === record.type) {
|
|
78
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
79
|
-
return {
|
|
80
|
-
value: record.arg,
|
|
81
|
-
done: context.done
|
|
82
|
-
};
|
|
83
|
-
}
|
|
322
|
+
// The ._invoke method unifies the implementations of the .next,
|
|
323
|
+
// .throw, and .return methods.
|
|
324
|
+
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
84
325
|
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
}(innerFn, self, context), generator;
|
|
326
|
+
return generator;
|
|
89
327
|
}
|
|
328
|
+
exports.wrap = wrap;
|
|
90
329
|
|
|
330
|
+
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
331
|
+
// record like context.tryEntries[i].completion. This interface could
|
|
332
|
+
// have been (and was previously) designed to take a closure to be
|
|
333
|
+
// invoked without arguments, but in all the cases we care about we
|
|
334
|
+
// already have an existing method we want to call, so there's no need
|
|
335
|
+
// to create a new function object. We can even get away with assuming
|
|
336
|
+
// the method takes exactly one argument, since that happens to be true
|
|
337
|
+
// in every case, so we don't have to touch the arguments object. The
|
|
338
|
+
// only additional allocation required is the completion record, which
|
|
339
|
+
// has a stable shape and so hopefully should be cheap to allocate.
|
|
91
340
|
function tryCatch(fn, obj, arg) {
|
|
92
341
|
try {
|
|
93
|
-
return {
|
|
94
|
-
type: "normal",
|
|
95
|
-
arg: fn.call(obj, arg)
|
|
96
|
-
};
|
|
342
|
+
return { type: "normal", arg: fn.call(obj, arg) };
|
|
97
343
|
} catch (err) {
|
|
98
|
-
return {
|
|
99
|
-
type: "throw",
|
|
100
|
-
arg: err
|
|
101
|
-
};
|
|
344
|
+
return { type: "throw", arg: err };
|
|
102
345
|
}
|
|
103
346
|
}
|
|
104
347
|
|
|
105
|
-
|
|
348
|
+
var GenStateSuspendedStart = "suspendedStart";
|
|
349
|
+
var GenStateSuspendedYield = "suspendedYield";
|
|
350
|
+
var GenStateExecuting = "executing";
|
|
351
|
+
var GenStateCompleted = "completed";
|
|
352
|
+
|
|
353
|
+
// Returning this object from the innerFn has the same effect as
|
|
354
|
+
// breaking out of the dispatch switch statement.
|
|
106
355
|
var ContinueSentinel = {};
|
|
107
356
|
|
|
357
|
+
// Dummy constructor functions that we use as the .constructor and
|
|
358
|
+
// .constructor.prototype properties for functions that return Generator
|
|
359
|
+
// objects. For full spec compliance, you may wish to configure your
|
|
360
|
+
// minifier not to mangle the names of these two functions.
|
|
108
361
|
function Generator() {}
|
|
109
|
-
|
|
110
362
|
function GeneratorFunction() {}
|
|
111
|
-
|
|
112
363
|
function GeneratorFunctionPrototype() {}
|
|
113
364
|
|
|
365
|
+
// This is a polyfill for %IteratorPrototype% for environments that
|
|
366
|
+
// don't natively support it.
|
|
114
367
|
var IteratorPrototype = {};
|
|
115
368
|
define(IteratorPrototype, iteratorSymbol, function () {
|
|
116
369
|
return this;
|
|
117
370
|
});
|
|
118
|
-
var getProto = Object.getPrototypeOf,
|
|
119
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
120
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
121
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
122
371
|
|
|
372
|
+
var getProto = Object.getPrototypeOf;
|
|
373
|
+
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
374
|
+
if (NativeIteratorPrototype &&
|
|
375
|
+
NativeIteratorPrototype !== Op &&
|
|
376
|
+
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
377
|
+
// This environment has a native %IteratorPrototype%; use it instead
|
|
378
|
+
// of the polyfill.
|
|
379
|
+
IteratorPrototype = NativeIteratorPrototype;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
var Gp = GeneratorFunctionPrototype.prototype =
|
|
383
|
+
Generator.prototype = Object.create(IteratorPrototype);
|
|
384
|
+
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
385
|
+
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
386
|
+
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
387
|
+
GeneratorFunction.displayName = define(
|
|
388
|
+
GeneratorFunctionPrototype,
|
|
389
|
+
toStringTagSymbol,
|
|
390
|
+
"GeneratorFunction"
|
|
391
|
+
);
|
|
392
|
+
|
|
393
|
+
// Helper for defining the .next, .throw, and .return methods of the
|
|
394
|
+
// Iterator interface in terms of a single ._invoke method.
|
|
123
395
|
function defineIteratorMethods(prototype) {
|
|
124
|
-
["next", "throw", "return"].forEach(function
|
|
125
|
-
define(prototype, method, function
|
|
396
|
+
["next", "throw", "return"].forEach(function(method) {
|
|
397
|
+
define(prototype, method, function(arg) {
|
|
126
398
|
return this._invoke(method, arg);
|
|
127
399
|
});
|
|
128
400
|
});
|
|
129
401
|
}
|
|
130
402
|
|
|
403
|
+
exports.isGeneratorFunction = function(genFun) {
|
|
404
|
+
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
405
|
+
return ctor
|
|
406
|
+
? ctor === GeneratorFunction ||
|
|
407
|
+
// For the native GeneratorFunction constructor, the best we can
|
|
408
|
+
// do is to check its .name property.
|
|
409
|
+
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
410
|
+
: false;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
exports.mark = function(genFun) {
|
|
414
|
+
if (Object.setPrototypeOf) {
|
|
415
|
+
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
416
|
+
} else {
|
|
417
|
+
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
418
|
+
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
419
|
+
}
|
|
420
|
+
genFun.prototype = Object.create(Gp);
|
|
421
|
+
return genFun;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
// Within the body of any async function, `await x` is transformed to
|
|
425
|
+
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
426
|
+
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
427
|
+
// meant to be awaited.
|
|
428
|
+
exports.awrap = function(arg) {
|
|
429
|
+
return { __await: arg };
|
|
430
|
+
};
|
|
431
|
+
|
|
131
432
|
function AsyncIterator(generator, PromiseImpl) {
|
|
132
433
|
function invoke(method, arg, resolve, reject) {
|
|
133
434
|
var record = tryCatch(generator[method], generator, arg);
|
|
435
|
+
if (record.type === "throw") {
|
|
436
|
+
reject(record.arg);
|
|
437
|
+
} else {
|
|
438
|
+
var result = record.arg;
|
|
439
|
+
var value = result.value;
|
|
440
|
+
if (value &&
|
|
441
|
+
typeof value === "object" &&
|
|
442
|
+
hasOwn.call(value, "__await")) {
|
|
443
|
+
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
444
|
+
invoke("next", value, resolve, reject);
|
|
445
|
+
}, function(err) {
|
|
446
|
+
invoke("throw", err, resolve, reject);
|
|
447
|
+
});
|
|
448
|
+
}
|
|
134
449
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}, function (error) {
|
|
450
|
+
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
451
|
+
// When a yielded Promise is resolved, its final value becomes
|
|
452
|
+
// the .value of the Promise<{value,done}> result for the
|
|
453
|
+
// current iteration.
|
|
454
|
+
result.value = unwrapped;
|
|
455
|
+
resolve(result);
|
|
456
|
+
}, function(error) {
|
|
457
|
+
// If a rejected Promise was yielded, throw the rejection back
|
|
458
|
+
// into the async generator function so it can be handled there.
|
|
145
459
|
return invoke("throw", error, resolve, reject);
|
|
146
460
|
});
|
|
147
461
|
}
|
|
148
|
-
|
|
149
|
-
reject(record.arg);
|
|
150
462
|
}
|
|
151
463
|
|
|
152
464
|
var previousPromise;
|
|
153
465
|
|
|
154
|
-
|
|
466
|
+
function enqueue(method, arg) {
|
|
155
467
|
function callInvokeWithMethodAndArg() {
|
|
156
|
-
return new PromiseImpl(function
|
|
468
|
+
return new PromiseImpl(function(resolve, reject) {
|
|
157
469
|
invoke(method, arg, resolve, reject);
|
|
158
470
|
});
|
|
159
471
|
}
|
|
160
472
|
|
|
161
|
-
return previousPromise =
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
473
|
+
return previousPromise =
|
|
474
|
+
// If enqueue has been called before, then we want to wait until
|
|
475
|
+
// all previous Promises have been resolved before calling invoke,
|
|
476
|
+
// so that results are always delivered in the correct order. If
|
|
477
|
+
// enqueue has not been called before, then it is important to
|
|
478
|
+
// call invoke immediately, without waiting on a callback to fire,
|
|
479
|
+
// so that the async generator function has the opportunity to do
|
|
480
|
+
// any necessary setup in a predictable way. This predictability
|
|
481
|
+
// is why the Promise constructor synchronously invokes its
|
|
482
|
+
// executor callback, and why async functions synchronously
|
|
483
|
+
// execute code before the first await. Since we implement simple
|
|
484
|
+
// async functions in terms of async generators, it is especially
|
|
485
|
+
// important to get this right, even though it requires care.
|
|
486
|
+
previousPromise ? previousPromise.then(
|
|
487
|
+
callInvokeWithMethodAndArg,
|
|
488
|
+
// Avoid propagating failures to Promises returned by later
|
|
489
|
+
// invocations of the iterator.
|
|
490
|
+
callInvokeWithMethodAndArg
|
|
491
|
+
) : callInvokeWithMethodAndArg();
|
|
175
492
|
}
|
|
176
493
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function pushTryEntry(locs) {
|
|
184
|
-
var entry = {
|
|
185
|
-
tryLoc: locs[0]
|
|
186
|
-
};
|
|
187
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function resetTryEntry(entry) {
|
|
191
|
-
var record = entry.completion || {};
|
|
192
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
494
|
+
// Define the unified helper method that is used to implement .next,
|
|
495
|
+
// .throw, and .return (see defineIteratorMethods).
|
|
496
|
+
this._invoke = enqueue;
|
|
193
497
|
}
|
|
194
498
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
499
|
+
defineIteratorMethods(AsyncIterator.prototype);
|
|
500
|
+
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
501
|
+
return this;
|
|
502
|
+
});
|
|
503
|
+
exports.AsyncIterator = AsyncIterator;
|
|
504
|
+
|
|
505
|
+
// Note that simple async functions are implemented on top of
|
|
506
|
+
// AsyncIterator objects; they just return a Promise for the value of
|
|
507
|
+
// the final result produced by the iterator.
|
|
508
|
+
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
509
|
+
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
510
|
+
|
|
511
|
+
var iter = new AsyncIterator(
|
|
512
|
+
wrap(innerFn, outerFn, self, tryLocsList),
|
|
513
|
+
PromiseImpl
|
|
514
|
+
);
|
|
515
|
+
|
|
516
|
+
return exports.isGeneratorFunction(outerFn)
|
|
517
|
+
? iter // If outerFn is a generator, return the full iterator.
|
|
518
|
+
: iter.next().then(function(result) {
|
|
519
|
+
return result.done ? result.value : iter.next();
|
|
520
|
+
});
|
|
521
|
+
};
|
|
200
522
|
|
|
201
|
-
function
|
|
202
|
-
|
|
203
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
204
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
205
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
523
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
524
|
+
var state = GenStateSuspendedStart;
|
|
206
525
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
526
|
+
return function invoke(method, arg) {
|
|
527
|
+
if (state === GenStateExecuting) {
|
|
528
|
+
throw new Error("Generator is already running");
|
|
529
|
+
}
|
|
211
530
|
|
|
212
|
-
|
|
213
|
-
|
|
531
|
+
if (state === GenStateCompleted) {
|
|
532
|
+
if (method === "throw") {
|
|
533
|
+
throw arg;
|
|
534
|
+
}
|
|
214
535
|
|
|
215
|
-
|
|
536
|
+
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
537
|
+
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
538
|
+
return doneResult();
|
|
216
539
|
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
return {
|
|
220
|
-
next: doneResult
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
540
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
value: undefined,
|
|
227
|
-
done: !0
|
|
228
|
-
};
|
|
229
|
-
}
|
|
541
|
+
context.method = method;
|
|
542
|
+
context.arg = arg;
|
|
230
543
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
241
|
-
return this;
|
|
242
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
243
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
244
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
245
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
246
|
-
return result.done ? result.value : iter.next();
|
|
247
|
-
});
|
|
248
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
249
|
-
return this;
|
|
250
|
-
}), define(Gp, "toString", function () {
|
|
251
|
-
return "[object Generator]";
|
|
252
|
-
}), exports.keys = function (object) {
|
|
253
|
-
var keys = [];
|
|
544
|
+
while (true) {
|
|
545
|
+
var delegate = context.delegate;
|
|
546
|
+
if (delegate) {
|
|
547
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
548
|
+
if (delegateResult) {
|
|
549
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
550
|
+
return delegateResult;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
254
553
|
|
|
255
|
-
|
|
554
|
+
if (context.method === "next") {
|
|
555
|
+
// Setting context._sent for legacy support of Babel's
|
|
556
|
+
// function.sent implementation.
|
|
557
|
+
context.sent = context._sent = context.arg;
|
|
256
558
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
559
|
+
} else if (context.method === "throw") {
|
|
560
|
+
if (state === GenStateSuspendedStart) {
|
|
561
|
+
state = GenStateCompleted;
|
|
562
|
+
throw context.arg;
|
|
563
|
+
}
|
|
262
564
|
|
|
263
|
-
|
|
264
|
-
};
|
|
265
|
-
}, exports.values = values, Context.prototype = {
|
|
266
|
-
constructor: Context,
|
|
267
|
-
reset: function (skipTempReset) {
|
|
268
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
269
|
-
},
|
|
270
|
-
stop: function () {
|
|
271
|
-
this.done = !0;
|
|
272
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
273
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
274
|
-
return this.rval;
|
|
275
|
-
},
|
|
276
|
-
dispatchException: function (exception) {
|
|
277
|
-
if (this.done) throw exception;
|
|
278
|
-
var context = this;
|
|
565
|
+
context.dispatchException(context.arg);
|
|
279
566
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
567
|
+
} else if (context.method === "return") {
|
|
568
|
+
context.abrupt("return", context.arg);
|
|
569
|
+
}
|
|
283
570
|
|
|
284
|
-
|
|
285
|
-
var entry = this.tryEntries[i],
|
|
286
|
-
record = entry.completion;
|
|
287
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
571
|
+
state = GenStateExecuting;
|
|
288
572
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
573
|
+
var record = tryCatch(innerFn, self, context);
|
|
574
|
+
if (record.type === "normal") {
|
|
575
|
+
// If an exception is thrown from innerFn, we leave state ===
|
|
576
|
+
// GenStateExecuting and loop back for another invocation.
|
|
577
|
+
state = context.done
|
|
578
|
+
? GenStateCompleted
|
|
579
|
+
: GenStateSuspendedYield;
|
|
292
580
|
|
|
293
|
-
if (
|
|
294
|
-
|
|
295
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
296
|
-
} else if (hasCatch) {
|
|
297
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
298
|
-
} else {
|
|
299
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
300
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
581
|
+
if (record.arg === ContinueSentinel) {
|
|
582
|
+
continue;
|
|
301
583
|
}
|
|
584
|
+
|
|
585
|
+
return {
|
|
586
|
+
value: record.arg,
|
|
587
|
+
done: context.done
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
} else if (record.type === "throw") {
|
|
591
|
+
state = GenStateCompleted;
|
|
592
|
+
// Dispatch the exception by looping back around to the
|
|
593
|
+
// context.dispatchException(context.arg) call above.
|
|
594
|
+
context.method = "throw";
|
|
595
|
+
context.arg = record.arg;
|
|
302
596
|
}
|
|
303
597
|
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
307
|
-
var entry = this.tryEntries[i];
|
|
598
|
+
};
|
|
599
|
+
}
|
|
308
600
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
601
|
+
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
602
|
+
// result, either by returning a { value, done } result from the
|
|
603
|
+
// delegate iterator, or by modifying context.method and context.arg,
|
|
604
|
+
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
605
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
606
|
+
var method = delegate.iterator[context.method];
|
|
607
|
+
if (method === undefined$1) {
|
|
608
|
+
// A .throw or .return when the delegate iterator has no .throw
|
|
609
|
+
// method always terminates the yield* loop.
|
|
610
|
+
context.delegate = null;
|
|
611
|
+
|
|
612
|
+
if (context.method === "throw") {
|
|
613
|
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
614
|
+
if (delegate.iterator["return"]) {
|
|
615
|
+
// If the delegate iterator has a return method, give it a
|
|
616
|
+
// chance to clean up.
|
|
617
|
+
context.method = "return";
|
|
618
|
+
context.arg = undefined$1;
|
|
619
|
+
maybeInvokeDelegate(delegate, context);
|
|
620
|
+
|
|
621
|
+
if (context.method === "throw") {
|
|
622
|
+
// If maybeInvokeDelegate(context) changed context.method from
|
|
623
|
+
// "return" to "throw", let that override the TypeError below.
|
|
624
|
+
return ContinueSentinel;
|
|
625
|
+
}
|
|
312
626
|
}
|
|
313
|
-
}
|
|
314
627
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
},
|
|
319
|
-
complete: function (record, afterLoc) {
|
|
320
|
-
if ("throw" === record.type) throw record.arg;
|
|
321
|
-
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
322
|
-
},
|
|
323
|
-
finish: function (finallyLoc) {
|
|
324
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
325
|
-
var entry = this.tryEntries[i];
|
|
326
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
628
|
+
context.method = "throw";
|
|
629
|
+
context.arg = new TypeError(
|
|
630
|
+
"The iterator does not provide a 'throw' method");
|
|
327
631
|
}
|
|
328
|
-
},
|
|
329
|
-
catch: function (tryLoc) {
|
|
330
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
331
|
-
var entry = this.tryEntries[i];
|
|
332
|
-
|
|
333
|
-
if (entry.tryLoc === tryLoc) {
|
|
334
|
-
var record = entry.completion;
|
|
335
632
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
resetTryEntry(entry);
|
|
339
|
-
}
|
|
633
|
+
return ContinueSentinel;
|
|
634
|
+
}
|
|
340
635
|
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
}
|
|
636
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
344
637
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
resultName: resultName,
|
|
351
|
-
nextLoc: nextLoc
|
|
352
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
638
|
+
if (record.type === "throw") {
|
|
639
|
+
context.method = "throw";
|
|
640
|
+
context.arg = record.arg;
|
|
641
|
+
context.delegate = null;
|
|
642
|
+
return ContinueSentinel;
|
|
353
643
|
}
|
|
354
|
-
}, exports;
|
|
355
|
-
}
|
|
356
644
|
|
|
357
|
-
|
|
358
|
-
_wrapRegExp = function (re, groups) {
|
|
359
|
-
return new BabelRegExp(re, void 0, groups);
|
|
360
|
-
};
|
|
645
|
+
var info = record.arg;
|
|
361
646
|
|
|
362
|
-
|
|
363
|
-
|
|
647
|
+
if (! info) {
|
|
648
|
+
context.method = "throw";
|
|
649
|
+
context.arg = new TypeError("iterator result is not an object");
|
|
650
|
+
context.delegate = null;
|
|
651
|
+
return ContinueSentinel;
|
|
652
|
+
}
|
|
364
653
|
|
|
365
|
-
|
|
366
|
-
|
|
654
|
+
if (info.done) {
|
|
655
|
+
// Assign the result of the finished delegate to the temporary
|
|
656
|
+
// variable specified by delegate.resultName (see delegateYield).
|
|
657
|
+
context[delegate.resultName] = info.value;
|
|
658
|
+
|
|
659
|
+
// Resume execution at the desired location (see delegateYield).
|
|
660
|
+
context.next = delegate.nextLoc;
|
|
661
|
+
|
|
662
|
+
// If context.method was "throw" but the delegate handled the
|
|
663
|
+
// exception, let the outer generator proceed normally. If
|
|
664
|
+
// context.method was "next", forget context.arg since it has been
|
|
665
|
+
// "consumed" by the delegate iterator. If context.method was
|
|
666
|
+
// "return", allow the original .return call to continue in the
|
|
667
|
+
// outer generator.
|
|
668
|
+
if (context.method !== "return") {
|
|
669
|
+
context.method = "next";
|
|
670
|
+
context.arg = undefined$1;
|
|
671
|
+
}
|
|
367
672
|
|
|
368
|
-
|
|
673
|
+
} else {
|
|
674
|
+
// Re-yield the result returned by the delegate method.
|
|
675
|
+
return info;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
// The delegate iterator is finished, so forget it and continue with
|
|
679
|
+
// the outer generator.
|
|
680
|
+
context.delegate = null;
|
|
681
|
+
return ContinueSentinel;
|
|
369
682
|
}
|
|
370
683
|
|
|
371
|
-
|
|
372
|
-
|
|
684
|
+
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
685
|
+
// unified ._invoke helper method.
|
|
686
|
+
defineIteratorMethods(Gp);
|
|
373
687
|
|
|
374
|
-
|
|
375
|
-
return groups[name] = result[g[name]], groups;
|
|
376
|
-
}, Object.create(null));
|
|
377
|
-
}
|
|
688
|
+
define(Gp, toStringTagSymbol, "Generator");
|
|
378
689
|
|
|
379
|
-
return
|
|
380
|
-
|
|
690
|
+
// A Generator should always return itself as the iterator object when the
|
|
691
|
+
// @@iterator function is called on it. Some browsers' implementations of the
|
|
692
|
+
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
693
|
+
// object to not be returned from this call. This ensures that doesn't happen.
|
|
694
|
+
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
695
|
+
define(Gp, iteratorSymbol, function() {
|
|
696
|
+
return this;
|
|
697
|
+
});
|
|
381
698
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
var groups = _groups.get(this);
|
|
699
|
+
define(Gp, "toString", function() {
|
|
700
|
+
return "[object Generator]";
|
|
701
|
+
});
|
|
386
702
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}));
|
|
390
|
-
}
|
|
703
|
+
function pushTryEntry(locs) {
|
|
704
|
+
var entry = { tryLoc: locs[0] };
|
|
391
705
|
|
|
392
|
-
if (
|
|
393
|
-
|
|
706
|
+
if (1 in locs) {
|
|
707
|
+
entry.catchLoc = locs[1];
|
|
708
|
+
}
|
|
394
709
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
});
|
|
710
|
+
if (2 in locs) {
|
|
711
|
+
entry.finallyLoc = locs[2];
|
|
712
|
+
entry.afterLoc = locs[3];
|
|
399
713
|
}
|
|
400
714
|
|
|
401
|
-
|
|
402
|
-
}
|
|
403
|
-
}
|
|
715
|
+
this.tryEntries.push(entry);
|
|
716
|
+
}
|
|
404
717
|
|
|
405
|
-
function
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
reject(error);
|
|
411
|
-
return;
|
|
718
|
+
function resetTryEntry(entry) {
|
|
719
|
+
var record = entry.completion || {};
|
|
720
|
+
record.type = "normal";
|
|
721
|
+
delete record.arg;
|
|
722
|
+
entry.completion = record;
|
|
412
723
|
}
|
|
413
724
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
725
|
+
function Context(tryLocsList) {
|
|
726
|
+
// The root entry object (effectively a try statement without a catch
|
|
727
|
+
// or a finally block) gives us a place to store values thrown from
|
|
728
|
+
// locations where there is no enclosing try statement.
|
|
729
|
+
this.tryEntries = [{ tryLoc: "root" }];
|
|
730
|
+
tryLocsList.forEach(pushTryEntry, this);
|
|
731
|
+
this.reset(true);
|
|
418
732
|
}
|
|
419
|
-
}
|
|
420
733
|
|
|
421
|
-
function
|
|
422
|
-
|
|
423
|
-
var
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
734
|
+
exports.keys = function(object) {
|
|
735
|
+
var keys = [];
|
|
736
|
+
for (var key in object) {
|
|
737
|
+
keys.push(key);
|
|
738
|
+
}
|
|
739
|
+
keys.reverse();
|
|
427
740
|
|
|
428
|
-
|
|
429
|
-
|
|
741
|
+
// Rather than returning an object with a next method, we keep
|
|
742
|
+
// things simple and return the next function itself.
|
|
743
|
+
return function next() {
|
|
744
|
+
while (keys.length) {
|
|
745
|
+
var key = keys.pop();
|
|
746
|
+
if (key in object) {
|
|
747
|
+
next.value = key;
|
|
748
|
+
next.done = false;
|
|
749
|
+
return next;
|
|
750
|
+
}
|
|
430
751
|
}
|
|
431
752
|
|
|
432
|
-
|
|
433
|
-
|
|
753
|
+
// To avoid creating an additional object, we just hang the .value
|
|
754
|
+
// and .done properties off the next function object itself. This
|
|
755
|
+
// also ensures that the minifier will not anonymize the function.
|
|
756
|
+
next.done = true;
|
|
757
|
+
return next;
|
|
758
|
+
};
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
function values(iterable) {
|
|
762
|
+
if (iterable) {
|
|
763
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
764
|
+
if (iteratorMethod) {
|
|
765
|
+
return iteratorMethod.call(iterable);
|
|
434
766
|
}
|
|
435
767
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
}
|
|
768
|
+
if (typeof iterable.next === "function") {
|
|
769
|
+
return iterable;
|
|
770
|
+
}
|
|
440
771
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
772
|
+
if (!isNaN(iterable.length)) {
|
|
773
|
+
var i = -1, next = function next() {
|
|
774
|
+
while (++i < iterable.length) {
|
|
775
|
+
if (hasOwn.call(iterable, i)) {
|
|
776
|
+
next.value = iterable[i];
|
|
777
|
+
next.done = false;
|
|
778
|
+
return next;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
445
781
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
782
|
+
next.value = undefined$1;
|
|
783
|
+
next.done = true;
|
|
784
|
+
|
|
785
|
+
return next;
|
|
786
|
+
};
|
|
787
|
+
|
|
788
|
+
return next.next = next;
|
|
450
789
|
}
|
|
451
790
|
}
|
|
452
791
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
792
|
+
// Return an iterator with no values.
|
|
793
|
+
return { next: doneResult };
|
|
794
|
+
}
|
|
795
|
+
exports.values = values;
|
|
457
796
|
|
|
458
|
-
function
|
|
459
|
-
|
|
460
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
797
|
+
function doneResult() {
|
|
798
|
+
return { value: undefined$1, done: true };
|
|
461
799
|
}
|
|
462
800
|
|
|
463
|
-
|
|
464
|
-
constructor:
|
|
465
|
-
value: subClass,
|
|
466
|
-
writable: true,
|
|
467
|
-
configurable: true
|
|
468
|
-
}
|
|
469
|
-
});
|
|
470
|
-
Object.defineProperty(subClass, "prototype", {
|
|
471
|
-
writable: false
|
|
472
|
-
});
|
|
473
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
474
|
-
}
|
|
801
|
+
Context.prototype = {
|
|
802
|
+
constructor: Context,
|
|
475
803
|
|
|
476
|
-
function
|
|
477
|
-
|
|
478
|
-
|
|
804
|
+
reset: function(skipTempReset) {
|
|
805
|
+
this.prev = 0;
|
|
806
|
+
this.next = 0;
|
|
807
|
+
// Resetting context._sent for legacy support of Babel's
|
|
808
|
+
// function.sent implementation.
|
|
809
|
+
this.sent = this._sent = undefined$1;
|
|
810
|
+
this.done = false;
|
|
811
|
+
this.delegate = null;
|
|
812
|
+
|
|
813
|
+
this.method = "next";
|
|
814
|
+
this.arg = undefined$1;
|
|
815
|
+
|
|
816
|
+
this.tryEntries.forEach(resetTryEntry);
|
|
817
|
+
|
|
818
|
+
if (!skipTempReset) {
|
|
819
|
+
for (var name in this) {
|
|
820
|
+
// Not sure about the optimal order of these conditions:
|
|
821
|
+
if (name.charAt(0) === "t" &&
|
|
822
|
+
hasOwn.call(this, name) &&
|
|
823
|
+
!isNaN(+name.slice(1))) {
|
|
824
|
+
this[name] = undefined$1;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
},
|
|
479
829
|
|
|
480
|
-
|
|
481
|
-
|
|
830
|
+
stop: function() {
|
|
831
|
+
this.done = true;
|
|
482
832
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}
|
|
833
|
+
var rootEntry = this.tryEntries[0];
|
|
834
|
+
var rootRecord = rootEntry.completion;
|
|
835
|
+
if (rootRecord.type === "throw") {
|
|
836
|
+
throw rootRecord.arg;
|
|
837
|
+
}
|
|
489
838
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
o.__proto__ = p;
|
|
493
|
-
return o;
|
|
494
|
-
};
|
|
495
|
-
return _setPrototypeOf(o, p);
|
|
496
|
-
}
|
|
839
|
+
return this.rval;
|
|
840
|
+
},
|
|
497
841
|
|
|
498
|
-
function
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
842
|
+
dispatchException: function(exception) {
|
|
843
|
+
if (this.done) {
|
|
844
|
+
throw exception;
|
|
845
|
+
}
|
|
502
846
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
847
|
+
var context = this;
|
|
848
|
+
function handle(loc, caught) {
|
|
849
|
+
record.type = "throw";
|
|
850
|
+
record.arg = exception;
|
|
851
|
+
context.next = loc;
|
|
852
|
+
|
|
853
|
+
if (caught) {
|
|
854
|
+
// If the dispatched exception was caught by a catch block,
|
|
855
|
+
// then let that catch block handle the exception normally.
|
|
856
|
+
context.method = "next";
|
|
857
|
+
context.arg = undefined$1;
|
|
858
|
+
}
|
|
510
859
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
_construct = Reflect.construct.bind();
|
|
514
|
-
} else {
|
|
515
|
-
_construct = function _construct(Parent, args, Class) {
|
|
516
|
-
var a = [null];
|
|
517
|
-
a.push.apply(a, args);
|
|
518
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
519
|
-
var instance = new Constructor();
|
|
520
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
521
|
-
return instance;
|
|
522
|
-
};
|
|
523
|
-
}
|
|
860
|
+
return !! caught;
|
|
861
|
+
}
|
|
524
862
|
|
|
525
|
-
|
|
526
|
-
|
|
863
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
864
|
+
var entry = this.tryEntries[i];
|
|
865
|
+
var record = entry.completion;
|
|
527
866
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
867
|
+
if (entry.tryLoc === "root") {
|
|
868
|
+
// Exception thrown outside of any try block that could handle
|
|
869
|
+
// it, so set the completion value of the entire function to
|
|
870
|
+
// throw the exception.
|
|
871
|
+
return handle("end");
|
|
872
|
+
}
|
|
531
873
|
|
|
532
|
-
|
|
533
|
-
|
|
874
|
+
if (entry.tryLoc <= this.prev) {
|
|
875
|
+
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
876
|
+
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
534
877
|
|
|
535
|
-
|
|
536
|
-
|
|
878
|
+
if (hasCatch && hasFinally) {
|
|
879
|
+
if (this.prev < entry.catchLoc) {
|
|
880
|
+
return handle(entry.catchLoc, true);
|
|
881
|
+
} else if (this.prev < entry.finallyLoc) {
|
|
882
|
+
return handle(entry.finallyLoc);
|
|
883
|
+
}
|
|
537
884
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
885
|
+
} else if (hasCatch) {
|
|
886
|
+
if (this.prev < entry.catchLoc) {
|
|
887
|
+
return handle(entry.catchLoc, true);
|
|
888
|
+
}
|
|
541
889
|
|
|
542
|
-
|
|
543
|
-
|
|
890
|
+
} else if (hasFinally) {
|
|
891
|
+
if (this.prev < entry.finallyLoc) {
|
|
892
|
+
return handle(entry.finallyLoc);
|
|
893
|
+
}
|
|
544
894
|
|
|
545
|
-
|
|
546
|
-
|
|
895
|
+
} else {
|
|
896
|
+
throw new Error("try statement without catch or finally");
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
},
|
|
547
901
|
|
|
548
|
-
function
|
|
549
|
-
|
|
550
|
-
|
|
902
|
+
abrupt: function(type, arg) {
|
|
903
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
904
|
+
var entry = this.tryEntries[i];
|
|
905
|
+
if (entry.tryLoc <= this.prev &&
|
|
906
|
+
hasOwn.call(entry, "finallyLoc") &&
|
|
907
|
+
this.prev < entry.finallyLoc) {
|
|
908
|
+
var finallyEntry = entry;
|
|
909
|
+
break;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
551
912
|
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
913
|
+
if (finallyEntry &&
|
|
914
|
+
(type === "break" ||
|
|
915
|
+
type === "continue") &&
|
|
916
|
+
finallyEntry.tryLoc <= arg &&
|
|
917
|
+
arg <= finallyEntry.finallyLoc) {
|
|
918
|
+
// Ignore the finally entry if control is not jumping to a
|
|
919
|
+
// location outside the try/catch block.
|
|
920
|
+
finallyEntry = null;
|
|
558
921
|
}
|
|
559
|
-
});
|
|
560
|
-
return _setPrototypeOf(Wrapper, Class);
|
|
561
|
-
};
|
|
562
922
|
|
|
563
|
-
|
|
564
|
-
|
|
923
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
924
|
+
record.type = type;
|
|
925
|
+
record.arg = arg;
|
|
565
926
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
927
|
+
if (finallyEntry) {
|
|
928
|
+
this.method = "next";
|
|
929
|
+
this.next = finallyEntry.finallyLoc;
|
|
930
|
+
return ContinueSentinel;
|
|
931
|
+
}
|
|
571
932
|
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
575
|
-
target[key] = source[key];
|
|
576
|
-
}
|
|
933
|
+
return this.complete(record);
|
|
934
|
+
},
|
|
577
935
|
|
|
578
|
-
|
|
579
|
-
|
|
936
|
+
complete: function(record, afterLoc) {
|
|
937
|
+
if (record.type === "throw") {
|
|
938
|
+
throw record.arg;
|
|
939
|
+
}
|
|
580
940
|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
}
|
|
941
|
+
if (record.type === "break" ||
|
|
942
|
+
record.type === "continue") {
|
|
943
|
+
this.next = record.arg;
|
|
944
|
+
} else if (record.type === "return") {
|
|
945
|
+
this.rval = this.arg = record.arg;
|
|
946
|
+
this.method = "return";
|
|
947
|
+
this.next = "end";
|
|
948
|
+
} else if (record.type === "normal" && afterLoc) {
|
|
949
|
+
this.next = afterLoc;
|
|
950
|
+
}
|
|
589
951
|
|
|
590
|
-
|
|
591
|
-
|
|
952
|
+
return ContinueSentinel;
|
|
953
|
+
},
|
|
592
954
|
|
|
593
|
-
|
|
955
|
+
finish: function(finallyLoc) {
|
|
956
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
957
|
+
var entry = this.tryEntries[i];
|
|
958
|
+
if (entry.finallyLoc === finallyLoc) {
|
|
959
|
+
this.complete(entry.completion, entry.afterLoc);
|
|
960
|
+
resetTryEntry(entry);
|
|
961
|
+
return ContinueSentinel;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
},
|
|
594
965
|
|
|
595
|
-
|
|
596
|
-
|
|
966
|
+
"catch": function(tryLoc) {
|
|
967
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
968
|
+
var entry = this.tryEntries[i];
|
|
969
|
+
if (entry.tryLoc === tryLoc) {
|
|
970
|
+
var record = entry.completion;
|
|
971
|
+
if (record.type === "throw") {
|
|
972
|
+
var thrown = record.arg;
|
|
973
|
+
resetTryEntry(entry);
|
|
974
|
+
}
|
|
975
|
+
return thrown;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
597
978
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
979
|
+
// The context.catch method must only be called with a location
|
|
980
|
+
// argument that corresponds to a known catch block.
|
|
981
|
+
throw new Error("illegal catch attempt");
|
|
982
|
+
},
|
|
601
983
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
done: true
|
|
608
|
-
};
|
|
609
|
-
return {
|
|
610
|
-
done: false,
|
|
611
|
-
value: o[i++]
|
|
984
|
+
delegateYield: function(iterable, resultName, nextLoc) {
|
|
985
|
+
this.delegate = {
|
|
986
|
+
iterator: values(iterable),
|
|
987
|
+
resultName: resultName,
|
|
988
|
+
nextLoc: nextLoc
|
|
612
989
|
};
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
990
|
|
|
616
|
-
|
|
991
|
+
if (this.method === "next") {
|
|
992
|
+
// Deliberately forget the last sent value so that we don't
|
|
993
|
+
// accidentally pass it on to the delegate.
|
|
994
|
+
this.arg = undefined$1;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
return ContinueSentinel;
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
|
|
1001
|
+
// Regardless of whether this script is executing as a CommonJS module
|
|
1002
|
+
// or not, return the runtime object so that we can declare the variable
|
|
1003
|
+
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
1004
|
+
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
1005
|
+
return exports;
|
|
1006
|
+
|
|
1007
|
+
}(
|
|
1008
|
+
// If this script is executing as a CommonJS module, use module.exports
|
|
1009
|
+
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
1010
|
+
// object. Either way, the resulting object will be used to initialize
|
|
1011
|
+
// the regeneratorRuntime variable at the top of this file.
|
|
1012
|
+
module.exports
|
|
1013
|
+
));
|
|
1014
|
+
|
|
1015
|
+
try {
|
|
1016
|
+
regeneratorRuntime = runtime;
|
|
1017
|
+
} catch (accidentalStrictMode) {
|
|
1018
|
+
// This module should not be running in strict mode, so the above
|
|
1019
|
+
// assignment should always work unless something is misconfigured. Just
|
|
1020
|
+
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
1021
|
+
// we can explicitly access globalThis. In older engines we can escape
|
|
1022
|
+
// strict mode using a global Function call. This could conceivably fail
|
|
1023
|
+
// if a Content Security Policy forbids using Function, but in that case
|
|
1024
|
+
// the proper solution is to fix the accidental strict mode problem. If
|
|
1025
|
+
// you've misconfigured your bundler to force strict mode and applied a
|
|
1026
|
+
// CSP to forbid Function, and you're not willing to fix either of those
|
|
1027
|
+
// problems, please detail your unique predicament in a GitHub issue.
|
|
1028
|
+
if (typeof globalThis === "object") {
|
|
1029
|
+
globalThis.regeneratorRuntime = runtime;
|
|
1030
|
+
} else {
|
|
1031
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
1032
|
+
}
|
|
617
1033
|
}
|
|
1034
|
+
});
|
|
618
1035
|
|
|
619
1036
|
var _personalMetaToPrefix;
|
|
620
1037
|
var personalMetaToPrefix = (_personalMetaToPrefix = {}, _personalMetaToPrefix[initApis.MetadataCategory.Personal] = 'you', _personalMetaToPrefix[initApis.MetadataCategory.ChildPersonal] = 'child', _personalMetaToPrefix[initApis.MetadataCategory.OtherPersonal] = 'other', _personalMetaToPrefix);
|
|
@@ -835,9 +1252,9 @@ function filterTriggeredAnsweredWithKind(_x, _x2) {
|
|
|
835
1252
|
*/
|
|
836
1253
|
|
|
837
1254
|
function _filterTriggeredAnsweredWithKind() {
|
|
838
|
-
_filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/
|
|
1255
|
+
_filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(workflowData, kind) {
|
|
839
1256
|
var flattenedAnswers, triggeredQuestionsWithKind, samePageAnswers, res;
|
|
840
|
-
return
|
|
1257
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
841
1258
|
while (1) {
|
|
842
1259
|
switch (_context.prev = _context.next) {
|
|
843
1260
|
case 0:
|
|
@@ -881,9 +1298,9 @@ function getWorkflowDataByCategory(_x3, _x4) {
|
|
|
881
1298
|
}
|
|
882
1299
|
|
|
883
1300
|
function _getWorkflowDataByCategory() {
|
|
884
|
-
_getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/
|
|
1301
|
+
_getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(workflowData, category) {
|
|
885
1302
|
var flattenedAnswers, triggeredQuestions, fields;
|
|
886
|
-
return
|
|
1303
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
|
887
1304
|
while (1) {
|
|
888
1305
|
switch (_context2.prev = _context2.next) {
|
|
889
1306
|
case 0:
|
|
@@ -954,8 +1371,8 @@ function getImagesFromIndexDb(_x5) {
|
|
|
954
1371
|
*/
|
|
955
1372
|
|
|
956
1373
|
function _getImagesFromIndexDb() {
|
|
957
|
-
_getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/
|
|
958
|
-
return
|
|
1374
|
+
_getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(answer) {
|
|
1375
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
|
959
1376
|
while (1) {
|
|
960
1377
|
switch (_context3.prev = _context3.next) {
|
|
961
1378
|
case 0:
|
|
@@ -984,9 +1401,9 @@ function populateWorkflowField(_x6, _x7) {
|
|
|
984
1401
|
}
|
|
985
1402
|
|
|
986
1403
|
function _populateWorkflowField() {
|
|
987
|
-
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/
|
|
1404
|
+
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(question, answerValue) {
|
|
988
1405
|
var answer, displayedAnswer;
|
|
989
|
-
return
|
|
1406
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
|
990
1407
|
while (1) {
|
|
991
1408
|
switch (_context4.prev = _context4.next) {
|
|
992
1409
|
case 0:
|
|
@@ -1164,10 +1581,10 @@ function registerPatient(_x, _x2, _x3, _x4, _x5, _x6) {
|
|
|
1164
1581
|
*/
|
|
1165
1582
|
|
|
1166
1583
|
function _registerPatient() {
|
|
1167
|
-
_registerPatient = _asyncToGenerator( /*#__PURE__*/
|
|
1584
|
+
_registerPatient = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA) {
|
|
1168
1585
|
var consult, lockboxUuid, practitionerAdmin, retry, identity, errorsThrown, _ret;
|
|
1169
1586
|
|
|
1170
|
-
return
|
|
1587
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
|
1171
1588
|
while (1) {
|
|
1172
1589
|
switch (_context4.prev = _context4.next) {
|
|
1173
1590
|
case 0:
|
|
@@ -1185,11 +1602,11 @@ function _registerPatient() {
|
|
|
1185
1602
|
}
|
|
1186
1603
|
|
|
1187
1604
|
_context4.prev = 7;
|
|
1188
|
-
return _context4.delegateYield( /*#__PURE__*/
|
|
1605
|
+
return _context4.delegateYield( /*#__PURE__*/runtime_1.mark(function _callee3() {
|
|
1189
1606
|
var _consultIndex, _identity, _identity2;
|
|
1190
1607
|
|
|
1191
1608
|
var practitioners, grantPromises, consultIndex, consultIndexPromises;
|
|
1192
|
-
return
|
|
1609
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
|
1193
1610
|
while (1) {
|
|
1194
1611
|
switch (_context3.prev = _context3.next) {
|
|
1195
1612
|
case 0:
|
|
@@ -1260,6 +1677,7 @@ function _registerPatient() {
|
|
|
1260
1677
|
return oroClient.grantLockbox(practitionerAdmin, lockboxUuid)["catch"](function (err) {
|
|
1261
1678
|
console.error("Error while granting lockbox to practitioner admin " + practitionerAdmin, err); // if we cannot grant to the admin, then the registration will fail
|
|
1262
1679
|
|
|
1680
|
+
// if we cannot grant to the admin, then the registration will fail
|
|
1263
1681
|
errorsThrown.push(err);
|
|
1264
1682
|
});
|
|
1265
1683
|
|
|
@@ -1268,14 +1686,15 @@ function _registerPatient() {
|
|
|
1268
1686
|
grantPromises = practitioners.filter(function (practitioner) {
|
|
1269
1687
|
return practitioner.uuid !== practitionerAdmin;
|
|
1270
1688
|
}).map( /*#__PURE__*/function () {
|
|
1271
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
1272
|
-
return
|
|
1689
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(practitioner) {
|
|
1690
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
1273
1691
|
while (1) {
|
|
1274
1692
|
switch (_context.prev = _context.next) {
|
|
1275
1693
|
case 0:
|
|
1276
1694
|
return _context.abrupt("return", oroClient.grantLockbox(practitioner.uuid, lockboxUuid)["catch"](function (err) {
|
|
1277
1695
|
console.error("Error while granting lockbox to practitioner", err); // Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
|
|
1278
1696
|
|
|
1697
|
+
// Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
|
|
1279
1698
|
if (retry <= 1) return;
|
|
1280
1699
|
errorsThrown.push(err);
|
|
1281
1700
|
}));
|
|
@@ -1288,7 +1707,7 @@ function _registerPatient() {
|
|
|
1288
1707
|
}, _callee);
|
|
1289
1708
|
}));
|
|
1290
1709
|
|
|
1291
|
-
return function (
|
|
1710
|
+
return function (_x28) {
|
|
1292
1711
|
return _ref.apply(this, arguments);
|
|
1293
1712
|
};
|
|
1294
1713
|
}());
|
|
@@ -1301,14 +1720,15 @@ function _registerPatient() {
|
|
|
1301
1720
|
}], _consultIndex); // the index will identify in which lockbox a consultation resides
|
|
1302
1721
|
|
|
1303
1722
|
consultIndexPromises = practitioners.map( /*#__PURE__*/function () {
|
|
1304
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
|
1305
|
-
return
|
|
1723
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(practitioner) {
|
|
1724
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
|
1306
1725
|
while (1) {
|
|
1307
1726
|
switch (_context2.prev = _context2.next) {
|
|
1308
1727
|
case 0:
|
|
1309
1728
|
return _context2.abrupt("return", oroClient.vaultIndexAdd(consultIndex, practitioner.uuid)["catch"](function (err) {
|
|
1310
1729
|
console.error("[SDK: registration] Error while adding to the practitioner's index " + practitioner.uuid, err); // Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
|
|
1311
1730
|
|
|
1731
|
+
// Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
|
|
1312
1732
|
if (retry <= 1) return;else errorsThrown.push(err);
|
|
1313
1733
|
}));
|
|
1314
1734
|
|
|
@@ -1320,7 +1740,7 @@ function _registerPatient() {
|
|
|
1320
1740
|
}, _callee2);
|
|
1321
1741
|
}));
|
|
1322
1742
|
|
|
1323
|
-
return function (
|
|
1743
|
+
return function (_x29) {
|
|
1324
1744
|
return _ref2.apply(this, arguments);
|
|
1325
1745
|
};
|
|
1326
1746
|
}());
|
|
@@ -1328,6 +1748,7 @@ function _registerPatient() {
|
|
|
1328
1748
|
return storeImageAliases(consult.uuid, lockboxUuid, workflow, oroClient)["catch"](function (err) {
|
|
1329
1749
|
console.error('[SDK: registration] Some errors happened during image upload', err); // Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
|
|
1330
1750
|
|
|
1751
|
+
// Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
|
|
1331
1752
|
if (retry <= 1) return;else errorsThrown.push(err);
|
|
1332
1753
|
});
|
|
1333
1754
|
|
|
@@ -1348,6 +1769,7 @@ function _registerPatient() {
|
|
|
1348
1769
|
return oroClient.updateMasterKey(patientUuid, masterKey, lockboxUuid)["catch"](function (err) {
|
|
1349
1770
|
console.error("[SDK: registration] Error while updating master key", err); /// it's acceptable to continue registration (return old identity)
|
|
1350
1771
|
|
|
1772
|
+
/// it's acceptable to continue registration (return old identity)
|
|
1351
1773
|
if (retry <= 1) return;
|
|
1352
1774
|
errorsThrown.push(err);
|
|
1353
1775
|
return identity;
|
|
@@ -1372,6 +1794,7 @@ function _registerPatient() {
|
|
|
1372
1794
|
return oroClient.updateSecurityQuestions(patientUuid, recoveryQA.recoverySecurityQuestions, recoveryQA.recoverySecurityAnswers, 2)["catch"](function (err) {
|
|
1373
1795
|
console.error("[SDK: registration] Error while updating security questions", err); /// it's acceptable to continue registration (return old identity)
|
|
1374
1796
|
|
|
1797
|
+
/// it's acceptable to continue registration (return old identity)
|
|
1375
1798
|
if (retry <= 1) return;
|
|
1376
1799
|
errorsThrown.push(err);
|
|
1377
1800
|
return identity;
|
|
@@ -1385,23 +1808,33 @@ function _registerPatient() {
|
|
|
1385
1808
|
return Promise.all([].concat(grantPromises, consultIndexPromises));
|
|
1386
1809
|
|
|
1387
1810
|
case 43:
|
|
1811
|
+
_context3.next = 45;
|
|
1812
|
+
return buildConsultSearchIndex(consult, workflow, oroClient)["catch"](function (err) {
|
|
1813
|
+
console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
|
|
1814
|
+
if (retry <= 1) return; // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
|
|
1815
|
+
|
|
1816
|
+
// this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
|
|
1817
|
+
errorsThrown.push(err);
|
|
1818
|
+
});
|
|
1819
|
+
|
|
1820
|
+
case 45:
|
|
1388
1821
|
if (!(errorsThrown.length > 0)) {
|
|
1389
|
-
_context3.next =
|
|
1822
|
+
_context3.next = 47;
|
|
1390
1823
|
break;
|
|
1391
1824
|
}
|
|
1392
1825
|
|
|
1393
1826
|
throw errorsThrown;
|
|
1394
1827
|
|
|
1395
|
-
case
|
|
1396
|
-
_context3.next =
|
|
1828
|
+
case 47:
|
|
1829
|
+
_context3.next = 49;
|
|
1397
1830
|
return oroClient.consultClient.updateConsultByUUID(consult.uuid, {
|
|
1398
1831
|
statusMedical: initApis.MedicalStatus.New
|
|
1399
1832
|
});
|
|
1400
1833
|
|
|
1401
|
-
case
|
|
1834
|
+
case 49:
|
|
1402
1835
|
return _context3.abrupt("return", "break");
|
|
1403
1836
|
|
|
1404
|
-
case
|
|
1837
|
+
case 50:
|
|
1405
1838
|
case "end":
|
|
1406
1839
|
return _context3.stop();
|
|
1407
1840
|
}
|
|
@@ -1477,9 +1910,9 @@ function getOrCreatePatientConsultationUuid(_x7, _x8) {
|
|
|
1477
1910
|
|
|
1478
1911
|
|
|
1479
1912
|
function _getOrCreatePatientConsultationUuid() {
|
|
1480
|
-
_getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/
|
|
1913
|
+
_getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(consult, oroClient) {
|
|
1481
1914
|
var payment;
|
|
1482
|
-
return
|
|
1915
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
|
1483
1916
|
while (1) {
|
|
1484
1917
|
switch (_context5.prev = _context5.next) {
|
|
1485
1918
|
case 0:
|
|
@@ -1534,9 +1967,9 @@ function getOrCreatePatientLockbox(_x9) {
|
|
|
1534
1967
|
|
|
1535
1968
|
|
|
1536
1969
|
function _getOrCreatePatientLockbox() {
|
|
1537
|
-
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/
|
|
1970
|
+
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(oroClient) {
|
|
1538
1971
|
var grants;
|
|
1539
|
-
return
|
|
1972
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
|
1540
1973
|
while (1) {
|
|
1541
1974
|
switch (_context6.prev = _context6.next) {
|
|
1542
1975
|
case 0:
|
|
@@ -1579,8 +2012,8 @@ function storePatientData(_x10, _x11, _x12, _x13, _x14) {
|
|
|
1579
2012
|
}
|
|
1580
2013
|
|
|
1581
2014
|
function _storePatientData() {
|
|
1582
|
-
_storePatientData = _asyncToGenerator( /*#__PURE__*/
|
|
1583
|
-
return
|
|
2015
|
+
_storePatientData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
|
|
2016
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
|
1584
2017
|
while (1) {
|
|
1585
2018
|
switch (_context7.prev = _context7.next) {
|
|
1586
2019
|
case 0:
|
|
@@ -1637,9 +2070,9 @@ function storeImageAliases(_x15, _x16, _x17, _x18) {
|
|
|
1637
2070
|
|
|
1638
2071
|
|
|
1639
2072
|
function _storeImageAliases() {
|
|
1640
|
-
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/
|
|
2073
|
+
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient) {
|
|
1641
2074
|
var images, nonNullImages, promises;
|
|
1642
|
-
return
|
|
2075
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
|
1643
2076
|
while (1) {
|
|
1644
2077
|
switch (_context8.prev = _context8.next) {
|
|
1645
2078
|
case 0:
|
|
@@ -1685,10 +2118,14 @@ function _storeImageAliases() {
|
|
|
1685
2118
|
function extractAndStorePersonalWorkflowData(_x19, _x20, _x21, _x22, _x23) {
|
|
1686
2119
|
return _extractAndStorePersonalWorkflowData.apply(this, arguments);
|
|
1687
2120
|
}
|
|
2121
|
+
/**
|
|
2122
|
+
* Given workflow data, it populates it with Personal, ChildPersonal, and OtherPersonal workflow data
|
|
2123
|
+
* @param workflow
|
|
2124
|
+
*/
|
|
1688
2125
|
|
|
1689
2126
|
function _extractAndStorePersonalWorkflowData() {
|
|
1690
|
-
_extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/
|
|
1691
|
-
return
|
|
2127
|
+
_extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
|
|
2128
|
+
return runtime_1.wrap(function _callee9$(_context9) {
|
|
1692
2129
|
while (1) {
|
|
1693
2130
|
switch (_context9.prev = _context9.next) {
|
|
1694
2131
|
case 0:
|
|
@@ -1711,6 +2148,111 @@ function _extractAndStorePersonalWorkflowData() {
|
|
|
1711
2148
|
return _extractAndStorePersonalWorkflowData.apply(this, arguments);
|
|
1712
2149
|
}
|
|
1713
2150
|
|
|
2151
|
+
function extractPersonalInfoFromWorkflowData(_x24) {
|
|
2152
|
+
return _extractPersonalInfoFromWorkflowData.apply(this, arguments);
|
|
2153
|
+
}
|
|
2154
|
+
/**
|
|
2155
|
+
* Creates the search index for the first name, last name, and the short id of the given consultation
|
|
2156
|
+
* @param consult the consultation to be search indexed
|
|
2157
|
+
* @param workflow the workflow data
|
|
2158
|
+
* @param oroClient
|
|
2159
|
+
*/
|
|
2160
|
+
|
|
2161
|
+
function _extractPersonalInfoFromWorkflowData() {
|
|
2162
|
+
_extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(workflow) {
|
|
2163
|
+
return runtime_1.wrap(function _callee10$(_context10) {
|
|
2164
|
+
while (1) {
|
|
2165
|
+
switch (_context10.prev = _context10.next) {
|
|
2166
|
+
case 0:
|
|
2167
|
+
return _context10.abrupt("return", Promise.all([getWorkflowDataByCategory(workflow, initApis.MetadataCategory.Personal), getWorkflowDataByCategory(workflow, initApis.MetadataCategory.ChildPersonal), getWorkflowDataByCategory(workflow, initApis.MetadataCategory.OtherPersonal)]).then(function (_ref3) {
|
|
2168
|
+
var personalInfoPopulatedWfData = _ref3[0],
|
|
2169
|
+
childPersonalInfoPopulatedWfData = _ref3[1],
|
|
2170
|
+
otherPersonalInfoPopulatedWfData = _ref3[2];
|
|
2171
|
+
return {
|
|
2172
|
+
personalInfoPopulatedWfData: personalInfoPopulatedWfData,
|
|
2173
|
+
childPersonalInfoPopulatedWfData: childPersonalInfoPopulatedWfData,
|
|
2174
|
+
otherPersonalInfoPopulatedWfData: otherPersonalInfoPopulatedWfData
|
|
2175
|
+
};
|
|
2176
|
+
}));
|
|
2177
|
+
|
|
2178
|
+
case 1:
|
|
2179
|
+
case "end":
|
|
2180
|
+
return _context10.stop();
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
}, _callee10);
|
|
2184
|
+
}));
|
|
2185
|
+
return _extractPersonalInfoFromWorkflowData.apply(this, arguments);
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
function buildConsultSearchIndex(_x25, _x26, _x27) {
|
|
2189
|
+
return _buildConsultSearchIndex.apply(this, arguments);
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
function _buildConsultSearchIndex() {
|
|
2193
|
+
_buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(consult, workflow, oroClient) {
|
|
2194
|
+
var terms, _yield$extractPersona, personalInfoPopulatedWfData, childPersonalInfoPopulatedWfData, otherPersonalInfoPopulatedWfData, personalInfo, childPersonalInfo, otherPersonalInfo;
|
|
2195
|
+
|
|
2196
|
+
return runtime_1.wrap(function _callee11$(_context11) {
|
|
2197
|
+
while (1) {
|
|
2198
|
+
switch (_context11.prev = _context11.next) {
|
|
2199
|
+
case 0:
|
|
2200
|
+
terms = [{
|
|
2201
|
+
kind: 'consult-shortid',
|
|
2202
|
+
value: consult.shortId
|
|
2203
|
+
}];
|
|
2204
|
+
_context11.next = 3;
|
|
2205
|
+
return extractPersonalInfoFromWorkflowData(workflow);
|
|
2206
|
+
|
|
2207
|
+
case 3:
|
|
2208
|
+
_yield$extractPersona = _context11.sent;
|
|
2209
|
+
personalInfoPopulatedWfData = _yield$extractPersona.personalInfoPopulatedWfData;
|
|
2210
|
+
childPersonalInfoPopulatedWfData = _yield$extractPersona.childPersonalInfoPopulatedWfData;
|
|
2211
|
+
otherPersonalInfoPopulatedWfData = _yield$extractPersona.otherPersonalInfoPopulatedWfData;
|
|
2212
|
+
personalInfo = identificationToPersonalInformations(toActualObject(personalInfoPopulatedWfData), initApis.MetadataCategory.Personal);
|
|
2213
|
+
childPersonalInfo = identificationToPersonalInformations(toActualObject(childPersonalInfoPopulatedWfData), initApis.MetadataCategory.ChildPersonal);
|
|
2214
|
+
otherPersonalInfo = identificationToPersonalInformations(toActualObject(otherPersonalInfoPopulatedWfData), initApis.MetadataCategory.OtherPersonal);
|
|
2215
|
+
terms.push({
|
|
2216
|
+
kind: 'first-name',
|
|
2217
|
+
value: personalInfo.firstname
|
|
2218
|
+
}, {
|
|
2219
|
+
kind: 'last-name',
|
|
2220
|
+
value: personalInfo.name
|
|
2221
|
+
});
|
|
2222
|
+
|
|
2223
|
+
if (childPersonalInfo.firstname && childPersonalInfo.name) {
|
|
2224
|
+
terms.push({
|
|
2225
|
+
kind: 'first-name',
|
|
2226
|
+
value: childPersonalInfo.firstname
|
|
2227
|
+
}, {
|
|
2228
|
+
kind: 'last-name',
|
|
2229
|
+
value: childPersonalInfo.name
|
|
2230
|
+
});
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
if (otherPersonalInfo.firstname && otherPersonalInfo.name) {
|
|
2234
|
+
terms.push({
|
|
2235
|
+
kind: 'first-name',
|
|
2236
|
+
value: otherPersonalInfo.firstname
|
|
2237
|
+
}, {
|
|
2238
|
+
kind: 'last-name',
|
|
2239
|
+
value: otherPersonalInfo.name
|
|
2240
|
+
});
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
_context11.next = 15;
|
|
2244
|
+
return oroClient.searchClient.index(consult.uuid, terms);
|
|
2245
|
+
|
|
2246
|
+
case 15:
|
|
2247
|
+
case "end":
|
|
2248
|
+
return _context11.stop();
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
}, _callee11);
|
|
2252
|
+
}));
|
|
2253
|
+
return _buildConsultSearchIndex.apply(this, arguments);
|
|
2254
|
+
}
|
|
2255
|
+
|
|
1714
2256
|
/**
|
|
1715
2257
|
* Decrypts and returns the encrypted grants
|
|
1716
2258
|
* If something went wrong during decryption, that grant will be removed from the list
|
|
@@ -1780,10 +2322,10 @@ function filterGrantsWithLockboxMetadata(_x, _x2, _x3, _x4) {
|
|
|
1780
2322
|
*/
|
|
1781
2323
|
|
|
1782
2324
|
function _filterGrantsWithLockboxMetadata() {
|
|
1783
|
-
_filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/
|
|
2325
|
+
_filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(oroClient, filter, vaultIndex, forceRefresh) {
|
|
1784
2326
|
var _vaultIndex$IndexKey$, indexConsults;
|
|
1785
2327
|
|
|
1786
|
-
return
|
|
2328
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
1787
2329
|
while (1) {
|
|
1788
2330
|
switch (_context.prev = _context.next) {
|
|
1789
2331
|
case 0:
|
|
@@ -1833,12 +2375,12 @@ function buildLegacyVaultIndex(_x5) {
|
|
|
1833
2375
|
}
|
|
1834
2376
|
|
|
1835
2377
|
function _buildLegacyVaultIndex() {
|
|
1836
|
-
_buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/
|
|
2378
|
+
_buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(oroClient) {
|
|
1837
2379
|
var _vaultIndex;
|
|
1838
2380
|
|
|
1839
2381
|
var grants, consultGrants, _loop, _iterator, _step, vaultIndex;
|
|
1840
2382
|
|
|
1841
|
-
return
|
|
2383
|
+
return runtime_1.wrap(function _callee2$(_context3) {
|
|
1842
2384
|
while (1) {
|
|
1843
2385
|
switch (_context3.prev = _context3.next) {
|
|
1844
2386
|
case 0:
|
|
@@ -1848,9 +2390,9 @@ function _buildLegacyVaultIndex() {
|
|
|
1848
2390
|
case 2:
|
|
1849
2391
|
grants = _context3.sent;
|
|
1850
2392
|
consultGrants = [];
|
|
1851
|
-
_loop = /*#__PURE__*/
|
|
2393
|
+
_loop = /*#__PURE__*/runtime_1.mark(function _loop() {
|
|
1852
2394
|
var grant, consults;
|
|
1853
|
-
return
|
|
2395
|
+
return runtime_1.wrap(function _loop$(_context2) {
|
|
1854
2396
|
while (1) {
|
|
1855
2397
|
switch (_context2.prev = _context2.next) {
|
|
1856
2398
|
case 0:
|
|
@@ -1934,8 +2476,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
1934
2476
|
_proto.cleanIndex =
|
|
1935
2477
|
/*#__PURE__*/
|
|
1936
2478
|
function () {
|
|
1937
|
-
var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
1938
|
-
return
|
|
2479
|
+
var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
2480
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
1939
2481
|
while (1) {
|
|
1940
2482
|
switch (_context.prev = _context.next) {
|
|
1941
2483
|
case 0:
|
|
@@ -1973,9 +2515,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
1973
2515
|
_proto.signUp =
|
|
1974
2516
|
/*#__PURE__*/
|
|
1975
2517
|
function () {
|
|
1976
|
-
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
2518
|
+
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
|
|
1977
2519
|
var privateKey, symmetricEncryptor, recoveryPassword, hashedPassword, emailConfirmed, signupRequest, identity, symetricEncryptor;
|
|
1978
|
-
return
|
|
2520
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
|
1979
2521
|
while (1) {
|
|
1980
2522
|
switch (_context2.prev = _context2.next) {
|
|
1981
2523
|
case 0:
|
|
@@ -2034,9 +2576,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2034
2576
|
_proto.confirmEmail =
|
|
2035
2577
|
/*#__PURE__*/
|
|
2036
2578
|
function () {
|
|
2037
|
-
var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
2579
|
+
var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(accessToken) {
|
|
2038
2580
|
var claims;
|
|
2039
|
-
return
|
|
2581
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
|
2040
2582
|
while (1) {
|
|
2041
2583
|
switch (_context3.prev = _context3.next) {
|
|
2042
2584
|
case 0:
|
|
@@ -2081,9 +2623,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2081
2623
|
_proto.signIn =
|
|
2082
2624
|
/*#__PURE__*/
|
|
2083
2625
|
function () {
|
|
2084
|
-
var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
2626
|
+
var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(practiceUuid, email, password, otp) {
|
|
2085
2627
|
var hashedPassword, tokenRequest, userUuid;
|
|
2086
|
-
return
|
|
2628
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
|
2087
2629
|
while (1) {
|
|
2088
2630
|
switch (_context4.prev = _context4.next) {
|
|
2089
2631
|
case 0:
|
|
@@ -2136,9 +2678,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2136
2678
|
_proto.resumeSession =
|
|
2137
2679
|
/*#__PURE__*/
|
|
2138
2680
|
function () {
|
|
2139
|
-
var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
2681
|
+
var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
|
|
2140
2682
|
var id, recoveryPayload, recoveryKey, symmetricDecryptor, privateKey;
|
|
2141
|
-
return
|
|
2683
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
|
2142
2684
|
while (1) {
|
|
2143
2685
|
switch (_context5.prev = _context5.next) {
|
|
2144
2686
|
case 0:
|
|
@@ -2239,8 +2781,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2239
2781
|
_proto.signOut =
|
|
2240
2782
|
/*#__PURE__*/
|
|
2241
2783
|
function () {
|
|
2242
|
-
var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
2243
|
-
return
|
|
2784
|
+
var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
|
|
2785
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
|
2244
2786
|
while (1) {
|
|
2245
2787
|
switch (_context6.prev = _context6.next) {
|
|
2246
2788
|
case 0:
|
|
@@ -2289,8 +2831,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2289
2831
|
_proto.registerPatient =
|
|
2290
2832
|
/*#__PURE__*/
|
|
2291
2833
|
function () {
|
|
2292
|
-
var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
2293
|
-
return
|
|
2834
|
+
var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(patientUuid, consult, workflow, recoveryQA) {
|
|
2835
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
|
2294
2836
|
while (1) {
|
|
2295
2837
|
switch (_context7.prev = _context7.next) {
|
|
2296
2838
|
case 0:
|
|
@@ -2333,8 +2875,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2333
2875
|
_proto.buildVaultIndex =
|
|
2334
2876
|
/*#__PURE__*/
|
|
2335
2877
|
function () {
|
|
2336
|
-
var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
2337
|
-
return
|
|
2878
|
+
var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(forceRefresh) {
|
|
2879
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
|
2338
2880
|
while (1) {
|
|
2339
2881
|
switch (_context8.prev = _context8.next) {
|
|
2340
2882
|
case 0:
|
|
@@ -2382,12 +2924,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2382
2924
|
_proto.forceUpdateIndexEntries =
|
|
2383
2925
|
/*#__PURE__*/
|
|
2384
2926
|
function () {
|
|
2385
|
-
var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
2927
|
+
var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10() {
|
|
2386
2928
|
var _this = this,
|
|
2387
2929
|
_this$vaultIndexAdd;
|
|
2388
2930
|
|
|
2389
2931
|
var grants, indexConsultLockbox;
|
|
2390
|
-
return
|
|
2932
|
+
return runtime_1.wrap(function _callee10$(_context10) {
|
|
2391
2933
|
while (1) {
|
|
2392
2934
|
switch (_context10.prev = _context10.next) {
|
|
2393
2935
|
case 0:
|
|
@@ -2398,8 +2940,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2398
2940
|
grants = _context10.sent;
|
|
2399
2941
|
_context10.next = 5;
|
|
2400
2942
|
return Promise.all(grants.map( /*#__PURE__*/function () {
|
|
2401
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
|
2402
|
-
return
|
|
2943
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(grant) {
|
|
2944
|
+
return runtime_1.wrap(function _callee9$(_context9) {
|
|
2403
2945
|
while (1) {
|
|
2404
2946
|
switch (_context9.prev = _context9.next) {
|
|
2405
2947
|
case 0:
|
|
@@ -2475,12 +3017,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2475
3017
|
_proto.vaultIndexAdd =
|
|
2476
3018
|
/*#__PURE__*/
|
|
2477
3019
|
function () {
|
|
2478
|
-
var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3020
|
+
var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(entries, indexOwnerUuid) {
|
|
2479
3021
|
var _this2 = this;
|
|
2480
3022
|
|
|
2481
3023
|
var rsaPub, base64IndexOwnerPubKey, encryptedIndex, _i, _Object$keys, keyString, key;
|
|
2482
3024
|
|
|
2483
|
-
return
|
|
3025
|
+
return runtime_1.wrap(function _callee11$(_context11) {
|
|
2484
3026
|
while (1) {
|
|
2485
3027
|
switch (_context11.prev = _context11.next) {
|
|
2486
3028
|
case 0:
|
|
@@ -2602,11 +3144,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2602
3144
|
_proto.indexSnapshotAdd =
|
|
2603
3145
|
/*#__PURE__*/
|
|
2604
3146
|
function () {
|
|
2605
|
-
var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3147
|
+
var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(index) {
|
|
2606
3148
|
var _index$IndexKey$Consu, _cleanedIndex;
|
|
2607
3149
|
|
|
2608
3150
|
var rsaPub, cleanedIndex, encryptedIndexEntry, encryptedIndex;
|
|
2609
|
-
return
|
|
3151
|
+
return runtime_1.wrap(function _callee12$(_context12) {
|
|
2610
3152
|
while (1) {
|
|
2611
3153
|
switch (_context12.prev = _context12.next) {
|
|
2612
3154
|
case 0:
|
|
@@ -2664,9 +3206,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2664
3206
|
_proto.grantLockbox =
|
|
2665
3207
|
/*#__PURE__*/
|
|
2666
3208
|
function () {
|
|
2667
|
-
var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3209
|
+
var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
|
|
2668
3210
|
var secret, base64GranteePublicKey, granteePublicKey, granteeEncryptedSecret, request;
|
|
2669
|
-
return
|
|
3211
|
+
return runtime_1.wrap(function _callee13$(_context13) {
|
|
2670
3212
|
while (1) {
|
|
2671
3213
|
switch (_context13.prev = _context13.next) {
|
|
2672
3214
|
case 0:
|
|
@@ -2726,9 +3268,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2726
3268
|
_proto.createMessageData =
|
|
2727
3269
|
/*#__PURE__*/
|
|
2728
3270
|
function () {
|
|
2729
|
-
var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3271
|
+
var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee14(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
|
|
2730
3272
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
|
|
2731
|
-
return
|
|
3273
|
+
return runtime_1.wrap(function _callee14$(_context14) {
|
|
2732
3274
|
while (1) {
|
|
2733
3275
|
switch (_context14.prev = _context14.next) {
|
|
2734
3276
|
case 0:
|
|
@@ -2798,9 +3340,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2798
3340
|
_proto.createMessageAttachmentData =
|
|
2799
3341
|
/*#__PURE__*/
|
|
2800
3342
|
function () {
|
|
2801
|
-
var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3343
|
+
var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee15(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
|
|
2802
3344
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
|
|
2803
|
-
return
|
|
3345
|
+
return runtime_1.wrap(function _callee15$(_context15) {
|
|
2804
3346
|
while (1) {
|
|
2805
3347
|
switch (_context15.prev = _context15.next) {
|
|
2806
3348
|
case 0:
|
|
@@ -2885,8 +3427,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2885
3427
|
_proto.createConsultationAttachmentData =
|
|
2886
3428
|
/*#__PURE__*/
|
|
2887
3429
|
function () {
|
|
2888
|
-
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
2889
|
-
return
|
|
3430
|
+
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee16(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid) {
|
|
3431
|
+
return runtime_1.wrap(function _callee16$(_context16) {
|
|
2890
3432
|
while (1) {
|
|
2891
3433
|
switch (_context16.prev = _context16.next) {
|
|
2892
3434
|
case 0:
|
|
@@ -2957,9 +3499,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
2957
3499
|
_proto.createJsonData =
|
|
2958
3500
|
/*#__PURE__*/
|
|
2959
3501
|
function () {
|
|
2960
|
-
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3502
|
+
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
|
|
2961
3503
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
|
2962
|
-
return
|
|
3504
|
+
return runtime_1.wrap(function _callee17$(_context17) {
|
|
2963
3505
|
while (1) {
|
|
2964
3506
|
switch (_context17.prev = _context17.next) {
|
|
2965
3507
|
case 0:
|
|
@@ -3013,9 +3555,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3013
3555
|
_proto.getOrInsertJsonData =
|
|
3014
3556
|
/*#__PURE__*/
|
|
3015
3557
|
function () {
|
|
3016
|
-
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3558
|
+
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace) {
|
|
3017
3559
|
var manifest;
|
|
3018
|
-
return
|
|
3560
|
+
return runtime_1.wrap(function _callee18$(_context18) {
|
|
3019
3561
|
while (1) {
|
|
3020
3562
|
switch (_context18.prev = _context18.next) {
|
|
3021
3563
|
case 0:
|
|
@@ -3078,9 +3620,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3078
3620
|
_proto.createBytesData =
|
|
3079
3621
|
/*#__PURE__*/
|
|
3080
3622
|
function () {
|
|
3081
|
-
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3623
|
+
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
|
|
3082
3624
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
|
3083
|
-
return
|
|
3625
|
+
return runtime_1.wrap(function _callee19$(_context19) {
|
|
3084
3626
|
while (1) {
|
|
3085
3627
|
switch (_context19.prev = _context19.next) {
|
|
3086
3628
|
case 0:
|
|
@@ -3136,10 +3678,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3136
3678
|
_proto.getJsonData =
|
|
3137
3679
|
/*#__PURE__*/
|
|
3138
3680
|
function () {
|
|
3139
|
-
var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3681
|
+
var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(lockboxUuid, dataUuid, lockboxOwnerUuid) {
|
|
3140
3682
|
var _yield$Promise$all, encryptedPayload, symmetricDecryptor;
|
|
3141
3683
|
|
|
3142
|
-
return
|
|
3684
|
+
return runtime_1.wrap(function _callee20$(_context20) {
|
|
3143
3685
|
while (1) {
|
|
3144
3686
|
switch (_context20.prev = _context20.next) {
|
|
3145
3687
|
case 0:
|
|
@@ -3186,10 +3728,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3186
3728
|
_proto.getBytesData =
|
|
3187
3729
|
/*#__PURE__*/
|
|
3188
3730
|
function () {
|
|
3189
|
-
var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3731
|
+
var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(lockboxUuid, dataUuid, lockboxOwnerUuid) {
|
|
3190
3732
|
var _yield$Promise$all2, encryptedPayload, symmetricDecryptor;
|
|
3191
3733
|
|
|
3192
|
-
return
|
|
3734
|
+
return runtime_1.wrap(function _callee21$(_context21) {
|
|
3193
3735
|
while (1) {
|
|
3194
3736
|
switch (_context21.prev = _context21.next) {
|
|
3195
3737
|
case 0:
|
|
@@ -3239,9 +3781,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3239
3781
|
_proto.getGrants =
|
|
3240
3782
|
/*#__PURE__*/
|
|
3241
3783
|
function () {
|
|
3242
|
-
var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3784
|
+
var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(filter, forceRefresh) {
|
|
3243
3785
|
var filterString, grantsByConsultLockbox, decryptedConsults, encryptedGrants, decryptedGrants;
|
|
3244
|
-
return
|
|
3786
|
+
return runtime_1.wrap(function _callee22$(_context22) {
|
|
3245
3787
|
while (1) {
|
|
3246
3788
|
switch (_context22.prev = _context22.next) {
|
|
3247
3789
|
case 0:
|
|
@@ -3359,9 +3901,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3359
3901
|
_proto.getCachedSecretCryptor =
|
|
3360
3902
|
/*#__PURE__*/
|
|
3361
3903
|
function () {
|
|
3362
|
-
var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3904
|
+
var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(lockboxUuid, lockboxOwnerUuid) {
|
|
3363
3905
|
var index, encryptedSecret, secret, cryptor;
|
|
3364
|
-
return
|
|
3906
|
+
return runtime_1.wrap(function _callee23$(_context23) {
|
|
3365
3907
|
while (1) {
|
|
3366
3908
|
switch (_context23.prev = _context23.next) {
|
|
3367
3909
|
case 0:
|
|
@@ -3426,8 +3968,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3426
3968
|
_proto.getPersonalInformationsFromConsultId =
|
|
3427
3969
|
/*#__PURE__*/
|
|
3428
3970
|
function () {
|
|
3429
|
-
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3430
|
-
return
|
|
3971
|
+
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(consultationId, category, forceRefresh) {
|
|
3972
|
+
return runtime_1.wrap(function _callee24$(_context24) {
|
|
3431
3973
|
while (1) {
|
|
3432
3974
|
switch (_context24.prev = _context24.next) {
|
|
3433
3975
|
case 0:
|
|
@@ -3464,8 +4006,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3464
4006
|
_proto.getMedicalDataFromConsultId =
|
|
3465
4007
|
/*#__PURE__*/
|
|
3466
4008
|
function () {
|
|
3467
|
-
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
3468
|
-
return
|
|
4009
|
+
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(consultationId, forceRefresh) {
|
|
4010
|
+
return runtime_1.wrap(function _callee25$(_context25) {
|
|
3469
4011
|
while (1) {
|
|
3470
4012
|
switch (_context25.prev = _context25.next) {
|
|
3471
4013
|
case 0:
|
|
@@ -3491,12 +4033,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3491
4033
|
}();
|
|
3492
4034
|
|
|
3493
4035
|
_proto.getMetaCategoryFromConsultId = /*#__PURE__*/function () {
|
|
3494
|
-
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4036
|
+
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(consultationId, category, forceRefresh) {
|
|
3495
4037
|
var _this3 = this;
|
|
3496
4038
|
|
|
3497
4039
|
var grants, workflowData, _loop, _iterator, _step;
|
|
3498
4040
|
|
|
3499
|
-
return
|
|
4041
|
+
return runtime_1.wrap(function _callee27$(_context28) {
|
|
3500
4042
|
while (1) {
|
|
3501
4043
|
switch (_context28.prev = _context28.next) {
|
|
3502
4044
|
case 0:
|
|
@@ -3512,9 +4054,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3512
4054
|
case 3:
|
|
3513
4055
|
grants = _context28.sent;
|
|
3514
4056
|
workflowData = [];
|
|
3515
|
-
_loop = /*#__PURE__*/
|
|
4057
|
+
_loop = /*#__PURE__*/runtime_1.mark(function _loop() {
|
|
3516
4058
|
var grant, manifest, data;
|
|
3517
|
-
return
|
|
4059
|
+
return runtime_1.wrap(function _loop$(_context27) {
|
|
3518
4060
|
while (1) {
|
|
3519
4061
|
switch (_context27.prev = _context27.next) {
|
|
3520
4062
|
case 0:
|
|
@@ -3548,8 +4090,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3548
4090
|
case 8:
|
|
3549
4091
|
_context27.next = 10;
|
|
3550
4092
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
|
3551
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/
|
|
3552
|
-
return
|
|
4093
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(entry) {
|
|
4094
|
+
return runtime_1.wrap(function _callee26$(_context26) {
|
|
3553
4095
|
while (1) {
|
|
3554
4096
|
switch (_context26.prev = _context26.next) {
|
|
3555
4097
|
case 0:
|
|
@@ -3633,9 +4175,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3633
4175
|
_proto.getPersonalInformations =
|
|
3634
4176
|
/*#__PURE__*/
|
|
3635
4177
|
function () {
|
|
3636
|
-
var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4178
|
+
var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(userId) {
|
|
3637
4179
|
var grant, lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
|
|
3638
|
-
return
|
|
4180
|
+
return runtime_1.wrap(function _callee28$(_context29) {
|
|
3639
4181
|
while (1) {
|
|
3640
4182
|
switch (_context29.prev = _context29.next) {
|
|
3641
4183
|
case 0:
|
|
@@ -3721,9 +4263,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3721
4263
|
_proto.getGrantFromConsultId =
|
|
3722
4264
|
/*#__PURE__*/
|
|
3723
4265
|
function () {
|
|
3724
|
-
var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4266
|
+
var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(consultationId) {
|
|
3725
4267
|
var grants;
|
|
3726
|
-
return
|
|
4268
|
+
return runtime_1.wrap(function _callee29$(_context30) {
|
|
3727
4269
|
while (1) {
|
|
3728
4270
|
switch (_context30.prev = _context30.next) {
|
|
3729
4271
|
case 0:
|
|
@@ -3769,9 +4311,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3769
4311
|
_proto.getIdentityFromConsultId =
|
|
3770
4312
|
/*#__PURE__*/
|
|
3771
4313
|
function () {
|
|
3772
|
-
var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4314
|
+
var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(consultationId) {
|
|
3773
4315
|
var grant;
|
|
3774
|
-
return
|
|
4316
|
+
return runtime_1.wrap(function _callee30$(_context31) {
|
|
3775
4317
|
while (1) {
|
|
3776
4318
|
switch (_context31.prev = _context31.next) {
|
|
3777
4319
|
case 0:
|
|
@@ -3824,11 +4366,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3824
4366
|
_proto.getLockboxManifest =
|
|
3825
4367
|
/*#__PURE__*/
|
|
3826
4368
|
function () {
|
|
3827
|
-
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4369
|
+
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
|
|
3828
4370
|
var _this4 = this;
|
|
3829
4371
|
|
|
3830
4372
|
var manifestKey;
|
|
3831
|
-
return
|
|
4373
|
+
return runtime_1.wrap(function _callee32$(_context33) {
|
|
3832
4374
|
while (1) {
|
|
3833
4375
|
switch (_context33.prev = _context33.next) {
|
|
3834
4376
|
case 0:
|
|
@@ -3853,9 +4395,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3853
4395
|
case 4:
|
|
3854
4396
|
return _context33.abrupt("return", this.vaultClient.lockboxManifestGet(lockboxUuid, filter, lockboxOwnerUuid).then(function (manifest) {
|
|
3855
4397
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
|
3856
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/
|
|
4398
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(entry) {
|
|
3857
4399
|
var privateMeta;
|
|
3858
|
-
return
|
|
4400
|
+
return runtime_1.wrap(function _callee31$(_context32) {
|
|
3859
4401
|
while (1) {
|
|
3860
4402
|
switch (_context32.prev = _context32.next) {
|
|
3861
4403
|
case 0:
|
|
@@ -3916,11 +4458,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3916
4458
|
_proto.createPersonalInformations =
|
|
3917
4459
|
/*#__PURE__*/
|
|
3918
4460
|
function () {
|
|
3919
|
-
var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4461
|
+
var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(identity, data, dataUuid) {
|
|
3920
4462
|
var _yield$this$getGrants;
|
|
3921
4463
|
|
|
3922
4464
|
var lockboxUuid;
|
|
3923
|
-
return
|
|
4465
|
+
return runtime_1.wrap(function _callee33$(_context34) {
|
|
3924
4466
|
while (1) {
|
|
3925
4467
|
switch (_context34.prev = _context34.next) {
|
|
3926
4468
|
case 0:
|
|
@@ -3986,11 +4528,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
3986
4528
|
_proto.createUserPreference =
|
|
3987
4529
|
/*#__PURE__*/
|
|
3988
4530
|
function () {
|
|
3989
|
-
var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4531
|
+
var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(identity, preference, dataUuid) {
|
|
3990
4532
|
var _yield$this$getGrants2;
|
|
3991
4533
|
|
|
3992
4534
|
var lockboxUuid;
|
|
3993
|
-
return
|
|
4535
|
+
return runtime_1.wrap(function _callee34$(_context35) {
|
|
3994
4536
|
while (1) {
|
|
3995
4537
|
switch (_context35.prev = _context35.next) {
|
|
3996
4538
|
case 0:
|
|
@@ -4054,9 +4596,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4054
4596
|
_proto.getDataFromGrant =
|
|
4055
4597
|
/*#__PURE__*/
|
|
4056
4598
|
function () {
|
|
4057
|
-
var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4599
|
+
var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(grant, filter) {
|
|
4058
4600
|
var lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
|
|
4059
|
-
return
|
|
4601
|
+
return runtime_1.wrap(function _callee35$(_context36) {
|
|
4060
4602
|
while (1) {
|
|
4061
4603
|
switch (_context36.prev = _context36.next) {
|
|
4062
4604
|
case 0:
|
|
@@ -4122,9 +4664,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4122
4664
|
_proto.getUserPreferenceFromConsultId =
|
|
4123
4665
|
/*#__PURE__*/
|
|
4124
4666
|
function () {
|
|
4125
|
-
var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4667
|
+
var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(consultationId) {
|
|
4126
4668
|
var grant;
|
|
4127
|
-
return
|
|
4669
|
+
return runtime_1.wrap(function _callee36$(_context37) {
|
|
4128
4670
|
while (1) {
|
|
4129
4671
|
switch (_context37.prev = _context37.next) {
|
|
4130
4672
|
case 0:
|
|
@@ -4171,9 +4713,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4171
4713
|
_proto.getUserPreference =
|
|
4172
4714
|
/*#__PURE__*/
|
|
4173
4715
|
function () {
|
|
4174
|
-
var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4716
|
+
var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(identity) {
|
|
4175
4717
|
var grant;
|
|
4176
|
-
return
|
|
4718
|
+
return runtime_1.wrap(function _callee37$(_context38) {
|
|
4177
4719
|
while (1) {
|
|
4178
4720
|
switch (_context38.prev = _context38.next) {
|
|
4179
4721
|
case 0:
|
|
@@ -4222,9 +4764,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4222
4764
|
_proto.getRecoveryDataFromConsultId =
|
|
4223
4765
|
/*#__PURE__*/
|
|
4224
4766
|
function () {
|
|
4225
|
-
var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4767
|
+
var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(consultationId) {
|
|
4226
4768
|
var grant;
|
|
4227
|
-
return
|
|
4769
|
+
return runtime_1.wrap(function _callee38$(_context39) {
|
|
4228
4770
|
while (1) {
|
|
4229
4771
|
switch (_context39.prev = _context39.next) {
|
|
4230
4772
|
case 0:
|
|
@@ -4271,9 +4813,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4271
4813
|
_proto.getRecoveryData =
|
|
4272
4814
|
/*#__PURE__*/
|
|
4273
4815
|
function () {
|
|
4274
|
-
var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4816
|
+
var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(identity) {
|
|
4275
4817
|
var grant;
|
|
4276
|
-
return
|
|
4818
|
+
return runtime_1.wrap(function _callee39$(_context40) {
|
|
4277
4819
|
while (1) {
|
|
4278
4820
|
switch (_context40.prev = _context40.next) {
|
|
4279
4821
|
case 0:
|
|
@@ -4327,10 +4869,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4327
4869
|
_proto.getAssignedConsultations =
|
|
4328
4870
|
/*#__PURE__*/
|
|
4329
4871
|
function () {
|
|
4330
|
-
var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4872
|
+
var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(practiceUuid, forceRefresh) {
|
|
4331
4873
|
var _this5 = this;
|
|
4332
4874
|
|
|
4333
|
-
return
|
|
4875
|
+
return runtime_1.wrap(function _callee41$(_context42) {
|
|
4334
4876
|
while (1) {
|
|
4335
4877
|
switch (_context42.prev = _context42.next) {
|
|
4336
4878
|
case 0:
|
|
@@ -4349,8 +4891,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4349
4891
|
documentType: initApis.DocumentType.PopulatedWorkflowData
|
|
4350
4892
|
}, true, undefined, forceRefresh).then(function (manifest) {
|
|
4351
4893
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
|
4352
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/
|
|
4353
|
-
return
|
|
4894
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(entry) {
|
|
4895
|
+
return runtime_1.wrap(function _callee40$(_context41) {
|
|
4354
4896
|
while (1) {
|
|
4355
4897
|
switch (_context41.prev = _context41.next) {
|
|
4356
4898
|
case 0:
|
|
@@ -4404,11 +4946,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4404
4946
|
_proto.getPastConsultationsFromConsultId =
|
|
4405
4947
|
/*#__PURE__*/
|
|
4406
4948
|
function () {
|
|
4407
|
-
var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4949
|
+
var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(consultationId, practiceUuid) {
|
|
4408
4950
|
var _this6 = this;
|
|
4409
4951
|
|
|
4410
4952
|
var grant, consultationsInLockbox;
|
|
4411
|
-
return
|
|
4953
|
+
return runtime_1.wrap(function _callee43$(_context44) {
|
|
4412
4954
|
while (1) {
|
|
4413
4955
|
switch (_context44.prev = _context44.next) {
|
|
4414
4956
|
case 0:
|
|
@@ -4447,8 +4989,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4447
4989
|
case 10:
|
|
4448
4990
|
_context44.next = 12;
|
|
4449
4991
|
return Promise.all(consultationsInLockbox.map( /*#__PURE__*/function () {
|
|
4450
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/
|
|
4451
|
-
return
|
|
4992
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(consultId) {
|
|
4993
|
+
return runtime_1.wrap(function _callee42$(_context43) {
|
|
4452
4994
|
while (1) {
|
|
4453
4995
|
switch (_context43.prev = _context43.next) {
|
|
4454
4996
|
case 0:
|
|
@@ -4499,10 +5041,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4499
5041
|
_proto.getPatientConsultationData =
|
|
4500
5042
|
/*#__PURE__*/
|
|
4501
5043
|
function () {
|
|
4502
|
-
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
5044
|
+
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(consultationId, forceRefresh) {
|
|
4503
5045
|
var _this7 = this;
|
|
4504
5046
|
|
|
4505
|
-
return
|
|
5047
|
+
return runtime_1.wrap(function _callee44$(_context45) {
|
|
4506
5048
|
while (1) {
|
|
4507
5049
|
switch (_context45.prev = _context45.next) {
|
|
4508
5050
|
case 0:
|
|
@@ -4556,8 +5098,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4556
5098
|
_proto.getPatientPrescriptionsList =
|
|
4557
5099
|
/*#__PURE__*/
|
|
4558
5100
|
function () {
|
|
4559
|
-
var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4560
|
-
return
|
|
5101
|
+
var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(consultationId) {
|
|
5102
|
+
return runtime_1.wrap(function _callee45$(_context46) {
|
|
4561
5103
|
while (1) {
|
|
4562
5104
|
switch (_context46.prev = _context46.next) {
|
|
4563
5105
|
case 0:
|
|
@@ -4590,8 +5132,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4590
5132
|
_proto.getPatientResultsList =
|
|
4591
5133
|
/*#__PURE__*/
|
|
4592
5134
|
function () {
|
|
4593
|
-
var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4594
|
-
return
|
|
5135
|
+
var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(consultationId) {
|
|
5136
|
+
return runtime_1.wrap(function _callee46$(_context47) {
|
|
4595
5137
|
while (1) {
|
|
4596
5138
|
switch (_context47.prev = _context47.next) {
|
|
4597
5139
|
case 0:
|
|
@@ -4624,8 +5166,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4624
5166
|
_proto.getPatientTreatmentPlans =
|
|
4625
5167
|
/*#__PURE__*/
|
|
4626
5168
|
function () {
|
|
4627
|
-
var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4628
|
-
return
|
|
5169
|
+
var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(consultationId) {
|
|
5170
|
+
return runtime_1.wrap(function _callee47$(_context48) {
|
|
4629
5171
|
while (1) {
|
|
4630
5172
|
switch (_context48.prev = _context48.next) {
|
|
4631
5173
|
case 0:
|
|
@@ -4659,8 +5201,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4659
5201
|
_proto.getPatientTreatmentPlanByUuid =
|
|
4660
5202
|
/*#__PURE__*/
|
|
4661
5203
|
function () {
|
|
4662
|
-
var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
4663
|
-
return
|
|
5204
|
+
var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(consultationId, treatmentPlanId) {
|
|
5205
|
+
return runtime_1.wrap(function _callee48$(_context49) {
|
|
4664
5206
|
while (1) {
|
|
4665
5207
|
switch (_context49.prev = _context49.next) {
|
|
4666
5208
|
case 0:
|
|
@@ -4698,10 +5240,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4698
5240
|
_proto.getPatientDocumentsList =
|
|
4699
5241
|
/*#__PURE__*/
|
|
4700
5242
|
function () {
|
|
4701
|
-
var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
5243
|
+
var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(filters, expandPrivateMetadata, consultationId) {
|
|
4702
5244
|
var _this8 = this;
|
|
4703
5245
|
|
|
4704
|
-
return
|
|
5246
|
+
return runtime_1.wrap(function _callee50$(_context51) {
|
|
4705
5247
|
while (1) {
|
|
4706
5248
|
switch (_context51.prev = _context51.next) {
|
|
4707
5249
|
case 0:
|
|
@@ -4717,8 +5259,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4717
5259
|
consultationId: consultationId
|
|
4718
5260
|
}), expandPrivateMetadata, grant.lockboxOwnerUuid, true).then(function (manifest) {
|
|
4719
5261
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
|
4720
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/
|
|
4721
|
-
return
|
|
5262
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(entry) {
|
|
5263
|
+
return runtime_1.wrap(function _callee49$(_context50) {
|
|
4722
5264
|
while (1) {
|
|
4723
5265
|
switch (_context50.prev = _context50.next) {
|
|
4724
5266
|
case 0:
|
|
@@ -4776,9 +5318,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4776
5318
|
_proto.recoverPrivateKeyFromSecurityQuestions =
|
|
4777
5319
|
/*#__PURE__*/
|
|
4778
5320
|
function () {
|
|
4779
|
-
var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
5321
|
+
var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
|
|
4780
5322
|
var shards, answeredShards, privateKey;
|
|
4781
|
-
return
|
|
5323
|
+
return runtime_1.wrap(function _callee51$(_context52) {
|
|
4782
5324
|
while (1) {
|
|
4783
5325
|
switch (_context52.prev = _context52.next) {
|
|
4784
5326
|
case 0:
|
|
@@ -4832,9 +5374,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4832
5374
|
_proto.recoverPrivateKeyFromPassword =
|
|
4833
5375
|
/*#__PURE__*/
|
|
4834
5376
|
function () {
|
|
4835
|
-
var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
5377
|
+
var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(id, password) {
|
|
4836
5378
|
var identity, recoveryPayload, symmetricDecryptor, privateKey, symetricEncryptor;
|
|
4837
|
-
return
|
|
5379
|
+
return runtime_1.wrap(function _callee52$(_context53) {
|
|
4838
5380
|
while (1) {
|
|
4839
5381
|
switch (_context53.prev = _context53.next) {
|
|
4840
5382
|
case 0:
|
|
@@ -4880,9 +5422,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4880
5422
|
_proto.recoverPrivateKeyFromMasterKey =
|
|
4881
5423
|
/*#__PURE__*/
|
|
4882
5424
|
function () {
|
|
4883
|
-
var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
5425
|
+
var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(id, masterKey) {
|
|
4884
5426
|
var recoveryPayload, symmetricDecryptor, privateKey;
|
|
4885
|
-
return
|
|
5427
|
+
return runtime_1.wrap(function _callee53$(_context54) {
|
|
4886
5428
|
while (1) {
|
|
4887
5429
|
switch (_context54.prev = _context54.next) {
|
|
4888
5430
|
case 0:
|
|
@@ -4922,9 +5464,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4922
5464
|
_proto.updateSecurityQuestions =
|
|
4923
5465
|
/*#__PURE__*/
|
|
4924
5466
|
function () {
|
|
4925
|
-
var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
5467
|
+
var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
|
|
4926
5468
|
var securityQuestionPayload, updateRequest;
|
|
4927
|
-
return
|
|
5469
|
+
return runtime_1.wrap(function _callee54$(_context55) {
|
|
4928
5470
|
while (1) {
|
|
4929
5471
|
switch (_context55.prev = _context55.next) {
|
|
4930
5472
|
case 0:
|
|
@@ -4976,9 +5518,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
4976
5518
|
_proto.updatePassword =
|
|
4977
5519
|
/*#__PURE__*/
|
|
4978
5520
|
function () {
|
|
4979
|
-
var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
5521
|
+
var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee55(id, newPassword, oldPassword) {
|
|
4980
5522
|
var symmetricEncryptor, passwordPayload, updateRequest;
|
|
4981
|
-
return
|
|
5523
|
+
return runtime_1.wrap(function _callee55$(_context56) {
|
|
4982
5524
|
while (1) {
|
|
4983
5525
|
switch (_context56.prev = _context56.next) {
|
|
4984
5526
|
case 0:
|
|
@@ -5038,9 +5580,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
|
5038
5580
|
_proto.updateMasterKey =
|
|
5039
5581
|
/*#__PURE__*/
|
|
5040
5582
|
function () {
|
|
5041
|
-
var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
5583
|
+
var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee56(id, masterKey, lockboxUuid) {
|
|
5042
5584
|
var symmetricEncryptor, masterKeyPayload, updateRequest, updatedIdentity;
|
|
5043
|
-
return
|
|
5585
|
+
return runtime_1.wrap(function _callee56$(_context57) {
|
|
5044
5586
|
while (1) {
|
|
5045
5587
|
switch (_context57.prev = _context57.next) {
|
|
5046
5588
|
case 0:
|
|
@@ -5198,11 +5740,13 @@ exports.MissingLockbox = MissingLockbox;
|
|
|
5198
5740
|
exports.MissingLockboxOwner = MissingLockboxOwner;
|
|
5199
5741
|
exports.OroClient = OroClient;
|
|
5200
5742
|
exports.WorkflowAnswersMissingError = WorkflowAnswersMissingError;
|
|
5743
|
+
exports.buildConsultSearchIndex = buildConsultSearchIndex;
|
|
5201
5744
|
exports.decryptConsultLockboxGrants = decryptConsultLockboxGrants;
|
|
5202
5745
|
exports.decryptGrants = decryptGrants;
|
|
5203
5746
|
exports.default = init;
|
|
5204
5747
|
exports.extractAndStorePersonalWorkflowData = extractAndStorePersonalWorkflowData;
|
|
5205
5748
|
exports.extractISOLocalityForConsult = extractISOLocalityForConsult;
|
|
5749
|
+
exports.extractPersonalInfoFromWorkflowData = extractPersonalInfoFromWorkflowData;
|
|
5206
5750
|
exports.fillWorkflowFromPopulatedWorkflow = fillWorkflowFromPopulatedWorkflow;
|
|
5207
5751
|
exports.filterTriggeredAnsweredWithKind = filterTriggeredAnsweredWithKind;
|
|
5208
5752
|
exports.flattenSelectedAnswers = flattenSelectedAnswers;
|