oro-sdk 3.12.0 → 3.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,351 +5,6 @@ import * as oroToolbox from 'oro-toolbox';
5
5
  export { oroToolbox as OroToolboxNamespace };
6
6
  import { getMany } from 'idb-keyval';
7
7
 
8
- function _regeneratorRuntime() {
9
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
10
-
11
- _regeneratorRuntime = function () {
12
- return exports;
13
- };
14
-
15
- var exports = {},
16
- Op = Object.prototype,
17
- hasOwn = Op.hasOwnProperty,
18
- $Symbol = "function" == typeof Symbol ? Symbol : {},
19
- iteratorSymbol = $Symbol.iterator || "@@iterator",
20
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
21
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
22
-
23
- function define(obj, key, value) {
24
- return Object.defineProperty(obj, key, {
25
- value: value,
26
- enumerable: !0,
27
- configurable: !0,
28
- writable: !0
29
- }), obj[key];
30
- }
31
-
32
- try {
33
- define({}, "");
34
- } catch (err) {
35
- define = function (obj, key, value) {
36
- return obj[key] = value;
37
- };
38
- }
39
-
40
- function wrap(innerFn, outerFn, self, tryLocsList) {
41
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
42
- generator = Object.create(protoGenerator.prototype),
43
- context = new Context(tryLocsList || []);
44
- return generator._invoke = function (innerFn, self, context) {
45
- var state = "suspendedStart";
46
- return function (method, arg) {
47
- if ("executing" === state) throw new Error("Generator is already running");
48
-
49
- if ("completed" === state) {
50
- if ("throw" === method) throw arg;
51
- return doneResult();
52
- }
53
-
54
- for (context.method = method, context.arg = arg;;) {
55
- var delegate = context.delegate;
56
-
57
- if (delegate) {
58
- var delegateResult = maybeInvokeDelegate(delegate, context);
59
-
60
- if (delegateResult) {
61
- if (delegateResult === ContinueSentinel) continue;
62
- return delegateResult;
63
- }
64
- }
65
-
66
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
67
- if ("suspendedStart" === state) throw state = "completed", context.arg;
68
- context.dispatchException(context.arg);
69
- } else "return" === context.method && context.abrupt("return", context.arg);
70
- state = "executing";
71
- var record = tryCatch(innerFn, self, context);
72
-
73
- if ("normal" === record.type) {
74
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
75
- return {
76
- value: record.arg,
77
- done: context.done
78
- };
79
- }
80
-
81
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
82
- }
83
- };
84
- }(innerFn, self, context), generator;
85
- }
86
-
87
- function tryCatch(fn, obj, arg) {
88
- try {
89
- return {
90
- type: "normal",
91
- arg: fn.call(obj, arg)
92
- };
93
- } catch (err) {
94
- return {
95
- type: "throw",
96
- arg: err
97
- };
98
- }
99
- }
100
-
101
- exports.wrap = wrap;
102
- var ContinueSentinel = {};
103
-
104
- function Generator() {}
105
-
106
- function GeneratorFunction() {}
107
-
108
- function GeneratorFunctionPrototype() {}
109
-
110
- var IteratorPrototype = {};
111
- define(IteratorPrototype, iteratorSymbol, function () {
112
- return this;
113
- });
114
- var getProto = Object.getPrototypeOf,
115
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
116
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
117
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
118
-
119
- function defineIteratorMethods(prototype) {
120
- ["next", "throw", "return"].forEach(function (method) {
121
- define(prototype, method, function (arg) {
122
- return this._invoke(method, arg);
123
- });
124
- });
125
- }
126
-
127
- function AsyncIterator(generator, PromiseImpl) {
128
- function invoke(method, arg, resolve, reject) {
129
- var record = tryCatch(generator[method], generator, arg);
130
-
131
- if ("throw" !== record.type) {
132
- var result = record.arg,
133
- value = result.value;
134
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
135
- invoke("next", value, resolve, reject);
136
- }, function (err) {
137
- invoke("throw", err, resolve, reject);
138
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
139
- result.value = unwrapped, resolve(result);
140
- }, function (error) {
141
- return invoke("throw", error, resolve, reject);
142
- });
143
- }
144
-
145
- reject(record.arg);
146
- }
147
-
148
- var previousPromise;
149
-
150
- this._invoke = function (method, arg) {
151
- function callInvokeWithMethodAndArg() {
152
- return new PromiseImpl(function (resolve, reject) {
153
- invoke(method, arg, resolve, reject);
154
- });
155
- }
156
-
157
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
158
- };
159
- }
160
-
161
- function maybeInvokeDelegate(delegate, context) {
162
- var method = delegate.iterator[context.method];
163
-
164
- if (undefined === method) {
165
- if (context.delegate = null, "throw" === context.method) {
166
- if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
167
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
168
- }
169
-
170
- return ContinueSentinel;
171
- }
172
-
173
- var record = tryCatch(method, delegate.iterator, context.arg);
174
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
175
- var info = record.arg;
176
- 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);
177
- }
178
-
179
- function pushTryEntry(locs) {
180
- var entry = {
181
- tryLoc: locs[0]
182
- };
183
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
184
- }
185
-
186
- function resetTryEntry(entry) {
187
- var record = entry.completion || {};
188
- record.type = "normal", delete record.arg, entry.completion = record;
189
- }
190
-
191
- function Context(tryLocsList) {
192
- this.tryEntries = [{
193
- tryLoc: "root"
194
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
195
- }
196
-
197
- function values(iterable) {
198
- if (iterable) {
199
- var iteratorMethod = iterable[iteratorSymbol];
200
- if (iteratorMethod) return iteratorMethod.call(iterable);
201
- if ("function" == typeof iterable.next) return iterable;
202
-
203
- if (!isNaN(iterable.length)) {
204
- var i = -1,
205
- next = function next() {
206
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
207
-
208
- return next.value = undefined, next.done = !0, next;
209
- };
210
-
211
- return next.next = next;
212
- }
213
- }
214
-
215
- return {
216
- next: doneResult
217
- };
218
- }
219
-
220
- function doneResult() {
221
- return {
222
- value: undefined,
223
- done: !0
224
- };
225
- }
226
-
227
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
228
- var ctor = "function" == typeof genFun && genFun.constructor;
229
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
230
- }, exports.mark = function (genFun) {
231
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
232
- }, exports.awrap = function (arg) {
233
- return {
234
- __await: arg
235
- };
236
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
237
- return this;
238
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
239
- void 0 === PromiseImpl && (PromiseImpl = Promise);
240
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
241
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
242
- return result.done ? result.value : iter.next();
243
- });
244
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
245
- return this;
246
- }), define(Gp, "toString", function () {
247
- return "[object Generator]";
248
- }), exports.keys = function (object) {
249
- var keys = [];
250
-
251
- for (var key in object) keys.push(key);
252
-
253
- return keys.reverse(), function next() {
254
- for (; keys.length;) {
255
- var key = keys.pop();
256
- if (key in object) return next.value = key, next.done = !1, next;
257
- }
258
-
259
- return next.done = !0, next;
260
- };
261
- }, exports.values = values, Context.prototype = {
262
- constructor: Context,
263
- reset: function (skipTempReset) {
264
- 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);
265
- },
266
- stop: function () {
267
- this.done = !0;
268
- var rootRecord = this.tryEntries[0].completion;
269
- if ("throw" === rootRecord.type) throw rootRecord.arg;
270
- return this.rval;
271
- },
272
- dispatchException: function (exception) {
273
- if (this.done) throw exception;
274
- var context = this;
275
-
276
- function handle(loc, caught) {
277
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
278
- }
279
-
280
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
281
- var entry = this.tryEntries[i],
282
- record = entry.completion;
283
- if ("root" === entry.tryLoc) return handle("end");
284
-
285
- if (entry.tryLoc <= this.prev) {
286
- var hasCatch = hasOwn.call(entry, "catchLoc"),
287
- hasFinally = hasOwn.call(entry, "finallyLoc");
288
-
289
- if (hasCatch && hasFinally) {
290
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
291
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
292
- } else if (hasCatch) {
293
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
294
- } else {
295
- if (!hasFinally) throw new Error("try statement without catch or finally");
296
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
297
- }
298
- }
299
- }
300
- },
301
- abrupt: function (type, arg) {
302
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
303
- var entry = this.tryEntries[i];
304
-
305
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
306
- var finallyEntry = entry;
307
- break;
308
- }
309
- }
310
-
311
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
312
- var record = finallyEntry ? finallyEntry.completion : {};
313
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
314
- },
315
- complete: function (record, afterLoc) {
316
- if ("throw" === record.type) throw record.arg;
317
- 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;
318
- },
319
- finish: function (finallyLoc) {
320
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
321
- var entry = this.tryEntries[i];
322
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
323
- }
324
- },
325
- catch: function (tryLoc) {
326
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
327
- var entry = this.tryEntries[i];
328
-
329
- if (entry.tryLoc === tryLoc) {
330
- var record = entry.completion;
331
-
332
- if ("throw" === record.type) {
333
- var thrown = record.arg;
334
- resetTryEntry(entry);
335
- }
336
-
337
- return thrown;
338
- }
339
- }
340
-
341
- throw new Error("illegal catch attempt");
342
- },
343
- delegateYield: function (iterable, resultName, nextLoc) {
344
- return this.delegate = {
345
- iterator: values(iterable),
346
- resultName: resultName,
347
- nextLoc: nextLoc
348
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
349
- }
350
- }, exports;
351
- }
352
-
353
8
  function _wrapRegExp() {
354
9
  _wrapRegExp = function (re, groups) {
355
10
  return new BabelRegExp(re, void 0, groups);
@@ -435,7 +90,7 @@ function _asyncToGenerator(fn) {
435
90
  }
436
91
 
437
92
  function _extends() {
438
- _extends = Object.assign ? Object.assign.bind() : function (target) {
93
+ _extends = Object.assign || function (target) {
439
94
  for (var i = 1; i < arguments.length; i++) {
440
95
  var source = arguments[i];
441
96
 
@@ -448,6 +103,7 @@ function _extends() {
448
103
 
449
104
  return target;
450
105
  };
106
+
451
107
  return _extends.apply(this, arguments);
452
108
  }
453
109
 
@@ -477,17 +133,18 @@ function _inheritsLoose(subClass, superClass) {
477
133
  }
478
134
 
479
135
  function _getPrototypeOf(o) {
480
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
136
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
481
137
  return o.__proto__ || Object.getPrototypeOf(o);
482
138
  };
483
139
  return _getPrototypeOf(o);
484
140
  }
485
141
 
486
142
  function _setPrototypeOf(o, p) {
487
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
143
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
488
144
  o.__proto__ = p;
489
145
  return o;
490
146
  };
147
+
491
148
  return _setPrototypeOf(o, p);
492
149
  }
493
150
 
@@ -506,7 +163,7 @@ function _isNativeReflectConstruct() {
506
163
 
507
164
  function _construct(Parent, args, Class) {
508
165
  if (_isNativeReflectConstruct()) {
509
- _construct = Reflect.construct.bind();
166
+ _construct = Reflect.construct;
510
167
  } else {
511
168
  _construct = function _construct(Parent, args, Class) {
512
169
  var a = [null];
@@ -612,6 +269,766 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
612
269
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
613
270
  }
614
271
 
272
+ function createCommonjsModule(fn, module) {
273
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
274
+ }
275
+
276
+ var runtime_1 = createCommonjsModule(function (module) {
277
+ /**
278
+ * Copyright (c) 2014-present, Facebook, Inc.
279
+ *
280
+ * This source code is licensed under the MIT license found in the
281
+ * LICENSE file in the root directory of this source tree.
282
+ */
283
+
284
+ var runtime = (function (exports) {
285
+
286
+ var Op = Object.prototype;
287
+ var hasOwn = Op.hasOwnProperty;
288
+ var undefined$1; // More compressible than void 0.
289
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
290
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
291
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
292
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
293
+
294
+ function define(obj, key, value) {
295
+ Object.defineProperty(obj, key, {
296
+ value: value,
297
+ enumerable: true,
298
+ configurable: true,
299
+ writable: true
300
+ });
301
+ return obj[key];
302
+ }
303
+ try {
304
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
305
+ define({}, "");
306
+ } catch (err) {
307
+ define = function(obj, key, value) {
308
+ return obj[key] = value;
309
+ };
310
+ }
311
+
312
+ function wrap(innerFn, outerFn, self, tryLocsList) {
313
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
314
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
315
+ var generator = Object.create(protoGenerator.prototype);
316
+ var context = new Context(tryLocsList || []);
317
+
318
+ // The ._invoke method unifies the implementations of the .next,
319
+ // .throw, and .return methods.
320
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
321
+
322
+ return generator;
323
+ }
324
+ exports.wrap = wrap;
325
+
326
+ // Try/catch helper to minimize deoptimizations. Returns a completion
327
+ // record like context.tryEntries[i].completion. This interface could
328
+ // have been (and was previously) designed to take a closure to be
329
+ // invoked without arguments, but in all the cases we care about we
330
+ // already have an existing method we want to call, so there's no need
331
+ // to create a new function object. We can even get away with assuming
332
+ // the method takes exactly one argument, since that happens to be true
333
+ // in every case, so we don't have to touch the arguments object. The
334
+ // only additional allocation required is the completion record, which
335
+ // has a stable shape and so hopefully should be cheap to allocate.
336
+ function tryCatch(fn, obj, arg) {
337
+ try {
338
+ return { type: "normal", arg: fn.call(obj, arg) };
339
+ } catch (err) {
340
+ return { type: "throw", arg: err };
341
+ }
342
+ }
343
+
344
+ var GenStateSuspendedStart = "suspendedStart";
345
+ var GenStateSuspendedYield = "suspendedYield";
346
+ var GenStateExecuting = "executing";
347
+ var GenStateCompleted = "completed";
348
+
349
+ // Returning this object from the innerFn has the same effect as
350
+ // breaking out of the dispatch switch statement.
351
+ var ContinueSentinel = {};
352
+
353
+ // Dummy constructor functions that we use as the .constructor and
354
+ // .constructor.prototype properties for functions that return Generator
355
+ // objects. For full spec compliance, you may wish to configure your
356
+ // minifier not to mangle the names of these two functions.
357
+ function Generator() {}
358
+ function GeneratorFunction() {}
359
+ function GeneratorFunctionPrototype() {}
360
+
361
+ // This is a polyfill for %IteratorPrototype% for environments that
362
+ // don't natively support it.
363
+ var IteratorPrototype = {};
364
+ define(IteratorPrototype, iteratorSymbol, function () {
365
+ return this;
366
+ });
367
+
368
+ var getProto = Object.getPrototypeOf;
369
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
370
+ if (NativeIteratorPrototype &&
371
+ NativeIteratorPrototype !== Op &&
372
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
373
+ // This environment has a native %IteratorPrototype%; use it instead
374
+ // of the polyfill.
375
+ IteratorPrototype = NativeIteratorPrototype;
376
+ }
377
+
378
+ var Gp = GeneratorFunctionPrototype.prototype =
379
+ Generator.prototype = Object.create(IteratorPrototype);
380
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
381
+ define(Gp, "constructor", GeneratorFunctionPrototype);
382
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
383
+ GeneratorFunction.displayName = define(
384
+ GeneratorFunctionPrototype,
385
+ toStringTagSymbol,
386
+ "GeneratorFunction"
387
+ );
388
+
389
+ // Helper for defining the .next, .throw, and .return methods of the
390
+ // Iterator interface in terms of a single ._invoke method.
391
+ function defineIteratorMethods(prototype) {
392
+ ["next", "throw", "return"].forEach(function(method) {
393
+ define(prototype, method, function(arg) {
394
+ return this._invoke(method, arg);
395
+ });
396
+ });
397
+ }
398
+
399
+ exports.isGeneratorFunction = function(genFun) {
400
+ var ctor = typeof genFun === "function" && genFun.constructor;
401
+ return ctor
402
+ ? ctor === GeneratorFunction ||
403
+ // For the native GeneratorFunction constructor, the best we can
404
+ // do is to check its .name property.
405
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
406
+ : false;
407
+ };
408
+
409
+ exports.mark = function(genFun) {
410
+ if (Object.setPrototypeOf) {
411
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
412
+ } else {
413
+ genFun.__proto__ = GeneratorFunctionPrototype;
414
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
415
+ }
416
+ genFun.prototype = Object.create(Gp);
417
+ return genFun;
418
+ };
419
+
420
+ // Within the body of any async function, `await x` is transformed to
421
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
422
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
423
+ // meant to be awaited.
424
+ exports.awrap = function(arg) {
425
+ return { __await: arg };
426
+ };
427
+
428
+ function AsyncIterator(generator, PromiseImpl) {
429
+ function invoke(method, arg, resolve, reject) {
430
+ var record = tryCatch(generator[method], generator, arg);
431
+ if (record.type === "throw") {
432
+ reject(record.arg);
433
+ } else {
434
+ var result = record.arg;
435
+ var value = result.value;
436
+ if (value &&
437
+ typeof value === "object" &&
438
+ hasOwn.call(value, "__await")) {
439
+ return PromiseImpl.resolve(value.__await).then(function(value) {
440
+ invoke("next", value, resolve, reject);
441
+ }, function(err) {
442
+ invoke("throw", err, resolve, reject);
443
+ });
444
+ }
445
+
446
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
447
+ // When a yielded Promise is resolved, its final value becomes
448
+ // the .value of the Promise<{value,done}> result for the
449
+ // current iteration.
450
+ result.value = unwrapped;
451
+ resolve(result);
452
+ }, function(error) {
453
+ // If a rejected Promise was yielded, throw the rejection back
454
+ // into the async generator function so it can be handled there.
455
+ return invoke("throw", error, resolve, reject);
456
+ });
457
+ }
458
+ }
459
+
460
+ var previousPromise;
461
+
462
+ function enqueue(method, arg) {
463
+ function callInvokeWithMethodAndArg() {
464
+ return new PromiseImpl(function(resolve, reject) {
465
+ invoke(method, arg, resolve, reject);
466
+ });
467
+ }
468
+
469
+ return previousPromise =
470
+ // If enqueue has been called before, then we want to wait until
471
+ // all previous Promises have been resolved before calling invoke,
472
+ // so that results are always delivered in the correct order. If
473
+ // enqueue has not been called before, then it is important to
474
+ // call invoke immediately, without waiting on a callback to fire,
475
+ // so that the async generator function has the opportunity to do
476
+ // any necessary setup in a predictable way. This predictability
477
+ // is why the Promise constructor synchronously invokes its
478
+ // executor callback, and why async functions synchronously
479
+ // execute code before the first await. Since we implement simple
480
+ // async functions in terms of async generators, it is especially
481
+ // important to get this right, even though it requires care.
482
+ previousPromise ? previousPromise.then(
483
+ callInvokeWithMethodAndArg,
484
+ // Avoid propagating failures to Promises returned by later
485
+ // invocations of the iterator.
486
+ callInvokeWithMethodAndArg
487
+ ) : callInvokeWithMethodAndArg();
488
+ }
489
+
490
+ // Define the unified helper method that is used to implement .next,
491
+ // .throw, and .return (see defineIteratorMethods).
492
+ this._invoke = enqueue;
493
+ }
494
+
495
+ defineIteratorMethods(AsyncIterator.prototype);
496
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
497
+ return this;
498
+ });
499
+ exports.AsyncIterator = AsyncIterator;
500
+
501
+ // Note that simple async functions are implemented on top of
502
+ // AsyncIterator objects; they just return a Promise for the value of
503
+ // the final result produced by the iterator.
504
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
505
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
506
+
507
+ var iter = new AsyncIterator(
508
+ wrap(innerFn, outerFn, self, tryLocsList),
509
+ PromiseImpl
510
+ );
511
+
512
+ return exports.isGeneratorFunction(outerFn)
513
+ ? iter // If outerFn is a generator, return the full iterator.
514
+ : iter.next().then(function(result) {
515
+ return result.done ? result.value : iter.next();
516
+ });
517
+ };
518
+
519
+ function makeInvokeMethod(innerFn, self, context) {
520
+ var state = GenStateSuspendedStart;
521
+
522
+ return function invoke(method, arg) {
523
+ if (state === GenStateExecuting) {
524
+ throw new Error("Generator is already running");
525
+ }
526
+
527
+ if (state === GenStateCompleted) {
528
+ if (method === "throw") {
529
+ throw arg;
530
+ }
531
+
532
+ // Be forgiving, per 25.3.3.3.3 of the spec:
533
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
534
+ return doneResult();
535
+ }
536
+
537
+ context.method = method;
538
+ context.arg = arg;
539
+
540
+ while (true) {
541
+ var delegate = context.delegate;
542
+ if (delegate) {
543
+ var delegateResult = maybeInvokeDelegate(delegate, context);
544
+ if (delegateResult) {
545
+ if (delegateResult === ContinueSentinel) continue;
546
+ return delegateResult;
547
+ }
548
+ }
549
+
550
+ if (context.method === "next") {
551
+ // Setting context._sent for legacy support of Babel's
552
+ // function.sent implementation.
553
+ context.sent = context._sent = context.arg;
554
+
555
+ } else if (context.method === "throw") {
556
+ if (state === GenStateSuspendedStart) {
557
+ state = GenStateCompleted;
558
+ throw context.arg;
559
+ }
560
+
561
+ context.dispatchException(context.arg);
562
+
563
+ } else if (context.method === "return") {
564
+ context.abrupt("return", context.arg);
565
+ }
566
+
567
+ state = GenStateExecuting;
568
+
569
+ var record = tryCatch(innerFn, self, context);
570
+ if (record.type === "normal") {
571
+ // If an exception is thrown from innerFn, we leave state ===
572
+ // GenStateExecuting and loop back for another invocation.
573
+ state = context.done
574
+ ? GenStateCompleted
575
+ : GenStateSuspendedYield;
576
+
577
+ if (record.arg === ContinueSentinel) {
578
+ continue;
579
+ }
580
+
581
+ return {
582
+ value: record.arg,
583
+ done: context.done
584
+ };
585
+
586
+ } else if (record.type === "throw") {
587
+ state = GenStateCompleted;
588
+ // Dispatch the exception by looping back around to the
589
+ // context.dispatchException(context.arg) call above.
590
+ context.method = "throw";
591
+ context.arg = record.arg;
592
+ }
593
+ }
594
+ };
595
+ }
596
+
597
+ // Call delegate.iterator[context.method](context.arg) and handle the
598
+ // result, either by returning a { value, done } result from the
599
+ // delegate iterator, or by modifying context.method and context.arg,
600
+ // setting context.delegate to null, and returning the ContinueSentinel.
601
+ function maybeInvokeDelegate(delegate, context) {
602
+ var method = delegate.iterator[context.method];
603
+ if (method === undefined$1) {
604
+ // A .throw or .return when the delegate iterator has no .throw
605
+ // method always terminates the yield* loop.
606
+ context.delegate = null;
607
+
608
+ if (context.method === "throw") {
609
+ // Note: ["return"] must be used for ES3 parsing compatibility.
610
+ if (delegate.iterator["return"]) {
611
+ // If the delegate iterator has a return method, give it a
612
+ // chance to clean up.
613
+ context.method = "return";
614
+ context.arg = undefined$1;
615
+ maybeInvokeDelegate(delegate, context);
616
+
617
+ if (context.method === "throw") {
618
+ // If maybeInvokeDelegate(context) changed context.method from
619
+ // "return" to "throw", let that override the TypeError below.
620
+ return ContinueSentinel;
621
+ }
622
+ }
623
+
624
+ context.method = "throw";
625
+ context.arg = new TypeError(
626
+ "The iterator does not provide a 'throw' method");
627
+ }
628
+
629
+ return ContinueSentinel;
630
+ }
631
+
632
+ var record = tryCatch(method, delegate.iterator, context.arg);
633
+
634
+ if (record.type === "throw") {
635
+ context.method = "throw";
636
+ context.arg = record.arg;
637
+ context.delegate = null;
638
+ return ContinueSentinel;
639
+ }
640
+
641
+ var info = record.arg;
642
+
643
+ if (! info) {
644
+ context.method = "throw";
645
+ context.arg = new TypeError("iterator result is not an object");
646
+ context.delegate = null;
647
+ return ContinueSentinel;
648
+ }
649
+
650
+ if (info.done) {
651
+ // Assign the result of the finished delegate to the temporary
652
+ // variable specified by delegate.resultName (see delegateYield).
653
+ context[delegate.resultName] = info.value;
654
+
655
+ // Resume execution at the desired location (see delegateYield).
656
+ context.next = delegate.nextLoc;
657
+
658
+ // If context.method was "throw" but the delegate handled the
659
+ // exception, let the outer generator proceed normally. If
660
+ // context.method was "next", forget context.arg since it has been
661
+ // "consumed" by the delegate iterator. If context.method was
662
+ // "return", allow the original .return call to continue in the
663
+ // outer generator.
664
+ if (context.method !== "return") {
665
+ context.method = "next";
666
+ context.arg = undefined$1;
667
+ }
668
+
669
+ } else {
670
+ // Re-yield the result returned by the delegate method.
671
+ return info;
672
+ }
673
+
674
+ // The delegate iterator is finished, so forget it and continue with
675
+ // the outer generator.
676
+ context.delegate = null;
677
+ return ContinueSentinel;
678
+ }
679
+
680
+ // Define Generator.prototype.{next,throw,return} in terms of the
681
+ // unified ._invoke helper method.
682
+ defineIteratorMethods(Gp);
683
+
684
+ define(Gp, toStringTagSymbol, "Generator");
685
+
686
+ // A Generator should always return itself as the iterator object when the
687
+ // @@iterator function is called on it. Some browsers' implementations of the
688
+ // iterator prototype chain incorrectly implement this, causing the Generator
689
+ // object to not be returned from this call. This ensures that doesn't happen.
690
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
691
+ define(Gp, iteratorSymbol, function() {
692
+ return this;
693
+ });
694
+
695
+ define(Gp, "toString", function() {
696
+ return "[object Generator]";
697
+ });
698
+
699
+ function pushTryEntry(locs) {
700
+ var entry = { tryLoc: locs[0] };
701
+
702
+ if (1 in locs) {
703
+ entry.catchLoc = locs[1];
704
+ }
705
+
706
+ if (2 in locs) {
707
+ entry.finallyLoc = locs[2];
708
+ entry.afterLoc = locs[3];
709
+ }
710
+
711
+ this.tryEntries.push(entry);
712
+ }
713
+
714
+ function resetTryEntry(entry) {
715
+ var record = entry.completion || {};
716
+ record.type = "normal";
717
+ delete record.arg;
718
+ entry.completion = record;
719
+ }
720
+
721
+ function Context(tryLocsList) {
722
+ // The root entry object (effectively a try statement without a catch
723
+ // or a finally block) gives us a place to store values thrown from
724
+ // locations where there is no enclosing try statement.
725
+ this.tryEntries = [{ tryLoc: "root" }];
726
+ tryLocsList.forEach(pushTryEntry, this);
727
+ this.reset(true);
728
+ }
729
+
730
+ exports.keys = function(object) {
731
+ var keys = [];
732
+ for (var key in object) {
733
+ keys.push(key);
734
+ }
735
+ keys.reverse();
736
+
737
+ // Rather than returning an object with a next method, we keep
738
+ // things simple and return the next function itself.
739
+ return function next() {
740
+ while (keys.length) {
741
+ var key = keys.pop();
742
+ if (key in object) {
743
+ next.value = key;
744
+ next.done = false;
745
+ return next;
746
+ }
747
+ }
748
+
749
+ // To avoid creating an additional object, we just hang the .value
750
+ // and .done properties off the next function object itself. This
751
+ // also ensures that the minifier will not anonymize the function.
752
+ next.done = true;
753
+ return next;
754
+ };
755
+ };
756
+
757
+ function values(iterable) {
758
+ if (iterable) {
759
+ var iteratorMethod = iterable[iteratorSymbol];
760
+ if (iteratorMethod) {
761
+ return iteratorMethod.call(iterable);
762
+ }
763
+
764
+ if (typeof iterable.next === "function") {
765
+ return iterable;
766
+ }
767
+
768
+ if (!isNaN(iterable.length)) {
769
+ var i = -1, next = function next() {
770
+ while (++i < iterable.length) {
771
+ if (hasOwn.call(iterable, i)) {
772
+ next.value = iterable[i];
773
+ next.done = false;
774
+ return next;
775
+ }
776
+ }
777
+
778
+ next.value = undefined$1;
779
+ next.done = true;
780
+
781
+ return next;
782
+ };
783
+
784
+ return next.next = next;
785
+ }
786
+ }
787
+
788
+ // Return an iterator with no values.
789
+ return { next: doneResult };
790
+ }
791
+ exports.values = values;
792
+
793
+ function doneResult() {
794
+ return { value: undefined$1, done: true };
795
+ }
796
+
797
+ Context.prototype = {
798
+ constructor: Context,
799
+
800
+ reset: function(skipTempReset) {
801
+ this.prev = 0;
802
+ this.next = 0;
803
+ // Resetting context._sent for legacy support of Babel's
804
+ // function.sent implementation.
805
+ this.sent = this._sent = undefined$1;
806
+ this.done = false;
807
+ this.delegate = null;
808
+
809
+ this.method = "next";
810
+ this.arg = undefined$1;
811
+
812
+ this.tryEntries.forEach(resetTryEntry);
813
+
814
+ if (!skipTempReset) {
815
+ for (var name in this) {
816
+ // Not sure about the optimal order of these conditions:
817
+ if (name.charAt(0) === "t" &&
818
+ hasOwn.call(this, name) &&
819
+ !isNaN(+name.slice(1))) {
820
+ this[name] = undefined$1;
821
+ }
822
+ }
823
+ }
824
+ },
825
+
826
+ stop: function() {
827
+ this.done = true;
828
+
829
+ var rootEntry = this.tryEntries[0];
830
+ var rootRecord = rootEntry.completion;
831
+ if (rootRecord.type === "throw") {
832
+ throw rootRecord.arg;
833
+ }
834
+
835
+ return this.rval;
836
+ },
837
+
838
+ dispatchException: function(exception) {
839
+ if (this.done) {
840
+ throw exception;
841
+ }
842
+
843
+ var context = this;
844
+ function handle(loc, caught) {
845
+ record.type = "throw";
846
+ record.arg = exception;
847
+ context.next = loc;
848
+
849
+ if (caught) {
850
+ // If the dispatched exception was caught by a catch block,
851
+ // then let that catch block handle the exception normally.
852
+ context.method = "next";
853
+ context.arg = undefined$1;
854
+ }
855
+
856
+ return !! caught;
857
+ }
858
+
859
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
860
+ var entry = this.tryEntries[i];
861
+ var record = entry.completion;
862
+
863
+ if (entry.tryLoc === "root") {
864
+ // Exception thrown outside of any try block that could handle
865
+ // it, so set the completion value of the entire function to
866
+ // throw the exception.
867
+ return handle("end");
868
+ }
869
+
870
+ if (entry.tryLoc <= this.prev) {
871
+ var hasCatch = hasOwn.call(entry, "catchLoc");
872
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
873
+
874
+ if (hasCatch && hasFinally) {
875
+ if (this.prev < entry.catchLoc) {
876
+ return handle(entry.catchLoc, true);
877
+ } else if (this.prev < entry.finallyLoc) {
878
+ return handle(entry.finallyLoc);
879
+ }
880
+
881
+ } else if (hasCatch) {
882
+ if (this.prev < entry.catchLoc) {
883
+ return handle(entry.catchLoc, true);
884
+ }
885
+
886
+ } else if (hasFinally) {
887
+ if (this.prev < entry.finallyLoc) {
888
+ return handle(entry.finallyLoc);
889
+ }
890
+
891
+ } else {
892
+ throw new Error("try statement without catch or finally");
893
+ }
894
+ }
895
+ }
896
+ },
897
+
898
+ abrupt: function(type, arg) {
899
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
900
+ var entry = this.tryEntries[i];
901
+ if (entry.tryLoc <= this.prev &&
902
+ hasOwn.call(entry, "finallyLoc") &&
903
+ this.prev < entry.finallyLoc) {
904
+ var finallyEntry = entry;
905
+ break;
906
+ }
907
+ }
908
+
909
+ if (finallyEntry &&
910
+ (type === "break" ||
911
+ type === "continue") &&
912
+ finallyEntry.tryLoc <= arg &&
913
+ arg <= finallyEntry.finallyLoc) {
914
+ // Ignore the finally entry if control is not jumping to a
915
+ // location outside the try/catch block.
916
+ finallyEntry = null;
917
+ }
918
+
919
+ var record = finallyEntry ? finallyEntry.completion : {};
920
+ record.type = type;
921
+ record.arg = arg;
922
+
923
+ if (finallyEntry) {
924
+ this.method = "next";
925
+ this.next = finallyEntry.finallyLoc;
926
+ return ContinueSentinel;
927
+ }
928
+
929
+ return this.complete(record);
930
+ },
931
+
932
+ complete: function(record, afterLoc) {
933
+ if (record.type === "throw") {
934
+ throw record.arg;
935
+ }
936
+
937
+ if (record.type === "break" ||
938
+ record.type === "continue") {
939
+ this.next = record.arg;
940
+ } else if (record.type === "return") {
941
+ this.rval = this.arg = record.arg;
942
+ this.method = "return";
943
+ this.next = "end";
944
+ } else if (record.type === "normal" && afterLoc) {
945
+ this.next = afterLoc;
946
+ }
947
+
948
+ return ContinueSentinel;
949
+ },
950
+
951
+ finish: function(finallyLoc) {
952
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
953
+ var entry = this.tryEntries[i];
954
+ if (entry.finallyLoc === finallyLoc) {
955
+ this.complete(entry.completion, entry.afterLoc);
956
+ resetTryEntry(entry);
957
+ return ContinueSentinel;
958
+ }
959
+ }
960
+ },
961
+
962
+ "catch": function(tryLoc) {
963
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
964
+ var entry = this.tryEntries[i];
965
+ if (entry.tryLoc === tryLoc) {
966
+ var record = entry.completion;
967
+ if (record.type === "throw") {
968
+ var thrown = record.arg;
969
+ resetTryEntry(entry);
970
+ }
971
+ return thrown;
972
+ }
973
+ }
974
+
975
+ // The context.catch method must only be called with a location
976
+ // argument that corresponds to a known catch block.
977
+ throw new Error("illegal catch attempt");
978
+ },
979
+
980
+ delegateYield: function(iterable, resultName, nextLoc) {
981
+ this.delegate = {
982
+ iterator: values(iterable),
983
+ resultName: resultName,
984
+ nextLoc: nextLoc
985
+ };
986
+
987
+ if (this.method === "next") {
988
+ // Deliberately forget the last sent value so that we don't
989
+ // accidentally pass it on to the delegate.
990
+ this.arg = undefined$1;
991
+ }
992
+
993
+ return ContinueSentinel;
994
+ }
995
+ };
996
+
997
+ // Regardless of whether this script is executing as a CommonJS module
998
+ // or not, return the runtime object so that we can declare the variable
999
+ // regeneratorRuntime in the outer scope, which allows this module to be
1000
+ // injected easily by `bin/regenerator --include-runtime script.js`.
1001
+ return exports;
1002
+
1003
+ }(
1004
+ // If this script is executing as a CommonJS module, use module.exports
1005
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
1006
+ // object. Either way, the resulting object will be used to initialize
1007
+ // the regeneratorRuntime variable at the top of this file.
1008
+ module.exports
1009
+ ));
1010
+
1011
+ try {
1012
+ regeneratorRuntime = runtime;
1013
+ } catch (accidentalStrictMode) {
1014
+ // This module should not be running in strict mode, so the above
1015
+ // assignment should always work unless something is misconfigured. Just
1016
+ // in case runtime.js accidentally runs in strict mode, in modern engines
1017
+ // we can explicitly access globalThis. In older engines we can escape
1018
+ // strict mode using a global Function call. This could conceivably fail
1019
+ // if a Content Security Policy forbids using Function, but in that case
1020
+ // the proper solution is to fix the accidental strict mode problem. If
1021
+ // you've misconfigured your bundler to force strict mode and applied a
1022
+ // CSP to forbid Function, and you're not willing to fix either of those
1023
+ // problems, please detail your unique predicament in a GitHub issue.
1024
+ if (typeof globalThis === "object") {
1025
+ globalThis.regeneratorRuntime = runtime;
1026
+ } else {
1027
+ Function("r", "regeneratorRuntime = r")(runtime);
1028
+ }
1029
+ }
1030
+ });
1031
+
615
1032
  var _personalMetaToPrefix;
616
1033
  var personalMetaToPrefix = (_personalMetaToPrefix = {}, _personalMetaToPrefix[MetadataCategory.Personal] = 'you', _personalMetaToPrefix[MetadataCategory.ChildPersonal] = 'child', _personalMetaToPrefix[MetadataCategory.OtherPersonal] = 'other', _personalMetaToPrefix);
617
1034
  /**
@@ -621,7 +1038,7 @@ var personalMetaToPrefix = (_personalMetaToPrefix = {}, _personalMetaToPrefix[Me
621
1038
  */
622
1039
 
623
1040
  function identificationToPersonalInformations(data, category) {
624
- var _data;
1041
+ var _data$;
625
1042
 
626
1043
  var prefix = personalMetaToPrefix[category];
627
1044
  return {
@@ -631,7 +1048,7 @@ function identificationToPersonalInformations(data, category) {
631
1048
  name: data[prefix + "Name"],
632
1049
  phone: data[prefix + "Phone"],
633
1050
  zip: data[prefix + "Zip"],
634
- hid: (_data = data[prefix + "HID"]) != null ? _data : data[prefix + "ID"],
1051
+ hid: (_data$ = data[prefix + "HID"]) != null ? _data$ : data[prefix + "ID"],
635
1052
  pharmacy: data[prefix + "Pharmacy"],
636
1053
  address: data[prefix + "Address"]
637
1054
  };
@@ -831,9 +1248,9 @@ function filterTriggeredAnsweredWithKind(_x, _x2) {
831
1248
  */
832
1249
 
833
1250
  function _filterTriggeredAnsweredWithKind() {
834
- _filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(workflowData, kind) {
1251
+ _filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(workflowData, kind) {
835
1252
  var flattenedAnswers, triggeredQuestionsWithKind, samePageAnswers, res;
836
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1253
+ return runtime_1.wrap(function _callee$(_context) {
837
1254
  while (1) {
838
1255
  switch (_context.prev = _context.next) {
839
1256
  case 0:
@@ -877,9 +1294,9 @@ function getWorkflowDataByCategory(_x3, _x4) {
877
1294
  }
878
1295
 
879
1296
  function _getWorkflowDataByCategory() {
880
- _getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(workflowData, category) {
1297
+ _getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(workflowData, category) {
881
1298
  var flattenedAnswers, triggeredQuestions, fields;
882
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1299
+ return runtime_1.wrap(function _callee2$(_context2) {
883
1300
  while (1) {
884
1301
  switch (_context2.prev = _context2.next) {
885
1302
  case 0:
@@ -950,8 +1367,8 @@ function getImagesFromIndexDb(_x5) {
950
1367
  */
951
1368
 
952
1369
  function _getImagesFromIndexDb() {
953
- _getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(answer) {
954
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1370
+ _getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(answer) {
1371
+ return runtime_1.wrap(function _callee3$(_context3) {
955
1372
  while (1) {
956
1373
  switch (_context3.prev = _context3.next) {
957
1374
  case 0:
@@ -978,11 +1395,58 @@ function _getImagesFromIndexDb() {
978
1395
  function populateWorkflowField(_x6, _x7) {
979
1396
  return _populateWorkflowField.apply(this, arguments);
980
1397
  }
1398
+ /**
1399
+ * Determine if a question is triggered by some answers
1400
+ *
1401
+ * We use the following logical combinations of rules:
1402
+ *
1403
+ * #### Single string
1404
+ *
1405
+ * ```
1406
+ * // Required: rule1
1407
+ * rules: rule1
1408
+ * ```
1409
+ *
1410
+ * #### Array of strings (AND is applied between statements):
1411
+ *
1412
+ * ```
1413
+ * // Required: rule1 AND rule2
1414
+ * rules: [ rule1, rule2 ]
1415
+ * ```
1416
+ *
1417
+ * #### Array of arrays of strings (OR is applied between inner arrays. AND is applied between inner arrays statements)
1418
+ *
1419
+ * ```
1420
+ * // Required: rule1 OR rule2
1421
+ * rules: [
1422
+ * [ rule1 ],
1423
+ * [ rule2 ]
1424
+ * ]
1425
+ *
1426
+ * // Required: rule1 OR (rule2 AND rule3)
1427
+ * rules: [
1428
+ * [ rule1 ],
1429
+ * [ rule2, rule3 ]
1430
+ * ]
1431
+ *
1432
+ * // THIS IS FORBIDDEN
1433
+ * rules: [
1434
+ * rule1, // <-- THIS IS FORBIDDEN. Instead use [ rule1 ]
1435
+ * [ rule2, rule3 ]
1436
+ * ]
1437
+ * ```
1438
+ *
1439
+ * @param triggers the triggering rules
1440
+ * @param answers the answers to check againts triggering rules
1441
+ * @returns `true` if triggers are verified against ansers. Otherwise, returns `false`.
1442
+ * @throws an Error if triggers typing is wrong
1443
+ */
1444
+
981
1445
 
982
1446
  function _populateWorkflowField() {
983
- _populateWorkflowField = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(question, answerValue) {
1447
+ _populateWorkflowField = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(question, answerValue) {
984
1448
  var answer, displayedAnswer;
985
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1449
+ return runtime_1.wrap(function _callee4$(_context4) {
986
1450
  while (1) {
987
1451
  switch (_context4.prev = _context4.next) {
988
1452
  case 0:
@@ -1056,21 +1520,34 @@ function _populateWorkflowField() {
1056
1520
  }
1057
1521
 
1058
1522
  function isTriggered(triggers, answers) {
1059
- for (var _iterator = _createForOfIteratorHelperLoose(triggers), _step; !(_step = _iterator()).done;) {
1060
- var trigger = _step.value;
1523
+ // is triggers contained in answers
1524
+ if (typeof triggers === 'string') {
1525
+ return answers.includes(triggers);
1526
+ }
1061
1527
 
1062
- if (!answers.includes(trigger)) {
1063
- return false;
1528
+ if (Array.isArray(triggers)) {
1529
+ // rule combination kind: rule1 OR (rule2 AND rule3)
1530
+ if (Array.isArray(triggers[0])) {
1531
+ return triggers.some(function (subSetTriggers) {
1532
+ return subSetTriggers.every(function (trigger) {
1533
+ return answers.includes(trigger);
1534
+ });
1535
+ });
1536
+ } else {
1537
+ // rule combination kind: rule1 AND rule2
1538
+ return triggers.every(function (trigger) {
1539
+ return answers.includes(trigger);
1540
+ });
1064
1541
  }
1065
1542
  }
1066
1543
 
1067
- return true;
1544
+ throw Error('[isTriggered] triggers is not typed well');
1068
1545
  }
1069
1546
  function flattenSelectedAnswers(answers) {
1070
1547
  var linearAnswers = [];
1071
1548
 
1072
- for (var _iterator2 = _createForOfIteratorHelperLoose(answers), _step2; !(_step2 = _iterator2()).done;) {
1073
- var answer = _step2.value;
1549
+ for (var _iterator = _createForOfIteratorHelperLoose(answers), _step; !(_step = _iterator()).done;) {
1550
+ var answer = _step.value;
1074
1551
  linearAnswers.push.apply(linearAnswers, Object.values(answer));
1075
1552
  }
1076
1553
 
@@ -1161,10 +1638,10 @@ function registerPatient(_x, _x2, _x3, _x4, _x5, _x6, _x7) {
1161
1638
  */
1162
1639
 
1163
1640
  function _registerPatient() {
1164
- _registerPatient = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA, indexSearch) {
1641
+ _registerPatient = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA, indexSearch) {
1165
1642
  var consult, lockboxUuid, practitionerAdmin, retry, identity, errorsThrown, _ret;
1166
1643
 
1167
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1644
+ return runtime_1.wrap(function _callee4$(_context4) {
1168
1645
  while (1) {
1169
1646
  switch (_context4.prev = _context4.next) {
1170
1647
  case 0:
@@ -1186,11 +1663,11 @@ function _registerPatient() {
1186
1663
  }
1187
1664
 
1188
1665
  _context4.prev = 8;
1189
- return _context4.delegateYield( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1666
+ return _context4.delegateYield( /*#__PURE__*/runtime_1.mark(function _callee3() {
1190
1667
  var _consultIndex, _identity, _identity2;
1191
1668
 
1192
1669
  var practitioners, grantPromises, consultIndex, consultIndexPromises;
1193
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1670
+ return runtime_1.wrap(function _callee3$(_context3) {
1194
1671
  while (1) {
1195
1672
  switch (_context3.prev = _context3.next) {
1196
1673
  case 0:
@@ -1261,6 +1738,7 @@ function _registerPatient() {
1261
1738
  return oroClient.grantLockbox(practitionerAdmin, lockboxUuid)["catch"](function (err) {
1262
1739
  console.error("Error while granting lockbox to practitioner admin " + practitionerAdmin, err); // if we cannot grant to the admin, then the registration will fail
1263
1740
 
1741
+ // if we cannot grant to the admin, then the registration will fail
1264
1742
  errorsThrown.push(err);
1265
1743
  });
1266
1744
 
@@ -1269,14 +1747,15 @@ function _registerPatient() {
1269
1747
  grantPromises = practitioners.filter(function (practitioner) {
1270
1748
  return practitioner.uuid !== practitionerAdmin;
1271
1749
  }).map( /*#__PURE__*/function () {
1272
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(practitioner) {
1273
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1750
+ var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(practitioner) {
1751
+ return runtime_1.wrap(function _callee$(_context) {
1274
1752
  while (1) {
1275
1753
  switch (_context.prev = _context.next) {
1276
1754
  case 0:
1277
1755
  return _context.abrupt("return", oroClient.grantLockbox(practitioner.uuid, lockboxUuid)["catch"](function (err) {
1278
1756
  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
1279
1757
 
1758
+ // Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
1280
1759
  if (retry <= 1) return;
1281
1760
  errorsThrown.push(err);
1282
1761
  }));
@@ -1302,14 +1781,15 @@ function _registerPatient() {
1302
1781
  }], _consultIndex); // the index will identify in which lockbox a consultation resides
1303
1782
 
1304
1783
  consultIndexPromises = practitioners.map( /*#__PURE__*/function () {
1305
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(practitioner) {
1306
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1784
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(practitioner) {
1785
+ return runtime_1.wrap(function _callee2$(_context2) {
1307
1786
  while (1) {
1308
1787
  switch (_context2.prev = _context2.next) {
1309
1788
  case 0:
1310
1789
  return _context2.abrupt("return", oroClient.vaultIndexAdd(consultIndex, practitioner.uuid)["catch"](function (err) {
1311
1790
  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
1312
1791
 
1792
+ // Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
1313
1793
  if (retry <= 1) return;else errorsThrown.push(err);
1314
1794
  }));
1315
1795
 
@@ -1329,6 +1809,7 @@ function _registerPatient() {
1329
1809
  return storeImageAliases(consult.uuid, lockboxUuid, workflow, oroClient)["catch"](function (err) {
1330
1810
  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
1331
1811
 
1812
+ // Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
1332
1813
  if (retry <= 1) return;else errorsThrown.push(err);
1333
1814
  });
1334
1815
 
@@ -1349,6 +1830,7 @@ function _registerPatient() {
1349
1830
  return oroClient.updateMasterKey(patientUuid, masterKey, lockboxUuid)["catch"](function (err) {
1350
1831
  console.error("[SDK: registration] Error while updating master key", err); /// it's acceptable to continue registration (return old identity)
1351
1832
 
1833
+ /// it's acceptable to continue registration (return old identity)
1352
1834
  if (retry <= 1) return;
1353
1835
  errorsThrown.push(err);
1354
1836
  return identity;
@@ -1373,6 +1855,7 @@ function _registerPatient() {
1373
1855
  return oroClient.updateSecurityQuestions(patientUuid, recoveryQA.recoverySecurityQuestions, recoveryQA.recoverySecurityAnswers, 2)["catch"](function (err) {
1374
1856
  console.error("[SDK: registration] Error while updating security questions", err); /// it's acceptable to continue registration (return old identity)
1375
1857
 
1858
+ /// it's acceptable to continue registration (return old identity)
1376
1859
  if (retry <= 1) return;
1377
1860
  errorsThrown.push(err);
1378
1861
  return identity;
@@ -1396,6 +1879,7 @@ function _registerPatient() {
1396
1879
  console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
1397
1880
  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
1398
1881
 
1882
+ // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
1399
1883
  errorsThrown.push(err);
1400
1884
  });
1401
1885
 
@@ -1492,9 +1976,9 @@ function getOrCreatePatientConsultationUuid(_x8, _x9) {
1492
1976
 
1493
1977
 
1494
1978
  function _getOrCreatePatientConsultationUuid() {
1495
- _getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(consult, oroClient) {
1979
+ _getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(consult, oroClient) {
1496
1980
  var payment;
1497
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1981
+ return runtime_1.wrap(function _callee5$(_context5) {
1498
1982
  while (1) {
1499
1983
  switch (_context5.prev = _context5.next) {
1500
1984
  case 0:
@@ -1549,9 +2033,9 @@ function getOrCreatePatientLockbox(_x10) {
1549
2033
 
1550
2034
 
1551
2035
  function _getOrCreatePatientLockbox() {
1552
- _getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(oroClient) {
2036
+ _getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(oroClient) {
1553
2037
  var grants;
1554
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
2038
+ return runtime_1.wrap(function _callee6$(_context6) {
1555
2039
  while (1) {
1556
2040
  switch (_context6.prev = _context6.next) {
1557
2041
  case 0:
@@ -1594,8 +2078,8 @@ function storePatientData(_x11, _x12, _x13, _x14, _x15) {
1594
2078
  }
1595
2079
 
1596
2080
  function _storePatientData() {
1597
- _storePatientData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
1598
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2081
+ _storePatientData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
2082
+ return runtime_1.wrap(function _callee7$(_context7) {
1599
2083
  while (1) {
1600
2084
  switch (_context7.prev = _context7.next) {
1601
2085
  case 0:
@@ -1652,9 +2136,9 @@ function storeImageAliases(_x16, _x17, _x18, _x19) {
1652
2136
 
1653
2137
 
1654
2138
  function _storeImageAliases() {
1655
- _storeImageAliases = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient) {
2139
+ _storeImageAliases = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient) {
1656
2140
  var images, nonNullImages, promises;
1657
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2141
+ return runtime_1.wrap(function _callee8$(_context8) {
1658
2142
  while (1) {
1659
2143
  switch (_context8.prev = _context8.next) {
1660
2144
  case 0:
@@ -1706,8 +2190,8 @@ function extractAndStorePersonalWorkflowData(_x20, _x21, _x22, _x23, _x24) {
1706
2190
  */
1707
2191
 
1708
2192
  function _extractAndStorePersonalWorkflowData() {
1709
- _extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
1710
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
2193
+ _extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
2194
+ return runtime_1.wrap(function _callee9$(_context9) {
1711
2195
  while (1) {
1712
2196
  switch (_context9.prev = _context9.next) {
1713
2197
  case 0:
@@ -1741,8 +2225,8 @@ function extractPersonalInfoFromWorkflowData(_x25) {
1741
2225
  */
1742
2226
 
1743
2227
  function _extractPersonalInfoFromWorkflowData() {
1744
- _extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(workflow) {
1745
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
2228
+ _extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(workflow) {
2229
+ return runtime_1.wrap(function _callee10$(_context10) {
1746
2230
  while (1) {
1747
2231
  switch (_context10.prev = _context10.next) {
1748
2232
  case 0:
@@ -1772,10 +2256,10 @@ function buildConsultSearchIndex(_x26, _x27, _x28) {
1772
2256
  }
1773
2257
 
1774
2258
  function _buildConsultSearchIndex() {
1775
- _buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(consult, workflow, oroClient) {
2259
+ _buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(consult, workflow, oroClient) {
1776
2260
  var terms, _yield$extractPersona, personalInfoPopulatedWfData, childPersonalInfoPopulatedWfData, otherPersonalInfoPopulatedWfData, personalInfo, childPersonalInfo, otherPersonalInfo;
1777
2261
 
1778
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
2262
+ return runtime_1.wrap(function _callee11$(_context11) {
1779
2263
  while (1) {
1780
2264
  switch (_context11.prev = _context11.next) {
1781
2265
  case 0:
@@ -1904,10 +2388,10 @@ function filterGrantsWithLockboxMetadata(_x, _x2, _x3, _x4) {
1904
2388
  */
1905
2389
 
1906
2390
  function _filterGrantsWithLockboxMetadata() {
1907
- _filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(oroClient, filter, vaultIndex, forceRefresh) {
2391
+ _filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(oroClient, filter, vaultIndex, forceRefresh) {
1908
2392
  var _vaultIndex$IndexKey$, indexConsults;
1909
2393
 
1910
- return _regeneratorRuntime().wrap(function _callee$(_context) {
2394
+ return runtime_1.wrap(function _callee$(_context) {
1911
2395
  while (1) {
1912
2396
  switch (_context.prev = _context.next) {
1913
2397
  case 0:
@@ -1957,12 +2441,12 @@ function buildLegacyVaultIndex(_x5) {
1957
2441
  }
1958
2442
 
1959
2443
  function _buildLegacyVaultIndex() {
1960
- _buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(oroClient) {
2444
+ _buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(oroClient) {
1961
2445
  var _vaultIndex;
1962
2446
 
1963
2447
  var grants, consultGrants, _loop, _iterator, _step, vaultIndex;
1964
2448
 
1965
- return _regeneratorRuntime().wrap(function _callee2$(_context3) {
2449
+ return runtime_1.wrap(function _callee2$(_context3) {
1966
2450
  while (1) {
1967
2451
  switch (_context3.prev = _context3.next) {
1968
2452
  case 0:
@@ -1972,9 +2456,9 @@ function _buildLegacyVaultIndex() {
1972
2456
  case 2:
1973
2457
  grants = _context3.sent;
1974
2458
  consultGrants = [];
1975
- _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
2459
+ _loop = /*#__PURE__*/runtime_1.mark(function _loop() {
1976
2460
  var grant, consults;
1977
- return _regeneratorRuntime().wrap(function _loop$(_context2) {
2461
+ return runtime_1.wrap(function _loop$(_context2) {
1978
2462
  while (1) {
1979
2463
  switch (_context2.prev = _context2.next) {
1980
2464
  case 0:
@@ -2058,8 +2542,8 @@ var OroClient = /*#__PURE__*/function () {
2058
2542
  _proto.cleanIndex =
2059
2543
  /*#__PURE__*/
2060
2544
  function () {
2061
- var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2062
- return _regeneratorRuntime().wrap(function _callee$(_context) {
2545
+ var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
2546
+ return runtime_1.wrap(function _callee$(_context) {
2063
2547
  while (1) {
2064
2548
  switch (_context.prev = _context.next) {
2065
2549
  case 0:
@@ -2097,9 +2581,9 @@ var OroClient = /*#__PURE__*/function () {
2097
2581
  _proto.signUp =
2098
2582
  /*#__PURE__*/
2099
2583
  function () {
2100
- var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
2584
+ var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
2101
2585
  var privateKey, symmetricEncryptor, recoveryPassword, hashedPassword, emailConfirmed, signupRequest, identity, symetricEncryptor;
2102
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2586
+ return runtime_1.wrap(function _callee2$(_context2) {
2103
2587
  while (1) {
2104
2588
  switch (_context2.prev = _context2.next) {
2105
2589
  case 0:
@@ -2158,9 +2642,9 @@ var OroClient = /*#__PURE__*/function () {
2158
2642
  _proto.confirmEmail =
2159
2643
  /*#__PURE__*/
2160
2644
  function () {
2161
- var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(accessToken) {
2645
+ var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(accessToken) {
2162
2646
  var claims;
2163
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
2647
+ return runtime_1.wrap(function _callee3$(_context3) {
2164
2648
  while (1) {
2165
2649
  switch (_context3.prev = _context3.next) {
2166
2650
  case 0:
@@ -2205,9 +2689,9 @@ var OroClient = /*#__PURE__*/function () {
2205
2689
  _proto.signIn =
2206
2690
  /*#__PURE__*/
2207
2691
  function () {
2208
- var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(practiceUuid, email, password, otp) {
2692
+ var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(practiceUuid, email, password, otp) {
2209
2693
  var hashedPassword, tokenRequest, userUuid;
2210
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
2694
+ return runtime_1.wrap(function _callee4$(_context4) {
2211
2695
  while (1) {
2212
2696
  switch (_context4.prev = _context4.next) {
2213
2697
  case 0:
@@ -2260,9 +2744,9 @@ var OroClient = /*#__PURE__*/function () {
2260
2744
  _proto.resumeSession =
2261
2745
  /*#__PURE__*/
2262
2746
  function () {
2263
- var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
2747
+ var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
2264
2748
  var id, recoveryPayload, recoveryKey, symmetricDecryptor, privateKey;
2265
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
2749
+ return runtime_1.wrap(function _callee5$(_context5) {
2266
2750
  while (1) {
2267
2751
  switch (_context5.prev = _context5.next) {
2268
2752
  case 0:
@@ -2363,8 +2847,8 @@ var OroClient = /*#__PURE__*/function () {
2363
2847
  _proto.signOut =
2364
2848
  /*#__PURE__*/
2365
2849
  function () {
2366
- var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
2367
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
2850
+ var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
2851
+ return runtime_1.wrap(function _callee6$(_context6) {
2368
2852
  while (1) {
2369
2853
  switch (_context6.prev = _context6.next) {
2370
2854
  case 0:
@@ -2414,8 +2898,8 @@ var OroClient = /*#__PURE__*/function () {
2414
2898
  _proto.registerPatient =
2415
2899
  /*#__PURE__*/
2416
2900
  function () {
2417
- var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(patientUuid, consult, workflow, recoveryQA, indexSearch) {
2418
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2901
+ var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(patientUuid, consult, workflow, recoveryQA, indexSearch) {
2902
+ return runtime_1.wrap(function _callee7$(_context7) {
2419
2903
  while (1) {
2420
2904
  switch (_context7.prev = _context7.next) {
2421
2905
  case 0:
@@ -2462,8 +2946,8 @@ var OroClient = /*#__PURE__*/function () {
2462
2946
  _proto.buildVaultIndex =
2463
2947
  /*#__PURE__*/
2464
2948
  function () {
2465
- var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(forceRefresh) {
2466
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2949
+ var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(forceRefresh) {
2950
+ return runtime_1.wrap(function _callee8$(_context8) {
2467
2951
  while (1) {
2468
2952
  switch (_context8.prev = _context8.next) {
2469
2953
  case 0:
@@ -2511,12 +2995,12 @@ var OroClient = /*#__PURE__*/function () {
2511
2995
  _proto.forceUpdateIndexEntries =
2512
2996
  /*#__PURE__*/
2513
2997
  function () {
2514
- var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
2998
+ var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10() {
2515
2999
  var _this = this,
2516
3000
  _this$vaultIndexAdd;
2517
3001
 
2518
3002
  var grants, indexConsultLockbox;
2519
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
3003
+ return runtime_1.wrap(function _callee10$(_context10) {
2520
3004
  while (1) {
2521
3005
  switch (_context10.prev = _context10.next) {
2522
3006
  case 0:
@@ -2527,8 +3011,8 @@ var OroClient = /*#__PURE__*/function () {
2527
3011
  grants = _context10.sent;
2528
3012
  _context10.next = 5;
2529
3013
  return Promise.all(grants.map( /*#__PURE__*/function () {
2530
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(grant) {
2531
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
3014
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(grant) {
3015
+ return runtime_1.wrap(function _callee9$(_context9) {
2532
3016
  while (1) {
2533
3017
  switch (_context9.prev = _context9.next) {
2534
3018
  case 0:
@@ -2604,12 +3088,12 @@ var OroClient = /*#__PURE__*/function () {
2604
3088
  _proto.vaultIndexAdd =
2605
3089
  /*#__PURE__*/
2606
3090
  function () {
2607
- var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(entries, indexOwnerUuid) {
3091
+ var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(entries, indexOwnerUuid) {
2608
3092
  var _this2 = this;
2609
3093
 
2610
3094
  var rsaPub, base64IndexOwnerPubKey, encryptedIndex, _i, _Object$keys, keyString, key;
2611
3095
 
2612
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
3096
+ return runtime_1.wrap(function _callee11$(_context11) {
2613
3097
  while (1) {
2614
3098
  switch (_context11.prev = _context11.next) {
2615
3099
  case 0:
@@ -2731,11 +3215,11 @@ var OroClient = /*#__PURE__*/function () {
2731
3215
  _proto.indexSnapshotAdd =
2732
3216
  /*#__PURE__*/
2733
3217
  function () {
2734
- var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(index) {
3218
+ var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(index) {
2735
3219
  var _index$IndexKey$Consu, _cleanedIndex;
2736
3220
 
2737
3221
  var rsaPub, cleanedIndex, encryptedIndexEntry, encryptedIndex;
2738
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
3222
+ return runtime_1.wrap(function _callee12$(_context12) {
2739
3223
  while (1) {
2740
3224
  switch (_context12.prev = _context12.next) {
2741
3225
  case 0:
@@ -2793,9 +3277,9 @@ var OroClient = /*#__PURE__*/function () {
2793
3277
  _proto.grantLockbox =
2794
3278
  /*#__PURE__*/
2795
3279
  function () {
2796
- var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
3280
+ var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
2797
3281
  var secret, base64GranteePublicKey, granteePublicKey, granteeEncryptedSecret, request;
2798
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
3282
+ return runtime_1.wrap(function _callee13$(_context13) {
2799
3283
  while (1) {
2800
3284
  switch (_context13.prev = _context13.next) {
2801
3285
  case 0:
@@ -2855,9 +3339,9 @@ var OroClient = /*#__PURE__*/function () {
2855
3339
  _proto.createMessageData =
2856
3340
  /*#__PURE__*/
2857
3341
  function () {
2858
- var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
3342
+ var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee14(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
2859
3343
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
2860
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
3344
+ return runtime_1.wrap(function _callee14$(_context14) {
2861
3345
  while (1) {
2862
3346
  switch (_context14.prev = _context14.next) {
2863
3347
  case 0:
@@ -2927,9 +3411,9 @@ var OroClient = /*#__PURE__*/function () {
2927
3411
  _proto.createMessageAttachmentData =
2928
3412
  /*#__PURE__*/
2929
3413
  function () {
2930
- var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
3414
+ var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee15(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
2931
3415
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
2932
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
3416
+ return runtime_1.wrap(function _callee15$(_context15) {
2933
3417
  while (1) {
2934
3418
  switch (_context15.prev = _context15.next) {
2935
3419
  case 0:
@@ -3014,8 +3498,8 @@ var OroClient = /*#__PURE__*/function () {
3014
3498
  _proto.createConsultationAttachmentData =
3015
3499
  /*#__PURE__*/
3016
3500
  function () {
3017
- var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid) {
3018
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
3501
+ var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee16(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid) {
3502
+ return runtime_1.wrap(function _callee16$(_context16) {
3019
3503
  while (1) {
3020
3504
  switch (_context16.prev = _context16.next) {
3021
3505
  case 0:
@@ -3086,9 +3570,9 @@ var OroClient = /*#__PURE__*/function () {
3086
3570
  _proto.createJsonData =
3087
3571
  /*#__PURE__*/
3088
3572
  function () {
3089
- var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
3573
+ var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
3090
3574
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
3091
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
3575
+ return runtime_1.wrap(function _callee17$(_context17) {
3092
3576
  while (1) {
3093
3577
  switch (_context17.prev = _context17.next) {
3094
3578
  case 0:
@@ -3142,9 +3626,9 @@ var OroClient = /*#__PURE__*/function () {
3142
3626
  _proto.getOrInsertJsonData =
3143
3627
  /*#__PURE__*/
3144
3628
  function () {
3145
- var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace) {
3629
+ var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace) {
3146
3630
  var manifest;
3147
- return _regeneratorRuntime().wrap(function _callee18$(_context18) {
3631
+ return runtime_1.wrap(function _callee18$(_context18) {
3148
3632
  while (1) {
3149
3633
  switch (_context18.prev = _context18.next) {
3150
3634
  case 0:
@@ -3207,9 +3691,9 @@ var OroClient = /*#__PURE__*/function () {
3207
3691
  _proto.createBytesData =
3208
3692
  /*#__PURE__*/
3209
3693
  function () {
3210
- var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
3694
+ var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
3211
3695
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
3212
- return _regeneratorRuntime().wrap(function _callee19$(_context19) {
3696
+ return runtime_1.wrap(function _callee19$(_context19) {
3213
3697
  while (1) {
3214
3698
  switch (_context19.prev = _context19.next) {
3215
3699
  case 0:
@@ -3265,10 +3749,10 @@ var OroClient = /*#__PURE__*/function () {
3265
3749
  _proto.getJsonData =
3266
3750
  /*#__PURE__*/
3267
3751
  function () {
3268
- var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3752
+ var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3269
3753
  var _yield$Promise$all, encryptedPayload, symmetricDecryptor;
3270
3754
 
3271
- return _regeneratorRuntime().wrap(function _callee20$(_context20) {
3755
+ return runtime_1.wrap(function _callee20$(_context20) {
3272
3756
  while (1) {
3273
3757
  switch (_context20.prev = _context20.next) {
3274
3758
  case 0:
@@ -3315,10 +3799,10 @@ var OroClient = /*#__PURE__*/function () {
3315
3799
  _proto.getBytesData =
3316
3800
  /*#__PURE__*/
3317
3801
  function () {
3318
- var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3802
+ var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3319
3803
  var _yield$Promise$all2, encryptedPayload, symmetricDecryptor;
3320
3804
 
3321
- return _regeneratorRuntime().wrap(function _callee21$(_context21) {
3805
+ return runtime_1.wrap(function _callee21$(_context21) {
3322
3806
  while (1) {
3323
3807
  switch (_context21.prev = _context21.next) {
3324
3808
  case 0:
@@ -3368,9 +3852,9 @@ var OroClient = /*#__PURE__*/function () {
3368
3852
  _proto.getGrants =
3369
3853
  /*#__PURE__*/
3370
3854
  function () {
3371
- var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(filter, forceRefresh) {
3855
+ var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(filter, forceRefresh) {
3372
3856
  var filterString, grantsByConsultLockbox, decryptedConsults, encryptedGrants, decryptedGrants;
3373
- return _regeneratorRuntime().wrap(function _callee22$(_context22) {
3857
+ return runtime_1.wrap(function _callee22$(_context22) {
3374
3858
  while (1) {
3375
3859
  switch (_context22.prev = _context22.next) {
3376
3860
  case 0:
@@ -3488,9 +3972,9 @@ var OroClient = /*#__PURE__*/function () {
3488
3972
  _proto.getCachedSecretCryptor =
3489
3973
  /*#__PURE__*/
3490
3974
  function () {
3491
- var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(lockboxUuid, lockboxOwnerUuid) {
3975
+ var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(lockboxUuid, lockboxOwnerUuid) {
3492
3976
  var index, encryptedSecret, secret, cryptor;
3493
- return _regeneratorRuntime().wrap(function _callee23$(_context23) {
3977
+ return runtime_1.wrap(function _callee23$(_context23) {
3494
3978
  while (1) {
3495
3979
  switch (_context23.prev = _context23.next) {
3496
3980
  case 0:
@@ -3555,8 +4039,8 @@ var OroClient = /*#__PURE__*/function () {
3555
4039
  _proto.getPersonalInformationsFromConsultId =
3556
4040
  /*#__PURE__*/
3557
4041
  function () {
3558
- var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(consultationId, category, forceRefresh) {
3559
- return _regeneratorRuntime().wrap(function _callee24$(_context24) {
4042
+ var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(consultationId, category, forceRefresh) {
4043
+ return runtime_1.wrap(function _callee24$(_context24) {
3560
4044
  while (1) {
3561
4045
  switch (_context24.prev = _context24.next) {
3562
4046
  case 0:
@@ -3593,8 +4077,8 @@ var OroClient = /*#__PURE__*/function () {
3593
4077
  _proto.getMedicalDataFromConsultId =
3594
4078
  /*#__PURE__*/
3595
4079
  function () {
3596
- var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(consultationId, forceRefresh) {
3597
- return _regeneratorRuntime().wrap(function _callee25$(_context25) {
4080
+ var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(consultationId, forceRefresh) {
4081
+ return runtime_1.wrap(function _callee25$(_context25) {
3598
4082
  while (1) {
3599
4083
  switch (_context25.prev = _context25.next) {
3600
4084
  case 0:
@@ -3620,12 +4104,12 @@ var OroClient = /*#__PURE__*/function () {
3620
4104
  }();
3621
4105
 
3622
4106
  _proto.getMetaCategoryFromConsultId = /*#__PURE__*/function () {
3623
- var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(consultationId, category, forceRefresh) {
4107
+ var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(consultationId, category, forceRefresh) {
3624
4108
  var _this3 = this;
3625
4109
 
3626
4110
  var grants, workflowData, _loop, _iterator, _step;
3627
4111
 
3628
- return _regeneratorRuntime().wrap(function _callee27$(_context28) {
4112
+ return runtime_1.wrap(function _callee27$(_context28) {
3629
4113
  while (1) {
3630
4114
  switch (_context28.prev = _context28.next) {
3631
4115
  case 0:
@@ -3641,9 +4125,9 @@ var OroClient = /*#__PURE__*/function () {
3641
4125
  case 3:
3642
4126
  grants = _context28.sent;
3643
4127
  workflowData = [];
3644
- _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
4128
+ _loop = /*#__PURE__*/runtime_1.mark(function _loop() {
3645
4129
  var grant, manifest, data;
3646
- return _regeneratorRuntime().wrap(function _loop$(_context27) {
4130
+ return runtime_1.wrap(function _loop$(_context27) {
3647
4131
  while (1) {
3648
4132
  switch (_context27.prev = _context27.next) {
3649
4133
  case 0:
@@ -3677,8 +4161,8 @@ var OroClient = /*#__PURE__*/function () {
3677
4161
  case 8:
3678
4162
  _context27.next = 10;
3679
4163
  return Promise.all(manifest.map( /*#__PURE__*/function () {
3680
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(entry) {
3681
- return _regeneratorRuntime().wrap(function _callee26$(_context26) {
4164
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(entry) {
4165
+ return runtime_1.wrap(function _callee26$(_context26) {
3682
4166
  while (1) {
3683
4167
  switch (_context26.prev = _context26.next) {
3684
4168
  case 0:
@@ -3762,9 +4246,9 @@ var OroClient = /*#__PURE__*/function () {
3762
4246
  _proto.getPersonalInformations =
3763
4247
  /*#__PURE__*/
3764
4248
  function () {
3765
- var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(userId) {
4249
+ var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(userId) {
3766
4250
  var grant, lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
3767
- return _regeneratorRuntime().wrap(function _callee28$(_context29) {
4251
+ return runtime_1.wrap(function _callee28$(_context29) {
3768
4252
  while (1) {
3769
4253
  switch (_context29.prev = _context29.next) {
3770
4254
  case 0:
@@ -3850,9 +4334,9 @@ var OroClient = /*#__PURE__*/function () {
3850
4334
  _proto.getGrantFromConsultId =
3851
4335
  /*#__PURE__*/
3852
4336
  function () {
3853
- var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(consultationId) {
4337
+ var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(consultationId) {
3854
4338
  var grants;
3855
- return _regeneratorRuntime().wrap(function _callee29$(_context30) {
4339
+ return runtime_1.wrap(function _callee29$(_context30) {
3856
4340
  while (1) {
3857
4341
  switch (_context30.prev = _context30.next) {
3858
4342
  case 0:
@@ -3898,9 +4382,9 @@ var OroClient = /*#__PURE__*/function () {
3898
4382
  _proto.getIdentityFromConsultId =
3899
4383
  /*#__PURE__*/
3900
4384
  function () {
3901
- var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(consultationId) {
4385
+ var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(consultationId) {
3902
4386
  var grant;
3903
- return _regeneratorRuntime().wrap(function _callee30$(_context31) {
4387
+ return runtime_1.wrap(function _callee30$(_context31) {
3904
4388
  while (1) {
3905
4389
  switch (_context31.prev = _context31.next) {
3906
4390
  case 0:
@@ -3953,11 +4437,11 @@ var OroClient = /*#__PURE__*/function () {
3953
4437
  _proto.getLockboxManifest =
3954
4438
  /*#__PURE__*/
3955
4439
  function () {
3956
- var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
4440
+ var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
3957
4441
  var _this4 = this;
3958
4442
 
3959
4443
  var manifestKey;
3960
- return _regeneratorRuntime().wrap(function _callee32$(_context33) {
4444
+ return runtime_1.wrap(function _callee32$(_context33) {
3961
4445
  while (1) {
3962
4446
  switch (_context33.prev = _context33.next) {
3963
4447
  case 0:
@@ -3982,9 +4466,9 @@ var OroClient = /*#__PURE__*/function () {
3982
4466
  case 4:
3983
4467
  return _context33.abrupt("return", this.vaultClient.lockboxManifestGet(lockboxUuid, filter, lockboxOwnerUuid).then(function (manifest) {
3984
4468
  return Promise.all(manifest.map( /*#__PURE__*/function () {
3985
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(entry) {
4469
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(entry) {
3986
4470
  var privateMeta;
3987
- return _regeneratorRuntime().wrap(function _callee31$(_context32) {
4471
+ return runtime_1.wrap(function _callee31$(_context32) {
3988
4472
  while (1) {
3989
4473
  switch (_context32.prev = _context32.next) {
3990
4474
  case 0:
@@ -4045,11 +4529,11 @@ var OroClient = /*#__PURE__*/function () {
4045
4529
  _proto.createPersonalInformations =
4046
4530
  /*#__PURE__*/
4047
4531
  function () {
4048
- var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(identity, data, dataUuid) {
4532
+ var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(identity, data, dataUuid) {
4049
4533
  var _yield$this$getGrants;
4050
4534
 
4051
4535
  var lockboxUuid;
4052
- return _regeneratorRuntime().wrap(function _callee33$(_context34) {
4536
+ return runtime_1.wrap(function _callee33$(_context34) {
4053
4537
  while (1) {
4054
4538
  switch (_context34.prev = _context34.next) {
4055
4539
  case 0:
@@ -4115,11 +4599,11 @@ var OroClient = /*#__PURE__*/function () {
4115
4599
  _proto.createUserPreference =
4116
4600
  /*#__PURE__*/
4117
4601
  function () {
4118
- var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(identity, preference, dataUuid) {
4602
+ var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(identity, preference, dataUuid) {
4119
4603
  var _yield$this$getGrants2;
4120
4604
 
4121
4605
  var lockboxUuid;
4122
- return _regeneratorRuntime().wrap(function _callee34$(_context35) {
4606
+ return runtime_1.wrap(function _callee34$(_context35) {
4123
4607
  while (1) {
4124
4608
  switch (_context35.prev = _context35.next) {
4125
4609
  case 0:
@@ -4183,9 +4667,9 @@ var OroClient = /*#__PURE__*/function () {
4183
4667
  _proto.getDataFromGrant =
4184
4668
  /*#__PURE__*/
4185
4669
  function () {
4186
- var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(grant, filter) {
4670
+ var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(grant, filter) {
4187
4671
  var lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
4188
- return _regeneratorRuntime().wrap(function _callee35$(_context36) {
4672
+ return runtime_1.wrap(function _callee35$(_context36) {
4189
4673
  while (1) {
4190
4674
  switch (_context36.prev = _context36.next) {
4191
4675
  case 0:
@@ -4251,9 +4735,9 @@ var OroClient = /*#__PURE__*/function () {
4251
4735
  _proto.getUserPreferenceFromConsultId =
4252
4736
  /*#__PURE__*/
4253
4737
  function () {
4254
- var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(consultationId) {
4738
+ var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(consultationId) {
4255
4739
  var grant;
4256
- return _regeneratorRuntime().wrap(function _callee36$(_context37) {
4740
+ return runtime_1.wrap(function _callee36$(_context37) {
4257
4741
  while (1) {
4258
4742
  switch (_context37.prev = _context37.next) {
4259
4743
  case 0:
@@ -4300,9 +4784,9 @@ var OroClient = /*#__PURE__*/function () {
4300
4784
  _proto.getUserPreference =
4301
4785
  /*#__PURE__*/
4302
4786
  function () {
4303
- var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(identity) {
4787
+ var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(identity) {
4304
4788
  var grant;
4305
- return _regeneratorRuntime().wrap(function _callee37$(_context38) {
4789
+ return runtime_1.wrap(function _callee37$(_context38) {
4306
4790
  while (1) {
4307
4791
  switch (_context38.prev = _context38.next) {
4308
4792
  case 0:
@@ -4351,9 +4835,9 @@ var OroClient = /*#__PURE__*/function () {
4351
4835
  _proto.getRecoveryDataFromConsultId =
4352
4836
  /*#__PURE__*/
4353
4837
  function () {
4354
- var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(consultationId) {
4838
+ var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(consultationId) {
4355
4839
  var grant;
4356
- return _regeneratorRuntime().wrap(function _callee38$(_context39) {
4840
+ return runtime_1.wrap(function _callee38$(_context39) {
4357
4841
  while (1) {
4358
4842
  switch (_context39.prev = _context39.next) {
4359
4843
  case 0:
@@ -4400,9 +4884,9 @@ var OroClient = /*#__PURE__*/function () {
4400
4884
  _proto.getRecoveryData =
4401
4885
  /*#__PURE__*/
4402
4886
  function () {
4403
- var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(identity) {
4887
+ var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(identity) {
4404
4888
  var grant;
4405
- return _regeneratorRuntime().wrap(function _callee39$(_context40) {
4889
+ return runtime_1.wrap(function _callee39$(_context40) {
4406
4890
  while (1) {
4407
4891
  switch (_context40.prev = _context40.next) {
4408
4892
  case 0:
@@ -4456,10 +4940,10 @@ var OroClient = /*#__PURE__*/function () {
4456
4940
  _proto.getAssignedConsultations =
4457
4941
  /*#__PURE__*/
4458
4942
  function () {
4459
- var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(practiceUuid, forceRefresh) {
4943
+ var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(practiceUuid, forceRefresh) {
4460
4944
  var _this5 = this;
4461
4945
 
4462
- return _regeneratorRuntime().wrap(function _callee41$(_context42) {
4946
+ return runtime_1.wrap(function _callee41$(_context42) {
4463
4947
  while (1) {
4464
4948
  switch (_context42.prev = _context42.next) {
4465
4949
  case 0:
@@ -4478,8 +4962,8 @@ var OroClient = /*#__PURE__*/function () {
4478
4962
  documentType: DocumentType.PopulatedWorkflowData
4479
4963
  }, true, undefined, forceRefresh).then(function (manifest) {
4480
4964
  return Promise.all(manifest.map( /*#__PURE__*/function () {
4481
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(entry) {
4482
- return _regeneratorRuntime().wrap(function _callee40$(_context41) {
4965
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(entry) {
4966
+ return runtime_1.wrap(function _callee40$(_context41) {
4483
4967
  while (1) {
4484
4968
  switch (_context41.prev = _context41.next) {
4485
4969
  case 0:
@@ -4533,11 +5017,11 @@ var OroClient = /*#__PURE__*/function () {
4533
5017
  _proto.getPastConsultationsFromConsultId =
4534
5018
  /*#__PURE__*/
4535
5019
  function () {
4536
- var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(consultationId, practiceUuid) {
5020
+ var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(consultationId, practiceUuid) {
4537
5021
  var _this6 = this;
4538
5022
 
4539
5023
  var grant, consultationsInLockbox;
4540
- return _regeneratorRuntime().wrap(function _callee43$(_context44) {
5024
+ return runtime_1.wrap(function _callee43$(_context44) {
4541
5025
  while (1) {
4542
5026
  switch (_context44.prev = _context44.next) {
4543
5027
  case 0:
@@ -4576,8 +5060,8 @@ var OroClient = /*#__PURE__*/function () {
4576
5060
  case 10:
4577
5061
  _context44.next = 12;
4578
5062
  return Promise.all(consultationsInLockbox.map( /*#__PURE__*/function () {
4579
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(consultId) {
4580
- return _regeneratorRuntime().wrap(function _callee42$(_context43) {
5063
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(consultId) {
5064
+ return runtime_1.wrap(function _callee42$(_context43) {
4581
5065
  while (1) {
4582
5066
  switch (_context43.prev = _context43.next) {
4583
5067
  case 0:
@@ -4628,10 +5112,10 @@ var OroClient = /*#__PURE__*/function () {
4628
5112
  _proto.getPatientConsultationData =
4629
5113
  /*#__PURE__*/
4630
5114
  function () {
4631
- var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(consultationId, forceRefresh) {
5115
+ var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(consultationId, forceRefresh) {
4632
5116
  var _this7 = this;
4633
5117
 
4634
- return _regeneratorRuntime().wrap(function _callee44$(_context45) {
5118
+ return runtime_1.wrap(function _callee44$(_context45) {
4635
5119
  while (1) {
4636
5120
  switch (_context45.prev = _context45.next) {
4637
5121
  case 0:
@@ -4685,8 +5169,8 @@ var OroClient = /*#__PURE__*/function () {
4685
5169
  _proto.getPatientPrescriptionsList =
4686
5170
  /*#__PURE__*/
4687
5171
  function () {
4688
- var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(consultationId) {
4689
- return _regeneratorRuntime().wrap(function _callee45$(_context46) {
5172
+ var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(consultationId) {
5173
+ return runtime_1.wrap(function _callee45$(_context46) {
4690
5174
  while (1) {
4691
5175
  switch (_context46.prev = _context46.next) {
4692
5176
  case 0:
@@ -4719,8 +5203,8 @@ var OroClient = /*#__PURE__*/function () {
4719
5203
  _proto.getPatientResultsList =
4720
5204
  /*#__PURE__*/
4721
5205
  function () {
4722
- var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46(consultationId) {
4723
- return _regeneratorRuntime().wrap(function _callee46$(_context47) {
5206
+ var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(consultationId) {
5207
+ return runtime_1.wrap(function _callee46$(_context47) {
4724
5208
  while (1) {
4725
5209
  switch (_context47.prev = _context47.next) {
4726
5210
  case 0:
@@ -4753,8 +5237,8 @@ var OroClient = /*#__PURE__*/function () {
4753
5237
  _proto.getPatientTreatmentPlans =
4754
5238
  /*#__PURE__*/
4755
5239
  function () {
4756
- var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47(consultationId) {
4757
- return _regeneratorRuntime().wrap(function _callee47$(_context48) {
5240
+ var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(consultationId) {
5241
+ return runtime_1.wrap(function _callee47$(_context48) {
4758
5242
  while (1) {
4759
5243
  switch (_context48.prev = _context48.next) {
4760
5244
  case 0:
@@ -4788,8 +5272,8 @@ var OroClient = /*#__PURE__*/function () {
4788
5272
  _proto.getPatientTreatmentPlanByUuid =
4789
5273
  /*#__PURE__*/
4790
5274
  function () {
4791
- var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee48(consultationId, treatmentPlanId) {
4792
- return _regeneratorRuntime().wrap(function _callee48$(_context49) {
5275
+ var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(consultationId, treatmentPlanId) {
5276
+ return runtime_1.wrap(function _callee48$(_context49) {
4793
5277
  while (1) {
4794
5278
  switch (_context49.prev = _context49.next) {
4795
5279
  case 0:
@@ -4827,10 +5311,10 @@ var OroClient = /*#__PURE__*/function () {
4827
5311
  _proto.getPatientDocumentsList =
4828
5312
  /*#__PURE__*/
4829
5313
  function () {
4830
- var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(filters, expandPrivateMetadata, consultationId) {
5314
+ var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(filters, expandPrivateMetadata, consultationId) {
4831
5315
  var _this8 = this;
4832
5316
 
4833
- return _regeneratorRuntime().wrap(function _callee50$(_context51) {
5317
+ return runtime_1.wrap(function _callee50$(_context51) {
4834
5318
  while (1) {
4835
5319
  switch (_context51.prev = _context51.next) {
4836
5320
  case 0:
@@ -4846,8 +5330,8 @@ var OroClient = /*#__PURE__*/function () {
4846
5330
  consultationId: consultationId
4847
5331
  }), expandPrivateMetadata, grant.lockboxOwnerUuid, true).then(function (manifest) {
4848
5332
  return Promise.all(manifest.map( /*#__PURE__*/function () {
4849
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(entry) {
4850
- return _regeneratorRuntime().wrap(function _callee49$(_context50) {
5333
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(entry) {
5334
+ return runtime_1.wrap(function _callee49$(_context50) {
4851
5335
  while (1) {
4852
5336
  switch (_context50.prev = _context50.next) {
4853
5337
  case 0:
@@ -4905,9 +5389,9 @@ var OroClient = /*#__PURE__*/function () {
4905
5389
  _proto.recoverPrivateKeyFromSecurityQuestions =
4906
5390
  /*#__PURE__*/
4907
5391
  function () {
4908
- var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
5392
+ var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
4909
5393
  var shards, answeredShards, privateKey;
4910
- return _regeneratorRuntime().wrap(function _callee51$(_context52) {
5394
+ return runtime_1.wrap(function _callee51$(_context52) {
4911
5395
  while (1) {
4912
5396
  switch (_context52.prev = _context52.next) {
4913
5397
  case 0:
@@ -4961,9 +5445,9 @@ var OroClient = /*#__PURE__*/function () {
4961
5445
  _proto.recoverPrivateKeyFromPassword =
4962
5446
  /*#__PURE__*/
4963
5447
  function () {
4964
- var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(id, password) {
5448
+ var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(id, password) {
4965
5449
  var identity, recoveryPayload, symmetricDecryptor, privateKey, symetricEncryptor;
4966
- return _regeneratorRuntime().wrap(function _callee52$(_context53) {
5450
+ return runtime_1.wrap(function _callee52$(_context53) {
4967
5451
  while (1) {
4968
5452
  switch (_context53.prev = _context53.next) {
4969
5453
  case 0:
@@ -5009,9 +5493,9 @@ var OroClient = /*#__PURE__*/function () {
5009
5493
  _proto.recoverPrivateKeyFromMasterKey =
5010
5494
  /*#__PURE__*/
5011
5495
  function () {
5012
- var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53(id, masterKey) {
5496
+ var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(id, masterKey) {
5013
5497
  var recoveryPayload, symmetricDecryptor, privateKey;
5014
- return _regeneratorRuntime().wrap(function _callee53$(_context54) {
5498
+ return runtime_1.wrap(function _callee53$(_context54) {
5015
5499
  while (1) {
5016
5500
  switch (_context54.prev = _context54.next) {
5017
5501
  case 0:
@@ -5051,9 +5535,9 @@ var OroClient = /*#__PURE__*/function () {
5051
5535
  _proto.updateSecurityQuestions =
5052
5536
  /*#__PURE__*/
5053
5537
  function () {
5054
- var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee54(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
5538
+ var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
5055
5539
  var securityQuestionPayload, updateRequest;
5056
- return _regeneratorRuntime().wrap(function _callee54$(_context55) {
5540
+ return runtime_1.wrap(function _callee54$(_context55) {
5057
5541
  while (1) {
5058
5542
  switch (_context55.prev = _context55.next) {
5059
5543
  case 0:
@@ -5105,9 +5589,9 @@ var OroClient = /*#__PURE__*/function () {
5105
5589
  _proto.updatePassword =
5106
5590
  /*#__PURE__*/
5107
5591
  function () {
5108
- var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55(id, newPassword, oldPassword) {
5592
+ var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee55(id, newPassword, oldPassword) {
5109
5593
  var symmetricEncryptor, passwordPayload, updateRequest;
5110
- return _regeneratorRuntime().wrap(function _callee55$(_context56) {
5594
+ return runtime_1.wrap(function _callee55$(_context56) {
5111
5595
  while (1) {
5112
5596
  switch (_context56.prev = _context56.next) {
5113
5597
  case 0:
@@ -5167,9 +5651,9 @@ var OroClient = /*#__PURE__*/function () {
5167
5651
  _proto.updateMasterKey =
5168
5652
  /*#__PURE__*/
5169
5653
  function () {
5170
- var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee56(id, masterKey, lockboxUuid) {
5654
+ var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee56(id, masterKey, lockboxUuid) {
5171
5655
  var symmetricEncryptor, masterKeyPayload, updateRequest, updatedIdentity;
5172
- return _regeneratorRuntime().wrap(function _callee56$(_context57) {
5656
+ return runtime_1.wrap(function _callee56$(_context57) {
5173
5657
  while (1) {
5174
5658
  switch (_context57.prev = _context57.next) {
5175
5659
  case 0: