@seamly/web-ui 22.1.0-beta.1 → 22.2.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.
Files changed (50) hide show
  1. package/build/dist/lib/components.js +429 -180
  2. package/build/dist/lib/components.js.map +1 -1
  3. package/build/dist/lib/components.min.js +1 -1
  4. package/build/dist/lib/components.min.js.LICENSE.txt +2 -2
  5. package/build/dist/lib/components.min.js.map +1 -1
  6. package/build/dist/lib/hooks.js +84 -19
  7. package/build/dist/lib/hooks.js.map +1 -1
  8. package/build/dist/lib/hooks.min.js +1 -1
  9. package/build/dist/lib/hooks.min.js.map +1 -1
  10. package/build/dist/lib/index.debug.js +38 -38
  11. package/build/dist/lib/index.debug.min.js +1 -1
  12. package/build/dist/lib/index.debug.min.js.map +1 -1
  13. package/build/dist/lib/index.js +462 -193
  14. package/build/dist/lib/index.js.map +1 -1
  15. package/build/dist/lib/index.min.js +1 -1
  16. package/build/dist/lib/index.min.js.LICENSE.txt +2 -2
  17. package/build/dist/lib/index.min.js.map +1 -1
  18. package/build/dist/lib/standalone.js +539 -216
  19. package/build/dist/lib/standalone.js.map +1 -1
  20. package/build/dist/lib/standalone.min.js +1 -1
  21. package/build/dist/lib/standalone.min.js.LICENSE.txt +1 -1
  22. package/build/dist/lib/standalone.min.js.map +1 -1
  23. package/build/dist/lib/style-guide.js +557 -190
  24. package/build/dist/lib/style-guide.js.map +1 -1
  25. package/build/dist/lib/style-guide.min.js +1 -1
  26. package/build/dist/lib/style-guide.min.js.LICENSE.txt +2 -2
  27. package/build/dist/lib/style-guide.min.js.map +1 -1
  28. package/build/dist/lib/styles-default-implementation.js +1 -1
  29. package/build/dist/lib/styles.css +1 -1
  30. package/build/dist/lib/styles.js +1 -1
  31. package/build/dist/lib/utils.js +459 -190
  32. package/build/dist/lib/utils.js.map +1 -1
  33. package/build/dist/lib/utils.min.js +1 -1
  34. package/build/dist/lib/utils.min.js.LICENSE.txt +1 -1
  35. package/build/dist/lib/utils.min.js.map +1 -1
  36. package/package.json +28 -28
  37. package/src/javascripts/api/index.ts +13 -1
  38. package/src/javascripts/domains/config/slice.ts +2 -1
  39. package/src/javascripts/domains/forms/selectors.ts +6 -8
  40. package/src/javascripts/domains/forms/slice.ts +1 -1
  41. package/src/javascripts/domains/translations/components/options-dialog/translation-option.tsx +3 -1
  42. package/src/javascripts/domains/translations/components/options-dialog/translation-options.tsx +62 -35
  43. package/src/javascripts/domains/translations/slice.ts +8 -1
  44. package/src/javascripts/lib/engine/index.tsx +3 -1
  45. package/src/javascripts/style-guide/states.js +47 -0
  46. package/src/javascripts/ui/components/entry/text-entry/hooks.ts +2 -2
  47. package/src/javascripts/ui/components/form-controls/wrapper.tsx +13 -3
  48. package/src/stylesheets/5-components/_input.scss +0 -5
  49. package/src/stylesheets/5-components/_options.scss +2 -2
  50. package/src/stylesheets/5-components/_translation-options.scss +23 -3
@@ -4157,7 +4157,9 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
4157
4157
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4158
4158
 
4159
4159
  var DESCRIPTORS = __webpack_require__(5746);
4160
+ var fails = __webpack_require__(5981);
4160
4161
  var uncurryThis = __webpack_require__(5329);
4162
+ var objectGetPrototypeOf = __webpack_require__(249);
4161
4163
  var objectKeys = __webpack_require__(4771);
4162
4164
  var toIndexedObject = __webpack_require__(4529);
4163
4165
  var $propertyIsEnumerable = (__webpack_require__(6760).f);
@@ -4165,18 +4167,28 @@ var $propertyIsEnumerable = (__webpack_require__(6760).f);
4165
4167
  var propertyIsEnumerable = uncurryThis($propertyIsEnumerable);
4166
4168
  var push = uncurryThis([].push);
4167
4169
 
4170
+ // in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys
4171
+ // of `null` prototype objects
4172
+ var IE_BUG = DESCRIPTORS && fails(function () {
4173
+ // eslint-disable-next-line es/no-object-create -- safe
4174
+ var O = Object.create(null);
4175
+ O[2] = 2;
4176
+ return !propertyIsEnumerable(O, 2);
4177
+ });
4178
+
4168
4179
  // `Object.{ entries, values }` methods implementation
4169
4180
  var createMethod = function (TO_ENTRIES) {
4170
4181
  return function (it) {
4171
4182
  var O = toIndexedObject(it);
4172
4183
  var keys = objectKeys(O);
4184
+ var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;
4173
4185
  var length = keys.length;
4174
4186
  var i = 0;
4175
4187
  var result = [];
4176
4188
  var key;
4177
4189
  while (length > i) {
4178
4190
  key = keys[i++];
4179
- if (!DESCRIPTORS || propertyIsEnumerable(O, key)) {
4191
+ if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {
4180
4192
  push(result, TO_ENTRIES ? [key, O[key]] : O[key]);
4181
4193
  }
4182
4194
  }
@@ -4553,10 +4565,10 @@ var store = __webpack_require__(3030);
4553
4565
  (module.exports = function (key, value) {
4554
4566
  return store[key] || (store[key] = value !== undefined ? value : {});
4555
4567
  })('versions', []).push({
4556
- version: '3.30.2',
4568
+ version: '3.31.1',
4557
4569
  mode: IS_PURE ? 'pure' : 'global',
4558
4570
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
4559
- license: 'https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE',
4571
+ license: 'https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE',
4560
4572
  source: 'https://github.com/zloirock/core-js'
4561
4573
  });
4562
4574
 
@@ -5264,13 +5276,15 @@ module.exports = !fails(function () {
5264
5276
  // eslint-disable-next-line unicorn/relative-url-style -- required for testing
5265
5277
  var url = new URL('b?a=1&b=2&c=3', 'http://a');
5266
5278
  var searchParams = url.searchParams;
5279
+ var searchParams2 = new URLSearchParams('a=1&a=2');
5267
5280
  var result = '';
5268
5281
  url.pathname = 'c%20d';
5269
5282
  searchParams.forEach(function (value, key) {
5270
5283
  searchParams['delete']('b');
5271
5284
  result += key + value;
5272
5285
  });
5273
- return (IS_PURE && !url.toJSON)
5286
+ searchParams2['delete']('a', 2);
5287
+ return (IS_PURE && (!url.toJSON || !searchParams2.has('a', 1) || searchParams2.has('a', 2)))
5274
5288
  || (!searchParams.size && (IS_PURE || !DESCRIPTORS))
5275
5289
  || !searchParams.sort
5276
5290
  || url.href !== 'http://a/c%20d?a=1&c=3'
@@ -7985,7 +7999,7 @@ var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
7985
7999
  anInstance(this, URLSearchParamsPrototype);
7986
8000
  var init = arguments.length > 0 ? arguments[0] : undefined;
7987
8001
  var state = setInternalState(this, new URLSearchParamsState(init));
7988
- if (!DESCRIPTORS) this.length = state.entries.length;
8002
+ if (!DESCRIPTORS) this.size = state.entries.length;
7989
8003
  };
7990
8004
 
7991
8005
  var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
@@ -7994,32 +8008,37 @@ defineBuiltIns(URLSearchParamsPrototype, {
7994
8008
  // `URLSearchParams.prototype.append` method
7995
8009
  // https://url.spec.whatwg.org/#dom-urlsearchparams-append
7996
8010
  append: function append(name, value) {
7997
- validateArgumentsLength(arguments.length, 2);
7998
8011
  var state = getInternalParamsState(this);
8012
+ validateArgumentsLength(arguments.length, 2);
7999
8013
  push(state.entries, { key: $toString(name), value: $toString(value) });
8000
8014
  if (!DESCRIPTORS) this.length++;
8001
8015
  state.updateURL();
8002
8016
  },
8003
8017
  // `URLSearchParams.prototype.delete` method
8004
8018
  // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
8005
- 'delete': function (name) {
8006
- validateArgumentsLength(arguments.length, 1);
8019
+ 'delete': function (name /* , value */) {
8007
8020
  var state = getInternalParamsState(this);
8021
+ var length = validateArgumentsLength(arguments.length, 1);
8008
8022
  var entries = state.entries;
8009
8023
  var key = $toString(name);
8024
+ var $value = length < 2 ? undefined : arguments[1];
8025
+ var value = $value === undefined ? $value : $toString($value);
8010
8026
  var index = 0;
8011
8027
  while (index < entries.length) {
8012
- if (entries[index].key === key) splice(entries, index, 1);
8013
- else index++;
8028
+ var entry = entries[index];
8029
+ if (entry.key === key && (value === undefined || entry.value === value)) {
8030
+ splice(entries, index, 1);
8031
+ if (value !== undefined) break;
8032
+ } else index++;
8014
8033
  }
8015
- if (!DESCRIPTORS) this.length = entries.length;
8034
+ if (!DESCRIPTORS) this.size = entries.length;
8016
8035
  state.updateURL();
8017
8036
  },
8018
8037
  // `URLSearchParams.prototype.get` method
8019
8038
  // https://url.spec.whatwg.org/#dom-urlsearchparams-get
8020
8039
  get: function get(name) {
8021
- validateArgumentsLength(arguments.length, 1);
8022
8040
  var entries = getInternalParamsState(this).entries;
8041
+ validateArgumentsLength(arguments.length, 1);
8023
8042
  var key = $toString(name);
8024
8043
  var index = 0;
8025
8044
  for (; index < entries.length; index++) {
@@ -8030,8 +8049,8 @@ defineBuiltIns(URLSearchParamsPrototype, {
8030
8049
  // `URLSearchParams.prototype.getAll` method
8031
8050
  // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
8032
8051
  getAll: function getAll(name) {
8033
- validateArgumentsLength(arguments.length, 1);
8034
8052
  var entries = getInternalParamsState(this).entries;
8053
+ validateArgumentsLength(arguments.length, 1);
8035
8054
  var key = $toString(name);
8036
8055
  var result = [];
8037
8056
  var index = 0;
@@ -8042,21 +8061,24 @@ defineBuiltIns(URLSearchParamsPrototype, {
8042
8061
  },
8043
8062
  // `URLSearchParams.prototype.has` method
8044
8063
  // https://url.spec.whatwg.org/#dom-urlsearchparams-has
8045
- has: function has(name) {
8046
- validateArgumentsLength(arguments.length, 1);
8064
+ has: function has(name /* , value */) {
8047
8065
  var entries = getInternalParamsState(this).entries;
8066
+ var length = validateArgumentsLength(arguments.length, 1);
8048
8067
  var key = $toString(name);
8068
+ var $value = length < 2 ? undefined : arguments[1];
8069
+ var value = $value === undefined ? $value : $toString($value);
8049
8070
  var index = 0;
8050
8071
  while (index < entries.length) {
8051
- if (entries[index++].key === key) return true;
8072
+ var entry = entries[index++];
8073
+ if (entry.key === key && (value === undefined || entry.value === value)) return true;
8052
8074
  }
8053
8075
  return false;
8054
8076
  },
8055
8077
  // `URLSearchParams.prototype.set` method
8056
8078
  // https://url.spec.whatwg.org/#dom-urlsearchparams-set
8057
8079
  set: function set(name, value) {
8058
- validateArgumentsLength(arguments.length, 1);
8059
8080
  var state = getInternalParamsState(this);
8081
+ validateArgumentsLength(arguments.length, 1);
8060
8082
  var entries = state.entries;
8061
8083
  var found = false;
8062
8084
  var key = $toString(name);
@@ -8074,7 +8096,7 @@ defineBuiltIns(URLSearchParamsPrototype, {
8074
8096
  }
8075
8097
  }
8076
8098
  if (!found) push(entries, { key: key, value: val });
8077
- if (!DESCRIPTORS) this.length = entries.length;
8099
+ if (!DESCRIPTORS) this.size = entries.length;
8078
8100
  state.updateURL();
8079
8101
  },
8080
8102
  // `URLSearchParams.prototype.sort` method
@@ -8187,6 +8209,22 @@ module.exports = {
8187
8209
  };
8188
8210
 
8189
8211
 
8212
+ /***/ }),
8213
+
8214
+ /***/ 6454:
8215
+ /***/ (function() {
8216
+
8217
+ // empty
8218
+
8219
+
8220
+ /***/ }),
8221
+
8222
+ /***/ 3305:
8223
+ /***/ (function() {
8224
+
8225
+ // empty
8226
+
8227
+
8190
8228
  /***/ }),
8191
8229
 
8192
8230
  /***/ 5304:
@@ -9699,16 +9737,29 @@ __webpack_require__(7634);
9699
9737
  module.exports = parent;
9700
9738
 
9701
9739
 
9740
+ /***/ }),
9741
+
9742
+ /***/ 7610:
9743
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9744
+
9745
+ __webpack_require__(5304);
9746
+ __webpack_require__(6454);
9747
+ __webpack_require__(3305);
9748
+ __webpack_require__(2337);
9749
+ var path = __webpack_require__(4058);
9750
+
9751
+ module.exports = path.URLSearchParams;
9752
+
9753
+
9702
9754
  /***/ }),
9703
9755
 
9704
9756
  /***/ 1459:
9705
9757
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
9706
9758
 
9759
+ __webpack_require__(7610);
9707
9760
  __webpack_require__(3601);
9708
9761
  __webpack_require__(4630);
9709
9762
  __webpack_require__(8947);
9710
- __webpack_require__(5304);
9711
- __webpack_require__(2337);
9712
9763
  var path = __webpack_require__(4058);
9713
9764
 
9714
9765
  module.exports = path.URL;
@@ -10526,15 +10577,18 @@ var _=0;function o(o,e,n,t,f,l){var s,u,a={};for(u in e)"ref"==u?s=e[u]:a[u]=e[u
10526
10577
  // EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/promise.js
10527
10578
  var promise = __webpack_require__(6226);
10528
10579
  var promise_default = /*#__PURE__*/__webpack_require__.n(promise);
10580
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js
10581
+ var index_of = __webpack_require__(1882);
10582
+ var index_of_default = /*#__PURE__*/__webpack_require__.n(index_of);
10583
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js
10584
+ var get_own_property_symbols = __webpack_require__(222);
10585
+ var get_own_property_symbols_default = /*#__PURE__*/__webpack_require__.n(get_own_property_symbols);
10529
10586
  // EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/url.js
10530
10587
  var core_js_stable_url = __webpack_require__(3460);
10531
10588
  var url_default = /*#__PURE__*/__webpack_require__.n(core_js_stable_url);
10532
10589
  // EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/object/assign.js
10533
10590
  var object_assign = __webpack_require__(6986);
10534
10591
  var assign_default = /*#__PURE__*/__webpack_require__.n(object_assign);
10535
- // EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js
10536
- var index_of = __webpack_require__(1882);
10537
- var index_of_default = /*#__PURE__*/__webpack_require__.n(index_of);
10538
10592
  // EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js
10539
10593
  var stringify = __webpack_require__(5627);
10540
10594
  var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
@@ -12266,6 +12320,7 @@ _ConversationConnector_connectionListeners = new (weak_map_default())(), _Conver
12266
12320
  return !complete;
12267
12321
  }), "f");
12268
12322
  };
12323
+ /* harmony default export */ var conversation_connector = (ConversationConnector);
12269
12324
  ;// CONCATENATED MODULE: ./src/javascripts/api/index.ts
12270
12325
 
12271
12326
 
@@ -12279,6 +12334,7 @@ _ConversationConnector_connectionListeners = new (weak_map_default())(), _Conver
12279
12334
 
12280
12335
 
12281
12336
 
12337
+
12282
12338
  var api_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
12283
12339
  function adopt(value) {
12284
12340
  return value instanceof P ? value : new P(function (resolve) {
@@ -12317,6 +12373,14 @@ var api_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet ||
12317
12373
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
12318
12374
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12319
12375
  };
12376
+ var __rest = undefined && undefined.__rest || function (s, e) {
12377
+ var t = {};
12378
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && index_of_default()(e).call(e, p) < 0) t[p] = s[p];
12379
+ if (s != null && typeof (get_own_property_symbols_default()) === "function") for (var i = 0, p = get_own_property_symbols_default()(s); i < p.length; i++) {
12380
+ if (index_of_default()(e).call(e, p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
12381
+ }
12382
+ return t;
12383
+ };
12320
12384
  var _API_instances, _API_ready, _API_externalId, _API_conversationAuthToken, _API_layoutMode, _API_config, _API_getAccessToken, _API_setAccessToken, _API_setConversationUrl, _API_getChannelTopic, _API_setChannelTopic, _API_getLocale, _API_getUrlPrefix, _API_updateUrls, _API_createConversation, _API_getEnvironment;
12321
12385
 
12322
12386
 
@@ -12405,7 +12469,7 @@ class API {
12405
12469
  _API_conversationAuthToken.set(this, void 0);
12406
12470
  _API_layoutMode.set(this, void 0);
12407
12471
  _API_config.set(this, void 0);
12408
- this.conversation = new ConversationConnector();
12472
+ this.conversation = new conversation_connector();
12409
12473
  _API_getLocale.set(this, locale => locale || this.locale);
12410
12474
  this.store = objectStore(`${namespace}.connection${context.locale ? `.${context.locale}` : ''}`, config.storageProvider || store);
12411
12475
  this.connectionInfo = {
@@ -12682,6 +12746,7 @@ class API {
12682
12746
  this.conversation.pushToChannel(command, buildPayload(command, payload), 10000);
12683
12747
  }
12684
12748
  sendContext(context) {
12749
+ var _a;
12685
12750
  const {
12686
12751
  locale,
12687
12752
  variables
@@ -12703,7 +12768,15 @@ class API {
12703
12768
  if (keys_default()(payload).length === 0 && payload.constructor === Object) {
12704
12769
  return;
12705
12770
  }
12706
- this.send('context', payload, false);
12771
+ // Destructure the server locale from the payload
12772
+ const {
12773
+ locale: _
12774
+ } = payload,
12775
+ restPayload = __rest(payload, ["locale"]);
12776
+ const configLocale = (_a = api_classPrivateFieldGet(this, _API_config, "f").context) === null || _a === void 0 ? void 0 : _a.locale;
12777
+ this.send('context', assign_default()(assign_default()({}, configLocale ? {
12778
+ locale: configLocale
12779
+ } : {}), restPayload), false);
12707
12780
  }
12708
12781
  }
12709
12782
  _API_ready = new (weak_map_default())(), _API_externalId = new (weak_map_default())(), _API_conversationAuthToken = new (weak_map_default())(), _API_layoutMode = new (weak_map_default())(), _API_config = new (weak_map_default())(), _API_getLocale = new (weak_map_default())(), _API_instances = new (weak_set_default())(), _API_getAccessToken = function _API_getAccessToken() {
@@ -12786,7 +12859,7 @@ _API_ready = new (weak_map_default())(), _API_externalId = new (weak_map_default
12786
12859
  return {
12787
12860
  clientName: "@seamly/web-ui",
12788
12861
  clientVariant: api_classPrivateFieldGet(this, _API_layoutMode, "f"),
12789
- clientVersion: "22.1.0-beta.1",
12862
+ clientVersion: "22.2.0",
12790
12863
  currentUrl: window.location.toString(),
12791
12864
  screenResolution: `${window.screen.width}x${window.screen.height}`,
12792
12865
  timezone: getTimeZone(),
@@ -12820,15 +12893,52 @@ const setBatch = newBatch => batch = newBatch; // Supply a getter just to skip d
12820
12893
  const getBatch = () => batch;
12821
12894
  ;// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Context.js
12822
12895
 
12823
- const Context_ReactReduxContext = /*#__PURE__*/(0,compat_module.createContext)(null);
12896
+ const ContextKey = Symbol.for(`react-redux-context-${compat_module.version}`);
12897
+ const gT = globalThis;
12898
+
12899
+ function getContext() {
12900
+ let realContext = gT[ContextKey];
12901
+
12902
+ if (!realContext) {
12903
+ realContext = (0,compat_module.createContext)(null);
12904
+
12905
+ if (false) {}
12906
+
12907
+ gT[ContextKey] = realContext;
12908
+ }
12909
+
12910
+ return realContext;
12911
+ }
12824
12912
 
12825
- if (false) {}
12913
+ const Context_ReactReduxContext = /*#__PURE__*/new Proxy({}, /*#__PURE__*/new Proxy({}, {
12914
+ get(_, handler) {
12915
+ const target = getContext(); // @ts-ignore
12916
+
12917
+ return (_target, ...args) => Reflect[handler](target, ...args);
12918
+ }
12826
12919
 
12920
+ }));
12827
12921
  /* harmony default export */ var Context = ((/* unused pure expression or super */ null && (Context_ReactReduxContext)));
12828
12922
  ;// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useReduxContext.js
12829
12923
 
12830
12924
 
12831
12925
 
12926
+ /**
12927
+ * Hook factory, which creates a `useReduxContext` hook bound to a given context. This is a low-level
12928
+ * hook that you should usually not need to call directly.
12929
+ *
12930
+ * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
12931
+ * @returns {Function} A `useReduxContext` hook bound to the specified context.
12932
+ */
12933
+ function createReduxContextHook(context = Context_ReactReduxContext) {
12934
+ return function useReduxContext() {
12935
+ const contextValue = (0,compat_module.useContext)(context);
12936
+
12937
+ if (false) {}
12938
+
12939
+ return contextValue;
12940
+ };
12941
+ }
12832
12942
  /**
12833
12943
  * A hook to access the value of the `ReactReduxContext`. This is a low-level
12834
12944
  * hook that you should usually not need to call directly.
@@ -12845,13 +12955,8 @@ if (false) {}
12845
12955
  * return <div>{store.getState()}</div>
12846
12956
  * }
12847
12957
  */
12848
- function useReduxContext_useReduxContext() {
12849
- const contextValue = (0,compat_module.useContext)(Context_ReactReduxContext);
12850
12958
 
12851
- if (false) {}
12852
-
12853
- return contextValue;
12854
- }
12959
+ const useReduxContext_useReduxContext = /*#__PURE__*/createReduxContextHook();
12855
12960
  ;// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/useSyncExternalStore.js
12856
12961
  const useSyncExternalStore_notInitialized = () => {
12857
12962
  throw new Error('uSES not initialized!');
@@ -12876,16 +12981,37 @@ const refEquality = (a, b) => a === b;
12876
12981
 
12877
12982
 
12878
12983
  function createSelectorHook(context = Context_ReactReduxContext) {
12879
- const useReduxContext = context === Context_ReactReduxContext ? useReduxContext_useReduxContext : () => (0,compat_module.useContext)(context);
12880
- return function useSelector(selector, equalityFn = refEquality) {
12984
+ const useReduxContext = context === Context_ReactReduxContext ? useReduxContext_useReduxContext : createReduxContextHook(context);
12985
+ return function useSelector(selector, equalityFnOrOptions = {}) {
12986
+ const {
12987
+ equalityFn = refEquality,
12988
+ stabilityCheck = undefined,
12989
+ noopCheck = undefined
12990
+ } = typeof equalityFnOrOptions === 'function' ? {
12991
+ equalityFn: equalityFnOrOptions
12992
+ } : equalityFnOrOptions;
12993
+
12881
12994
  if (false) {}
12882
12995
 
12883
12996
  const {
12884
12997
  store,
12885
12998
  subscription,
12886
- getServerState
12999
+ getServerState,
13000
+ stabilityCheck: globalStabilityCheck,
13001
+ noopCheck: globalNoopCheck
12887
13002
  } = useReduxContext();
12888
- const selectedState = useSyncExternalStoreWithSelector(subscription.addNestedSub, store.getState, getServerState || store.getState, selector, equalityFn);
13003
+ const firstRun = (0,compat_module.useRef)(true);
13004
+ const wrappedSelector = (0,compat_module.useCallback)({
13005
+ [selector.name](state) {
13006
+ const selected = selector(state);
13007
+
13008
+ if (false) {}
13009
+
13010
+ return selected;
13011
+ }
13012
+
13013
+ }[selector.name], [selector, globalStabilityCheck, stabilityCheck]);
13014
+ const selectedState = useSyncExternalStoreWithSelector(subscription.addNestedSub, store.getState, getServerState || store.getState, wrappedSelector, equalityFn);
12889
13015
  (0,compat_module.useDebugValue)(selectedState);
12890
13016
  return selectedState;
12891
13017
  };
@@ -13472,16 +13598,20 @@ function Provider({
13472
13598
  store,
13473
13599
  context,
13474
13600
  children,
13475
- serverState
13601
+ serverState,
13602
+ stabilityCheck = 'once',
13603
+ noopCheck = 'once'
13476
13604
  }) {
13477
13605
  const contextValue = (0,compat_module.useMemo)(() => {
13478
13606
  const subscription = Subscription_createSubscription(store);
13479
13607
  return {
13480
13608
  store,
13481
13609
  subscription,
13482
- getServerState: serverState ? () => serverState : undefined
13610
+ getServerState: serverState ? () => serverState : undefined,
13611
+ stabilityCheck,
13612
+ noopCheck
13483
13613
  };
13484
- }, [store, serverState]);
13614
+ }, [store, serverState, stabilityCheck, noopCheck]);
13485
13615
  const previousState = (0,compat_module.useMemo)(() => store.getState(), [store]);
13486
13616
  useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(() => {
13487
13617
  const {
@@ -13510,7 +13640,6 @@ function Provider({
13510
13640
  ;// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useStore.js
13511
13641
 
13512
13642
 
13513
-
13514
13643
  /**
13515
13644
  * Hook factory, which creates a `useStore` hook bound to a given context.
13516
13645
  *
@@ -13520,7 +13649,8 @@ function Provider({
13520
13649
 
13521
13650
  function createStoreHook(context = Context_ReactReduxContext) {
13522
13651
  const useReduxContext = // @ts-ignore
13523
- context === Context_ReactReduxContext ? useReduxContext_useReduxContext : () => (0,compat_module.useContext)(context);
13652
+ context === Context_ReactReduxContext ? useReduxContext_useReduxContext : // @ts-ignore
13653
+ createReduxContextHook(context);
13524
13654
  return function useStore() {
13525
13655
  const {
13526
13656
  store
@@ -18086,16 +18216,13 @@ const {
18086
18216
  // EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js
18087
18217
  var concat = __webpack_require__(9022);
18088
18218
  var concat_default = /*#__PURE__*/__webpack_require__.n(concat);
18089
- // EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js
18090
- var get_own_property_symbols = __webpack_require__(222);
18091
- var get_own_property_symbols_default = /*#__PURE__*/__webpack_require__.n(get_own_property_symbols);
18092
18219
  ;// CONCATENATED MODULE: ./src/javascripts/domains/config/slice.ts
18093
18220
 
18094
18221
 
18095
18222
 
18096
18223
 
18097
18224
 
18098
- var __rest = undefined && undefined.__rest || function (s, e) {
18225
+ var slice_rest = undefined && undefined.__rest || function (s, e) {
18099
18226
  var t = {};
18100
18227
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && index_of_default()(e).call(e, p) < 0) t[p] = s[p];
18101
18228
  if (s != null && typeof (get_own_property_symbols_default()) === "function") for (var i = 0, p = get_own_property_symbols_default()(s); i < p.length; i++) {
@@ -18138,7 +18265,7 @@ const updateState = (state, config) => {
18138
18265
  {
18139
18266
  messages
18140
18267
  } = _a,
18141
- partialConfig = __rest(_a, ["messages"]);
18268
+ partialConfig = slice_rest(_a, ["messages"]);
18142
18269
  let newState = state;
18143
18270
  if (keys_default()(partialConfig).length > 0) {
18144
18271
  newState = assign_default()(assign_default()({}, newState), partialConfig);
@@ -18180,13 +18307,15 @@ const configSlice = createSlice({
18180
18307
  preChat,
18181
18308
  agentParticipant,
18182
18309
  userParticipant,
18183
- startChatIcon
18310
+ startChatIcon,
18311
+ locale
18184
18312
  }
18185
18313
  } = _ref4;
18186
18314
  state.preChatEvents = map_default()(preChat).call(preChat, payload => ({
18187
18315
  type: 'message',
18188
18316
  payload
18189
18317
  }));
18318
+ state.context.locale = locale;
18190
18319
  state.agentParticipant = agentParticipant;
18191
18320
  state.userParticipant = userParticipant;
18192
18321
  state.startChatIcon = startChatIcon;
@@ -18586,6 +18715,7 @@ var splice_default = /*#__PURE__*/__webpack_require__.n(splice);
18586
18715
 
18587
18716
 
18588
18717
 
18718
+
18589
18719
  const translationsInitialState = {
18590
18720
  isActive: false,
18591
18721
  currentLocale: undefined,
@@ -18685,6 +18815,7 @@ const translationSlice = createSlice({
18685
18815
  },
18686
18816
  extraReducers: builder => {
18687
18817
  builder.addCase(resetApp.pending, () => translationsInitialState).addCase(initializeConfig.fulfilled, (state, _ref6) => {
18818
+ var _context3;
18688
18819
  let {
18689
18820
  payload
18690
18821
  } = _ref6;
@@ -18692,7 +18823,13 @@ const translationSlice = createSlice({
18692
18823
  const feature = (_a = payload === null || payload === void 0 ? void 0 : payload.features) === null || _a === void 0 ? void 0 : _a.translation;
18693
18824
  if (!feature) return;
18694
18825
  state.isAvailable = feature.enabled === true;
18695
- state.languages = feature.languages;
18826
+ state.languages = sort_default()(_context3 = [...feature.languages]).call(_context3, (a, b) => {
18827
+ if (a.locale === payload.locale) return -1;
18828
+ if (b.locale === payload.locale) return 1;
18829
+ return a.nativeName.localeCompare(b.nativeName, undefined, {
18830
+ sensitivity: 'base'
18831
+ });
18832
+ });
18696
18833
  }).addCase(setHistory, (state, _ref7) => {
18697
18834
  let {
18698
18835
  payload
@@ -22095,7 +22232,7 @@ const TimeIndicator = _ref => {
22095
22232
  /* harmony default export */ var time_indicator = (TimeIndicator);
22096
22233
  ;// CONCATENATED MODULE: ./node_modules/tabbable/dist/index.esm.js
22097
22234
  /*!
22098
- * tabbable 6.1.2
22235
+ * tabbable 6.2.0
22099
22236
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
22100
22237
  */
22101
22238
  // NOTE: separate `:not()` selectors has broader browser support than the newer
@@ -22275,7 +22412,27 @@ var getCandidatesIteratively = function getCandidatesIteratively(elements, inclu
22275
22412
  }
22276
22413
  return candidates;
22277
22414
  };
22278
- var getTabindex = function getTabindex(node, isScope) {
22415
+
22416
+ /**
22417
+ * @private
22418
+ * Determines if the node has an explicitly specified `tabindex` attribute.
22419
+ * @param {HTMLElement} node
22420
+ * @returns {boolean} True if so; false if not.
22421
+ */
22422
+ var hasTabIndex = function hasTabIndex(node) {
22423
+ return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
22424
+ };
22425
+
22426
+ /**
22427
+ * Determine the tab index of a given node.
22428
+ * @param {HTMLElement} node
22429
+ * @returns {number} Tab order (negative, 0, or positive number).
22430
+ * @throws {Error} If `node` is falsy.
22431
+ */
22432
+ var getTabIndex = function getTabIndex(node) {
22433
+ if (!node) {
22434
+ throw new Error('No node provided');
22435
+ }
22279
22436
  if (node.tabIndex < 0) {
22280
22437
  // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
22281
22438
  // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
@@ -22284,16 +22441,28 @@ var getTabindex = function getTabindex(node, isScope) {
22284
22441
  // order, consider their tab index to be 0.
22285
22442
  // Also browsers do not return `tabIndex` correctly for contentEditable nodes;
22286
22443
  // so if they don't have a tabindex attribute specifically set, assume it's 0.
22287
- //
22288
- // isScope is positive for custom element with shadow root or slot that by default
22289
- // have tabIndex -1, but need to be sorted by document order in order for their
22290
- // content to be inserted in the correct position
22291
- if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
22444
+ if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
22292
22445
  return 0;
22293
22446
  }
22294
22447
  }
22295
22448
  return node.tabIndex;
22296
22449
  };
22450
+
22451
+ /**
22452
+ * Determine the tab index of a given node __for sort order purposes__.
22453
+ * @param {HTMLElement} node
22454
+ * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
22455
+ * has tabIndex -1, but needs to be sorted by document order in order for its content to be
22456
+ * inserted into the correct sort position.
22457
+ * @returns {number} Tab order (negative, 0, or positive number).
22458
+ */
22459
+ var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
22460
+ var tabIndex = getTabIndex(node);
22461
+ if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
22462
+ return 0;
22463
+ }
22464
+ return tabIndex;
22465
+ };
22297
22466
  var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
22298
22467
  return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
22299
22468
  };
@@ -22536,7 +22705,7 @@ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(o
22536
22705
  return true;
22537
22706
  };
22538
22707
  var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
22539
- if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
22708
+ if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
22540
22709
  return false;
22541
22710
  }
22542
22711
  return true;
@@ -22561,7 +22730,7 @@ var sortByOrder = function sortByOrder(candidates) {
22561
22730
  candidates.forEach(function (item, i) {
22562
22731
  var isScope = !!item.scopeParent;
22563
22732
  var element = isScope ? item.scopeParent : item;
22564
- var candidateTabindex = getTabindex(element, isScope);
22733
+ var candidateTabindex = getSortOrderTabIndex(element, isScope);
22565
22734
  var elements = isScope ? sortByOrder(item.candidates) : element;
22566
22735
  if (candidateTabindex === 0) {
22567
22736
  isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
@@ -22580,32 +22749,32 @@ var sortByOrder = function sortByOrder(candidates) {
22580
22749
  return acc;
22581
22750
  }, []).concat(regularTabbables);
22582
22751
  };
22583
- var tabbable = function tabbable(el, options) {
22752
+ var tabbable = function tabbable(container, options) {
22584
22753
  options = options || {};
22585
22754
  var candidates;
22586
22755
  if (options.getShadowRoot) {
22587
- candidates = getCandidatesIteratively([el], options.includeContainer, {
22756
+ candidates = getCandidatesIteratively([container], options.includeContainer, {
22588
22757
  filter: isNodeMatchingSelectorTabbable.bind(null, options),
22589
22758
  flatten: false,
22590
22759
  getShadowRoot: options.getShadowRoot,
22591
22760
  shadowRootFilter: isValidShadowRootTabbable
22592
22761
  });
22593
22762
  } else {
22594
- candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
22763
+ candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
22595
22764
  }
22596
22765
  return sortByOrder(candidates);
22597
22766
  };
22598
- var focusable = function focusable(el, options) {
22767
+ var focusable = function focusable(container, options) {
22599
22768
  options = options || {};
22600
22769
  var candidates;
22601
22770
  if (options.getShadowRoot) {
22602
- candidates = getCandidatesIteratively([el], options.includeContainer, {
22771
+ candidates = getCandidatesIteratively([container], options.includeContainer, {
22603
22772
  filter: isNodeMatchingSelectorFocusable.bind(null, options),
22604
22773
  flatten: true,
22605
22774
  getShadowRoot: options.getShadowRoot
22606
22775
  });
22607
22776
  } else {
22608
- candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
22777
+ candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
22609
22778
  }
22610
22779
  return candidates;
22611
22780
  };
@@ -22636,7 +22805,7 @@ var isFocusable = function isFocusable(node, options) {
22636
22805
 
22637
22806
  ;// CONCATENATED MODULE: ./node_modules/focus-trap/dist/focus-trap.esm.js
22638
22807
  /*!
22639
- * focus-trap 7.4.3
22808
+ * focus-trap 7.5.2
22640
22809
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
22641
22810
  */
22642
22811
 
@@ -22722,10 +22891,10 @@ var isSelectableInput = function isSelectableInput(node) {
22722
22891
  return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
22723
22892
  };
22724
22893
  var isEscapeEvent = function isEscapeEvent(e) {
22725
- return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
22894
+ return (e === null || e === void 0 ? void 0 : e.key) === 'Escape' || (e === null || e === void 0 ? void 0 : e.key) === 'Esc' || (e === null || e === void 0 ? void 0 : e.keyCode) === 27;
22726
22895
  };
22727
22896
  var isTabEvent = function isTabEvent(e) {
22728
- return e.key === 'Tab' || e.keyCode === 9;
22897
+ return (e === null || e === void 0 ? void 0 : e.key) === 'Tab' || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;
22729
22898
  };
22730
22899
 
22731
22900
  // checks for TAB by default
@@ -22809,8 +22978,11 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
22809
22978
  // container: HTMLElement,
22810
22979
  // tabbableNodes: Array<HTMLElement>, // empty if none
22811
22980
  // focusableNodes: Array<HTMLElement>, // empty if none
22812
- // firstTabbableNode: HTMLElement|null,
22813
- // lastTabbableNode: HTMLElement|null,
22981
+ // posTabIndexesFound: boolean,
22982
+ // firstTabbableNode: HTMLElement|undefined,
22983
+ // lastTabbableNode: HTMLElement|undefined,
22984
+ // firstDomTabbableNode: HTMLElement|undefined,
22985
+ // lastDomTabbableNode: HTMLElement|undefined,
22814
22986
  // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
22815
22987
  // }>}
22816
22988
  containerGroups: [],
@@ -22827,7 +22999,9 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
22827
22999
  paused: false,
22828
23000
  // timer ID for when delayInitialFocus is true and initial focus in this trap
22829
23001
  // has been delayed during activation
22830
- delayInitialFocusTimer: undefined
23002
+ delayInitialFocusTimer: undefined,
23003
+ // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
23004
+ recentNavEvent: undefined
22831
23005
  };
22832
23006
  var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later
22833
23007
 
@@ -22846,7 +23020,9 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
22846
23020
  /**
22847
23021
  * Finds the index of the container that contains the element.
22848
23022
  * @param {HTMLElement} element
22849
- * @param {Event} [event]
23023
+ * @param {Event} [event] If available, and `element` isn't directly found in any container,
23024
+ * the event's composed path is used to see if includes any known trap containers in the
23025
+ * case where the element is inside a Shadow DOM.
22850
23026
  * @returns {number} Index of the container in either `state.containers` or
22851
23027
  * `state.containerGroups` (the order/length of these lists are the same); -1
22852
23028
  * if the element isn't found.
@@ -22941,14 +23117,41 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
22941
23117
  var tabbableNodes = tabbable(container, config.tabbableOptions);
22942
23118
 
22943
23119
  // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
22944
- // are a superset of tabbable nodes
23120
+ // are a superset of tabbable nodes since nodes with negative `tabindex` attributes
23121
+ // are focusable but not tabbable
22945
23122
  var focusableNodes = focusable(container, config.tabbableOptions);
23123
+ var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : undefined;
23124
+ var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : undefined;
23125
+ var firstDomTabbableNode = focusableNodes.find(function (node) {
23126
+ return isTabbable(node);
23127
+ });
23128
+ var lastDomTabbableNode = focusableNodes.slice().reverse().find(function (node) {
23129
+ return isTabbable(node);
23130
+ });
23131
+ var posTabIndexesFound = !!tabbableNodes.find(function (node) {
23132
+ return getTabIndex(node) > 0;
23133
+ });
22946
23134
  return {
22947
23135
  container: container,
22948
23136
  tabbableNodes: tabbableNodes,
22949
23137
  focusableNodes: focusableNodes,
22950
- firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,
22951
- lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,
23138
+ /** True if at least one node with positive `tabindex` was found in this container. */
23139
+ posTabIndexesFound: posTabIndexesFound,
23140
+ /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
23141
+ firstTabbableNode: firstTabbableNode,
23142
+ /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
23143
+ lastTabbableNode: lastTabbableNode,
23144
+ // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
23145
+ // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
23146
+ // because that API doesn't work with Shadow DOM as well as it should (@see
23147
+ // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
23148
+ // to address an edge case related to positive tabindex support, this seems like a much easier,
23149
+ // "close enough most of the time" alternative for positive tabindexes which should generally
23150
+ // be avoided anyway...
23151
+ /** First tabbable node in container, __DOM__ order; `undefined` if none. */
23152
+ firstDomTabbableNode: firstDomTabbableNode,
23153
+ /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
23154
+ lastDomTabbableNode: lastDomTabbableNode,
22952
23155
  /**
22953
23156
  * Finds the __tabbable__ node that follows the given node in the specified direction,
22954
23157
  * in this container, if any.
@@ -22959,30 +23162,24 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
22959
23162
  */
22960
23163
  nextTabbableNode: function nextTabbableNode(node) {
22961
23164
  var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
22962
- // NOTE: If tabindex is positive (in order to manipulate the tab order separate
22963
- // from the DOM order), this __will not work__ because the list of focusableNodes,
22964
- // while it contains tabbable nodes, does not sort its nodes in any order other
22965
- // than DOM order, because it can't: Where would you place focusable (but not
22966
- // tabbable) nodes in that order? They have no order, because they aren't tabbale...
22967
- // Support for positive tabindex is already broken and hard to manage (possibly
22968
- // not supportable, TBD), so this isn't going to make things worse than they
22969
- // already are, and at least makes things better for the majority of cases where
22970
- // tabindex is either 0/unset or negative.
22971
- // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375
22972
- var nodeIdx = focusableNodes.findIndex(function (n) {
22973
- return n === node;
22974
- });
23165
+ var nodeIdx = tabbableNodes.indexOf(node);
22975
23166
  if (nodeIdx < 0) {
22976
- return undefined;
22977
- }
22978
- if (forward) {
22979
- return focusableNodes.slice(nodeIdx + 1).find(function (n) {
22980
- return isTabbable(n, config.tabbableOptions);
23167
+ // either not tabbable nor focusable, or was focused but not tabbable (negative tabindex):
23168
+ // since `node` should at least have been focusable, we assume that's the case and mimic
23169
+ // what browsers do, which is set focus to the next node in __document position order__,
23170
+ // regardless of positive tabindexes, if any -- and for reasons explained in the NOTE
23171
+ // above related to `firstDomTabbable` and `lastDomTabbable` properties, we fall back to
23172
+ // basic DOM order
23173
+ if (forward) {
23174
+ return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function (el) {
23175
+ return isTabbable(el);
23176
+ });
23177
+ }
23178
+ return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function (el) {
23179
+ return isTabbable(el);
22981
23180
  });
22982
23181
  }
22983
- return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
22984
- return isTabbable(n, config.tabbableOptions);
22985
- });
23182
+ return tabbableNodes[nodeIdx + (forward ? 1 : -1)];
22986
23183
  }
22987
23184
  };
22988
23185
  });
@@ -22995,6 +23192,19 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
22995
23192
  ) {
22996
23193
  throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
22997
23194
  }
23195
+
23196
+ // NOTE: Positive tabindexes are only properly supported in single-container traps because
23197
+ // doing it across multiple containers where tabindexes could be all over the place
23198
+ // would require Tabbable to support multiple containers, would require additional
23199
+ // specialized Shadow DOM support, and would require Tabbable's multi-container support
23200
+ // to look at those containers in document position order rather than user-provided
23201
+ // order (as they are treated in Focus-trap, for legacy reasons). See discussion on
23202
+ // https://github.com/focus-trap/focus-trap/issues/375 for more details.
23203
+ if (state.containerGroups.find(function (g) {
23204
+ return g.posTabIndexesFound;
23205
+ }) && state.containerGroups.length > 1) {
23206
+ throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
23207
+ }
22998
23208
  };
22999
23209
  var tryFocus = function tryFocus(node) {
23000
23210
  if (node === false) {
@@ -23010,6 +23220,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
23010
23220
  node.focus({
23011
23221
  preventScroll: !!config.preventScroll
23012
23222
  });
23223
+ // NOTE: focus() API does not trigger focusIn event so set MRU node manually
23013
23224
  state.mostRecentlyFocusedNode = node;
23014
23225
  if (isSelectableInput(node)) {
23015
23226
  node.select();
@@ -23020,64 +23231,23 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
23020
23231
  return node ? node : node === false ? false : previousActiveElement;
23021
23232
  };
23022
23233
 
23023
- // This needs to be done on mousedown and touchstart instead of click
23024
- // so that it precedes the focus event.
23025
- var checkPointerDown = function checkPointerDown(e) {
23026
- var target = getActualTarget(e);
23027
- if (findContainerIndex(target, e) >= 0) {
23028
- // allow the click since it ocurred inside the trap
23029
- return;
23030
- }
23031
- if (valueOrHandler(config.clickOutsideDeactivates, e)) {
23032
- // immediately deactivate the trap
23033
- trap.deactivate({
23034
- // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
23035
- // which will result in the outside click setting focus to the node
23036
- // that was clicked (and if not focusable, to "nothing"); by setting
23037
- // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
23038
- // on activation (or the configured `setReturnFocus` node), whether the
23039
- // outside click was on a focusable node or not
23040
- returnFocus: config.returnFocusOnDeactivate
23041
- });
23042
- return;
23043
- }
23044
-
23045
- // This is needed for mobile devices.
23046
- // (If we'll only let `click` events through,
23047
- // then on mobile they will be blocked anyways if `touchstart` is blocked.)
23048
- if (valueOrHandler(config.allowOutsideClick, e)) {
23049
- // allow the click outside the trap to take place
23050
- return;
23051
- }
23052
-
23053
- // otherwise, prevent the click
23054
- e.preventDefault();
23055
- };
23056
-
23057
- // In case focus escapes the trap for some strange reason, pull it back in.
23058
- var checkFocusIn = function checkFocusIn(e) {
23059
- var target = getActualTarget(e);
23060
- var targetContained = findContainerIndex(target, e) >= 0;
23061
-
23062
- // In Firefox when you Tab out of an iframe the Document is briefly focused.
23063
- if (targetContained || target instanceof Document) {
23064
- if (targetContained) {
23065
- state.mostRecentlyFocusedNode = target;
23066
- }
23067
- } else {
23068
- // escaped! pull it back in to where it just left
23069
- e.stopImmediatePropagation();
23070
- tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
23071
- }
23072
- };
23073
-
23074
- // Hijack key nav events on the first and last focusable nodes of the trap,
23075
- // in order to prevent focus from escaping. If it escapes for even a
23076
- // moment it can end up scrolling the page and causing confusion so we
23077
- // kind of need to capture the action at the keydown phase.
23078
- var checkKeyNav = function checkKeyNav(event) {
23079
- var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
23080
- var target = getActualTarget(event);
23234
+ /**
23235
+ * Finds the next node (in either direction) where focus should move according to a
23236
+ * keyboard focus-in event.
23237
+ * @param {Object} params
23238
+ * @param {Node} [params.target] Known target __from which__ to navigate, if any.
23239
+ * @param {KeyboardEvent|FocusEvent} [params.event] Event to use if `target` isn't known (event
23240
+ * will be used to determine the `target`). Ignored if `target` is specified.
23241
+ * @param {boolean} [params.isBackward] True if focus should move backward.
23242
+ * @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be
23243
+ * determined given the current state of the trap.
23244
+ */
23245
+ var findNextNavNode = function findNextNavNode(_ref2) {
23246
+ var target = _ref2.target,
23247
+ event = _ref2.event,
23248
+ _ref2$isBackward = _ref2.isBackward,
23249
+ isBackward = _ref2$isBackward === void 0 ? false : _ref2$isBackward;
23250
+ target = target || getActualTarget(event);
23081
23251
  updateTabbableNodes();
23082
23252
  var destinationNode = null;
23083
23253
  if (state.tabbableGroups.length > 0) {
@@ -23100,8 +23270,8 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
23100
23270
  // REVERSE
23101
23271
 
23102
23272
  // is the target the first tabbable node in a group?
23103
- var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {
23104
- var firstTabbableNode = _ref2.firstTabbableNode;
23273
+ var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
23274
+ var firstTabbableNode = _ref3.firstTabbableNode;
23105
23275
  return target === firstTabbableNode;
23106
23276
  });
23107
23277
  if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
@@ -23119,7 +23289,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
23119
23289
  // the LAST group if it's the first tabbable node of the FIRST group)
23120
23290
  var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
23121
23291
  var destinationGroup = state.tabbableGroups[destinationGroupIndex];
23122
- destinationNode = destinationGroup.lastTabbableNode;
23292
+ destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;
23123
23293
  } else if (!isTabEvent(event)) {
23124
23294
  // user must have customized the nav keys so we have to move focus manually _within_
23125
23295
  // the active group: do this based on the order determined by tabbable()
@@ -23129,8 +23299,8 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
23129
23299
  // FORWARD
23130
23300
 
23131
23301
  // is the target the last tabbable node in a group?
23132
- var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
23133
- var lastTabbableNode = _ref3.lastTabbableNode;
23302
+ var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref4) {
23303
+ var lastTabbableNode = _ref4.lastTabbableNode;
23134
23304
  return target === lastTabbableNode;
23135
23305
  });
23136
23306
  if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
@@ -23148,7 +23318,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
23148
23318
  // group if it's the last tabbable node of the LAST group)
23149
23319
  var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
23150
23320
  var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
23151
- destinationNode = _destinationGroup.firstTabbableNode;
23321
+ destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;
23152
23322
  } else if (!isTabEvent(event)) {
23153
23323
  // user must have customized the nav keys so we have to move focus manually _within_
23154
23324
  // the active group: do this based on the order determined by tabbable()
@@ -23160,6 +23330,153 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
23160
23330
  // NOTE: the fallbackFocus option does not support returning false to opt-out
23161
23331
  destinationNode = getNodeForOption('fallbackFocus');
23162
23332
  }
23333
+ return destinationNode;
23334
+ };
23335
+
23336
+ // This needs to be done on mousedown and touchstart instead of click
23337
+ // so that it precedes the focus event.
23338
+ var checkPointerDown = function checkPointerDown(e) {
23339
+ var target = getActualTarget(e);
23340
+ if (findContainerIndex(target, e) >= 0) {
23341
+ // allow the click since it ocurred inside the trap
23342
+ return;
23343
+ }
23344
+ if (valueOrHandler(config.clickOutsideDeactivates, e)) {
23345
+ // immediately deactivate the trap
23346
+ trap.deactivate({
23347
+ // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
23348
+ // which will result in the outside click setting focus to the node
23349
+ // that was clicked (and if not focusable, to "nothing"); by setting
23350
+ // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
23351
+ // on activation (or the configured `setReturnFocus` node), whether the
23352
+ // outside click was on a focusable node or not
23353
+ returnFocus: config.returnFocusOnDeactivate
23354
+ });
23355
+ return;
23356
+ }
23357
+
23358
+ // This is needed for mobile devices.
23359
+ // (If we'll only let `click` events through,
23360
+ // then on mobile they will be blocked anyways if `touchstart` is blocked.)
23361
+ if (valueOrHandler(config.allowOutsideClick, e)) {
23362
+ // allow the click outside the trap to take place
23363
+ return;
23364
+ }
23365
+
23366
+ // otherwise, prevent the click
23367
+ e.preventDefault();
23368
+ };
23369
+
23370
+ // In case focus escapes the trap for some strange reason, pull it back in.
23371
+ // NOTE: the focusIn event is NOT cancelable, so if focus escapes, it may cause unexpected
23372
+ // scrolling if the node that got focused was out of view; there's nothing we can do to
23373
+ // prevent that from happening by the time we discover that focus escaped
23374
+ var checkFocusIn = function checkFocusIn(event) {
23375
+ var target = getActualTarget(event);
23376
+ var targetContained = findContainerIndex(target, event) >= 0;
23377
+
23378
+ // In Firefox when you Tab out of an iframe the Document is briefly focused.
23379
+ if (targetContained || target instanceof Document) {
23380
+ if (targetContained) {
23381
+ state.mostRecentlyFocusedNode = target;
23382
+ }
23383
+ } else {
23384
+ // escaped! pull it back in to where it just left
23385
+ event.stopImmediatePropagation();
23386
+
23387
+ // focus will escape if the MRU node had a positive tab index and user tried to nav forward;
23388
+ // it will also escape if the MRU node had a 0 tab index and user tried to nav backward
23389
+ // toward a node with a positive tab index
23390
+ var nextNode; // next node to focus, if we find one
23391
+ var navAcrossContainers = true;
23392
+ if (state.mostRecentlyFocusedNode) {
23393
+ if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {
23394
+ // MRU container index must be >=0 otherwise we wouldn't have it as an MRU node...
23395
+ var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);
23396
+ // there MAY not be any tabbable nodes in the container if there are at least 2 containers
23397
+ // and the MRU node is focusable but not tabbable (focus-trap requires at least 1 container
23398
+ // with at least one tabbable node in order to function, so this could be the other container
23399
+ // with nothing tabbable in it)
23400
+ var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;
23401
+ if (tabbableNodes.length > 0) {
23402
+ // MRU tab index MAY not be found if the MRU node is focusable but not tabbable
23403
+ var mruTabIdx = tabbableNodes.findIndex(function (node) {
23404
+ return node === state.mostRecentlyFocusedNode;
23405
+ });
23406
+ if (mruTabIdx >= 0) {
23407
+ if (config.isKeyForward(state.recentNavEvent)) {
23408
+ if (mruTabIdx + 1 < tabbableNodes.length) {
23409
+ nextNode = tabbableNodes[mruTabIdx + 1];
23410
+ navAcrossContainers = false;
23411
+ }
23412
+ // else, don't wrap within the container as focus should move to next/previous
23413
+ // container
23414
+ } else {
23415
+ if (mruTabIdx - 1 >= 0) {
23416
+ nextNode = tabbableNodes[mruTabIdx - 1];
23417
+ navAcrossContainers = false;
23418
+ }
23419
+ // else, don't wrap within the container as focus should move to next/previous
23420
+ // container
23421
+ }
23422
+ // else, don't find in container order without considering direction too
23423
+ }
23424
+ }
23425
+ // else, no tabbable nodes in that container (which means we must have at least one other
23426
+ // container with at least one tabbable node in it, otherwise focus-trap would've thrown
23427
+ // an error the last time updateTabbableNodes() was run): find next node among all known
23428
+ // containers
23429
+ } else {
23430
+ // check to see if there's at least one tabbable node with a positive tab index inside
23431
+ // the trap because focus seems to escape when navigating backward from a tabbable node
23432
+ // with tabindex=0 when this is the case (instead of wrapping to the tabbable node with
23433
+ // the greatest positive tab index like it should)
23434
+ if (!state.containerGroups.some(function (g) {
23435
+ return g.tabbableNodes.some(function (n) {
23436
+ return getTabIndex(n) > 0;
23437
+ });
23438
+ })) {
23439
+ // no containers with tabbable nodes with positive tab indexes which means the focus
23440
+ // escaped for some other reason and we should just execute the fallback to the
23441
+ // MRU node or initial focus node, if any
23442
+ navAcrossContainers = false;
23443
+ }
23444
+ }
23445
+ } else {
23446
+ // no MRU node means we're likely in some initial condition when the trap has just
23447
+ // been activated and initial focus hasn't been given yet, in which case we should
23448
+ // fall through to trying to focus the initial focus node, which is what should
23449
+ // happen below at this point in the logic
23450
+ navAcrossContainers = false;
23451
+ }
23452
+ if (navAcrossContainers) {
23453
+ nextNode = findNextNavNode({
23454
+ // move FROM the MRU node, not event-related node (which will be the node that is
23455
+ // outside the trap causing the focus escape we're trying to fix)
23456
+ target: state.mostRecentlyFocusedNode,
23457
+ isBackward: config.isKeyBackward(state.recentNavEvent)
23458
+ });
23459
+ }
23460
+ if (nextNode) {
23461
+ tryFocus(nextNode);
23462
+ } else {
23463
+ tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
23464
+ }
23465
+ }
23466
+ state.recentNavEvent = undefined; // clear
23467
+ };
23468
+
23469
+ // Hijack key nav events on the first and last focusable nodes of the trap,
23470
+ // in order to prevent focus from escaping. If it escapes for even a
23471
+ // moment it can end up scrolling the page and causing confusion so we
23472
+ // kind of need to capture the action at the keydown phase.
23473
+ var checkKeyNav = function checkKeyNav(event) {
23474
+ var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
23475
+ state.recentNavEvent = event;
23476
+ var destinationNode = findNextNavNode({
23477
+ event: event,
23478
+ isBackward: isBackward
23479
+ });
23163
23480
  if (destinationNode) {
23164
23481
  if (isTabEvent(event)) {
23165
23482
  // since tab natively moves focus, we wouldn't have a destination node unless we
@@ -24073,7 +24390,7 @@ const SeamlyActivityMonitor = ({ children }) => {
24073
24390
  // It is important to use keyUp here as focus may be set from outside the
24074
24391
  // chat container via keyboard. In this case the keyDown handler would not
24075
24392
  // be fired inside the container on the initial focus event.
24076
- return (o("div", Object.assign({ className: css_className('activity-monitor'), tabIndex: -1, onMouseDown: onActivityHandler, onKeyUp: onActivityHandler, onTouchStart: onActivityHandler, onMouseMove: onActivityHandler, onWheel: onActivityHandler, onPointerDown: onActivityHandler, onPointerMove: onActivityHandler }, { children: o(seamly_activity_event_context.Provider, Object.assign({ value: onActivityHandler }, { children: children })) })));
24393
+ return (o("div", { className: css_className('activity-monitor'), tabIndex: -1, onMouseDown: onActivityHandler, onKeyUp: onActivityHandler, onTouchStart: onActivityHandler, onMouseMove: onActivityHandler, onWheel: onActivityHandler, onPointerDown: onActivityHandler, onPointerMove: onActivityHandler, children: o(seamly_activity_event_context.Provider, { value: onActivityHandler, children: children }) }));
24077
24394
  };
24078
24395
  /* harmony default export */ var seamly_activity_monitor = (SeamlyActivityMonitor);
24079
24396
 
@@ -24487,7 +24804,7 @@ const SeamlyFileUpload = ({ children }) => {
24487
24804
  uploadHandle,
24488
24805
  }));
24489
24806
  }, [addImageToSessionStorage, addUploadBubble, api, dispatch, t]);
24490
- return (o(seamly_file_upload_context.Provider, Object.assign({ value: onUploadFileHandler }, { children: children })));
24807
+ return (o(seamly_file_upload_context.Provider, { value: onUploadFileHandler, children: children }));
24491
24808
  };
24492
24809
  /* harmony default export */ var seamly_file_upload = (SeamlyFileUpload);
24493
24810
 
@@ -24901,7 +25218,7 @@ const SeamlyCore = ({ store, children, eventBus, api }) => {
24901
25218
  (0,hooks_module/* useErrorBoundary */.cO)((error) => {
24902
25219
  store.dispatch(catchError(error));
24903
25220
  });
24904
- return (o(components_Provider, Object.assign({ store: store }, { children: o(SeamlyEventBusContext.Provider, Object.assign({ value: eventBus }, { children: o(SeamlyApiContext.Provider, Object.assign({ value: api }, { children: o(seamly_live_region, { children: o(seamly_chat, { children: o(component_filter, { children: [o(seamly_initializer, {}), o(seamly_event_subscriber, {}), o(seamly_read_state, {}), o(seamly_new_notifications, {}), o(seamly_idle_detach_counter, {}), o(seamly_activity_monitor, { children: [o(seamly_instance_functions_loader, {}), o(seamly_file_upload, { children: children })] })] }) }) }) })) })) })));
25221
+ return (o(components_Provider, { store: store, children: o(SeamlyEventBusContext.Provider, { value: eventBus, children: o(SeamlyApiContext.Provider, { value: api, children: o(seamly_live_region, { children: o(seamly_chat, { children: o(component_filter, { children: [o(seamly_initializer, {}), o(seamly_event_subscriber, {}), o(seamly_read_state, {}), o(seamly_new_notifications, {}), o(seamly_idle_detach_counter, {}), o(seamly_activity_monitor, { children: [o(seamly_instance_functions_loader, {}), o(seamly_file_upload, { children: children })] })] }) }) }) }) }) }));
24905
25222
  };
24906
25223
  /* harmony default export */ var seamly_core = (SeamlyCore);
24907
25224
 
@@ -24969,12 +25286,12 @@ const getState = _ref => {
24969
25286
  } = _ref;
24970
25287
  return forms;
24971
25288
  };
24972
- const getFormById = es_createSelector(getState, (_, _ref2) => {
25289
+ const getFormById = es_createSelector([getState, (_, _ref2) => {
24973
25290
  let {
24974
25291
  formId
24975
25292
  } = _ref2;
24976
25293
  return formId;
24977
- }, (forms, formId) => forms[formId]);
25294
+ }], (forms, formId) => forms[formId]);
24978
25295
  const getFormControlsByFormId = es_createSelector(getFormById, form => (form === null || form === void 0 ? void 0 : form.controls) || {});
24979
25296
  const getFormValuesByFormId = es_createSelector(getFormControlsByFormId, controls => {
24980
25297
  var _context;
@@ -24987,21 +25304,21 @@ const getFormValuesByFormId = es_createSelector(getFormControlsByFormId, control
24987
25304
  });
24988
25305
  return valuesObj;
24989
25306
  });
24990
- const getControlValueByName = es_createSelector(getFormControlsByFormId, (_, _ref4) => {
25307
+ const getControlValueByName = es_createSelector([getFormControlsByFormId, (_, _ref4) => {
24991
25308
  let {
24992
25309
  name
24993
25310
  } = _ref4;
24994
25311
  return name;
24995
- }, (controls, name) => {
25312
+ }], (controls, name) => {
24996
25313
  var _a;
24997
25314
  return (_a = controls[name]) === null || _a === void 0 ? void 0 : _a.value;
24998
25315
  });
24999
- const getControlTouchedByName = es_createSelector(getFormControlsByFormId, (_, _ref5) => {
25316
+ const getControlTouchedByName = es_createSelector([getFormControlsByFormId, (_, _ref5) => {
25000
25317
  let {
25001
25318
  name
25002
25319
  } = _ref5;
25003
25320
  return name;
25004
- }, (controls, name) => {
25321
+ }], (controls, name) => {
25005
25322
  var _a;
25006
25323
  return (_a = controls[name]) === null || _a === void 0 ? void 0 : _a.touched;
25007
25324
  });
@@ -25203,7 +25520,7 @@ const useEntryTextTranslation = controlName => {
25203
25520
  text: (text === null || text === void 0 ? void 0 : text.label) || t('input.inputLabelText'),
25204
25521
  limit: !(text === null || text === void 0 ? void 0 : text.label) && hasCharacterLimit ? characterLimit : null
25205
25522
  }), [t, hasCharacterLimit, characterLimit, text === null || text === void 0 ? void 0 : text.label]);
25206
- const labelClass = (0,hooks_module/* useMemo */.Ye)(() => (text === null || text === void 0 ? void 0 : text.label) ? 'input__label' : 'visually-hidden', [text === null || text === void 0 ? void 0 : text.label]);
25523
+ const labelClass = (0,hooks_module/* useMemo */.Ye)(() => (text === null || text === void 0 ? void 0 : text.label) ? 'label' : 'visually-hidden', [text === null || text === void 0 ? void 0 : text.label]);
25207
25524
  return {
25208
25525
  placeholder,
25209
25526
  label,
@@ -25248,14 +25565,14 @@ function AbortTransactionButton() {
25248
25565
  });
25249
25566
  clearEntryAbortTransaction();
25250
25567
  };
25251
- return (o("li", Object.assign({ className: css_className([
25568
+ return (o("li", { className: css_className([
25252
25569
  'cvco-conversation__item',
25253
25570
  'cvco-conversation__item--abort-transaction',
25254
- ]) }, { children: o("button", Object.assign({ className: css_className([
25571
+ ]), children: o("button", { className: css_className([
25255
25572
  'button',
25256
25573
  'button--secondary',
25257
25574
  'abort-transaction__button',
25258
- ]), type: "button", onClick: handleAbortTransaction }, { children: abortTransaction.label })) })));
25575
+ ]), type: "button", onClick: handleAbortTransaction, children: abortTransaction.label }) }));
25259
25576
  }
25260
25577
 
25261
25578
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/chat-scroll/chat-scroll-context.ts
@@ -25328,7 +25645,7 @@ const Event = ({ event, newParticipant }) => {
25328
25645
  if (newParticipant) {
25329
25646
  classNames.push('conversation__item--new-participant');
25330
25647
  }
25331
- return (o("li", Object.assign({ className: css_className(classNames), ref: containerRef }, { children: [event.timeIndicator && o(time_indicator, { event: event }), o(Component, Object.assign({ event: event }, { children: o(SubComponent, { event: event }) }))] })));
25648
+ return (o("li", { className: css_className(classNames), ref: containerRef, children: [event.timeIndicator && o(time_indicator, { event: event }), o(Component, { event: event, children: o(SubComponent, { event: event }) })] }));
25332
25649
  };
25333
25650
  /* harmony default export */ var event_event = (Event);
25334
25651
 
@@ -25413,7 +25730,7 @@ const Conversation = () => {
25413
25730
  e.preventDefault();
25414
25731
  focusSkiplinkTarget();
25415
25732
  };
25416
- return (o(preact_module/* Fragment */.HY, { children: [isOpen && (o("a", Object.assign({ className: css_className('skip-link'), href: `#${skiplinkTargetId}`, onClick: onClickHandler }, { children: t('skiplinkText') }))), o("div", Object.assign({ className: css_className('chat__body') }, { children: o("div", Object.assign({ className: css_className('conversation__container') }, { children: [o(privacy_disclaimer, {}), o("ol", Object.assign({ className: css_className('conversation') }, { children: [o(component_filter, { children: o(Events, {}) }), debouncedIsLoading ? o(loader, {}) : null, o(AbortTransactionButton, {})] }))] })) }))] }));
25733
+ return (o(preact_module/* Fragment */.HY, { children: [isOpen && (o("a", { className: css_className('skip-link'), href: `#${skiplinkTargetId}`, onClick: onClickHandler, children: t('skiplinkText') })), o("div", { className: css_className('chat__body'), children: o("div", { className: css_className('conversation__container'), children: [o(privacy_disclaimer, {}), o("ol", { className: css_className('conversation'), children: [o(component_filter, { children: o(Events, {}) }), debouncedIsLoading ? o(loader, {}) : null, o(AbortTransactionButton, {})] })] }) })] }));
25417
25734
  };
25418
25735
  /* harmony default export */ var conversation = (Conversation);
25419
25736
 
@@ -25819,16 +26136,16 @@ const OptionsFrame = ({ className: givenClassName, children, onCancel, headingTe
25819
26136
  (0,hooks_module/* useEffect */.d4)(() => {
25820
26137
  focusElement(container.current);
25821
26138
  }, [container]);
25822
- return (o("section", Object.assign({ className: css_className('options', {
26139
+ return (o("section", { className: css_className('options', {
25823
26140
  'options--right': position.horizontal === 'right',
25824
26141
  'options--left': position.horizontal === 'left',
25825
26142
  'options--top': position.vertical === 'top',
25826
26143
  'options--bottom': position.vertical === 'bottom',
25827
- }, givenClassName), "aria-labelledby": mainHeadingId, tabIndex: -1, ref: container }, { children: o("div", Object.assign({ className: css_className('options__body') }, { children: [o("h2", Object.assign({ id: mainHeadingId, className: css_className('options__title') }, { children: headingText })), o("button", Object.assign({ type: "button", onClick: onCancelHandler, "aria-describedby": mainHeadingId, className: css_className('button', 'options__close'), ref: (btn) => {
26144
+ }, givenClassName), "aria-labelledby": mainHeadingId, tabIndex: -1, ref: container, children: o("div", { className: css_className('options__body'), children: [o("h2", { id: mainHeadingId, className: css_className('options__title'), children: headingText }), o("button", { type: "button", onClick: onCancelHandler, "aria-describedby": mainHeadingId, className: css_className('button', 'options__close'), ref: (btn) => {
25828
26145
  if (cancelButtonRef) {
25829
26146
  cancelButtonRef.current = btn;
25830
26147
  }
25831
- } }, { children: [o(layout_icon, { name: "close", size: "16", alt: "" }), o("span", { children: cancelButtonText })] })), description ? (o("p", Object.assign({ className: css_className('options__description'), id: descriptionId }, { children: description }))) : null, o("div", Object.assign({ className: css_className('options__wrapper') }, { children: children }))] })) })));
26148
+ }, children: [o(layout_icon, { name: "close", size: "16", alt: "" }), o("span", { children: cancelButtonText })] }), description ? (o("p", { className: css_className('options__description'), id: descriptionId, children: description })) : null, o("div", { className: css_className('options__wrapper'), children: children })] }) }));
25832
26149
  };
25833
26150
  /* harmony default export */ var options_frame = (OptionsFrame);
25834
26151
 
@@ -25969,7 +26286,7 @@ function FormProvider(_a) {
25969
26286
  console.error('"onSubmit" is required.');
25970
26287
  return null;
25971
26288
  }
25972
- return (o(context_Provider, Object.assign({}, props, { value: contextValue }, { children: children })));
26289
+ return (o(context_Provider, Object.assign({}, props, { value: contextValue, children: children })));
25973
26290
  }
25974
26291
 
25975
26292
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/form-controls/form.js
@@ -26038,8 +26355,8 @@ function error_Error(_ref) {
26038
26355
 
26039
26356
 
26040
26357
 
26041
- const FormControlWrapper = ({ contentHint, id, labelText, labelClass = css_className('label'), validity, errorText, children, }) => {
26042
- return (o(preact_module/* Fragment */.HY, { children: [contentHint && (o("span", Object.assign({ id: `${id}-content-hint`, className: css_className('input__content-hint') }, { children: contentHint }))), o(error_Error, { id: `${id}-error`, error: !validity && errorText }), o("div", Object.assign({ className: css_className('form-control__wrapper') }, { children: [o("label", Object.assign({ htmlFor: id, className: labelClass }, { children: labelText })), children] }))] }));
26358
+ const FormControlWrapper = ({ contentHint, id, labelText, labelClass, validity, errorText, children, }) => {
26359
+ return (o(preact_module/* Fragment */.HY, { children: [contentHint && (o("span", { id: `${id}-content-hint`, className: css_className('input__content-hint'), children: contentHint })), o(error_Error, { id: `${id}-error`, error: !validity && errorText }), o("div", { className: css_className('form-control__wrapper'), children: [o("label", { htmlFor: id, className: css_className(labelClass), children: labelText }), children] })] }));
26043
26360
  };
26044
26361
  /* harmony default export */ var wrapper = (FormControlWrapper);
26045
26362
 
@@ -26074,7 +26391,7 @@ function Input(_a) {
26074
26391
  describedByIds.push(`${id}-error`);
26075
26392
  }
26076
26393
  // todo: destructure Field
26077
- return (o(wrapper, Object.assign({ id: id, contentHint: contentHint, validity: !hasError, errorText: error, labelText: labelText, labelClass: labelClass }, { children: o("input", Object.assign({ id: id, name: name, type: type, "aria-invalid": hasError ? 'true' : 'false', "aria-describedby": describedByIds.join(' ') || null }, field, props)) })));
26394
+ return (o(wrapper, { id: id, contentHint: contentHint, validity: !hasError, errorText: error, labelText: labelText, labelClass: labelClass, children: o("input", Object.assign({ id: id, name: name, type: type, "aria-invalid": hasError ? 'true' : 'false', "aria-describedby": describedByIds.join(' ') || null }, field, props)) }));
26078
26395
  }
26079
26396
  /* harmony default export */ var input = (Input);
26080
26397
 
@@ -26433,14 +26750,14 @@ const OptionsButton = () => {
26433
26750
 
26434
26751
 
26435
26752
 
26436
- const TranslationOption = ({ label, checked, description, onChange, id, }) => {
26753
+ const TranslationOption = ({ label, checked, description, onChange, id, itemClassName, }) => {
26437
26754
  const onKeyDown = (e) => {
26438
26755
  if (e.code === 'Space' || e.code === 'Enter') {
26439
26756
  e.preventDefault();
26440
26757
  onChange();
26441
26758
  }
26442
26759
  };
26443
- return (o("li", Object.assign({ className: css_className('translation-options__item'), "aria-selected": checked, role: "option", tabIndex: 0, onClick: onChange, onKeyDown: onKeyDown, id: id }, { children: [o(layout_icon, { alt: "", name: "check", size: "16" }), label, " ", description && o("span", { children: ["(", description, ")"] })] })));
26760
+ return (o("li", { className: css_className([itemClassName, 'translation-options__item']), "aria-selected": checked, role: "option", tabIndex: 0, onClick: onChange, onKeyDown: onKeyDown, id: id, children: [o(layout_icon, { alt: "", name: "check", size: "16" }), label, " ", description && o("span", { children: ["(", description, ")"] })] }));
26444
26761
  };
26445
26762
  /* harmony default export */ var translation_option = (TranslationOption);
26446
26763
 
@@ -26452,12 +26769,13 @@ const TranslationOption = ({ label, checked, description, onChange, id, }) => {
26452
26769
 
26453
26770
 
26454
26771
 
26772
+ const isChecked = (language, currentLocale, isOriginal) => currentLocale === language.locale || (!currentLocale && isOriginal);
26455
26773
  const TranslationOptions = ({ onChange, describedById, }) => {
26456
26774
  const { context: { locale: defaultLocale }, } = useConfig();
26457
26775
  const { t } = useI18n();
26458
26776
  const { focusContainer } = useTranslationsContainer();
26459
26777
  const { languages, currentLocale, enableTranslations, disableTranslations } = useTranslations();
26460
- const handleChange = ({ locale }) => () => {
26778
+ const handleChange = (locale) => () => {
26461
26779
  if (locale === currentLocale || defaultLocale === locale) {
26462
26780
  disableTranslations();
26463
26781
  }
@@ -26467,22 +26785,25 @@ const TranslationOptions = ({ onChange, describedById, }) => {
26467
26785
  onChange();
26468
26786
  focusContainer();
26469
26787
  };
26470
- const sortedLanguages = (0,hooks_module/* useMemo */.Ye)(() => {
26471
- return [...languages].sort((a, b) => {
26472
- if (a.locale === defaultLocale)
26473
- return -1;
26474
- if (b.locale === defaultLocale)
26475
- return 1;
26476
- return a.nativeName.localeCompare(b.nativeName, undefined, {
26477
- sensitivity: 'base',
26478
- });
26479
- });
26480
- }, [languages, defaultLocale]);
26481
- return (o("ul", Object.assign({ "aria-describedby": describedById, role: "listbox", tabIndex: -1, className: css_className('translation-options') }, { children: sortedLanguages.map((language, idx) => {
26482
- const isOriginal = idx === 0;
26483
- const checked = currentLocale === language.locale || (!currentLocale && isOriginal);
26484
- return (o(translation_option, { id: language.locale, label: language.nativeName, checked: checked, description: isOriginal && t('translations.settings.original'), onChange: handleChange(language) }, language.locale));
26485
- }) })));
26788
+ const { primaryLanguages, remainingLanguages } = (0,compat_module.useMemo)(() => languages.reduce((acc, language) => {
26789
+ const isOriginal = language.locale === defaultLocale;
26790
+ const checked = isChecked(language, currentLocale, isOriginal);
26791
+ if (language.locale !== defaultLocale) {
26792
+ acc.remainingLanguages.push(Object.assign(Object.assign({}, language), { checked, isOriginal }));
26793
+ }
26794
+ const selectedIdx = acc.remainingLanguages.findIndex((l) => l.locale === currentLocale);
26795
+ if (isOriginal || (checked && selectedIdx > 4)) {
26796
+ acc.primaryLanguages.push(Object.assign(Object.assign({}, language), { checked, isOriginal }));
26797
+ }
26798
+ return acc;
26799
+ }, {
26800
+ primaryLanguages: [],
26801
+ remainingLanguages: [],
26802
+ }), [currentLocale, defaultLocale, languages]);
26803
+ return (o("ul", { "aria-describedby": describedById, role: "listbox", tabIndex: -1, className: css_className('translation-options'), children: [primaryLanguages.map(({ locale, nativeName, checked, isOriginal }, idx) => (o(translation_option, { id: locale, label: nativeName, checked: checked, description: isOriginal && t('translations.settings.original'), onChange: handleChange(locale), itemClassName: css_className({
26804
+ 'translation-options__item--original': isOriginal,
26805
+ 'translation-options__item--selected': checked && idx !== 0,
26806
+ }) }, locale))), remainingLanguages.map(({ locale, nativeName, checked, isOriginal }) => (o(translation_option, { id: locale, label: nativeName, checked: checked, description: isOriginal && t('translations.settings.original'), onChange: handleChange(locale) }, locale)))] }));
26486
26807
  };
26487
26808
  /* harmony default export */ var translation_options = (TranslationOptions);
26488
26809
 
@@ -26495,7 +26816,7 @@ const TranslationOptions = ({ onChange, describedById, }) => {
26495
26816
  function TranslationsOptionsDialog({ onClose, position, }) {
26496
26817
  const { t } = useI18n();
26497
26818
  const descriptionId = useGeneratedId();
26498
- return (o(options_frame, Object.assign({ onCancel: onClose, headingText: t('translations.menu.title'), cancelButtonText: t('translations.settings.cancelButtonText'), description: t('translations.menu.description'), descriptionId: descriptionId, position: position, disableButtonFocusing: true }, { children: o(translation_options, { describedById: descriptionId, onChange: onClose }) })));
26819
+ return (o(options_frame, { onCancel: onClose, headingText: t('translations.menu.title'), cancelButtonText: t('translations.settings.cancelButtonText'), description: t('translations.menu.description'), descriptionId: descriptionId, position: position, disableButtonFocusing: true, children: o(translation_options, { describedById: descriptionId, onChange: onClose }) }));
26499
26820
  }
26500
26821
  /* harmony default export */ var options_dialog = (TranslationsOptionsDialog);
26501
26822
 
@@ -26535,11 +26856,11 @@ function TranslationsOptionsButton({ children, position = {
26535
26856
  e.preventDefault();
26536
26857
  }
26537
26858
  };
26538
- return (o("div", Object.assign({ className: css_className('translations__container'), onKeyDown: onMainKeyDownHandler }, { children: [o(in_out_transition, Object.assign({ transitionStartState: transitionStartStates.notRendered, isActive: menuIsOpen }, { children: o("div", Object.assign({ className: css_className('options__dialog'), role: "dialog" }, { children: o(options_dialog, { onClose: handleDialogClose, position: position }) })) })), o("button", Object.assign({ type: "button", className: css_className([
26859
+ return (o("div", { className: css_className('translations__container'), onKeyDown: onMainKeyDownHandler, children: [o(in_out_transition, { transitionStartState: transitionStartStates.notRendered, isActive: menuIsOpen, children: o("div", { className: css_className('options__dialog'), role: "dialog", children: o(options_dialog, { onClose: handleDialogClose, position: position }) }) }), o("button", { type: "button", className: css_className([
26539
26860
  'button',
26540
26861
  'chat__options__button',
26541
26862
  ...classNames,
26542
- ]), id: toggleButtonId, onClick: handleToggleClick, onKeyDown: handleToggleKeyDown, ref: toggleButton, "aria-haspopup": "dialog", "aria-expanded": menuIsOpen }, { children: children }))] })));
26863
+ ]), id: toggleButtonId, onClick: handleToggleClick, onKeyDown: handleToggleKeyDown, ref: toggleButton, "aria-haspopup": "dialog", "aria-expanded": menuIsOpen, children: children })] }));
26543
26864
  }
26544
26865
 
26545
26866
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/app-options/index.js
@@ -26609,7 +26930,7 @@ const UnreadMessagesButton = () => {
26609
26930
  const { scrollToRef, unreadIds } = (0,hooks_module/* useContext */.qp)(chat_scroll_context);
26610
26931
  const { isMinimized } = useVisibility();
26611
26932
  const { t } = useI18n();
26612
- return (o(in_out_transition, Object.assign({ isActive: !!unreadIds.length && !isMinimized }, { children: o("div", Object.assign({ className: css_className('unread-messages') }, { children: o("button", Object.assign({ type: "button", className: css_className('button', 'button--primary'), onClick: scrollToRef }, { children: [t('message.unreadMessagesCount', { unreadCount: unreadIds.length }), o(layout_icon, { name: "chevronDown", size: "32", alt: "" })] })) })) })));
26933
+ return (o(in_out_transition, { isActive: !!unreadIds.length && !isMinimized, children: o("div", { className: css_className('unread-messages'), children: o("button", { type: "button", className: css_className('button', 'button--primary'), onClick: scrollToRef, children: [t('message.unreadMessagesCount', { unreadCount: unreadIds.length }), o(layout_icon, { name: "chevronDown", size: "32", alt: "" })] }) }) }));
26613
26934
  };
26614
26935
  /* harmony default export */ var unread_messages_button = (UnreadMessagesButton);
26615
26936
 
@@ -26764,13 +27085,13 @@ const ChatScrollProvider = ({ children }) => {
26764
27085
  return acc;
26765
27086
  }, {}), [events]);
26766
27087
  const { scrollToRef, scrollToBottom, containerRef, unreadIds } = use_chat_scroll(eventRefs);
26767
- return (o(chat_scroll_context.Provider, Object.assign({ value: {
27088
+ return (o(chat_scroll_context.Provider, { value: {
26768
27089
  eventRefs,
26769
27090
  unreadIds,
26770
27091
  scrollToRef,
26771
27092
  scrollToBottom,
26772
27093
  containerRef,
26773
- } }, { children: o("div", Object.assign({ className: css_className('chat__container') }, { children: [o("div", Object.assign({ className: css_className('chat__container__scroll-area'), ref: containerRef }, { children: children })), o(unread_messages_button, {})] })) })));
27094
+ }, children: o("div", { className: css_className('chat__container'), children: [o("div", { className: css_className('chat__container__scroll-area'), ref: containerRef, children: children }), o(unread_messages_button, {})] }) }));
26774
27095
  };
26775
27096
  /* harmony default export */ var chat_scroll_provider = (ChatScrollProvider);
26776
27097
 
@@ -27064,13 +27385,13 @@ function TextEntryForm({ controlName, skipLinkId }) {
27064
27385
  // When a message is submitted, the keyboard should be prevented from closing on mobile devices
27065
27386
  event.preventDefault();
27066
27387
  };
27067
- return (o(form_controls_form, Object.assign({ className: css_className('entry-form'), disableValidationClasses: true, noValidate: "true" }, { children: [o("div", Object.assign({ className: css_className([
27388
+ return (o(form_controls_form, { className: css_className('entry-form'), disableValidationClasses: true, noValidate: "true", children: [o("div", { className: css_className([
27068
27389
  'input--text__container',
27069
27390
  ...(reachedCharacterWarning && !reachedCharacterLimit
27070
27391
  ? ['character-warning']
27071
27392
  : []),
27072
27393
  ...(reachedCharacterLimit ? ['character-exceeded'] : []),
27073
- ]) }, { children: [o(input, { id: skipLinkId, type: "text", name: controlName, className: css_className('input__text'), autocomplete: "off", placeholder: placeholder, labelText: label, labelClass: css_className(labelClass), "aria-invalid": hasCharacterLimit ? reachedCharacterLimit : null, onKeyUp: handleKeyUp, onFocus: handleFocus }), o("div", Object.assign({ className: css_className('character-count') }, { children: reachedCharacterWarning && o("span", { children: remainingChars }) }))] })), o("button", Object.assign({ className: css_className('button', 'input__submit'), type: "submit", onPointerDown: handlePointerDown, "aria-disabled": !hasValue || reachedCharacterLimit ? 'true' : null }, { children: o(layout_icon, { name: "send", size: "32", alt: t('input.sendMessage') }) }))] })));
27394
+ ]), children: [o(input, { id: skipLinkId, type: "text", name: controlName, className: css_className('input__text'), autocomplete: "off", placeholder: placeholder, labelText: label, labelClass: css_className(labelClass), "aria-invalid": hasCharacterLimit ? reachedCharacterLimit : null, onKeyUp: handleKeyUp, onFocus: handleFocus }), o("div", { className: css_className('character-count'), children: reachedCharacterWarning && o("span", { children: remainingChars }) })] }), o("button", { className: css_className('button', 'input__submit'), type: "submit", onPointerDown: handlePointerDown, "aria-disabled": !hasValue || reachedCharacterLimit ? 'true' : null, children: o(layout_icon, { name: "send", size: "32", alt: t('input.sendMessage') }) })] }));
27074
27395
  }
27075
27396
 
27076
27397
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/entry/text-entry/index.js
@@ -27738,7 +28059,7 @@ const CollapseButton = () => {
27738
28059
 
27739
28060
  const ChatStatus = ({ children, handleClose, title, closeButtonText, srCloseButtonText, id, }) => {
27740
28061
  const headingId = useGeneratedId();
27741
- return (o("section", Object.assign({ tabIndex: -1, id: id, "aria-labelledby": title ? headingId : undefined, className: css_className('chat-status', !title && 'chat-status--condensed') }, { children: [o("div", Object.assign({ className: css_className('chat-status__body') }, { children: [title ? (o("h2", Object.assign({ className: css_className('chat-status__title'), id: headingId }, { children: title }))) : null, children] })), typeof handleClose === 'function' && (o("button", Object.assign({ type: "button", onClick: handleClose, className: css_className('button', 'button--tertiary', 'chat-status__close') }, { children: [closeButtonText || o(layout_icon, { name: "close", size: "16", alt: "" }), srCloseButtonText && (o("span", Object.assign({ className: css_className('visually-hidden') }, { children: srCloseButtonText })))] })))] })));
28062
+ return (o("section", { tabIndex: -1, id: id, "aria-labelledby": title ? headingId : undefined, className: css_className('chat-status', !title && 'chat-status--condensed'), children: [o("div", { className: css_className('chat-status__body'), children: [title ? (o("h2", { className: css_className('chat-status__title'), id: headingId, children: title })) : null, children] }), typeof handleClose === 'function' && (o("button", { type: "button", onClick: handleClose, className: css_className('button', 'button--tertiary', 'chat-status__close'), children: [closeButtonText || o(layout_icon, { name: "close", size: "16", alt: "" }), srCloseButtonText && (o("span", { className: css_className('visually-hidden'), children: srCloseButtonText }))] }))] }));
27742
28063
  };
27743
28064
  /* harmony default export */ var chat_status = (ChatStatus);
27744
28065
 
@@ -27773,7 +28094,7 @@ function TranslationChatStatus() {
27773
28094
 
27774
28095
 
27775
28096
 
27776
- const ChatStatusAction = ({ handleClick, icon, title, srButtonText, }) => (o("button", Object.assign({ type: "button", onClick: handleClick, className: css_className('button', 'button--primary', 'chat-status__button') }, { children: [o(layout_icon, { name: icon, size: "16", alt: "" }), title, srButtonText && (o("span", Object.assign({ className: css_className('visually-hidden') }, { children: srButtonText })))] })));
28097
+ const ChatStatusAction = ({ handleClick, icon, title, srButtonText, }) => (o("button", { type: "button", onClick: handleClick, className: css_className('button', 'button--primary', 'chat-status__button'), children: [o(layout_icon, { name: icon, size: "16", alt: "" }), title, srButtonText && (o("span", { className: css_className('visually-hidden'), children: srButtonText }))] }));
27777
28098
  /* harmony default export */ var chat_status_action = (ChatStatusAction);
27778
28099
 
27779
28100
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/translation-proposal/index.tsx
@@ -27787,7 +28108,7 @@ function TranslationProposal() {
27787
28108
  if (!showProposal) {
27788
28109
  return null;
27789
28110
  }
27790
- return (o(chat_status, Object.assign({ handleClose: dismissTranslationProposal, srCloseButtonText: translationProposal.srDismissButtonText, id: id, title: translationProposal.titleLabel }, { children: o(chat_status_action, { handleClick: activateTranslationProposal, icon: "newTranslation", title: translationProposal.buttonLabel }) })));
28111
+ return (o(chat_status, { handleClose: dismissTranslationProposal, srCloseButtonText: translationProposal.srDismissButtonText, id: id, title: translationProposal.titleLabel, children: o(chat_status_action, { handleClick: activateTranslationProposal, icon: "newTranslation", title: translationProposal.buttonLabel }) }));
27791
28112
  }
27792
28113
 
27793
28114
  ;// CONCATENATED MODULE: ./src/javascripts/domains/translations/components/translation-status.tsx
@@ -28097,7 +28418,7 @@ const WindowView = () => {
28097
28418
  },
28098
28419
  },
28099
28420
  }), [continueChatText]);
28100
- return (o(preact_module/* Fragment */.HY, { children: [o(window_open_button, { onClick: openChat }), o(in_out_transition, Object.assign({ isActive: preChat && !isOpen && !userHasResponded, exitAfter: getDelay(preChat, 'exitAfter'), enterDelay: getDelay(preChat, 'enterDelay'), transitionStartState: transitionStartStates.rendered }, { children: o("div", Object.assign({ className: css_className('unstarted-wrapper', 'unstarted-wrapper--window') }, { children: o(PreChatMessages, {}) })) })), o(in_out_transition, Object.assign({ isActive: continueChat && !isOpen && userHasResponded, exitAfter: getDelay(continueChat, 'exitAfter'), enterDelay: getDelay(continueChat, 'enterDelay'), transitionStartState: transitionStartStates.notRendered }, { children: o("div", Object.assign({ className: css_className('unstarted-wrapper', 'unstarted-wrapper--window', 'unstarted-wrapper--continue') }, { children: o(event_text, { event: continueChatEvent }) })) })), o(in_out_transition, Object.assign({ isActive: isOpen, transitionStartState: transitionStartStates.notRendered }, { children: o(chat, { children: o(chat_frame, { children: o(conversation, {}) }) }) }))] }));
28421
+ return (o(preact_module/* Fragment */.HY, { children: [o(window_open_button, { onClick: openChat }), o(in_out_transition, { isActive: preChat && !isOpen && !userHasResponded, exitAfter: getDelay(preChat, 'exitAfter'), enterDelay: getDelay(preChat, 'enterDelay'), transitionStartState: transitionStartStates.rendered, children: o("div", { className: css_className('unstarted-wrapper', 'unstarted-wrapper--window'), children: o(PreChatMessages, {}) }) }), o(in_out_transition, { isActive: continueChat && !isOpen && userHasResponded, exitAfter: getDelay(continueChat, 'exitAfter'), enterDelay: getDelay(continueChat, 'enterDelay'), transitionStartState: transitionStartStates.notRendered, children: o("div", { className: css_className('unstarted-wrapper', 'unstarted-wrapper--window', 'unstarted-wrapper--continue'), children: o(event_text, { event: continueChatEvent }) }) }), o(in_out_transition, { isActive: isOpen, transitionStartState: transitionStartStates.notRendered, children: o(chat, { children: o(chat_frame, { children: o(conversation, {}) }) }) })] }));
28101
28422
  };
28102
28423
  /* harmony default export */ var window_view = (WindowView);
28103
28424
 
@@ -28313,7 +28634,7 @@ const View = ({ children }) => {
28313
28634
  if (userHasResponded) {
28314
28635
  classNames.push('app--user-responded');
28315
28636
  }
28316
- return (isVisible && (o("div", Object.assign({ className: css_className(classNames), lang: blockLang, tabIndex: -1, "data-nosnippet": true, style: { zIndex }, ref: containerElementRef }, { children: children || o(ViewComponent, {}) }))));
28637
+ return (isVisible && (o("div", { className: css_className(classNames), lang: blockLang, tabIndex: -1, "data-nosnippet": true, style: { zIndex }, ref: containerElementRef, children: children || o(ViewComponent, {}) })));
28317
28638
  };
28318
28639
  /* harmony default export */ var view = (View);
28319
28640
 
@@ -28403,14 +28724,16 @@ class Engine {
28403
28724
  yield store.dispatch(initializeConfig());
28404
28725
  try {
28405
28726
  const { locale } = yield store.dispatch(initializeApp()).unwrap();
28406
- yield store.dispatch(setLocale(locale));
28727
+ if (locale) {
28728
+ yield store.dispatch(setLocale(locale));
28729
+ }
28407
28730
  }
28408
28731
  catch (rejectedValueOrSerializedError) {
28409
28732
  // nothing to do
28410
28733
  }
28411
28734
  store.dispatch(initializeVisibility());
28412
28735
  if (View) {
28413
- (0,preact_module/* render */.sY)(o(seamly_core, Object.assign({ eventBus: this.eventBus, store: store, api: this.api }, { children: o(View, {}) })), this.parentElement);
28736
+ (0,preact_module/* render */.sY)(o(seamly_core, { eventBus: this.eventBus, store: store, api: this.api, children: o(View, {}) }), this.parentElement);
28414
28737
  }
28415
28738
  else {
28416
28739
  (0,preact_module/* render */.sY)(o(chat_app, { config: renderConfig, eventBus: this.eventBus, store: store, api: this.api }), this.parentElement);