@magicfeedback/popup-sdk 1.8.5 → 1.10.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.
@@ -15,7 +15,7 @@ import {
15
15
  sdkWarn,
16
16
  setSurveyBusy,
17
17
  style_default
18
- } from "./chunk-AV2TTQXB.mjs";
18
+ } from "./chunk-GXEPYT33.mjs";
19
19
 
20
20
  // node_modules/@magicfeedback/native/dist/magicfeedback-sdk.browser.js
21
21
  var require_magicfeedback_sdk_browser = __commonJS({
@@ -24,8 +24,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
24
24
  !(function(e, t) {
25
25
  "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.magicfeedback = t() : e.magicfeedback = t();
26
26
  })(self, (() => {
27
- return e = { 326: function(e2, t2) {
28
- var i = "undefined" != typeof self ? self : this, r = (function() {
27
+ return e = { 6911: function(e2, t2) {
28
+ var i = "undefined" != typeof self ? self : this, n = (function() {
29
29
  function e3() {
30
30
  this.fetch = false, this.DOMException = i.DOMException;
31
31
  }
@@ -33,7 +33,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
33
33
  })();
34
34
  !(function(e3) {
35
35
  !(function(t3) {
36
- var i2 = "URLSearchParams" in e3, r2 = "Symbol" in e3 && "iterator" in Symbol, n2 = "FileReader" in e3 && "Blob" in e3 && (function() {
36
+ var i2 = "URLSearchParams" in e3, n2 = "Symbol" in e3 && "iterator" in Symbol, r2 = "FileReader" in e3 && "Blob" in e3 && (function() {
37
37
  try {
38
38
  return new Blob(), true;
39
39
  } catch (e4) {
@@ -55,7 +55,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
55
55
  var t5 = e4.shift();
56
56
  return { done: void 0 === t5, value: t5 };
57
57
  } };
58
- return r2 && (t4[Symbol.iterator] = function() {
58
+ return n2 && (t4[Symbol.iterator] = function() {
59
59
  return t4;
60
60
  }), t4;
61
61
  }
@@ -93,8 +93,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
93
93
  function y() {
94
94
  return this.bodyUsed = false, this._initBody = function(e4) {
95
95
  var t4;
96
- this._bodyInit = e4, e4 ? "string" == typeof e4 ? this._bodyText = e4 : n2 && Blob.prototype.isPrototypeOf(e4) ? this._bodyBlob = e4 : o && FormData.prototype.isPrototypeOf(e4) ? this._bodyFormData = e4 : i2 && URLSearchParams.prototype.isPrototypeOf(e4) ? this._bodyText = e4.toString() : a && n2 && (t4 = e4) && DataView.prototype.isPrototypeOf(t4) ? (this._bodyArrayBuffer = g(e4.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : a && (ArrayBuffer.prototype.isPrototypeOf(e4) || l(e4)) ? this._bodyArrayBuffer = g(e4) : this._bodyText = e4 = Object.prototype.toString.call(e4) : this._bodyText = "", this.headers.get("content-type") || ("string" == typeof e4 ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : i2 && URLSearchParams.prototype.isPrototypeOf(e4) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
97
- }, n2 && (this.blob = function() {
96
+ this._bodyInit = e4, e4 ? "string" == typeof e4 ? this._bodyText = e4 : r2 && Blob.prototype.isPrototypeOf(e4) ? this._bodyBlob = e4 : o && FormData.prototype.isPrototypeOf(e4) ? this._bodyFormData = e4 : i2 && URLSearchParams.prototype.isPrototypeOf(e4) ? this._bodyText = e4.toString() : a && r2 && (t4 = e4) && DataView.prototype.isPrototypeOf(t4) ? (this._bodyArrayBuffer = g(e4.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : a && (ArrayBuffer.prototype.isPrototypeOf(e4) || l(e4)) ? this._bodyArrayBuffer = g(e4) : this._bodyText = e4 = Object.prototype.toString.call(e4) : this._bodyText = "", this.headers.get("content-type") || ("string" == typeof e4 ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : i2 && URLSearchParams.prototype.isPrototypeOf(e4) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
97
+ }, r2 && (this.blob = function() {
98
98
  var e4 = m(this);
99
99
  if (e4) return e4;
100
100
  if (this._bodyBlob) return Promise.resolve(this._bodyBlob);
@@ -104,11 +104,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
104
104
  }, this.arrayBuffer = function() {
105
105
  return this._bodyArrayBuffer ? m(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(f);
106
106
  }), this.text = function() {
107
- var e4, t4, i3, r3 = m(this);
108
- if (r3) return r3;
107
+ var e4, t4, i3, n3 = m(this);
108
+ if (n3) return n3;
109
109
  if (this._bodyBlob) return e4 = this._bodyBlob, i3 = h(t4 = new FileReader()), t4.readAsText(e4), i3;
110
110
  if (this._bodyArrayBuffer) return Promise.resolve((function(e5) {
111
- for (var t5 = new Uint8Array(e5), i4 = new Array(t5.length), r4 = 0; r4 < t5.length; r4++) i4[r4] = String.fromCharCode(t5[r4]);
111
+ for (var t5 = new Uint8Array(e5), i4 = new Array(t5.length), n4 = 0; n4 < t5.length; n4++) i4[n4] = String.fromCharCode(t5[n4]);
112
112
  return i4.join("");
113
113
  })(this._bodyArrayBuffer));
114
114
  if (this._bodyFormData) throw new Error("could not read FormData body as text");
@@ -148,41 +148,41 @@ var require_magicfeedback_sdk_browser = __commonJS({
148
148
  return this.forEach((function(t4, i3) {
149
149
  e4.push([i3, t4]);
150
150
  })), u(e4);
151
- }, r2 && (p.prototype[Symbol.iterator] = p.prototype.entries);
151
+ }, n2 && (p.prototype[Symbol.iterator] = p.prototype.entries);
152
152
  var v = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
153
153
  function b(e4, t4) {
154
- var i3, r3, n3 = (t4 = t4 || {}).body;
154
+ var i3, n3, r3 = (t4 = t4 || {}).body;
155
155
  if (e4 instanceof b) {
156
156
  if (e4.bodyUsed) throw new TypeError("Already read");
157
- this.url = e4.url, this.credentials = e4.credentials, t4.headers || (this.headers = new p(e4.headers)), this.method = e4.method, this.mode = e4.mode, this.signal = e4.signal, n3 || null == e4._bodyInit || (n3 = e4._bodyInit, e4.bodyUsed = true);
157
+ this.url = e4.url, this.credentials = e4.credentials, t4.headers || (this.headers = new p(e4.headers)), this.method = e4.method, this.mode = e4.mode, this.signal = e4.signal, r3 || null == e4._bodyInit || (r3 = e4._bodyInit, e4.bodyUsed = true);
158
158
  } else this.url = String(e4);
159
- if (this.credentials = t4.credentials || this.credentials || "same-origin", !t4.headers && this.headers || (this.headers = new p(t4.headers)), this.method = (r3 = (i3 = t4.method || this.method || "GET").toUpperCase(), v.indexOf(r3) > -1 ? r3 : i3), this.mode = t4.mode || this.mode || null, this.signal = t4.signal || this.signal, this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && n3) throw new TypeError("Body not allowed for GET or HEAD requests");
160
- this._initBody(n3);
159
+ if (this.credentials = t4.credentials || this.credentials || "same-origin", !t4.headers && this.headers || (this.headers = new p(t4.headers)), this.method = (n3 = (i3 = t4.method || this.method || "GET").toUpperCase(), v.indexOf(n3) > -1 ? n3 : i3), this.mode = t4.mode || this.mode || null, this.signal = t4.signal || this.signal, this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && r3) throw new TypeError("Body not allowed for GET or HEAD requests");
160
+ this._initBody(r3);
161
161
  }
162
162
  function E(e4) {
163
163
  var t4 = new FormData();
164
164
  return e4.trim().split("&").forEach((function(e5) {
165
165
  if (e5) {
166
- var i3 = e5.split("="), r3 = i3.shift().replace(/\+/g, " "), n3 = i3.join("=").replace(/\+/g, " ");
167
- t4.append(decodeURIComponent(r3), decodeURIComponent(n3));
166
+ var i3 = e5.split("="), n3 = i3.shift().replace(/\+/g, " "), r3 = i3.join("=").replace(/\+/g, " ");
167
+ t4.append(decodeURIComponent(n3), decodeURIComponent(r3));
168
168
  }
169
169
  })), t4;
170
170
  }
171
- function k(e4, t4) {
171
+ function A(e4, t4) {
172
172
  t4 || (t4 = {}), this.type = "default", this.status = void 0 === t4.status ? 200 : t4.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in t4 ? t4.statusText : "OK", this.headers = new p(t4.headers), this.url = t4.url || "", this._initBody(e4);
173
173
  }
174
174
  b.prototype.clone = function() {
175
175
  return new b(this, { body: this._bodyInit });
176
- }, y.call(b.prototype), y.call(k.prototype), k.prototype.clone = function() {
177
- return new k(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new p(this.headers), url: this.url });
178
- }, k.error = function() {
179
- var e4 = new k(null, { status: 0, statusText: "" });
176
+ }, y.call(b.prototype), y.call(A.prototype), A.prototype.clone = function() {
177
+ return new A(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new p(this.headers), url: this.url });
178
+ }, A.error = function() {
179
+ var e4 = new A(null, { status: 0, statusText: "" });
180
180
  return e4.type = "error", e4;
181
181
  };
182
- var A = [301, 302, 303, 307, 308];
183
- k.redirect = function(e4, t4) {
184
- if (-1 === A.indexOf(t4)) throw new RangeError("Invalid status code");
185
- return new k(null, { status: t4, headers: { location: e4 } });
182
+ var k = [301, 302, 303, 307, 308];
183
+ A.redirect = function(e4, t4) {
184
+ if (-1 === k.indexOf(t4)) throw new RangeError("Invalid status code");
185
+ return new A(null, { status: t4, headers: { location: e4 } });
186
186
  }, t3.DOMException = e3.DOMException;
187
187
  try {
188
188
  new t3.DOMException();
@@ -194,7 +194,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
194
194
  }, t3.DOMException.prototype = Object.create(Error.prototype), t3.DOMException.prototype.constructor = t3.DOMException;
195
195
  }
196
196
  function T(e4, i3) {
197
- return new Promise((function(r3, o2) {
197
+ return new Promise((function(n3, o2) {
198
198
  var a2 = new b(e4, i3);
199
199
  if (a2.signal && a2.signal.aborted) return o2(new t3.DOMException("Aborted", "AbortError"));
200
200
  var s2 = new XMLHttpRequest();
@@ -203,106 +203,107 @@ var require_magicfeedback_sdk_browser = __commonJS({
203
203
  }
204
204
  s2.onload = function() {
205
205
  var e5, t4, i4 = { status: s2.status, statusText: s2.statusText, headers: (e5 = s2.getAllResponseHeaders() || "", t4 = new p(), e5.replace(/\r?\n[\t ]+/g, " ").split(/\r?\n/).forEach((function(e6) {
206
- var i5 = e6.split(":"), r4 = i5.shift().trim();
207
- if (r4) {
208
- var n4 = i5.join(":").trim();
209
- t4.append(r4, n4);
206
+ var i5 = e6.split(":"), n4 = i5.shift().trim();
207
+ if (n4) {
208
+ var r4 = i5.join(":").trim();
209
+ t4.append(n4, r4);
210
210
  }
211
211
  })), t4) };
212
212
  i4.url = "responseURL" in s2 ? s2.responseURL : i4.headers.get("X-Request-URL");
213
- var n3 = "response" in s2 ? s2.response : s2.responseText;
214
- r3(new k(n3, i4));
213
+ var r3 = "response" in s2 ? s2.response : s2.responseText;
214
+ n3(new A(r3, i4));
215
215
  }, s2.onerror = function() {
216
216
  o2(new TypeError("Network request failed"));
217
217
  }, s2.ontimeout = function() {
218
218
  o2(new TypeError("Network request failed"));
219
219
  }, s2.onabort = function() {
220
220
  o2(new t3.DOMException("Aborted", "AbortError"));
221
- }, s2.open(a2.method, a2.url, true), "include" === a2.credentials ? s2.withCredentials = true : "omit" === a2.credentials && (s2.withCredentials = false), "responseType" in s2 && n2 && (s2.responseType = "blob"), a2.headers.forEach((function(e5, t4) {
221
+ }, s2.open(a2.method, a2.url, true), "include" === a2.credentials ? s2.withCredentials = true : "omit" === a2.credentials && (s2.withCredentials = false), "responseType" in s2 && r2 && (s2.responseType = "blob"), a2.headers.forEach((function(e5, t4) {
222
222
  s2.setRequestHeader(t4, e5);
223
223
  })), a2.signal && (a2.signal.addEventListener("abort", l2), s2.onreadystatechange = function() {
224
224
  4 === s2.readyState && a2.signal.removeEventListener("abort", l2);
225
225
  }), s2.send(void 0 === a2._bodyInit ? null : a2._bodyInit);
226
226
  }));
227
227
  }
228
- T.polyfill = true, e3.fetch || (e3.fetch = T, e3.Headers = p, e3.Request = b, e3.Response = k), t3.Headers = p, t3.Request = b, t3.Response = k, t3.fetch = T, Object.defineProperty(t3, "__esModule", { value: true });
228
+ T.polyfill = true, e3.fetch || (e3.fetch = T, e3.Headers = p, e3.Request = b, e3.Response = A), t3.Headers = p, t3.Request = b, t3.Response = A, t3.fetch = T, Object.defineProperty(t3, "__esModule", { value: true });
229
229
  })({});
230
- })(r), r.fetch.ponyfill = true, delete r.fetch.polyfill;
231
- var n = r;
232
- (t2 = n.fetch).default = n.fetch, t2.fetch = n.fetch, t2.Headers = n.Headers, t2.Request = n.Request, t2.Response = n.Response, e2.exports = t2;
233
- }, 317: (e2, t2) => {
230
+ })(n), n.fetch.ponyfill = true, delete n.fetch.polyfill;
231
+ var r = n;
232
+ (t2 = r.fetch).default = r.fetch, t2.fetch = r.fetch, t2.Headers = r.Headers, t2.Request = r.Request, t2.Response = r.Response, e2.exports = t2;
233
+ }, 431: (e2, t2) => {
234
234
  "use strict";
235
235
  Object.defineProperty(t2, "__esModule", { value: true }), t2.HOST_API_URL_DEV = t2.HOST_API_URL = void 0, t2.HOST_API_URL = "https://api.deepdots.com/", t2.HOST_API_URL_DEV = "https://api-dev.deepdots.com/";
236
- }, 156: function(e2, t2, i) {
236
+ }, 2474: function(e2, t2, i) {
237
237
  "use strict";
238
- var r = this && this.__importDefault || function(e3) {
238
+ var n = this && this.__importDefault || function(e3) {
239
239
  return e3 && e3.__esModule ? e3 : { default: e3 };
240
240
  };
241
241
  Object.defineProperty(t2, "__esModule", { value: true });
242
- const n = r(i(927));
242
+ const r = n(i(5969));
243
243
  let o = null;
244
- o || (o = (0, n.default)()), t2.default = o;
245
- }, 927: function(e2, t2, i) {
244
+ o || (o = (0, r.default)()), t2.default = o;
245
+ }, 5969: function(e2, t2, i) {
246
246
  "use strict";
247
- var r = this && this.__awaiter || function(e3, t3, i2, r2) {
248
- return new (i2 || (i2 = Promise))((function(n2, o2) {
247
+ var n = this && this.__awaiter || function(e3, t3, i2, n2) {
248
+ return new (i2 || (i2 = Promise))((function(r2, o2) {
249
249
  function a2(e4) {
250
250
  try {
251
- l2(r2.next(e4));
251
+ l2(n2.next(e4));
252
252
  } catch (e5) {
253
253
  o2(e5);
254
254
  }
255
255
  }
256
256
  function s2(e4) {
257
257
  try {
258
- l2(r2.throw(e4));
258
+ l2(n2.throw(e4));
259
259
  } catch (e5) {
260
260
  o2(e5);
261
261
  }
262
262
  }
263
263
  function l2(e4) {
264
264
  var t4;
265
- e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
265
+ e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
266
266
  e5(t4);
267
267
  }))).then(a2, s2);
268
268
  }
269
- l2((r2 = r2.apply(e3, t3 || [])).next());
269
+ l2((n2 = n2.apply(e3, t3 || [])).next());
270
270
  }));
271
271
  };
272
272
  Object.defineProperty(t2, "__esModule", { value: true });
273
- const n = i(57), o = i(544), a = i(665), s = i(256), l = i(313), d = i(317);
273
+ const r = i(139), o = i(7350), a = i(8587), s = i(1874), l = i(6891), d = i(431), c = i(6029);
274
274
  t2.default = function() {
275
275
  const e3 = new a.Config();
276
276
  let t3 = new s.Log(e3);
277
277
  return { init: function(i2) {
278
- "boolean" == typeof (null == i2 ? void 0 : i2.debug) && e3.set("debug", i2.debug), "boolean" == typeof (null == i2 ? void 0 : i2.dryRun) && e3.set("dryRun", i2.dryRun), e3.set("url", (null == i2 ? void 0 : i2.env) && "dev" === (null == i2 ? void 0 : i2.env) ? d.HOST_API_URL_DEV : d.HOST_API_URL), e3.set("env", null == i2 ? void 0 : i2.env), t3.log("Initialized Magicfeedback", e3);
279
- }, send: function(i2, n2, o2, a2 = true, s2, d2) {
280
- return r(this, void 0, void 0, (function* () {
281
- i2 || t3.err("No appID provided"), n2 || t3.err("No publicKey provided"), o2 || t3.err("No feedback provided"), o2.answers || o2.profile || o2.metrics || o2.metadata || t3.err("No feedback data provided");
282
- const r2 = e3.get("url"), c = { integration: i2, publicKey: n2, privateKey: d2, completed: a2, id: s2, feedback: o2 };
278
+ "boolean" == typeof (null == i2 ? void 0 : i2.debug) && e3.set("debug", i2.debug), "boolean" == typeof (null == i2 ? void 0 : i2.dryRun) && e3.set("dryRun", i2.dryRun), (null == i2 ? void 0 : i2.lang) && e3.set("lang", (0, c.normalizeSurveyLang)(i2.lang)), e3.set("url", (null == i2 ? void 0 : i2.env) && "dev" === (null == i2 ? void 0 : i2.env) ? d.HOST_API_URL_DEV : d.HOST_API_URL), e3.set("env", null == i2 ? void 0 : i2.env), t3.log("Initialized Magicfeedback", e3);
279
+ }, send: function(i2, r2, o2, a2 = true, s2, d2) {
280
+ var u;
281
+ return n(this, void 0, void 0, (function* () {
282
+ i2 || t3.err("No appID provided"), r2 || t3.err("No publicKey provided"), o2 || t3.err("No feedback provided"), o2.answers || o2.profile || o2.metrics || o2.metadata || t3.err("No feedback data provided");
283
+ const n2 = e3.get("url"), p = { integration: i2, publicKey: r2, privateKey: d2, completed: a2, id: s2, feedback: o2, lang: null !== (u = (0, c.detectSurveyLang)(e3.get("lang"))) && void 0 !== u ? u : void 0 };
283
284
  try {
284
285
  if (e3.get("dryRun")) return t3.log("Dry run enabled: skipping native feedback submit"), `dry-run-${Date.now()}`;
285
- const i3 = yield (0, l.sendFeedback)(r2, c, t3);
286
+ const i3 = yield (0, l.sendFeedback)(n2, p, t3);
286
287
  return t3.log("sent native feedback"), i3;
287
288
  } catch (e4) {
288
289
  return t3.err("error native feedback", e4), false;
289
290
  }
290
291
  }));
291
- }, form: function(i2, r2, o2, a2) {
292
- return i2 || t3.err("No appID provided"), r2 || t3.err("No publicKey provided"), new n.Form(e3, i2, r2, o2, a2);
293
- }, agentForm: function(i2, r2, n2) {
294
- return i2 || t3.err("No integrationId provided"), r2 || t3.err("No publicKey provided"), new o.AgentForm(e3, i2, r2, n2);
292
+ }, form: function(i2, n2, o2, a2) {
293
+ return i2 || t3.err("No appID provided"), n2 || t3.err("No publicKey provided"), new r.Form(e3, i2, n2, o2, a2);
294
+ }, agentForm: function(i2, n2, r2) {
295
+ return i2 || t3.err("No integrationId provided"), n2 || t3.err("No publicKey provided"), new o.AgentForm(e3, i2, n2, r2);
295
296
  }, session: function(i2) {
296
- return i2 || t3.err("No sessionId provided"), new n.Form(e3, i2);
297
+ return i2 || t3.err("No sessionId provided"), new r.Form(e3, i2);
297
298
  }, previewPage: function(i2, o2, a2) {
298
- return r(this, void 0, void 0, (function* () {
299
+ return n(this, void 0, void 0, (function* () {
299
300
  i2 || t3.err("No selector provided"), o2 && o2.page || t3.err("No page provided for preview");
300
- const r2 = (null == o2 ? void 0 : o2.appId) || `preview-${Date.now()}`, s2 = new n.Form(e3, r2);
301
+ const n2 = (null == o2 ? void 0 : o2.appId) || `preview-${Date.now()}`, s2 = new r.Form(e3, n2);
301
302
  return yield s2.previewPage(i2, o2, a2), s2;
302
303
  }));
303
304
  } };
304
305
  };
305
- }, 79: (e2, t2) => {
306
+ }, 1701: (e2, t2) => {
306
307
  "use strict";
307
308
  Object.defineProperty(t2, "__esModule", { value: true }), t2.History = void 0, t2.History = class {
308
309
  constructor() {
@@ -333,42 +334,42 @@ var require_magicfeedback_sdk_browser = __commonJS({
333
334
  return this.items[e3];
334
335
  }
335
336
  };
336
- }, 544: function(e2, t2, i) {
337
+ }, 7350: function(e2, t2, i) {
337
338
  "use strict";
338
- var r = this && this.__awaiter || function(e3, t3, i2, r2) {
339
- return new (i2 || (i2 = Promise))((function(n2, o2) {
339
+ var n = this && this.__awaiter || function(e3, t3, i2, n2) {
340
+ return new (i2 || (i2 = Promise))((function(r2, o2) {
340
341
  function a2(e4) {
341
342
  try {
342
- l2(r2.next(e4));
343
+ l2(n2.next(e4));
343
344
  } catch (e5) {
344
345
  o2(e5);
345
346
  }
346
347
  }
347
348
  function s2(e4) {
348
349
  try {
349
- l2(r2.throw(e4));
350
+ l2(n2.throw(e4));
350
351
  } catch (e5) {
351
352
  o2(e5);
352
353
  }
353
354
  }
354
355
  function l2(e4) {
355
356
  var t4;
356
- e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
357
+ e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
357
358
  e5(t4);
358
359
  }))).then(a2, s2);
359
360
  }
360
- l2((r2 = r2.apply(e3, t3 || [])).next());
361
+ l2((n2 = n2.apply(e3, t3 || [])).next());
361
362
  }));
362
363
  };
363
364
  Object.defineProperty(t2, "__esModule", { value: true }), t2.AgentForm = void 0;
364
- const n = i(256), o = i(279), a = i(945), s = i(177), l = i(107), d = i(565), c = i(571), u = i(213), p = i(881);
365
+ const r = i(1874), o = i(9), a = i(8019), s = i(3963), l = i(1817), d = i(459), c = i(1853), u = i(3903), p = i(7031), m = i(93), h = i(2139);
365
366
  t2.AgentForm = class {
366
- constructor(e3, t3, i2, r2) {
367
- this.config = e3, this.log = new n.Log(e3), this.url = e3.get("url"), this.integrationId = t3, this.publicKey = i2, this.privateKey = r2, this.formOptionsConfig = { addButton: true, addSuccessScreen: true, questionFormat: "standard", answerDelimiter: s.DEFAULT_ANSWER_DELIMITER, resume: true, allowBack: false, emptyAnswerText: "" }, this.selector = "", this.language = "en", this.product = { customIcons: false }, this.sessionId = "", this.conversation = [], this.askedRefs = [], this.currentTurn = 1, this.maxTurns = 0, this.currentQuestion = null, this.questionHistory = [], this.busy = false, this.rateLimitTimer = null, this.progress = 0, this.total = 0, this.completed = false, this.timeToCompleted = 0;
367
+ constructor(e3, t3, i2, n2) {
368
+ this.config = e3, this.log = new r.Log(e3), this.url = e3.get("url"), this.integrationId = t3, this.publicKey = i2, this.privateKey = n2, this.formOptionsConfig = { addButton: true, addSuccessScreen: true, questionFormat: "standard", answerDelimiter: s.DEFAULT_ANSWER_DELIMITER, resume: true, allowBack: false, emptyAnswerText: "" }, this.selector = "", this.language = "en", this.product = { customIcons: false }, this.sessionId = "", this.conversation = [], this.askedRefs = [], this.currentTurn = 1, this.maxTurns = 0, this.currentQuestion = null, this.questionHistory = [], this.busy = false, this.rateLimitTimer = null, this.progress = 0, this.total = 0, this.completed = false, this.timeToCompleted = 0;
368
369
  }
369
370
  generate(e3, t3 = {}) {
370
371
  var i2;
371
- return r(this, void 0, void 0, (function* () {
372
+ return n(this, void 0, void 0, (function* () {
372
373
  this.formOptionsConfig = Object.assign(Object.assign({}, this.formOptionsConfig), t3), this.selector = e3, t3.lang && (this.language = t3.lang), t3.primaryColor && (this.primaryColor = t3.primaryColor), this.config.get("dryRun") && this.log.log("dryRun has no effect in agent mode: the server drives the conversation");
373
374
  try {
374
375
  const e4 = false !== this.formOptionsConfig.resume ? this.restore() : null;
@@ -387,7 +388,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
387
388
  }));
388
389
  }
389
390
  next() {
390
- return r(this, void 0, void 0, (function* () {
391
+ return n(this, void 0, void 0, (function* () {
391
392
  return this.runTurn();
392
393
  }));
393
394
  }
@@ -406,27 +407,27 @@ var require_magicfeedback_sdk_browser = __commonJS({
406
407
  }
407
408
  runTurn() {
408
409
  var e3;
409
- return r(this, void 0, void 0, (function* () {
410
+ return n(this, void 0, void 0, (function* () {
410
411
  if (this.busy || this.completed || !this.currentQuestion) return;
411
- this.busy = true, this.setSubmitDisabled(true), this.clearError();
412
+ (0, h.cancelAutoAdvance)(document.getElementById(this.questionsId())), this.busy = true, this.setSubmitDisabled(true), this.clearError();
412
413
  const t3 = this.currentQuestion;
413
414
  try {
414
- const i2 = document.getElementById(this.formId()), r2 = document.getElementById(this.questionsId());
415
+ const i2 = document.getElementById(this.formId()), n2 = document.getElementById(this.questionsId());
415
416
  if (!i2) throw new Error("Agent form not found");
416
- yield (0, c.awaitUploadReady)(r2);
417
- const n2 = (0, l.scrapeInputs)(i2);
418
- let o2 = (0, s.encodeAnswer)(n2, t3, this.formOptionsConfig.answerDelimiter);
417
+ yield (0, c.awaitUploadReady)(n2);
418
+ const r2 = (0, l.scrapeInputs)(i2);
419
+ let o2 = (0, s.encodeAnswer)(r2, t3, this.formOptionsConfig.answerDelimiter);
419
420
  if ("" === o2) {
420
421
  if (t3.require) return void this.showError(this.formOptionsConfig.requiredMessage || (0, p.t)(this.language, "message.required"));
421
422
  o2 = this.formOptionsConfig.emptyAnswerText || "";
422
423
  }
423
424
  this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
424
- const d2 = { role: "user", content: o2, questionType: t3.type, questionRef: t3.ref }, u2 = this.currentTurn + 1, m = yield (0, a.nextAgentTurn)(this.url, { publicKey: this.publicKey, privateKey: this.privateKey, integrationId: this.integrationId, sessionId: this.sessionId, conversation: [...this.conversation], currentTurn: u2, lastAnswer: o2, lastQuestionRef: t3.ref, askedRefs: [...this.askedRefs] }, this.log);
425
- this.conversation.push(d2), this.currentTurn = null !== (e3 = m.currentTurn) && void 0 !== e3 ? e3 : u2, m.maxTurns && (this.maxTurns = m.maxTurns), this.total = Math.max(this.maxTurns - 1, 0);
426
- const h = (0, s.toAgentStep)(m, this.adapterContext());
427
- if ("END" === h.kind) return void (yield this.renderEnd(h));
425
+ const d2 = { role: "user", content: o2, questionType: t3.type, questionRef: t3.ref }, u2 = this.currentTurn + 1, m2 = yield (0, a.nextAgentTurn)(this.url, { publicKey: this.publicKey, privateKey: this.privateKey, integrationId: this.integrationId, sessionId: this.sessionId, conversation: [...this.conversation], currentTurn: u2, lastAnswer: o2, lastQuestionRef: t3.ref, askedRefs: [...this.askedRefs] }, this.log);
426
+ this.conversation.push(d2), this.currentTurn = null !== (e3 = m2.currentTurn) && void 0 !== e3 ? e3 : u2, m2.maxTurns && (this.maxTurns = m2.maxTurns), this.total = Math.max(this.maxTurns - 1, 0);
427
+ const h2 = (0, s.toAgentStep)(m2, this.adapterContext());
428
+ if ("END" === h2.kind) return void (yield this.renderEnd(h2));
428
429
  if (this.maxTurns > 0 && this.currentTurn > this.maxTurns + 1) return void (yield this.renderEnd({ kind: "END", reason: "MAX_TURNS", currentTurn: this.currentTurn, maxTurns: this.maxTurns }));
429
- this.acceptQuestion(h), this.renderStep(), this.persist(), this.formOptionsConfig.onAgentTurnEvent && (yield this.formOptionsConfig.onAgentTurnEvent({ turn: this.currentTurn, maxTurns: this.maxTurns, question: h.question, isFromBase: h.isFromBase, topic: h.topic, coverageGaps: h.coverageGaps, coverageSummary: h.coverageSummary, conversation: this.getConversation() })), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.sessionId, loading: false, progress: this.progress, total: this.total, completed: false, error: null }));
430
+ this.acceptQuestion(h2), this.renderStep(), this.persist(), this.formOptionsConfig.onAgentTurnEvent && (yield this.formOptionsConfig.onAgentTurnEvent({ turn: this.currentTurn, maxTurns: this.maxTurns, question: h2.question, isFromBase: h2.isFromBase, topic: h2.topic, coverageGaps: h2.coverageGaps, coverageSummary: h2.coverageSummary, conversation: this.getConversation() })), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.sessionId, loading: false, progress: this.progress, total: this.total, completed: false, error: null }));
430
431
  } catch (e4) {
431
432
  yield this.handleTurnError(e4);
432
433
  } finally {
@@ -435,7 +436,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
435
436
  }));
436
437
  }
437
438
  handleTurnError(e3) {
438
- return r(this, void 0, void 0, (function* () {
439
+ return n(this, void 0, void 0, (function* () {
439
440
  this.log.err(`An error occurred during the agent turn ${this.integrationId}:`, e3), e3 instanceof o.AgentApiError && "RATE_LIMITED" === e3.kind ? this.startRateLimitCountdown(e3.retryAfterMs || 6e4) : this.showError(this.errorMessageFor(e3)), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total, completed: false, error: e3 }));
440
441
  }));
441
442
  }
@@ -461,22 +462,22 @@ var require_magicfeedback_sdk_browser = __commonJS({
461
462
  }
462
463
  renderStep() {
463
464
  const e3 = document.getElementById(this.questionsId());
464
- e3 && this.currentQuestion && (e3.innerHTML = "", (0, u.renderQuestions)([this.currentQuestion], this.formOptionsConfig.questionFormat, this.language, this.product, (() => this.runTurn())).forEach(((t3) => e3.appendChild(t3))));
465
+ e3 && this.currentQuestion && (e3.innerHTML = "", (0, u.renderQuestions)([this.currentQuestion], this.formOptionsConfig.questionFormat, this.language, this.product, (() => this.runTurn())).forEach(((t3) => e3.appendChild(t3))), (0, m.armGhostTapGuard)(e3));
465
466
  }
466
467
  renderEnd(e3) {
467
- return r(this, void 0, void 0, (function* () {
468
+ return n(this, void 0, void 0, (function* () {
468
469
  this.completed = true, this.currentQuestion = null, this.busy = false, this.timeToCompleted = this.timeToCompleted ? Date.now() - this.timeToCompleted : 0, this.clearRateLimitTimer(), this.clearPersisted();
469
470
  const t3 = document.getElementById("magicfeedback-container-" + this.integrationId);
470
471
  if (t3 && false !== this.formOptionsConfig.addSuccessScreen) {
471
472
  t3.innerHTML = "";
472
- const i2 = "BLOCKED" === e3.reason ? this.formOptionsConfig.blockedMessage || (0, p.t)(this.language, "message.blocked") : this.formOptionsConfig.successMessage || (0, p.t)(this.language, "message.success"), r2 = (0, u.renderSuccess)(i2);
473
- r2.classList.add("magicfeedback-success-message"), r2.classList.add("magicfeedback-agent-end"), "BLOCKED" === e3.reason && r2.classList.add("magicfeedback-agent-end--blocked"), t3.appendChild(r2);
473
+ const i2 = "BLOCKED" === e3.reason ? this.formOptionsConfig.blockedMessage || (0, p.t)(this.language, "message.blocked") : this.formOptionsConfig.successMessage || (0, p.t)(this.language, "message.success"), n2 = (0, u.renderSuccess)(i2);
474
+ n2.classList.add("magicfeedback-success-message"), n2.classList.add("magicfeedback-agent-end"), "BLOCKED" === e3.reason && n2.classList.add("magicfeedback-agent-end--blocked"), t3.appendChild(n2);
474
475
  }
475
476
  this.formOptionsConfig.onFinishEvent && (yield this.formOptionsConfig.onFinishEvent({ sessionId: this.sessionId, reason: e3.reason, turns: this.currentTurn, maxTurns: this.maxTurns, conversation: this.getConversation(), coverageSummary: e3.coverageSummary, timeToCompleted: this.timeToCompleted })), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.sessionId, loading: false, progress: this.progress, total: this.total, completed: true, error: null }));
476
477
  }));
477
478
  }
478
479
  back() {
479
- return r(this, void 0, void 0, (function* () {
480
+ return n(this, void 0, void 0, (function* () {
480
481
  this.busy || this.completed || this.formOptionsConfig.allowBack && (this.questionHistory.length < 2 || (this.questionHistory.pop(), this.conversation.pop(), this.conversation.pop(), this.currentQuestion = this.questionHistory[this.questionHistory.length - 1], this.currentTurn = Math.max(this.currentTurn - 1, 1), this.progress = Math.max(this.currentTurn - 1, 0), this.clearError(), this.renderStep(), this.persist(), this.formOptionsConfig.onBackEvent && (yield this.formOptionsConfig.onBackEvent({ progress: this.progress, total: this.total }))));
481
482
  }));
482
483
  }
@@ -503,7 +504,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
503
504
  return { integrationId: this.integrationId, sessionId: this.sessionId, language: this.language, log: this.log };
504
505
  }
505
506
  startWithRetry() {
506
- return r(this, void 0, void 0, (function* () {
507
+ return n(this, void 0, void 0, (function* () {
507
508
  const e3 = { publicKey: this.publicKey, privateKey: this.privateKey, integrationId: this.integrationId };
508
509
  try {
509
510
  return yield (0, a.startAgentSurvey)(this.url, e3, this.log);
@@ -528,11 +529,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
528
529
  startRateLimitCountdown(e3) {
529
530
  this.clearRateLimitTimer(), this.setSubmitDisabled(true);
530
531
  let t3 = Math.ceil(e3 / 1e3);
531
- const i2 = this.formOptionsConfig.rateLimitMessage || (0, p.t)(this.language, "message.rateLimit"), r2 = () => {
532
+ const i2 = this.formOptionsConfig.rateLimitMessage || (0, p.t)(this.language, "message.rateLimit"), n2 = () => {
532
533
  if (t3 <= 0) return this.clearRateLimitTimer(), this.clearError(), void this.setSubmitDisabled(false);
533
534
  this.showError(i2.replace("{seconds}", String(t3))), t3 -= 1;
534
535
  };
535
- r2(), this.rateLimitTimer = setInterval(r2, 1e3);
536
+ n2(), this.rateLimitTimer = setInterval(n2, 1e3);
536
537
  }
537
538
  clearRateLimitTimer() {
538
539
  this.rateLimitTimer && (clearInterval(this.rateLimitTimer), this.rateLimitTimer = null);
@@ -570,7 +571,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
570
571
  (null === (t3 = null == e3 ? void 0 : e3.lang) || void 0 === t3 ? void 0 : t3.length) && (this.language = e3.lang[0]), (null == e3 ? void 0 : e3.product) && (this.product = e3.product), (null === (i2 = null == e3 ? void 0 : e3.style) || void 0 === i2 ? void 0 : i2.primaryColor) && (this.primaryColor = e3.style.primaryColor);
571
572
  }
572
573
  };
573
- }, 665: (e2, t2) => {
574
+ }, 8587: (e2, t2) => {
574
575
  "use strict";
575
576
  Object.defineProperty(t2, "__esModule", { value: true }), t2.Config = void 0, t2.Config = class {
576
577
  constructor() {
@@ -583,70 +584,79 @@ var require_magicfeedback_sdk_browser = __commonJS({
583
584
  this.variables[e3] = t3;
584
585
  }
585
586
  };
586
- }, 57: function(e2, t2, i) {
587
+ }, 139: function(e2, t2, i) {
587
588
  "use strict";
588
- var r = this && this.__awaiter || function(e3, t3, i2, r2) {
589
- return new (i2 || (i2 = Promise))((function(n2, o2) {
589
+ var n = this && this.__awaiter || function(e3, t3, i2, n2) {
590
+ return new (i2 || (i2 = Promise))((function(r2, o2) {
590
591
  function a2(e4) {
591
592
  try {
592
- l2(r2.next(e4));
593
+ l2(n2.next(e4));
593
594
  } catch (e5) {
594
595
  o2(e5);
595
596
  }
596
597
  }
597
598
  function s2(e4) {
598
599
  try {
599
- l2(r2.throw(e4));
600
+ l2(n2.throw(e4));
600
601
  } catch (e5) {
601
602
  o2(e5);
602
603
  }
603
604
  }
604
605
  function l2(e4) {
605
606
  var t4;
606
- e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
607
+ e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
607
608
  e5(t4);
608
609
  }))).then(a2, s2);
609
610
  }
610
- l2((r2 = r2.apply(e3, t3 || [])).next());
611
+ l2((n2 = n2.apply(e3, t3 || [])).next());
611
612
  }));
612
613
  };
613
614
  Object.defineProperty(t2, "__esModule", { value: true }), t2.Form = void 0;
614
- const n = i(558), o = i(544), a = i(256), s = i(313), l = i(213), d = i(571), c = i(565), u = i(107), p = i(989), m = i(700), h = i(591), f = i(79), g = i(636), y = i(881);
615
+ const r = i(1140), o = i(7350), a = i(1874), s = i(6891), l = i(3903), d = i(1853), c = i(459), u = i(1817), p = i(2531), m = i(198), h = i(4245), f = i(1701), g = i(1814), y = i(7031), v = i(6029), b = i(93), E = i(9033), A = i(2139);
615
616
  t2.Form = class {
616
- constructor(e3, t3, i2, r2, n2) {
617
- this.config = e3, this.log = new a.Log(e3), this.formOptionsConfig = { addButton: true, addSuccessScreen: true, getMetaData: true, customMetaData: [], questionFormat: "standard" }, this.selector = "", this.appId = t3, this.publicKey = i2 || "", this.url = e3.get("url"), this.id = "", this.formData = null, this.feedback = { text: "", answers: [], profile: null != r2 ? r2 : [], metrics: [], metadata: null != n2 ? n2 : [] }, this.history = new f.History(), this.agentForm = null, this.graph = new p.PageGraph([]), this.progress = 0, this.total = 0, this.completed = false, this.timeToCompleted = 0;
617
+ constructor(e3, t3, i2, n2, r2) {
618
+ this.config = e3, this.log = new a.Log(e3), this.formOptionsConfig = { addButton: true, addSuccessScreen: true, getMetaData: true, customMetaData: [], questionFormat: "standard" }, this.selector = "", this.appId = t3, this.publicKey = i2 || "", this.url = e3.get("url"), this.id = "", this.formData = null, this.activeLang = null, this.feedback = { text: "", answers: [], profile: null != n2 ? n2 : [], metrics: [], metadata: null != r2 ? r2 : [] }, this.history = new f.History(), this.agentForm = null, this.graph = new p.PageGraph([]), this.progress = 0, this.total = 0, this.completed = false, this.sending = false, this.timeToCompleted = 0;
618
619
  }
619
620
  generate(e3, t3) {
620
- var i2, n2, a2, l2, d2, c2, u2;
621
- return r(this, void 0, void 0, (function* () {
621
+ var i2, r2, a2, l2, d2, c2, u2;
622
+ return n(this, void 0, void 0, (function* () {
622
623
  try {
623
624
  this.formOptionsConfig = Object.assign(Object.assign({}, this.formOptionsConfig), t3), this.selector = e3;
624
- let r2 = this.formData;
625
- if (void 0 !== this.formData && this.formData || (r2 = "" !== this.publicKey ? yield (0, s.getForm)(this.url, this.appId, this.publicKey, this.log) : yield (0, s.getSessionForm)(this.url, this.appId, this.log)), void 0 === r2 || !r2) throw new Error(`No data for app ${this.appId}`);
626
- if (null === (i2 = r2.error) || void 0 === i2 ? void 0 : i2.message) throw new Error(r2.error.message);
627
- if ("AGENT" === r2.mode) return this.agentForm = new o.AgentForm(this.config, this.appId, this.publicKey), this.agentForm.applyIntegrationContext(r2), void (yield this.agentForm.generate(e3, t3));
628
- if (r2.questions = (null === (n2 = r2.questions) || void 0 === n2 ? void 0 : n2.filter(((e4) => "ACTIVE" === e4.status))) || [], r2.pages = (null === (a2 = r2.pages) || void 0 === a2 ? void 0 : a2.filter(((e4) => "ACTIVE" === e4.status))) || [], null === (l2 = r2.pages) || void 0 === l2 || l2.forEach(((e4) => {
625
+ let n2 = this.formData;
626
+ const p2 = (0, v.detectSurveyLang)((null == t3 ? void 0 : t3.lang) || this.config.get("lang"));
627
+ if (void 0 !== this.formData && this.formData || (n2 = "" !== this.publicKey ? yield (0, s.getForm)(this.url, this.appId, this.publicKey, this.log, p2) : yield (0, s.getSessionForm)(this.url, this.appId, this.log, p2)), void 0 === n2 || !n2) throw new Error(`No data for app ${this.appId}`);
628
+ if (null === (i2 = n2.error) || void 0 === i2 ? void 0 : i2.message) throw new Error(n2.error.message);
629
+ if ("AGENT" === n2.mode) return this.agentForm = new o.AgentForm(this.config, this.appId, this.publicKey), this.agentForm.applyIntegrationContext(n2), void (yield this.agentForm.generate(e3, t3));
630
+ if (n2.questions = (null === (r2 = n2.questions) || void 0 === r2 ? void 0 : r2.filter(((e4) => "ACTIVE" === e4.status))) || [], n2.pages = (null === (a2 = n2.pages) || void 0 === a2 ? void 0 : a2.filter(((e4) => "ACTIVE" === e4.status))) || [], null === (l2 = n2.pages) || void 0 === l2 || l2.forEach(((e4) => {
629
631
  var t4;
630
632
  return e4.integrationQuestions = null === (t4 = e4.integrationQuestions) || void 0 === t4 ? void 0 : t4.filter(((e5) => "ACTIVE" === e5.status));
631
- })), this.formData = r2, this.formData.savedAt || (this.formData.savedAt = /* @__PURE__ */ new Date(), localStorage.setItem(`magicfeedback-${this.appId}`, JSON.stringify(this.formData))), void 0 === this.formData.questions || !this.formData.questions) throw new Error(`No questions for app ${this.appId}`);
633
+ })), this.formData = n2, this.activeLang = this.resolveActiveLang(p2), !this.formData.savedAt) {
634
+ this.formData.savedAt = /* @__PURE__ */ new Date();
635
+ try {
636
+ localStorage.setItem(`magicfeedback-${this.appId}-${this.lang()}`, JSON.stringify(this.formData));
637
+ } catch (e4) {
638
+ this.log.log("Could not cache the form data", e4);
639
+ }
640
+ }
641
+ if (void 0 === this.formData.questions || !this.formData.questions) throw new Error(`No questions for app ${this.appId}`);
632
642
  this.formData.pages && 0 !== (null === (d2 = this.formData.pages) || void 0 === d2 ? void 0 : d2.length) || this.formatPages(), null === (c2 = this.formData.questions) || void 0 === c2 || c2.sort(((e4, t4) => e4.position - t4.position)), this.formData.pages = this.formData.pages.filter(((e4) => {
633
643
  var t4;
634
644
  return (null === (t4 = e4.integrationQuestions) || void 0 === t4 ? void 0 : t4.length) > 0;
635
- })), this.formOptionsConfig.getMetaData && this.getMetaData(), (null === (u2 = this.formData.style) || void 0 === u2 ? void 0 : u2.startMessage) ? yield this.generateWelcomeMessage(this.formData.style.startMessage) : this.startForm();
645
+ })), this.formOptionsConfig.getMetaData && this.getMetaData(), (null === (u2 = this.formData.style) || void 0 === u2 ? void 0 : u2.startMessage) ? yield this.generateWelcomeMessage(this.formData.style.startMessage) : this.generateForm("open");
636
646
  } catch (e4) {
637
647
  return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 })));
638
648
  }
639
649
  }));
640
650
  }
641
651
  previewPage(e3, t3, i2 = {}) {
642
- var n2, o2, a2, s2, l2, d2, c2, u2, p2;
643
- return r(this, void 0, void 0, (function* () {
652
+ var r2, o2, a2, s2, l2, d2, c2, u2, p2;
653
+ return n(this, void 0, void 0, (function* () {
644
654
  try {
645
655
  if (!t3 || !t3.page) throw new Error("[MagicFeedback] No page provided for preview");
646
656
  if (!t3.page.integrationQuestions || 0 === t3.page.integrationQuestions.length) throw new Error("[MagicFeedback] No questions provided for preview");
647
657
  this.config.set("dryRun", true), this.formOptionsConfig = Object.assign(Object.assign(Object.assign({}, this.formOptionsConfig), { getMetaData: false }), i2), this.selector = e3;
648
- const r2 = (t3.page.integrationQuestions || []).filter(((e4) => !e4.status || "ACTIVE" === e4.status)).sort(((e4, t4) => e4.position - t4.position)), h2 = new m.Page(null !== (n2 = t3.page.id) && void 0 !== n2 ? n2 : "1", null !== (o2 = t3.page.position) && void 0 !== o2 ? o2 : 1, null !== (a2 = t3.appId) && void 0 !== a2 ? a2 : this.appId, r2, null !== (s2 = t3.page.integrationPageRoutes) && void 0 !== s2 ? s2 : []);
649
- this.formData = { id: null !== (l2 = t3.appId) && void 0 !== l2 ? l2 : this.appId, identity: null !== (d2 = t3.identity) && void 0 !== d2 ? d2 : "MAGICFORM", lang: [null !== (c2 = t3.lang) && void 0 !== c2 ? c2 : "en"], product: null !== (u2 = t3.product) && void 0 !== u2 ? u2 : { customIcons: false }, style: null !== (p2 = t3.style) && void 0 !== p2 ? p2 : {}, questions: r2, pages: [h2] }, yield this.generateForm();
658
+ const n2 = (t3.page.integrationQuestions || []).filter(((e4) => !e4.status || "ACTIVE" === e4.status)).sort(((e4, t4) => e4.position - t4.position)), h2 = new m.Page(null !== (r2 = t3.page.id) && void 0 !== r2 ? r2 : "1", null !== (o2 = t3.page.position) && void 0 !== o2 ? o2 : 1, null !== (a2 = t3.appId) && void 0 !== a2 ? a2 : this.appId, n2, null !== (s2 = t3.page.integrationPageRoutes) && void 0 !== s2 ? s2 : []);
659
+ this.formData = { id: null !== (l2 = t3.appId) && void 0 !== l2 ? l2 : this.appId, identity: null !== (d2 = t3.identity) && void 0 !== d2 ? d2 : "MAGICFORM", lang: [null !== (c2 = t3.lang) && void 0 !== c2 ? c2 : "en"], product: null !== (u2 = t3.product) && void 0 !== u2 ? u2 : { customIcons: false }, style: null !== (p2 = t3.style) && void 0 !== p2 ? p2 : {}, questions: n2, pages: [h2] }, yield this.generateForm();
650
660
  } catch (e4) {
651
661
  return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 })));
652
662
  }
@@ -658,8 +668,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
658
668
  case "MAGICSURVEY":
659
669
  this.formData.pages = [], null === (e3 = this.formData.questions) || void 0 === e3 || e3.forEach(((e4) => {
660
670
  var t4, i2;
661
- const r2 = new h.PageRoute(e4.id, e4.ref, h.OperatorType.NOEQUAL, [], h.TransitionType.PAGE, (e4.position + 1).toString(), e4.position.toString()), n2 = new m.Page(e4.position.toString(), e4.position, this.appId, [e4], [r2]);
662
- null === (i2 = null === (t4 = this.formData) || void 0 === t4 ? void 0 : t4.pages) || void 0 === i2 || i2.push(n2);
671
+ const n2 = new h.PageRoute(e4.id, e4.ref, h.OperatorType.NOEQUAL, [], h.TransitionType.PAGE, (e4.position + 1).toString(), e4.position.toString()), r2 = new m.Page(e4.position.toString(), e4.position, this.appId, [e4], [n2]);
672
+ null === (i2 = null === (t4 = this.formData) || void 0 === t4 ? void 0 : t4.pages) || void 0 === i2 || i2.push(r2);
663
673
  }));
664
674
  break;
665
675
  case "MAGICFORM":
@@ -669,46 +679,61 @@ var require_magicfeedback_sdk_browser = __commonJS({
669
679
  }
670
680
  generateContainer() {
671
681
  var e3, t3;
672
- const i2 = (0, c.generateContainer)(this.selector, this.appId), r2 = null === (t3 = null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.style) || void 0 === t3 ? void 0 : t3.primaryColor;
673
- return r2 && (0, c.applyPrimaryColor)(i2, r2), (0, c.applyDirection)(i2, this.lang()), i2;
682
+ const i2 = (0, c.generateContainer)(this.selector, this.appId), n2 = null === (t3 = null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.style) || void 0 === t3 ? void 0 : t3.primaryColor;
683
+ return n2 && (0, c.applyPrimaryColor)(i2, n2), (0, c.applyDirection)(i2, this.lang()), i2;
674
684
  }
675
- generateForm() {
676
- var e3, t3, i2, n2;
677
- return r(this, void 0, void 0, (function* () {
685
+ generateForm(e3 = "open") {
686
+ var t3, i2, r2;
687
+ return n(this, void 0, void 0, (function* () {
678
688
  try {
679
689
  if (!this.formData || !this.formData.pages || 0 === this.formData.pages.length) throw new Error("No form data");
680
690
  this.graph = new p.PageGraph(this.formData.pages.sort(((e4, t4) => e4.position - t4.position)));
681
- let r2 = this.generateContainer();
691
+ let n2 = this.generateContainer();
682
692
  const o2 = document.createElement("form");
683
693
  o2.classList.add("magicfeedback-form"), o2.id = "magicfeedback-" + this.appId, o2.addEventListener("submit", ((e4) => e4.preventDefault()));
684
694
  const a2 = document.createElement("div");
685
695
  a2.classList.add("magicfeedback-questions"), a2.id = "magicfeedback-questions-" + this.appId;
686
696
  const s2 = this.graph.getFirstPage();
687
697
  if (!s2) throw new Error("No page found");
688
- if (this.total = this.graph.findMaxDepth(), s2.elements = (0, l.renderQuestions)(s2.questions, this.formOptionsConfig.questionFormat, null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.lang[0], null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.product, (() => this.send())), null === (i2 = s2.elements) || void 0 === i2 || i2.forEach(((e4) => a2.appendChild(e4))), o2.appendChild(a2), this.history.enqueue(s2), r2.appendChild(o2), this.progress = this.total - this.graph.findMaxDepth(s2), this.formOptionsConfig.addButton) {
689
- const e4 = (0, l.renderActions)(null === (n2 = this.formData) || void 0 === n2 ? void 0 : n2.identity, (() => this.back()), this.formOptionsConfig.sendButtonText || (0, y.t)(this.lang(), "action.send"), this.formOptionsConfig.backButtonText || (0, y.t)(this.lang(), "action.back"), this.formOptionsConfig.nextButtonText || (0, y.t)(this.lang(), "action.next"));
690
- o2.appendChild(e4);
698
+ if (this.total = this.graph.findMaxDepth(), s2.elements = (0, l.renderQuestions)(s2.questions, this.formOptionsConfig.questionFormat, this.lang(), null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.product, (() => this.autoSend())), null === (i2 = s2.elements) || void 0 === i2 || i2.forEach(((e4) => a2.appendChild(e4))), o2.appendChild(a2), (0, b.armGhostTapGuard)(a2), this.history.enqueue(s2), n2.appendChild(o2), this.progress = this.total - this.graph.findMaxDepth(s2), this.formOptionsConfig.addButton) {
699
+ const e4 = (0, l.renderActions)(null === (r2 = this.formData) || void 0 === r2 ? void 0 : r2.identity, (() => this.back()), this.formOptionsConfig.sendButtonText || (0, y.t)(this.lang(), "action.send"), this.formOptionsConfig.backButtonText || (0, y.t)(this.lang(), "action.back"), this.formOptionsConfig.nextButtonText || (0, y.t)(this.lang(), "action.next"));
700
+ o2.appendChild(e4), this.syncBackButton();
691
701
  }
692
702
  this.formOptionsConfig.addButton && o2.addEventListener("submit", ((e4) => {
693
703
  e4.preventDefault(), this.send();
694
- })), this.timeToCompleted = Date.now(), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, progress: this.progress, total: this.total, formData: this.formData, formOptionsConfig: this.formOptionsConfig }));
704
+ })), this.timeToCompleted = Date.now(), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, progress: this.progress, total: this.total, formData: this.formData, lang: this.lang(), formOptionsConfig: this.formOptionsConfig })), this.autofocusAfterRender(e3);
695
705
  } catch (e4) {
696
706
  return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 }));
697
707
  }
698
708
  }));
699
709
  }
700
710
  startForm() {
701
- this.generateForm();
711
+ this.generateForm("navigation");
712
+ }
713
+ focusFirstQuestion() {
714
+ return "undefined" != typeof document && (0, E.focusFirstTextQuestion)(document.getElementById("magicfeedback-questions-" + this.appId));
715
+ }
716
+ autofocusAfterRender(e3) {
717
+ const t3 = this.formOptionsConfig.autofocus;
718
+ t3 && ("open" === e3 && "always" !== t3 || this.focusFirstQuestion());
702
719
  }
703
720
  lang() {
704
721
  var e3;
705
- return (null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.lang) && this.formData.lang[0] || "en";
722
+ return this.activeLang || (null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.lang) && this.formData.lang[0] || "en";
723
+ }
724
+ getLang() {
725
+ return this.lang();
726
+ }
727
+ resolveActiveLang(e3) {
728
+ var t3, i2;
729
+ const n2 = (null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.lang) || [];
730
+ return (null === (i2 = this.formData) || void 0 === i2 ? void 0 : i2.servedLang) ? this.formData.servedLang : e3 && n2.includes(e3) ? e3 : n2[0] || null;
706
731
  }
707
732
  generateWelcomeMessage(e3) {
708
- return r(this, void 0, void 0, (function* () {
733
+ return n(this, void 0, void 0, (function* () {
709
734
  try {
710
735
  const t3 = this.generateContainer(), i2 = (0, l.renderStartMessage)(e3, this.formOptionsConfig.addButton, this.formOptionsConfig.startButtonText || (0, y.t)(this.lang(), "action.start"), (() => this.startForm()));
711
- t3.appendChild(i2), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, formData: this.formData }));
736
+ t3.appendChild(i2), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, formData: this.formData, lang: this.lang() }));
712
737
  } catch (e4) {
713
738
  return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 }));
714
739
  }
@@ -723,9 +748,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
723
748
  })), this.feedback.metadata.push({ key: "navigator-user", value: [navigator.userAgent] }), this.feedback.metadata.push({ key: "navigator-language", value: [navigator.language] }), this.feedback.metadata.push({ key: "navigator-platform", value: [navigator.platform] }), this.feedback.metadata.push({ key: "navigator-appVersion", value: [navigator.appVersion] }), this.feedback.metadata.push({ key: "navigator-appName", value: [navigator.appName] }), this.feedback.metadata.push({ key: "navigator-product", value: [navigator.product] }), this.feedback.metadata.push({ key: "screen-width", value: [window.screen.width.toString()] }), this.feedback.metadata.push({ key: "screen-height", value: [window.screen.height.toString()] }), this.appId && "" === this.publicKey && this.feedback.metadata.push({ key: "MAGICFEEDBACK_SESSION", value: [this.appId] });
724
749
  }
725
750
  send(e3, t3, i2, o2) {
726
- return r(this, void 0, void 0, (function* () {
751
+ var a2, s2;
752
+ return n(this, void 0, void 0, (function* () {
727
753
  if (this.agentForm) return this.agentForm.next();
728
- const r2 = document.getElementById("magicfeedback-questions-" + this.appId);
754
+ const n2 = document.getElementById("magicfeedback-questions-" + this.appId);
755
+ (0, A.cancelAutoAdvance)(n2), this.sending = true;
729
756
  try {
730
757
  if (i2 && (this.feedback.profile = [...this.feedback.profile, ...i2]), t3 && (this.feedback.metrics = [...this.feedback.metrics, ...t3]), e3 && (this.feedback.metadata = [...this.feedback.metadata, ...e3]), o2) {
731
758
  this.feedback.answers = [...this.feedback.answers, ...o2], this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
@@ -733,133 +760,169 @@ var require_magicfeedback_sdk_browser = __commonJS({
733
760
  if (!e4) throw new Error("No response");
734
761
  return this.id = e4, void (this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total })));
735
762
  }
736
- yield (0, d.awaitUploadReady)(r2), this.answer(), this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
737
- const a2 = this.history.back();
738
- if (!a2) throw new Error("No page found");
739
- for (const e4 of a2.questions.filter(((e5) => e5.require && ![n.FEEDBACKAPPANSWERTYPE.CONSENT, n.FEEDBACKAPPANSWERTYPE.INFO_PAGE].includes(e5.type)))) {
763
+ yield (0, d.awaitUploadReady)(n2), this.answer(), this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
764
+ const l2 = this.history.back();
765
+ if (!l2) throw new Error("No page found");
766
+ for (const e4 of l2.questions.filter(((e5) => e5.require && ![r.FEEDBACKAPPANSWERTYPE.CONSENT, r.FEEDBACKAPPANSWERTYPE.INFO_PAGE].includes(e5.type)))) {
740
767
  const t4 = e4.assets, i3 = this.feedback.answers.filter(((t5) => t5.key.includes(e4.ref) && !t5.key.includes("extra-option")));
741
768
  if (0 === i3.length || i3.find(((e5) => 0 === e5.value.length))) throw this.log.err(`The question ${e4.ref} is required`), new Error("No response");
742
769
  if (null == t4 ? void 0 : t4.minOptions) {
743
- let r3 = [];
744
- if ((null == t4 ? void 0 : t4.exclusiveAnswers) && (r3 = null == t4 ? void 0 : t4.exclusiveAnswers), !i3[0].value.find(((e5) => r3.includes(e5))) && i3[0].value.length < (null == t4 ? void 0 : t4.minOptions)) throw this.log.err(`The question ${e4.ref} requires at least ${null == t4 ? void 0 : t4.minOptions} options`), new Error("No response");
770
+ let n3 = [];
771
+ if ((null == t4 ? void 0 : t4.exclusiveAnswers) && (n3 = null == t4 ? void 0 : t4.exclusiveAnswers), !i3[0].value.find(((e5) => n3.includes(e5))) && i3[0].value.length < (null == t4 ? void 0 : t4.minOptions)) throw this.log.err(`The question ${e4.ref} requires at least ${null == t4 ? void 0 : t4.minOptions} options`), new Error("No response");
745
772
  }
746
- if (e4.type === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) {
773
+ if (e4.type === r.FEEDBACKAPPANSWERTYPE.MAX_DIFF) {
774
+ const t5 = null !== (s2 = null === (a2 = e4.assets) || void 0 === a2 ? void 0 : a2.setIndex) && void 0 !== s2 ? s2 : 1, i4 = this.parseMaxDiffAnswer(this.feedback.answers.find(((t6) => t6.key === e4.ref))).find(((e5) => e5.set === t5));
775
+ if (!(null == i4 ? void 0 : i4.best) || !(null == i4 ? void 0 : i4.worst)) throw this.log.err(`The MaxDiff question ${e4.ref} requires the most and the least important`), new Error("No response");
776
+ }
777
+ if (e4.type === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) {
747
778
  const i4 = this.feedback.answers.find(((t5) => t5.key === e4.ref));
748
779
  if (!i4) throw this.log.err(`The matrix question ${e4.ref} is required`), new Error("No response");
749
- const r3 = this.parseMatrixAnswerPre(i4), n2 = Array.isArray(null == t4 ? void 0 : t4.options) ? t4.options : [];
750
- if (n2.length > 0) {
751
- if (n2.find(((e5) => {
752
- const t5 = r3.find(((t6) => t6.key === e5));
780
+ const n3 = this.parseMatrixAnswerPre(i4), r2 = Array.isArray(null == t4 ? void 0 : t4.options) ? t4.options : [];
781
+ if (r2.length > 0) {
782
+ if (r2.find(((e5) => {
783
+ const t5 = n3.find(((t6) => t6.key === e5));
753
784
  return !t5 || !Array.isArray(t5.value) || 0 === t5.value.length;
754
785
  }))) throw this.log.err(`The matrix question ${e4.ref} requires an answer in every row`), new Error("No response");
755
- } else if (0 === r3.length || r3.some(((e5) => !Array.isArray(e5.value) || 0 === e5.value.length))) throw this.log.err(`The matrix question ${e4.ref} requires an answer in every row`), new Error("No response");
786
+ } else if (0 === n3.length || n3.some(((e5) => !Array.isArray(e5.value) || 0 === e5.value.length))) throw this.log.err(`The matrix question ${e4.ref} requires an answer in every row`), new Error("No response");
756
787
  }
757
788
  }
758
- const s2 = yield this.pushAnswers(false);
759
- if (!s2) throw new Error("No response");
760
- this.id = s2, yield this.processNextQuestion(r2);
789
+ const c2 = yield this.pushAnswers(false);
790
+ if (!c2) throw new Error("No response");
791
+ this.id = c2, yield this.processNextQuestion(n2);
761
792
  } catch (e4) {
762
793
  this.log.err(`An error occurred while submitting the form ${this.appId}:`, e4), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total, error: e4 }));
794
+ } finally {
795
+ this.sending = false;
763
796
  }
764
797
  }));
765
798
  }
799
+ autoSend() {
800
+ if (!this.sending) return this.send();
801
+ }
766
802
  answer() {
767
- const e3 = document.getElementById("magicfeedback-" + this.appId);
768
- if (!e3) return this.log.err(`Form "${e3}" not found.`), this.feedback.answers = [], [];
769
- const t3 = this.history.back();
770
- if (!t3) return this.feedback.answers = (0, u.scrapeInputs)(e3), this.feedback.answers;
771
- const i2 = [];
772
- let r2 = false;
773
- const o2 = e3.querySelectorAll(".magicfeedback-input"), a2 = {}, l2 = {}, c2 = {};
774
- if (o2.forEach(((e4) => {
775
- const o3 = e4, u2 = t3.questions.find(((e5) => {
776
- var t4;
777
- return null === (t4 = o3.name) || void 0 === t4 ? void 0 : t4.includes(e5.ref);
778
- })), p2 = o3.type, m2 = o3.classList[0], h2 = { key: o3.name, value: [] }, f2 = "magicfeedback-consent" === m2 ? o3.checked.toString() : o3.value;
779
- if (h2.key && "" !== h2.key) if (h2.key.startsWith("extra-option-")) "" !== f2 && (h2.value.push(f2), i2.push(h2));
780
- else switch (null == u2 ? void 0 : u2.type) {
781
- case n.FEEDBACKAPPANSWERTYPE.EMAIL:
782
- case n.FEEDBACKAPPANSWERTYPE.TEXT:
783
- case n.FEEDBACKAPPANSWERTYPE.LONGTEXT:
784
- case n.FEEDBACKAPPANSWERTYPE.NUMBER:
785
- case n.FEEDBACKAPPANSWERTYPE.DATE:
786
- case n.FEEDBACKAPPANSWERTYPE.CONTACT:
787
- case n.FEEDBACKAPPANSWERTYPE.PASSWORD:
788
- "" !== f2 && ("email" === p2 ? (0, s.validateEmail)(f2) ? (this.feedback.profile.push({ key: "email", value: [f2] }), h2.value.push(f2), i2.push(h2)) : (this.log.err("Invalid email"), r2 = true) : (h2.value.push(f2), i2.push(h2)));
803
+ const e3 = "magicfeedback-" + this.appId, t3 = document.getElementById(e3);
804
+ if (!t3) return this.log.err(`Form "${e3}" not found.`), this.feedback.answers = [], [];
805
+ const i2 = this.history.back();
806
+ if (!i2) return this.feedback.answers = (0, u.scrapeInputs)(t3), this.feedback.answers;
807
+ const n2 = [];
808
+ let o2 = false;
809
+ const a2 = t3.querySelectorAll(".magicfeedback-input"), l2 = {}, c2 = {}, p2 = {}, m2 = {};
810
+ if (a2.forEach(((e4) => {
811
+ var t4, a3;
812
+ const u2 = e4, h3 = i2.questions.find(((e5) => {
813
+ var t5;
814
+ return null === (t5 = u2.name) || void 0 === t5 ? void 0 : t5.includes(e5.ref);
815
+ })), f2 = u2.type, g2 = u2.classList[0], y2 = { key: u2.name, value: [] }, v2 = "magicfeedback-consent" === g2 ? u2.checked.toString() : u2.value;
816
+ if (y2.key && "" !== y2.key) if (y2.key.startsWith("extra-option-")) "" !== v2 && (y2.value.push(v2), n2.push(y2));
817
+ else switch (null == h3 ? void 0 : h3.type) {
818
+ case r.FEEDBACKAPPANSWERTYPE.EMAIL:
819
+ case r.FEEDBACKAPPANSWERTYPE.TEXT:
820
+ case r.FEEDBACKAPPANSWERTYPE.LONGTEXT:
821
+ case r.FEEDBACKAPPANSWERTYPE.NUMBER:
822
+ case r.FEEDBACKAPPANSWERTYPE.DATE:
823
+ case r.FEEDBACKAPPANSWERTYPE.CONTACT:
824
+ case r.FEEDBACKAPPANSWERTYPE.PASSWORD:
825
+ "" !== v2 && ("email" === f2 ? (0, s.validateEmail)(v2) ? (this.feedback.profile.push({ key: "email", value: [v2] }), y2.value.push(v2), n2.push(y2)) : (this.log.err("Invalid email"), o2 = true) : (y2.value.push(v2), n2.push(y2)));
826
+ break;
827
+ case r.FEEDBACKAPPANSWERTYPE.RADIO:
828
+ u2.checked && (y2.value.push(v2), n2.push(y2));
789
829
  break;
790
- case n.FEEDBACKAPPANSWERTYPE.RADIO:
791
- o3.checked && (h2.value.push(f2), i2.push(h2));
830
+ case r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE:
831
+ case r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE:
832
+ u2.checked && (c2[y2.key] || (c2[y2.key] = []), c2[y2.key].push(v2));
792
833
  break;
793
- case n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE:
794
- case n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE:
795
- o3.checked && (l2[h2.key] || (l2[h2.key] = []), l2[h2.key].push(f2));
834
+ case r.FEEDBACKAPPANSWERTYPE.BOOLEAN:
835
+ u2.checked && (y2.value.push(v2), n2.push(y2));
796
836
  break;
797
- case n.FEEDBACKAPPANSWERTYPE.BOOLEAN:
798
- o3.checked && (h2.value.push(f2), i2.push(h2));
837
+ case r.FEEDBACKAPPANSWERTYPE.CONSENT:
838
+ y2.value.push(u2.checked.toString()), n2.push(y2);
799
839
  break;
800
- case n.FEEDBACKAPPANSWERTYPE.CONSENT:
801
- h2.value.push(o3.checked.toString()), i2.push(h2);
840
+ case r.FEEDBACKAPPANSWERTYPE.RATING_EMOJI:
841
+ case r.FEEDBACKAPPANSWERTYPE.RATING_NUMBER:
842
+ case r.FEEDBACKAPPANSWERTYPE.RATING_STAR:
843
+ u2.checked && (y2.value.push(v2), n2.push(y2));
802
844
  break;
803
- case n.FEEDBACKAPPANSWERTYPE.RATING_EMOJI:
804
- case n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER:
805
- case n.FEEDBACKAPPANSWERTYPE.RATING_STAR:
806
- o3.checked && (h2.value.push(f2), i2.push(h2));
845
+ case r.FEEDBACKAPPANSWERTYPE.SELECT:
846
+ "" !== v2 && (y2.value.push(v2), n2.push(y2));
807
847
  break;
808
- case n.FEEDBACKAPPANSWERTYPE.SELECT:
809
- "" !== f2 && (h2.value.push(f2), i2.push(h2));
848
+ case r.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM:
849
+ "number" === f2 && u2.id && (p2[y2.key] || (p2[y2.key] = []), "" !== v2 && p2[y2.key].push(`${u2.id}:${v2}%`));
810
850
  break;
811
- case n.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM:
812
- "number" === p2 && o3.id && (c2[h2.key] || (c2[h2.key] = []), "" !== f2 && c2[h2.key].push(`${o3.id}:${f2}%`));
851
+ case r.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST:
852
+ "hidden" === f2 && (l2[y2.key] || (l2[y2.key] = []), l2[y2.key].push(v2));
813
853
  break;
814
- case n.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST:
815
- "hidden" === p2 && (a2[h2.key] || (a2[h2.key] = []), a2[h2.key].push(f2));
854
+ case r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX:
855
+ e4.checked && (y2.value.push(v2), n2.push(y2));
816
856
  break;
817
- case n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX:
818
- e4.checked && (h2.value.push(f2), i2.push(h2));
857
+ case r.FEEDBACKAPPANSWERTYPE.MAX_DIFF: {
858
+ if ("radio" !== f2 || !h3) break;
859
+ const e5 = y2.key === `${h3.ref}-best` ? "best" : y2.key === `${h3.ref}-worst` ? "worst" : null;
860
+ if (!e5) break;
861
+ m2[h3.ref] || (m2[h3.ref] = { set: null !== (a3 = null === (t4 = h3.assets) || void 0 === t4 ? void 0 : t4.setIndex) && void 0 !== a3 ? a3 : 1, shown: [], best: null, worst: null });
862
+ const i3 = m2[h3.ref];
863
+ "best" === e5 && i3.shown.push(v2), u2.checked && (i3[e5] = v2);
819
864
  break;
820
- case n.FEEDBACKAPPANSWERTYPE.UPLOAD_IMAGE:
821
- case n.FEEDBACKAPPANSWERTYPE.UPLOAD_FILE: {
822
- const e5 = (0, d.getUploadValues)(o3);
823
- e5.length && (h2.value.push(...e5), i2.push(h2));
865
+ }
866
+ case r.FEEDBACKAPPANSWERTYPE.UPLOAD_IMAGE:
867
+ case r.FEEDBACKAPPANSWERTYPE.UPLOAD_FILE: {
868
+ const e5 = (0, d.getUploadValues)(u2);
869
+ e5.length && (y2.value.push(...e5), n2.push(y2));
824
870
  break;
825
871
  }
826
872
  }
827
- })), r2) return [];
828
- Object.entries(l2).forEach((([e4, t4]) => {
829
- t4 && 0 !== t4.length && i2.push({ key: e4, value: t4 });
830
- })), Object.entries(c2).forEach((([e4, t4]) => {
831
- t4 && 0 !== t4.length && i2.push({ key: e4, value: t4 });
832
- })), Object.entries(a2).forEach((([e4, t4]) => {
873
+ })), o2) return [];
874
+ Object.entries(c2).forEach((([e4, t4]) => {
875
+ t4 && 0 !== t4.length && n2.push({ key: e4, value: t4 });
876
+ })), Object.entries(p2).forEach((([e4, t4]) => {
877
+ t4 && 0 !== t4.length && n2.push({ key: e4, value: t4 });
878
+ })), Object.entries(l2).forEach((([e4, t4]) => {
833
879
  if (!t4 || 0 === t4.length) return;
834
- const r3 = t4.slice().sort(((e5, t5) => Number(e5.split(".")[0]) - Number(t5.split(".")[0])));
835
- i2.push({ key: e4, value: r3 });
880
+ const i3 = t4.slice().sort(((e5, t5) => Number(e5.split(".")[0]) - Number(t5.split(".")[0])));
881
+ n2.push({ key: e4, value: i3 });
882
+ })), Object.entries(m2).forEach((([e4, t4]) => {
883
+ (t4.best || t4.worst) && n2.push({ key: e4, value: [JSON.stringify([t4])] });
836
884
  }));
837
885
  try {
838
- t3.questions.filter(((e4) => e4.type === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX)).forEach(((e4) => {
839
- const t4 = e4.ref + "-", r3 = i2.filter(((e5) => e5.key.startsWith(t4)));
840
- if (0 === r3.length) return;
841
- const n2 = r3.map(((e5) => ({ key: e5.key.substring(t4.length), value: e5.value }))), o3 = { key: e4.ref, value: [JSON.stringify(n2)] };
842
- for (const e5 of r3) {
843
- const t5 = i2.findIndex(((t6) => t6.key === e5.key));
844
- -1 !== t5 && i2.splice(t5, 1);
886
+ i2.questions.filter(((e4) => e4.type === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX)).forEach(((e4) => {
887
+ const t4 = e4.ref + "-", i3 = n2.filter(((e5) => e5.key.startsWith(t4)));
888
+ if (0 === i3.length) return;
889
+ const r2 = i3.map(((e5) => ({ key: e5.key.substring(t4.length), value: e5.value }))), o3 = { key: e4.ref, value: [JSON.stringify(r2)] };
890
+ for (const e5 of i3) {
891
+ const t5 = n2.findIndex(((t6) => t6.key === e5.key));
892
+ -1 !== t5 && n2.splice(t5, 1);
845
893
  }
846
- const a3 = i2.findIndex(((t5) => t5.key === e4.ref));
847
- -1 !== a3 ? i2[a3] = o3 : i2.push(o3);
894
+ const a3 = n2.findIndex(((t5) => t5.key === e4.ref));
895
+ -1 !== a3 ? n2[a3] = o3 : n2.push(o3);
848
896
  }));
849
897
  } catch (e4) {
850
898
  this.log.err("Error agrupando MULTI_QUESTION_MATRIX", e4);
851
899
  }
852
- return this.feedback.answers = i2, t3.setAnswer(i2), i2;
900
+ const h2 = this.withEarlierMaxDiffSets((0, v.toBaseAnswers)(n2, i2.questions), i2.questions);
901
+ return this.feedback.answers = h2, i2.setAnswer(h2), h2;
902
+ }
903
+ withEarlierMaxDiffSets(e3, t3) {
904
+ return e3.map(((e4) => {
905
+ if (!t3.some(((t4) => t4.ref === e4.key && t4.type === r.FEEDBACKAPPANSWERTYPE.MAX_DIFF))) return e4;
906
+ const i2 = this.parseMaxDiffAnswer(e4), n2 = [...this.parseMaxDiffAnswer(this.earlierAnswer(e4.key)).filter(((e5) => !i2.some(((t4) => t4.set === e5.set)))), ...i2].sort(((e5, t4) => e5.set - t4.set));
907
+ return Object.assign(Object.assign({}, e4), { value: [JSON.stringify(n2)] });
908
+ }));
909
+ }
910
+ earlierAnswer(e3) {
911
+ var t3, i2;
912
+ for (let n2 = this.history.size() - 2; n2 >= 0; n2--) {
913
+ const r2 = null === (i2 = null === (t3 = this.history.get(n2)) || void 0 === t3 ? void 0 : t3.answers) || void 0 === i2 ? void 0 : i2.find(((t4) => t4.key === e3));
914
+ if (r2) return r2;
915
+ }
853
916
  }
854
917
  finish() {
855
- return r(this, void 0, void 0, (function* () {
918
+ return n(this, void 0, void 0, (function* () {
856
919
  if (this.completed = true, this.timeToCompleted = Date.now() - this.timeToCompleted, this.feedback.metadata.push({ key: "time-to-complete", value: [this.timeToCompleted.toString()] }), this.formOptionsConfig.addSuccessScreen) {
857
920
  const e3 = document.getElementById("magicfeedback-container-" + this.appId);
858
921
  e3.childNodes.length > 0 && e3.removeChild(e3.childNodes[0]);
859
922
  const t3 = (0, l.renderSuccess)(this.formOptionsConfig.successMessage || (0, y.t)(this.lang(), "message.success"));
860
923
  e3.appendChild(t3);
861
924
  }
862
- this.answer();
925
+ this.feedback.answers = [];
863
926
  try {
864
927
  const e3 = yield this.pushAnswers(true);
865
928
  if (!e3) throw this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total, completed: this.completed, error: `An error occurred while submitting the form ${this.appId}:` })), new Error("An error occurred while submitting the form ${this.appId}:");
@@ -870,13 +933,13 @@ var require_magicfeedback_sdk_browser = __commonJS({
870
933
  }));
871
934
  }
872
935
  pushAnswers(e3 = false) {
873
- return r(this, void 0, void 0, (function* () {
936
+ return n(this, void 0, void 0, (function* () {
874
937
  try {
875
938
  if (this.config.get("dryRun")) {
876
939
  const e4 = this.id || `dry-run-${this.appId}-${Date.now()}`;
877
940
  return this.log.log(`Dry run enabled: skipping feedback submit for form ${this.appId}`), e4;
878
941
  }
879
- const t3 = this.config.get("url"), i2 = { integration: this.appId, publicKey: this.publicKey, feedback: this.feedback, completed: e3 };
942
+ const t3 = this.config.get("url"), i2 = { integration: this.appId, publicKey: this.publicKey, feedback: this.feedback, completed: e3, lang: this.lang() };
880
943
  return yield (0, s.sendFeedback)(t3, this.id ? Object.assign(Object.assign({}, i2), { sessionId: this.id }) : i2, this.log);
881
944
  } catch (e4) {
882
945
  return this.log.err(`An error occurred while submitting the form ${this.appId}:`, e4), "";
@@ -884,117 +947,133 @@ var require_magicfeedback_sdk_browser = __commonJS({
884
947
  }));
885
948
  }
886
949
  callFollowUpQuestion(e3) {
887
- var t3;
888
- return r(this, void 0, void 0, (function* () {
950
+ var t3, i2;
951
+ return n(this, void 0, void 0, (function* () {
889
952
  if (!(null == e3 ? void 0 : e3.followup)) return null;
953
+ const n2 = null !== (t3 = this.feedback.answers.find(((t4) => t4.key === e3.ref))) && void 0 !== t3 ? t3 : this.feedback.answers.find(((t4) => t4.key.includes(e3.ref) && !t4.key.includes("extra-option"))), r2 = null === (i2 = null == n2 ? void 0 : n2.value) || void 0 === i2 ? void 0 : i2.find(((e4) => null != e4 && "" !== e4));
954
+ if (void 0 === r2) return this.log.log(`The question ${e3.ref} has no answer, skipping its follow up`), null;
890
955
  try {
891
- if (0 === this.feedback.answers.length) throw new Error("No answers provided");
892
- const i2 = this.config.get("url"), r2 = Object.assign(Object.assign(Object.assign({ answer: null === (t3 = this.feedback.answers.find(((t4) => t4.key === e3.ref))) || void 0 === t3 ? void 0 : t3.value[0] }, "" !== this.publicKey && { publicKey: this.publicKey }), "" === this.publicKey && { campaignSessionId: this.appId }), { sessionId: this.id, question: e3 });
893
- return yield (0, s.getFollowUpQuestion)(i2, r2, this.log);
894
- } catch (e4) {
895
- throw this.log.err(`An error occurred while submitting the form ${this.appId}:`, e4), e4;
956
+ const t4 = this.config.get("url"), i3 = Object.assign(Object.assign(Object.assign({ answer: r2 }, "" !== this.publicKey && { publicKey: this.publicKey }), "" === this.publicKey && { campaignSessionId: this.appId }), { sessionId: this.id, question: e3 });
957
+ return yield (0, s.getFollowUpQuestion)(t4, i3, this.log);
958
+ } catch (t4) {
959
+ return this.log.err(`An error occurred while requesting the follow up of ${e3.ref} in the form ${this.appId}:`, t4), null;
896
960
  }
897
961
  }));
898
962
  }
899
963
  processNextQuestion(e3) {
900
- var t3, i2, n2;
901
- return r(this, void 0, void 0, (function* () {
902
- const r2 = this.history.back();
903
- if (!r2) throw new Error("No page found");
904
- const o2 = r2.getFollowupQuestions();
905
- if (0 === (null == o2 ? void 0 : o2.length)) return void (yield this.renderNextQuestion(e3, r2));
906
- const a2 = [];
907
- for (const e4 of o2) {
908
- const t4 = r2.questions.find(((t5) => t5.ref === e4));
964
+ var t3, i2;
965
+ return n(this, void 0, void 0, (function* () {
966
+ const n2 = this.history.back();
967
+ if (!n2) throw new Error("No page found");
968
+ const r2 = n2.isFollowup ? [] : n2.getFollowupQuestions();
969
+ if (0 === (null == r2 ? void 0 : r2.length)) return void (yield this.renderNextQuestion(e3, n2));
970
+ const o2 = [];
971
+ for (const e4 of r2) {
972
+ const t4 = n2.questions.find(((t5) => t5.ref === e4));
909
973
  if (t4) {
910
974
  const e5 = yield this.callFollowUpQuestion(t4);
911
- e5 && a2.push(e5);
975
+ e5 && o2.push(e5);
912
976
  }
913
977
  }
914
- if (0 === a2.length) return void (yield this.renderNextQuestion(e3, r2));
915
- const s2 = new m.Page(r2.id, r2.position, this.appId, a2, r2.edges), d2 = new g.PageNode(r2.id, r2.position, r2.edges, s2, a2, true);
916
- d2.elements = (0, l.renderQuestions)(a2, this.formOptionsConfig.questionFormat, null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.lang[0], null === (i2 = this.formData) || void 0 === i2 ? void 0 : i2.product, (() => this.send())), this.history.enqueue(d2), this.progress += 0.5, e3.innerHTML = "", null === (n2 = d2.elements) || void 0 === n2 || n2.forEach(((t4) => e3.appendChild(t4))), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.id, loading: false, progress: this.progress, total: this.total, followup: d2.isFollowup, completed: this.completed, error: null }));
978
+ if (0 === o2.length) return void (yield this.renderNextQuestion(e3, n2));
979
+ const a2 = new m.Page(n2.id, n2.position, this.appId, o2, n2.edges), s2 = new g.PageNode(n2.id, n2.position, n2.edges, a2, o2, true);
980
+ s2.origin = n2.isFollowup && n2.origin ? n2.origin : n2, s2.elements = (0, l.renderQuestions)(o2, this.formOptionsConfig.questionFormat, this.lang(), null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.product, (() => this.autoSend())), this.history.enqueue(s2), this.syncBackButton(), this.progress += 0.5, e3.innerHTML = "", null === (i2 = s2.elements) || void 0 === i2 || i2.forEach(((t4) => e3.appendChild(t4))), (0, b.armGhostTapGuard)(e3), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.id, loading: false, progress: this.progress, total: this.total, followup: s2.isFollowup, completed: this.completed, error: null })), this.autofocusAfterRender("navigation");
917
981
  }));
918
982
  }
919
983
  renderNextQuestion(e3, t3) {
920
984
  var i2, o2, a2, s2, d2;
921
- return r(this, void 0, void 0, (function* () {
922
- let r2 = this.graph.getNextPage(t3, this.feedback.answers);
923
- if (!r2) return void this.finish();
924
- const c2 = r2.edges.filter(((e4) => "PRECONDITIONAL" === e4.typeCondition)).sort(((e4, t4) => e4.position < t4.position ? -1 : e4.position > t4.position ? 1 : 0));
925
- if ((null == c2 ? void 0 : c2.length) > 0) {
926
- const t4 = c2.some(((e4) => e4.transition === h.TransitionType.ALLOW));
927
- let a3 = t4;
928
- for (const t5 of c2) {
929
- let s3;
985
+ return n(this, void 0, void 0, (function* () {
986
+ const n2 = t3.isFollowup && t3.origin ? t3.origin : t3, c2 = n2 === t3 ? this.feedback.answers : [...null !== (i2 = n2.answers) && void 0 !== i2 ? i2 : [], ...this.feedback.answers];
987
+ let u2 = this.graph.getNextPage(n2, c2);
988
+ if (!u2) return void this.finish();
989
+ const p2 = u2.edges.filter(((e4) => "PRECONDITIONAL" === e4.typeCondition)).sort(((e4, t4) => e4.position < t4.position ? -1 : e4.position > t4.position ? 1 : 0));
990
+ if ((null == p2 ? void 0 : p2.length) > 0) {
991
+ const t4 = p2.some(((e4) => e4.transition === h.TransitionType.ALLOW));
992
+ let i3 = t4;
993
+ for (const t5 of p2) {
994
+ let n3;
930
995
  for (let e4 = this.history.size() - 1; e4 >= 0; e4--) {
931
- const r3 = this.history.get(e4);
932
- if (r3 && (s3 = null === (i2 = r3.answers) || void 0 === i2 ? void 0 : i2.find(((e5) => e5.key === t5.questionRef)), s3)) break;
996
+ const i4 = this.history.get(e4);
997
+ if (i4 && (n3 = null === (o2 = i4.answers) || void 0 === o2 ? void 0 : o2.find(((e5) => e5.key === t5.questionRef)), n3)) break;
933
998
  }
934
- let l2 = false;
935
- if (s3) {
936
- const e4 = null === (o2 = this.formData) || void 0 === o2 ? void 0 : o2.questions.find(((e5) => e5.ref === t5.questionRef)), i3 = Array.isArray(s3.value) ? s3.value : [s3.value], r3 = Array.isArray(t5.value) ? t5.value : [t5.value];
937
- if ((null == e4 ? void 0 : e4.type) === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) l2 = this.evaluateMatrixPreconditional(t5, s3);
999
+ let s3 = false;
1000
+ if (n3) {
1001
+ const e4 = null === (a2 = this.formData) || void 0 === a2 ? void 0 : a2.questions.find(((e5) => e5.ref === t5.questionRef)), i4 = Array.isArray(n3.value) ? n3.value : [n3.value], o3 = Array.isArray(t5.value) ? t5.value : [t5.value];
1002
+ if ((null == e4 ? void 0 : e4.type) === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) s3 = this.evaluateMatrixPreconditional(t5, n3);
938
1003
  else switch (t5.typeOperator) {
939
1004
  case "EQUAL":
940
1005
  case "INQ":
941
- l2 = i3.some(((e5) => r3.includes(e5)));
1006
+ s3 = i4.some(((e5) => o3.includes(e5)));
942
1007
  break;
943
1008
  case "NOEQUAL":
944
1009
  case "NINQ":
945
- l2 = i3.every(((e5) => !r3.includes(e5)));
1010
+ s3 = i4.every(((e5) => !o3.includes(e5)));
946
1011
  break;
947
1012
  case "GREATER":
948
- l2 = i3.some(((e5) => Number(e5) > Number(r3[0])));
1013
+ s3 = i4.some(((e5) => Number(e5) > Number(o3[0])));
949
1014
  break;
950
1015
  case "LESS":
951
- l2 = i3.some(((e5) => Number(e5) < Number(r3[0])));
1016
+ s3 = i4.some(((e5) => Number(e5) < Number(o3[0])));
952
1017
  break;
953
1018
  case "GREATEREQUAL":
954
- l2 = i3.some(((e5) => Number(e5) >= Number(r3[0])));
1019
+ s3 = i4.some(((e5) => Number(e5) >= Number(o3[0])));
955
1020
  break;
956
1021
  case "LESSEQUAL":
957
- l2 = i3.some(((e5) => Number(e5) <= Number(r3[0])));
1022
+ s3 = i4.some(((e5) => Number(e5) <= Number(o3[0])));
958
1023
  }
959
1024
  }
960
- if (t5.transition === h.TransitionType.ALLOW) l2 || (a3 = false);
961
- else if (t5.transition === h.TransitionType.NEXT && l2) return this.feedback.answers = [], void (r2 && (yield this.renderNextQuestion(e3, r2)));
1025
+ if (t5.transition === h.TransitionType.ALLOW) s3 || (i3 = false);
1026
+ else if (t5.transition === h.TransitionType.NEXT && s3) return this.feedback.answers = [], void (u2 && (yield this.renderNextQuestion(e3, u2)));
962
1027
  }
963
- if (t4 && !a3) return this.feedback.answers = [], void (r2 && (yield this.renderNextQuestion(e3, r2)));
1028
+ if (t4 && !i3) return this.feedback.answers = [], void (u2 && (yield this.renderNextQuestion(e3, u2)));
964
1029
  }
965
- r2.elements = (0, l.renderQuestions)(r2.questions, this.formOptionsConfig.questionFormat, null === (a2 = this.formData) || void 0 === a2 ? void 0 : a2.lang[0], null === (s2 = this.formData) || void 0 === s2 ? void 0 : s2.product, (() => this.send())), e3.innerHTML = "", null === (d2 = r2.elements) || void 0 === d2 || d2.forEach(((t4) => e3.appendChild(t4))), this.history.enqueue(r2), this.progress = this.total - this.graph.findMaxDepth(r2), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.id, loading: false, progress: this.progress, total: this.total, followup: r2.isFollowup, completed: this.completed, error: null }));
1030
+ u2.elements = (0, l.renderQuestions)(u2.questions, this.formOptionsConfig.questionFormat, this.lang(), null === (s2 = this.formData) || void 0 === s2 ? void 0 : s2.product, (() => this.autoSend())), e3.innerHTML = "", null === (d2 = u2.elements) || void 0 === d2 || d2.forEach(((t4) => e3.appendChild(t4))), (0, b.armGhostTapGuard)(e3), this.history.enqueue(u2), this.syncBackButton(), this.progress = this.total - this.graph.findMaxDepth(u2), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.id, loading: false, progress: this.progress, total: this.total, followup: u2.isFollowup, completed: this.completed, error: null })), this.autofocusAfterRender("navigation");
966
1031
  }));
967
1032
  }
1033
+ syncBackButton() {
1034
+ const e3 = document.getElementById("magicfeedback-" + this.appId), t3 = null == e3 ? void 0 : e3.querySelector(".magicfeedback-back");
1035
+ t3 && (t3.hidden = this.history.size() <= 1);
1036
+ }
968
1037
  back() {
969
1038
  var e3;
970
- return r(this, void 0, void 0, (function* () {
971
- if (0 === this.history.size()) return;
1039
+ return n(this, void 0, void 0, (function* () {
1040
+ if (this.history.size() <= 1) return;
972
1041
  const t3 = document.getElementById("magicfeedback-questions-" + this.appId);
973
- t3 && t3.childNodes.length > 0 && (t3.innerHTML = ""), this.history.rollback();
1042
+ (0, A.cancelAutoAdvance)(t3), t3 && t3.childNodes.length > 0 && (t3.innerHTML = ""), this.history.rollback(), this.syncBackButton();
974
1043
  const i2 = this.history.back();
975
- i2 ? (null === (e3 = i2.elements) || void 0 === e3 || e3.forEach(((e4) => t3.appendChild(e4))), this.progress = this.total - this.graph.findMaxDepth(i2)) : this.progress = this.history.size(), this.formOptionsConfig.onBackEvent && (yield this.formOptionsConfig.onBackEvent({ loading: false, progress: this.progress, followup: (null == i2 ? void 0 : i2.isFollowup) || false, error: i2 ? null : "No page found" }));
1044
+ i2 ? (null === (e3 = i2.elements) || void 0 === e3 || e3.forEach(((e4) => t3.appendChild(e4))), (0, b.armGhostTapGuard)(t3), this.progress = this.total - this.graph.findMaxDepth(i2)) : this.progress = this.history.size(), this.formOptionsConfig.onBackEvent && (yield this.formOptionsConfig.onBackEvent({ loading: false, progress: this.progress, followup: (null == i2 ? void 0 : i2.isFollowup) || false, error: i2 ? null : "No page found" })), i2 && this.autofocusAfterRender("navigation");
976
1045
  }));
977
1046
  }
978
1047
  previewQuestion(e3, t3, i2) {
979
- var r2, n2, o2;
980
- const a2 = Array.isArray(t3) ? t3 : [t3];
981
- if (!a2 || 0 === a2.length) throw new Error("[MagicFeedback] No question provided for preview");
982
- const s2 = document.getElementById(e3);
983
- if (!s2) throw new Error(`[MagicFeedback] Element with ID '${e3}' not found.`);
984
- const { format: d2 = this.formOptionsConfig.questionFormat || "standard", language: u2 = (null === (r2 = this.formData) || void 0 === r2 ? void 0 : r2.lang) && this.formData.lang[0] || "en", product: p2 = (null === (n2 = this.formData) || void 0 === n2 ? void 0 : n2.product) || { customIcons: false }, style: m2 = (null === (o2 = this.formData) || void 0 === o2 ? void 0 : o2.style) || {}, clearContainer: h2 = true, wrap: f2 = true } = i2 || {};
985
- h2 && (s2.innerHTML = ""), (null == m2 ? void 0 : m2.primaryColor) && (0, c.applyPrimaryColor)(s2, m2.primaryColor), (0, c.applyDirection)(s2, u2);
986
- let g2 = [];
1048
+ var n2, r2;
1049
+ const o2 = Array.isArray(t3) ? t3 : [t3];
1050
+ if (!o2 || 0 === o2.length) throw new Error("[MagicFeedback] No question provided for preview");
1051
+ const a2 = document.getElementById(e3);
1052
+ if (!a2) throw new Error(`[MagicFeedback] Element with ID '${e3}' not found.`);
1053
+ const { format: s2 = this.formOptionsConfig.questionFormat || "standard", language: d2 = this.lang(), product: u2 = (null === (n2 = this.formData) || void 0 === n2 ? void 0 : n2.product) || { customIcons: false }, style: p2 = (null === (r2 = this.formData) || void 0 === r2 ? void 0 : r2.style) || {}, clearContainer: m2 = true, wrap: h2 = true } = i2 || {};
1054
+ m2 && (a2.innerHTML = ""), (null == p2 ? void 0 : p2.primaryColor) && (0, c.applyPrimaryColor)(a2, p2.primaryColor), (0, c.applyDirection)(a2, d2);
1055
+ let f2 = [];
987
1056
  try {
988
- g2 = (0, l.renderQuestions)(a2, d2, u2, p2);
1057
+ f2 = (0, l.renderQuestions)(o2, s2, d2, u2);
989
1058
  } catch (e4) {
990
1059
  throw this.log.err(e4), e4;
991
1060
  }
992
- let y2 = s2;
993
- if (f2) {
1061
+ let g2 = a2;
1062
+ if (h2) {
994
1063
  const e4 = document.createElement("div");
995
- e4.classList.add("magicfeedback-preview-question"), y2.appendChild(e4), y2 = e4;
1064
+ e4.classList.add("magicfeedback-preview-question"), g2.appendChild(e4), g2 = e4;
1065
+ }
1066
+ return f2.forEach(((e4) => g2.appendChild(e4))), a2;
1067
+ }
1068
+ parseMaxDiffAnswer(e3) {
1069
+ var t3;
1070
+ if (!e3 || "string" != typeof (null === (t3 = e3.value) || void 0 === t3 ? void 0 : t3[0])) return [];
1071
+ try {
1072
+ const t4 = JSON.parse(e3.value[0]);
1073
+ return Array.isArray(t4) ? t4 : [];
1074
+ } catch (e4) {
1075
+ return [];
996
1076
  }
997
- return g2.forEach(((e4) => y2.appendChild(e4))), s2;
998
1077
  }
999
1078
  parseMatrixAnswerPre(e3) {
1000
1079
  if (!e3 || !e3.value) return [];
@@ -1007,9 +1086,9 @@ var require_magicfeedback_sdk_browser = __commonJS({
1007
1086
  return Array.isArray(e3.value) && e3.value.length > 0 && "object" == typeof e3.value[0] && null !== e3.value[0] && "key" in e3.value[0] ? e3.value : [];
1008
1087
  }
1009
1088
  evaluateMatrixPreconditional(e3, t3) {
1010
- const i2 = Array.isArray(e3.value) ? e3.value : [e3.value], r2 = new Set(e3.option || []), n2 = this.parseMatrixAnswerPre(t3);
1011
- if (!n2.length) return false;
1012
- const o2 = r2.size > 0 ? n2.filter(((e4) => r2.has(e4.key))) : n2;
1089
+ const i2 = Array.isArray(e3.value) ? e3.value : [e3.value], n2 = new Set(e3.option || []), r2 = this.parseMatrixAnswerPre(t3);
1090
+ if (!r2.length) return false;
1091
+ const o2 = n2.size > 0 ? r2.filter(((e4) => n2.has(e4.key))) : r2;
1013
1092
  if (!o2.length) return false;
1014
1093
  switch (e3.typeOperator) {
1015
1094
  case "EQUAL":
@@ -1031,17 +1110,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
1031
1110
  }
1032
1111
  }
1033
1112
  };
1034
- }, 700: (e2, t2) => {
1113
+ }, 198: (e2, t2) => {
1035
1114
  "use strict";
1036
1115
  Object.defineProperty(t2, "__esModule", { value: true }), t2.Page = void 0, t2.Page = class {
1037
- constructor(e3, t3, i, r, n) {
1038
- this.id = e3, this.position = t3, this.generatedAt = (/* @__PURE__ */ new Date()).toISOString(), this.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), this.status = "ACTIVE", this.integrationId = i, this.integrationQuestions = r, this.integrationPageRoutes = n;
1116
+ constructor(e3, t3, i, n, r) {
1117
+ this.id = e3, this.position = t3, this.generatedAt = (/* @__PURE__ */ new Date()).toISOString(), this.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), this.status = "ACTIVE", this.integrationId = i, this.integrationQuestions = n, this.integrationPageRoutes = r;
1039
1118
  }
1040
1119
  };
1041
- }, 989: (e2, t2, i) => {
1120
+ }, 2531: (e2, t2, i) => {
1042
1121
  "use strict";
1043
1122
  Object.defineProperty(t2, "__esModule", { value: true }), t2.PageGraph = void 0;
1044
- const r = i(636), n = i(558), o = i(591);
1123
+ const n = i(1814), r = i(1140), o = i(4245);
1045
1124
  t2.PageGraph = class {
1046
1125
  constructor(e3) {
1047
1126
  this.nodes = /* @__PURE__ */ new Map(), this.buildGraph(e3);
@@ -1050,10 +1129,10 @@ var require_magicfeedback_sdk_browser = __commonJS({
1050
1129
  e3.forEach(((e4) => {
1051
1130
  var t3;
1052
1131
  e4.integrationPageRoutes && (e4.integrationPageRoutes = (null === (t3 = e4.integrationPageRoutes) || void 0 === t3 ? void 0 : t3.sort(((e5, t4) => {
1053
- const i3 = new Date((null == e5 ? void 0 : e5.generatedAt) || 0).getTime(), r2 = new Date((null == t4 ? void 0 : t4.generatedAt) || 0).getTime();
1054
- return i3 !== r2 ? i3 - r2 : "DIRECT" === e5.typeCondition && "DIRECT" !== t4.typeCondition ? 1 : "DIRECT" !== e5.typeCondition && "DIRECT" === t4.typeCondition ? -1 : 0;
1132
+ const i3 = new Date((null == e5 ? void 0 : e5.generatedAt) || 0).getTime(), n2 = new Date((null == t4 ? void 0 : t4.generatedAt) || 0).getTime();
1133
+ return i3 !== n2 ? i3 - n2 : "DIRECT" === e5.typeCondition && "DIRECT" !== t4.typeCondition ? 1 : "DIRECT" !== e5.typeCondition && "DIRECT" === t4.typeCondition ? -1 : 0;
1055
1134
  }))) || []);
1056
- const i2 = new r.PageNode(e4.id, e4.position, e4.integrationPageRoutes || [], e4, e4.integrationQuestions);
1135
+ const i2 = new n.PageNode(e4.id, e4.position, e4.integrationPageRoutes || [], e4, e4.integrationQuestions);
1057
1136
  this.nodes.set(i2.id, i2);
1058
1137
  }));
1059
1138
  }
@@ -1077,11 +1156,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
1077
1156
  var i2;
1078
1157
  if (!e3) return;
1079
1158
  e3.edges.sort(((e4, t4) => "DIRECT" === e4.typeCondition ? 1 : "DIRECT" === t4.typeCondition ? -1 : 0));
1080
- const r2 = e3.edges.find(((i3) => {
1081
- const r3 = e3.questions.find(((e4) => e4.ref === i3.questionRef)), a = null == t3 ? void 0 : t3.filter(((e4) => e4.key === i3.questionRef));
1159
+ const n2 = e3.edges.find(((i3) => {
1160
+ const n3 = e3.questions.find(((e4) => e4.ref === i3.questionRef)), a = null == t3 ? void 0 : t3.filter(((e4) => e4.key === i3.questionRef));
1082
1161
  if ("DIRECT" === i3.typeCondition) return true;
1083
1162
  if (!a || 0 === a.length) return false;
1084
- if ((null == r3 ? void 0 : r3.type) === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) return this.evaluateMatrixCondition(i3, a);
1163
+ if ((null == n3 ? void 0 : n3.type) === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) return this.evaluateMatrixCondition(i3, a);
1085
1164
  const s = Array.isArray(i3.value) ? i3.value : [i3.value];
1086
1165
  switch (i3.typeOperator) {
1087
1166
  case o.OperatorType.EQUAL:
@@ -1104,19 +1183,19 @@ var require_magicfeedback_sdk_browser = __commonJS({
1104
1183
  return false;
1105
1184
  }
1106
1185
  }));
1107
- if (!r2) {
1186
+ if (!n2) {
1108
1187
  const t4 = this.getNextEdgeByDefault(e3);
1109
1188
  if (!t4) return;
1110
1189
  return this.getNodeById(t4);
1111
1190
  }
1112
- switch (r2.transition) {
1191
+ switch (n2.transition) {
1113
1192
  case o.TransitionType.PAGE:
1114
- if (!r2.transitionDestiny) return;
1115
- return this.getNodeById(r2.transitionDestiny);
1193
+ if (!n2.transitionDestiny) return;
1194
+ return this.getNodeById(n2.transitionDestiny);
1116
1195
  case o.TransitionType.FINISH:
1117
1196
  return;
1118
1197
  case o.TransitionType.REDIRECT:
1119
- return void (window.location.href = (null === (i2 = r2.transitionDestiny) || void 0 === i2 ? void 0 : i2.includes("?")) ? `${r2.transitionDestiny}&${window.location.search.slice(1)}` : `${r2.transitionDestiny}${window.location.search}`);
1198
+ return void (window.location.href = (null === (i2 = n2.transitionDestiny) || void 0 === i2 ? void 0 : i2.includes("?")) ? `${n2.transitionDestiny}&${window.location.search.slice(1)}` : `${n2.transitionDestiny}${window.location.search}`);
1120
1199
  default:
1121
1200
  return;
1122
1201
  }
@@ -1135,21 +1214,21 @@ var require_magicfeedback_sdk_browser = __commonJS({
1135
1214
  }
1136
1215
  DFSUtil(e3, t3, i2) {
1137
1216
  t3.add(e3);
1138
- let r2 = i2;
1139
- const n2 = [...e3.edges.filter(((e4) => e4.typeCondition !== o.ConditionType.PRECONDITIONAL)) || []], a = this.getNextEdgeByDefault(e3);
1217
+ let n2 = i2;
1218
+ const r2 = [...e3.edges.filter(((e4) => e4.typeCondition !== o.ConditionType.PRECONDITIONAL)) || []], a = this.getNextEdgeByDefault(e3);
1140
1219
  if (a) {
1141
1220
  const i3 = this.getNodeById(a);
1142
- i3 && !t3.has(i3) && n2.push(new o.PageRoute(i3.id, "", o.OperatorType.DEFAULT, [""], o.TransitionType.PAGE, i3.id, e3.id));
1221
+ i3 && !t3.has(i3) && r2.push(new o.PageRoute(i3.id, "", o.OperatorType.DEFAULT, [""], o.TransitionType.PAGE, i3.id, e3.id));
1143
1222
  }
1144
- for (const e4 of n2) {
1223
+ for (const e4 of r2) {
1145
1224
  if (!e4.transitionDestiny) continue;
1146
- const n3 = this.getNodeById(e4.transitionDestiny);
1147
- if (n3 && !t3.has(n3)) {
1148
- const e5 = i2 + 1, o2 = new Set(t3), a2 = this.DFSUtil(n3, o2, e5);
1149
- r2 = Math.max(r2, a2);
1225
+ const r3 = this.getNodeById(e4.transitionDestiny);
1226
+ if (r3 && !t3.has(r3)) {
1227
+ const e5 = i2 + 1, o2 = new Set(t3), a2 = this.DFSUtil(r3, o2, e5);
1228
+ n2 = Math.max(n2, a2);
1150
1229
  }
1151
1230
  }
1152
- return r2;
1231
+ return n2;
1153
1232
  }
1154
1233
  parseMatrixAnswer(e3) {
1155
1234
  if (!e3 || !e3.value) return [];
@@ -1162,9 +1241,9 @@ var require_magicfeedback_sdk_browser = __commonJS({
1162
1241
  return Array.isArray(e3.value) && e3.value.length > 0 && "object" == typeof e3.value[0] && null !== e3.value[0] && "key" in e3.value[0] ? e3.value : [];
1163
1242
  }
1164
1243
  evaluateMatrixCondition(e3, t3) {
1165
- const i2 = Array.isArray(e3.value) ? e3.value : [e3.value], r2 = new Set(e3.option || []), n2 = t3[0], a = this.parseMatrixAnswer(n2);
1244
+ const i2 = Array.isArray(e3.value) ? e3.value : [e3.value], n2 = new Set(e3.option || []), r2 = t3[0], a = this.parseMatrixAnswer(r2);
1166
1245
  if (!a.length) return false;
1167
- const s = r2.size > 0 ? a.filter(((e4) => r2.has(e4.key))) : a;
1246
+ const s = n2.size > 0 ? a.filter(((e4) => n2.has(e4.key))) : a;
1168
1247
  if (!s.length) return false;
1169
1248
  switch (e3.typeOperator) {
1170
1249
  case o.OperatorType.EQUAL:
@@ -1186,11 +1265,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
1186
1265
  }
1187
1266
  }
1188
1267
  };
1189
- }, 636: (e2, t2) => {
1268
+ }, 1814: (e2, t2) => {
1190
1269
  "use strict";
1191
1270
  Object.defineProperty(t2, "__esModule", { value: true }), t2.PageNode = void 0, t2.PageNode = class {
1192
- constructor(e3, t3, i, r, n, o = false) {
1193
- this.answers = [], this.id = e3, this.position = t3, this.edges = i, this.data = r, this.questions = n.sort(((e4, t4) => e4.position - t4.position)), this.elements = [], this.isFollowup = o;
1271
+ constructor(e3, t3, i, n, r, o = false) {
1272
+ this.answers = [], this.id = e3, this.position = t3, this.edges = i, this.data = n, this.questions = r.sort(((e4, t4) => e4.position - t4.position)), this.elements = [], this.isFollowup = o;
1194
1273
  }
1195
1274
  getFollowupQuestions() {
1196
1275
  return this.questions.filter(((e3) => e3.followup)).map(((e3) => e3.ref));
@@ -1202,29 +1281,29 @@ var require_magicfeedback_sdk_browser = __commonJS({
1202
1281
  this.answers = e3;
1203
1282
  }
1204
1283
  };
1205
- }, 591: (e2, t2) => {
1284
+ }, 4245: (e2, t2) => {
1206
1285
  "use strict";
1207
- var i, r, n, o;
1286
+ var i, n, r, o;
1208
1287
  Object.defineProperty(t2, "__esModule", { value: true }), t2.PageRoute = t2.StatusType = t2.OperatorType = t2.ConditionType = t2.TransitionType = void 0, (o = t2.TransitionType || (t2.TransitionType = {})).PAGE = "PAGE", o.FINISH = "FINISH", o.REDIRECT = "REDIRECT", o.NEXT = "NEXT", o.ALLOW = "ALLOW", (function(e3) {
1209
1288
  e3.LOGICAL = "LOGICAL", e3.DIRECT = "DIRECT", e3.PRECONDITIONAL = "PRECONDITIONAL";
1210
- })(i = t2.ConditionType || (t2.ConditionType = {})), (n = t2.OperatorType || (t2.OperatorType = {})).EQUAL = "EQUAL", n.NOEQUAL = "NOEQUAL", n.GREATER = "GREATER", n.LESS = "LESS", n.GREATEREQUAL = "GREATEREQUAL", n.LESSEQUAL = "LESSEQUAL", n.INQ = "INQ", n.NINQ = "NINQ", n.DEFAULT = "DEFAULT", (function(e3) {
1289
+ })(i = t2.ConditionType || (t2.ConditionType = {})), (r = t2.OperatorType || (t2.OperatorType = {})).EQUAL = "EQUAL", r.NOEQUAL = "NOEQUAL", r.GREATER = "GREATER", r.LESS = "LESS", r.GREATEREQUAL = "GREATEREQUAL", r.LESSEQUAL = "LESSEQUAL", r.INQ = "INQ", r.NINQ = "NINQ", r.DEFAULT = "DEFAULT", (function(e3) {
1211
1290
  e3.ACTIVE = "ACTIVE", e3.DEPRECATED = "DEPRECATED", e3.DELETE = "DELETE";
1212
- })(r = t2.StatusType || (t2.StatusType = {})), t2.PageRoute = class {
1213
- constructor(e3, t3, n2, o2, a, s, l, d, c, u) {
1214
- this.id = e3, this.questionRef = t3, this.typeCondition = d || i.LOGICAL, this.typeOperator = n2, this.value = o2 || [], this.transition = a, this.transitionDestiny = s, this.status = r.ACTIVE, this.generatedAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.integrationPageId = l, this.position = c || 0, this.option = u || [];
1291
+ })(n = t2.StatusType || (t2.StatusType = {})), t2.PageRoute = class {
1292
+ constructor(e3, t3, r2, o2, a, s, l, d, c, u) {
1293
+ this.id = e3, this.questionRef = t3, this.typeCondition = d || i.LOGICAL, this.typeOperator = r2, this.value = o2 || [], this.transition = a, this.transitionDestiny = s, this.status = n.ACTIVE, this.generatedAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.integrationPageId = l, this.position = c || 0, this.option = u || [];
1215
1294
  }
1216
1295
  };
1217
- }, 558: (e2, t2) => {
1296
+ }, 1140: (e2, t2) => {
1218
1297
  "use strict";
1219
- var i, r;
1220
- Object.defineProperty(t2, "__esModule", { value: true }), t2.AGENT_ANSWER_TYPE_BLOCKED = t2.QuestionType = t2.FEEDBACKAPPANSWERTYPE = void 0, (r = t2.FEEDBACKAPPANSWERTYPE || (t2.FEEDBACKAPPANSWERTYPE = {})).CONTACT = "CONTACT", r.MULTIPLECHOISE_IMAGE = "MULTIPLECHOISE_IMAGE", r.EMAIL = "EMAIL", r.RATING_STAR = "RATING_STAR", r.RADIO = "RADIO", r.MULTIPLECHOICE = "MULTIPLECHOICE", r.SELECT = "SELECT", r.TEXT = "TEXT", r.LONGTEXT = "LONGTEXT", r.NUMBER = "NUMBER", r.RATING_EMOJI = "RATING_EMOJI", r.RATING_NUMBER = "RATING_NUMBER", r.DATE = "DATE", r.BOOLEAN = "BOOLEAN", r.PASSWORD = "PASSWORD", r.CONSENT = "CONSENT", r.MULTI_QUESTION_MATRIX = "MULTI_QUESTION_MATRIX", r.POINT_SYSTEM = "POINT_SYSTEM", r.PRIORITY_LIST = "PRIORITY_LIST", r.INFO_PAGE = "INFO_PAGE", r.UPLOAD_FILE = "UPLOAD_FILE", r.UPLOAD_IMAGE = "UPLOAD_IMAGE", t2.QuestionType = class {
1298
+ var i, n;
1299
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.AGENT_ANSWER_TYPE_BLOCKED = t2.QuestionType = t2.FEEDBACKAPPANSWERTYPE = void 0, (n = t2.FEEDBACKAPPANSWERTYPE || (t2.FEEDBACKAPPANSWERTYPE = {})).CONTACT = "CONTACT", n.MULTIPLECHOISE_IMAGE = "MULTIPLECHOISE_IMAGE", n.EMAIL = "EMAIL", n.RATING_STAR = "RATING_STAR", n.RADIO = "RADIO", n.MULTIPLECHOICE = "MULTIPLECHOICE", n.SELECT = "SELECT", n.TEXT = "TEXT", n.LONGTEXT = "LONGTEXT", n.NUMBER = "NUMBER", n.RATING_EMOJI = "RATING_EMOJI", n.RATING_NUMBER = "RATING_NUMBER", n.DATE = "DATE", n.BOOLEAN = "BOOLEAN", n.PASSWORD = "PASSWORD", n.CONSENT = "CONSENT", n.MULTI_QUESTION_MATRIX = "MULTI_QUESTION_MATRIX", n.POINT_SYSTEM = "POINT_SYSTEM", n.PRIORITY_LIST = "PRIORITY_LIST", n.INFO_PAGE = "INFO_PAGE", n.UPLOAD_FILE = "UPLOAD_FILE", n.UPLOAD_IMAGE = "UPLOAD_IMAGE", n.MAX_DIFF = "MAX_DIFF", t2.QuestionType = class {
1221
1300
  }, t2.AGENT_ANSWER_TYPE_BLOCKED = "ABUSIVE_OR_OFFENSIVE", (function(e3) {
1222
1301
  e3.FORM = "form", e3.DIV = "div";
1223
1302
  })(i || (i = {}));
1224
- }, 565: (e2, t2, i) => {
1303
+ }, 459: (e2, t2, i) => {
1225
1304
  "use strict";
1226
1305
  Object.defineProperty(t2, "__esModule", { value: true }), t2.applyDirection = t2.applyPrimaryColor = t2.generateContainer = void 0;
1227
- const r = i(881);
1306
+ const n = i(7031);
1228
1307
  t2.generateContainer = function(e3, t3) {
1229
1308
  let i2 = document.getElementById(e3);
1230
1309
  if (!i2 && (i2 = document.getElementById("magicfeedback-container-" + t3), !i2)) throw new Error(`Element with ID '${e3}' not found.`);
@@ -1232,225 +1311,254 @@ var require_magicfeedback_sdk_browser = __commonJS({
1232
1311
  }, t2.applyPrimaryColor = function(e3, t3) {
1233
1312
  e3.style.setProperty("--mf-primary", t3), e3.style.setProperty("--mf-primary-hover", `color-mix(in srgb, ${t3} 85%, black)`), e3.style.setProperty("--mf-primary-light", `color-mix(in srgb, ${t3} 15%, white)`), e3.style.setProperty("--mf-primary-border", `color-mix(in srgb, ${t3} 35%, transparent)`), e3.style.setProperty("--mf-border-focus", t3);
1234
1313
  }, t2.applyDirection = function(e3, t3) {
1235
- const i2 = (0, r.isRtlLanguage)(t3);
1314
+ const i2 = (0, n.isRtlLanguage)(t3);
1236
1315
  e3.setAttribute("dir", i2 ? "rtl" : "ltr"), e3.classList.toggle("magicfeedback-rtl", i2);
1237
1316
  };
1238
- }, 516: (e2, t2, i) => {
1317
+ }, 6658: (e2, t2, i) => {
1239
1318
  "use strict";
1240
1319
  Object.defineProperty(t2, "__esModule", { value: true }), t2.getUrlParam = t2.getBooleanOptions = t2.parseTitle = void 0;
1241
- const r = i(881);
1320
+ const n = i(7031);
1242
1321
  t2.parseTitle = function(e3, t3) {
1243
1322
  return e3 ? "object" == typeof e3 ? e3[t3] || e3.en : e3 : "";
1244
1323
  }, t2.getBooleanOptions = function(e3) {
1245
- return [(0, r.t)(e3, "boolean.yes"), (0, r.t)(e3, "boolean.no")];
1324
+ return [(0, n.t)(e3, "boolean.yes"), (0, n.t)(e3, "boolean.no")];
1246
1325
  }, t2.getUrlParam = function(e3) {
1247
1326
  return new URLSearchParams(window.location.search).get(e3);
1248
1327
  };
1249
- }, 559: (e2, t2, i) => {
1328
+ }, 1433: (e2, t2, i) => {
1250
1329
  "use strict";
1251
- Object.defineProperty(t2, "__esModule", { value: true }), t2.createRatingNumberElement = t2.createStarRating = t2.createRatingPlaceholder = void 0;
1252
- const r = i(881);
1253
- function n(e3, t3, i2 = "ltr") {
1254
- const r2 = document.createElement("div");
1255
- r2.classList.add("magicfeedback-rating-placeholder");
1256
- const n2 = document.createElement("span");
1257
- n2.textContent = null != e3 ? e3 : "", n2.classList.add("magicfeedback-rating-placeholder-value");
1258
- const o = document.createElement("span");
1259
- return o.textContent = null != t3 ? t3 : "", o.classList.add("magicfeedback-rating-placeholder-value"), "ltr" === i2 ? (e3 && r2.appendChild(n2), t3 && r2.appendChild(o)) : (t3 && r2.appendChild(o), e3 && r2.appendChild(n2)), r2;
1330
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.RATING_NUMBER_MIN_CHIP_WIDTH = t2.usesLegacyRatingNumber = t2.createRatingNumberElement = t2.createStarRating = t2.createRatingPlaceholder = void 0;
1331
+ const n = i(7031), r = i(2139);
1332
+ function o(e3, t3, i2 = "ltr") {
1333
+ const n2 = document.createElement("div");
1334
+ n2.classList.add("magicfeedback-rating-placeholder");
1335
+ const r2 = document.createElement("span");
1336
+ r2.textContent = null != e3 ? e3 : "", r2.classList.add("magicfeedback-rating-placeholder-value");
1337
+ const o2 = document.createElement("span");
1338
+ return o2.textContent = null != t3 ? t3 : "", o2.classList.add("magicfeedback-rating-placeholder-value"), "ltr" === i2 ? (e3 && n2.appendChild(r2), t3 && n2.appendChild(o2)) : (t3 && n2.appendChild(o2), e3 && n2.appendChild(r2)), n2;
1260
1339
  }
1261
- t2.createRatingPlaceholder = n, t2.createStarRating = function(e3, t3, i2, r2 = () => {
1262
- }, o) {
1263
- const a = "magicfeedback-rating-star-selected", s = document.createElement("div");
1264
- s.classList.add("magicfeedback-rating-star-container"), s.style.maxWidth = "300px", s.style.margin = "auto", s.dataset.originalSelection = "0";
1340
+ t2.createRatingPlaceholder = o, t2.createStarRating = function(e3, t3, i2, n2 = () => {
1341
+ }, a) {
1342
+ const s = "magicfeedback-rating-star-selected", l = document.createElement("div");
1343
+ l.classList.add("magicfeedback-rating-star-container"), l.style.maxWidth = "300px", l.style.margin = "auto", l.dataset.originalSelection = "0";
1265
1344
  for (let t4 = 1; t4 <= 5; t4++) {
1266
1345
  const i3 = document.createElement("label");
1267
1346
  i3.classList.add("magicfeedback-rating-star-option");
1268
- const n2 = document.createElement("input");
1269
- n2.id = `rating-${e3}-${t4}`, n2.type = "radio", n2.name = e3, n2.value = t4.toString(), n2.style.position = "absolute", n2.style.opacity = "0", n2.style.width = "0", n2.style.height = "0", n2.classList.add("magicfeedback-input"), o && o === n2.value && (n2.checked = true), n2.addEventListener("change", (() => {
1270
- const e4 = s.querySelectorAll(".rating__star");
1271
- for (let t5 = 0; t5 < e4.length; t5++) t5 + 1 <= Number(n2.value) ? e4[t5].classList.contains(a) || e4[t5].classList.add(a) : e4[t5].classList.contains(a) && e4[t5].classList.remove(a);
1272
- s.dataset.originalSelection = n2.value, r2 && r2();
1273
- })), i3.appendChild(n2);
1274
- const l2 = document.createElement("label");
1275
- l2.htmlFor = `rating-${e3}-${t4}`, l2.classList.add("rating__star"), l2.textContent = "\u2605", l2.style.fontSize = "40px", l2.style.color = "#CCCCCC", l2.style.cursor = "pointer", l2.addEventListener("mouseenter", (() => {
1276
- const e4 = s.querySelectorAll(".rating__star"), i4 = t4 - 1;
1347
+ const o2 = document.createElement("input");
1348
+ o2.id = `rating-${e3}-${t4}`, o2.type = "radio", o2.name = e3, o2.value = t4.toString(), o2.style.position = "absolute", o2.style.opacity = "0", o2.style.width = "0", o2.style.height = "0", o2.classList.add("magicfeedback-input"), a && a === o2.value && (o2.checked = true), o2.addEventListener("change", (() => {
1349
+ const e4 = l.querySelectorAll(".rating__star");
1350
+ for (let t5 = 0; t5 < e4.length; t5++) t5 + 1 <= Number(o2.value) ? e4[t5].classList.contains(s) || e4[t5].classList.add(s) : e4[t5].classList.contains(s) && e4[t5].classList.remove(s);
1351
+ l.dataset.originalSelection = o2.value;
1352
+ })), (0, r.autoAdvanceOn)(o2, n2), i3.appendChild(o2);
1353
+ const d2 = document.createElement("label");
1354
+ d2.htmlFor = `rating-${e3}-${t4}`, d2.classList.add("rating__star"), d2.textContent = "\u2605", d2.style.fontSize = "40px", d2.style.color = "#CCCCCC", d2.style.cursor = "pointer", d2.addEventListener("mouseenter", (() => {
1355
+ const e4 = l.querySelectorAll(".rating__star"), i4 = t4 - 1;
1277
1356
  e4.forEach(((e5, t5) => {
1278
- t5 <= i4 ? e5.classList.contains(a) || e5.classList.add(a) : e5.classList.contains(a) && e5.classList.remove(a);
1357
+ t5 <= i4 ? e5.classList.contains(s) || e5.classList.add(s) : e5.classList.contains(s) && e5.classList.remove(s);
1279
1358
  }));
1280
- })), l2.addEventListener("mouseleave", (() => {
1281
- const e4 = Number(s.dataset.originalSelection || "0");
1282
- s.querySelectorAll(".rating__star").forEach(((t5, i4) => {
1283
- i4 < e4 ? t5.classList.contains(a) || t5.classList.add(a) : t5.classList.contains(a) && t5.classList.remove(a);
1359
+ })), d2.addEventListener("mouseleave", (() => {
1360
+ const e4 = Number(l.dataset.originalSelection || "0");
1361
+ l.querySelectorAll(".rating__star").forEach(((t5, i4) => {
1362
+ i4 < e4 ? t5.classList.contains(s) || t5.classList.add(s) : t5.classList.contains(s) && t5.classList.remove(s);
1284
1363
  }));
1285
- })), i3.appendChild(l2), s.appendChild(i3);
1286
- }
1287
- const l = n(t3, i2);
1288
- return l.childElementCount > 0 && s.appendChild(l), s;
1289
- }, t2.createRatingNumberElement = function(e3, t3, i2, n2, o, a, s, l) {
1290
- var d, c;
1291
- const u = document.createElement("div");
1292
- u.classList.add("magicfeedback-rating-number");
1293
- const p = "column" === n2, m = "ltr" === i2 ? n2 : `${n2}-reverse`, h = document.createElement("div");
1294
- h.classList.add("magicfeedback-rating-number-container"), h.classList.add(`magicfeedback-rating-number-container-${i2}`), h.classList.add(`magicfeedback-rating-number-container-${n2}`), h.style.display = "flex", h.style.flexDirection = m, h.setAttribute("role", "radiogroup"), h.setAttribute("aria-label", (null == t3 ? void 0 : t3.ariaLabel) || (0, r.t)(l, "rating.ariaLabel"));
1295
- const f = (null == t3 ? void 0 : t3.max) ? Number(null == t3 ? void 0 : t3.max) : 10, g = (null == t3 ? void 0 : t3.min) ? Number(null == t3 ? void 0 : t3.min) : 0;
1296
- !p && f - g + 1 > 6 && h.classList.add("magicfeedback-rating-number-container-row--dense");
1297
- const y = (null == t3 ? void 0 : t3.numberPlaceholders) || null, v = !(!y || !Object.keys(y).length);
1298
- let b = null;
1299
- if (!p && ((null == t3 ? void 0 : t3.minPlaceholder) || (null == t3 ? void 0 : t3.maxPlaceholder))) {
1300
- b = document.createElement("div"), b.classList.add("magicfeedback-rating-number-scale-labels");
1364
+ })), i3.appendChild(d2), l.appendChild(i3);
1365
+ }
1366
+ const d = o(t3, i2);
1367
+ return d.childElementCount > 0 && l.appendChild(d), l;
1368
+ }, t2.createRatingNumberElement = function(e3, i2, o2, a, s, l, d, c, u = {}) {
1369
+ var p, m;
1370
+ const h = document.createElement("div");
1371
+ h.classList.add("magicfeedback-rating-number");
1372
+ const f = !!u.legacy, g = f && !!u.isPhone, y = g ? (function(e4) {
1373
+ const t3 = (null == e4 ? void 0 : e4.max) ? Number(e4.max) : 10, i3 = (null == e4 ? void 0 : e4.min) ? Number(e4.min) : 0;
1374
+ return (n2) => {
1375
+ var r2;
1376
+ return (null === (r2 = null == e4 ? void 0 : e4.numberPlaceholders) || void 0 === r2 ? void 0 : r2[n2]) || (n2 === i3 ? null == e4 ? void 0 : e4.minPlaceholder : void 0) || (n2 === t3 ? null == e4 ? void 0 : e4.maxPlaceholder : void 0) || void 0;
1377
+ };
1378
+ })(i2) : null;
1379
+ g && (a = "column", i2 = Object.assign(Object.assign({}, i2), { minPlaceholder: void 0, maxPlaceholder: void 0, numberPlaceholders: void 0 })), f && h.classList.add("magicfeedback-rating-number--legacy");
1380
+ const v = "column" === a, b = "ltr" === o2 ? a : `${a}-reverse`, E = document.createElement("div");
1381
+ E.classList.add("magicfeedback-rating-number-container"), E.classList.add(`magicfeedback-rating-number-container-${o2}`), E.classList.add(`magicfeedback-rating-number-container-${a}`), E.style.display = "flex", E.style.flexDirection = b, E.setAttribute("role", "radiogroup"), E.setAttribute("aria-label", (null == i2 ? void 0 : i2.ariaLabel) || (0, n.t)(c, "rating.ariaLabel"));
1382
+ const A = (null == i2 ? void 0 : i2.max) ? Number(null == i2 ? void 0 : i2.max) : 10, k = (null == i2 ? void 0 : i2.min) ? Number(null == i2 ? void 0 : i2.min) : 0;
1383
+ !v && A - k + 1 > 6 && E.classList.add("magicfeedback-rating-number-container-row--dense");
1384
+ const T = (null == i2 ? void 0 : i2.numberPlaceholders) || null, C = !(!T || !Object.keys(T).length);
1385
+ let x = null;
1386
+ if (!v && ((null == i2 ? void 0 : i2.minPlaceholder) || (null == i2 ? void 0 : i2.maxPlaceholder))) {
1387
+ x = document.createElement("div"), x.classList.add("magicfeedback-rating-number-scale-labels");
1301
1388
  const e4 = document.createElement("span");
1302
- e4.classList.add("magicfeedback-rating-number-scale-label"), e4.textContent = null !== (d = null == t3 ? void 0 : t3.minPlaceholder) && void 0 !== d ? d : "";
1303
- const r2 = document.createElement("span");
1304
- r2.classList.add("magicfeedback-rating-number-scale-label"), r2.textContent = null !== (c = null == t3 ? void 0 : t3.maxPlaceholder) && void 0 !== c ? c : "", "ltr" === i2 ? (b.appendChild(e4), b.appendChild(r2)) : (b.appendChild(r2), b.appendChild(e4));
1305
- }
1306
- let E = null;
1307
- if (p && !v && (h.classList.add("magicfeedback-rating-number-container-column--bare"), (null == t3 ? void 0 : t3.minPlaceholder) || (null == t3 ? void 0 : t3.maxPlaceholder))) {
1308
- const e4 = "ltr" === i2 ? null == t3 ? void 0 : t3.minPlaceholder : null == t3 ? void 0 : t3.maxPlaceholder, r2 = "ltr" === i2 ? null == t3 ? void 0 : t3.maxPlaceholder : null == t3 ? void 0 : t3.minPlaceholder;
1309
- if (e4) {
1310
- const t4 = document.createElement("div");
1311
- t4.classList.add("magicfeedback-rating-number-scale-label-block"), t4.textContent = e4, u.appendChild(t4);
1312
- }
1313
- r2 && (E = document.createElement("div"), E.classList.add("magicfeedback-rating-number-scale-label-block"), E.textContent = r2);
1389
+ e4.classList.add("magicfeedback-rating-number-scale-label"), e4.textContent = null !== (p = null == i2 ? void 0 : i2.minPlaceholder) && void 0 !== p ? p : "";
1390
+ const t3 = document.createElement("span");
1391
+ t3.classList.add("magicfeedback-rating-number-scale-label"), t3.textContent = null !== (m = null == i2 ? void 0 : i2.maxPlaceholder) && void 0 !== m ? m : "", "ltr" === o2 ? (x.appendChild(e4), x.appendChild(t3)) : (x.appendChild(t3), x.appendChild(e4));
1314
1392
  }
1315
- for (let i3 = g; i3 <= f; i3++) {
1316
- const r2 = document.createElement("div");
1317
- r2.classList.add("magicfeedback-rating-number-option"), r2.classList.add(`magicfeedback-rating-number-option-${n2}`);
1318
- const l2 = document.createElement("label");
1319
- l2.htmlFor = `rating-${e3}-${i3}`, l2.classList.add("magicfeedback-rating-number-option-label-container");
1320
- const d2 = v && (y[i3] || (i3 === g ? null == t3 ? void 0 : t3.minPlaceholder : void 0) || (i3 === f ? null == t3 ? void 0 : t3.maxPlaceholder : void 0)), c2 = document.createElement("input");
1321
- c2.id = `rating-${e3}-${i3}`, c2.type = "radio", c2.name = e3, c2.value = i3.toString(), c2.classList.add(o), c2.classList.add("magicfeedback-input"), c2.setAttribute("aria-label", d2 ? `${i3} \u2014 ${d2}` : `${i3}`), a && c2.addEventListener("change", (() => a())), s && s === c2.value && (c2.checked = true), l2.appendChild(c2);
1322
- const u2 = document.createElement("span");
1323
- u2.classList.add("magicfeedback-rating-number-value");
1393
+ let P = null;
1394
+ if (v && !C && E.classList.add("magicfeedback-rating-number-container-column--bare"), (!v || !C) && ((null == i2 ? void 0 : i2.minPlaceholder) || (null == i2 ? void 0 : i2.maxPlaceholder))) {
1395
+ const e4 = "ltr" === o2 ? null == i2 ? void 0 : i2.minPlaceholder : null == i2 ? void 0 : i2.maxPlaceholder, t3 = "ltr" === o2 ? null == i2 ? void 0 : i2.maxPlaceholder : null == i2 ? void 0 : i2.minPlaceholder, n2 = (e5) => {
1396
+ const t4 = document.createElement("div");
1397
+ return t4.classList.add("magicfeedback-rating-number-scale-label-block"), v || (t4.classList.add("magicfeedback-rating-number-scale-label-block--stacked"), t4.style.display = "none"), t4.textContent = e5, t4;
1398
+ };
1399
+ e4 && h.appendChild(n2(e4)), t3 && (P = n2(t3));
1400
+ }
1401
+ for (let t3 = k; t3 <= A; t3++) {
1402
+ const n2 = document.createElement("div");
1403
+ n2.classList.add("magicfeedback-rating-number-option"), n2.classList.add(`magicfeedback-rating-number-option-${a}`);
1404
+ const o3 = document.createElement("label");
1405
+ o3.htmlFor = `rating-${e3}-${t3}`, o3.classList.add("magicfeedback-rating-number-option-label-container");
1406
+ const c2 = C && (T[t3] || (t3 === k ? null == i2 ? void 0 : i2.minPlaceholder : void 0) || (t3 === A ? null == i2 ? void 0 : i2.maxPlaceholder : void 0)), u2 = document.createElement("input");
1407
+ u2.id = `rating-${e3}-${t3}`, u2.type = "radio", u2.name = e3, u2.value = t3.toString(), u2.classList.add(s), u2.classList.add("magicfeedback-input");
1408
+ const p2 = null == y ? void 0 : y(t3);
1409
+ u2.setAttribute("aria-label", c2 ? `${t3} \u2014 ${c2}` : p2 ? `${t3} \u2014 ${p2}` : `${t3}`), (0, r.autoAdvanceOn)(u2, l), d && d === u2.value && (u2.checked = true), o3.appendChild(u2);
1324
1410
  const m2 = document.createElement("span");
1325
- if (m2.textContent = i3.toString(), m2.classList.add("magicfeedback-rating-number-value-num"), u2.appendChild(m2), p) {
1326
- if (d2) {
1411
+ m2.classList.add("magicfeedback-rating-number-value");
1412
+ const h2 = document.createElement("span");
1413
+ if (h2.textContent = p2 ? `${t3} = ${p2}` : t3.toString(), h2.classList.add("magicfeedback-rating-number-value-num"), f && (h2.style.fontWeight = "normal"), m2.appendChild(h2), v) {
1414
+ if (c2) {
1327
1415
  const e4 = document.createElement("span");
1328
- e4.textContent = d2, e4.classList.add("magicfeedback-rating-number-value-label"), u2.appendChild(e4);
1416
+ e4.textContent = c2, e4.classList.add("magicfeedback-rating-number-value-label"), m2.appendChild(e4);
1329
1417
  }
1330
- } else y && y[i3] && (l2.title = y[i3]);
1331
- l2.appendChild(u2), r2.appendChild(l2), h.appendChild(r2);
1332
- }
1333
- if (u.appendChild(h), b && u.appendChild(b), E && u.appendChild(E), (null == t3 ? void 0 : t3.extraOption) && (null == t3 ? void 0 : t3.extraOptionText)) {
1334
- const i3 = document.createElement("div");
1335
- i3.classList.add("magicfeedback-rating-number-extra-row");
1336
- const r2 = document.createElement("div");
1337
- r2.classList.add("magicfeedback-rating-number-option"), r2.classList.add("magicfeedback-rating-number-option--extra");
1338
- const n3 = document.createElement("label");
1339
- n3.htmlFor = `rating-${e3}-extra`, n3.classList.add("magicfeedback-rating-number-option-label-container");
1340
- const s2 = document.createElement("input");
1341
- s2.id = `rating-${e3}-extra`, s2.type = "radio", s2.name = e3, s2.value = "-", s2.classList.add(o), s2.classList.add("magicfeedback-input"), s2.setAttribute("aria-label", null == t3 ? void 0 : t3.extraOptionText), a && s2.addEventListener("change", (() => a()));
1342
- const l2 = document.createElement("span");
1343
- l2.classList.add("magicfeedback-rating-number-value");
1418
+ } else T && T[t3] && (o3.title = T[t3]);
1419
+ o3.appendChild(m2), n2.appendChild(o3), E.appendChild(n2);
1420
+ }
1421
+ if (h.appendChild(E), P && h.appendChild(P), x && h.appendChild(x), v || f || (function(e4, i3, n2, r2) {
1422
+ if ("undefined" == typeof ResizeObserver) return;
1423
+ const o3 = i3.classList.contains("magicfeedback-rating-number-container-row--dense");
1424
+ let a2 = 0, s2 = false;
1425
+ const l2 = "function" == typeof requestAnimationFrame ? requestAnimationFrame : (e5) => (e5(0), 0);
1426
+ let d2 = 0, c2 = false;
1427
+ new ResizeObserver(((u2) => {
1428
+ var p2;
1429
+ const m2 = null === (p2 = u2[0]) || void 0 === p2 ? void 0 : p2.contentRect.width;
1430
+ m2 && m2 !== d2 && (d2 = m2, c2 || (c2 = true, l2((() => {
1431
+ c2 = false, s2 || (a2 = parseFloat(getComputedStyle(i3).columnGap) || 0);
1432
+ const l3 = n2 * t2.RATING_NUMBER_MIN_CHIP_WIDTH + (n2 - 1) * a2;
1433
+ var u3;
1434
+ (u3 = d2 < l3) !== s2 && (s2 = u3, e4.classList.toggle("magicfeedback-rating-number--stacked", u3), e4.querySelectorAll(":scope > .magicfeedback-rating-number-scale-labels").forEach(((e5) => {
1435
+ e5.style.display = u3 ? "none" : "";
1436
+ })), e4.querySelectorAll(":scope > .magicfeedback-rating-number-scale-label-block--stacked").forEach(((e5) => {
1437
+ e5.style.display = u3 ? "" : "none";
1438
+ })), i3.classList.toggle("magicfeedback-rating-number-container-row", !u3), i3.classList.toggle("magicfeedback-rating-number-container-row--dense", !u3 && o3), i3.classList.toggle("magicfeedback-rating-number-container-column", u3), i3.classList.toggle("magicfeedback-rating-number-container-column--bare", u3), i3.style.flexDirection = u3 ? "ltr" === r2 ? "column" : "column-reverse" : "ltr" === r2 ? "row" : "row-reverse", i3.querySelectorAll(":scope > .magicfeedback-rating-number-option").forEach(((e5) => {
1439
+ e5.classList.toggle("magicfeedback-rating-number-option-row", !u3), e5.classList.toggle("magicfeedback-rating-number-option-column", u3);
1440
+ })));
1441
+ }))));
1442
+ })).observe(e4);
1443
+ })(h, E, A - k + 1, o2), (null == i2 ? void 0 : i2.extraOption) && (null == i2 ? void 0 : i2.extraOptionText)) {
1444
+ const t3 = document.createElement("div");
1445
+ t3.classList.add("magicfeedback-rating-number-extra-row");
1446
+ const n2 = document.createElement("div");
1447
+ n2.classList.add("magicfeedback-rating-number-option"), n2.classList.add("magicfeedback-rating-number-option--extra");
1448
+ const o3 = document.createElement("label");
1449
+ o3.htmlFor = `rating-${e3}-extra`, o3.classList.add("magicfeedback-rating-number-option-label-container");
1450
+ const a2 = document.createElement("input");
1451
+ a2.id = `rating-${e3}-extra`, a2.type = "radio", a2.name = e3, a2.value = "-", a2.classList.add(s), a2.classList.add("magicfeedback-input"), a2.setAttribute("aria-label", null == i2 ? void 0 : i2.extraOptionText), (0, r.autoAdvanceOn)(a2, l);
1344
1452
  const d2 = document.createElement("span");
1345
- d2.textContent = null == t3 ? void 0 : t3.extraOptionText, d2.classList.add("magicfeedback-rating-number-value-label"), l2.appendChild(d2), n3.appendChild(s2), n3.appendChild(l2), r2.appendChild(n3), i3.appendChild(r2), u.appendChild(i3);
1346
- }
1347
- return u;
1348
- };
1349
- }, 42: (e2, t2, i) => {
1453
+ d2.classList.add("magicfeedback-rating-number-value");
1454
+ const c2 = document.createElement("span");
1455
+ c2.textContent = null == i2 ? void 0 : i2.extraOptionText, c2.classList.add("magicfeedback-rating-number-value-label"), d2.appendChild(c2), o3.appendChild(a2), o3.appendChild(d2), n2.appendChild(o3), t3.appendChild(n2), h.appendChild(t3);
1456
+ }
1457
+ return h;
1458
+ }, t2.usesLegacyRatingNumber = function(e3) {
1459
+ return !!e3 && /matas/i.test(e3);
1460
+ }, t2.RATING_NUMBER_MIN_CHIP_WIDTH = 44;
1461
+ }, 7156: (e2, t2, i) => {
1350
1462
  "use strict";
1351
1463
  Object.defineProperty(t2, "__esModule", { value: true }), t2.getQuestionRenderer = void 0;
1352
- const r = i(558), n = i(998), o = i(72), a = i(732), s = i(90), l = i(65), d = i(85), c = i(817), u = i(965), p = i(180), m = i(991), h = i(152), f = i(917), g = i(452), y = i(644), v = i(773), b = i(66), E = i(843), k = i(250), A = i(409), T = i(282), C = /* @__PURE__ */ new Map([[r.FEEDBACKAPPANSWERTYPE.TEXT, s.renderText], [r.FEEDBACKAPPANSWERTYPE.LONGTEXT, o.renderLongText], [r.FEEDBACKAPPANSWERTYPE.NUMBER, a.renderNumber], [r.FEEDBACKAPPANSWERTYPE.RADIO, n.renderChoice], [r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, n.renderChoice], [r.FEEDBACKAPPANSWERTYPE.BOOLEAN, l.renderBoolean], [r.FEEDBACKAPPANSWERTYPE.SELECT, d.renderSelect], [r.FEEDBACKAPPANSWERTYPE.DATE, c.renderDate], [r.FEEDBACKAPPANSWERTYPE.EMAIL, u.renderEmail], [r.FEEDBACKAPPANSWERTYPE.PASSWORD, p.renderPassword], [r.FEEDBACKAPPANSWERTYPE.CONSENT, m.renderConsent], [r.FEEDBACKAPPANSWERTYPE.RATING_EMOJI, h.renderRatingEmoji], [r.FEEDBACKAPPANSWERTYPE.RATING_NUMBER, f.renderRatingNumber], [r.FEEDBACKAPPANSWERTYPE.RATING_STAR, g.renderRatingStar], [r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX, y.renderMatrix], [r.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST, v.renderPriorityList], [r.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM, b.renderPointSystem], [r.FEEDBACKAPPANSWERTYPE.UPLOAD_IMAGE, E.renderUploadImage], [r.FEEDBACKAPPANSWERTYPE.UPLOAD_FILE, k.renderUploadFile], [r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE, A.renderMultipleChoiceImage], [r.FEEDBACKAPPANSWERTYPE.INFO_PAGE, T.renderInfoPage]]);
1464
+ const n = i(1140), r = i(7352), o = i(5826), a = i(6054), s = i(8416), l = i(227), d = i(8707), c = i(511), u = i(6055), p = i(4310), m = i(5429), h = i(8822), f = i(6083), g = i(9102), y = i(6838), v = i(2427), b = i(1732), E = i(5469), A = i(4336), k = i(5963), T = i(4792), C = i(7754), x = /* @__PURE__ */ new Map([[n.FEEDBACKAPPANSWERTYPE.TEXT, s.renderText], [n.FEEDBACKAPPANSWERTYPE.LONGTEXT, o.renderLongText], [n.FEEDBACKAPPANSWERTYPE.NUMBER, a.renderNumber], [n.FEEDBACKAPPANSWERTYPE.RADIO, r.renderChoice], [n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, r.renderChoice], [n.FEEDBACKAPPANSWERTYPE.BOOLEAN, l.renderBoolean], [n.FEEDBACKAPPANSWERTYPE.SELECT, d.renderSelect], [n.FEEDBACKAPPANSWERTYPE.DATE, c.renderDate], [n.FEEDBACKAPPANSWERTYPE.EMAIL, u.renderEmail], [n.FEEDBACKAPPANSWERTYPE.PASSWORD, p.renderPassword], [n.FEEDBACKAPPANSWERTYPE.CONSENT, m.renderConsent], [n.FEEDBACKAPPANSWERTYPE.RATING_EMOJI, h.renderRatingEmoji], [n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER, f.renderRatingNumber], [n.FEEDBACKAPPANSWERTYPE.RATING_STAR, g.renderRatingStar], [n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX, y.renderMatrix], [n.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST, v.renderPriorityList], [n.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM, b.renderPointSystem], [n.FEEDBACKAPPANSWERTYPE.UPLOAD_IMAGE, E.renderUploadImage], [n.FEEDBACKAPPANSWERTYPE.UPLOAD_FILE, A.renderUploadFile], [n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE, k.renderMultipleChoiceImage], [n.FEEDBACKAPPANSWERTYPE.INFO_PAGE, T.renderInfoPage], [n.FEEDBACKAPPANSWERTYPE.MAX_DIFF, C.renderMaxDiff]]);
1353
1465
  t2.getQuestionRenderer = function(e3) {
1354
- return C.get(e3);
1466
+ return x.get(e3);
1355
1467
  };
1356
- }, 65: (e2, t2, i) => {
1468
+ }, 227: (e2, t2, i) => {
1357
1469
  "use strict";
1358
1470
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderBoolean = void 0;
1359
- const r = i(516);
1360
- t2.renderBoolean = ({ question: e3, language: t3, urlParamValue: i2, send: n }) => {
1361
- const { ref: o, assets: a } = e3, s = document.createElement("div"), l = "magicfeedback-radio", d = document.createElement("div");
1362
- return d.classList.add("magicfeedback-boolean-container"), d.style.display = "flex", d.style.flexDirection = "row", d.style.justifyContent = "space-between", d.style.width = "70%", d.style.margin = "auto", ((null == a ? void 0 : a.addIcon) ? ["\u{1F44D}", "\u{1F44E}"] : (0, r.getBooleanOptions)(t3)).forEach(((e4, t4) => {
1363
- const r2 = document.createElement("label");
1364
- r2.classList.add("magicfeedback-boolean-option"), r2.htmlFor = `rating-${o}-${t4}`, r2.style.cursor = "pointer", r2.style.display = "flex", r2.style.justifyContent = "center", r2.style.alignItems = "center", r2.style.margin = "auto", r2.style.padding = "0", r2.style.width = "45%", r2.style.height = "38px";
1365
- const a2 = document.createElement("label");
1366
- a2.htmlFor = `rating-${o}-${t4}`, a2.textContent = e4, a2.style.margin = "0", a2.style.padding = "0";
1367
- const s2 = document.createElement("input");
1368
- s2.id = `rating-${o}-${t4}`, s2.type = "radio", s2.name = o, s2.value = ["Yes", "No"][t4], s2.classList.add(l), s2.classList.add("magicfeedback-input"), s2.style.position = "absolute", s2.style.opacity = "0", s2.style.width = "0", s2.style.height = "0", s2.style.margin = "0", s2.addEventListener("change", (() => {
1369
- n && n();
1370
- })), i2 && i2.toLowerCase() === s2.value.toLowerCase() && (s2.checked = true), r2.appendChild(s2), r2.appendChild(a2), d.appendChild(r2);
1371
- })), s.appendChild(d), { element: s, elementTypeClass: l };
1471
+ const n = i(6658), r = i(2139);
1472
+ t2.renderBoolean = ({ question: e3, language: t3, urlParamValue: i2, send: o }) => {
1473
+ const { ref: a, assets: s } = e3, l = document.createElement("div"), d = "magicfeedback-radio", c = document.createElement("div");
1474
+ return c.classList.add("magicfeedback-boolean-container"), c.style.display = "flex", c.style.flexDirection = "row", c.style.justifyContent = "space-between", c.style.width = "70%", c.style.margin = "auto", ((null == s ? void 0 : s.addIcon) ? ["\u{1F44D}", "\u{1F44E}"] : (0, n.getBooleanOptions)(t3)).forEach(((e4, t4) => {
1475
+ const n2 = document.createElement("label");
1476
+ n2.classList.add("magicfeedback-boolean-option"), n2.htmlFor = `rating-${a}-${t4}`, n2.style.cursor = "pointer", n2.style.display = "flex", n2.style.justifyContent = "center", n2.style.alignItems = "center", n2.style.margin = "auto", n2.style.padding = "0", n2.style.width = "45%", n2.style.height = "38px";
1477
+ const s2 = document.createElement("label");
1478
+ s2.htmlFor = `rating-${a}-${t4}`, s2.textContent = e4, s2.style.margin = "0", s2.style.padding = "0";
1479
+ const l2 = document.createElement("input");
1480
+ l2.id = `rating-${a}-${t4}`, l2.type = "radio", l2.name = a, l2.value = ["Yes", "No"][t4], l2.classList.add(d), l2.classList.add("magicfeedback-input"), l2.style.position = "absolute", l2.style.opacity = "0", l2.style.width = "0", l2.style.height = "0", l2.style.margin = "0", (0, r.autoAdvanceOn)(l2, o), i2 && i2.toLowerCase() === l2.value.toLowerCase() && (l2.checked = true), n2.appendChild(l2), n2.appendChild(s2), c.appendChild(n2);
1481
+ })), l.appendChild(c), { element: l, elementTypeClass: d };
1372
1482
  };
1373
- }, 998: (e2, t2, i) => {
1483
+ }, 7352: (e2, t2, i) => {
1374
1484
  "use strict";
1375
1485
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderChoice = void 0;
1376
- const r = i(558), n = i(784);
1377
- t2.renderChoice = ({ question: e3, language: t3, urlParamValue: i2, randomPosition: o, send: a }) => {
1378
- const { type: s, ref: l, value: d, defaultValue: c, assets: u } = e3, p = document.createElement("div"), m = "magicfeedback-" + ("MULTIPLECHOICE" === s ? "checkbox" : "radio");
1379
- let h = d || [];
1380
- o && (h = h.sort((() => Math.random() - 0.5)));
1381
- let f = (null == u ? void 0 : u.exclusiveAnswers) || [];
1382
- (null == u ? void 0 : u.extraOption) && (f = f.filter(((e4) => e4 !== u.extraOptionText))), f.length > 0 && (null == f || f.forEach(((e4) => {
1383
- h.includes(e4) || h.push(e4);
1486
+ const n = i(1140), r = i(9930), o = i(2139);
1487
+ t2.renderChoice = ({ question: e3, language: t3, urlParamValue: i2, randomPosition: a, send: s }) => {
1488
+ const { type: l, ref: d, value: c, defaultValue: u, assets: p } = e3, m = document.createElement("div"), h = "magicfeedback-" + ("MULTIPLECHOICE" === l ? "checkbox" : "radio");
1489
+ let f = c || [];
1490
+ a && (f = f.sort((() => Math.random() - 0.5)));
1491
+ let g = (null == p ? void 0 : p.exclusiveAnswers) || [];
1492
+ (null == p ? void 0 : p.extraOption) && (g = g.filter(((e4) => e4 !== p.extraOptionText))), g.length > 0 && (null == g || g.forEach(((e4) => {
1493
+ f.includes(e4) || f.push(e4);
1384
1494
  })));
1385
- const g = null == u ? void 0 : u.extraOptionText;
1386
- return (null == u ? void 0 : u.extraOption) && g && !h.includes(g) && h.push(g), h.forEach(((e4, o2) => {
1387
- const d2 = document.createElement("div");
1388
- d2.classList.add(`magicfeedback-${"MULTIPLECHOICE" === s ? "checkbox" : "radio"}-container`);
1389
- const g2 = document.createElement("label"), y = document.createElement("input");
1390
- if (y.id = `rating-${l}-${o2}`, y.type = "MULTIPLECHOICE" === s ? "checkbox" : "radio", y.name = l, y.value = e4, y.classList.add(m), y.classList.add("magicfeedback-input"), s === r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE && (null == u ? void 0 : u.maxOptions) && (null == u ? void 0 : u.maxOptions) > 0 && y.addEventListener("change", (() => {
1391
- document.querySelectorAll(`input[name="${l}"]:checked`).length > (null == u ? void 0 : u.maxOptions) && (y.checked = false);
1392
- })), s === r.FEEDBACKAPPANSWERTYPE.RADIO && a && (!(null == u ? void 0 : u.extraOptionText) || (null == u ? void 0 : u.extraOptionText) && e4 !== (null == u ? void 0 : u.extraOptionText)) && y.addEventListener("change", (() => {
1393
- a();
1394
- })), e4 !== c && e4 !== i2 || (y.checked = true), g2.textContent = e4, g2.htmlFor = `rating-${l}-${o2}`, y.addEventListener("change", ((t4) => {
1395
- const i3 = document.getElementById(`extra-option-${l}`);
1396
- t4.target.checked && f.includes(e4) ? (h.forEach(((t5) => {
1495
+ const y = null == p ? void 0 : p.extraOptionText;
1496
+ return (null == p ? void 0 : p.extraOption) && y && !f.includes(y) && f.push(y), f.forEach(((e4, a2) => {
1497
+ const c2 = document.createElement("div");
1498
+ c2.classList.add(`magicfeedback-${"MULTIPLECHOICE" === l ? "checkbox" : "radio"}-container`);
1499
+ const y2 = document.createElement("label"), v = document.createElement("input");
1500
+ if (v.id = `rating-${d}-${a2}`, v.type = "MULTIPLECHOICE" === l ? "checkbox" : "radio", v.name = d, v.value = e4, v.classList.add(h), v.classList.add("magicfeedback-input"), l === n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE && (null == p ? void 0 : p.maxOptions) && (null == p ? void 0 : p.maxOptions) > 0 && v.addEventListener("change", (() => {
1501
+ document.querySelectorAll(`input[name="${d}"]:checked`).length > (null == p ? void 0 : p.maxOptions) && (v.checked = false);
1502
+ })), l === n.FEEDBACKAPPANSWERTYPE.RADIO && s && (!(null == p ? void 0 : p.extraOptionText) || (null == p ? void 0 : p.extraOptionText) && e4 !== (null == p ? void 0 : p.extraOptionText)) && (0, o.autoAdvanceOn)(v, s), e4 !== u && e4 !== i2 || (v.checked = true), y2.textContent = e4, y2.htmlFor = `rating-${d}-${a2}`, v.addEventListener("change", ((t4) => {
1503
+ const i3 = document.getElementById(`extra-option-${d}`);
1504
+ t4.target.checked && g.includes(e4) ? (f.forEach(((t5) => {
1397
1505
  t5 !== e4 && (document.querySelector(`input[value="${t5}"]`).checked = false);
1398
- })), i3 && (i3.style.display = "none")) : f.forEach(((t5) => {
1506
+ })), i3 && (i3.style.display = "none")) : g.forEach(((t5) => {
1399
1507
  t5 !== e4 && (document.querySelector(`input[value="${t5}"]`).checked = false);
1400
- })), (null == u ? void 0 : u.extraOption) && e4 === (null == u ? void 0 : u.extraOptionText) && i3 && (i3.style.display = t4.target.checked ? "block" : "none");
1401
- })), d2.appendChild(y), d2.appendChild(g2), p.appendChild(d2), (null == u ? void 0 : u.extraOption) && e4 === (null == u ? void 0 : u.extraOptionText)) {
1508
+ })), (null == p ? void 0 : p.extraOption) && e4 === (null == p ? void 0 : p.extraOptionText) && i3 && (i3.style.display = t4.target.checked ? "block" : "none");
1509
+ })), c2.appendChild(v), c2.appendChild(y2), m.appendChild(c2), (null == p ? void 0 : p.extraOption) && e4 === (null == p ? void 0 : p.extraOptionText)) {
1402
1510
  const e5 = document.createElement("input");
1403
- e5.type = "text", e5.placeholder = (null == u ? void 0 : u.extraOptionPlaceholder) || n.placeholder.answer(t3 || "en"), e5.classList.add("magicfeedback-extra-option"), e5.classList.add("magicfeedback-input"), e5.id = `extra-option-${l}`, e5.name = `extra-option-${l}`, e5.style.display = "none", p.appendChild(e5);
1511
+ e5.type = "text", e5.placeholder = (null == p ? void 0 : p.extraOptionPlaceholder) || r.placeholder.answer(t3 || "en"), e5.classList.add("magicfeedback-extra-option"), e5.classList.add("magicfeedback-input"), e5.id = `extra-option-${d}`, e5.name = `extra-option-${d}`, e5.style.display = "none", m.appendChild(e5);
1404
1512
  }
1405
- })), { element: p, elementTypeClass: m };
1513
+ })), { element: m, elementTypeClass: h };
1406
1514
  };
1407
- }, 991: (e2, t2) => {
1515
+ }, 5429: (e2, t2, i) => {
1408
1516
  "use strict";
1409
- Object.defineProperty(t2, "__esModule", { value: true }), t2.renderConsent = void 0, t2.renderConsent = ({ question: e3, urlParamValue: t3, send: i }) => {
1410
- const { id: r, ref: n, value: o, require: a } = e3, s = document.createElement("input");
1411
- return s.type = "checkbox", s.id = `magicfeedback-${r}`, s.name = n, s.value = "true", s.required = a, s.classList.add("magicfeedback-consent"), s.classList.add("magicfeedback-input"), t3 && o.includes(t3) && (s.checked = true), i && s.addEventListener("change", (() => {
1412
- i();
1413
- })), { element: s, elementTypeClass: "magicfeedback-consent" };
1517
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.renderConsent = void 0;
1518
+ const n = i(2139);
1519
+ t2.renderConsent = ({ question: e3, urlParamValue: t3, send: i2 }) => {
1520
+ const { id: r, ref: o, value: a, require: s } = e3, l = document.createElement("input");
1521
+ return l.type = "checkbox", l.id = `magicfeedback-${r}`, l.name = o, l.value = "true", l.required = s, l.classList.add("magicfeedback-consent"), l.classList.add("magicfeedback-input"), t3 && a.includes(t3) && (l.checked = true), (0, n.autoAdvanceOn)(l, i2), { element: l, elementTypeClass: "magicfeedback-consent" };
1414
1522
  };
1415
- }, 817: (e2, t2, i) => {
1523
+ }, 511: (e2, t2, i) => {
1416
1524
  "use strict";
1417
1525
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderDate = void 0;
1418
- const r = i(784);
1526
+ const n = i(9930);
1419
1527
  t2.renderDate = ({ language: e3, placeholderText: t3, urlParamValue: i2 }) => {
1420
- const n = document.createElement("input");
1421
- return n.type = "date", n.placeholder = t3 || r.placeholder.date(e3 || "en"), i2 && (n.value = i2), { element: n, elementTypeClass: "magicfeedback-date" };
1528
+ const r = document.createElement("input");
1529
+ return r.type = "date", r.placeholder = t3 || n.placeholder.date(e3 || "en"), i2 && (r.value = i2), { element: r, elementTypeClass: "magicfeedback-date" };
1422
1530
  };
1423
- }, 965: (e2, t2) => {
1531
+ }, 6055: (e2, t2) => {
1424
1532
  "use strict";
1425
1533
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderEmail = void 0, t2.renderEmail = ({ placeholderText: e3, urlParamValue: t3 }) => {
1426
1534
  const i = document.createElement("input");
1427
1535
  return i.type = "email", i.placeholder = e3 || "you@example.com", t3 && (i.value = t3), { element: i, elementTypeClass: "magicfeedback-email" };
1428
1536
  };
1429
- }, 282: (e2, t2) => {
1537
+ }, 4792: (e2, t2) => {
1430
1538
  "use strict";
1431
1539
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderInfoPage = void 0, t2.renderInfoPage = ({ question: e3, placeholderText: t3 }) => {
1432
- var i, r;
1433
- const n = document.createElement("div");
1434
- if ("string" == typeof (null === (i = e3.assets) || void 0 === i ? void 0 : i.placeholder) ? "" !== e3.assets.placeholder.trim() : Boolean(null === (r = e3.assets) || void 0 === r ? void 0 : r.placeholder)) {
1540
+ var i, n;
1541
+ const r = document.createElement("div");
1542
+ if ("string" == typeof (null === (i = e3.assets) || void 0 === i ? void 0 : i.placeholder) ? "" !== e3.assets.placeholder.trim() : Boolean(null === (n = e3.assets) || void 0 === n ? void 0 : n.placeholder)) {
1435
1543
  const e4 = document.createElement("div");
1436
- e4.classList.add("magicfeedback-info-message"), e4.innerHTML = t3 || "", n.appendChild(e4);
1544
+ e4.classList.add("magicfeedback-info-message"), e4.innerHTML = t3 || "", r.appendChild(e4);
1437
1545
  }
1438
- return { element: n, elementTypeClass: "magicfeedback-info-page" };
1546
+ return { element: r, elementTypeClass: "magicfeedback-info-page" };
1439
1547
  };
1440
- }, 72: (e2, t2, i) => {
1548
+ }, 5826: (e2, t2, i) => {
1441
1549
  "use strict";
1442
1550
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderLongText = void 0;
1443
- const r = i(784);
1444
- t2.renderLongText = ({ language: e3, placeholderText: t3, urlParamValue: i2, maxCharacters: n }) => {
1551
+ const n = i(9930);
1552
+ t2.renderLongText = ({ language: e3, placeholderText: t3, urlParamValue: i2, maxCharacters: r }) => {
1445
1553
  const o = document.createElement("textarea");
1446
- return o.rows = 3, n > 0 && (o.maxLength = n), o.placeholder = t3 || r.placeholder.answer(e3 || "en"), i2 && (o.value = i2), { element: o, elementTypeClass: "magicfeedback-longtext" };
1554
+ return o.rows = 3, r > 0 && (o.maxLength = r), o.placeholder = t3 || n.placeholder.answer(e3 || "en"), i2 && (o.value = i2), { element: o, elementTypeClass: "magicfeedback-longtext" };
1447
1555
  };
1448
- }, 644: (e2, t2) => {
1556
+ }, 6838: (e2, t2) => {
1449
1557
  "use strict";
1450
1558
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMatrix = void 0, t2.renderMatrix = ({ question: e3, isPhone: t3, randomPosition: i }) => {
1451
- const { ref: r, value: n, assets: o } = e3, a = document.createElement("div"), s = document.createElement("div");
1559
+ const { ref: n, value: r, assets: o } = e3, a = document.createElement("div"), s = document.createElement("div");
1452
1560
  s.classList.add("magicfeedback-multi-question-matrix-container");
1453
- let l = (null == o ? void 0 : o.options) || [], d = [...n], c = [];
1561
+ let l = (null == o ? void 0 : o.options) || [], d = [...r], c = [];
1454
1562
  if (i && (l = null == l ? void 0 : l.sort((() => Math.random() - 0.5)), d = [...d].sort((() => Math.random() - 0.5))), (null == o ? void 0 : o.exclusiveAnswers) && (c = null == o ? void 0 : o.exclusiveAnswers, null == c || c.forEach(((e4) => {
1455
1563
  d.includes(e4) || d.push(e4);
1456
1564
  }))), t3) {
@@ -1458,12 +1566,12 @@ var require_magicfeedback_sdk_browser = __commonJS({
1458
1566
  e4.classList.add("magicfeedback-multi-question-matrix-list"), null == l || l.forEach(((t4) => {
1459
1567
  const i2 = document.createElement("div");
1460
1568
  i2.classList.add("magicfeedback-multi-question-matrix-list-item"), i2.style.display = "flex", i2.style.flexDirection = "column", i2.style.alignItems = "flex-start", i2.style.marginBottom = "10px";
1461
- const n2 = document.createElement("label");
1462
- n2.classList.add("magicfeedback-multi-question-matrix-label"), n2.style.paddingBottom = "10px", n2.textContent = t4, i2.appendChild(n2), d.forEach(((e5) => {
1463
- const n3 = document.createElement("div");
1464
- n3.classList.add("magicfeedback-radio-container"), n3.style.display = "flex", n3.style.alignItems = "center", n3.style.justifyContent = "flex-start", n3.style.width = "99%", n3.style.margin = "5px auto";
1569
+ const r2 = document.createElement("label");
1570
+ r2.classList.add("magicfeedback-multi-question-matrix-label"), r2.style.paddingBottom = "10px", r2.textContent = t4, i2.appendChild(r2), d.forEach(((e5) => {
1571
+ const r3 = document.createElement("div");
1572
+ r3.classList.add("magicfeedback-radio-container"), r3.style.display = "flex", r3.style.alignItems = "center", r3.style.justifyContent = "flex-start", r3.style.width = "99%", r3.style.margin = "5px auto";
1465
1573
  const o2 = document.createElement("label"), a2 = document.createElement("input");
1466
- a2.id = `${r}-${t4}-${e5}`, a2.type = "radio", a2.name = `${r}-${t4}`, a2.value = e5, a2.classList.add("magicfeedback-input"), o2.textContent = e5, o2.htmlFor = `${r}-${t4}-${e5}`, n3.appendChild(a2), n3.appendChild(o2), i2.appendChild(n3);
1574
+ a2.id = `${n}-${t4}-${e5}`, a2.type = "radio", a2.name = `${n}-${t4}`, a2.value = e5, a2.classList.add("magicfeedback-input"), o2.textContent = e5, o2.htmlFor = `${n}-${t4}-${e5}`, r3.appendChild(a2), r3.appendChild(o2), i2.appendChild(r3);
1467
1575
  })), e4.appendChild(i2);
1468
1576
  })), s.appendChild(e4);
1469
1577
  } else {
@@ -1471,8 +1579,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
1471
1579
  e4.classList.add("magicfeedback-multi-question-matrix-table");
1472
1580
  const t4 = document.createElement("thead");
1473
1581
  t4.classList.add("magicfeedback-multi-question-matrix-header"), t4.style.paddingBottom = "15px";
1474
- const i2 = document.createElement("tr"), n2 = document.createElement("th");
1475
- i2.appendChild(n2), d.forEach(((e5) => {
1582
+ const i2 = document.createElement("tr"), r2 = document.createElement("th");
1583
+ i2.appendChild(r2), d.forEach(((e5) => {
1476
1584
  const t5 = document.createElement("th");
1477
1585
  t5.textContent = e5, i2.appendChild(t5);
1478
1586
  })), t4.appendChild(i2), e4.appendChild(t4);
@@ -1481,105 +1589,163 @@ var require_magicfeedback_sdk_browser = __commonJS({
1481
1589
  const t5 = document.createElement("tr");
1482
1590
  t5.classList.add("magicfeedback-multi-question-matrix-row-tr");
1483
1591
  const i3 = document.createElement("td");
1484
- i3.style.minWidth = "200px", i3.style.padding = "10px";
1485
- const n3 = document.createElement("label");
1486
- n3.classList.add("magicfeedback-multi-question-matrix-label"), n3.textContent = e5, i3.appendChild(n3), t5.appendChild(i3), d.forEach(((i4) => {
1487
- const n4 = document.createElement("td"), o3 = document.createElement("input");
1488
- o3.type = "radio", o3.name = `${r}-${e5}`, o3.value = i4, o3.id = `${r}-${e5}-${i4}`, o3.classList.add("magicfeedback-input"), n4.appendChild(o3), t5.appendChild(n4);
1592
+ i3.classList.add("magicfeedback-multi-question-matrix-question");
1593
+ const r3 = document.createElement("label");
1594
+ r3.classList.add("magicfeedback-multi-question-matrix-label"), r3.textContent = e5, i3.appendChild(r3), t5.appendChild(i3), d.forEach(((i4) => {
1595
+ const r4 = document.createElement("td"), o3 = document.createElement("input");
1596
+ o3.type = "radio", o3.name = `${n}-${e5}`, o3.value = i4, o3.id = `${n}-${e5}-${i4}`, o3.classList.add("magicfeedback-input");
1597
+ const a2 = document.createElement("label");
1598
+ a2.classList.add("magicfeedback-multi-question-matrix-option-label"), a2.htmlFor = o3.id, a2.textContent = i4, r4.classList.add("magicfeedback-multi-question-matrix-option"), r4.appendChild(o3), r4.appendChild(a2), t5.appendChild(r4);
1489
1599
  })), o2.appendChild(t5);
1490
1600
  })), e4.appendChild(o2), s.appendChild(e4);
1491
1601
  }
1492
1602
  return a.appendChild(s), { element: a, elementTypeClass: "magicfeedback-multi-question-matrix" };
1493
1603
  };
1494
- }, 409: (e2, t2) => {
1604
+ }, 7754: (e2, t2, i) => {
1605
+ "use strict";
1606
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMaxDiff = void 0;
1607
+ const n = i(6658), r = i(7031), o = "http://www.w3.org/2000/svg";
1608
+ t2.renderMaxDiff = ({ question: e3, language: t3, randomPosition: i2 }) => {
1609
+ const { ref: a, value: s, assets: l } = e3, d = document.createElement("div");
1610
+ let c = [...s || []];
1611
+ i2 && (c = c.sort((() => Math.random() - 0.5)));
1612
+ const u = { best: (0, n.parseTitle)(null == l ? void 0 : l.bestLabel, t3) || (0, r.t)(t3, "maxDiff.best"), worst: (0, n.parseTitle)(null == l ? void 0 : l.worstLabel, t3) || (0, r.t)(t3, "maxDiff.worst") }, p = document.createElement("div");
1613
+ p.classList.add("magicfeedback-max-diff-container");
1614
+ const m = Number(null == l ? void 0 : l.setIndex) || 1, h = Number(null == l ? void 0 : l.setCount) || 1;
1615
+ (null == l ? void 0 : l.showSetProgress) && h > 1 && p.appendChild((function(e4, t4, i3) {
1616
+ const n2 = document.createElement("div");
1617
+ n2.classList.add("magicfeedback-max-diff-progress");
1618
+ const o2 = document.createElement("span");
1619
+ o2.classList.add("magicfeedback-max-diff-progress-label"), o2.textContent = (0, r.t)(i3, "maxDiff.setProgress", { k: e4, n: t4 });
1620
+ const a2 = document.createElement("span");
1621
+ a2.classList.add("magicfeedback-max-diff-progress-track"), a2.setAttribute("aria-hidden", "true");
1622
+ const s2 = document.createElement("span");
1623
+ return s2.classList.add("magicfeedback-max-diff-progress-fill"), s2.style.width = `${Math.min(100, e4 / t4 * 100)}%`, a2.appendChild(s2), n2.appendChild(o2), n2.appendChild(a2), n2;
1624
+ })(m, h, t3));
1625
+ const f = document.createElement("table");
1626
+ f.classList.add("magicfeedback-max-diff-table");
1627
+ const g = (e4) => {
1628
+ const t4 = document.createElement("th");
1629
+ t4.scope = "col", t4.classList.add("magicfeedback-max-diff-head", `magicfeedback-max-diff-head-${e4}`);
1630
+ const i3 = document.createElement("span");
1631
+ return i3.classList.add("magicfeedback-max-diff-head-label"), i3.appendChild((function(e5) {
1632
+ const t5 = document.createElementNS(o, "svg");
1633
+ t5.setAttribute("viewBox", "0 0 24 24"), t5.setAttribute("width", "16"), t5.setAttribute("height", "16"), t5.setAttribute("fill", "none"), t5.setAttribute("stroke", "currentColor"), t5.setAttribute("stroke-width", "2.6"), t5.setAttribute("stroke-linecap", "round"), t5.setAttribute("stroke-linejoin", "round"), t5.setAttribute("aria-hidden", "true");
1634
+ const i4 = document.createElementNS(o, "path");
1635
+ return i4.setAttribute("d", "best" === e5 ? "M12 19V5M5 12l7-7 7 7" : "M12 5v14M19 12l-7 7-7-7"), t5.appendChild(i4), t5;
1636
+ })(e4)), i3.appendChild(document.createTextNode(u[e4])), t4.appendChild(i3), t4;
1637
+ }, y = document.createElement("thead"), v = document.createElement("tr"), b = document.createElement("td");
1638
+ b.classList.add("magicfeedback-max-diff-head-spacer"), v.appendChild(g("best")), v.appendChild(b), v.appendChild(g("worst")), y.appendChild(v), f.appendChild(y);
1639
+ const E = (e4, t4, i3) => {
1640
+ const n2 = document.createElement("td");
1641
+ n2.classList.add("magicfeedback-max-diff-cell");
1642
+ const r2 = document.createElement("label");
1643
+ r2.classList.add("magicfeedback-max-diff-pick");
1644
+ const o2 = document.createElement("input");
1645
+ return o2.type = "radio", o2.name = `${a}-${e4}`, o2.value = t4, o2.id = `${a}-${e4}-${i3}`, o2.classList.add("magicfeedback-input", "magicfeedback-max-diff-input", `magicfeedback-max-diff-${e4}`), o2.setAttribute("aria-label", `${t4}: ${u[e4]}`), r2.appendChild(o2), n2.appendChild(r2), n2;
1646
+ }, A = document.createElement("tbody");
1647
+ return c.forEach(((e4, t4) => {
1648
+ const i3 = document.createElement("tr");
1649
+ i3.classList.add("magicfeedback-max-diff-row");
1650
+ const n2 = document.createElement("th");
1651
+ n2.scope = "row", n2.classList.add("magicfeedback-max-diff-item"), n2.textContent = e4, i3.appendChild(E("best", e4, t4)), i3.appendChild(n2), i3.appendChild(E("worst", e4, t4)), A.appendChild(i3);
1652
+ })), f.appendChild(A), f.addEventListener("change", ((e4) => {
1653
+ var t4;
1654
+ const i3 = e4.target;
1655
+ i3.classList.contains("magicfeedback-max-diff-input") && (null === (t4 = i3.closest("tr")) || void 0 === t4 || t4.querySelectorAll(".magicfeedback-max-diff-input").forEach(((e5) => {
1656
+ e5 !== i3 && (e5.checked = false);
1657
+ })));
1658
+ })), p.appendChild(f), d.appendChild(p), { element: d, elementTypeClass: "magicfeedback-max-diff" };
1659
+ };
1660
+ }, 5963: (e2, t2, i) => {
1495
1661
  "use strict";
1496
- Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMultipleChoiceImage = void 0, t2.renderMultipleChoiceImage = ({ question: e3, randomPosition: t3, urlParamValue: i, send: r }) => {
1497
- const n = document.createElement("div"), { ref: o, assets: a } = e3;
1498
- let s = [...e3.value];
1499
- const l = document.createElement("div");
1500
- l.classList.add("magicfeedback-multiple-choice-image-container"), l.style.display = "flex", l.style.flexDirection = "row", l.style.flexWrap = "wrap", l.style.justifyContent = "center";
1501
- const d = s.length;
1502
- let c = 1, u = 1;
1503
- if (window.innerWidth < 600) c = 1, u = d;
1504
- else switch (d) {
1662
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMultipleChoiceImage = void 0;
1663
+ const n = i(2139);
1664
+ t2.renderMultipleChoiceImage = ({ question: e3, randomPosition: t3, urlParamValue: i2, send: r }) => {
1665
+ const o = document.createElement("div"), { ref: a, assets: s } = e3;
1666
+ let l = [...e3.value];
1667
+ const d = document.createElement("div");
1668
+ d.classList.add("magicfeedback-multiple-choice-image-container"), d.style.display = "flex", d.style.flexDirection = "row", d.style.flexWrap = "wrap", d.style.justifyContent = "center";
1669
+ const c = l.length;
1670
+ let u = 1, p = 1;
1671
+ if (window.innerWidth < 600) u = 1, p = c;
1672
+ else switch (c) {
1505
1673
  case 1:
1506
1674
  case 2:
1507
1675
  case 3:
1508
- c = d, u = 1;
1676
+ u = c, p = 1;
1509
1677
  break;
1510
1678
  case 4:
1511
1679
  case 5:
1512
1680
  case 6:
1513
- u = 2, c = Math.ceil(d / u);
1681
+ p = 2, u = Math.ceil(c / p);
1514
1682
  break;
1515
1683
  case 7:
1516
1684
  case 8:
1517
1685
  case 9:
1518
- u = 3, c = Math.ceil(d / u);
1686
+ p = 3, u = Math.ceil(c / p);
1519
1687
  break;
1520
1688
  default:
1521
- u = 4, c = Math.ceil(d / u);
1689
+ p = 4, u = Math.ceil(c / p);
1522
1690
  }
1523
- const p = void 0 !== (null == a ? void 0 : a.addTitle) && (null == a ? void 0 : a.addTitle), m = void 0 !== (null == a ? void 0 : a.multiOption) && (null == a ? void 0 : a.multiOption), h = void 0 !== (null == a ? void 0 : a.extraOption) && (null == a ? void 0 : a.extraOption);
1524
- function f(e4) {
1691
+ const m = void 0 !== (null == s ? void 0 : s.addTitle) && (null == s ? void 0 : s.addTitle), h = void 0 !== (null == s ? void 0 : s.multiOption) && (null == s ? void 0 : s.multiOption), f = void 0 !== (null == s ? void 0 : s.extraOption) && (null == s ? void 0 : s.extraOption);
1692
+ function g(e4) {
1525
1693
  try {
1526
- const { position: t4, url: n2, value: a2 } = e4, s2 = document.createElement("div");
1527
- s2.classList.add("magicfeedback-multiple-choice-image-option"), s2.style.width = `calc(100% / ${c} - 2px)`, s2.style.height = `calc(100% / ${u} - 2px)`, s2.style.padding = "8px", s2.style.margin = "0";
1528
- const d2 = document.createElement("label");
1529
- d2.classList.add("magicfeedback-image-option-label-container"), d2.htmlFor = `rating-${o}-${t4}`, d2.style.cursor = "pointer", d2.addEventListener("click", (() => {
1530
- d2.style.border = "2px solid #000";
1531
- }));
1532
- const h2 = document.createElement("label");
1533
- h2.textContent = a2, h2.classList.add("magicfeedback-multiple-choice-image-label");
1534
- const f2 = document.createElement("input");
1535
- f2.id = `rating-${o}-${t4}`, f2.type = m ? "checkbox" : "radio", f2.name = o, f2.value = a2, f2.style.position = "absolute", f2.style.opacity = "0", f2.style.width = "0", f2.style.height = "0", f2.classList.add("magicfeedback-input"), i && i === f2.value && (f2.checked = true), !m && r && f2.addEventListener("change", (() => {
1536
- r();
1694
+ const { position: t4, url: o2, value: s2 } = e4, l2 = document.createElement("div");
1695
+ l2.classList.add("magicfeedback-multiple-choice-image-option"), l2.style.width = `calc(100% / ${u} - 2px)`, l2.style.height = `calc(100% / ${p} - 2px)`, l2.style.padding = "8px", l2.style.margin = "0";
1696
+ const c2 = document.createElement("label");
1697
+ c2.classList.add("magicfeedback-image-option-label-container"), c2.htmlFor = `rating-${a}-${t4}`, c2.style.cursor = "pointer", c2.addEventListener("click", (() => {
1698
+ c2.style.border = "2px solid #000";
1537
1699
  }));
1538
- const g = document.createElement("img");
1539
- g.classList.add("magicfeedback-multiple-choice-image-image"), g.src = n2, g.style.cursor = "pointer", g.style.backgroundSize = "cover", g.style.backgroundPosition = "center", g.style.width = "100%", g.style.height = "100%", g.style.objectFit = "cover", g.style.margin = "auto", d2.appendChild(f2), d2.appendChild(g), p && d2.appendChild(h2), s2.appendChild(d2), l.appendChild(s2);
1700
+ const f2 = document.createElement("label");
1701
+ f2.textContent = s2, f2.classList.add("magicfeedback-multiple-choice-image-label");
1702
+ const g2 = document.createElement("input");
1703
+ g2.id = `rating-${a}-${t4}`, g2.type = h ? "checkbox" : "radio", g2.name = a, g2.value = s2, g2.style.position = "absolute", g2.style.opacity = "0", g2.style.width = "0", g2.style.height = "0", g2.classList.add("magicfeedback-input"), i2 && i2 === g2.value && (g2.checked = true), h || (0, n.autoAdvanceOn)(g2, r);
1704
+ const y = document.createElement("img");
1705
+ y.classList.add("magicfeedback-multiple-choice-image-image"), y.src = o2, y.style.cursor = "pointer", y.style.backgroundSize = "cover", y.style.backgroundPosition = "center", y.style.width = "100%", y.style.height = "100%", y.style.objectFit = "cover", y.style.margin = "auto", c2.appendChild(g2), c2.appendChild(y), m && c2.appendChild(f2), l2.appendChild(c2), d.appendChild(l2);
1540
1706
  } catch (e5) {
1541
1707
  console.error(e5);
1542
1708
  }
1543
1709
  }
1544
- return t3 && (s = s.sort((() => Math.random() - 0.5))), s.forEach(((e4) => f(JSON.parse(e4)))), h && (null == a ? void 0 : a.extraOptionValue) && (null == a ? void 0 : a.extraOptionValue.length) > 0 && f(null == a ? void 0 : a.extraOptionValue[0]), n.appendChild(l), { element: n, elementTypeClass: "magicfeedback-multiple-choice-image" };
1710
+ return t3 && (l = l.sort((() => Math.random() - 0.5))), l.forEach(((e4) => g(JSON.parse(e4)))), f && (null == s ? void 0 : s.extraOptionValue) && (null == s ? void 0 : s.extraOptionValue.length) > 0 && g(null == s ? void 0 : s.extraOptionValue[0]), o.appendChild(d), { element: o, elementTypeClass: "magicfeedback-multiple-choice-image" };
1545
1711
  };
1546
- }, 732: (e2, t2, i) => {
1712
+ }, 6054: (e2, t2, i) => {
1547
1713
  "use strict";
1548
1714
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderNumber = void 0;
1549
- const r = i(784), n = i(516);
1715
+ const n = i(9930), r = i(6658);
1550
1716
  t2.renderNumber = ({ question: e3, format: t3, language: i2, urlParamValue: o }) => {
1551
1717
  const a = document.createElement("input");
1552
- a.type = "number", a.placeholder = "slim" === t3 ? (0, n.parseTitle)(e3.title, i2) : r.placeholder.number(i2 || "en");
1718
+ a.type = "number", a.placeholder = "slim" === t3 ? (0, r.parseTitle)(e3.title, i2) : n.placeholder.number(i2 || "en");
1553
1719
  const { value: s } = e3;
1554
1720
  return s.length && (s.sort(((e4, t4) => Number(e4) - Number(t4))), a.max = s[s.length - 1], a.min = s[0], a.value = s[0]), o && !isNaN(Number(o)) && (a.value = o), { element: a, elementTypeClass: "magicfeedback-number" };
1555
1721
  };
1556
- }, 180: (e2, t2, i) => {
1722
+ }, 4310: (e2, t2, i) => {
1557
1723
  "use strict";
1558
1724
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPassword = void 0;
1559
- const r = i(784);
1725
+ const n = i(9930);
1560
1726
  t2.renderPassword = ({ language: e3, placeholderText: t3, urlParamValue: i2 }) => {
1561
- const n = document.createElement("input");
1562
- return n.type = "password", n.placeholder = t3 || r.placeholder.password(e3 || "en"), i2 && (n.value = i2), { element: n, elementTypeClass: "magicfeedback-password" };
1727
+ const r = document.createElement("input");
1728
+ return r.type = "password", r.placeholder = t3 || n.placeholder.password(e3 || "en"), i2 && (r.value = i2), { element: r, elementTypeClass: "magicfeedback-password" };
1563
1729
  };
1564
- }, 66: (e2, t2, i) => {
1730
+ }, 1732: (e2, t2, i) => {
1565
1731
  "use strict";
1566
1732
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPointSystem = void 0;
1567
- const r = i(784);
1733
+ const n = i(9930);
1568
1734
  t2.renderPointSystem = ({ question: e3, language: t3 }) => {
1569
- const { ref: i2, value: n } = e3, o = document.createElement("div"), a = document.createElement("div");
1735
+ const { ref: i2, value: r } = e3, o = document.createElement("div"), a = document.createElement("div");
1570
1736
  a.classList.add("magicfeedback-point-system-container");
1571
1737
  const s = document.createElement("ul");
1572
1738
  s.classList.add("magicfeedback-point-system-list"), s.style.padding = "0";
1573
- const l = 100 / n.length, d = document.createElement("div");
1574
- d.classList.add("magicfeedback-error"), d.textContent = r.placeholder.pointsystemerror(t3 || "en"), d.style.color = "#C70039", d.style.fontSize = "14px", d.style.textAlign = "end", d.style.width = "100%", d.style.display = "none";
1739
+ const l = 100 / r.length, d = document.createElement("div");
1740
+ d.classList.add("magicfeedback-error"), d.textContent = n.placeholder.pointsystemerror(t3 || "en"), d.style.color = "#C70039", d.style.fontSize = "14px", d.style.textAlign = "end", d.style.width = "100%", d.style.display = "none";
1575
1741
  const c = document.createElement("div");
1576
1742
  c.classList.add("magicfeedback-point-system-total"), c.style.textAlign = "end", c.style.fontSize = "15px", c.style.marginTop = "5px";
1577
1743
  const u = document.createElement("bdi");
1578
- return u.setAttribute("dir", "ltr"), u.textContent = "0 / 100 %", c.appendChild(u), n.forEach(((e4, t4) => {
1579
- const r2 = document.createElement("li");
1580
- r2.classList.add("magicfeedback-point-system-item"), r2.style.display = "flex", r2.style.justifyContent = "space-between", r2.style.alignItems = "center", r2.style.margin = "5px";
1581
- const n2 = document.createElement("label");
1582
- n2.textContent = e4, n2.style.fontSize = "15px", r2.appendChild(n2);
1744
+ return u.setAttribute("dir", "ltr"), u.textContent = "0 / 100 %", c.appendChild(u), r.forEach(((e4, t4) => {
1745
+ const n2 = document.createElement("li");
1746
+ n2.classList.add("magicfeedback-point-system-item"), n2.style.display = "flex", n2.style.justifyContent = "space-between", n2.style.alignItems = "center", n2.style.margin = "5px";
1747
+ const r2 = document.createElement("label");
1748
+ r2.textContent = e4, r2.style.fontSize = "15px", n2.appendChild(r2);
1583
1749
  const o2 = document.createElement("span");
1584
1750
  o2.classList.add("magicfeedback-point-system-input-container");
1585
1751
  const a2 = document.createElement("input");
@@ -1602,17 +1768,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
1602
1768
  t5 += Number(e7.value);
1603
1769
  })), t5 < 100 && (d.style.display = "block");
1604
1770
  })));
1605
- })), o2.appendChild(a2), o2.appendChild(p), r2.appendChild(o2), s.appendChild(r2);
1771
+ })), o2.appendChild(a2), o2.appendChild(p), n2.appendChild(o2), s.appendChild(n2);
1606
1772
  })), a.appendChild(s), a.appendChild(c), a.appendChild(d), o.appendChild(a), { element: o, elementTypeClass: "magicfeedback-point-system" };
1607
1773
  };
1608
- }, 773: (e2, t2, i) => {
1774
+ }, 2427: (e2, t2, i) => {
1609
1775
  "use strict";
1610
1776
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPriorityList = void 0;
1611
- const r = i(881);
1777
+ const n = i(7031);
1612
1778
  t2.renderPriorityList = ({ question: e3, randomPosition: t3, language: i2 }) => {
1613
- var n, o, a;
1779
+ var r, o, a;
1614
1780
  const s = document.createElement("div"), l = (function(e4) {
1615
- const { value: t4, ref: i3, randomPosition: n2 = false, limitPriority: o2 = false, maxPriority: a2 = 0, language: s2 = "en", placeholder: l2 = "" } = e4, d = (e5) => (0, r.t)(s2, "priority." + e5), c = document.createElement("div");
1781
+ const { value: t4, ref: i3, randomPosition: r2 = false, limitPriority: o2 = false, maxPriority: a2 = 0, language: s2 = "en", placeholder: l2 = "" } = e4, d = (e5) => (0, n.t)(s2, "priority." + e5), c = document.createElement("div");
1616
1782
  if (c.classList.add("magicfeedback-priority-list-container"), o2 && a2 && a2 > 0) {
1617
1783
  const e5 = [], o3 = document.createElement("div");
1618
1784
  o3.classList.add("magicfeedback-priority-list-header");
@@ -1625,48 +1791,48 @@ var require_magicfeedback_sdk_browser = __commonJS({
1625
1791
  const h = document.createElement("ul");
1626
1792
  h.classList.add("magicfeedback-priority-list-list"), m.appendChild(h);
1627
1793
  const f = () => {
1628
- h.innerHTML = "", e5.forEach(((t5, r2) => {
1629
- const n3 = document.createElement("li");
1630
- n3.classList.add("magicfeedback-priority-list-item");
1794
+ h.innerHTML = "", e5.forEach(((t5, n2) => {
1795
+ const r3 = document.createElement("li");
1796
+ r3.classList.add("magicfeedback-priority-list-item");
1631
1797
  const o4 = document.createElement("input");
1632
- o4.classList.add("magicfeedback-input-magicfeedback-priority-list"), o4.classList.add("magicfeedback-input"), o4.type = "hidden", o4.id = `priority-list-${i3}`, o4.name = i3, o4.value = `${r2 + 1}. ${t5}`, n3.appendChild(o4);
1798
+ o4.classList.add("magicfeedback-input-magicfeedback-priority-list"), o4.classList.add("magicfeedback-input"), o4.type = "hidden", o4.id = `priority-list-${i3}`, o4.name = i3, o4.value = `${n2 + 1}. ${t5}`, r3.appendChild(o4);
1633
1799
  const a3 = document.createElement("label");
1634
- a3.classList.add("magicfeedback-priority-list-item-label"), a3.textContent = `${r2 + 1}. ${t5}`, n3.appendChild(a3);
1800
+ a3.classList.add("magicfeedback-priority-list-item-label"), a3.textContent = `${n2 + 1}. ${t5}`, r3.appendChild(a3);
1635
1801
  const s3 = document.createElement("div");
1636
1802
  s3.classList.add("magicfeedback-priority-list-arrows");
1637
1803
  const l3 = document.createElement("img");
1638
- l3.classList.add("magicfeedback-priority-list-arrow-up"), l3.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", l3.style.visibility = 0 === r2 ? "hidden" : "visible";
1804
+ l3.classList.add("magicfeedback-priority-list-arrow-up"), l3.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", l3.style.visibility = 0 === n2 ? "hidden" : "visible";
1639
1805
  const d2 = document.createElement("img");
1640
- d2.classList.add("magicfeedback-priority-list-arrow-down"), d2.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", d2.style.transform = "rotate(180deg)", d2.style.visibility = r2 === e5.length - 1 ? "hidden" : "visible", l3.addEventListener("click", (() => {
1641
- var i4, r3, s4, c2;
1642
- const u3 = n3.previousElementSibling;
1806
+ d2.classList.add("magicfeedback-priority-list-arrow-down"), d2.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", d2.style.transform = "rotate(180deg)", d2.style.visibility = n2 === e5.length - 1 ? "hidden" : "visible", l3.addEventListener("click", (() => {
1807
+ var i4, n3, s4, c2;
1808
+ const u3 = r3.previousElementSibling;
1643
1809
  if (u3) {
1644
1810
  const p3 = Number(null === (i4 = o4.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) - 1;
1645
1811
  o4.value = `${p3}. ${t5}`, a3.textContent = `${p3}. ${t5}`, l3.style.visibility = 1 === p3 ? "hidden" : "visible", d2.style.visibility = p3 === e5.length ? "hidden" : "visible";
1646
1812
  const m2 = u3.querySelector(".magicfeedback-input-magicfeedback-priority-list"), f2 = u3.querySelector(".magicfeedback-priority-list-item-label"), g2 = u3.querySelector(".magicfeedback-priority-list-arrow-up"), y2 = u3.querySelector(".magicfeedback-priority-list-arrow-down");
1647
1813
  if (m2 && f2 && g2 && y2) {
1648
- const t6 = Number(null === (r3 = m2.value) || void 0 === r3 ? void 0 : r3.split(".")[0]) + 1;
1814
+ const t6 = Number(null === (n3 = m2.value) || void 0 === n3 ? void 0 : n3.split(".")[0]) + 1;
1649
1815
  m2.value = `${t6}.${null === (s4 = f2.textContent) || void 0 === s4 ? void 0 : s4.split(".")[1]}`, f2.textContent = `${t6}.${null === (c2 = f2.textContent) || void 0 === c2 ? void 0 : c2.split(".")[1]}`, g2.style.visibility = 1 === t6 ? "hidden" : "visible", y2.style.visibility = t6 === e5.length ? "hidden" : "visible";
1650
1816
  }
1651
- h.insertBefore(n3, u3);
1817
+ h.insertBefore(r3, u3);
1652
1818
  }
1653
1819
  })), d2.addEventListener("click", (() => {
1654
- var i4, r3, s4;
1655
- const c2 = n3.nextElementSibling;
1820
+ var i4, n3, s4;
1821
+ const c2 = r3.nextElementSibling;
1656
1822
  if (c2) {
1657
1823
  const u3 = Number(null === (i4 = o4.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) + 1;
1658
1824
  o4.value = `${u3}. ${t5}`, a3.textContent = `${u3}. ${t5}`, l3.style.visibility = 1 === u3 ? "hidden" : "visible", d2.style.visibility = u3 === e5.length ? "hidden" : "visible";
1659
1825
  const p3 = c2.querySelector(".magicfeedback-input-magicfeedback-priority-list"), m2 = c2.querySelector(".magicfeedback-priority-list-item-label"), f2 = c2.querySelector(".magicfeedback-priority-list-arrow-up"), g2 = c2.querySelector(".magicfeedback-priority-list-arrow-down");
1660
1826
  if (p3 && m2 && f2 && g2) {
1661
1827
  const t6 = Number(p3.value.split(".")[0]) - 1;
1662
- p3.value = `${t6}.${null === (r3 = m2.textContent) || void 0 === r3 ? void 0 : r3.split(".")[1]}`, m2.textContent = `${t6}.${null === (s4 = m2.textContent) || void 0 === s4 ? void 0 : s4.split(".")[1]}`, f2.style.visibility = 1 === t6 ? "hidden" : "visible", g2.style.visibility = t6 === e5.length ? "hidden" : "visible";
1828
+ p3.value = `${t6}.${null === (n3 = m2.textContent) || void 0 === n3 ? void 0 : n3.split(".")[1]}`, m2.textContent = `${t6}.${null === (s4 = m2.textContent) || void 0 === s4 ? void 0 : s4.split(".")[1]}`, f2.style.visibility = 1 === t6 ? "hidden" : "visible", g2.style.visibility = t6 === e5.length ? "hidden" : "visible";
1663
1829
  }
1664
- h.insertBefore(c2, n3);
1830
+ h.insertBefore(c2, r3);
1665
1831
  }
1666
- })), s3.appendChild(l3), s3.appendChild(d2), n3.appendChild(s3), h.appendChild(n3);
1832
+ })), s3.appendChild(l3), s3.appendChild(d2), r3.appendChild(s3), h.appendChild(r3);
1667
1833
  }));
1668
1834
  }, g = document.createElement("div");
1669
- g.classList.add("magicfeedback-modal-backdrop"), g.setAttribute("dir", (0, r.isRtlLanguage)(s2) ? "rtl" : "ltr"), g.style.position = "fixed", g.style.top = "0", g.style.left = "0", g.style.width = "100vw", g.style.height = "100vh", g.style.background = "rgba(0,0,0,0.4)", g.style.display = "none", g.style.alignItems = "center", g.style.justifyContent = "center", g.style.zIndex = "9999";
1835
+ g.classList.add("magicfeedback-modal-backdrop"), g.setAttribute("dir", (0, n.isRtlLanguage)(s2) ? "rtl" : "ltr"), g.style.position = "fixed", g.style.top = "0", g.style.left = "0", g.style.width = "100vw", g.style.height = "100vh", g.style.background = "rgba(0,0,0,0.4)", g.style.display = "none", g.style.alignItems = "center", g.style.justifyContent = "center", g.style.zIndex = "9999";
1670
1836
  const y = document.createElement("div");
1671
1837
  y.classList.add("magicfeedback-modal"), y.style.background = "#fff", y.style.borderRadius = "8px", y.style.boxShadow = "0 8px 24px rgba(0,0,0,0.2)", y.style.maxWidth = "520px", y.style.width = "90%", y.style.maxHeight = "80vh", y.style.display = "flex", y.style.flexDirection = "column", y.style.overflow = "hidden", y.style.padding = "16px", y.style.position = "relative";
1672
1838
  const v = document.createElement("h5");
@@ -1675,17 +1841,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
1675
1841
  v.textContent = `${d("selectOptionNumber")}${b()}`;
1676
1842
  };
1677
1843
  E();
1678
- const k = document.createElement("div");
1679
- k.classList.add("magicfeedback-modal-list"), k.style.flex = "1 1 auto", k.style.overflowY = "auto", k.style.minHeight = "0", (n2 ? [...t4].sort((() => Math.random() - 0.5)) : [...t4]).forEach(((t5) => {
1680
- const r2 = document.createElement("label");
1681
- r2.classList.add("magicfeedback-modal-row");
1682
- const n3 = document.createElement("input");
1683
- n3.type = "checkbox", n3.classList.add("magicfeedback-input"), n3.name = `${i3}-selection`, n3.value = t5;
1844
+ const A = document.createElement("div");
1845
+ A.classList.add("magicfeedback-modal-list"), A.style.flex = "1 1 auto", A.style.overflowY = "auto", A.style.minHeight = "0", (r2 ? [...t4].sort((() => Math.random() - 0.5)) : [...t4]).forEach(((t5) => {
1846
+ const n2 = document.createElement("label");
1847
+ n2.classList.add("magicfeedback-modal-row");
1848
+ const r3 = document.createElement("input");
1849
+ r3.type = "checkbox", r3.classList.add("magicfeedback-input"), r3.name = `${i3}-selection`, r3.value = t5;
1684
1850
  const o4 = document.createElement("span");
1685
- o4.textContent = t5, n3.addEventListener("change", (() => {
1686
- if (n3.checked) {
1687
- if (e5.length >= a2) return n3.checked = false, r2.classList.add("magicfeedback-warning"), void setTimeout((() => {
1688
- r2.classList.remove("magicfeedback-warning");
1851
+ o4.textContent = t5, r3.addEventListener("change", (() => {
1852
+ if (r3.checked) {
1853
+ if (e5.length >= a2) return r3.checked = false, n2.classList.add("magicfeedback-warning"), void setTimeout((() => {
1854
+ n2.classList.remove("magicfeedback-warning");
1689
1855
  }), 800);
1690
1856
  e5.push(t5);
1691
1857
  } else {
@@ -1693,10 +1859,10 @@ var require_magicfeedback_sdk_browser = __commonJS({
1693
1859
  -1 !== i4 && e5.splice(i4, 1);
1694
1860
  }
1695
1861
  E(), C();
1696
- })), r2.appendChild(n3), r2.appendChild(o4), k.appendChild(r2);
1862
+ })), n2.appendChild(r3), n2.appendChild(o4), A.appendChild(n2);
1697
1863
  }));
1698
- const A = document.createElement("div");
1699
- A.classList.add("magicfeedback-modal-actions"), A.style.flexShrink = "0";
1864
+ const k = document.createElement("div");
1865
+ k.classList.add("magicfeedback-modal-actions"), k.style.flexShrink = "0";
1700
1866
  const T = document.createElement("div");
1701
1867
  T.classList.add("magicfeedback-modal-counter");
1702
1868
  const C = () => {
@@ -1704,206 +1870,202 @@ var require_magicfeedback_sdk_browser = __commonJS({
1704
1870
  T.textContent = `${d("prioritized")} ${e5.length} ${t5} ${a2}`, u2.style.display = e5.length > 0 ? "block" : "none";
1705
1871
  };
1706
1872
  C();
1707
- const L = document.createElement("button");
1708
- L.type = "button", L.classList.add("magicfeedback-modal-close"), L.setAttribute("aria-label", d("cancel")), L.title = d("cancel"), L.textContent = "\xD7", L.style.position = "absolute", L.style.top = "8px", L.style.setProperty("inset-inline-end", "8px"), L.style.border = "none", L.style.background = "transparent", L.style.fontSize = "24px", L.style.cursor = "pointer";
1709
- const x = () => {
1873
+ const x = document.createElement("button");
1874
+ x.type = "button", x.classList.add("magicfeedback-modal-close"), x.setAttribute("aria-label", d("cancel")), x.title = d("cancel"), x.textContent = "\xD7", x.style.position = "absolute", x.style.top = "8px", x.style.setProperty("inset-inline-end", "8px"), x.style.border = "none", x.style.background = "transparent", x.style.fontSize = "24px", x.style.cursor = "pointer";
1875
+ const P = () => {
1710
1876
  document.body.appendChild(g), g.style.display = "flex", E(), C();
1711
- }, S = () => {
1877
+ }, L = () => {
1712
1878
  g.style.display = "none", c.appendChild(g);
1713
1879
  };
1714
- L.addEventListener("click", (() => {
1715
- S();
1880
+ x.addEventListener("click", (() => {
1881
+ L();
1716
1882
  }));
1717
- const O = document.createElement("button");
1718
- return O.type = "button", O.textContent = d("confirm"), O.classList.add("magicfeedback-button"), O.classList.add("magicfeedback-button-primary"), O.addEventListener("click", (() => {
1719
- S(), f();
1720
- })), A.appendChild(T), A.appendChild(O), y.appendChild(L), y.appendChild(v), y.appendChild(k), y.appendChild(A), g.appendChild(y), p2.addEventListener("click", (() => {
1721
- x();
1883
+ const S = document.createElement("button");
1884
+ return S.type = "button", S.textContent = d("confirm"), S.classList.add("magicfeedback-button"), S.classList.add("magicfeedback-button-primary"), S.addEventListener("click", (() => {
1885
+ L(), f();
1886
+ })), k.appendChild(T), k.appendChild(S), y.appendChild(x), y.appendChild(v), y.appendChild(A), y.appendChild(k), g.appendChild(y), p2.addEventListener("click", (() => {
1887
+ P();
1722
1888
  })), g.addEventListener("click", ((e6) => {
1723
- e6.target === g && S();
1889
+ e6.target === g && L();
1724
1890
  })), c.appendChild(o3), c.appendChild(m), c.appendChild(g), f(), c;
1725
1891
  }
1726
1892
  const u = document.createElement("ul");
1727
1893
  u.classList.add("magicfeedback-priority-list-list");
1728
- const p = n2 ? [...t4].sort((() => Math.random() - 0.5)) : [...t4];
1894
+ const p = r2 ? [...t4].sort((() => Math.random() - 0.5)) : [...t4];
1729
1895
  return p.forEach(((e5, t5) => {
1730
- const r2 = document.createElement("li");
1731
- r2.classList.add("magicfeedback-priority-list-item"), r2.style.display = "flex", r2.style.justifyContent = "space-between", r2.style.alignItems = "center", r2.style.margin = "5px";
1732
- const n3 = document.createElement("input");
1733
- n3.classList.add("magicfeedback-input-magicfeedback-priority-list"), n3.classList.add("magicfeedback-input"), n3.type = "hidden", n3.id = `priority-list-${i3}`, n3.name = i3, n3.value = `${t5 + 1}. ${e5}`, r2.appendChild(n3);
1896
+ const n2 = document.createElement("li");
1897
+ n2.classList.add("magicfeedback-priority-list-item"), n2.style.display = "flex", n2.style.justifyContent = "space-between", n2.style.alignItems = "center", n2.style.margin = "5px";
1898
+ const r3 = document.createElement("input");
1899
+ r3.classList.add("magicfeedback-input-magicfeedback-priority-list"), r3.classList.add("magicfeedback-input"), r3.type = "hidden", r3.id = `priority-list-${i3}`, r3.name = i3, r3.value = `${t5 + 1}. ${e5}`, n2.appendChild(r3);
1734
1900
  const o3 = document.createElement("label");
1735
- o3.classList.add("magicfeedback-priority-list-item-label"), o3.textContent = `${t5 + 1}. ${e5}`, r2.appendChild(o3);
1901
+ o3.classList.add("magicfeedback-priority-list-item-label"), o3.textContent = `${t5 + 1}. ${e5}`, n2.appendChild(o3);
1736
1902
  const a3 = document.createElement("div");
1737
1903
  a3.style.display = "flex", a3.style.alignItems = "center", a3.style.justifyContent = "space-between";
1738
1904
  const s3 = document.createElement("img");
1739
1905
  s3.classList.add("magicfeedback-priority-list-arrow-up"), s3.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", s3.style.width = "20px", s3.style.height = "20px", s3.style.cursor = "pointer", s3.style.margin = "0 5px", s3.style.color = "#000", s3.style.visibility = 0 === t5 ? "hidden" : "visible", s3.addEventListener("click", (() => {
1740
1906
  var t6, i4, a4, d2;
1741
- const c2 = r2.previousElementSibling;
1907
+ const c2 = n2.previousElementSibling;
1742
1908
  if (c2) {
1743
- const m = Number(null === (t6 = n3.value) || void 0 === t6 ? void 0 : t6.split(".")[0]) - 1;
1744
- n3.value = `${m}. ${e5}`, o3.textContent = `${m}. ${e5}`, s3.style.visibility = 1 === m ? "hidden" : "visible", l3.style.visibility = m === p.length ? "hidden" : "visible";
1909
+ const m = Number(null === (t6 = r3.value) || void 0 === t6 ? void 0 : t6.split(".")[0]) - 1;
1910
+ r3.value = `${m}. ${e5}`, o3.textContent = `${m}. ${e5}`, s3.style.visibility = 1 === m ? "hidden" : "visible", l3.style.visibility = m === p.length ? "hidden" : "visible";
1745
1911
  const h = c2.querySelector(".magicfeedback-input-magicfeedback-priority-list"), f = c2.querySelector(".magicfeedback-priority-list-item-label"), g = c2.querySelector(".magicfeedback-priority-list-arrow-up"), y = c2.querySelector(".magicfeedback-priority-list-arrow-down");
1746
1912
  if (h && f && g && y) {
1747
1913
  const e6 = Number(null === (i4 = h.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) + 1;
1748
1914
  h.value = `${e6}.${null === (a4 = f.textContent) || void 0 === a4 ? void 0 : a4.split(".")[1]}`, f.textContent = `${e6}.${null === (d2 = f.textContent) || void 0 === d2 ? void 0 : d2.split(".")[1]}`, g.style.visibility = 1 === e6 ? "hidden" : "visible", y.style.visibility = e6 === p.length ? "hidden" : "visible";
1749
1915
  }
1750
- u.insertBefore(r2, c2);
1916
+ u.insertBefore(n2, c2);
1751
1917
  }
1752
1918
  }));
1753
1919
  const l3 = document.createElement("img");
1754
1920
  l3.classList.add("magicfeedback-priority-list-arrow-down"), l3.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", l3.style.width = "20px", l3.style.height = "20px", l3.style.cursor = "pointer", l3.style.margin = "0 5px", l3.style.color = "#000", l3.style.transform = "rotate(180deg)", l3.style.visibility = t5 === p.length - 1 ? "hidden" : "visible", l3.addEventListener("click", (() => {
1755
1921
  var t6, i4, a4;
1756
- const d2 = r2.nextElementSibling;
1922
+ const d2 = n2.nextElementSibling;
1757
1923
  if (d2) {
1758
- const c2 = Number(null === (t6 = n3.value) || void 0 === t6 ? void 0 : t6.split(".")[0]) + 1;
1759
- n3.value = `${c2}. ${e5}`, o3.textContent = `${c2}. ${e5}`, s3.style.visibility = 1 === c2 ? "hidden" : "visible", l3.style.visibility = c2 === p.length ? "hidden" : "visible";
1924
+ const c2 = Number(null === (t6 = r3.value) || void 0 === t6 ? void 0 : t6.split(".")[0]) + 1;
1925
+ r3.value = `${c2}. ${e5}`, o3.textContent = `${c2}. ${e5}`, s3.style.visibility = 1 === c2 ? "hidden" : "visible", l3.style.visibility = c2 === p.length ? "hidden" : "visible";
1760
1926
  const m = d2.querySelector(".magicfeedback-input-magicfeedback-priority-list"), h = d2.querySelector(".magicfeedback-priority-list-item-label"), f = d2.querySelector(".magicfeedback-priority-list-arrow-up"), g = d2.querySelector(".magicfeedback-priority-list-arrow-down");
1761
1927
  if (m && h && f && g) {
1762
1928
  const e6 = Number(m.value.split(".")[0]) - 1;
1763
1929
  m.value = `${e6}.${null === (i4 = h.textContent) || void 0 === i4 ? void 0 : i4.split(".")[1]}`, h.textContent = `${e6}.${null === (a4 = h.textContent) || void 0 === a4 ? void 0 : a4.split(".")[1]}`, f.style.visibility = 1 === e6 ? "hidden" : "visible", g.style.visibility = e6 === p.length ? "hidden" : "visible";
1764
1930
  }
1765
- u.insertBefore(d2, r2);
1931
+ u.insertBefore(d2, n2);
1766
1932
  }
1767
- })), a3.appendChild(s3), a3.appendChild(l3), r2.appendChild(a3), u.appendChild(r2);
1933
+ })), a3.appendChild(s3), a3.appendChild(l3), n2.appendChild(a3), u.appendChild(n2);
1768
1934
  })), c.appendChild(u), c;
1769
- })({ value: e3.value, ref: e3.ref, randomPosition: t3, limitPriority: (null === (n = e3.assets) || void 0 === n ? void 0 : n.limitPriority) || false, maxPriority: (null === (o = e3.assets) || void 0 === o ? void 0 : o.maxPriority) || 0, placeholder: (null === (a = e3.assets) || void 0 === a ? void 0 : a.placeholder) || "", language: i2 || "en" });
1935
+ })({ value: e3.value, ref: e3.ref, randomPosition: t3, limitPriority: (null === (r = e3.assets) || void 0 === r ? void 0 : r.limitPriority) || false, maxPriority: (null === (o = e3.assets) || void 0 === o ? void 0 : o.maxPriority) || 0, placeholder: (null === (a = e3.assets) || void 0 === a ? void 0 : a.placeholder) || "", language: i2 || "en" });
1770
1936
  return s.appendChild(l), { element: s, elementTypeClass: "magicfeedback-priority-list" };
1771
1937
  };
1772
- }, 152: (e2, t2, i) => {
1938
+ }, 8822: (e2, t2, i) => {
1773
1939
  "use strict";
1774
1940
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingEmoji = void 0;
1775
- const r = i(559), n = "https://survey-dev.magicfeedback.io/assets/emojis";
1776
- t2.renderRatingEmoji = ({ question: e3, url: t3, send: i2, urlParamValue: o }) => {
1777
- const { ref: a, assets: s } = e3, l = document.createElement("div"), d = "magicfeedback-rating", c = document.createElement("div");
1778
- c.classList.add("magicfeedback-rating-container");
1779
- const u = (null == s ? void 0 : s.max) ? Number(null == s ? void 0 : s.max) : 5, p = (null == s ? void 0 : s.min) ? Number(null == s ? void 0 : s.min) : 1, m = (0, r.createRatingPlaceholder)(null == s ? void 0 : s.minPlaceholder, null == s ? void 0 : s.maxPlaceholder);
1780
- for (let e4 = p; e4 <= u; e4++) {
1781
- const r2 = document.createElement("div");
1782
- r2.classList.add("magicfeedback-rating-option");
1783
- const s2 = document.createElement("label");
1784
- s2.htmlFor = `rating-${a}-${e4}`, s2.classList.add("magicfeedback-rating-option-label-container");
1941
+ const n = i(1433), r = i(2139), o = "https://survey-dev.magicfeedback.io/assets/emojis";
1942
+ t2.renderRatingEmoji = ({ question: e3, url: t3, send: i2, urlParamValue: a }) => {
1943
+ const { ref: s, assets: l } = e3, d = document.createElement("div"), c = "magicfeedback-rating", u = document.createElement("div");
1944
+ u.classList.add("magicfeedback-rating-container");
1945
+ const p = (null == l ? void 0 : l.max) ? Number(null == l ? void 0 : l.max) : 5, m = (null == l ? void 0 : l.min) ? Number(null == l ? void 0 : l.min) : 1, h = (0, n.createRatingPlaceholder)(null == l ? void 0 : l.minPlaceholder, null == l ? void 0 : l.maxPlaceholder);
1946
+ for (let e4 = m; e4 <= p; e4++) {
1947
+ const n2 = document.createElement("div");
1948
+ n2.classList.add("magicfeedback-rating-option");
1785
1949
  const l2 = document.createElement("label");
1786
- l2.htmlFor = `rating-${a}-${e4}`, l2.textContent = e4.toString();
1787
- const m2 = document.createElement("img");
1788
- if (m2.alt = `face-${a}-${e4}`, m2.className = `rating-image${e4}`, 0 === p && 10 === u) m2.src = `${t3}/${e4}.svg`, m2.onerror = () => m2.src = `${n}/${e4}.svg`;
1789
- else if (1 === p && 5 === u) switch (e4) {
1950
+ l2.htmlFor = `rating-${s}-${e4}`, l2.classList.add("magicfeedback-rating-option-label-container");
1951
+ const d2 = document.createElement("label");
1952
+ d2.htmlFor = `rating-${s}-${e4}`, d2.textContent = e4.toString();
1953
+ const h2 = document.createElement("img");
1954
+ if (h2.alt = `face-${s}-${e4}`, h2.className = `rating-image${e4}`, 0 === m && 10 === p) h2.src = `${t3}/${e4}.svg`, h2.onerror = () => h2.src = `${o}/${e4}.svg`;
1955
+ else if (1 === m && 5 === p) switch (e4) {
1790
1956
  case 1:
1791
- m2.src = `${t3}/1.svg`, m2.onerror = () => m2.src = `${n}/1.svg`;
1957
+ h2.src = `${t3}/1.svg`, h2.onerror = () => h2.src = `${o}/1.svg`;
1792
1958
  break;
1793
1959
  case 2:
1794
- m2.src = `${t3}/2.svg`, m2.onerror = () => m2.src = `${n}/2.svg`;
1960
+ h2.src = `${t3}/2.svg`, h2.onerror = () => h2.src = `${o}/2.svg`;
1795
1961
  break;
1796
1962
  case 3:
1797
- m2.src = `${t3}/6.svg`, m2.onerror = () => m2.src = `${n}/6.svg`;
1963
+ h2.src = `${t3}/6.svg`, h2.onerror = () => h2.src = `${o}/6.svg`;
1798
1964
  break;
1799
1965
  case 4:
1800
- m2.src = `${t3}/9.svg`, m2.onerror = () => m2.src = `${n}/9.svg`;
1966
+ h2.src = `${t3}/9.svg`, h2.onerror = () => h2.src = `${o}/9.svg`;
1801
1967
  break;
1802
1968
  case 5:
1803
- m2.src = `${t3}/10.svg`, m2.onerror = () => m2.src = `${n}/10.svg`;
1969
+ h2.src = `${t3}/10.svg`, h2.onerror = () => h2.src = `${o}/10.svg`;
1804
1970
  }
1805
1971
  else {
1806
- const i3 = Math.round(10 / (u - p) * (e4 - p));
1807
- m2.src = `${t3}/${i3}.svg`, m2.onerror = () => m2.src = `${n}/${i3}.svg`;
1972
+ const i3 = Math.round(10 / (p - m) * (e4 - m));
1973
+ h2.src = `${t3}/${i3}.svg`, h2.onerror = () => h2.src = `${o}/${i3}.svg`;
1808
1974
  }
1809
- const h = document.createElement("input");
1810
- h.id = `rating-${a}-${e4}`, h.type = "radio", h.name = a, h.value = e4.toString(), h.classList.add(d), h.classList.add("magicfeedback-input"), i2 && h.addEventListener("change", (() => {
1811
- i2();
1812
- })), o && o === h.value && (h.checked = true), s2.appendChild(h), s2.appendChild(m2), s2.appendChild(l2), r2.appendChild(s2), c.appendChild(r2);
1975
+ const f = document.createElement("input");
1976
+ f.id = `rating-${s}-${e4}`, f.type = "radio", f.name = s, f.value = e4.toString(), f.classList.add(c), f.classList.add("magicfeedback-input"), (0, r.autoAdvanceOn)(f, i2), a && a === f.value && (f.checked = true), l2.appendChild(f), l2.appendChild(h2), l2.appendChild(d2), n2.appendChild(l2), u.appendChild(n2);
1813
1977
  }
1814
- if ((null == s ? void 0 : s.extraOption) && (null == s ? void 0 : s.extraOptionText)) {
1978
+ if ((null == l ? void 0 : l.extraOption) && (null == l ? void 0 : l.extraOptionText)) {
1815
1979
  const e4 = document.createElement("div");
1816
1980
  e4.classList.add("magicfeedback-rating-option");
1817
1981
  const t4 = document.createElement("label");
1818
- t4.htmlFor = `rating-${a}-extra`, t4.classList.add("magicfeedback-rating-option-label-container");
1819
- const r2 = document.createElement("label");
1820
- r2.htmlFor = `rating-${a}-extra`, r2.textContent = null == s ? void 0 : s.extraOptionText;
1821
- const n2 = document.createElement("img");
1822
- n2.src = "https://magicfeedback-c6458-dev.web.app/assets/question.svg", n2.alt = `face-${a}-extra`, n2.className = "magicfeedback-rating-image-extra";
1823
- const o2 = document.createElement("input");
1824
- o2.id = `rating-${a}-extra`, o2.type = "radio", o2.name = a, o2.value = "-", o2.classList.add(d), o2.classList.add("magicfeedback-input"), i2 && o2.addEventListener("change", (() => {
1825
- i2();
1826
- })), t4.appendChild(o2), t4.appendChild(n2), t4.appendChild(r2), e4.appendChild(t4), c.appendChild(e4);
1982
+ t4.htmlFor = `rating-${s}-extra`, t4.classList.add("magicfeedback-rating-option-label-container");
1983
+ const n2 = document.createElement("label");
1984
+ n2.htmlFor = `rating-${s}-extra`, n2.textContent = null == l ? void 0 : l.extraOptionText;
1985
+ const o2 = document.createElement("img");
1986
+ o2.src = "https://magicfeedback-c6458-dev.web.app/assets/question.svg", o2.alt = `face-${s}-extra`, o2.className = "magicfeedback-rating-image-extra";
1987
+ const a2 = document.createElement("input");
1988
+ a2.id = `rating-${s}-extra`, a2.type = "radio", a2.name = s, a2.value = "-", a2.classList.add(c), a2.classList.add("magicfeedback-input"), (0, r.autoAdvanceOn)(a2, i2), t4.appendChild(a2), t4.appendChild(o2), t4.appendChild(n2), e4.appendChild(t4), u.appendChild(e4);
1827
1989
  }
1828
- return m.childElementCount > 0 && c.appendChild(m), l.appendChild(c), { element: l, elementTypeClass: d };
1990
+ return h.childElementCount > 0 && u.appendChild(h), d.appendChild(u), { element: d, elementTypeClass: c };
1829
1991
  };
1830
- }, 917: (e2, t2, i) => {
1992
+ }, 6083: (e2, t2, i) => {
1831
1993
  "use strict";
1832
1994
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingNumber = void 0;
1833
- const r = i(559);
1834
- t2.renderRatingNumber = ({ question: e3, order: t3, direction: i2, send: n, urlParamValue: o, language: a }) => {
1835
- const s = "magicfeedback-rating-number";
1836
- return { element: (0, r.createRatingNumberElement)(e3.ref, e3.assets, t3, i2, s, n, o, a), elementTypeClass: s };
1995
+ const n = i(1433);
1996
+ t2.renderRatingNumber = ({ question: e3, order: t3, direction: i2, send: r, urlParamValue: o, language: a, isPhone: s, productId: l }) => {
1997
+ const d = "magicfeedback-rating-number";
1998
+ return { element: (0, n.createRatingNumberElement)(e3.ref, e3.assets, t3, i2, d, r, o, a, { legacy: (0, n.usesLegacyRatingNumber)(l), isPhone: s }), elementTypeClass: d };
1837
1999
  };
1838
- }, 452: (e2, t2, i) => {
2000
+ }, 9102: (e2, t2, i) => {
1839
2001
  "use strict";
1840
2002
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingStar = void 0;
1841
- const r = i(559);
2003
+ const n = i(1433);
1842
2004
  t2.renderRatingStar = ({ question: e3, send: t3, urlParamValue: i2 }) => {
1843
- var n, o;
1844
- const a = document.createElement("div"), s = (0, r.createStarRating)(e3.ref, null === (n = e3.assets) || void 0 === n ? void 0 : n.minPlaceholder, null === (o = e3.assets) || void 0 === o ? void 0 : o.maxPlaceholder, t3, i2);
2005
+ var r, o;
2006
+ const a = document.createElement("div"), s = (0, n.createStarRating)(e3.ref, null === (r = e3.assets) || void 0 === r ? void 0 : r.minPlaceholder, null === (o = e3.assets) || void 0 === o ? void 0 : o.maxPlaceholder, t3, i2);
1845
2007
  return a.appendChild(s), { element: a, elementTypeClass: "magicfeedback-rating-star" };
1846
2008
  };
1847
- }, 85: (e2, t2, i) => {
2009
+ }, 8707: (e2, t2, i) => {
1848
2010
  "use strict";
1849
2011
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderSelect = void 0;
1850
- const r = i(516), n = i(881);
2012
+ const n = i(6658), r = i(7031);
1851
2013
  t2.renderSelect = ({ question: e3, format: t3, language: i2, urlParamValue: o }) => {
1852
2014
  const { title: a, value: s, defaultValue: l } = e3, d = document.createElement("select"), c = document.createElement("option");
1853
- return c.value = "", c.text = "slim" === t3 ? (0, r.parseTitle)(a, i2) : l || (0, n.t)(i2, "select.placeholder"), c.disabled = true, c.selected = true, d.appendChild(c), s.forEach(((e4) => {
2015
+ return c.value = "", c.text = "slim" === t3 ? (0, n.parseTitle)(a, i2) : l || (0, r.t)(i2, "select.placeholder"), c.disabled = true, c.selected = true, d.appendChild(c), s.forEach(((e4) => {
1854
2016
  const t4 = document.createElement("option");
1855
2017
  t4.value = e4, t4.text = e4, d.appendChild(t4);
1856
2018
  })), o && s.includes(o) && (d.value = o), { element: d, elementTypeClass: "magicfeedback-select" };
1857
2019
  };
1858
- }, 90: (e2, t2, i) => {
2020
+ }, 8416: (e2, t2, i) => {
1859
2021
  "use strict";
1860
2022
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderText = void 0;
1861
- const r = i(784);
1862
- t2.renderText = ({ language: e3, placeholderText: t3, urlParamValue: i2, send: n }) => {
2023
+ const n = i(9930);
2024
+ t2.renderText = ({ language: e3, placeholderText: t3, urlParamValue: i2, send: r }) => {
1863
2025
  const o = document.createElement("input");
1864
- return o.type = "text", o.placeholder = t3 || r.placeholder.answer(e3 || "en"), i2 && (o.value = i2), o.addEventListener("keyup", ((e4) => {
1865
- e4.preventDefault(), "Enter" === e4.key && n && n();
2026
+ return o.type = "text", o.placeholder = t3 || n.placeholder.answer(e3 || "en"), i2 && (o.value = i2), o.addEventListener("keyup", ((e4) => {
2027
+ e4.preventDefault(), "Enter" === e4.key && r && r();
1866
2028
  })), { element: o, elementTypeClass: "magicfeedback-text" };
1867
2029
  };
1868
- }, 250: (e2, t2, i) => {
2030
+ }, 4336: (e2, t2, i) => {
1869
2031
  "use strict";
1870
2032
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderUploadFile = void 0;
1871
- const r = i(571);
1872
- t2.renderUploadFile = ({ question: e3, language: t3 }) => (0, r.createUploadControl)(e3, t3, "file");
1873
- }, 843: (e2, t2, i) => {
2033
+ const n = i(1853);
2034
+ t2.renderUploadFile = ({ question: e3, language: t3 }) => (0, n.createUploadControl)(e3, t3, "file");
2035
+ }, 5469: (e2, t2, i) => {
1874
2036
  "use strict";
1875
2037
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderUploadImage = void 0;
1876
- const r = i(571);
1877
- t2.renderUploadImage = ({ question: e3, language: t3 }) => (0, r.createUploadControl)(e3, t3, "image");
1878
- }, 571: function(e2, t2, i) {
2038
+ const n = i(1853);
2039
+ t2.renderUploadImage = ({ question: e3, language: t3 }) => (0, n.createUploadControl)(e3, t3, "image");
2040
+ }, 1853: function(e2, t2, i) {
1879
2041
  "use strict";
1880
- var r = this && this.__awaiter || function(e3, t3, i2, r2) {
1881
- return new (i2 || (i2 = Promise))((function(n2, o2) {
2042
+ var n = this && this.__awaiter || function(e3, t3, i2, n2) {
2043
+ return new (i2 || (i2 = Promise))((function(r2, o2) {
1882
2044
  function a2(e4) {
1883
2045
  try {
1884
- l2(r2.next(e4));
2046
+ l2(n2.next(e4));
1885
2047
  } catch (e5) {
1886
2048
  o2(e5);
1887
2049
  }
1888
2050
  }
1889
2051
  function s2(e4) {
1890
2052
  try {
1891
- l2(r2.throw(e4));
2053
+ l2(n2.throw(e4));
1892
2054
  } catch (e5) {
1893
2055
  o2(e5);
1894
2056
  }
1895
2057
  }
1896
2058
  function l2(e4) {
1897
2059
  var t4;
1898
- e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
2060
+ e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
1899
2061
  e5(t4);
1900
2062
  }))).then(a2, s2);
1901
2063
  }
1902
- l2((r2 = r2.apply(e3, t3 || [])).next());
2064
+ l2((n2 = n2.apply(e3, t3 || [])).next());
1903
2065
  }));
1904
2066
  };
1905
2067
  Object.defineProperty(t2, "__esModule", { value: true }), t2.createUploadControl = t2.awaitUploadReady = t2.getUploadValues = t2.formatFileSize = void 0;
1906
- const n = i(784), o = i(516), a = "__mfUploadValues", s = "__mfUploadReady";
2068
+ const r = i(9930), o = i(6658), a = "__mfUploadValues", s = "__mfUploadReady";
1907
2069
  function l(e3) {
1908
2070
  if ("number" != typeof e3 || isNaN(e3)) return "";
1909
2071
  if (e3 < 1024) return `${e3} B`;
@@ -1916,58 +2078,58 @@ var require_magicfeedback_sdk_browser = __commonJS({
1916
2078
  const t3 = e3[a];
1917
2079
  return Array.isArray(t3) ? t3 : [];
1918
2080
  }, t2.awaitUploadReady = function(e3) {
1919
- return r(this, void 0, void 0, (function* () {
2081
+ return n(this, void 0, void 0, (function* () {
1920
2082
  if (!e3) return;
1921
2083
  const t3 = Array.from(e3.querySelectorAll(".magicfeedback-upload-native"));
1922
2084
  yield Promise.all(t3.map(((e4) => e4[s])).filter(Boolean));
1923
2085
  }));
1924
2086
  }, t2.createUploadControl = function(e3, t3, i2) {
1925
- const { ref: r2, require: d, title: c, assets: u } = e3, p = "image" === i2 ? "magicfeedback-upload-image" : "magicfeedback-upload-file", m = (null == u ? void 0 : u.multiple) || false, h = m ? (null == u ? void 0 : u.maxFiles) || 0 : 1, f = Number(null == u ? void 0 : u.maxFileSize) > 0 ? Number(null == u ? void 0 : u.maxFileSize) : 0, g = 1024 * f * 1024, y = document.createElement("div");
2087
+ const { ref: n2, require: d, title: c, assets: u } = e3, p = "image" === i2 ? "magicfeedback-upload-image" : "magicfeedback-upload-file", m = (null == u ? void 0 : u.multiple) || false, h = m ? (null == u ? void 0 : u.maxFiles) || 0 : 1, f = Number(null == u ? void 0 : u.maxFileSize) > 0 ? Number(null == u ? void 0 : u.maxFileSize) : 0, g = 1024 * f * 1024, y = document.createElement("div");
1926
2088
  y.classList.add("magicfeedback-upload");
1927
2089
  const v = document.createElement("input");
1928
- v.type = "file", "image" === i2 && (v.accept = "image/*"), v.multiple = m, v.required = d, v.name = r2, v.id = `magicfeedback-upload-input-${r2}`, v.classList.add(p), v.classList.add("magicfeedback-input"), v.classList.add("magicfeedback-upload-native"), v[a] = [], v[s] = Promise.resolve();
2090
+ v.type = "file", "image" === i2 && (v.accept = "image/*"), v.multiple = m, v.required = d, v.name = n2, v.id = `magicfeedback-upload-input-${n2}`, v.classList.add(p), v.classList.add("magicfeedback-input"), v.classList.add("magicfeedback-upload-native"), v[a] = [], v[s] = Promise.resolve();
1929
2091
  const b = (0, o.parseTitle)(c, t3);
1930
2092
  b && v.setAttribute("aria-label", b);
1931
2093
  const E = document.createElement("div");
1932
2094
  E.classList.add("magicfeedback-upload-dropzone");
1933
- const k = document.createElement("span");
1934
- k.classList.add("magicfeedback-upload-icon"), k.innerHTML = "image" === i2 ? '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="M21 15l-5-5L5 21"/></svg>' : '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M16 16l-4-4-4 4"/><path d="M12 12v9"/><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"/></svg>';
1935
2095
  const A = document.createElement("span");
1936
- A.classList.add("magicfeedback-upload-cta"), A.textContent = n.placeholder.upload.cta(t3);
2096
+ A.classList.add("magicfeedback-upload-icon"), A.innerHTML = "image" === i2 ? '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="M21 15l-5-5L5 21"/></svg>' : '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M16 16l-4-4-4 4"/><path d="M12 12v9"/><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"/></svg>';
2097
+ const k = document.createElement("span");
2098
+ k.classList.add("magicfeedback-upload-cta"), k.textContent = r.placeholder.upload.cta(t3);
1937
2099
  const T = document.createElement("span");
1938
- T.classList.add("magicfeedback-upload-hint"), T.textContent = (function(e4, t4, i3, r3, o2) {
1939
- const a2 = [n.placeholder.upload.formats(e4, t4)];
1940
- return i3 && r3 > 0 && a2.push(n.placeholder.upload.maxFiles(e4, r3)), o2 > 0 && a2.push(n.placeholder.upload.maxSize(e4, o2)), a2.filter(Boolean).join(" \xB7 ");
1941
- })(t3, i2, m, h, f), E.appendChild(v), E.appendChild(k), E.appendChild(A), E.appendChild(T);
2100
+ T.classList.add("magicfeedback-upload-hint"), T.textContent = (function(e4, t4, i3, n3, o2) {
2101
+ const a2 = [r.placeholder.upload.formats(e4, t4)];
2102
+ return i3 && n3 > 0 && a2.push(r.placeholder.upload.maxFiles(e4, n3)), o2 > 0 && a2.push(r.placeholder.upload.maxSize(e4, o2)), a2.filter(Boolean).join(" \xB7 ");
2103
+ })(t3, i2, m, h, f), E.appendChild(v), E.appendChild(A), E.appendChild(k), E.appendChild(T);
1942
2104
  const C = document.createElement("div");
1943
2105
  C.classList.add("magicfeedback-upload-error");
1944
- const L = document.createElement("ul");
1945
- L.classList.add("magicfeedback-upload-list"), y.appendChild(E), y.appendChild(C), y.appendChild(L);
1946
- const x = /* @__PURE__ */ new WeakMap(), S = (e4) => {
1947
- const t4 = x.get(e4);
2106
+ const x = document.createElement("ul");
2107
+ x.classList.add("magicfeedback-upload-list"), y.appendChild(E), y.appendChild(C), y.appendChild(x);
2108
+ const P = /* @__PURE__ */ new WeakMap(), L = (e4) => {
2109
+ const t4 = P.get(e4);
1948
2110
  return t4 ? Promise.resolve(t4) : new Promise(((t5) => {
1949
- const i3 = new FileReader(), r3 = (i4) => {
1950
- const r4 = JSON.stringify({ name: e4.name, type: e4.type, size: e4.size, content: i4 });
1951
- x.set(e4, r4), t5(r4);
2111
+ const i3 = new FileReader(), n3 = (i4) => {
2112
+ const n4 = JSON.stringify({ name: e4.name, type: e4.type, size: e4.size, content: i4 });
2113
+ P.set(e4, n4), t5(n4);
1952
2114
  };
1953
- i3.onload = () => r3("string" == typeof i3.result ? i3.result : ""), i3.onerror = () => r3(""), i3.readAsDataURL(e4);
2115
+ i3.onload = () => n3("string" == typeof i3.result ? i3.result : ""), i3.onerror = () => n3(""), i3.readAsDataURL(e4);
1954
2116
  }));
1955
- }, O = [], P = (e4) => {
2117
+ }, S = [], w = (e4) => {
1956
2118
  try {
1957
2119
  const t4 = h > 0 ? e4.slice(0, h) : e4, i3 = new DataTransfer();
1958
2120
  t4.forEach(((e5) => i3.items.add(e5))), v.files = i3.files;
1959
2121
  } catch (e5) {
1960
2122
  }
1961
2123
  !(function() {
1962
- O.forEach(((e6) => URL.revokeObjectURL(e6))), O.length = 0, L.innerHTML = "";
2124
+ S.forEach(((e6) => URL.revokeObjectURL(e6))), S.length = 0, x.innerHTML = "";
1963
2125
  const e5 = Array.from(v.files || []);
1964
- y.classList.toggle("magicfeedback-upload--has-files", e5.length > 0), e5.forEach(((e6, r3) => {
2126
+ y.classList.toggle("magicfeedback-upload--has-files", e5.length > 0), e5.forEach(((e6, n3) => {
1965
2127
  const o2 = document.createElement("li");
1966
2128
  o2.classList.add("magicfeedback-upload-file-item");
1967
2129
  const a2 = document.createElement("span");
1968
2130
  if (a2.classList.add("magicfeedback-upload-thumb"), "image" === i2 && e6.type.startsWith("image/")) {
1969
2131
  const t4 = URL.createObjectURL(e6);
1970
- O.push(t4);
2132
+ S.push(t4);
1971
2133
  const i3 = document.createElement("img");
1972
2134
  i3.src = t4, i3.alt = e6.name, a2.appendChild(i3);
1973
2135
  } else a2.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6"/></svg>';
@@ -1978,20 +2140,20 @@ var require_magicfeedback_sdk_browser = __commonJS({
1978
2140
  const c2 = document.createElement("span");
1979
2141
  c2.classList.add("magicfeedback-upload-file-size"), c2.textContent = l(e6.size), s2.appendChild(d2), s2.appendChild(c2);
1980
2142
  const u2 = document.createElement("button");
1981
- u2.type = "button", u2.classList.add("magicfeedback-upload-remove"), u2.setAttribute("aria-label", `${n.placeholder.upload.remove(t3)}: ${e6.name}`), u2.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>', u2.addEventListener("click", ((e7) => {
1982
- e7.preventDefault(), e7.stopPropagation(), P(Array.from(v.files || []).filter(((e8, t4) => t4 !== r3)));
1983
- })), o2.appendChild(a2), o2.appendChild(s2), o2.appendChild(u2), L.appendChild(o2);
2143
+ u2.type = "button", u2.classList.add("magicfeedback-upload-remove"), u2.setAttribute("aria-label", `${r.placeholder.upload.remove(t3)}: ${e6.name}`), u2.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>', u2.addEventListener("click", ((e7) => {
2144
+ e7.preventDefault(), e7.stopPropagation(), w(Array.from(v.files || []).filter(((e8, t4) => t4 !== n3)));
2145
+ })), o2.appendChild(a2), o2.appendChild(s2), o2.appendChild(u2), x.appendChild(o2);
1984
2146
  }));
1985
2147
  })(), (() => {
1986
- const e5 = Array.from(v.files || []), t4 = Promise.all(e5.map(S)).then(((e6) => {
2148
+ const e5 = Array.from(v.files || []), t4 = Promise.all(e5.map(L)).then(((e6) => {
1987
2149
  v[a] = e6;
1988
2150
  }));
1989
2151
  v[s] = t4;
1990
2152
  })();
1991
- }, w = (e4) => {
2153
+ }, O = (e4) => {
1992
2154
  if (!e4.length) return C.textContent = "", void C.classList.remove("is-visible");
1993
2155
  const i3 = e4.map(((e5) => e5.name)).join(", ");
1994
- C.textContent = `${n.placeholder.upload.tooLarge(t3, f)}: ${i3}`, C.classList.add("is-visible");
2156
+ C.textContent = `${r.placeholder.upload.tooLarge(t3, f)}: ${i3}`, C.classList.add("is-visible");
1995
2157
  }, N = (e4) => {
1996
2158
  if (!g) return { accepted: e4, rejected: [] };
1997
2159
  const t4 = [], i3 = [];
@@ -1999,7 +2161,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
1999
2161
  };
2000
2162
  v.addEventListener("change", (() => {
2001
2163
  const { accepted: e4, rejected: t4 } = N(Array.from(v.files || []));
2002
- w(t4), P(e4);
2164
+ O(t4), w(e4);
2003
2165
  }));
2004
2166
  const I = (e4) => {
2005
2167
  e4.preventDefault(), e4.stopPropagation();
@@ -2011,72 +2173,72 @@ var require_magicfeedback_sdk_browser = __commonJS({
2011
2173
  })))), E.addEventListener("drop", ((e4) => {
2012
2174
  I(e4), E.classList.remove("is-dragover");
2013
2175
  const t4 = e4.dataTransfer;
2014
- let r3 = t4 ? Array.from(t4.files) : [];
2015
- if ("image" === i2 && (r3 = r3.filter(((e5) => e5.type.startsWith("image/")))), !r3.length) return;
2016
- const { accepted: n2, rejected: o2 } = N(r3);
2017
- if (w(o2), !n2.length) return;
2176
+ let n3 = t4 ? Array.from(t4.files) : [];
2177
+ if ("image" === i2 && (n3 = n3.filter(((e5) => e5.type.startsWith("image/")))), !n3.length) return;
2178
+ const { accepted: r2, rejected: o2 } = N(n3);
2179
+ if (O(o2), !r2.length) return;
2018
2180
  const a2 = m ? Array.from(v.files || []) : [];
2019
- P(a2.concat(n2));
2181
+ w(a2.concat(r2));
2020
2182
  })), { element: y, elementTypeClass: p };
2021
2183
  };
2022
- }, 945: function(e2, t2, i) {
2184
+ }, 8019: function(e2, t2, i) {
2023
2185
  "use strict";
2024
- var r = this && this.__awaiter || function(e3, t3, i2, r2) {
2025
- return new (i2 || (i2 = Promise))((function(n2, o2) {
2186
+ var n = this && this.__awaiter || function(e3, t3, i2, n2) {
2187
+ return new (i2 || (i2 = Promise))((function(r2, o2) {
2026
2188
  function a2(e4) {
2027
2189
  try {
2028
- l2(r2.next(e4));
2190
+ l2(n2.next(e4));
2029
2191
  } catch (e5) {
2030
2192
  o2(e5);
2031
2193
  }
2032
2194
  }
2033
2195
  function s2(e4) {
2034
2196
  try {
2035
- l2(r2.throw(e4));
2197
+ l2(n2.throw(e4));
2036
2198
  } catch (e5) {
2037
2199
  o2(e5);
2038
2200
  }
2039
2201
  }
2040
2202
  function l2(e4) {
2041
2203
  var t4;
2042
- e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
2204
+ e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
2043
2205
  e5(t4);
2044
2206
  }))).then(a2, s2);
2045
2207
  }
2046
- l2((r2 = r2.apply(e3, t3 || [])).next());
2208
+ l2((n2 = n2.apply(e3, t3 || [])).next());
2047
2209
  }));
2048
- }, n = this && this.__importDefault || function(e3) {
2210
+ }, r = this && this.__importDefault || function(e3) {
2049
2211
  return e3 && e3.__esModule ? e3 : { default: e3 };
2050
2212
  };
2051
2213
  Object.defineProperty(t2, "__esModule", { value: true }), t2.nextAgentTurn = t2.startAgentSurvey = void 0;
2052
- const o = n(i(326)), a = i(313), s = i(857), l = i(279);
2053
- function d(e3, t3, i2, n2, s2) {
2214
+ const o = r(i(6911)), a = i(6891), s = i(1347), l = i(9);
2215
+ function d(e3, t3, i2, r2, s2) {
2054
2216
  var d2;
2055
- return r(this, void 0, void 0, (function* () {
2056
- let r2;
2217
+ return n(this, void 0, void 0, (function* () {
2218
+ let n2;
2057
2219
  try {
2058
- r2 = yield (0, o.default)(e3 + t3, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, a.header), body: JSON.stringify(i2) });
2220
+ n2 = yield (0, o.default)(e3 + t3, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, a.header), body: JSON.stringify(i2) });
2059
2221
  } catch (e4) {
2060
- throw n2.err(`[agentSurvey/${s2}] network error`, e4), new l.AgentApiError("NETWORK", (null == e4 ? void 0 : e4.message) || "Network error");
2222
+ throw r2.err(`[agentSurvey/${s2}] network error`, e4), new l.AgentApiError("NETWORK", (null == e4 ? void 0 : e4.message) || "Network error");
2061
2223
  }
2062
- if (!r2.ok) {
2224
+ if (!n2.ok) {
2063
2225
  let e4 = null;
2064
2226
  try {
2065
- e4 = yield r2.json();
2227
+ e4 = yield n2.json();
2066
2228
  } catch (e5) {
2067
2229
  }
2068
- const t4 = (0, l.mapAgentStatus)(r2.status, s2);
2069
- throw n2.err(`[agentSurvey/${s2}] ${r2.status}`, e4), new l.AgentApiError(t4, (null === (d2 = null == e4 ? void 0 : e4.error) || void 0 === d2 ? void 0 : d2.message) || (null == e4 ? void 0 : e4.message) || r2.statusText, r2.status, "RATE_LIMITED" === t4 ? (function(e5) {
2230
+ const t4 = (0, l.mapAgentStatus)(n2.status, s2);
2231
+ throw r2.err(`[agentSurvey/${s2}] ${n2.status}`, e4), new l.AgentApiError(t4, (null === (d2 = null == e4 ? void 0 : e4.error) || void 0 === d2 ? void 0 : d2.message) || (null == e4 ? void 0 : e4.message) || n2.statusText, n2.status, "RATE_LIMITED" === t4 ? (function(e5) {
2070
2232
  var t5, i3;
2071
- const r3 = null === (i3 = null === (t5 = null == e5 ? void 0 : e5.headers) || void 0 === t5 ? void 0 : t5.get) || void 0 === i3 ? void 0 : i3.call(t5, "Retry-After"), n3 = r3 ? Number(r3) : NaN;
2072
- return Number.isFinite(n3) && n3 > 0 ? 1e3 * n3 : 6e4;
2073
- })(r2) : void 0, e4);
2233
+ const n3 = null === (i3 = null === (t5 = null == e5 ? void 0 : e5.headers) || void 0 === t5 ? void 0 : t5.get) || void 0 === i3 ? void 0 : i3.call(t5, "Retry-After"), r3 = n3 ? Number(n3) : NaN;
2234
+ return Number.isFinite(r3) && r3 > 0 ? 1e3 * r3 : 6e4;
2235
+ })(n2) : void 0, e4);
2074
2236
  }
2075
2237
  try {
2076
- const e4 = yield r2.json();
2077
- return n2.log(`[agentSurvey/${s2}] ok`, e4), e4;
2238
+ const e4 = yield n2.json();
2239
+ return r2.log(`[agentSurvey/${s2}] ok`, e4), e4;
2078
2240
  } catch (e4) {
2079
- throw new l.AgentApiError("MALFORMED", "Unreadable response body", r2.status);
2241
+ throw new l.AgentApiError("MALFORMED", "Unreadable response body", n2.status);
2080
2242
  }
2081
2243
  }));
2082
2244
  }
@@ -2085,12 +2247,12 @@ var require_magicfeedback_sdk_browser = __commonJS({
2085
2247
  }, t2.nextAgentTurn = function(e3, t3, i2) {
2086
2248
  return d(e3, s.endpoints.sdk.agentSurveyNext, t3, i2, "next");
2087
2249
  };
2088
- }, 279: (e2, t2) => {
2250
+ }, 9: (e2, t2) => {
2089
2251
  "use strict";
2090
2252
  Object.defineProperty(t2, "__esModule", { value: true }), t2.mapAgentStatus = t2.AgentApiError = void 0;
2091
2253
  class i extends Error {
2092
- constructor(e3, t3, r, n, o) {
2093
- super(t3), this.kind = e3, this.status = r, this.retryAfterMs = n, this.body = o, this.name = "AgentApiError", Object.setPrototypeOf(this, i.prototype);
2254
+ constructor(e3, t3, n, r, o) {
2255
+ super(t3), this.kind = e3, this.status = n, this.retryAfterMs = r, this.body = o, this.name = "AgentApiError", Object.setPrototypeOf(this, i.prototype);
2094
2256
  }
2095
2257
  get retryable() {
2096
2258
  return "RATE_LIMITED" === this.kind || "AI_UNAVAILABLE" === this.kind || "NETWORK" === this.kind;
@@ -2099,38 +2261,38 @@ var require_magicfeedback_sdk_browser = __commonJS({
2099
2261
  t2.AgentApiError = i, t2.mapAgentStatus = function(e3, t3) {
2100
2262
  return 429 === e3 ? "RATE_LIMITED" : 406 === e3 || 401 === e3 || 403 === e3 ? "AUTH" : 404 === e3 ? "NOT_FOUND" : 400 === e3 || 422 === e3 ? "BAD_CONFIG" : e3 >= 500 ? "start" === t3 ? "AI_UNAVAILABLE" : "NETWORK" : "MALFORMED";
2101
2263
  };
2102
- }, 177: (e2, t2, i) => {
2264
+ }, 3963: (e2, t2, i) => {
2103
2265
  "use strict";
2104
2266
  Object.defineProperty(t2, "__esModule", { value: true }), t2.encodeAnswer = t2.toAgentStep = t2.ratingBounds = t2.mapAgentType = t2.DEFAULT_ANSWER_DELIMITER = void 0;
2105
- const r = i(558), n = i(516);
2267
+ const n = i(1140), r = i(6658);
2106
2268
  t2.DEFAULT_ANSWER_DELIMITER = ", ";
2107
- const o = [r.FEEDBACKAPPANSWERTYPE.RADIO, r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, r.FEEDBACKAPPANSWERTYPE.SELECT, r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE], a = Object.values(r.FEEDBACKAPPANSWERTYPE);
2269
+ const o = [n.FEEDBACKAPPANSWERTYPE.RADIO, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, n.FEEDBACKAPPANSWERTYPE.SELECT, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE], a = Object.values(n.FEEDBACKAPPANSWERTYPE);
2108
2270
  function s(e3, t3, i2) {
2109
2271
  var s2, l2, d2;
2110
2272
  const c2 = String(e3 || "").trim().toUpperCase();
2111
- return "RATING" === c2 ? r.FEEDBACKAPPANSWERTYPE.RATING_NUMBER : c2 === r.FEEDBACKAPPANSWERTYPE.CONTACT ? (null === (s2 = i2.log) || void 0 === s2 || s2.log("[agentSurvey] CONTACT has no renderer, falling back to TEXT"), r.FEEDBACKAPPANSWERTYPE.TEXT) : a.includes(c2) ? o.includes(c2) && 0 === t3.length ? (null === (d2 = i2.log) || void 0 === d2 || d2.err(`[agentSurvey] ${c2} arrived with no options, falling back to TEXT`), r.FEEDBACKAPPANSWERTYPE.TEXT) : c2 !== r.FEEDBACKAPPANSWERTYPE.BOOLEAN || 2 !== t3.length || (function(e4, t4) {
2273
+ return "RATING" === c2 ? n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER : c2 === n.FEEDBACKAPPANSWERTYPE.CONTACT ? (null === (s2 = i2.log) || void 0 === s2 || s2.log("[agentSurvey] CONTACT has no renderer, falling back to TEXT"), n.FEEDBACKAPPANSWERTYPE.TEXT) : a.includes(c2) ? o.includes(c2) && 0 === t3.length ? (null === (d2 = i2.log) || void 0 === d2 || d2.err(`[agentSurvey] ${c2} arrived with no options, falling back to TEXT`), n.FEEDBACKAPPANSWERTYPE.TEXT) : c2 !== n.FEEDBACKAPPANSWERTYPE.BOOLEAN || 2 !== t3.length || (function(e4, t4) {
2112
2274
  if (2 !== e4.length) return false;
2113
- const i3 = e4.map(((e5) => String(e5).trim().toLowerCase())), r2 = (0, n.getBooleanOptions)(t4).map(((e5) => e5.toLowerCase())), o2 = ["yes", "no"];
2114
- return i3[0] === o2[0] && i3[1] === o2[1] || i3[0] === r2[0] && i3[1] === r2[1];
2115
- })(t3, i2.language) ? c2 : r.FEEDBACKAPPANSWERTYPE.RADIO : (null === (l2 = i2.log) || void 0 === l2 || l2.err(`[agentSurvey] unknown question type "${e3}", falling back to TEXT`), r.FEEDBACKAPPANSWERTYPE.TEXT);
2275
+ const i3 = e4.map(((e5) => String(e5).trim().toLowerCase())), n2 = (0, r.getBooleanOptions)(t4).map(((e5) => e5.toLowerCase())), o2 = ["yes", "no"];
2276
+ return i3[0] === o2[0] && i3[1] === o2[1] || i3[0] === n2[0] && i3[1] === n2[1];
2277
+ })(t3, i2.language) ? c2 : n.FEEDBACKAPPANSWERTYPE.RADIO : (null === (l2 = i2.log) || void 0 === l2 || l2.err(`[agentSurvey] unknown question type "${e3}", falling back to TEXT`), n.FEEDBACKAPPANSWERTYPE.TEXT);
2116
2278
  }
2117
2279
  function l(e3) {
2118
2280
  const t3 = e3.map(Number).filter(((e4) => Number.isFinite(e4)));
2119
2281
  return t3.length >= 2 ? { min: Math.min(...t3), max: Math.max(...t3) } : { min: 1, max: 5 };
2120
2282
  }
2121
2283
  function d(e3, t3, i2) {
2122
- const n2 = { randomPosition: false, direction: "row", order: "ltr" };
2123
- return e3 !== r.FEEDBACKAPPANSWERTYPE.RATING_NUMBER && e3 !== r.FEEDBACKAPPANSWERTYPE.RATING_EMOJI || Object.assign(n2, l(t3)), e3 === r.FEEDBACKAPPANSWERTYPE.LONGTEXT && (n2.maxCharacters = 0), Object.assign(Object.assign({}, n2), (null == i2 ? void 0 : i2.assets) || {});
2284
+ const r2 = { randomPosition: false, direction: "row", order: "ltr" };
2285
+ return e3 !== n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER && e3 !== n.FEEDBACKAPPANSWERTYPE.RATING_EMOJI || Object.assign(r2, l(t3)), e3 === n.FEEDBACKAPPANSWERTYPE.LONGTEXT && (r2.maxCharacters = 0), Object.assign(Object.assign({}, r2), (null == i2 ? void 0 : i2.assets) || {});
2124
2286
  }
2125
2287
  function c(e3, t3, i2) {
2126
- var r2, n2, o2, a2;
2127
- const { full: l2, title: c2 } = t3, u = [...null !== (n2 = null !== (r2 = e3.questionValues) && void 0 !== r2 ? r2 : null == l2 ? void 0 : l2.value) && void 0 !== n2 ? n2 : []], p = s(null !== (o2 = null == l2 ? void 0 : l2.type) && void 0 !== o2 ? o2 : e3.questionType, u, i2), m = e3.questionRef || (null == l2 ? void 0 : l2.ref) || `agent-q-${e3.currentTurn}`;
2288
+ var n2, r2, o2, a2;
2289
+ const { full: l2, title: c2 } = t3, u = [...null !== (r2 = null !== (n2 = e3.questionValues) && void 0 !== n2 ? n2 : null == l2 ? void 0 : l2.value) && void 0 !== r2 ? r2 : []], p = s(null !== (o2 = null == l2 ? void 0 : l2.type) && void 0 !== o2 ? o2 : e3.questionType, u, i2), m = e3.questionRef || (null == l2 ? void 0 : l2.ref) || `agent-q-${e3.currentTurn}`;
2128
2290
  return { id: (null == l2 ? void 0 : l2.id) || `agent-${i2.sessionId}-${e3.currentTurn}`, title: c2 || "", type: p, questionType: { conf: null }, ref: m, require: null === (a2 = null == l2 ? void 0 : l2.require) || void 0 === a2 || a2, external_id: (null == l2 ? void 0 : l2.external_id) || "", value: u, defaultValue: (null == l2 ? void 0 : l2.defaultValue) || "", followup: false, position: e3.currentTurn, assets: d(p, u, l2), refMetric: (null == l2 ? void 0 : l2.refMetric) || "", integrationId: i2.integrationId, integrationPageId: "", status: "ACTIVE" };
2129
2291
  }
2130
2292
  t2.mapAgentType = s, t2.ratingBounds = l, t2.toAgentStep = function(e3, t3) {
2131
- var i2, n2, o2;
2293
+ var i2, r2, o2;
2132
2294
  const a2 = e3, s2 = e3.currentTurn, l2 = e3.maxTurns, d2 = a2.coverageSummary, u = (e4) => ({ kind: "END", reason: e4, currentTurn: s2, maxTurns: l2, coverageSummary: d2 });
2133
- if (a2.answerType === r.AGENT_ANSWER_TYPE_BLOCKED) return u("BLOCKED");
2295
+ if (a2.answerType === n.AGENT_ANSWER_TYPE_BLOCKED) return u("BLOCKED");
2134
2296
  if (true === a2.shouldEnd) return u("SHOULD_END");
2135
2297
  const p = (function(e4) {
2136
2298
  const t4 = e4.question && "object" == typeof e4.question ? e4.question : e4.nextQuestion && "object" == typeof e4.nextQuestion ? e4.nextQuestion : null;
@@ -2140,17 +2302,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
2140
2302
  }
2141
2303
  return { full: null, title: "string" == typeof e4.nextQuestion ? e4.nextQuestion : null };
2142
2304
  })(e3);
2143
- return "NONE" === String(null !== (o2 = null !== (n2 = null === (i2 = p.full) || void 0 === i2 ? void 0 : i2.type) && void 0 !== n2 ? n2 : e3.questionType) && void 0 !== o2 ? o2 : "").trim().toUpperCase() ? u("TYPE_NONE") : p.title && p.title.trim() ? { kind: "QUESTION", question: c(e3, p, t3), isFromBase: true === e3.isFromBase, currentTurn: s2, maxTurns: l2, topic: a2.topic, coverageGaps: e3.coverageGaps, coverageSummary: d2 } : u("NO_QUESTION");
2144
- }, t2.encodeAnswer = function(e3, i2, r2 = t2.DEFAULT_ANSWER_DELIMITER) {
2145
- const n2 = i2.ref, o2 = (e4) => e4.flatMap(((e5) => Array.isArray(e5.value) ? e5.value : [e5.value])).map(((e5) => "string" == typeof e5 ? e5 : JSON.stringify(e5))).map(((e5) => (e5 || "").trim())).filter(((e5) => "" !== e5)), a2 = o2(e3.filter(((e4) => e4.key === n2))), s2 = o2(e3.filter(((e4) => e4.key === `extra-option-${n2}`)));
2146
- return [a2.filter(((e4, t3) => a2.indexOf(e4) === t3)).join(r2), s2.join(r2)].filter(((e4) => "" !== e4)).join(r2);
2305
+ return "NONE" === String(null !== (o2 = null !== (r2 = null === (i2 = p.full) || void 0 === i2 ? void 0 : i2.type) && void 0 !== r2 ? r2 : e3.questionType) && void 0 !== o2 ? o2 : "").trim().toUpperCase() ? u("TYPE_NONE") : p.title && p.title.trim() ? { kind: "QUESTION", question: c(e3, p, t3), isFromBase: true === e3.isFromBase, currentTurn: s2, maxTurns: l2, topic: a2.topic, coverageGaps: e3.coverageGaps, coverageSummary: d2 } : u("NO_QUESTION");
2306
+ }, t2.encodeAnswer = function(e3, i2, n2 = t2.DEFAULT_ANSWER_DELIMITER) {
2307
+ const r2 = i2.ref, o2 = (e4) => e4.flatMap(((e5) => Array.isArray(e5.value) ? e5.value : [e5.value])).map(((e5) => "string" == typeof e5 ? e5 : JSON.stringify(e5))).map(((e5) => (e5 || "").trim())).filter(((e5) => "" !== e5)), a2 = o2(e3.filter(((e4) => e4.key === r2))), s2 = o2(e3.filter(((e4) => e4.key === `extra-option-${r2}`)));
2308
+ return [a2.filter(((e4, t3) => a2.indexOf(e4) === t3)).join(n2), s2.join(n2)].filter(((e4) => "" !== e4)).join(n2);
2147
2309
  };
2148
- }, 107: (e2, t2, i) => {
2310
+ }, 1817: (e2, t2, i) => {
2149
2311
  "use strict";
2150
2312
  Object.defineProperty(t2, "__esModule", { value: true }), t2.scrapeInputs = void 0;
2151
- const r = i(571);
2313
+ const n = i(1853);
2152
2314
  t2.scrapeInputs = function(e3) {
2153
- const t3 = e3.querySelectorAll(".magicfeedback-input"), i2 = [], n = {};
2315
+ const t3 = e3.querySelectorAll(".magicfeedback-input"), i2 = [], r = {};
2154
2316
  return t3.forEach(((e4) => {
2155
2317
  var t4;
2156
2318
  const o = e4, a = o.name;
@@ -2158,236 +2320,394 @@ var require_magicfeedback_sdk_browser = __commonJS({
2158
2320
  const s = o.type;
2159
2321
  if (("radio" === s || "checkbox" === s) && !o.checked) return;
2160
2322
  const l = o.value, d = o.classList[0];
2161
- if ((null == d ? void 0 : d.includes("magicfeedback-priority-list")) || (null === (t4 = o.id) || void 0 === t4 ? void 0 : t4.startsWith("priority-list-"))) return n[a] || (n[a] = []), void n[a].push(l);
2323
+ if ((null == d ? void 0 : d.includes("magicfeedback-priority-list")) || (null === (t4 = o.id) || void 0 === t4 ? void 0 : t4.startsWith("priority-list-"))) return r[a] || (r[a] = []), void r[a].push(l);
2162
2324
  if (null == d ? void 0 : d.includes("magicfeedback-upload")) {
2163
- const e5 = (0, r.getUploadValues)(o);
2325
+ const e5 = (0, n.getUploadValues)(o);
2164
2326
  return void (e5.length && i2.push({ key: a, value: e5 }));
2165
2327
  }
2166
2328
  const c = "magicfeedback-consent" === d ? o.checked.toString() : l;
2167
2329
  null != c && i2.push({ key: a, value: [c] });
2168
- })), Object.entries(n).forEach((([e4, t4]) => {
2169
- const r2 = t4.slice().sort(((e5, t5) => Number(e5.split(".")[0]) - Number(t5.split(".")[0])));
2170
- i2.push({ key: e4, value: r2 });
2330
+ })), Object.entries(r).forEach((([e4, t4]) => {
2331
+ const n2 = t4.slice().sort(((e5, t5) => Number(e5.split(".")[0]) - Number(t5.split(".")[0])));
2332
+ i2.push({ key: e4, value: n2 });
2171
2333
  })), i2;
2172
2334
  };
2173
- }, 881: (e2, t2) => {
2335
+ }, 7031: (e2, t2) => {
2174
2336
  "use strict";
2175
2337
  Object.defineProperty(t2, "__esModule", { value: true }), t2.t = t2.isLanguageSupported = t2.isRtlLanguage = t2.hasOwnTranslation = t2.TRANSLATION_KEYS = t2.normalizeLanguage = t2.RTL_LANGUAGES = t2.AVAILABLE_LANGUAGES = t2.SUPPORTED_LANGUAGES = void 0;
2176
- const i = { "placeholder.answer": "Write your answer here...", "placeholder.number": "Write your number here...", "placeholder.email": "Write your email here...", "placeholder.date": "Write your date here...", "placeholder.password": "Write your password here...", "pointSystem.error": "The total points must be 100 %", "boolean.yes": "Yes", "boolean.no": "No", "upload.cta": "Drag & drop or click to upload", "upload.imagesOnly": "Images only", "upload.anyFileType": "Any file type", "upload.maxFiles": "Max {n} files", "upload.maxSize": "Max {mb} MB", "upload.tooLarge": "File is too large (max {mb} MB)", "upload.remove": "Remove", "select.placeholder": "Select an option", "rating.ariaLabel": "Rating", "priority.selectUpTo": "Select up to", "priority.options": "options", "priority.thenOrder": "and then order them", "priority.selectOptions": "Select options", "priority.cancel": "Cancel", "priority.confirm": "Confirm", "priority.selectOptionNumber": "Select option #", "priority.prioritized": "Prioritized", "priority.of": "of", "priority.instruction": "Your priority list can be seen below. If you wish, you can rearrange your choices using the arrows. Click 'Next' to confirm your selection and proceed.", "action.send": "Send", "action.back": "Back", "action.next": "Next", "action.start": "Go!", "message.success": "Thank you for your feedback!", "message.blocked": "Thanks for your time - we'll end the conversation here.", "message.required": "Please answer before continuing.", "message.rateLimit": "Too many requests. Retrying in {seconds}s..." }, r = { en: i, es: { "placeholder.answer": "Escribe tu respuesta aqu\xED...", "placeholder.number": "Escribe tu n\xFAmero aqu\xED...", "placeholder.email": "Escribe tu correo electr\xF3nico aqu\xED...", "placeholder.date": "Escribe tu fecha aqu\xED...", "placeholder.password": "Escribe tu contrase\xF1a aqu\xED...", "pointSystem.error": "El total de puntos debe ser 100 %", "boolean.yes": "S\xED", "boolean.no": "No", "upload.cta": "Arrastra y suelta o haz clic para subir", "upload.imagesOnly": "Solo im\xE1genes", "upload.anyFileType": "Cualquier tipo de archivo", "upload.maxFiles": "M\xE1x. {n} archivos", "upload.maxSize": "M\xE1x. {mb} MB", "upload.tooLarge": "Archivo demasiado grande (m\xE1x. {mb} MB)", "upload.remove": "Eliminar", "select.placeholder": "Selecciona una opci\xF3n", "rating.ariaLabel": "Valoraci\xF3n", "priority.selectUpTo": "Selecciona hasta", "priority.options": "opciones", "priority.thenOrder": "y luego ord\xE9nalas", "priority.selectOptions": "Seleccionar opciones", "priority.cancel": "Cancelar", "priority.confirm": "Confirmar", "priority.selectOptionNumber": "Selecciona la opci\xF3n #", "priority.prioritized": "Priorizadas", "priority.of": "de", "priority.instruction": 'Tu lista priorizada se muestra abajo. Si deseas, puedes reordenar las opciones con las flechas. Haz clic en "Siguiente" para confirmar y continuar.', "action.send": "Enviar", "action.back": "Atr\xE1s", "action.next": "Siguiente", "action.start": "\xA1Empezar!", "message.success": "\xA1Gracias por tus comentarios!", "message.blocked": "Gracias por tu tiempo, terminamos aqu\xED la conversaci\xF3n.", "message.required": "Por favor, responde antes de continuar.", "message.rateLimit": "Demasiadas solicitudes. Reintentando en {seconds} s..." }, de: { "placeholder.answer": "Schreiben Sie hier Ihre Antwort...", "placeholder.number": "Geben Sie hier Ihre Zahl ein...", "placeholder.email": "Geben Sie hier Ihre E-Mail-Adresse ein...", "placeholder.date": "Geben Sie hier Ihr Datum ein...", "placeholder.password": "Geben Sie hier Ihr Passwort ein...", "pointSystem.error": "Die Gesamtpunktzahl muss 100 % betragen", "boolean.yes": "Ja", "boolean.no": "Nein", "upload.cta": "Ziehen Sie Dateien hierher oder klicken Sie zum Hochladen", "upload.imagesOnly": "Nur Bilder", "upload.anyFileType": "Beliebiger Dateityp", "upload.maxFiles": "Max. {n} Dateien", "upload.maxSize": "Max. {mb} MB", "upload.tooLarge": "Datei ist zu gro\xDF (max. {mb} MB)", "upload.remove": "Entfernen", "select.placeholder": "Option ausw\xE4hlen", "rating.ariaLabel": "Bewertung", "priority.selectUpTo": "W\xE4hlen Sie bis zu", "priority.options": "Optionen", "priority.thenOrder": "und ordnen Sie sie dann", "priority.selectOptions": "Optionen ausw\xE4hlen", "priority.cancel": "Abbrechen", "priority.confirm": "Best\xE4tigen", "priority.selectOptionNumber": "W\xE4hlen Sie Option #", "priority.prioritized": "Priorisiert", "priority.of": "von", "priority.instruction": 'Ihre Priorit\xE4tenliste wird unten angezeigt. Wenn Sie m\xF6chten, k\xF6nnen Sie Ihre Auswahl mit den Pfeilen neu anordnen. Klicken Sie auf "Weiter", um Ihre Auswahl zu best\xE4tigen und fortzufahren.', "action.send": "Senden", "action.back": "Zur\xFCck", "action.next": "Weiter", "action.start": "Los!", "message.success": "Vielen Dank f\xFCr Ihr Feedback!", "message.blocked": "Danke f\xFCr Ihre Zeit - wir beenden das Gespr\xE4ch hier.", "message.required": "Bitte antworten Sie, bevor Sie fortfahren.", "message.rateLimit": "Zu viele Anfragen. Erneuter Versuch in {seconds} s..." }, fr: { "placeholder.answer": "\xC9crivez votre r\xE9ponse ici...", "placeholder.number": "\xC9crivez votre nombre ici...", "placeholder.email": "\xC9crivez votre e-mail ici...", "placeholder.date": "\xC9crivez votre date ici...", "placeholder.password": "\xC9crivez votre mot de passe ici...", "pointSystem.error": "Le total des points doit \xEAtre de 100 %", "boolean.yes": "Oui", "boolean.no": "Non", "upload.cta": "Glissez-d\xE9posez ou cliquez pour t\xE9l\xE9verser", "upload.imagesOnly": "Images uniquement", "upload.anyFileType": "Tout type de fichier", "upload.maxFiles": "Max. {n} fichiers", "upload.maxSize": "Max. {mb} Mo", "upload.tooLarge": "Fichier trop volumineux (max. {mb} Mo)", "upload.remove": "Supprimer", "select.placeholder": "S\xE9lectionnez une option", "rating.ariaLabel": "\xC9valuation", "priority.selectUpTo": "S\xE9lectionnez jusqu'\xE0", "priority.options": "options", "priority.thenOrder": "puis classez-les", "priority.selectOptions": "S\xE9lectionner des options", "priority.cancel": "Annuler", "priority.confirm": "Confirmer", "priority.selectOptionNumber": "S\xE9lectionnez l'option #", "priority.prioritized": "Prioris\xE9es", "priority.of": "sur", "priority.instruction": `Votre liste de priorit\xE9s est affich\xE9e ci-dessous. Si vous le souhaitez, vous pouvez r\xE9organiser vos choix \xE0 l'aide des fl\xE8ches. Cliquez sur "Suivant" pour confirmer votre s\xE9lection et continuer.`, "action.send": "Envoyer", "action.back": "Retour", "action.next": "Suivant", "action.start": "C'est parti !", "message.success": "Merci pour votre retour !", "message.blocked": "Merci pour votre temps, nous terminons la conversation ici.", "message.required": "Veuillez r\xE9pondre avant de continuer.", "message.rateLimit": "Trop de requ\xEAtes. Nouvelle tentative dans {seconds} s..." }, pt: { "placeholder.answer": "Escreva sua resposta aqui...", "placeholder.number": "Escreva seu n\xFAmero aqui...", "placeholder.email": "Escreva seu e-mail aqui...", "placeholder.date": "Escreva sua data aqui...", "placeholder.password": "Escreva sua senha aqui...", "pointSystem.error": "O total de pontos deve ser 100 %", "boolean.yes": "Sim", "boolean.no": "N\xE3o", "upload.cta": "Arraste e solte ou clique para enviar", "upload.imagesOnly": "Somente imagens", "upload.anyFileType": "Qualquer tipo de arquivo", "upload.maxFiles": "M\xE1x. {n} arquivos", "upload.maxSize": "M\xE1x. {mb} MB", "upload.tooLarge": "Arquivo muito grande (m\xE1x. {mb} MB)", "upload.remove": "Remover", "select.placeholder": "Selecione uma op\xE7\xE3o", "rating.ariaLabel": "Avalia\xE7\xE3o", "priority.selectUpTo": "Selecione at\xE9", "priority.options": "op\xE7\xF5es", "priority.thenOrder": "e depois ordene-as", "priority.selectOptions": "Selecionar op\xE7\xF5es", "priority.cancel": "Cancelar", "priority.confirm": "Confirmar", "priority.selectOptionNumber": "Selecione a op\xE7\xE3o #", "priority.prioritized": "Priorizadas", "priority.of": "de", "priority.instruction": 'Sua lista de prioridades pode ser vista abaixo. Se quiser, voc\xEA pode reorganizar suas escolhas usando as setas. Clique em "Pr\xF3ximo" para confirmar sua sele\xE7\xE3o e continuar.', "action.send": "Enviar", "action.back": "Voltar", "action.next": "Pr\xF3ximo", "action.start": "Come\xE7ar!", "message.success": "Obrigado pelo seu feedback!", "message.blocked": "Obrigado pelo seu tempo, encerramos a conversa por aqui.", "message.required": "Responda antes de continuar.", "message.rateLimit": "Muitas solicita\xE7\xF5es. Tentando novamente em {seconds} s..." }, da: { "placeholder.answer": "Skriv dit svar her...", "placeholder.number": "Skriv dit nummer her...", "placeholder.email": "Skriv din e-mail her...", "placeholder.date": "Skriv din dato her...", "placeholder.password": "Skriv dit kodeord her...", "pointSystem.error": "Samlet antal point skal v\xE6re 100 %", "boolean.yes": "Ja", "boolean.no": "Nej", "upload.cta": "Tr\xE6k og slip eller klik for at uploade", "upload.imagesOnly": "Kun billeder", "upload.anyFileType": "Enhver filtype", "upload.maxFiles": "Maks. {n} filer", "upload.maxSize": "Maks. {mb} MB", "upload.tooLarge": "Filen er for stor (maks. {mb} MB)", "upload.remove": "Fjern", "select.placeholder": "V\xE6lg en mulighed", "rating.ariaLabel": "Bed\xF8mmelse", "priority.selectUpTo": "V\xE6lg op til", "priority.options": "muligheder", "priority.thenOrder": "og sorter dem derefter", "priority.selectOptions": "V\xE6lg muligheder", "priority.cancel": "Annuller", "priority.confirm": "Bekr\xE6ft", "priority.selectOptionNumber": "V\xE6lg mulighed #", "priority.prioritized": "Prioriteret", "priority.of": "af", "priority.instruction": 'Din prioritetsliste vises nedenfor. Hvis du \xF8nsker det, kan du omarrangere dine valg ved hj\xE6lp af pilene. Klik p\xE5 "N\xE6ste" for at bekr\xE6fte dit valg og forts\xE6tte.', "action.send": "Send", "action.back": "Tilbage", "action.next": "N\xE6ste", "action.start": "Start!", "message.success": "Tak for din feedback!", "message.blocked": "Tak for din tid - vi afslutter samtalen her.", "message.required": "Svar venligst, f\xF8r du forts\xE6tter.", "message.rateLimit": "For mange foresp\xF8rgsler. Pr\xF8ver igen om {seconds} s..." }, fi: { "placeholder.answer": "Kirjoita vastauksesi t\xE4h\xE4n...", "placeholder.number": "Kirjoita numerosi t\xE4h\xE4n...", "placeholder.email": "Kirjoita s\xE4hk\xF6postiosoitteesi t\xE4h\xE4n...", "placeholder.date": "Kirjoita p\xE4iv\xE4m\xE4\xE4r\xE4si t\xE4h\xE4n...", "placeholder.password": "Kirjoita salasanasi t\xE4h\xE4n...", "pointSystem.error": "Kokonaispisteiden on oltava 100 %", "boolean.yes": "Kyll\xE4", "boolean.no": "Ei", "upload.cta": "Ved\xE4 ja pudota tai napsauta ladataksesi", "upload.imagesOnly": "Vain kuvat", "upload.anyFileType": "Mik\xE4 tahansa tiedostotyyppi", "upload.maxFiles": "Enint\xE4\xE4n {n} tiedostoa", "upload.maxSize": "Enint\xE4\xE4n {mb} MB", "upload.tooLarge": "Tiedosto on liian suuri (enint\xE4\xE4n {mb} MB)", "upload.remove": "Poista", "select.placeholder": "Valitse vaihtoehto", "rating.ariaLabel": "Arvio", "priority.selectUpTo": "Valitse enint\xE4\xE4n", "priority.options": "vaihtoehtoa", "priority.thenOrder": "ja j\xE4rjest\xE4 ne sitten", "priority.selectOptions": "Valitse vaihtoehdot", "priority.cancel": "Peruuta", "priority.confirm": "Vahvista", "priority.selectOptionNumber": "Valitse vaihtoehto #", "priority.prioritized": "Priorisoitu", "priority.of": " / ", "priority.instruction": 'Prioriteettilistasi n\xE4kyy alla. Voit halutessasi j\xE4rjest\xE4\xE4 valinnat uudelleen nuolien avulla. Napsauta "Seuraava" vahvistaaksesi valinnan ja jatkaaksesi.', "action.send": "L\xE4het\xE4", "action.back": "Takaisin", "action.next": "Seuraava", "action.start": "Aloita!", "message.success": "Kiitos palautteestasi!", "message.blocked": "Kiitos ajastasi - lopetamme keskustelun t\xE4h\xE4n.", "message.required": "Vastaa ennen jatkamista.", "message.rateLimit": "Liikaa pyynt\xF6j\xE4. Yritet\xE4\xE4n uudelleen {seconds} s kuluttua..." }, no: { "placeholder.answer": "Skriv svaret ditt her...", "placeholder.number": "Skriv nummeret ditt her...", "placeholder.email": "Skriv e-posten din her...", "placeholder.date": "Skriv datoen din her...", "placeholder.password": "Skriv passordet ditt her...", "pointSystem.error": "Totalt antall poeng m\xE5 v\xE6re 100 %", "boolean.yes": "Ja", "boolean.no": "Nei", "upload.cta": "Dra og slipp eller klikk for \xE5 laste opp", "upload.imagesOnly": "Kun bilder", "upload.anyFileType": "Alle filtyper", "upload.maxFiles": "Maks {n} filer", "upload.maxSize": "Maks {mb} MB", "upload.tooLarge": "Filen er for stor (maks {mb} MB)", "upload.remove": "Fjern", "select.placeholder": "Velg et alternativ", "rating.ariaLabel": "Vurdering", "priority.selectUpTo": "Velg opptil", "priority.options": "alternativer", "priority.thenOrder": "og ordne dem deretter", "priority.selectOptions": "Velg alternativer", "priority.cancel": "Avbryt", "priority.confirm": "Bekreft", "priority.selectOptionNumber": "Velg alternativ #", "priority.prioritized": "Prioritert", "priority.of": "av", "priority.instruction": 'Prioriteringslisten din vises nedenfor. Hvis du \xF8nsker det, kan du ordne valgene dine ved hjelp av pilene. Klikk p\xE5 "Neste" for \xE5 bekrefte valget ditt og fortsette.', "action.send": "Send", "action.back": "Tilbake", "action.next": "Neste", "action.start": "Start!", "message.success": "Takk for tilbakemeldingen!", "message.blocked": "Takk for tiden din - vi avslutter samtalen her.", "message.required": "Vennligst svar f\xF8r du fortsetter.", "message.rateLimit": "For mange foresp\xF8rsler. Pr\xF8ver igjen om {seconds} s..." }, sv: { "placeholder.answer": "Skriv ditt svar h\xE4r...", "placeholder.number": "Skriv ditt nummer h\xE4r...", "placeholder.email": "Skriv din e-post h\xE4r...", "placeholder.date": "Skriv ditt datum h\xE4r...", "placeholder.password": "Skriv ditt l\xF6senord h\xE4r...", "pointSystem.error": "Totala po\xE4ng m\xE5ste vara 100 %", "boolean.yes": "Ja", "boolean.no": "Nej", "upload.cta": "Dra och sl\xE4pp eller klicka f\xF6r att ladda upp", "upload.imagesOnly": "Endast bilder", "upload.anyFileType": "Alla filtyper", "upload.maxFiles": "Max {n} filer", "upload.maxSize": "Max {mb} MB", "upload.tooLarge": "Filen \xE4r f\xF6r stor (max {mb} MB)", "upload.remove": "Ta bort", "select.placeholder": "V\xE4lj ett alternativ", "rating.ariaLabel": "Betyg", "priority.selectUpTo": "V\xE4lj upp till", "priority.options": "alternativ", "priority.thenOrder": "och ordna dem sedan", "priority.selectOptions": "V\xE4lj alternativ", "priority.cancel": "Avbryt", "priority.confirm": "Bekr\xE4fta", "priority.selectOptionNumber": "V\xE4lj alternativ #", "priority.prioritized": "Prioriterat", "priority.of": "av", "priority.instruction": 'Din prioriteringslista visas nedan. Om du vill kan du ordna om dina val med hj\xE4lp av pilarna. Klicka p\xE5 "N\xE4sta" f\xF6r att bekr\xE4fta ditt val och forts\xE4tta.', "action.send": "Skicka", "action.back": "Tillbaka", "action.next": "N\xE4sta", "action.start": "K\xF6r!", "message.success": "Tack f\xF6r din feedback!", "message.blocked": "Tack f\xF6r din tid - vi avslutar samtalet h\xE4r.", "message.required": "Svara innan du forts\xE4tter.", "message.rateLimit": "F\xF6r m\xE5nga f\xF6rfr\xE5gningar. F\xF6rs\xF6ker igen om {seconds} s..." }, ar: { "placeholder.answer": "\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0647\u0646\u0627...", "placeholder.number": "\u0627\u0643\u062A\u0628 \u0631\u0642\u0645\u0643 \u0647\u0646\u0627...", "placeholder.email": "\u0627\u0643\u062A\u0628 \u0628\u0631\u064A\u062F\u0643 \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A \u0647\u0646\u0627...", "placeholder.date": "\u0627\u0643\u062A\u0628 \u062A\u0627\u0631\u064A\u062E\u0643 \u0647\u0646\u0627...", "placeholder.password": "\u0627\u0643\u062A\u0628 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0647\u0646\u0627...", "pointSystem.error": "\u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u0646\u0642\u0627\u0637 \u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A\u0629 100 %", "boolean.yes": "\u0646\u0639\u0645", "boolean.no": "\u0644\u0627", "upload.cta": "\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u062D\u0645\u064A\u0644", "upload.imagesOnly": "\u0627\u0644\u0635\u0648\u0631 \u0641\u0642\u0637", "upload.anyFileType": "\u0623\u064A \u0646\u0648\u0639 \u0645\u0646 \u0627\u0644\u0645\u0644\u0641\u0627\u062A", "upload.maxFiles": "{n} \u0645\u0644\u0641\u0627\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649", "upload.maxSize": "{mb} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649", "upload.tooLarge": "\u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 {mb} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A)", "upload.remove": "\u0625\u0632\u0627\u0644\u0629", "select.placeholder": "\u0627\u062E\u062A\u0631 \u062E\u064A\u0627\u0631\u064B\u0627", "rating.ariaLabel": "\u0627\u0644\u062A\u0642\u064A\u064A\u0645", "priority.selectUpTo": "\u0627\u062E\u062A\u0631 \u062D\u062A\u0649", "priority.options": "\u062E\u064A\u0627\u0631\u0627\u062A", "priority.thenOrder": "\u062B\u0645 \u0631\u062A\u0628\u0647\u0627", "priority.selectOptions": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A", "priority.cancel": "\u0625\u0644\u063A\u0627\u0621", "priority.confirm": "\u062A\u0623\u0643\u064A\u062F", "priority.selectOptionNumber": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631 #", "priority.prioritized": "\u062A\u0645 \u0627\u0644\u062A\u0631\u062A\u064A\u0628", "priority.of": "\u0645\u0646", "priority.instruction": '\u062A\u0638\u0647\u0631 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0623\u0648\u0644\u0648\u064A\u0627\u062A \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0623\u062F\u0646\u0627\u0647. \u0625\u0630\u0627 \u0631\u063A\u0628\u062A\u060C \u064A\u0645\u0643\u0646\u0643 \u0625\u0639\u0627\u062F\u0629 \u062A\u0631\u062A\u064A\u0628 \u0627\u062E\u062A\u064A\u0627\u0631\u0627\u062A\u0643 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0623\u0633\u0647\u0645. \u0627\u0646\u0642\u0631 \u0639\u0644\u0649 "\u0627\u0644\u062A\u0627\u0644\u064A" \u0644\u062A\u0623\u0643\u064A\u062F \u0627\u062E\u062A\u064A\u0627\u0631\u0643 \u0648\u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629.', "action.send": "\u0625\u0631\u0633\u0627\u0644", "action.back": "\u0631\u062C\u0648\u0639", "action.next": "\u0627\u0644\u062A\u0627\u0644\u064A", "action.start": "\u0627\u0628\u062F\u0623!", "message.success": "\u0634\u0643\u0631\u064B\u0627 \u0644\u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643!", "message.blocked": "\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0648\u0642\u062A\u0643\u060C \u0633\u0646\u0646\u0647\u064A \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0647\u0646\u0627.", "message.required": "\u064A\u0631\u062C\u0649 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0642\u0628\u0644 \u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629.", "message.rateLimit": "\u0637\u0644\u0628\u0627\u062A \u0643\u062B\u064A\u0631\u0629 \u062C\u062F\u064B\u0627. \u0633\u0646\u0639\u064A\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u062E\u0644\u0627\u0644 {seconds} \u062B\u0627\u0646\u064A\u0629..." }, bn: { "placeholder.answer": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u0989\u09A4\u09CD\u09A4\u09B0 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.number": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09B8\u0982\u0996\u09CD\u09AF\u09BE \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.email": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u0987\u09AE\u09C7\u0987\u09B2 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.date": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09A4\u09BE\u09B0\u09BF\u0996 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.password": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09AA\u09BE\u09B8\u0993\u09AF\u09BC\u09BE\u09B0\u09CD\u09A1 \u09B2\u09BF\u0996\u09C1\u09A8...", "pointSystem.error": "\u09AE\u09CB\u099F \u09AA\u09AF\u09BC\u09C7\u09A8\u09CD\u099F 100 % \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7", "boolean.yes": "\u09B9\u09CD\u09AF\u09BE\u0981", "boolean.no": "\u09A8\u09BE", "upload.cta": "\u099F\u09C7\u09A8\u09C7 \u0986\u09A8\u09C1\u09A8 \u09AC\u09BE \u0986\u09AA\u09B2\u09CB\u09A1 \u0995\u09B0\u09A4\u09C7 \u0995\u09CD\u09B2\u09BF\u0995 \u0995\u09B0\u09C1\u09A8", "upload.imagesOnly": "\u09B6\u09C1\u09A7\u09C1\u09AE\u09BE\u09A4\u09CD\u09B0 \u099B\u09AC\u09BF", "upload.anyFileType": "\u09AF\u09C7\u0995\u09CB\u09A8\u09CB \u09A7\u09B0\u09A8\u09C7\u09B0 \u09AB\u09BE\u0987\u09B2", "upload.maxFiles": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {n}\u099F\u09BF \u09AB\u09BE\u0987\u09B2", "upload.maxSize": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {mb} MB", "upload.tooLarge": "\u09AB\u09BE\u0987\u09B2\u099F\u09BF \u0996\u09C1\u09AC \u09AC\u09A1\u09BC (\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {mb} MB)", "upload.remove": "\u09B8\u09B0\u09BE\u09A8", "select.placeholder": "\u098F\u0995\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "rating.ariaLabel": "\u09B0\u09C7\u099F\u09BF\u0982", "priority.selectUpTo": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.options": "\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA", "priority.thenOrder": "\u09A4\u09BE\u09B0\u09AA\u09B0 \u09B8\u09C7\u0997\u09C1\u09B2\u09CB \u09B8\u09BE\u099C\u09BE\u09A8", "priority.selectOptions": "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.cancel": "\u09AC\u09BE\u09A4\u09BF\u09B2", "priority.confirm": "\u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8", "priority.selectOptionNumber": "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA # \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.prioritized": "\u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0\u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4", "priority.of": "\u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7", "priority.instruction": '\u0986\u09AA\u09A8\u09BE\u09B0 \u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0 \u09A4\u09BE\u09B2\u09BF\u0995\u09BE \u09A8\u09BF\u099A\u09C7 \u09A6\u09C7\u0996\u09BE\u09A8\u09CB \u09B9\u09AF\u09BC\u09C7\u099B\u09C7\u0964 \u099A\u09BE\u0987\u09B2\u09C7 \u09A4\u09C0\u09B0 \u099A\u09BF\u09B9\u09CD\u09A8 \u09AC\u09CD\u09AF\u09AC\u09B9\u09BE\u09B0 \u0995\u09B0\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09AA\u099B\u09A8\u09CD\u09A6\u0997\u09C1\u09B2\u09CB \u09AA\u09C1\u09A8\u09B0\u09BE\u09AF\u09BC \u09B8\u09BE\u099C\u09BE\u09A4\u09C7 \u09AA\u09BE\u09B0\u09C7\u09A8\u0964 "\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0" \u0995\u09CD\u09B2\u09BF\u0995 \u0995\u09B0\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8 \u098F\u09AC\u0982 \u098F\u0997\u09BF\u09AF\u09BC\u09C7 \u09AF\u09BE\u09A8\u0964', "action.send": "\u09AA\u09BE\u09A0\u09BE\u09A8", "action.back": "\u09AA\u09BF\u099B\u09A8\u09C7", "action.next": "\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0", "action.start": "\u09B6\u09C1\u09B0\u09C1 \u0995\u09B0\u09C1\u09A8!", "message.success": "\u0986\u09AA\u09A8\u09BE\u09B0 \u09AE\u09A4\u09BE\u09AE\u09A4\u09C7\u09B0 \u099C\u09A8\u09CD\u09AF \u09A7\u09A8\u09CD\u09AF\u09AC\u09BE\u09A6!", "message.blocked": "\u0986\u09AA\u09A8\u09BE\u09B0 \u09B8\u09AE\u09AF\u09BC\u09C7\u09B0 \u099C\u09A8\u09CD\u09AF \u09A7\u09A8\u09CD\u09AF\u09AC\u09BE\u09A6, \u0986\u09AE\u09B0\u09BE \u098F\u0996\u09BE\u09A8\u09C7\u0987 \u0995\u09A5\u09CB\u09AA\u0995\u09A5\u09A8 \u09B6\u09C7\u09B7 \u0995\u09B0\u099B\u09BF\u0964", "message.required": "\u099A\u09BE\u09B2\u09BF\u09AF\u09BC\u09C7 \u09AF\u09BE\u0993\u09AF\u09BC\u09BE\u09B0 \u0986\u0997\u09C7 \u0985\u09A8\u09C1\u0997\u09CD\u09B0\u09B9 \u0995\u09B0\u09C7 \u0989\u09A4\u09CD\u09A4\u09B0 \u09A6\u09BF\u09A8\u0964", "message.rateLimit": "\u0985\u09A8\u09C7\u0995 \u09AC\u09C7\u09B6\u09BF \u0985\u09A8\u09C1\u09B0\u09CB\u09A7\u0964 {seconds} \u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1\u09C7 \u0986\u09AC\u09BE\u09B0 \u099A\u09C7\u09B7\u09CD\u099F\u09BE \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7..." }, it: { "boolean.yes": "S\xEC", "boolean.no": "No", "priority.selectUpTo": "Seleziona fino a", "priority.options": "opzioni", "priority.thenOrder": "e poi ordinali", "priority.selectOptions": "Seleziona opzioni", "priority.cancel": "Annulla", "priority.confirm": "Conferma", "priority.selectOptionNumber": "Seleziona opzione #", "priority.prioritized": "Prioritizzate", "priority.of": "di", "priority.instruction": 'La tua lista di priorit\xE0 \xE8 mostrata qui sotto. Se vuoi, puoi riordinare le tue scelte usando le frecce. Clicca su "Avanti" per confermare la selezione e continuare.' }, nl: { "boolean.yes": "Ja", "boolean.no": "Nee", "priority.selectUpTo": "Selecteer tot", "priority.options": "opties", "priority.thenOrder": "en rangschik ze vervolgens", "priority.selectOptions": "Selecteer opties", "priority.cancel": "Annuleren", "priority.confirm": "Bevestigen", "priority.selectOptionNumber": "Selecteer optie #", "priority.prioritized": "Geprioriteerd", "priority.of": "van", "priority.instruction": 'Je prioriteitenlijst wordt hieronder weergegeven. Als je wilt, kun je je keuzes herschikken met behulp van de pijlen. Klik op "Volgende" om je selectie te bevestigen en door te gaan.' }, pl: { "boolean.yes": "Tak", "boolean.no": "Nie", "priority.selectUpTo": "Wybierz do", "priority.options": "opcje", "priority.thenOrder": "a nast\u0119pnie je uporz\u0105dkuj", "priority.selectOptions": "Wybierz opcje", "priority.cancel": "Anuluj", "priority.confirm": "Potwierd\u017A", "priority.selectOptionNumber": "Wybierz opcj\u0119 #", "priority.prioritized": "Priorytetowe", "priority.of": "z", "priority.instruction": 'Twoja lista priorytet\xF3w jest pokazana poni\u017Cej. Je\u015Bli chcesz, mo\u017Cesz zmieni\u0107 kolejno\u015B\u0107 swoich wybor\xF3w za pomoc\u0105 strza\u0142ek. Kliknij "Dalej", aby potwierdzi\u0107 wyb\xF3r i kontynuowa\u0107.' }, ru: { "boolean.yes": "\u0414\u0430", "boolean.no": "\u041D\u0435\u0442", "priority.selectUpTo": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043E", "priority.options": "\u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432", "priority.thenOrder": "\u0430 \u0437\u0430\u0442\u0435\u043C \u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u044C\u0442\u0435 \u0438\u0445", "priority.selectOptions": "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B", "priority.cancel": "\u041E\u0442\u043C\u0435\u043D\u0430", "priority.confirm": "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C", "priority.selectOptionNumber": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 #", "priority.prioritized": "\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u044B", "priority.of": "\u0438\u0437", "priority.instruction": '\u0412\u0430\u0448 \u0441\u043F\u0438\u0441\u043E\u043A \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u043E\u0432 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043D\u0438\u0436\u0435. \u0415\u0441\u043B\u0438 \u0445\u043E\u0442\u0438\u0442\u0435, \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0440\u044F\u0434\u043E\u043A \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0441\u0442\u0440\u0435\u043B\u043E\u043A. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 "\u0414\u0430\u043B\u0435\u0435", \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u044B\u0431\u043E\u0440 \u0438 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C.' }, ja: { "boolean.yes": "\u306F\u3044", "boolean.no": "\u3044\u3044\u3048", "priority.selectUpTo": "\u6700\u5927", "priority.options": "\u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", "priority.thenOrder": "\u305D\u306E\u5F8C\u4E26\u3079\u66FF\u3048\u3066\u304F\u3060\u3055\u3044", "priority.selectOptions": "\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", "priority.cancel": "\u30AD\u30E3\u30F3\u30BB\u30EB", "priority.confirm": "\u78BA\u8A8D", "priority.selectOptionNumber": "\u30AA\u30D7\u30B7\u30E7\u30F3 # \u3092\u9078\u629E", "priority.prioritized": "\u512A\u5148\u9806\u4F4D", "priority.of": "\u306E\u3046\u3061", "priority.instruction": "\u512A\u5148\u9806\u4F4D\u30EA\u30B9\u30C8\u306F\u4EE5\u4E0B\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u3001\u77E2\u5370\u3092\u4F7F\u3063\u3066\u9078\u629E\u80A2\u3092\u4E26\u3079\u66FF\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u300C\u6B21\u3078\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u9078\u629E\u3092\u78BA\u5B9A\u3057\u3001\u7D9A\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002" }, zh: { "boolean.yes": "\u662F", "boolean.no": "\u4E0D", "priority.selectUpTo": "\u6700\u591A\u9009\u62E9", "priority.options": "\u4E2A\u9009\u9879", "priority.thenOrder": "\u7136\u540E\u6392\u5E8F\u5B83\u4EEC", "priority.selectOptions": "\u9009\u62E9\u9009\u9879", "priority.cancel": "\u53D6\u6D88", "priority.confirm": "\u786E\u8BA4", "priority.selectOptionNumber": "\u9009\u62E9\u9009\u9879 #", "priority.prioritized": "\u5DF2\u4F18\u5148", "priority.of": "\u5171", "priority.instruction": "\u4F60\u7684\u4F18\u5148\u5217\u8868\u5982\u4E0B\u6240\u793A\u3002\u5982\u6709\u9700\u8981\uFF0C\u53EF\u4EE5\u4F7F\u7528\u7BAD\u5934\u91CD\u65B0\u6392\u5E8F\u9009\u9879\u3002\u70B9\u51FB\u201C\u4E0B\u4E00\u6B65\u201D\u786E\u8BA4\u9009\u62E9\u5E76\u7EE7\u7EED\u3002" }, ko: { "boolean.yes": "\uC608", "boolean.no": "\uC544\uB2C8", "priority.selectUpTo": "\uCD5C\uB300", "priority.options": "\uAC1C\uC758 \uC635\uC158 \uC120\uD0DD", "priority.thenOrder": "\uADF8\uB7F0 \uB2E4\uC74C \uC815\uB82C\uD558\uC138\uC694", "priority.selectOptions": "\uC635\uC158 \uC120\uD0DD", "priority.cancel": "\uCDE8\uC18C", "priority.confirm": "\uD655\uC778", "priority.selectOptionNumber": "\uC635\uC158 # \uC120\uD0DD", "priority.prioritized": "\uC6B0\uC120\uC21C\uC704", "priority.of": "\uC911", "priority.instruction": '\uC6B0\uC120\uC21C\uC704 \uBAA9\uB85D\uC740 \uC544\uB798\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4. \uC6D0\uD55C\uB2E4\uBA74 \uD654\uC0B4\uD45C\uB97C \uC0AC\uC6A9\uD574 \uC120\uD0DD \uD56D\uBAA9\uC744 \uC7AC\uC815\uB82C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. "\uB2E4\uC74C"\uC744 \uD074\uB9AD\uD558\uC5EC \uC120\uD0DD\uC744 \uD655\uC778\uD558\uACE0 \uACC4\uC18D\uD558\uC138\uC694.' } };
2177
- t2.SUPPORTED_LANGUAGES = ["en", "da", "fi", "no", "es", "sv", "ar", "bn", "de", "pt", "fr"], t2.AVAILABLE_LANGUAGES = Object.keys(r), t2.RTL_LANGUAGES = ["ar"];
2178
- const n = { nb: "no", nn: "no", nob: "no", nno: "no", iw: "he", in: "id", cmn: "zh" };
2338
+ const i = { "placeholder.answer": "Write your answer here...", "placeholder.number": "Write your number here...", "placeholder.email": "Write your email here...", "placeholder.date": "Write your date here...", "placeholder.password": "Write your password here...", "pointSystem.error": "The total points must be 100 %", "boolean.yes": "Yes", "boolean.no": "No", "upload.cta": "Drag & drop or click to upload", "upload.imagesOnly": "Images only", "upload.anyFileType": "Any file type", "upload.maxFiles": "Max {n} files", "upload.maxSize": "Max {mb} MB", "upload.tooLarge": "File is too large (max {mb} MB)", "upload.remove": "Remove", "select.placeholder": "Select an option", "rating.ariaLabel": "Rating", "maxDiff.best": "Most important", "maxDiff.worst": "Least important", "maxDiff.setProgress": "Block {k} of {n}", "priority.selectUpTo": "Select up to", "priority.options": "options", "priority.thenOrder": "and then order them", "priority.selectOptions": "Select options", "priority.cancel": "Cancel", "priority.confirm": "Confirm", "priority.selectOptionNumber": "Select option #", "priority.prioritized": "Prioritized", "priority.of": "of", "priority.instruction": "Your priority list can be seen below. If you wish, you can rearrange your choices using the arrows. Click 'Next' to confirm your selection and proceed.", "action.send": "Send", "action.back": "Back", "action.next": "Next", "action.start": "Go!", "message.success": "Thank you for your feedback!", "message.blocked": "Thanks for your time - we'll end the conversation here.", "message.required": "Please answer before continuing.", "message.rateLimit": "Too many requests. Retrying in {seconds}s..." }, n = { en: i, es: { "placeholder.answer": "Escribe tu respuesta aqu\xED...", "placeholder.number": "Escribe tu n\xFAmero aqu\xED...", "placeholder.email": "Escribe tu correo electr\xF3nico aqu\xED...", "placeholder.date": "Escribe tu fecha aqu\xED...", "placeholder.password": "Escribe tu contrase\xF1a aqu\xED...", "pointSystem.error": "El total de puntos debe ser 100 %", "boolean.yes": "S\xED", "boolean.no": "No", "upload.cta": "Arrastra y suelta o haz clic para subir", "upload.imagesOnly": "Solo im\xE1genes", "upload.anyFileType": "Cualquier tipo de archivo", "upload.maxFiles": "M\xE1x. {n} archivos", "upload.maxSize": "M\xE1x. {mb} MB", "upload.tooLarge": "Archivo demasiado grande (m\xE1x. {mb} MB)", "upload.remove": "Eliminar", "select.placeholder": "Selecciona una opci\xF3n", "rating.ariaLabel": "Valoraci\xF3n", "maxDiff.best": "M\xE1s importante", "maxDiff.worst": "Menos importante", "maxDiff.setProgress": "Bloque {k} de {n}", "priority.selectUpTo": "Selecciona hasta", "priority.options": "opciones", "priority.thenOrder": "y luego ord\xE9nalas", "priority.selectOptions": "Seleccionar opciones", "priority.cancel": "Cancelar", "priority.confirm": "Confirmar", "priority.selectOptionNumber": "Selecciona la opci\xF3n #", "priority.prioritized": "Priorizadas", "priority.of": "de", "priority.instruction": 'Tu lista priorizada se muestra abajo. Si deseas, puedes reordenar las opciones con las flechas. Haz clic en "Siguiente" para confirmar y continuar.', "action.send": "Enviar", "action.back": "Atr\xE1s", "action.next": "Siguiente", "action.start": "\xA1Empezar!", "message.success": "\xA1Gracias por tus comentarios!", "message.blocked": "Gracias por tu tiempo, terminamos aqu\xED la conversaci\xF3n.", "message.required": "Por favor, responde antes de continuar.", "message.rateLimit": "Demasiadas solicitudes. Reintentando en {seconds} s..." }, de: { "placeholder.answer": "Schreiben Sie hier Ihre Antwort...", "placeholder.number": "Geben Sie hier Ihre Zahl ein...", "placeholder.email": "Geben Sie hier Ihre E-Mail-Adresse ein...", "placeholder.date": "Geben Sie hier Ihr Datum ein...", "placeholder.password": "Geben Sie hier Ihr Passwort ein...", "pointSystem.error": "Die Gesamtpunktzahl muss 100 % betragen", "boolean.yes": "Ja", "boolean.no": "Nein", "upload.cta": "Ziehen Sie Dateien hierher oder klicken Sie zum Hochladen", "upload.imagesOnly": "Nur Bilder", "upload.anyFileType": "Beliebiger Dateityp", "upload.maxFiles": "Max. {n} Dateien", "upload.maxSize": "Max. {mb} MB", "upload.tooLarge": "Datei ist zu gro\xDF (max. {mb} MB)", "upload.remove": "Entfernen", "select.placeholder": "Option ausw\xE4hlen", "rating.ariaLabel": "Bewertung", "maxDiff.best": "Am wichtigsten", "maxDiff.worst": "Am wenigsten wichtig", "maxDiff.setProgress": "Block {k} von {n}", "priority.selectUpTo": "W\xE4hlen Sie bis zu", "priority.options": "Optionen", "priority.thenOrder": "und ordnen Sie sie dann", "priority.selectOptions": "Optionen ausw\xE4hlen", "priority.cancel": "Abbrechen", "priority.confirm": "Best\xE4tigen", "priority.selectOptionNumber": "W\xE4hlen Sie Option #", "priority.prioritized": "Priorisiert", "priority.of": "von", "priority.instruction": 'Ihre Priorit\xE4tenliste wird unten angezeigt. Wenn Sie m\xF6chten, k\xF6nnen Sie Ihre Auswahl mit den Pfeilen neu anordnen. Klicken Sie auf "Weiter", um Ihre Auswahl zu best\xE4tigen und fortzufahren.', "action.send": "Senden", "action.back": "Zur\xFCck", "action.next": "Weiter", "action.start": "Los!", "message.success": "Vielen Dank f\xFCr Ihr Feedback!", "message.blocked": "Danke f\xFCr Ihre Zeit - wir beenden das Gespr\xE4ch hier.", "message.required": "Bitte antworten Sie, bevor Sie fortfahren.", "message.rateLimit": "Zu viele Anfragen. Erneuter Versuch in {seconds} s..." }, fr: { "placeholder.answer": "\xC9crivez votre r\xE9ponse ici...", "placeholder.number": "\xC9crivez votre nombre ici...", "placeholder.email": "\xC9crivez votre e-mail ici...", "placeholder.date": "\xC9crivez votre date ici...", "placeholder.password": "\xC9crivez votre mot de passe ici...", "pointSystem.error": "Le total des points doit \xEAtre de 100 %", "boolean.yes": "Oui", "boolean.no": "Non", "upload.cta": "Glissez-d\xE9posez ou cliquez pour t\xE9l\xE9verser", "upload.imagesOnly": "Images uniquement", "upload.anyFileType": "Tout type de fichier", "upload.maxFiles": "Max. {n} fichiers", "upload.maxSize": "Max. {mb} Mo", "upload.tooLarge": "Fichier trop volumineux (max. {mb} Mo)", "upload.remove": "Supprimer", "select.placeholder": "S\xE9lectionnez une option", "rating.ariaLabel": "\xC9valuation", "maxDiff.best": "Le plus important", "maxDiff.worst": "Le moins important", "maxDiff.setProgress": "Bloc {k} sur {n}", "priority.selectUpTo": "S\xE9lectionnez jusqu'\xE0", "priority.options": "options", "priority.thenOrder": "puis classez-les", "priority.selectOptions": "S\xE9lectionner des options", "priority.cancel": "Annuler", "priority.confirm": "Confirmer", "priority.selectOptionNumber": "S\xE9lectionnez l'option #", "priority.prioritized": "Prioris\xE9es", "priority.of": "sur", "priority.instruction": `Votre liste de priorit\xE9s est affich\xE9e ci-dessous. Si vous le souhaitez, vous pouvez r\xE9organiser vos choix \xE0 l'aide des fl\xE8ches. Cliquez sur "Suivant" pour confirmer votre s\xE9lection et continuer.`, "action.send": "Envoyer", "action.back": "Retour", "action.next": "Suivant", "action.start": "C'est parti !", "message.success": "Merci pour votre retour !", "message.blocked": "Merci pour votre temps, nous terminons la conversation ici.", "message.required": "Veuillez r\xE9pondre avant de continuer.", "message.rateLimit": "Trop de requ\xEAtes. Nouvelle tentative dans {seconds} s..." }, pt: { "placeholder.answer": "Escreva sua resposta aqui...", "placeholder.number": "Escreva seu n\xFAmero aqui...", "placeholder.email": "Escreva seu e-mail aqui...", "placeholder.date": "Escreva sua data aqui...", "placeholder.password": "Escreva sua senha aqui...", "pointSystem.error": "O total de pontos deve ser 100 %", "boolean.yes": "Sim", "boolean.no": "N\xE3o", "upload.cta": "Arraste e solte ou clique para enviar", "upload.imagesOnly": "Somente imagens", "upload.anyFileType": "Qualquer tipo de arquivo", "upload.maxFiles": "M\xE1x. {n} arquivos", "upload.maxSize": "M\xE1x. {mb} MB", "upload.tooLarge": "Arquivo muito grande (m\xE1x. {mb} MB)", "upload.remove": "Remover", "select.placeholder": "Selecione uma op\xE7\xE3o", "rating.ariaLabel": "Avalia\xE7\xE3o", "maxDiff.best": "Mais importante", "maxDiff.worst": "Menos importante", "maxDiff.setProgress": "Bloco {k} de {n}", "priority.selectUpTo": "Selecione at\xE9", "priority.options": "op\xE7\xF5es", "priority.thenOrder": "e depois ordene-as", "priority.selectOptions": "Selecionar op\xE7\xF5es", "priority.cancel": "Cancelar", "priority.confirm": "Confirmar", "priority.selectOptionNumber": "Selecione a op\xE7\xE3o #", "priority.prioritized": "Priorizadas", "priority.of": "de", "priority.instruction": 'Sua lista de prioridades pode ser vista abaixo. Se quiser, voc\xEA pode reorganizar suas escolhas usando as setas. Clique em "Pr\xF3ximo" para confirmar sua sele\xE7\xE3o e continuar.', "action.send": "Enviar", "action.back": "Voltar", "action.next": "Pr\xF3ximo", "action.start": "Come\xE7ar!", "message.success": "Obrigado pelo seu feedback!", "message.blocked": "Obrigado pelo seu tempo, encerramos a conversa por aqui.", "message.required": "Responda antes de continuar.", "message.rateLimit": "Muitas solicita\xE7\xF5es. Tentando novamente em {seconds} s..." }, da: { "placeholder.answer": "Skriv dit svar her...", "placeholder.number": "Skriv dit nummer her...", "placeholder.email": "Skriv din e-mail her...", "placeholder.date": "Skriv din dato her...", "placeholder.password": "Skriv dit kodeord her...", "pointSystem.error": "Samlet antal point skal v\xE6re 100 %", "boolean.yes": "Ja", "boolean.no": "Nej", "upload.cta": "Tr\xE6k og slip eller klik for at uploade", "upload.imagesOnly": "Kun billeder", "upload.anyFileType": "Enhver filtype", "upload.maxFiles": "Maks. {n} filer", "upload.maxSize": "Maks. {mb} MB", "upload.tooLarge": "Filen er for stor (maks. {mb} MB)", "upload.remove": "Fjern", "select.placeholder": "V\xE6lg en mulighed", "rating.ariaLabel": "Bed\xF8mmelse", "maxDiff.best": "Vigtigst", "maxDiff.worst": "Mindst vigtigt", "maxDiff.setProgress": "Blok {k} af {n}", "priority.selectUpTo": "V\xE6lg op til", "priority.options": "muligheder", "priority.thenOrder": "og sorter dem derefter", "priority.selectOptions": "V\xE6lg muligheder", "priority.cancel": "Annuller", "priority.confirm": "Bekr\xE6ft", "priority.selectOptionNumber": "V\xE6lg mulighed #", "priority.prioritized": "Prioriteret", "priority.of": "af", "priority.instruction": 'Din prioritetsliste vises nedenfor. Hvis du \xF8nsker det, kan du omarrangere dine valg ved hj\xE6lp af pilene. Klik p\xE5 "N\xE6ste" for at bekr\xE6fte dit valg og forts\xE6tte.', "action.send": "Send", "action.back": "Tilbage", "action.next": "N\xE6ste", "action.start": "Start!", "message.success": "Tak for din feedback!", "message.blocked": "Tak for din tid - vi afslutter samtalen her.", "message.required": "Svar venligst, f\xF8r du forts\xE6tter.", "message.rateLimit": "For mange foresp\xF8rgsler. Pr\xF8ver igen om {seconds} s..." }, fi: { "placeholder.answer": "Kirjoita vastauksesi t\xE4h\xE4n...", "placeholder.number": "Kirjoita numerosi t\xE4h\xE4n...", "placeholder.email": "Kirjoita s\xE4hk\xF6postiosoitteesi t\xE4h\xE4n...", "placeholder.date": "Kirjoita p\xE4iv\xE4m\xE4\xE4r\xE4si t\xE4h\xE4n...", "placeholder.password": "Kirjoita salasanasi t\xE4h\xE4n...", "pointSystem.error": "Kokonaispisteiden on oltava 100 %", "boolean.yes": "Kyll\xE4", "boolean.no": "Ei", "upload.cta": "Ved\xE4 ja pudota tai napsauta ladataksesi", "upload.imagesOnly": "Vain kuvat", "upload.anyFileType": "Mik\xE4 tahansa tiedostotyyppi", "upload.maxFiles": "Enint\xE4\xE4n {n} tiedostoa", "upload.maxSize": "Enint\xE4\xE4n {mb} MB", "upload.tooLarge": "Tiedosto on liian suuri (enint\xE4\xE4n {mb} MB)", "upload.remove": "Poista", "select.placeholder": "Valitse vaihtoehto", "rating.ariaLabel": "Arvio", "maxDiff.best": "T\xE4rkein", "maxDiff.worst": "V\xE4hiten t\xE4rke\xE4", "maxDiff.setProgress": "Osa {k}/{n}", "priority.selectUpTo": "Valitse enint\xE4\xE4n", "priority.options": "vaihtoehtoa", "priority.thenOrder": "ja j\xE4rjest\xE4 ne sitten", "priority.selectOptions": "Valitse vaihtoehdot", "priority.cancel": "Peruuta", "priority.confirm": "Vahvista", "priority.selectOptionNumber": "Valitse vaihtoehto #", "priority.prioritized": "Priorisoitu", "priority.of": " / ", "priority.instruction": 'Prioriteettilistasi n\xE4kyy alla. Voit halutessasi j\xE4rjest\xE4\xE4 valinnat uudelleen nuolien avulla. Napsauta "Seuraava" vahvistaaksesi valinnan ja jatkaaksesi.', "action.send": "L\xE4het\xE4", "action.back": "Takaisin", "action.next": "Seuraava", "action.start": "Aloita!", "message.success": "Kiitos palautteestasi!", "message.blocked": "Kiitos ajastasi - lopetamme keskustelun t\xE4h\xE4n.", "message.required": "Vastaa ennen jatkamista.", "message.rateLimit": "Liikaa pyynt\xF6j\xE4. Yritet\xE4\xE4n uudelleen {seconds} s kuluttua..." }, no: { "placeholder.answer": "Skriv svaret ditt her...", "placeholder.number": "Skriv nummeret ditt her...", "placeholder.email": "Skriv e-posten din her...", "placeholder.date": "Skriv datoen din her...", "placeholder.password": "Skriv passordet ditt her...", "pointSystem.error": "Totalt antall poeng m\xE5 v\xE6re 100 %", "boolean.yes": "Ja", "boolean.no": "Nei", "upload.cta": "Dra og slipp eller klikk for \xE5 laste opp", "upload.imagesOnly": "Kun bilder", "upload.anyFileType": "Alle filtyper", "upload.maxFiles": "Maks {n} filer", "upload.maxSize": "Maks {mb} MB", "upload.tooLarge": "Filen er for stor (maks {mb} MB)", "upload.remove": "Fjern", "select.placeholder": "Velg et alternativ", "rating.ariaLabel": "Vurdering", "maxDiff.best": "Viktigst", "maxDiff.worst": "Minst viktig", "maxDiff.setProgress": "Blokk {k} av {n}", "priority.selectUpTo": "Velg opptil", "priority.options": "alternativer", "priority.thenOrder": "og ordne dem deretter", "priority.selectOptions": "Velg alternativer", "priority.cancel": "Avbryt", "priority.confirm": "Bekreft", "priority.selectOptionNumber": "Velg alternativ #", "priority.prioritized": "Prioritert", "priority.of": "av", "priority.instruction": 'Prioriteringslisten din vises nedenfor. Hvis du \xF8nsker det, kan du ordne valgene dine ved hjelp av pilene. Klikk p\xE5 "Neste" for \xE5 bekrefte valget ditt og fortsette.', "action.send": "Send", "action.back": "Tilbake", "action.next": "Neste", "action.start": "Start!", "message.success": "Takk for tilbakemeldingen!", "message.blocked": "Takk for tiden din - vi avslutter samtalen her.", "message.required": "Vennligst svar f\xF8r du fortsetter.", "message.rateLimit": "For mange foresp\xF8rsler. Pr\xF8ver igjen om {seconds} s..." }, sv: { "placeholder.answer": "Skriv ditt svar h\xE4r...", "placeholder.number": "Skriv ditt nummer h\xE4r...", "placeholder.email": "Skriv din e-post h\xE4r...", "placeholder.date": "Skriv ditt datum h\xE4r...", "placeholder.password": "Skriv ditt l\xF6senord h\xE4r...", "pointSystem.error": "Totala po\xE4ng m\xE5ste vara 100 %", "boolean.yes": "Ja", "boolean.no": "Nej", "upload.cta": "Dra och sl\xE4pp eller klicka f\xF6r att ladda upp", "upload.imagesOnly": "Endast bilder", "upload.anyFileType": "Alla filtyper", "upload.maxFiles": "Max {n} filer", "upload.maxSize": "Max {mb} MB", "upload.tooLarge": "Filen \xE4r f\xF6r stor (max {mb} MB)", "upload.remove": "Ta bort", "select.placeholder": "V\xE4lj ett alternativ", "rating.ariaLabel": "Betyg", "maxDiff.best": "Viktigast", "maxDiff.worst": "Minst viktig", "maxDiff.setProgress": "Block {k} av {n}", "priority.selectUpTo": "V\xE4lj upp till", "priority.options": "alternativ", "priority.thenOrder": "och ordna dem sedan", "priority.selectOptions": "V\xE4lj alternativ", "priority.cancel": "Avbryt", "priority.confirm": "Bekr\xE4fta", "priority.selectOptionNumber": "V\xE4lj alternativ #", "priority.prioritized": "Prioriterat", "priority.of": "av", "priority.instruction": 'Din prioriteringslista visas nedan. Om du vill kan du ordna om dina val med hj\xE4lp av pilarna. Klicka p\xE5 "N\xE4sta" f\xF6r att bekr\xE4fta ditt val och forts\xE4tta.', "action.send": "Skicka", "action.back": "Tillbaka", "action.next": "N\xE4sta", "action.start": "K\xF6r!", "message.success": "Tack f\xF6r din feedback!", "message.blocked": "Tack f\xF6r din tid - vi avslutar samtalet h\xE4r.", "message.required": "Svara innan du forts\xE4tter.", "message.rateLimit": "F\xF6r m\xE5nga f\xF6rfr\xE5gningar. F\xF6rs\xF6ker igen om {seconds} s..." }, ar: { "placeholder.answer": "\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0647\u0646\u0627...", "placeholder.number": "\u0627\u0643\u062A\u0628 \u0631\u0642\u0645\u0643 \u0647\u0646\u0627...", "placeholder.email": "\u0627\u0643\u062A\u0628 \u0628\u0631\u064A\u062F\u0643 \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A \u0647\u0646\u0627...", "placeholder.date": "\u0627\u0643\u062A\u0628 \u062A\u0627\u0631\u064A\u062E\u0643 \u0647\u0646\u0627...", "placeholder.password": "\u0627\u0643\u062A\u0628 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0647\u0646\u0627...", "pointSystem.error": "\u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u0646\u0642\u0627\u0637 \u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A\u0629 100 %", "boolean.yes": "\u0646\u0639\u0645", "boolean.no": "\u0644\u0627", "upload.cta": "\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u062D\u0645\u064A\u0644", "upload.imagesOnly": "\u0627\u0644\u0635\u0648\u0631 \u0641\u0642\u0637", "upload.anyFileType": "\u0623\u064A \u0646\u0648\u0639 \u0645\u0646 \u0627\u0644\u0645\u0644\u0641\u0627\u062A", "upload.maxFiles": "{n} \u0645\u0644\u0641\u0627\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649", "upload.maxSize": "{mb} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649", "upload.tooLarge": "\u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 {mb} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A)", "upload.remove": "\u0625\u0632\u0627\u0644\u0629", "select.placeholder": "\u0627\u062E\u062A\u0631 \u062E\u064A\u0627\u0631\u064B\u0627", "rating.ariaLabel": "\u0627\u0644\u062A\u0642\u064A\u064A\u0645", "maxDiff.best": "\u0627\u0644\u0623\u0643\u062B\u0631 \u0623\u0647\u0645\u064A\u0629", "maxDiff.worst": "\u0627\u0644\u0623\u0642\u0644 \u0623\u0647\u0645\u064A\u0629", "maxDiff.setProgress": "\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 {k} \u0645\u0646 {n}", "priority.selectUpTo": "\u0627\u062E\u062A\u0631 \u062D\u062A\u0649", "priority.options": "\u062E\u064A\u0627\u0631\u0627\u062A", "priority.thenOrder": "\u062B\u0645 \u0631\u062A\u0628\u0647\u0627", "priority.selectOptions": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A", "priority.cancel": "\u0625\u0644\u063A\u0627\u0621", "priority.confirm": "\u062A\u0623\u0643\u064A\u062F", "priority.selectOptionNumber": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631 #", "priority.prioritized": "\u062A\u0645 \u0627\u0644\u062A\u0631\u062A\u064A\u0628", "priority.of": "\u0645\u0646", "priority.instruction": '\u062A\u0638\u0647\u0631 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0623\u0648\u0644\u0648\u064A\u0627\u062A \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0623\u062F\u0646\u0627\u0647. \u0625\u0630\u0627 \u0631\u063A\u0628\u062A\u060C \u064A\u0645\u0643\u0646\u0643 \u0625\u0639\u0627\u062F\u0629 \u062A\u0631\u062A\u064A\u0628 \u0627\u062E\u062A\u064A\u0627\u0631\u0627\u062A\u0643 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0623\u0633\u0647\u0645. \u0627\u0646\u0642\u0631 \u0639\u0644\u0649 "\u0627\u0644\u062A\u0627\u0644\u064A" \u0644\u062A\u0623\u0643\u064A\u062F \u0627\u062E\u062A\u064A\u0627\u0631\u0643 \u0648\u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629.', "action.send": "\u0625\u0631\u0633\u0627\u0644", "action.back": "\u0631\u062C\u0648\u0639", "action.next": "\u0627\u0644\u062A\u0627\u0644\u064A", "action.start": "\u0627\u0628\u062F\u0623!", "message.success": "\u0634\u0643\u0631\u064B\u0627 \u0644\u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643!", "message.blocked": "\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0648\u0642\u062A\u0643\u060C \u0633\u0646\u0646\u0647\u064A \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0647\u0646\u0627.", "message.required": "\u064A\u0631\u062C\u0649 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0642\u0628\u0644 \u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629.", "message.rateLimit": "\u0637\u0644\u0628\u0627\u062A \u0643\u062B\u064A\u0631\u0629 \u062C\u062F\u064B\u0627. \u0633\u0646\u0639\u064A\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u062E\u0644\u0627\u0644 {seconds} \u062B\u0627\u0646\u064A\u0629..." }, bn: { "placeholder.answer": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u0989\u09A4\u09CD\u09A4\u09B0 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.number": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09B8\u0982\u0996\u09CD\u09AF\u09BE \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.email": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u0987\u09AE\u09C7\u0987\u09B2 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.date": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09A4\u09BE\u09B0\u09BF\u0996 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.password": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09AA\u09BE\u09B8\u0993\u09AF\u09BC\u09BE\u09B0\u09CD\u09A1 \u09B2\u09BF\u0996\u09C1\u09A8...", "pointSystem.error": "\u09AE\u09CB\u099F \u09AA\u09AF\u09BC\u09C7\u09A8\u09CD\u099F 100 % \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7", "boolean.yes": "\u09B9\u09CD\u09AF\u09BE\u0981", "boolean.no": "\u09A8\u09BE", "upload.cta": "\u099F\u09C7\u09A8\u09C7 \u0986\u09A8\u09C1\u09A8 \u09AC\u09BE \u0986\u09AA\u09B2\u09CB\u09A1 \u0995\u09B0\u09A4\u09C7 \u0995\u09CD\u09B2\u09BF\u0995 \u0995\u09B0\u09C1\u09A8", "upload.imagesOnly": "\u09B6\u09C1\u09A7\u09C1\u09AE\u09BE\u09A4\u09CD\u09B0 \u099B\u09AC\u09BF", "upload.anyFileType": "\u09AF\u09C7\u0995\u09CB\u09A8\u09CB \u09A7\u09B0\u09A8\u09C7\u09B0 \u09AB\u09BE\u0987\u09B2", "upload.maxFiles": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {n}\u099F\u09BF \u09AB\u09BE\u0987\u09B2", "upload.maxSize": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {mb} MB", "upload.tooLarge": "\u09AB\u09BE\u0987\u09B2\u099F\u09BF \u0996\u09C1\u09AC \u09AC\u09A1\u09BC (\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {mb} MB)", "upload.remove": "\u09B8\u09B0\u09BE\u09A8", "select.placeholder": "\u098F\u0995\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "rating.ariaLabel": "\u09B0\u09C7\u099F\u09BF\u0982", "maxDiff.best": "\u09B8\u09AC\u099A\u09C7\u09AF\u09BC\u09C7 \u0997\u09C1\u09B0\u09C1\u09A4\u09CD\u09AC\u09AA\u09C2\u09B0\u09CD\u09A3", "maxDiff.worst": "\u09B8\u09AC\u099A\u09C7\u09AF\u09BC\u09C7 \u0995\u09AE \u0997\u09C1\u09B0\u09C1\u09A4\u09CD\u09AC\u09AA\u09C2\u09B0\u09CD\u09A3", "maxDiff.setProgress": "\u09AC\u09CD\u09B2\u0995 {k}/{n}", "priority.selectUpTo": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.options": "\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA", "priority.thenOrder": "\u09A4\u09BE\u09B0\u09AA\u09B0 \u09B8\u09C7\u0997\u09C1\u09B2\u09CB \u09B8\u09BE\u099C\u09BE\u09A8", "priority.selectOptions": "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.cancel": "\u09AC\u09BE\u09A4\u09BF\u09B2", "priority.confirm": "\u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8", "priority.selectOptionNumber": "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA # \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.prioritized": "\u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0\u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4", "priority.of": "\u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7", "priority.instruction": '\u0986\u09AA\u09A8\u09BE\u09B0 \u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0 \u09A4\u09BE\u09B2\u09BF\u0995\u09BE \u09A8\u09BF\u099A\u09C7 \u09A6\u09C7\u0996\u09BE\u09A8\u09CB \u09B9\u09AF\u09BC\u09C7\u099B\u09C7\u0964 \u099A\u09BE\u0987\u09B2\u09C7 \u09A4\u09C0\u09B0 \u099A\u09BF\u09B9\u09CD\u09A8 \u09AC\u09CD\u09AF\u09AC\u09B9\u09BE\u09B0 \u0995\u09B0\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09AA\u099B\u09A8\u09CD\u09A6\u0997\u09C1\u09B2\u09CB \u09AA\u09C1\u09A8\u09B0\u09BE\u09AF\u09BC \u09B8\u09BE\u099C\u09BE\u09A4\u09C7 \u09AA\u09BE\u09B0\u09C7\u09A8\u0964 "\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0" \u0995\u09CD\u09B2\u09BF\u0995 \u0995\u09B0\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8 \u098F\u09AC\u0982 \u098F\u0997\u09BF\u09AF\u09BC\u09C7 \u09AF\u09BE\u09A8\u0964', "action.send": "\u09AA\u09BE\u09A0\u09BE\u09A8", "action.back": "\u09AA\u09BF\u099B\u09A8\u09C7", "action.next": "\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0", "action.start": "\u09B6\u09C1\u09B0\u09C1 \u0995\u09B0\u09C1\u09A8!", "message.success": "\u0986\u09AA\u09A8\u09BE\u09B0 \u09AE\u09A4\u09BE\u09AE\u09A4\u09C7\u09B0 \u099C\u09A8\u09CD\u09AF \u09A7\u09A8\u09CD\u09AF\u09AC\u09BE\u09A6!", "message.blocked": "\u0986\u09AA\u09A8\u09BE\u09B0 \u09B8\u09AE\u09AF\u09BC\u09C7\u09B0 \u099C\u09A8\u09CD\u09AF \u09A7\u09A8\u09CD\u09AF\u09AC\u09BE\u09A6, \u0986\u09AE\u09B0\u09BE \u098F\u0996\u09BE\u09A8\u09C7\u0987 \u0995\u09A5\u09CB\u09AA\u0995\u09A5\u09A8 \u09B6\u09C7\u09B7 \u0995\u09B0\u099B\u09BF\u0964", "message.required": "\u099A\u09BE\u09B2\u09BF\u09AF\u09BC\u09C7 \u09AF\u09BE\u0993\u09AF\u09BC\u09BE\u09B0 \u0986\u0997\u09C7 \u0985\u09A8\u09C1\u0997\u09CD\u09B0\u09B9 \u0995\u09B0\u09C7 \u0989\u09A4\u09CD\u09A4\u09B0 \u09A6\u09BF\u09A8\u0964", "message.rateLimit": "\u0985\u09A8\u09C7\u0995 \u09AC\u09C7\u09B6\u09BF \u0985\u09A8\u09C1\u09B0\u09CB\u09A7\u0964 {seconds} \u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1\u09C7 \u0986\u09AC\u09BE\u09B0 \u099A\u09C7\u09B7\u09CD\u099F\u09BE \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7..." }, it: { "boolean.yes": "S\xEC", "boolean.no": "No", "priority.selectUpTo": "Seleziona fino a", "priority.options": "opzioni", "priority.thenOrder": "e poi ordinali", "priority.selectOptions": "Seleziona opzioni", "priority.cancel": "Annulla", "priority.confirm": "Conferma", "priority.selectOptionNumber": "Seleziona opzione #", "priority.prioritized": "Prioritizzate", "priority.of": "di", "priority.instruction": 'La tua lista di priorit\xE0 \xE8 mostrata qui sotto. Se vuoi, puoi riordinare le tue scelte usando le frecce. Clicca su "Avanti" per confermare la selezione e continuare.' }, nl: { "boolean.yes": "Ja", "boolean.no": "Nee", "priority.selectUpTo": "Selecteer tot", "priority.options": "opties", "priority.thenOrder": "en rangschik ze vervolgens", "priority.selectOptions": "Selecteer opties", "priority.cancel": "Annuleren", "priority.confirm": "Bevestigen", "priority.selectOptionNumber": "Selecteer optie #", "priority.prioritized": "Geprioriteerd", "priority.of": "van", "priority.instruction": 'Je prioriteitenlijst wordt hieronder weergegeven. Als je wilt, kun je je keuzes herschikken met behulp van de pijlen. Klik op "Volgende" om je selectie te bevestigen en door te gaan.' }, pl: { "boolean.yes": "Tak", "boolean.no": "Nie", "priority.selectUpTo": "Wybierz do", "priority.options": "opcje", "priority.thenOrder": "a nast\u0119pnie je uporz\u0105dkuj", "priority.selectOptions": "Wybierz opcje", "priority.cancel": "Anuluj", "priority.confirm": "Potwierd\u017A", "priority.selectOptionNumber": "Wybierz opcj\u0119 #", "priority.prioritized": "Priorytetowe", "priority.of": "z", "priority.instruction": 'Twoja lista priorytet\xF3w jest pokazana poni\u017Cej. Je\u015Bli chcesz, mo\u017Cesz zmieni\u0107 kolejno\u015B\u0107 swoich wybor\xF3w za pomoc\u0105 strza\u0142ek. Kliknij "Dalej", aby potwierdzi\u0107 wyb\xF3r i kontynuowa\u0107.' }, ru: { "boolean.yes": "\u0414\u0430", "boolean.no": "\u041D\u0435\u0442", "priority.selectUpTo": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043E", "priority.options": "\u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432", "priority.thenOrder": "\u0430 \u0437\u0430\u0442\u0435\u043C \u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u044C\u0442\u0435 \u0438\u0445", "priority.selectOptions": "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B", "priority.cancel": "\u041E\u0442\u043C\u0435\u043D\u0430", "priority.confirm": "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C", "priority.selectOptionNumber": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 #", "priority.prioritized": "\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u044B", "priority.of": "\u0438\u0437", "priority.instruction": '\u0412\u0430\u0448 \u0441\u043F\u0438\u0441\u043E\u043A \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u043E\u0432 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043D\u0438\u0436\u0435. \u0415\u0441\u043B\u0438 \u0445\u043E\u0442\u0438\u0442\u0435, \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0440\u044F\u0434\u043E\u043A \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0441\u0442\u0440\u0435\u043B\u043E\u043A. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 "\u0414\u0430\u043B\u0435\u0435", \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u044B\u0431\u043E\u0440 \u0438 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C.' }, ja: { "boolean.yes": "\u306F\u3044", "boolean.no": "\u3044\u3044\u3048", "priority.selectUpTo": "\u6700\u5927", "priority.options": "\u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", "priority.thenOrder": "\u305D\u306E\u5F8C\u4E26\u3079\u66FF\u3048\u3066\u304F\u3060\u3055\u3044", "priority.selectOptions": "\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", "priority.cancel": "\u30AD\u30E3\u30F3\u30BB\u30EB", "priority.confirm": "\u78BA\u8A8D", "priority.selectOptionNumber": "\u30AA\u30D7\u30B7\u30E7\u30F3 # \u3092\u9078\u629E", "priority.prioritized": "\u512A\u5148\u9806\u4F4D", "priority.of": "\u306E\u3046\u3061", "priority.instruction": "\u512A\u5148\u9806\u4F4D\u30EA\u30B9\u30C8\u306F\u4EE5\u4E0B\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u3001\u77E2\u5370\u3092\u4F7F\u3063\u3066\u9078\u629E\u80A2\u3092\u4E26\u3079\u66FF\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u300C\u6B21\u3078\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u9078\u629E\u3092\u78BA\u5B9A\u3057\u3001\u7D9A\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002" }, zh: { "boolean.yes": "\u662F", "boolean.no": "\u4E0D", "priority.selectUpTo": "\u6700\u591A\u9009\u62E9", "priority.options": "\u4E2A\u9009\u9879", "priority.thenOrder": "\u7136\u540E\u6392\u5E8F\u5B83\u4EEC", "priority.selectOptions": "\u9009\u62E9\u9009\u9879", "priority.cancel": "\u53D6\u6D88", "priority.confirm": "\u786E\u8BA4", "priority.selectOptionNumber": "\u9009\u62E9\u9009\u9879 #", "priority.prioritized": "\u5DF2\u4F18\u5148", "priority.of": "\u5171", "priority.instruction": "\u4F60\u7684\u4F18\u5148\u5217\u8868\u5982\u4E0B\u6240\u793A\u3002\u5982\u6709\u9700\u8981\uFF0C\u53EF\u4EE5\u4F7F\u7528\u7BAD\u5934\u91CD\u65B0\u6392\u5E8F\u9009\u9879\u3002\u70B9\u51FB\u201C\u4E0B\u4E00\u6B65\u201D\u786E\u8BA4\u9009\u62E9\u5E76\u7EE7\u7EED\u3002" }, ko: { "boolean.yes": "\uC608", "boolean.no": "\uC544\uB2C8", "priority.selectUpTo": "\uCD5C\uB300", "priority.options": "\uAC1C\uC758 \uC635\uC158 \uC120\uD0DD", "priority.thenOrder": "\uADF8\uB7F0 \uB2E4\uC74C \uC815\uB82C\uD558\uC138\uC694", "priority.selectOptions": "\uC635\uC158 \uC120\uD0DD", "priority.cancel": "\uCDE8\uC18C", "priority.confirm": "\uD655\uC778", "priority.selectOptionNumber": "\uC635\uC158 # \uC120\uD0DD", "priority.prioritized": "\uC6B0\uC120\uC21C\uC704", "priority.of": "\uC911", "priority.instruction": '\uC6B0\uC120\uC21C\uC704 \uBAA9\uB85D\uC740 \uC544\uB798\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4. \uC6D0\uD55C\uB2E4\uBA74 \uD654\uC0B4\uD45C\uB97C \uC0AC\uC6A9\uD574 \uC120\uD0DD \uD56D\uBAA9\uC744 \uC7AC\uC815\uB82C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. "\uB2E4\uC74C"\uC744 \uD074\uB9AD\uD558\uC5EC \uC120\uD0DD\uC744 \uD655\uC778\uD558\uACE0 \uACC4\uC18D\uD558\uC138\uC694.' } };
2339
+ t2.SUPPORTED_LANGUAGES = ["en", "da", "fi", "no", "es", "sv", "ar", "bn", "de", "pt", "fr"], t2.AVAILABLE_LANGUAGES = Object.keys(n), t2.RTL_LANGUAGES = ["ar"];
2340
+ const r = { nb: "no", nn: "no", nob: "no", nno: "no", iw: "he", in: "id", cmn: "zh" };
2179
2341
  function o(e3) {
2180
2342
  if (!e3) return null;
2181
2343
  const t3 = e3.trim().toLowerCase().replace(/_/g, "-");
2182
2344
  if (!t3) return null;
2183
- if (r[t3]) return t3;
2184
- const i2 = t3.split("-")[0], o2 = n[i2] || i2;
2185
- return r[o2] ? o2 : null;
2345
+ if (n[t3]) return t3;
2346
+ const i2 = t3.split("-")[0], o2 = r[i2] || i2;
2347
+ return n[o2] ? o2 : null;
2186
2348
  }
2187
2349
  function a(e3) {
2188
2350
  return o(e3) || "en";
2189
2351
  }
2190
2352
  t2.normalizeLanguage = a, t2.TRANSLATION_KEYS = Object.keys(i), t2.hasOwnTranslation = function(e3, t3) {
2191
2353
  const i2 = o(e3);
2192
- return !!i2 && void 0 !== r[i2][t3];
2354
+ return !!i2 && void 0 !== n[i2][t3];
2193
2355
  }, t2.isRtlLanguage = function(e3) {
2194
2356
  return -1 !== t2.RTL_LANGUAGES.indexOf(a(e3));
2195
2357
  }, t2.isLanguageSupported = function(e3) {
2196
2358
  const i2 = o(e3);
2197
2359
  return !!i2 && -1 !== t2.SUPPORTED_LANGUAGES.indexOf(i2);
2198
- }, t2.t = function(e3, t3, n2) {
2199
- const o2 = r[a(e3)] || i, s = void 0 !== o2[t3] ? o2[t3] : i[t3];
2200
- return n2 ? (function(e4, t4) {
2360
+ }, t2.t = function(e3, t3, r2) {
2361
+ const o2 = n[a(e3)] || i, s = void 0 !== o2[t3] ? o2[t3] : i[t3];
2362
+ return r2 ? (function(e4, t4) {
2201
2363
  return Object.keys(t4).reduce(((e5, i2) => e5.replace(new RegExp("\\{" + i2 + "\\}", "g"), String(t4[i2]))), e4);
2202
- })(s, n2) : s;
2364
+ })(s, r2) : s;
2203
2365
  };
2204
- }, 857: (e2, t2) => {
2366
+ }, 1347: (e2, t2) => {
2205
2367
  "use strict";
2206
2368
  Object.defineProperty(t2, "__esModule", { value: true }), t2.endpoints = void 0, t2.endpoints = { sdk: { app: (e3, t3) => `sdk/app/${e3}/${t3}`, app_info: (e3, t3) => `sdk/app/${e3}/${t3}/info`, session: (e3) => `sdk/app/session/${e3}/info`, feedback: "sdk/feedback", followUpQuestion: "sdk/followUpQuestion", agentSurveyStart: "sdk/agentSurvey/start", agentSurveyNext: "sdk/agentSurvey/next" } };
2207
- }, 784: (e2, t2, i) => {
2369
+ }, 9930: (e2, t2, i) => {
2208
2370
  "use strict";
2209
2371
  Object.defineProperty(t2, "__esModule", { value: true }), t2.placeholder = void 0;
2210
- const r = i(881);
2211
- t2.placeholder = { answer: (e3) => (0, r.t)(e3, "placeholder.answer"), number: (e3) => (0, r.t)(e3, "placeholder.number"), email: (e3) => (0, r.t)(e3, "placeholder.email"), date: (e3) => (0, r.t)(e3, "placeholder.date"), password: (e3) => (0, r.t)(e3, "placeholder.password"), pointsystemerror: (e3) => (0, r.t)(e3, "pointSystem.error"), upload: { cta: (e3) => (0, r.t)(e3, "upload.cta"), formats: (e3, t3) => (0, r.t)(e3, "image" === t3 ? "upload.imagesOnly" : "upload.anyFileType"), maxFiles: (e3, t3) => (0, r.t)(e3, "upload.maxFiles", { n: t3 }), maxSize: (e3, t3) => (0, r.t)(e3, "upload.maxSize", { mb: t3 }), tooLarge: (e3, t3) => (0, r.t)(e3, "upload.tooLarge", { mb: t3 }), remove: (e3) => (0, r.t)(e3, "upload.remove") } };
2212
- }, 213: (e2, t2, i) => {
2372
+ const n = i(7031);
2373
+ t2.placeholder = { answer: (e3) => (0, n.t)(e3, "placeholder.answer"), number: (e3) => (0, n.t)(e3, "placeholder.number"), email: (e3) => (0, n.t)(e3, "placeholder.email"), date: (e3) => (0, n.t)(e3, "placeholder.date"), password: (e3) => (0, n.t)(e3, "placeholder.password"), pointsystemerror: (e3) => (0, n.t)(e3, "pointSystem.error"), upload: { cta: (e3) => (0, n.t)(e3, "upload.cta"), formats: (e3, t3) => (0, n.t)(e3, "image" === t3 ? "upload.imagesOnly" : "upload.anyFileType"), maxFiles: (e3, t3) => (0, n.t)(e3, "upload.maxFiles", { n: t3 }), maxSize: (e3, t3) => (0, n.t)(e3, "upload.maxSize", { mb: t3 }), tooLarge: (e3, t3) => (0, n.t)(e3, "upload.tooLarge", { mb: t3 }), remove: (e3) => (0, n.t)(e3, "upload.remove") } };
2374
+ }, 3903: (e2, t2, i) => {
2213
2375
  "use strict";
2214
2376
  Object.defineProperty(t2, "__esModule", { value: true }), t2.renderStartMessage = t2.renderSuccess = t2.renderError = t2.renderActions = t2.renderQuestions = void 0;
2215
- const r = i(42), n = i(516), o = { small: "1rem", medium: "1.2rem", large: "1.5rem" };
2216
- t2.renderQuestions = function e3(t3, i2 = "standard", a = "en", s = { customIcons: false }, l) {
2377
+ const n = i(1140), r = i(7156), o = i(6658), a = i(6029), s = i(2139), l = { small: "1rem", medium: "1.2rem", large: "1.5rem" };
2378
+ t2.renderQuestions = function e3(t3, i2 = "standard", d = "en", c = { customIcons: false }, u) {
2217
2379
  if (!t3) throw new Error("[MagicFeedback] No questions provided");
2218
- const d = [], { customIcons: c, id: u } = s;
2219
- return t3.forEach(((p) => {
2220
- var m, h;
2221
- if ((null === (h = null === (m = null == p ? void 0 : p.questionType) || void 0 === m ? void 0 : m.conf) || void 0 === h ? void 0 : h.length) > 0) {
2380
+ const p = [], { customIcons: m, id: h } = c;
2381
+ return t3.forEach(((f) => {
2382
+ var g, y;
2383
+ if ((null === (y = null === (g = null == f ? void 0 : f.questionType) || void 0 === g ? void 0 : g.conf) || void 0 === y ? void 0 : y.length) > 0) {
2222
2384
  let t4 = document.createElement("div");
2223
2385
  t4.classList.add("magicfeedback-div");
2224
- const r2 = document.createElement("label");
2225
- r2.setAttribute("for", `magicfeedback-${p.id}`), r2.textContent = (0, n.parseTitle)(p.title, a), r2.classList.add("magicfeedback-label"), t4.appendChild(r2), p.questionType.conf.forEach(((e4) => {
2226
- e4.ref = p.ref, p.assets[e4.id] && (e4.assets = { placeholder: p.assets[e4.id] });
2227
- })), e3(p.questionType.conf, i2, a, s, l).forEach(((e4) => {
2386
+ const n2 = document.createElement("label");
2387
+ n2.setAttribute("for", `magicfeedback-${f.id}`), n2.textContent = (0, o.parseTitle)(f.title, d), n2.classList.add("magicfeedback-label"), t4.appendChild(n2), f.questionType.conf.forEach(((e4) => {
2388
+ e4.ref = f.ref, f.assets[e4.id] && (e4.assets = { placeholder: f.assets[e4.id] });
2389
+ })), e3(f.questionType.conf, i2, d, c, u).forEach(((e4) => {
2228
2390
  t4.appendChild(e4);
2229
- })), d.push(t4);
2391
+ })), p.push(t4);
2230
2392
  } else {
2231
- const e4 = (function(e5, t4, i3, a2, s2) {
2232
- var l2, d2, c2;
2233
- let u2, p2, { id: m2, title: h2, type: f, ref: g, require: y, defaultValue: v, assets: b } = e5, E = document.createElement("div");
2234
- E.classList.add("magicfeedback-div");
2235
- const k = window.innerWidth < 600, A = "slim" === t4 ? (0, n.parseTitle)(h2, i3) : null == b ? void 0 : b.placeholder, T = (0, n.getUrlParam)(g), C = (null == b ? void 0 : b.maxCharacters) || 0, L = void 0 !== (null == b ? void 0 : b.randomPosition) && (null == b ? void 0 : b.randomPosition), x = (null == b ? void 0 : b.direction) || "row", S = (null == b ? void 0 : b.order) || "ltr", O = (0, r.getQuestionRenderer)(f);
2236
- if (!O) return E;
2393
+ const e4 = (function(e5, t4, i3, d2, c2, u2) {
2394
+ var p2, m2, h2;
2395
+ let f2, g2, { id: y2, title: v, type: b, ref: E, require: A, defaultValue: k, assets: T } = e5, C = document.createElement("div");
2396
+ C.classList.add("magicfeedback-div");
2397
+ const x = window.innerWidth < 600, P = "slim" === t4 ? (0, o.parseTitle)(v, i3) : null == T ? void 0 : T.placeholder, L = (0, a.shownValueFor)(e5, (0, o.getUrlParam)(E)), S = (null == T ? void 0 : T.maxCharacters) || 0, w = false === (null == T ? void 0 : T.autoAdvance) ? void 0 : c2, O = void 0 !== (null == T ? void 0 : T.randomPosition) && (null == T ? void 0 : T.randomPosition), N = (null == T ? void 0 : T.direction) || "row", I = (null == T ? void 0 : T.order) || "ltr", D = (0, r.getQuestionRenderer)(b);
2398
+ if (!D) return C;
2237
2399
  {
2238
- const r2 = O({ question: e5, format: t4, language: i3, url: a2, send: s2, isPhone: k, urlParamValue: T, placeholderText: A, maxCharacters: C, randomPosition: L, direction: x, order: S });
2239
- u2 = r2.element, p2 = r2.elementTypeClass;
2400
+ const r2 = D({ question: e5, format: t4, language: i3, url: d2, send: b === n.FEEDBACKAPPANSWERTYPE.TEXT ? c2 : w, isPhone: x, urlParamValue: L, placeholderText: P, maxCharacters: S, randomPosition: O, direction: N, order: I, productId: u2 });
2401
+ f2 = r2.element, g2 = r2.elementTypeClass;
2240
2402
  }
2241
- u2.id = `magicfeedback-${m2}`, u2.setAttribute("name", g), u2.classList.add(p2), (void 0 !== v || null !== T) && (u2.value = T || v), ["RADIO", "MULTIPLECHOICE", "UPLOAD_IMAGE", "UPLOAD_FILE"].includes(f) || (u2.classList.add("magicfeedback-input"), u2.required = y);
2242
- const P = document.createElement("label");
2243
- P.setAttribute("for", `magicfeedback-${m2}`), P.textContent = (0, n.parseTitle)(h2, i3), P.classList.add("magicfeedback-label"), (function(e6, t5) {
2403
+ f2.id = `magicfeedback-${y2}`, f2.setAttribute("name", E), f2.classList.add(g2), (void 0 !== k || null !== L) && (f2.value = L || k), ["RADIO", "MULTIPLECHOICE", "UPLOAD_IMAGE", "UPLOAD_FILE"].includes(b) || (f2.classList.add("magicfeedback-input"), f2.required = A);
2404
+ const R = document.createElement("label");
2405
+ R.setAttribute("for", `magicfeedback-${y2}`), R.textContent = (0, o.parseTitle)(v, i3), R.classList.add("magicfeedback-label"), (function(e6, t5) {
2244
2406
  if ("INFO_PAGE" !== t5.type) return;
2245
- const { assets: i4 } = t5, r2 = (function(e7) {
2246
- if (e7) return o[e7] || e7;
2247
- })(null == i4 ? void 0 : i4.titleSize), n2 = (a3 = null == i4 ? void 0 : i4.titleStyle, Array.isArray(a3) ? a3 : a3 ? [a3] : []);
2248
- var a3;
2249
- r2 && e6.style.setProperty("font-size", r2, "important"), (null == i4 ? void 0 : i4.titleAlign) && (e6.style.setProperty("width", "100%", "important"), e6.style.setProperty("align-self", "stretch", "important"), e6.style.setProperty("text-align", i4.titleAlign, "important")), n2.includes("italic") && e6.style.setProperty("font-style", "italic", "important"), n2.includes("bold") && e6.style.setProperty("font-weight", "bold", "important"), n2.includes("underline") && e6.style.setProperty("text-decoration", "underline", "important");
2250
- })(P, e5);
2251
- const w = document.createElement("label");
2252
- if (w.textContent = (0, n.parseTitle)(null == b ? void 0 : b.subtitle, i3), w.classList.add("magicfeedback-sublabel"), (null === (l2 = null == b ? void 0 : b.subtitleStyle) || void 0 === l2 ? void 0 : l2.includes("italic")) && (w.style.fontStyle = "italic"), (null === (d2 = null == b ? void 0 : b.subtitleStyle) || void 0 === d2 ? void 0 : d2.includes("bold")) && (w.style.fontWeight = "bold"), (null === (c2 = null == b ? void 0 : b.subtitleStyle) || void 0 === c2 ? void 0 : c2.includes("underline")) && (w.style.textDecoration = "underline"), ["CONSENT"].includes(f)) E.classList.add("magicfeedback-consent-container"), E.appendChild(u2), E.appendChild(P), (null == b ? void 0 : b.subtitle) && E.appendChild(w);
2407
+ const { assets: i4 } = t5, n2 = (function(e7) {
2408
+ if (e7) return l[e7] || e7;
2409
+ })(null == i4 ? void 0 : i4.titleSize), r2 = (o2 = null == i4 ? void 0 : i4.titleStyle, Array.isArray(o2) ? o2 : o2 ? [o2] : []);
2410
+ var o2;
2411
+ n2 && e6.style.setProperty("font-size", n2, "important"), (null == i4 ? void 0 : i4.titleAlign) && (e6.style.setProperty("width", "100%", "important"), e6.style.setProperty("align-self", "stretch", "important"), e6.style.setProperty("text-align", i4.titleAlign, "important")), r2.includes("italic") && e6.style.setProperty("font-style", "italic", "important"), r2.includes("bold") && e6.style.setProperty("font-weight", "bold", "important"), r2.includes("underline") && e6.style.setProperty("text-decoration", "underline", "important");
2412
+ })(R, e5);
2413
+ const M = document.createElement("label");
2414
+ if (M.textContent = (0, o.parseTitle)(null == T ? void 0 : T.subtitle, i3), M.classList.add("magicfeedback-sublabel"), (null === (p2 = null == T ? void 0 : T.subtitleStyle) || void 0 === p2 ? void 0 : p2.includes("italic")) && (M.style.fontStyle = "italic"), (null === (m2 = null == T ? void 0 : T.subtitleStyle) || void 0 === m2 ? void 0 : m2.includes("bold")) && (M.style.fontWeight = "bold"), (null === (h2 = null == T ? void 0 : T.subtitleStyle) || void 0 === h2 ? void 0 : h2.includes("underline")) && (M.style.textDecoration = "underline"), ["CONSENT"].includes(b)) C.classList.add("magicfeedback-consent-container"), C.appendChild(f2), C.appendChild(R), (null == T ? void 0 : T.subtitle) && C.appendChild(M);
2253
2415
  else {
2254
- if ("slim" !== t4 && (E.appendChild(P), (null == b ? void 0 : b.subtitle) && E.appendChild(w), void 0 !== (null == b ? void 0 : b.general) && "" !== (null == b ? void 0 : b.general))) {
2416
+ if ("slim" !== t4 && (C.appendChild(R), (null == T ? void 0 : T.subtitle) && C.appendChild(M), void 0 !== (null == T ? void 0 : T.general) && "" !== (null == T ? void 0 : T.general))) {
2255
2417
  const e6 = document.createElement("img");
2256
- e6.src = null == b ? void 0 : b.general, e6.classList.add("magicfeedback-image"), e6.style.maxWidth = "auto", e6.style.height = "400px", e6.style.margin = "10px 0", E.appendChild(e6);
2418
+ e6.src = null == T ? void 0 : T.general, e6.classList.add("magicfeedback-image"), e6.style.maxWidth = "auto", e6.style.height = "400px", e6.style.margin = "10px 0", C.appendChild(e6);
2257
2419
  }
2258
- if ("LONGTEXT" === f && C > 0) {
2420
+ if ("LONGTEXT" === b && S > 0) {
2259
2421
  const e6 = document.createElement("div");
2260
- if (e6.classList.add("magicfeedback-counter"), e6.textContent = `${u2.value.length}/${C}`, e6.style.textAlign = "end", e6.style.fontSize = "15px", e6.style.marginTop = "5px", u2.addEventListener("input", (() => {
2261
- e6.textContent = `${u2.value.length}/${C}`;
2262
- })), E.appendChild(u2), E.appendChild(e6), (null == b ? void 0 : b.extraOption) && (null == b ? void 0 : b.extraOptionText)) {
2422
+ if (e6.classList.add("magicfeedback-counter"), e6.textContent = `${f2.value.length}/${S}`, e6.style.textAlign = "end", e6.style.fontSize = "15px", e6.style.marginTop = "5px", f2.addEventListener("input", (() => {
2423
+ e6.textContent = `${f2.value.length}/${S}`;
2424
+ })), C.appendChild(f2), C.appendChild(e6), (null == T ? void 0 : T.extraOption) && (null == T ? void 0 : T.extraOptionText)) {
2263
2425
  const e7 = document.createElement("div");
2264
2426
  e7.classList.add("magicfeedback-skip-container"), e7.classList.add("magicfeedback-checkbox-container"), e7.style.display = "flex", e7.style.justifyContent = "flex-start";
2265
2427
  const t5 = document.createElement("input");
2266
- t5.classList.add("magicfeedback-skip"), t5.type = "checkbox", t5.id = `skip-${g}`, t5.name = g, t5.value = "-", t5.style.cursor = "pointer";
2428
+ t5.classList.add("magicfeedback-skip"), t5.type = "checkbox", t5.id = `skip-${E}`, t5.name = E, t5.value = "-", t5.style.cursor = "pointer";
2267
2429
  const i4 = document.createElement("label");
2268
- i4.htmlFor = `skip-${g}`, i4.textContent = null == b ? void 0 : b.extraOptionText, i4.style.fontSize = "15px", i4.style.cursor = "pointer", i4.style.margin = "0 5px", t5.addEventListener("click", (() => {
2269
- u2.value = "-", s2 && s2();
2270
- })), e7.appendChild(t5), e7.appendChild(i4), E.appendChild(e7);
2430
+ i4.htmlFor = `skip-${E}`, i4.textContent = null == T ? void 0 : T.extraOptionText, i4.style.fontSize = "15px", i4.style.cursor = "pointer", i4.style.margin = "0 5px", t5.addEventListener("click", (() => {
2431
+ f2.value = "-";
2432
+ })), (0, s.autoAdvanceOn)(t5, w, "click"), e7.appendChild(t5), e7.appendChild(i4), C.appendChild(e7);
2271
2433
  }
2272
- } else E.appendChild(u2);
2434
+ } else C.appendChild(f2);
2273
2435
  }
2274
- return E;
2275
- })(p, i2, a, "https://survey-dev.magicfeedback.io/assets/emojis" + (c ? `/${u}` : ""), 1 === t3.length ? l : void 0);
2276
- d.push(e4);
2436
+ return C;
2437
+ })(f, i2, d, "https://survey-dev.magicfeedback.io/assets/emojis" + (m ? `/${h}` : ""), 1 === t3.length ? u : void 0, h);
2438
+ p.push(e4);
2277
2439
  }
2278
- })), d;
2279
- }, t2.renderActions = function(e3 = "", t3, i2 = "Submit", r2 = "Back", n2 = "Next") {
2440
+ })), p;
2441
+ }, t2.renderActions = function(e3 = "", t3, i2 = "Submit", n2 = "Back", r2 = "Next") {
2280
2442
  const o2 = document.createElement("div");
2281
2443
  o2.classList.add("magicfeedback-action-container");
2282
- const a = document.createElement("button");
2283
- a.id = "magicfeedback-submit", a.type = "submit", a.classList.add("magicfeedback-submit"), a.textContent = "MAGICSURVEY" === e3 ? n2 || "Next" : i2 || "Submit";
2284
- const s = document.createElement("button");
2285
- return s.id = "magicfeedback-back", s.type = "button", s.classList.add("magicfeedback-back"), s.textContent = r2 || "Back", s.addEventListener("click", t3), s.addEventListener("click", (() => {
2286
- a.removeAttribute("disabled");
2287
- })), "MAGICSURVEY" === e3 && o2.appendChild(s), o2.appendChild(a), o2;
2444
+ const a2 = document.createElement("button");
2445
+ a2.id = "magicfeedback-submit", a2.type = "submit", a2.classList.add("magicfeedback-submit"), a2.textContent = "MAGICSURVEY" === e3 ? r2 || "Next" : i2 || "Submit";
2446
+ const s2 = document.createElement("button");
2447
+ return s2.id = "magicfeedback-back", s2.type = "button", s2.classList.add("magicfeedback-back"), s2.textContent = n2 || "Back", s2.addEventListener("click", t3), s2.addEventListener("click", (() => {
2448
+ a2.removeAttribute("disabled");
2449
+ })), "MAGICSURVEY" === e3 && o2.appendChild(s2), o2.appendChild(a2), o2;
2288
2450
  }, t2.renderError = function(e3) {
2289
2451
  const t3 = document.createElement("div");
2290
2452
  return t3.classList.add("magicfeedback-error"), t3.textContent = e3, t3;
2291
2453
  }, t2.renderSuccess = function(e3) {
2292
2454
  const t3 = document.createElement("div");
2293
2455
  return t3.classList.add("magicfeedback-success"), t3.textContent = e3, t3;
2294
- }, t2.renderStartMessage = function(e3, t3 = false, i2 = "Go!", r2 = () => {
2456
+ }, t2.renderStartMessage = function(e3, t3 = false, i2 = "Go!", n2 = () => {
2295
2457
  }) {
2296
- const n2 = document.createElement("div");
2297
- n2.classList.add("magicfeedback-start-message-container");
2458
+ const r2 = document.createElement("div");
2459
+ r2.classList.add("magicfeedback-start-message-container");
2298
2460
  const o2 = document.createElement("div");
2299
- if (o2.classList.add("magicfeedback-start-message"), o2.innerHTML = e3, n2.appendChild(o2), t3) {
2461
+ if (o2.classList.add("magicfeedback-start-message"), o2.innerHTML = e3, r2.appendChild(o2), t3) {
2300
2462
  const e4 = document.createElement("button");
2301
- e4.id = "magicfeedback-start-message-button", e4.classList.add("magicfeedback-start-message-button"), e4.textContent = i2, e4.addEventListener("click", (() => r2())), n2.appendChild(e4);
2463
+ e4.id = "magicfeedback-start-message-button", e4.classList.add("magicfeedback-start-message-button"), e4.textContent = i2, e4.addEventListener("click", (() => n2())), r2.appendChild(e4);
2302
2464
  }
2303
- return n2;
2465
+ return r2;
2304
2466
  };
2305
- }, 313: function(e2, t2, i) {
2467
+ }, 6891: function(e2, t2, i) {
2306
2468
  "use strict";
2307
- var r = this && this.__awaiter || function(e3, t3, i2, r2) {
2308
- return new (i2 || (i2 = Promise))((function(n2, o2) {
2469
+ var n = this && this.__awaiter || function(e3, t3, i2, n2) {
2470
+ return new (i2 || (i2 = Promise))((function(r2, o2) {
2309
2471
  function a2(e4) {
2310
2472
  try {
2311
- l(r2.next(e4));
2473
+ l2(n2.next(e4));
2312
2474
  } catch (e5) {
2313
2475
  o2(e5);
2314
2476
  }
2315
2477
  }
2316
2478
  function s2(e4) {
2317
2479
  try {
2318
- l(r2.throw(e4));
2480
+ l2(n2.throw(e4));
2319
2481
  } catch (e5) {
2320
2482
  o2(e5);
2321
2483
  }
2322
2484
  }
2323
- function l(e4) {
2485
+ function l2(e4) {
2324
2486
  var t4;
2325
- e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
2487
+ e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
2326
2488
  e5(t4);
2327
2489
  }))).then(a2, s2);
2328
2490
  }
2329
- l((r2 = r2.apply(e3, t3 || [])).next());
2491
+ l2((n2 = n2.apply(e3, t3 || [])).next());
2330
2492
  }));
2331
- }, n = this && this.__importDefault || function(e3) {
2493
+ }, r = this && this.__importDefault || function(e3) {
2332
2494
  return e3 && e3.__esModule ? e3 : { default: e3 };
2333
2495
  };
2334
2496
  Object.defineProperty(t2, "__esModule", { value: true }), t2.getFollowUpQuestion = t2.sendFeedback = t2.getQuestions = t2.getSessionForm = t2.getForm = t2.validateEmail = t2.header = void 0;
2335
- const o = n(i(326)), a = n(i(330)), s = i(857);
2497
+ const o = r(i(6911)), a = r(i(8330)), s = i(1347), l = i(6029);
2336
2498
  t2.header = { Accept: "application/json", "Magicfeedback-Sdk-Version": a.default.version, "x-magicfeedback-parameters": window.location.search || "" }, t2.validateEmail = function(e3) {
2337
2499
  return /\S+@\S+\.\S+/.test(e3);
2338
- }, t2.getForm = function(e3, i2, n2, a2) {
2339
- return r(this, void 0, void 0, (function* () {
2500
+ }, t2.getForm = function(e3, i2, r2, a2, d) {
2501
+ return n(this, void 0, void 0, (function* () {
2340
2502
  try {
2341
- const r2 = yield (0, o.default)(e3 + s.endpoints.sdk.app_info(i2, n2), { method: "GET", headers: t2.header });
2342
- return yield r2.json();
2503
+ const n2 = yield (0, o.default)((0, l.withLangParam)(e3 + s.endpoints.sdk.app_info(i2, r2), d), { method: "GET", headers: t2.header });
2504
+ return yield n2.json();
2343
2505
  } catch (e4) {
2344
2506
  a2.err(e4);
2345
2507
  }
2346
2508
  }));
2347
- }, t2.getSessionForm = function(e3, i2, n2) {
2348
- return r(this, void 0, void 0, (function* () {
2509
+ }, t2.getSessionForm = function(e3, i2, r2, a2) {
2510
+ return n(this, void 0, void 0, (function* () {
2349
2511
  try {
2350
- const r2 = yield (0, o.default)(e3 + s.endpoints.sdk.session(i2), { method: "GET", headers: t2.header });
2351
- return yield r2.json();
2512
+ const n2 = yield (0, o.default)((0, l.withLangParam)(e3 + s.endpoints.sdk.session(i2), a2), { method: "GET", headers: t2.header });
2513
+ return yield n2.json();
2352
2514
  } catch (e4) {
2353
- n2.err(e4);
2515
+ r2.err(e4);
2354
2516
  }
2355
2517
  }));
2356
- }, t2.getQuestions = function(e3, i2, n2, a2) {
2357
- return r(this, void 0, void 0, (function* () {
2518
+ }, t2.getQuestions = function(e3, i2, r2, a2, d) {
2519
+ return n(this, void 0, void 0, (function* () {
2358
2520
  try {
2359
- const r2 = yield (0, o.default)(e3 + s.endpoints.sdk.app(i2, n2), { method: "GET", headers: t2.header });
2360
- if (r2.ok) {
2361
- const e4 = yield r2.json();
2521
+ const n2 = yield (0, o.default)((0, l.withLangParam)(e3 + s.endpoints.sdk.app(i2, r2), d), { method: "GET", headers: t2.header });
2522
+ if (n2.ok) {
2523
+ const e4 = yield n2.json();
2362
2524
  return a2.log(`Received questions for app ${i2}`, e4), e4;
2363
2525
  }
2364
- throw a2.err(`Failed to get questions for app ${i2}:`, r2.status, r2.statusText), new Error("[MagicFeedback] Bad response from server");
2526
+ throw a2.err(`Failed to get questions for app ${i2}:`, n2.status, n2.statusText), new Error("[MagicFeedback] Bad response from server");
2365
2527
  } catch (e4) {
2366
2528
  return a2.err(e4), [];
2367
2529
  }
2368
2530
  }));
2369
- }, t2.sendFeedback = function(e3, i2, n2) {
2370
- return r(this, void 0, void 0, (function* () {
2531
+ }, t2.sendFeedback = function(e3, i2, r2) {
2532
+ return n(this, void 0, void 0, (function* () {
2371
2533
  try {
2372
- const r2 = yield (0, o.default)(e3 + s.endpoints.sdk.feedback, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, t2.header), body: JSON.stringify(i2) });
2373
- if (r2.ok) return n2.log(`Form ${i2.integration} submitted successfully!`), (yield r2.json()).sessionId;
2374
- throw n2.err(`Failed to submit form ${i2.integration}:`, r2.status, r2.statusText), new Error(r2.statusText);
2534
+ const n2 = yield (0, o.default)(e3 + s.endpoints.sdk.feedback, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, t2.header), body: JSON.stringify(i2) });
2535
+ if (n2.ok) return r2.log(`Form ${i2.integration} submitted successfully!`), (yield n2.json()).sessionId;
2536
+ throw r2.err(`Failed to submit form ${i2.integration}:`, n2.status, n2.statusText), new Error(n2.statusText);
2375
2537
  } catch (e4) {
2376
- return n2.err(e4), "";
2538
+ return r2.err(e4), "";
2377
2539
  }
2378
2540
  }));
2379
- }, t2.getFollowUpQuestion = function(e3, i2, n2) {
2380
- return r(this, void 0, void 0, (function* () {
2541
+ }, t2.getFollowUpQuestion = function(e3, i2, r2) {
2542
+ return n(this, void 0, void 0, (function* () {
2381
2543
  try {
2382
- const r2 = yield (0, o.default)(e3 + s.endpoints.sdk.followUpQuestion, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, t2.header), body: JSON.stringify(i2) });
2383
- if (r2.ok) return n2.log(`Received follow up question for form ${i2.integration}`), (yield r2.json()) || "";
2384
- throw n2.err(`Failed to get follow up question for form ${i2.integration}:`, r2.status, r2.statusText), new Error(r2.statusText);
2544
+ const n2 = yield (0, o.default)(e3 + s.endpoints.sdk.followUpQuestion, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, t2.header), body: JSON.stringify(i2) });
2545
+ if (n2.ok) return r2.log(`Received follow up question for form ${i2.integration}`), (yield n2.json()) || "";
2546
+ throw r2.err(`Failed to get follow up question for form ${i2.integration}:`, n2.status, n2.statusText), new Error(n2.statusText);
2385
2547
  } catch (e4) {
2386
- return n2.err(e4), "";
2548
+ return r2.err(e4), "";
2549
+ }
2550
+ }));
2551
+ };
2552
+ }, 6029: (e2, t2, i) => {
2553
+ "use strict";
2554
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.toBaseAnswers = t2.shownValueFor = t2.baseValueMap = t2.withLangParam = t2.detectSurveyLang = t2.normalizeSurveyLang = void 0;
2555
+ const n = i(1140), r = { nb: "no", nn: "no", nob: "no", nno: "no" };
2556
+ function o(e3) {
2557
+ if (!e3 || "string" != typeof e3) return null;
2558
+ const t3 = e3.trim().toLowerCase().replace(/_/g, "-").split("-")[0];
2559
+ return /^[a-z]{2,3}$/.test(t3) ? r[t3] || t3 : null;
2560
+ }
2561
+ function a(e3) {
2562
+ if (null == e3) return null;
2563
+ if ("string" == typeof e3 && e3.trim().startsWith("{")) try {
2564
+ e3 = JSON.parse(e3);
2565
+ } catch (t3) {
2566
+ return e3;
2567
+ }
2568
+ return "object" == typeof e3 ? void 0 !== e3.value ? String(e3.value) : null : String(e3);
2569
+ }
2570
+ function s(e3) {
2571
+ const t3 = /* @__PURE__ */ new Map(), i2 = null == e3 ? void 0 : e3.value, n2 = null == e3 ? void 0 : e3.baseValue;
2572
+ return Array.isArray(i2) && Array.isArray(n2) ? (i2.forEach(((e4, i3) => {
2573
+ const r2 = a(e4), o2 = a(n2[i3]);
2574
+ null === r2 || null === o2 || t3.has(r2) || t3.set(r2, o2);
2575
+ })), t3) : t3;
2576
+ }
2577
+ t2.normalizeSurveyLang = o, t2.detectSurveyLang = function(e3) {
2578
+ return o(e3) || (function() {
2579
+ if ("undefined" == typeof navigator) return null;
2580
+ const e4 = [...Array.isArray(navigator.languages) ? navigator.languages : [], navigator.language];
2581
+ for (const t3 of e4) {
2582
+ const e5 = o(t3);
2583
+ if (e5) return e5;
2584
+ }
2585
+ return null;
2586
+ })();
2587
+ }, t2.withLangParam = function(e3, t3) {
2588
+ return t3 ? `${e3}${e3.includes("?") ? "&" : "?"}lang=${encodeURIComponent(t3)}` : e3;
2589
+ }, t2.baseValueMap = s, t2.shownValueFor = function(e3, t3) {
2590
+ var i2, n2;
2591
+ if (null === t3 || !Array.isArray(null == e3 ? void 0 : e3.baseValue)) return t3;
2592
+ const r2 = e3.baseValue.findIndex(((e4) => a(e4) === t3));
2593
+ return -1 === r2 ? t3 : null !== (n2 = a(null === (i2 = e3.value) || void 0 === i2 ? void 0 : i2[r2])) && void 0 !== n2 ? n2 : t3;
2594
+ };
2595
+ const l = [n.FEEDBACKAPPANSWERTYPE.RADIO, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE, n.FEEDBACKAPPANSWERTYPE.SELECT];
2596
+ t2.toBaseAnswers = function(e3, t3) {
2597
+ return e3.map(((e4) => {
2598
+ if (e4.key.startsWith("extra-option-")) return e4;
2599
+ const i2 = t3.find(((t4) => t4.ref === e4.key)) || t3.find(((t4) => e4.key.includes(t4.ref)));
2600
+ if (!i2) return e4;
2601
+ const r2 = s(i2);
2602
+ if (0 === r2.size) return e4;
2603
+ let o2;
2604
+ if (l.includes(i2.type)) o2 = (e5) => {
2605
+ var t4;
2606
+ return "string" == typeof e5 && null !== (t4 = r2.get(e5)) && void 0 !== t4 ? t4 : e5;
2607
+ };
2608
+ else if (i2.type === n.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST) o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
2609
+ var i3, n2;
2610
+ const r3 = /^(\d+)\.\s?(.*)$/.exec(e6);
2611
+ if (!r3) return null !== (i3 = t4.get(e6)) && void 0 !== i3 ? i3 : e6;
2612
+ const o3 = r3[2];
2613
+ return `${r3[1]}. ${null !== (n2 = t4.get(o3)) && void 0 !== n2 ? n2 : o3}`;
2614
+ })(e5, r2) : e5;
2615
+ else if (i2.type === n.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM) o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
2616
+ var i3;
2617
+ const n2 = e6.lastIndexOf(":");
2618
+ if (-1 === n2) return e6;
2619
+ const r3 = e6.substring(0, n2);
2620
+ return `${null !== (i3 = t4.get(r3)) && void 0 !== i3 ? i3 : r3}${e6.substring(n2)}`;
2621
+ })(e5, r2) : e5;
2622
+ else if (i2.type === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
2623
+ try {
2624
+ const i3 = JSON.parse(e6);
2625
+ return Array.isArray(i3) ? JSON.stringify(i3.map(((e7) => Object.assign(Object.assign({}, e7), { value: Array.isArray(null == e7 ? void 0 : e7.value) ? e7.value.map(((e8) => {
2626
+ var i4;
2627
+ return null !== (i4 = t4.get(e8)) && void 0 !== i4 ? i4 : e8;
2628
+ })) : null == e7 ? void 0 : e7.value })))) : e6;
2629
+ } catch (t5) {
2630
+ return e6;
2631
+ }
2632
+ })(e5, r2) : e5;
2633
+ else {
2634
+ if (i2.type !== n.FEEDBACKAPPANSWERTYPE.MAX_DIFF) return e4;
2635
+ o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
2636
+ try {
2637
+ const i3 = JSON.parse(e6);
2638
+ if (!Array.isArray(i3)) return e6;
2639
+ const n2 = (e7) => {
2640
+ var i4;
2641
+ return "string" == typeof e7 && null !== (i4 = t4.get(e7)) && void 0 !== i4 ? i4 : e7;
2642
+ };
2643
+ return JSON.stringify(i3.map(((e7) => Object.assign(Object.assign({}, e7), { shown: Array.isArray(null == e7 ? void 0 : e7.shown) ? e7.shown.map(n2) : null == e7 ? void 0 : e7.shown, best: n2(null == e7 ? void 0 : e7.best), worst: n2(null == e7 ? void 0 : e7.worst) }))));
2644
+ } catch (t5) {
2645
+ return e6;
2646
+ }
2647
+ })(e5, r2) : e5;
2387
2648
  }
2649
+ return Object.assign(Object.assign({}, e4), { value: e4.value.map(o2) });
2650
+ }));
2651
+ };
2652
+ }, 2139: (e2, t2) => {
2653
+ "use strict";
2654
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.cancelAutoAdvance = t2.autoAdvanceOn = t2.scheduleAutoAdvance = t2.AUTO_ADVANCE_DELAY_MS = void 0, t2.AUTO_ADVANCE_DELAY_MS = 300;
2655
+ const i = /* @__PURE__ */ new Map();
2656
+ function n(e3, n2) {
2657
+ const r = i.get(n2);
2658
+ r && clearTimeout(r.timer);
2659
+ const o = setTimeout((() => {
2660
+ i.delete(n2), e3.isConnected && n2();
2661
+ }), t2.AUTO_ADVANCE_DELAY_MS);
2662
+ i.set(n2, { timer: o, source: e3 });
2663
+ }
2664
+ t2.scheduleAutoAdvance = n, t2.autoAdvanceOn = function(e3, t3, i2 = "change") {
2665
+ t3 && e3.addEventListener(i2, (() => n(e3, t3)));
2666
+ }, t2.cancelAutoAdvance = function(e3) {
2667
+ e3 && i.forEach((({ timer: t3, source: n2 }, r) => {
2668
+ e3.contains(n2) && (clearTimeout(t3), i.delete(r));
2388
2669
  }));
2389
2670
  };
2390
- }, 256: (e2, t2) => {
2671
+ }, 9033: (e2, t2) => {
2672
+ "use strict";
2673
+ function i(e3) {
2674
+ if (!e3) return null;
2675
+ const i2 = e3.querySelector(".magicfeedback-div");
2676
+ if (!i2) return null;
2677
+ const n = i2.querySelector('input:not([type="hidden"]), textarea, select, button');
2678
+ if (!n) return null;
2679
+ const r = n;
2680
+ return r.disabled || r.readOnly ? null : "TEXTAREA" === n.tagName || "INPUT" === n.tagName && t2.AUTOFOCUS_INPUT_TYPES.includes(n.type) ? r : null;
2681
+ }
2682
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.focusFirstTextQuestion = t2.findAutofocusTarget = t2.AUTOFOCUS_INPUT_TYPES = void 0, t2.AUTOFOCUS_INPUT_TYPES = ["text", "email", "number", "tel", "url", "search"], t2.findAutofocusTarget = i, t2.focusFirstTextQuestion = function(e3) {
2683
+ var t3, n;
2684
+ if (!e3) return false;
2685
+ const r = i(e3);
2686
+ if (!r) return false;
2687
+ const o = null === (t3 = e3.ownerDocument) || void 0 === t3 ? void 0 : t3.activeElement;
2688
+ if (o && !e3.contains(o) && (function(e4) {
2689
+ const t4 = e4.tagName;
2690
+ return "INPUT" === t4 || "TEXTAREA" === t4 || "SELECT" === t4 || true === e4.isContentEditable;
2691
+ })(o)) return false;
2692
+ try {
2693
+ r.focus({ preventScroll: true });
2694
+ } catch (e4) {
2695
+ r.focus();
2696
+ }
2697
+ return (null === (n = e3.ownerDocument) || void 0 === n ? void 0 : n.activeElement) === r;
2698
+ };
2699
+ }, 93: (e2, t2) => {
2700
+ "use strict";
2701
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.armGhostTapGuard = t2.GHOST_TAP_GUARD_MS = void 0, t2.GHOST_TAP_GUARD_MS = 400;
2702
+ const i = /* @__PURE__ */ new WeakMap();
2703
+ t2.armGhostTapGuard = function(e3) {
2704
+ e3 && (i.has(e3) || e3.addEventListener("click", ((r) => {
2705
+ var o;
2706
+ 0 !== r.detail && (n() - (null !== (o = i.get(e3)) && void 0 !== o ? o : -1 / 0) >= t2.GHOST_TAP_GUARD_MS || (r.preventDefault(), r.stopPropagation()));
2707
+ }), true), i.set(e3, n()));
2708
+ };
2709
+ const n = () => "undefined" != typeof performance ? performance.now() : Date.now();
2710
+ }, 1874: (e2, t2) => {
2391
2711
  "use strict";
2392
2712
  Object.defineProperty(t2, "__esModule", { value: true }), t2.Log = void 0, t2.Log = class {
2393
2713
  constructor(e3) {
@@ -2400,15 +2720,15 @@ var require_magicfeedback_sdk_browser = __commonJS({
2400
2720
  console.error("[MagicFeedback]:", ...e3);
2401
2721
  }
2402
2722
  };
2403
- }, 330: (e2) => {
2723
+ }, 8330: (e2) => {
2404
2724
  "use strict";
2405
- e2.exports = JSON.parse('{"name":"@magicfeedback/native","version":"2.2.22","main":"./dist/magicfeedback-sdk.node.js","browser":"./dist/magicfeedback-sdk.browser.js","types":"./dist/types/src/index.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/MagicFeedback/magicfeedback-sdk.git"},"author":"farias@magicfeedback.io","license":"MIT","private":false,"scripts":{"dev":"vite","build":"webpack","build:watch":"webpack --watch --mode development","release":"npm publish --access public","release:beta":"npm publish --access public --tag beta","release:alpha":"npm publish --access public --tag alpha","test":"jest","test:watch":"jest --watchAll","coverage":"vitest run --coverage","publish:sdk":"bash publish.sh","publish:sdk:dry-run":"NPM_DRY_RUN=1 bash publish.sh"},"files":["dist"],"devDependencies":{"@babel/preset-typescript":"^7.22.5","@types/node":"^17.0.21","@types/webpack":"^5.28.0","@types/webpack-node-externals":"^2.5.3","c8":"^7.11.0","copy-webpack-plugin":"^11.0.0","jest":"^29.5.0","jest-environment-jsdom":"^29.5.0","jest-fetch-mock":"^3.0.3","nock":"^13.2.4","ts-jest":"^29.1.0","ts-loader":"^9.2.7","ts-node":"^10.7.0","typescript":"^4.6.2","vite":"^2.8.0","vite-plugin-dts":"^0.9.9","vitest":"^0.5.9","webpack":"^5.70.0","webpack-cli":"^4.9.2","webpack-node-externals":"^3.0.0"},"dependencies":{"cross-fetch":"^3.1.5","is-bundling-for-browser-or-node":"^1.1.1"},"description":"MagicFeedbackAI JavaScript Library for [MagicFeedback.io](https://magicfeedback.io/)","bugs":{"url":"https://github.com/MagicFeedback/magicfeedback-sdk/issues"},"homepage":"https://github.com/MagicFeedback/magicfeedback-sdk#readme","directories":{"example":"examples","test":"test"},"style":"./dist/styles/magicfeedback-default.css"}');
2406
- } }, t = {}, (function i(r) {
2407
- var n = t[r];
2408
- if (void 0 !== n) return n.exports;
2409
- var o = t[r] = { exports: {} };
2410
- return e[r].call(o.exports, o, o.exports, i), o.exports;
2411
- })(156).default;
2725
+ e2.exports = JSON.parse('{"name":"@magicfeedback/native","version":"2.2.31","main":"./dist/magicfeedback-sdk.node.js","browser":"./dist/magicfeedback-sdk.browser.js","types":"./dist/types/src/index.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/MagicFeedback/magicfeedback-sdk.git"},"author":"farias@magicfeedback.io","license":"MIT","private":false,"scripts":{"dev":"vite","build":"webpack","build:watch":"webpack --watch --mode development","release":"npm publish --access public","release:beta":"npm publish --access public --tag beta","release:alpha":"npm publish --access public --tag alpha","test":"jest","test:watch":"jest --watchAll","coverage":"jest --coverage","publish:sdk":"bash publish.sh","publish:sdk:dry-run":"NPM_DRY_RUN=1 bash publish.sh"},"files":["dist"],"devDependencies":{"@babel/preset-typescript":"^7.22.5","@types/node":"^17.0.21","@types/webpack":"^5.28.0","@types/webpack-node-externals":"^2.5.3","c8":"^7.11.0","copy-webpack-plugin":"^11.0.0","jest":"^29.5.0","jest-environment-jsdom":"^29.5.0","jest-fetch-mock":"^3.0.3","nock":"^13.2.4","ts-jest":"^29.1.0","ts-loader":"^9.2.7","ts-node":"^10.7.0","typescript":"^4.6.2","vite":"^2.8.0","vite-plugin-dts":"^0.9.9","webpack":"^5.70.0","webpack-cli":"^4.9.2","webpack-node-externals":"^3.0.0"},"dependencies":{"cross-fetch":"^3.1.5","is-bundling-for-browser-or-node":"^1.1.1"},"description":"MagicFeedbackAI JavaScript Library for [MagicFeedback.io](https://magicfeedback.io/)","bugs":{"url":"https://github.com/MagicFeedback/magicfeedback-sdk/issues"},"homepage":"https://github.com/MagicFeedback/magicfeedback-sdk#readme","directories":{"example":"examples","test":"test"},"style":"./dist/styles/magicfeedback-default.css"}');
2726
+ } }, t = {}, (function i(n) {
2727
+ var r = t[n];
2728
+ if (void 0 !== r) return r.exports;
2729
+ var o = t[n] = { exports: {} };
2730
+ return e[n].call(o.exports, o, o.exports, i), o.exports;
2731
+ })(2474).default;
2412
2732
  var e, t;
2413
2733
  }));
2414
2734
  }
@@ -3041,10 +3361,14 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
3041
3361
  // La pantalla final la pinta el popup: `renderSuccess` de @magicfeedback/native usa
3042
3362
  // textContent, así que el mensaje de la plataforma (HTML con imagen) no se vería, y
3043
3363
  // su fallback es un literal genérico que ignora `style.successMessage`.
3044
- addSuccessScreen: false
3364
+ addSuccessScreen: false,
3365
+ // Surveys multi-idioma: native pide a la API este idioma (el del init o el del
3366
+ // dispositivo) y, si el survey no lo tiene, la API sirve el idioma por defecto.
3367
+ lang: options?.language
3045
3368
  };
3046
- generateOptions.onLoadedEvent = ({ formData }) => {
3047
- const surveyLang = Array.isArray(formData?.lang) ? formData.lang.find((l) => typeof l === "string" && l.trim().length > 0) : void 0;
3369
+ generateOptions.onLoadedEvent = ({ formData, lang }) => {
3370
+ const shownLang = typeof lang === "string" && lang.trim().length > 0 ? lang : void 0;
3371
+ const surveyLang = shownLang ?? (Array.isArray(formData?.lang) ? formData.lang.find((l) => typeof l === "string" && l.trim().length > 0) : void 0);
3048
3372
  if (surveyLang) applyLabels(surveyLang);
3049
3373
  try {
3050
3374
  } catch {
@@ -3153,4 +3477,4 @@ export {
3153
3477
  SURVEY_ALIGNMENT_STYLE_ID,
3154
3478
  renderPopup
3155
3479
  };
3156
- //# sourceMappingURL=renderPopup-3CZ6WTXF.mjs.map
3480
+ //# sourceMappingURL=renderPopup-424HR5LF.mjs.map