videomail-client 16.4.1 → 16.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  var __webpack_modules__ = {
2
- pJ (module, __webpack_exports__, __webpack_require__) {
2
+ eq (module, __webpack_exports__, __webpack_require__) {
3
3
  "use strict";
4
- var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1 = __webpack_require__("K7");
5
- var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1);
6
- var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0 = __webpack_require__("Ly");
7
- var _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0);
8
- var ___CSS_LOADER_EXPORT___ = _node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0_default()(_node_modules_rslib_core_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1_default());
4
+ var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1 = __webpack_require__("erX");
5
+ var _node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1);
6
+ var _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0 = __webpack_require__("zm");
7
+ var _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0);
8
+ var ___CSS_LOADER_EXPORT___ = _node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_0_default()(_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_1_default());
9
9
  ___CSS_LOADER_EXPORT___.push([
10
10
  module.id,
11
11
  `@keyframes blink {
@@ -153,7 +153,7 @@ var __webpack_modules__ = {
153
153
  });
154
154
  },
155
155
  b6 (module, exports1, __webpack_require__) {
156
- var EventEmitter = __webpack_require__("qU").EventEmitter, inherits = __webpack_require__("c5"), raf = __webpack_require__("jY"), methods;
156
+ var EventEmitter = __webpack_require__("q").EventEmitter, inherits = __webpack_require__("c5"), raf = __webpack_require__("jY"), methods;
157
157
  var defaultRAFObject = {
158
158
  requestAnimationFrame: raf,
159
159
  cancelAnimationFrame: raf.cancel
@@ -1831,7 +1831,7 @@ var __webpack_modules__ = {
1831
1831
  },
1832
1832
  xF (module, __unused_rspack_exports, __webpack_require__) {
1833
1833
  "use strict";
1834
- var document1 = __webpack_require__("gM");
1834
+ var document1 = __webpack_require__("g");
1835
1835
  var Event1 = __webpack_require__("cE");
1836
1836
  var Keys = __webpack_require__("Dy");
1837
1837
  module.exports = Visibility;
@@ -2186,7 +2186,7 @@ var __webpack_modules__ = {
2186
2186
  var isArray = __webpack_require__("ab");
2187
2187
  var Duplex;
2188
2188
  Readable.ReadableState = ReadableState;
2189
- __webpack_require__("qU").EventEmitter;
2189
+ __webpack_require__("q").EventEmitter;
2190
2190
  var EElistenerCount = function(emitter, type) {
2191
2191
  return emitter.listeners(type).length;
2192
2192
  };
@@ -3450,7 +3450,7 @@ var __webpack_modules__ = {
3450
3450
  };
3451
3451
  },
3452
3452
  tb (module, __unused_rspack_exports, __webpack_require__) {
3453
- module.exports = __webpack_require__("qU").EventEmitter;
3453
+ module.exports = __webpack_require__("q").EventEmitter;
3454
3454
  },
3455
3455
  GB (module, exports1, __webpack_require__) {
3456
3456
  exports1 = module.exports = __webpack_require__("rp");
@@ -3847,7 +3847,7 @@ var __webpack_modules__ = {
3847
3847
  "use strict";
3848
3848
  module.exports = Object;
3849
3849
  },
3850
- qU (module) {
3850
+ q (module) {
3851
3851
  "use strict";
3852
3852
  var R = 'object' == typeof Reflect ? Reflect : null;
3853
3853
  var ReflectApply = R && 'function' == typeof R.apply ? R.apply : function(target, receiver, args) {
@@ -4897,7 +4897,7 @@ var __webpack_modules__ = {
4897
4897
  return tuple.listen;
4898
4898
  }
4899
4899
  },
4900
- gM (module, __unused_rspack_exports, __webpack_require__) {
4900
+ g (module, __unused_rspack_exports, __webpack_require__) {
4901
4901
  var topLevel = void 0 !== __webpack_require__.g ? __webpack_require__.g : "u" > typeof window ? window : {};
4902
4902
  var minDoc = __webpack_require__("MM");
4903
4903
  var doccy;
@@ -5987,6 +5987,7 @@ var __webpack_modules__ = {
5987
5987
  var has = Object.prototype.hasOwnProperty;
5988
5988
  var isArray = Array.isArray;
5989
5989
  var getPrototypeOf = Object.getPrototypeOf;
5990
+ var fromCharCode = String.fromCharCode;
5990
5991
  var isPlainContainer = function(value) {
5991
5992
  if (!value || 'object' != typeof value) return false;
5992
5993
  if (isArray(value)) return true;
@@ -6059,7 +6060,12 @@ var __webpack_modules__ = {
6059
6060
  };
6060
6061
  var interpretNumericEntities = function(str) {
6061
6062
  return str.replace(/&#(\d+);/g, function($0, numberStr) {
6062
- return String.fromCharCode(parseInt(numberStr, 10));
6063
+ var c = parseInt(numberStr, 10);
6064
+ if (c > 0xFFFF && c <= 0x10FFFF) {
6065
+ c -= 0x10000;
6066
+ return fromCharCode(0xD800 | c >> 10, 0xDC00 | 0x3FF & c);
6067
+ }
6068
+ return fromCharCode(c);
6063
6069
  });
6064
6070
  };
6065
6071
  var parseArrayValue = function(val, options, currentArrayLength) {
@@ -6131,6 +6137,9 @@ var __webpack_modules__ = {
6131
6137
  }
6132
6138
  return obj;
6133
6139
  };
6140
+ var stripWrappingBrackets = function(key) {
6141
+ return '[' === key.charAt(0) && ']' === key.charAt(key.length - 1) ? key.slice(1, -1) : key;
6142
+ };
6134
6143
  var parseObject = function(chain, val, options, valuesParsed) {
6135
6144
  var currentArrayLength = 0;
6136
6145
  if (chain.length > 0 && '[]' === chain[chain.length - 1]) {
@@ -6146,7 +6155,7 @@ var __webpack_modules__ = {
6146
6155
  obj = options.plainObjects ? {
6147
6156
  __proto__: null
6148
6157
  } : {};
6149
- var cleanRoot = '[' === root.charAt(0) && ']' === root.charAt(root.length - 1) ? root.slice(1, -1) : root;
6158
+ var cleanRoot = stripWrappingBrackets(root);
6150
6159
  var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/gi, '.') : cleanRoot;
6151
6160
  var index = parseInt(decodedRoot, 10);
6152
6161
  var isValidArrayIndex = !isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && options.parseArrays;
@@ -6159,9 +6168,7 @@ var __webpack_modules__ = {
6159
6168
  obj[index] = leaf;
6160
6169
  utils.markOverflow(obj, index);
6161
6170
  } else if ('__proto__' !== decodedRoot) obj[decodedRoot] = leaf;
6162
- } else obj = {
6163
- 0: leaf
6164
- };
6171
+ } else obj[0] = leaf;
6165
6172
  }
6166
6173
  leaf = obj;
6167
6174
  }
@@ -6191,7 +6198,7 @@ var __webpack_modules__ = {
6191
6198
  var splitKeyIntoSegments = function(originalKey, options) {
6192
6199
  var key = options.allowDots ? topLevelDotsToBrackets(originalKey) : originalKey;
6193
6200
  if (options.depth <= 0) {
6194
- if (!options.plainObjects && has.call(Object.prototype, key)) {
6201
+ if (!options.plainObjects && has.call(Object.prototype, stripWrappingBrackets(key))) {
6195
6202
  if (!options.allowPrototypes) return;
6196
6203
  }
6197
6204
  return [
@@ -6575,6 +6582,11 @@ var __webpack_modules__ = {
6575
6582
  }
6576
6583
  return max;
6577
6584
  };
6585
+ var countElements = function(arr) {
6586
+ var count = 0;
6587
+ for(var i = 0; i < arr.length; ++i)if (has.call(arr, i)) count += 1;
6588
+ return count;
6589
+ };
6578
6590
  var limitedPair = function(first, second, options) {
6579
6591
  var pair = [
6580
6592
  first,
@@ -6591,7 +6603,7 @@ var __webpack_modules__ = {
6591
6603
  if ('object' != typeof source && 'function' != typeof source) {
6592
6604
  if (isArray(target)) {
6593
6605
  var nextIndex = target.length;
6594
- if (options && 'number' == typeof options.arrayLimit && nextIndex >= options.arrayLimit) {
6606
+ if (options && 'number' == typeof options.arrayLimit && countElements(target) >= options.arrayLimit) {
6595
6607
  if (options.throwOnLimitExceeded) throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (1 === options.arrayLimit ? '' : 's') + ' allowed in an array.');
6596
6608
  return markOverflow(arrayToObject(target.concat(source), options), nextIndex);
6597
6609
  }
@@ -6649,7 +6661,7 @@ var __webpack_modules__ = {
6649
6661
  else target[target.length] = item;
6650
6662
  } else target[i] = item;
6651
6663
  });
6652
- if (options && 'number' == typeof options.arrayLimit && target.length > options.arrayLimit) {
6664
+ if (options && 'number' == typeof options.arrayLimit && countElements(target) > options.arrayLimit) {
6653
6665
  if (options.throwOnLimitExceeded) throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (1 === options.arrayLimit ? '' : 's') + ' allowed in an array.');
6654
6666
  return markOverflow(arrayToObject(target, options), target.length - 1);
6655
6667
  }
@@ -8811,7 +8823,7 @@ var __webpack_modules__ = {
8811
8823
  var isArray = __webpack_require__("N3");
8812
8824
  var Duplex;
8813
8825
  Readable.ReadableState = ReadableState;
8814
- __webpack_require__("qU").EventEmitter;
8826
+ __webpack_require__("q").EventEmitter;
8815
8827
  var EElistenerCount = function(emitter, type) {
8816
8828
  return emitter.listeners(type).length;
8817
8829
  };
@@ -8830,7 +8842,7 @@ var __webpack_modules__ = {
8830
8842
  var debug = void 0;
8831
8843
  debug = debugUtil && debugUtil.debuglog ? debugUtil.debuglog('stream') : function() {};
8832
8844
  var BufferList = __webpack_require__("aI");
8833
- var destroyImpl = __webpack_require__("R");
8845
+ var destroyImpl = __webpack_require__("R5");
8834
8846
  var StringDecoder;
8835
8847
  util.inherits(Readable, Stream);
8836
8848
  var kProxyEvents = [
@@ -9565,7 +9577,7 @@ var __webpack_modules__ = {
9565
9577
  function _isUint8Array(obj) {
9566
9578
  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
9567
9579
  }
9568
- var destroyImpl = __webpack_require__("R");
9580
+ var destroyImpl = __webpack_require__("R5");
9569
9581
  util.inherits(Writable, Stream);
9570
9582
  function nop() {}
9571
9583
  function WritableState(options, stream) {
@@ -10019,7 +10031,7 @@ var __webpack_modules__ = {
10019
10031
  return this.constructor.name + ' ' + obj;
10020
10032
  };
10021
10033
  },
10022
- R (module, __unused_rspack_exports, __webpack_require__) {
10034
+ R5 (module, __unused_rspack_exports, __webpack_require__) {
10023
10035
  "use strict";
10024
10036
  var pna = __webpack_require__("sj");
10025
10037
  function destroy(err, cb) {
@@ -10075,7 +10087,7 @@ var __webpack_modules__ = {
10075
10087
  };
10076
10088
  },
10077
10089
  O (module, __unused_rspack_exports, __webpack_require__) {
10078
- module.exports = __webpack_require__("qU").EventEmitter;
10090
+ module.exports = __webpack_require__("q").EventEmitter;
10079
10091
  },
10080
10092
  Fo (module, exports1, __webpack_require__) {
10081
10093
  exports1 = module.exports = __webpack_require__("w");
@@ -10565,7 +10577,7 @@ var __webpack_modules__ = {
10565
10577
  a () {},
10566
10578
  Av () {},
10567
10579
  eD () {},
10568
- Ly (module) {
10580
+ zm (module) {
10569
10581
  "use strict";
10570
10582
  module.exports = function(cssWithMappingToString) {
10571
10583
  var list = [];
@@ -10619,13 +10631,13 @@ var __webpack_modules__ = {
10619
10631
  return list;
10620
10632
  };
10621
10633
  },
10622
- K7 (module) {
10634
+ erX (module) {
10623
10635
  "use strict";
10624
10636
  module.exports = function(i) {
10625
10637
  return i[1];
10626
10638
  };
10627
10639
  },
10628
- q (module) {
10640
+ R (module) {
10629
10641
  "use strict";
10630
10642
  var stylesInDOM = [];
10631
10643
  function getIndexByIdentifier(identifier) {
@@ -10704,7 +10716,7 @@ var __webpack_modules__ = {
10704
10716
  };
10705
10717
  };
10706
10718
  },
10707
- f (module) {
10719
+ uZ (module) {
10708
10720
  "use strict";
10709
10721
  var memo = {};
10710
10722
  function getTarget(target) {
@@ -10726,7 +10738,7 @@ var __webpack_modules__ = {
10726
10738
  }
10727
10739
  module.exports = insertBySelector;
10728
10740
  },
10729
- z7 (module) {
10741
+ mK (module) {
10730
10742
  "use strict";
10731
10743
  function insertStyleElement(options) {
10732
10744
  var element = document.createElement("style");
@@ -10736,7 +10748,7 @@ var __webpack_modules__ = {
10736
10748
  }
10737
10749
  module.exports = insertStyleElement;
10738
10750
  },
10739
- g (module, __unused_rspack_exports, __webpack_require__) {
10751
+ kU (module, __unused_rspack_exports, __webpack_require__) {
10740
10752
  "use strict";
10741
10753
  function setAttributesWithoutAttributes(styleElement) {
10742
10754
  var nonce = __webpack_require__.nc;
@@ -10744,7 +10756,7 @@ var __webpack_modules__ = {
10744
10756
  }
10745
10757
  module.exports = setAttributesWithoutAttributes;
10746
10758
  },
10747
- V (module) {
10759
+ Bd (module) {
10748
10760
  "use strict";
10749
10761
  function apply(styleElement, options, obj) {
10750
10762
  var css = "";
@@ -10781,7 +10793,7 @@ var __webpack_modules__ = {
10781
10793
  }
10782
10794
  module.exports = domAPI;
10783
10795
  },
10784
- AD (module) {
10796
+ snK (module) {
10785
10797
  "use strict";
10786
10798
  function styleTagTransform(css, styleElement) {
10787
10799
  if (styleElement.styleSheet) styleElement.styleSheet.cssText = css;
@@ -11126,7 +11138,7 @@ var __webpack_exports__ = {};
11126
11138
  var client = __webpack_require__("Q");
11127
11139
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
11128
11140
  var package_namespaceObject = {
11129
- rE: "16.4.1"
11141
+ rE: "16.6.0"
11130
11142
  };
11131
11143
  function isAudioEnabled(options) {
11132
11144
  return Boolean(options.audio.enabled);
@@ -14656,12 +14668,12 @@ var __webpack_exports__ = {};
14656
14668
  const errName = null != (_ref = null == err ? void 0 : err.name) ? _ref : null == err ? void 0 : err.constructor.name;
14657
14669
  switch(errName){
14658
14670
  case error_VideomailError.SECURITY_ERROR:
14659
- message = "The operation was insecure";
14660
- explanation = "Probably you have disallowed Cookies for this page?";
14671
+ message = "Your browser blocked this action";
14672
+ explanation = "Check this page's camera permissions and security settings.";
14661
14673
  classList.push(error_VideomailError.BROWSER_PROBLEM);
14662
14674
  break;
14663
14675
  case error_VideomailError.OVERCONSTRAINED:
14664
- message = "Invalid webcam constraints";
14676
+ message = "Your webcam cannot use these settings";
14665
14677
  if (err && "constraint" in err) {
14666
14678
  const overconstrainedError = err;
14667
14679
  const constraint = overconstrainedError.constraint;
@@ -14672,64 +14684,64 @@ var __webpack_exports__ = {};
14672
14684
  break;
14673
14685
  case "MediaDeviceFailedDueToShutdown":
14674
14686
  message = "Webcam is shutting down";
14675
- explanation = "This happens your webcam is already switching off and not giving you permission to use it.";
14687
+ explanation = "Wait for your webcam to finish switching off, then try again.";
14676
14688
  break;
14677
14689
  case "SourceUnavailableError":
14678
- message = "Source of your webcam cannot be accessed";
14679
- explanation = "Probably it is locked from another process or has a hardware error.";
14690
+ message = "Cannot access your webcam";
14691
+ explanation = "Another app may be using it, or there may be a hardware problem.";
14680
14692
  break;
14681
14693
  case "NO_DEVICES_FOUND":
14682
14694
  if (audioEnabled) {
14683
- message = "No webcam nor microphone found";
14684
- explanation = "Your browser cannot find a webcam with microphone attached to your machine.";
14695
+ message = "No webcam or microphone found";
14696
+ explanation = "Check that your webcam and microphone are connected.";
14685
14697
  } else {
14686
14698
  message = "No webcam found";
14687
- explanation = "Your browser cannot find a webcam attached to your machine.";
14699
+ explanation = "Check that your webcam is connected.";
14688
14700
  }
14689
14701
  classList.push(error_VideomailError.WEBCAM_PROBLEM);
14690
14702
  break;
14691
14703
  case "PermissionDismissedError":
14692
- message = "Ooops, you didn't give me any permissions?";
14693
- explanation = "Looks like you skipped the webcam permission dialogue.<br/>Please grant access next time the dialogue appears.";
14704
+ message = "Camera permission is needed";
14705
+ explanation = "The camera permission prompt was closed.<br/>Please allow access when it appears again.";
14694
14706
  classList.push(error_VideomailError.WEBCAM_PROBLEM);
14695
14707
  break;
14696
14708
  case error_VideomailError.NOT_ALLOWED_ERROR:
14697
14709
  case error_VideomailError.PERMISSION_DENIED:
14698
14710
  case "PermissionDeniedError":
14699
14711
  message = "Permission denied";
14700
- explanation = "Cannot access your webcam. This can have two reasons:<br/>a) you blocked access to webcam; or<br/>b) your webcam is already in use.";
14712
+ explanation = "We cannot access your webcam. Check these possibilities:<ul><li>Camera access is blocked in your browser settings.</li><li>Another app is using your webcam.</li></ul>";
14701
14713
  classList.push(error_VideomailError.WEBCAM_PROBLEM);
14702
14714
  break;
14703
14715
  case "HARDWARE_UNAVAILABLE":
14704
14716
  case "AbortError":
14705
14717
  message = "Webcam is unavailable";
14706
- explanation = "Maybe it is already busy in another window?";
14718
+ explanation = "Another window may be using it. Close it and try again.";
14707
14719
  classList.push(error_VideomailError.WEBCAM_PROBLEM);
14708
14720
  break;
14709
14721
  case "NO_VIDEO_FEED":
14710
- message = "No video feed found!";
14711
- explanation = "Your webcam is already used in another browser.";
14722
+ message = "No video feed found";
14723
+ explanation = "Another browser may be using your webcam.";
14712
14724
  classList.push(error_VideomailError.WEBCAM_PROBLEM);
14713
14725
  break;
14714
14726
  case error_VideomailError.STARTING_FAILED:
14715
- message = "Starting video failed";
14716
- explanation = "Most likely this happens when the webcam is already active in another browser";
14727
+ message = "Could not start recording";
14728
+ explanation = "Another browser may be using your webcam.";
14717
14729
  classList.push(error_VideomailError.WEBCAM_PROBLEM);
14718
14730
  break;
14719
14731
  case "DevicesNotFoundError":
14720
- message = "No available webcam could be found";
14721
- explanation = "Looks like you do not have any webcam attached to your machine; or the one you plugged in is already used.";
14732
+ message = "No available webcam found";
14733
+ explanation = "Check that your webcam is connected and not being used by another app.";
14722
14734
  classList.push(error_VideomailError.WEBCAM_PROBLEM);
14723
14735
  break;
14724
14736
  case error_VideomailError.NOT_READABLE_ERROR:
14725
14737
  case error_VideomailError.TRACK_START_ERROR:
14726
- message = "No access to webcam";
14727
- explanation = "Perhaps you are already using it in another browser?";
14738
+ message = "Cannot access your webcam";
14739
+ explanation = "Another browser may be using it. Close it and try again.";
14728
14740
  classList.push(error_VideomailError.WEBCAM_PROBLEM);
14729
14741
  break;
14730
14742
  case error_VideomailError.INVALID_STATE_ERROR:
14731
- message = "Invalid state";
14732
- explanation = "Video recording stream from your webcam already has finished";
14743
+ message = "Your camera stream has ended";
14744
+ explanation = "The webcam stream is no longer active.";
14733
14745
  classList.push(error_VideomailError.WEBCAM_PROBLEM);
14734
14746
  break;
14735
14747
  case error_VideomailError.DOM_EXCEPTION:
@@ -15198,6 +15210,17 @@ var __webpack_exports__ = {};
15198
15210
  enable(buttonsToo) {
15199
15211
  this.setDisabled(false, buttonsToo);
15200
15212
  }
15213
+ disableForSubmission() {
15214
+ for (const formControl of this.formElement.elements){
15215
+ this.submissionDisabledStates.set(formControl, formControl.hasAttribute("disabled"));
15216
+ formControl.setAttribute("disabled", "disabled");
15217
+ }
15218
+ }
15219
+ restoreAfterFailedSubmission() {
15220
+ for (const [formControl, wasDisabled] of this.submissionDisabledStates)if (wasDisabled) formControl.setAttribute("disabled", "disabled");
15221
+ else formControl.removeAttribute("disabled");
15222
+ this.submissionDisabledStates.clear();
15223
+ }
15201
15224
  build() {
15202
15225
  this.options.logger.debug("Form: build()");
15203
15226
  this.keyInput = this.formElement.querySelector(`input[name="${this.options.selectors.keyInputName}"]`);
@@ -15363,7 +15386,7 @@ var __webpack_exports__ = {};
15363
15386
  html_showElement(this.formElement);
15364
15387
  }
15365
15388
  constructor(container, formElement, options){
15366
- super("Form", options), form_define_property(this, "container", void 0), form_define_property(this, "formElement", void 0), form_define_property(this, "keyInput", void 0), form_define_property(this, "submitButton", void 0), form_define_property(this, "submitButtonFormAttribute", null), form_define_property(this, "generatedFormId", void 0), form_define_property(this, "isSubmitting", false), form_define_property(this, "FORM_FIELDS", {}), form_define_property(this, "validate", (event)=>{
15389
+ super("Form", options), form_define_property(this, "container", void 0), form_define_property(this, "formElement", void 0), form_define_property(this, "keyInput", void 0), form_define_property(this, "submitButton", void 0), form_define_property(this, "submitButtonFormAttribute", null), form_define_property(this, "generatedFormId", void 0), form_define_property(this, "isSubmitting", false), form_define_property(this, "submissionDisabledStates", new Map()), form_define_property(this, "FORM_FIELDS", {}), form_define_property(this, "validate", (event)=>{
15367
15390
  this.container.validate(event);
15368
15391
  }), form_define_property(this, "handleSubmit", (event)=>{
15369
15392
  if (!event.defaultPrevented) this.doTheSubmit(event);
@@ -15832,19 +15855,19 @@ var __webpack_exports__ = {};
15832
15855
  return newOptions;
15833
15856
  }
15834
15857
  const options_mergeWithDefaultOptions = mergeWithDefaultOptions;
15835
- var injectStylesIntoStyleTag = __webpack_require__("q");
15858
+ var injectStylesIntoStyleTag = __webpack_require__("R");
15836
15859
  var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
15837
- var styleDomAPI = __webpack_require__("V");
15860
+ var styleDomAPI = __webpack_require__("Bd");
15838
15861
  var styleDomAPI_default = /*#__PURE__*/ __webpack_require__.n(styleDomAPI);
15839
- var insertBySelector = __webpack_require__("f");
15862
+ var insertBySelector = __webpack_require__("uZ");
15840
15863
  var insertBySelector_default = /*#__PURE__*/ __webpack_require__.n(insertBySelector);
15841
- var setAttributesWithoutAttributes = __webpack_require__("g");
15864
+ var setAttributesWithoutAttributes = __webpack_require__("kU");
15842
15865
  var setAttributesWithoutAttributes_default = /*#__PURE__*/ __webpack_require__.n(setAttributesWithoutAttributes);
15843
- var insertStyleElement = __webpack_require__("z7");
15866
+ var insertStyleElement = __webpack_require__("mK");
15844
15867
  var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement);
15845
- var styleTagTransform = __webpack_require__("AD");
15868
+ var styleTagTransform = __webpack_require__("snK");
15846
15869
  var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform);
15847
- var main = __webpack_require__("pJ");
15870
+ var main = __webpack_require__("eq");
15848
15871
  var main_options = {};
15849
15872
  main_options.styleTagTransform = styleTagTransform_default();
15850
15873
  main_options.setAttributes = setAttributesWithoutAttributes_default();
@@ -18162,8 +18185,13 @@ var __webpack_exports__ = {};
18162
18185
  this.hide();
18163
18186
  }
18164
18187
  onUserMediaReady(params) {
18165
- this.onFormReady();
18188
+ this.onFormReady(params);
18166
18189
  html_showElement(this.buttonsElement);
18190
+ if (params.recovering && params.paused) {
18191
+ html_hideElement(this.recordButton);
18192
+ html_disableElement(this.recordButton);
18193
+ return;
18194
+ }
18167
18195
  html_showElement(this.audioOnRadioPair);
18168
18196
  html_showElement(this.audioOffRadioPair);
18169
18197
  if (html_isShown(this.recordButton) && !params.recordWhenReady) html_enableElement(this.recordButton);
@@ -18886,8 +18914,8 @@ var __webpack_exports__ = {};
18886
18914
  this.on("PAUSED", ()=>{
18887
18915
  this.pauseRecording();
18888
18916
  });
18889
- this.on("ERROR", ()=>{
18890
- this.onResetting();
18917
+ this.on("ERROR", ({ recoverable })=>{
18918
+ if (!recoverable) this.onResetting();
18891
18919
  });
18892
18920
  this.on("RESETTING", ()=>{
18893
18921
  this.onResetting();
@@ -19078,12 +19106,12 @@ var __webpack_exports__ = {};
19078
19106
  this.entertainTimeoutId = void 0;
19079
19107
  this.entertaining = false;
19080
19108
  }
19081
- error(err) {
19109
+ error(err, blocking = true) {
19082
19110
  const message = err.message;
19083
19111
  const explanation = err.explanation;
19084
19112
  if (!message) this.options.logger.debug(`Weird empty error message generated for error ${string_pretty(err)}`);
19085
19113
  this.notify(message, explanation, {
19086
- blocking: true,
19114
+ blocking,
19087
19115
  problem: true,
19088
19116
  classList: err.getClassList(),
19089
19117
  removeDimensions: util_getBrowser(this.options).isMobile()
@@ -20537,6 +20565,10 @@ var __webpack_exports__ = {};
20537
20565
  if (this.streamBackpressured) this.resumeAfterDrain = true;
20538
20566
  else loop.start();
20539
20567
  }
20568
+ resumeMediaForCountdown() {
20569
+ var _this_userMedia;
20570
+ null == (_this_userMedia = this.userMedia) || _this_userMedia.resume();
20571
+ }
20540
20572
  onFlushed(opts) {
20541
20573
  const frameNumber = opts.frameNumber;
20542
20574
  if (1 === frameNumber) this.emit("FIRST_FRAME_SENT");
@@ -21274,10 +21306,7 @@ var __webpack_exports__ = {};
21274
21306
  "droidcam"
21275
21307
  ];
21276
21308
  function isVirtualCamera(videoTrack) {
21277
- const capabilities = videoTrack.getCapabilities();
21278
- if (!capabilities.frameRate) return true;
21279
- const isVirtual = VIRTUAL_KEYWORDS.some((keyword)=>videoTrack.label.toLowerCase().includes(keyword));
21280
- return isVirtual;
21309
+ return VIRTUAL_KEYWORDS.some((keyword)=>videoTrack.label.toLowerCase().includes(keyword));
21281
21310
  }
21282
21311
  const util_isVirtualCamera = isVirtualCamera;
21283
21312
  function userMedia_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -21721,7 +21750,7 @@ var __webpack_exports__ = {};
21721
21750
  let explanation = "(No explanation given)";
21722
21751
  if (null == (_command_args = command.args) ? void 0 : null == (_command_args_err = _command_args.err) ? void 0 : _command_args_err.message) explanation = command.args.err.message;
21723
21752
  const err = error_createError({
21724
- message: "Websocket error from Videomail server",
21753
+ message: "WebSocket error from the Videomail server",
21725
21754
  explanation,
21726
21755
  err: deserializeError(null == (_command_args1 = command.args) ? void 0 : _command_args1.err),
21727
21756
  options: this.options
@@ -22169,6 +22198,32 @@ var __webpack_exports__ = {};
22169
22198
  }
22170
22199
  }
22171
22200
  const visuals_replay = Replay;
22201
+ function visuals_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
22202
+ try {
22203
+ var info = gen[key](arg);
22204
+ var value = info.value;
22205
+ } catch (error) {
22206
+ reject(error);
22207
+ return;
22208
+ }
22209
+ if (info.done) resolve(value);
22210
+ else Promise.resolve(value).then(_next, _throw);
22211
+ }
22212
+ function visuals_async_to_generator(fn) {
22213
+ return function() {
22214
+ var self1 = this, args = arguments;
22215
+ return new Promise(function(resolve, reject) {
22216
+ var gen = fn.apply(self1, args);
22217
+ function _next(value) {
22218
+ visuals_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
22219
+ }
22220
+ function _throw(err) {
22221
+ visuals_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
22222
+ }
22223
+ _next(void 0);
22224
+ });
22225
+ };
22226
+ }
22172
22227
  function visuals_define_property(obj, key, value) {
22173
22228
  if (key in obj) Object.defineProperty(obj, key, {
22174
22229
  value: value,
@@ -22363,21 +22418,40 @@ var __webpack_exports__ = {};
22363
22418
  this.clearCameraRecoveryNotice();
22364
22419
  return this.recorder.recoverCamera();
22365
22420
  }
22366
- resume() {
22367
- this.clearCameraRecoveryNotice();
22368
- if (this.recorderInsides.isCountingDown()) {
22421
+ canResumeCountdown(restored) {
22422
+ return restored && Boolean(this.recorderInsides.isCountingDown());
22423
+ }
22424
+ resumeCountdown() {
22425
+ return visuals_async_to_generator(function*() {
22426
+ const restored = yield this.recoverCamera();
22427
+ if (!this.canResumeCountdown(restored)) return;
22428
+ this.recorder.resumeMediaForCountdown();
22369
22429
  this.recorderInsides.resumeCountdown();
22370
22430
  this.recorderInsides.hidePause();
22371
- } else {
22372
- this.recorder.resume();
22373
- if (!this.recorder.isPaused()) this.recorderInsides.hidePause();
22374
- }
22431
+ }).call(this);
22432
+ }
22433
+ resume() {
22434
+ return visuals_async_to_generator(function*() {
22435
+ this.clearCameraRecoveryNotice();
22436
+ if (this.recorderInsides.isCountingDown()) yield this.resumeCountdown();
22437
+ else {
22438
+ this.recorder.resume();
22439
+ if (!this.recorder.isPaused()) this.recorderInsides.hidePause();
22440
+ }
22441
+ }).call(this);
22442
+ }
22443
+ resumeFromControl() {
22444
+ this.resume().catch((exc)=>{
22445
+ this.emit("ERROR", {
22446
+ exc
22447
+ });
22448
+ });
22375
22449
  }
22376
22450
  pauseOrResume() {
22377
- if (this.cameraRecoveryFailed && this.recorder.isPaused()) this.resume();
22451
+ if (this.cameraRecoveryFailed && this.recorder.isPaused()) this.resumeFromControl();
22378
22452
  else if (this.isRecordable()) {
22379
22453
  if (this.isRecording()) this.pause();
22380
- else if (this.recorder.isPaused()) this.resume();
22454
+ else if (this.recorder.isPaused()) this.resumeFromControl();
22381
22455
  else if (this.recorder.isReady()) this.recorder.record();
22382
22456
  }
22383
22457
  }
@@ -22406,8 +22480,8 @@ var __webpack_exports__ = {};
22406
22480
  isPaused() {
22407
22481
  return this.recorder.isPaused();
22408
22482
  }
22409
- error(err) {
22410
- this.notifier.error(err);
22483
+ error(err, blocking = true) {
22484
+ this.notifier.error(err, blocking);
22411
22485
  }
22412
22486
  hide() {
22413
22487
  if (this.visualsElement) {
@@ -22556,6 +22630,7 @@ var __webpack_exports__ = {};
22556
22630
  }
22557
22631
  return target;
22558
22632
  }
22633
+ const INTERACTIVE_SPACE_TARGETS = "button, input, select, textarea, a[href], summary, label, audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), [role='button'], [role='link'], [role='checkbox'], [role='radio'], [role='switch'], [role='menuitem'], [role='tab'], [tabindex]:not([tabindex='-1'])";
22559
22634
  class Container extends util_Despot {
22560
22635
  buildChildren(playerOnly = false, parentElement) {
22561
22636
  const parentElementInfo = parentElement ? `, parentElement="${string_pretty(parentElement)}"` : "";
@@ -22630,9 +22705,9 @@ var __webpack_exports__ = {};
22630
22705
  if (params.exc.stack) this.options.logger.error(params.exc.stack);
22631
22706
  else if (params.exc.message) this.options.logger.error(params.exc.message);
22632
22707
  } else this.options.logger.error(params.exc);
22633
- if (this.options.displayErrors && params.err) this.visuals.error(params.err);
22634
- else if (this.options.displayErrors && params.exc && params.exc instanceof error_VideomailError) this.visuals.error(params.exc);
22635
- else this.visuals.reset();
22708
+ if (this.options.displayErrors && params.err) this.visuals.error(params.err, !params.recoverable);
22709
+ else if (this.options.displayErrors && params.exc && params.exc instanceof error_VideomailError) this.visuals.error(params.exc, !params.recoverable);
22710
+ else if (!params.recoverable) this.visuals.reset();
22636
22711
  }
22637
22712
  initEvents(playerOnly = false) {
22638
22713
  this.options.logger.debug(`Container: initEvents (playerOnly = ${playerOnly})`);
@@ -22650,7 +22725,10 @@ var __webpack_exports__ = {};
22650
22725
  }
22651
22726
  });
22652
22727
  if (this.options.enableSpace) {
22653
- if (!playerOnly) window.addEventListener("keydown", this.handleKeyDown);
22728
+ if (!playerOnly) {
22729
+ var _this_containerElement;
22730
+ null == (_this_containerElement = this.containerElement) || _this_containerElement.addEventListener("keydown", this.handleKeyDown);
22731
+ }
22654
22732
  }
22655
22733
  this.on("ERROR", (params)=>{
22656
22734
  this.processError(params);
@@ -22688,10 +22766,10 @@ var __webpack_exports__ = {};
22688
22766
  this.endWaiting();
22689
22767
  }
22690
22768
  removeBrowserEventListeners() {
22691
- var _this_stopListeningToVisibility, _this;
22769
+ var _this_containerElement, _this_stopListeningToVisibility, _this;
22692
22770
  window.removeEventListener("resize", this.handleWindowResize);
22693
22771
  window.removeEventListener("beforeunload", this.handleBeforeUnload);
22694
- window.removeEventListener("keydown", this.handleKeyDown);
22772
+ null == (_this_containerElement = this.containerElement) || _this_containerElement.removeEventListener("keydown", this.handleKeyDown);
22695
22773
  null == (_this_stopListeningToVisibility = (_this = this).stopListeningToVisibility) || _this_stopListeningToVisibility.call(_this);
22696
22774
  this.stopListeningToVisibility = void 0;
22697
22775
  }
@@ -22941,6 +23019,7 @@ var __webpack_exports__ = {};
22941
23019
  return container_async_to_generator(function*() {
22942
23020
  let response;
22943
23021
  let hostResponse;
23022
+ let submissionFailed = false;
22944
23023
  const videomailKey = formData[this.options.selectors.keyInputName];
22945
23024
  try {
22946
23025
  const hasVideomailKey = Boolean(videomailKey);
@@ -22951,7 +23030,10 @@ var __webpack_exports__ = {};
22951
23030
  ].filter(Boolean).join(": ");
22952
23031
  this.options.logger.debug(`Container: submitAll(${output})`);
22953
23032
  this.beginWaiting();
22954
- if (this.options.disableFormWhenSubmitting) this.disableForm(true);
23033
+ if (this.options.disableFormWhenSubmitting) {
23034
+ var _this_form;
23035
+ null == (_this_form = this.form) || _this_form.disableForSubmission();
23036
+ }
22955
23037
  this.emit("SUBMITTING");
22956
23038
  if (hasVideomailKey) {
22957
23039
  var _this_getPendingHostSubmissionResponse;
@@ -22980,15 +23062,21 @@ var __webpack_exports__ = {};
22980
23062
  });
22981
23063
  }
22982
23064
  } catch (exc) {
23065
+ submissionFailed = true;
22983
23066
  const err = error_createError({
22984
23067
  exc,
22985
23068
  options: this.options
22986
23069
  });
22987
23070
  this.emit("ERROR", {
22988
- err
23071
+ err,
23072
+ recoverable: true
22989
23073
  });
22990
23074
  } finally{
22991
23075
  const finalResponse = null != hostResponse ? hostResponse : response;
23076
+ if (submissionFailed && this.options.disableFormWhenSubmitting) {
23077
+ var _this_form1;
23078
+ null == (_this_form1 = this.form) || _this_form1.restoreAfterFailedSubmission();
23079
+ }
22992
23080
  if ((null == finalResponse ? void 0 : finalResponse.text) && "text/html" === finalResponse.type) document.body.innerHTML = purify_default.sanitize(finalResponse.text);
22993
23081
  this.endWaiting();
22994
23082
  }
@@ -23031,7 +23119,7 @@ var __webpack_exports__ = {};
23031
23119
  submit() {
23032
23120
  return container_async_to_generator(function*() {
23033
23121
  this.options.logger.debug("Container: submit()");
23034
- if (this.lastValidation) {
23122
+ if (!this.options.enableAutoValidation || this.lastValidation) {
23035
23123
  var _this_form;
23036
23124
  return yield null == (_this_form = this.form) ? void 0 : _this_form.doTheSubmit();
23037
23125
  }
@@ -23048,7 +23136,11 @@ var __webpack_exports__ = {};
23048
23136
  this.visuals.record();
23049
23137
  }
23050
23138
  resume() {
23051
- this.visuals.resume();
23139
+ this.visuals.resume().catch((exc)=>{
23140
+ this.emit("ERROR", {
23141
+ exc
23142
+ });
23143
+ });
23052
23144
  }
23053
23145
  stop() {
23054
23146
  this.visuals.stop();
@@ -23068,14 +23160,16 @@ var __webpack_exports__ = {};
23068
23160
  e
23069
23161
  });
23070
23162
  }), container_define_property(this, "handleKeyDown", (e)=>{
23071
- const element = e.target;
23072
- const tagName = element.tagName;
23073
- const isEditable = element.isContentEditable || "true" === element.contentEditable;
23074
- if (!isEditable && tagName && "INPUT" !== tagName.toUpperCase() && "TEXTAREA" !== tagName.toUpperCase() && "Space" === e.code) {
23075
- e.preventDefault();
23076
- if (this.options.enablePause) this.visuals.pauseOrResume();
23077
- else this.visuals.recordOrStop();
23078
- }
23163
+ const containerElement = this.containerElement;
23164
+ if (!containerElement) return;
23165
+ const eventPath = e.composedPath();
23166
+ const targetContainerIndex = eventPath.findIndex((eventTarget)=>eventTarget instanceof Element && eventTarget.classList.contains(this.options.selectors.containerClass));
23167
+ const targetContainer = eventPath[targetContainerIndex];
23168
+ const isInteractiveTarget = eventPath.slice(0, targetContainerIndex + 1).some((eventTarget)=>eventTarget instanceof Element && eventTarget.matches(INTERACTIVE_SPACE_TARGETS));
23169
+ if (!eventPath.includes(containerElement) || targetContainer !== containerElement || isInteractiveTarget || e.defaultPrevented || e.repeat || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || "Space" !== e.code) return;
23170
+ e.preventDefault();
23171
+ if (this.options.enablePause) this.visuals.pauseOrResume();
23172
+ else this.visuals.recordOrStop();
23079
23173
  });
23080
23174
  this.visuals = new wrappers_visuals(this, options);
23081
23175
  this.buttons = new buttons(this, options);