@magicfeedback/popup-sdk 1.6.0 → 1.7.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.
- package/README.md +34 -1
- package/dist/assets/assets/style.css +63 -14
- package/dist/{chunk-AN7JIVWB.mjs → chunk-W6MPSWMS.mjs} +352 -15
- package/dist/chunk-W6MPSWMS.mjs.map +1 -0
- package/dist/{chunk-Z3LLJMSH.mjs → chunk-WNIUIOKF.mjs} +332 -15
- package/dist/chunk-WNIUIOKF.mjs.map +1 -0
- package/dist/index.d.mts +92 -1
- package/dist/index.d.ts +92 -1
- package/dist/index.js +1543 -1364
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -28
- package/dist/index.mjs.map +1 -1
- package/dist/react-native.d.mts +6 -0
- package/dist/react-native.d.ts +6 -0
- package/dist/react-native.js +448 -55
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +87 -28
- package/dist/react-native.mjs.map +1 -1
- package/dist/{renderPopup-SELXQ3UE.mjs → renderPopup-EWGKG53W.mjs} +42 -18
- package/dist/renderPopup-EWGKG53W.mjs.map +1 -0
- package/dist/renderPopup-IHGYFMXO.mjs +3114 -0
- package/dist/renderPopup-IHGYFMXO.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/chunk-AN7JIVWB.mjs.map +0 -1
- package/dist/chunk-Z3LLJMSH.mjs.map +0 -1
- package/dist/renderPopup-M6MKTDEH.mjs +0 -3330
- package/dist/renderPopup-M6MKTDEH.mjs.map +0 -1
- package/dist/renderPopup-SELXQ3UE.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -181,6 +181,291 @@ var init_font = __esm({
|
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
183
|
|
|
184
|
+
// src/i18n/labels.ts
|
|
185
|
+
function resolveLocale(lang) {
|
|
186
|
+
if (typeof lang !== "string") return "en";
|
|
187
|
+
const normalized = lang.trim().toLowerCase().replace(/_/g, "-");
|
|
188
|
+
if (!normalized) return "en";
|
|
189
|
+
if (normalized === "zh" || normalized.startsWith("zh-")) return "zh-CN";
|
|
190
|
+
const primary = normalized.split("-")[0];
|
|
191
|
+
switch (primary) {
|
|
192
|
+
case "en":
|
|
193
|
+
return "en";
|
|
194
|
+
case "es":
|
|
195
|
+
return "es";
|
|
196
|
+
case "da":
|
|
197
|
+
return "da";
|
|
198
|
+
case "no":
|
|
199
|
+
case "nb":
|
|
200
|
+
case "nn":
|
|
201
|
+
return "no";
|
|
202
|
+
case "sv":
|
|
203
|
+
return "sv";
|
|
204
|
+
case "fi":
|
|
205
|
+
return "fi";
|
|
206
|
+
case "de":
|
|
207
|
+
return "de";
|
|
208
|
+
case "fr":
|
|
209
|
+
return "fr";
|
|
210
|
+
case "pt":
|
|
211
|
+
return "pt";
|
|
212
|
+
case "ar":
|
|
213
|
+
return "ar";
|
|
214
|
+
case "bn":
|
|
215
|
+
return "bn";
|
|
216
|
+
default:
|
|
217
|
+
return "en";
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function isRtlLanguage(lang) {
|
|
221
|
+
return RTL_LOCALES.includes(resolveLocale(lang));
|
|
222
|
+
}
|
|
223
|
+
function directionFor(lang) {
|
|
224
|
+
return isRtlLanguage(lang) ? "rtl" : "ltr";
|
|
225
|
+
}
|
|
226
|
+
function getLabels(lang) {
|
|
227
|
+
return LABELS[resolveLocale(lang)];
|
|
228
|
+
}
|
|
229
|
+
function resolveActionLabels(actions, lang) {
|
|
230
|
+
const labels = getLabels(lang);
|
|
231
|
+
const pick = (value, fallback) => {
|
|
232
|
+
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
233
|
+
return trimmed ? value : fallback;
|
|
234
|
+
};
|
|
235
|
+
return {
|
|
236
|
+
accept: pick(actions?.accept?.label, labels.accept),
|
|
237
|
+
decline: pick(actions?.decline?.label, labels.decline),
|
|
238
|
+
start: pick(actions?.start?.label, labels.start),
|
|
239
|
+
complete: pick(actions?.complete?.label, labels.complete),
|
|
240
|
+
back: pick(actions?.back?.label, labels.back)
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
var EN, ES, DA, NO, SV, FI, DE, FR, PT, AR, BN, ZH_CN, LABELS, SUPPORTED_LANGUAGES, RTL_LOCALES, RESOLVE_LOCALE_JS;
|
|
244
|
+
var init_labels = __esm({
|
|
245
|
+
"src/i18n/labels.ts"() {
|
|
246
|
+
"use strict";
|
|
247
|
+
EN = {
|
|
248
|
+
accept: "Send",
|
|
249
|
+
decline: "Cancel",
|
|
250
|
+
start: "Start survey",
|
|
251
|
+
complete: "Complete survey",
|
|
252
|
+
back: "Back",
|
|
253
|
+
question: "Question",
|
|
254
|
+
of: "of",
|
|
255
|
+
followUp: "Follow-up",
|
|
256
|
+
closeAria: "Close popup",
|
|
257
|
+
loadingAria: "Loading survey",
|
|
258
|
+
errorRequired: "Please answer the required question to continue.",
|
|
259
|
+
errorSubmit: "An error occurred while submitting. Please try again or close the popup."
|
|
260
|
+
};
|
|
261
|
+
ES = {
|
|
262
|
+
accept: "Enviar",
|
|
263
|
+
decline: "Cancelar",
|
|
264
|
+
start: "Empezar encuesta",
|
|
265
|
+
complete: "Completar encuesta",
|
|
266
|
+
back: "Atr\xE1s",
|
|
267
|
+
question: "Pregunta",
|
|
268
|
+
of: "de",
|
|
269
|
+
followUp: "Seguimiento",
|
|
270
|
+
closeAria: "Cerrar ventana emergente",
|
|
271
|
+
loadingAria: "Cargando encuesta",
|
|
272
|
+
errorRequired: "Responde la pregunta obligatoria para continuar.",
|
|
273
|
+
errorSubmit: "Se produjo un error al enviar. Int\xE9ntalo de nuevo o cierra la ventana."
|
|
274
|
+
};
|
|
275
|
+
DA = {
|
|
276
|
+
accept: "Send",
|
|
277
|
+
decline: "Annuller",
|
|
278
|
+
start: "Start unders\xF8gelse",
|
|
279
|
+
complete: "Afslut unders\xF8gelse",
|
|
280
|
+
back: "Tilbage",
|
|
281
|
+
question: "Sp\xF8rgsm\xE5l",
|
|
282
|
+
of: "af",
|
|
283
|
+
followUp: "Opf\xF8lgning",
|
|
284
|
+
closeAria: "Luk pop op",
|
|
285
|
+
loadingAria: "Indl\xE6ser unders\xF8gelse",
|
|
286
|
+
errorRequired: "Besvar venligst det obligatoriske sp\xF8rgsm\xE5l for at forts\xE6tte.",
|
|
287
|
+
errorSubmit: "Der opstod en fejl under afsendelsen. Pr\xF8v igen, eller luk pop op-vinduet."
|
|
288
|
+
};
|
|
289
|
+
NO = {
|
|
290
|
+
accept: "Send",
|
|
291
|
+
decline: "Avbryt",
|
|
292
|
+
start: "Start unders\xF8kelse",
|
|
293
|
+
complete: "Fullf\xF8r unders\xF8kelse",
|
|
294
|
+
back: "Tilbake",
|
|
295
|
+
question: "Sp\xF8rsm\xE5l",
|
|
296
|
+
of: "av",
|
|
297
|
+
followUp: "Oppf\xF8lging",
|
|
298
|
+
closeAria: "Lukk popup",
|
|
299
|
+
loadingAria: "Laster unders\xF8kelse",
|
|
300
|
+
errorRequired: "Svar p\xE5 det obligatoriske sp\xF8rsm\xE5let for \xE5 fortsette.",
|
|
301
|
+
errorSubmit: "Det oppstod en feil under innsendingen. Pr\xF8v igjen, eller lukk popupen."
|
|
302
|
+
};
|
|
303
|
+
SV = {
|
|
304
|
+
accept: "Skicka",
|
|
305
|
+
decline: "Avbryt",
|
|
306
|
+
start: "Starta unders\xF6kning",
|
|
307
|
+
complete: "Slutf\xF6r unders\xF6kning",
|
|
308
|
+
back: "Tillbaka",
|
|
309
|
+
question: "Fr\xE5ga",
|
|
310
|
+
of: "av",
|
|
311
|
+
followUp: "Uppf\xF6ljning",
|
|
312
|
+
closeAria: "St\xE4ng popup",
|
|
313
|
+
loadingAria: "Laddar unders\xF6kning",
|
|
314
|
+
errorRequired: "Svara p\xE5 den obligatoriska fr\xE5gan f\xF6r att forts\xE4tta.",
|
|
315
|
+
errorSubmit: "Ett fel uppstod vid inskickningen. F\xF6rs\xF6k igen eller st\xE4ng popupen."
|
|
316
|
+
};
|
|
317
|
+
FI = {
|
|
318
|
+
accept: "L\xE4het\xE4",
|
|
319
|
+
decline: "Peruuta",
|
|
320
|
+
start: "Aloita kysely",
|
|
321
|
+
complete: "Viimeistele kysely",
|
|
322
|
+
back: "Takaisin",
|
|
323
|
+
question: "Kysymys",
|
|
324
|
+
of: "/",
|
|
325
|
+
followUp: "Jatkokysymys",
|
|
326
|
+
closeAria: "Sulje ponnahdusikkuna",
|
|
327
|
+
loadingAria: "Ladataan kysely\xE4",
|
|
328
|
+
errorRequired: "Vastaa pakolliseen kysymykseen jatkaaksesi.",
|
|
329
|
+
errorSubmit: "L\xE4hetyksess\xE4 tapahtui virhe. Yrit\xE4 uudelleen tai sulje ponnahdusikkuna."
|
|
330
|
+
};
|
|
331
|
+
DE = {
|
|
332
|
+
accept: "Senden",
|
|
333
|
+
decline: "Abbrechen",
|
|
334
|
+
start: "Umfrage starten",
|
|
335
|
+
complete: "Umfrage abschlie\xDFen",
|
|
336
|
+
back: "Zur\xFCck",
|
|
337
|
+
question: "Frage",
|
|
338
|
+
of: "von",
|
|
339
|
+
followUp: "Folgefrage",
|
|
340
|
+
closeAria: "Popup schlie\xDFen",
|
|
341
|
+
loadingAria: "Umfrage wird geladen",
|
|
342
|
+
errorRequired: "Bitte beantworte die Pflichtfrage, um fortzufahren.",
|
|
343
|
+
errorSubmit: "Beim Senden ist ein Fehler aufgetreten. Versuche es erneut oder schlie\xDFe das Popup."
|
|
344
|
+
};
|
|
345
|
+
FR = {
|
|
346
|
+
accept: "Envoyer",
|
|
347
|
+
decline: "Annuler",
|
|
348
|
+
start: "Commencer l'enqu\xEAte",
|
|
349
|
+
complete: "Terminer l'enqu\xEAte",
|
|
350
|
+
back: "Retour",
|
|
351
|
+
question: "Question",
|
|
352
|
+
of: "sur",
|
|
353
|
+
followUp: "Question compl\xE9mentaire",
|
|
354
|
+
closeAria: "Fermer la fen\xEAtre",
|
|
355
|
+
loadingAria: "Chargement de l'enqu\xEAte",
|
|
356
|
+
errorRequired: "Veuillez r\xE9pondre \xE0 la question obligatoire pour continuer.",
|
|
357
|
+
errorSubmit: "Une erreur s'est produite lors de l'envoi. R\xE9essayez ou fermez la fen\xEAtre."
|
|
358
|
+
};
|
|
359
|
+
PT = {
|
|
360
|
+
accept: "Enviar",
|
|
361
|
+
decline: "Cancelar",
|
|
362
|
+
start: "Iniciar question\xE1rio",
|
|
363
|
+
complete: "Concluir question\xE1rio",
|
|
364
|
+
back: "Voltar",
|
|
365
|
+
question: "Pergunta",
|
|
366
|
+
of: "de",
|
|
367
|
+
followUp: "Seguimento",
|
|
368
|
+
closeAria: "Fechar janela",
|
|
369
|
+
loadingAria: "A carregar question\xE1rio",
|
|
370
|
+
errorRequired: "Responda \xE0 pergunta obrigat\xF3ria para continuar.",
|
|
371
|
+
errorSubmit: "Ocorreu um erro ao enviar. Tente novamente ou feche a janela."
|
|
372
|
+
};
|
|
373
|
+
AR = {
|
|
374
|
+
accept: "\u0625\u0631\u0633\u0627\u0644",
|
|
375
|
+
decline: "\u0625\u0644\u063A\u0627\u0621",
|
|
376
|
+
start: "\u0627\u0628\u062F\u0623 \u0627\u0644\u0627\u0633\u062A\u0628\u064A\u0627\u0646",
|
|
377
|
+
complete: "\u0625\u0646\u0647\u0627\u0621 \u0627\u0644\u0627\u0633\u062A\u0628\u064A\u0627\u0646",
|
|
378
|
+
back: "\u0631\u062C\u0648\u0639",
|
|
379
|
+
question: "\u0633\u0624\u0627\u0644",
|
|
380
|
+
of: "\u0645\u0646",
|
|
381
|
+
followUp: "\u0633\u0624\u0627\u0644 \u0645\u062A\u0627\u0628\u0639\u0629",
|
|
382
|
+
closeAria: "\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0645\u0646\u0628\u062B\u0642\u0629",
|
|
383
|
+
loadingAria: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0627\u0633\u062A\u0628\u064A\u0627\u0646",
|
|
384
|
+
errorRequired: "\u064A\u0631\u062C\u0649 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0639\u0644\u0649 \u0627\u0644\u0633\u0624\u0627\u0644 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0644\u0644\u0645\u062A\u0627\u0628\u0639\u0629.",
|
|
385
|
+
errorSubmit: "\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u0625\u0631\u0633\u0627\u0644. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649 \u0623\u0648 \u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0646\u0627\u0641\u0630\u0629."
|
|
386
|
+
};
|
|
387
|
+
BN = {
|
|
388
|
+
accept: "\u09AA\u09BE\u09A0\u09BE\u09A8",
|
|
389
|
+
decline: "\u09AC\u09BE\u09A4\u09BF\u09B2",
|
|
390
|
+
start: "\u099C\u09B0\u09BF\u09AA \u09B6\u09C1\u09B0\u09C1 \u0995\u09B0\u09C1\u09A8",
|
|
391
|
+
complete: "\u099C\u09B0\u09BF\u09AA \u09B8\u09AE\u09CD\u09AA\u09C2\u09B0\u09CD\u09A3 \u0995\u09B0\u09C1\u09A8",
|
|
392
|
+
back: "\u09AA\u09BF\u099B\u09A8\u09C7",
|
|
393
|
+
question: "\u09AA\u09CD\u09B0\u09B6\u09CD\u09A8",
|
|
394
|
+
of: "/",
|
|
395
|
+
followUp: "\u09AB\u09B2\u09CB-\u0986\u09AA",
|
|
396
|
+
closeAria: "\u09AA\u09AA\u0986\u09AA \u09AC\u09A8\u09CD\u09A7 \u0995\u09B0\u09C1\u09A8",
|
|
397
|
+
loadingAria: "\u099C\u09B0\u09BF\u09AA \u09B2\u09CB\u09A1 \u09B9\u099A\u09CD\u099B\u09C7",
|
|
398
|
+
errorRequired: "\u099A\u09BE\u09B2\u09BF\u09AF\u09BC\u09C7 \u09AF\u09C7\u09A4\u09C7 \u0986\u09AC\u09B6\u09CD\u09AF\u0995 \u09AA\u09CD\u09B0\u09B6\u09CD\u09A8\u09C7\u09B0 \u0989\u09A4\u09CD\u09A4\u09B0 \u09A6\u09BF\u09A8\u0964",
|
|
399
|
+
errorSubmit: "\u099C\u09AE\u09BE \u09A6\u09C7\u0993\u09AF\u09BC\u09BE\u09B0 \u09B8\u09AE\u09AF\u09BC \u098F\u0995\u099F\u09BF \u09A4\u09CD\u09B0\u09C1\u099F\u09BF \u0998\u099F\u09C7\u099B\u09C7\u0964 \u0986\u09AC\u09BE\u09B0 \u099A\u09C7\u09B7\u09CD\u099F\u09BE \u0995\u09B0\u09C1\u09A8 \u09AC\u09BE \u09AA\u09AA\u0986\u09AA \u09AC\u09A8\u09CD\u09A7 \u0995\u09B0\u09C1\u09A8\u0964"
|
|
400
|
+
};
|
|
401
|
+
ZH_CN = {
|
|
402
|
+
accept: "\u53D1\u9001",
|
|
403
|
+
decline: "\u53D6\u6D88",
|
|
404
|
+
start: "\u5F00\u59CB\u95EE\u5377",
|
|
405
|
+
complete: "\u5B8C\u6210\u95EE\u5377",
|
|
406
|
+
back: "\u8FD4\u56DE",
|
|
407
|
+
question: "\u95EE\u9898",
|
|
408
|
+
of: "/",
|
|
409
|
+
followUp: "\u8FFD\u95EE",
|
|
410
|
+
closeAria: "\u5173\u95ED\u5F39\u7A97",
|
|
411
|
+
loadingAria: "\u6B63\u5728\u52A0\u8F7D\u95EE\u5377",
|
|
412
|
+
errorRequired: "\u8BF7\u56DE\u7B54\u5FC5\u7B54\u9898\u540E\u7EE7\u7EED\u3002",
|
|
413
|
+
errorSubmit: "\u63D0\u4EA4\u65F6\u51FA\u9519\u3002\u8BF7\u91CD\u8BD5\u6216\u5173\u95ED\u5F39\u7A97\u3002"
|
|
414
|
+
};
|
|
415
|
+
LABELS = {
|
|
416
|
+
en: EN,
|
|
417
|
+
es: ES,
|
|
418
|
+
da: DA,
|
|
419
|
+
no: NO,
|
|
420
|
+
sv: SV,
|
|
421
|
+
fi: FI,
|
|
422
|
+
de: DE,
|
|
423
|
+
fr: FR,
|
|
424
|
+
pt: PT,
|
|
425
|
+
ar: AR,
|
|
426
|
+
bn: BN,
|
|
427
|
+
"zh-CN": ZH_CN
|
|
428
|
+
};
|
|
429
|
+
SUPPORTED_LANGUAGES = [
|
|
430
|
+
// Los 11 idiomas que la plataforma ofrece para un survey, más zh-CN (que el SDK nativo ya
|
|
431
|
+
// traía). Si la plataforma añade uno nuevo, hay que añadirlo aquí o el chrome saldrá en
|
|
432
|
+
// inglés bajo un survey traducido.
|
|
433
|
+
"en",
|
|
434
|
+
"es",
|
|
435
|
+
"da",
|
|
436
|
+
"no",
|
|
437
|
+
"sv",
|
|
438
|
+
"fi",
|
|
439
|
+
"de",
|
|
440
|
+
"fr",
|
|
441
|
+
"pt",
|
|
442
|
+
"ar",
|
|
443
|
+
"bn",
|
|
444
|
+
"zh-CN"
|
|
445
|
+
];
|
|
446
|
+
RTL_LOCALES = ["ar"];
|
|
447
|
+
RESOLVE_LOCALE_JS = `function ddResolveLocale(lang){
|
|
448
|
+
if(typeof lang!=='string') return 'en';
|
|
449
|
+
var n=lang.trim().toLowerCase().replace(/_/g,'-');
|
|
450
|
+
if(!n) return 'en';
|
|
451
|
+
if(n==='zh'||n.indexOf('zh-')===0) return 'zh-CN';
|
|
452
|
+
var p=n.split('-')[0];
|
|
453
|
+
if(p==='en') return 'en';
|
|
454
|
+
if(p==='es') return 'es';
|
|
455
|
+
if(p==='da') return 'da';
|
|
456
|
+
if(p==='no'||p==='nb'||p==='nn') return 'no';
|
|
457
|
+
if(p==='sv') return 'sv';
|
|
458
|
+
if(p==='fi') return 'fi';
|
|
459
|
+
if(p==='de') return 'de';
|
|
460
|
+
if(p==='fr') return 'fr';
|
|
461
|
+
if(p==='pt') return 'pt';
|
|
462
|
+
if(p==='ar') return 'ar';
|
|
463
|
+
if(p==='bn') return 'bn';
|
|
464
|
+
return 'en';
|
|
465
|
+
}`;
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
|
|
184
469
|
// src/assets/style.css
|
|
185
470
|
var style_default;
|
|
186
471
|
var init_style = __esm({
|
|
@@ -188,7 +473,7 @@ var init_style = __esm({
|
|
|
188
473
|
style_default = `/**
|
|
189
474
|
* NO EDITAR A MANO \u2014 generado por scripts/vendor-survey-css.mjs
|
|
190
475
|
*
|
|
191
|
-
* Copia de @magicfeedback/native@2.2.
|
|
476
|
+
* Copia de @magicfeedback/native@2.2.22 \u2192 dist/styles/magicfeedback-default.css
|
|
192
477
|
* (la hoja can\xF3nica del paquete, la que apunta su campo "style"), con estos cambios locales:
|
|
193
478
|
*
|
|
194
479
|
* 1. Sin el @import de Google Fonts (Nunito): no queremos una petici\xF3n externa desde la
|
|
@@ -408,7 +693,7 @@ var init_style = __esm({
|
|
|
408
693
|
font-weight: var(--mf-font-weight-bold);
|
|
409
694
|
line-height: 1.3;
|
|
410
695
|
margin: var(--mf-space-lg) 0 var(--mf-space-sm);
|
|
411
|
-
text-align:
|
|
696
|
+
text-align: start;
|
|
412
697
|
}
|
|
413
698
|
|
|
414
699
|
.magicfeedback-info-message h1, .magicfeedback-start-message h1 { font-size: var(--mf-font-size-xl); }
|
|
@@ -447,7 +732,7 @@ var init_style = __esm({
|
|
|
447
732
|
.magicfeedback-start-message ul,
|
|
448
733
|
.magicfeedback-start-message ol {
|
|
449
734
|
margin: 0 0 var(--mf-space-md);
|
|
450
|
-
padding-
|
|
735
|
+
padding-inline-start: var(--mf-space-xl);
|
|
451
736
|
color: var(--mf-text-secondary);
|
|
452
737
|
line-height: var(--mf-line-height);
|
|
453
738
|
}
|
|
@@ -461,7 +746,7 @@ var init_style = __esm({
|
|
|
461
746
|
.magicfeedback-start-message blockquote {
|
|
462
747
|
margin: 0 0 var(--mf-space-md);
|
|
463
748
|
padding: var(--mf-space-sm) var(--mf-space-md);
|
|
464
|
-
border-
|
|
749
|
+
border-inline-start: 3px solid var(--mf-primary-border);
|
|
465
750
|
color: var(--mf-text-secondary);
|
|
466
751
|
font-style: italic;
|
|
467
752
|
}
|
|
@@ -550,7 +835,7 @@ var init_style = __esm({
|
|
|
550
835
|
font-weight: var(--mf-font-weight-bold);
|
|
551
836
|
color: var(--mf-text-primary);
|
|
552
837
|
line-height: var(--mf-line-height);
|
|
553
|
-
text-align:
|
|
838
|
+
text-align: start;
|
|
554
839
|
letter-spacing: -0.01em;
|
|
555
840
|
}
|
|
556
841
|
|
|
@@ -626,7 +911,7 @@ var init_style = __esm({
|
|
|
626
911
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
|
|
627
912
|
background-repeat: no-repeat;
|
|
628
913
|
background-position: right var(--mf-space-md) center;
|
|
629
|
-
padding-
|
|
914
|
+
padding-inline-end: var(--mf-space-xl);
|
|
630
915
|
}
|
|
631
916
|
|
|
632
917
|
/* Error State */
|
|
@@ -690,7 +975,7 @@ div.magicfeedback-radio {
|
|
|
690
975
|
.magicfeedback-checkbox label,
|
|
691
976
|
.magicfeedback-radio-container label {
|
|
692
977
|
font-size: var(--mf-font-size-base);
|
|
693
|
-
text-align:
|
|
978
|
+
text-align: start;
|
|
694
979
|
color: var(--mf-text-primary);
|
|
695
980
|
cursor: pointer;
|
|
696
981
|
margin: 0;
|
|
@@ -788,7 +1073,7 @@ div.magicfeedback-radio {
|
|
|
788
1073
|
}
|
|
789
1074
|
|
|
790
1075
|
.magicfeedback-rating-placeholder-value:last-child {
|
|
791
|
-
text-align:
|
|
1076
|
+
text-align: end;
|
|
792
1077
|
}
|
|
793
1078
|
|
|
794
1079
|
/* Rating with Images */
|
|
@@ -871,7 +1156,7 @@ div.magicfeedback-radio {
|
|
|
871
1156
|
}
|
|
872
1157
|
|
|
873
1158
|
.magicfeedback-rating-number-scale-label:last-child {
|
|
874
|
-
text-align:
|
|
1159
|
+
text-align: end;
|
|
875
1160
|
}
|
|
876
1161
|
|
|
877
1162
|
/* Column, no per-option text: each row is its own separated chip, so
|
|
@@ -1189,7 +1474,7 @@ div.magicfeedback-radio {
|
|
|
1189
1474
|
}
|
|
1190
1475
|
|
|
1191
1476
|
.magicfeedback-multi-question-matrix-label {
|
|
1192
|
-
text-align:
|
|
1477
|
+
text-align: start;
|
|
1193
1478
|
font-size: var(--mf-font-size-base);
|
|
1194
1479
|
color: var(--mf-text-primary);
|
|
1195
1480
|
}
|
|
@@ -1224,7 +1509,7 @@ div.magicfeedback-radio {
|
|
|
1224
1509
|
.magicfeedback-priority-list-item-label {
|
|
1225
1510
|
flex: 1;
|
|
1226
1511
|
font-size: var(--mf-font-size-base);
|
|
1227
|
-
text-align:
|
|
1512
|
+
text-align: start;
|
|
1228
1513
|
color: var(--mf-text-primary);
|
|
1229
1514
|
margin: 0;
|
|
1230
1515
|
}
|
|
@@ -1316,7 +1601,7 @@ div.magicfeedback-radio {
|
|
|
1316
1601
|
.magicfeedback-consent-container label {
|
|
1317
1602
|
flex: 1;
|
|
1318
1603
|
font-size: var(--mf-font-size-sm);
|
|
1319
|
-
text-align:
|
|
1604
|
+
text-align: start;
|
|
1320
1605
|
color: var(--mf-text-secondary);
|
|
1321
1606
|
line-height: var(--mf-line-height);
|
|
1322
1607
|
cursor: pointer;
|
|
@@ -1468,7 +1753,7 @@ div.magicfeedback-radio {
|
|
|
1468
1753
|
}
|
|
1469
1754
|
|
|
1470
1755
|
.magicfeedback-modal-counter {
|
|
1471
|
-
margin-
|
|
1756
|
+
margin-inline-end: auto;
|
|
1472
1757
|
display: flex;
|
|
1473
1758
|
align-items: center;
|
|
1474
1759
|
font-size: 14px;
|
|
@@ -1713,7 +1998,7 @@ div.magicfeedback-radio {
|
|
|
1713
1998
|
.magicfeedback-modal-close {
|
|
1714
1999
|
position: absolute;
|
|
1715
2000
|
top: 8px;
|
|
1716
|
-
|
|
2001
|
+
inset-inline-end: 8px;
|
|
1717
2002
|
background: transparent;
|
|
1718
2003
|
border: none;
|
|
1719
2004
|
font-size: 20px;
|
|
@@ -1934,6 +2219,55 @@ div.magicfeedback-radio {
|
|
|
1934
2219
|
display: block;
|
|
1935
2220
|
}
|
|
1936
2221
|
|
|
2222
|
+
/* ========================================
|
|
2223
|
+
RTL (Arabic)
|
|
2224
|
+
========================================
|
|
2225
|
+
The SDK stamps dir="rtl" (and .magicfeedback-rtl) on the survey container
|
|
2226
|
+
for right-to-left languages. Everything else in this stylesheet uses logical
|
|
2227
|
+
properties (text-align: start, padding-inline-*, inset-inline-*), so it
|
|
2228
|
+
mirrors on its own; only the handful of rules that cannot be expressed
|
|
2229
|
+
logically live here.
|
|
2230
|
+
|
|
2231
|
+
Rules are scoped to [dir="rtl"] inside our own subtree so a host page that is
|
|
2232
|
+
itself RTL, or one that embeds an Arabic survey in an LTR page, both render
|
|
2233
|
+
correctly. */
|
|
2234
|
+
|
|
2235
|
+
/* background-position has no logical form: move the select caret to the
|
|
2236
|
+
left edge, opposite the padding that inset-inline-end already mirrored. */
|
|
2237
|
+
[dir="rtl"] select {
|
|
2238
|
+
background-position: left var(--mf-space-md) center;
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
/* Emails, URLs, numbers, dates and phone numbers are latin/numeric content
|
|
2242
|
+
even in an Arabic survey: keep their own direction LTR so punctuation
|
|
2243
|
+
(@, ., +, /) lands where the user expects, but align them to the start of
|
|
2244
|
+
the RTL line so they still read as part of the form. */
|
|
2245
|
+
[dir="rtl"] input[type="email"],
|
|
2246
|
+
[dir="rtl"] input[type="url"],
|
|
2247
|
+
[dir="rtl"] input[type="number"],
|
|
2248
|
+
[dir="rtl"] input[type="tel"],
|
|
2249
|
+
[dir="rtl"] input[type="date"],
|
|
2250
|
+
[dir="rtl"] input[type="time"] {
|
|
2251
|
+
direction: ltr;
|
|
2252
|
+
text-align: right;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
/* Mirror of mf-slide-in: questions enter from the reading edge. */
|
|
2256
|
+
@keyframes mf-slide-in-rtl {
|
|
2257
|
+
from {
|
|
2258
|
+
opacity: 0;
|
|
2259
|
+
transform: translateX(16px);
|
|
2260
|
+
}
|
|
2261
|
+
to {
|
|
2262
|
+
opacity: 1;
|
|
2263
|
+
transform: translateX(0);
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
[dir="rtl"] .magicfeedback-div {
|
|
2268
|
+
animation-name: mf-slide-in-rtl;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
1937
2271
|
/* ========================================
|
|
1938
2272
|
LOCAL \u2014 reglas del popup, no vienen del paquete
|
|
1939
2273
|
======================================== */
|
|
@@ -1992,12 +2326,14 @@ function insertPopupLogo(parent, anchor, style, id) {
|
|
|
1992
2326
|
}
|
|
1993
2327
|
switch (style.logoPosition) {
|
|
1994
2328
|
case "left":
|
|
1995
|
-
img.style.margin = "12px
|
|
1996
|
-
img.style.
|
|
2329
|
+
img.style.margin = "12px 0 0 0";
|
|
2330
|
+
img.style.setProperty("margin-inline-start", "0");
|
|
2331
|
+
img.style.setProperty("margin-inline-end", "16px");
|
|
1997
2332
|
break;
|
|
1998
2333
|
case "right":
|
|
1999
|
-
img.style.margin = "12px 0 0
|
|
2000
|
-
img.style.
|
|
2334
|
+
img.style.margin = "12px 0 0 0";
|
|
2335
|
+
img.style.setProperty("margin-inline-start", "auto");
|
|
2336
|
+
img.style.setProperty("margin-inline-end", "0");
|
|
2001
2337
|
break;
|
|
2002
2338
|
case "center":
|
|
2003
2339
|
img.style.margin = "12px auto 0 auto";
|
|
@@ -2027,7 +2363,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2027
2363
|
"object" == typeof exports && "object" == typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.magicfeedback = t() : e.magicfeedback = t();
|
|
2028
2364
|
})(self, (() => {
|
|
2029
2365
|
return e = { 326: function(e2, t2) {
|
|
2030
|
-
var i = "undefined" != typeof self ? self : this,
|
|
2366
|
+
var i = "undefined" != typeof self ? self : this, r = (function() {
|
|
2031
2367
|
function e3() {
|
|
2032
2368
|
this.fetch = false, this.DOMException = i.DOMException;
|
|
2033
2369
|
}
|
|
@@ -2035,15 +2371,15 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2035
2371
|
})();
|
|
2036
2372
|
!(function(e3) {
|
|
2037
2373
|
!(function(t3) {
|
|
2038
|
-
var i2 = "URLSearchParams" in e3,
|
|
2374
|
+
var i2 = "URLSearchParams" in e3, r2 = "Symbol" in e3 && "iterator" in Symbol, n2 = "FileReader" in e3 && "Blob" in e3 && (function() {
|
|
2039
2375
|
try {
|
|
2040
2376
|
return new Blob(), true;
|
|
2041
2377
|
} catch (e4) {
|
|
2042
2378
|
return false;
|
|
2043
2379
|
}
|
|
2044
|
-
})(),
|
|
2045
|
-
if (
|
|
2046
|
-
return e4 &&
|
|
2380
|
+
})(), o = "FormData" in e3, a = "ArrayBuffer" in e3;
|
|
2381
|
+
if (a) var s = ["[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]"], l = ArrayBuffer.isView || function(e4) {
|
|
2382
|
+
return e4 && s.indexOf(Object.prototype.toString.call(e4)) > -1;
|
|
2047
2383
|
};
|
|
2048
2384
|
function d(e4) {
|
|
2049
2385
|
if ("string" != typeof e4 && (e4 = String(e4)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e4)) throw new TypeError("Invalid character in header field name");
|
|
@@ -2057,7 +2393,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2057
2393
|
var t5 = e4.shift();
|
|
2058
2394
|
return { done: void 0 === t5, value: t5 };
|
|
2059
2395
|
} };
|
|
2060
|
-
return
|
|
2396
|
+
return r2 && (t4[Symbol.iterator] = function() {
|
|
2061
2397
|
return t4;
|
|
2062
2398
|
}), t4;
|
|
2063
2399
|
}
|
|
@@ -2070,11 +2406,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2070
2406
|
this.append(t4, e4[t4]);
|
|
2071
2407
|
}), this);
|
|
2072
2408
|
}
|
|
2073
|
-
function
|
|
2409
|
+
function m(e4) {
|
|
2074
2410
|
if (e4.bodyUsed) return Promise.reject(new TypeError("Already read"));
|
|
2075
2411
|
e4.bodyUsed = true;
|
|
2076
2412
|
}
|
|
2077
|
-
function
|
|
2413
|
+
function h(e4) {
|
|
2078
2414
|
return new Promise((function(t4, i3) {
|
|
2079
2415
|
e4.onload = function() {
|
|
2080
2416
|
t4(e4.result);
|
|
@@ -2084,7 +2420,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2084
2420
|
}));
|
|
2085
2421
|
}
|
|
2086
2422
|
function f(e4) {
|
|
2087
|
-
var t4 = new FileReader(), i3 =
|
|
2423
|
+
var t4 = new FileReader(), i3 = h(t4);
|
|
2088
2424
|
return t4.readAsArrayBuffer(e4), i3;
|
|
2089
2425
|
}
|
|
2090
2426
|
function g(e4) {
|
|
@@ -2092,30 +2428,30 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2092
2428
|
var t4 = new Uint8Array(e4.byteLength);
|
|
2093
2429
|
return t4.set(new Uint8Array(e4)), t4.buffer;
|
|
2094
2430
|
}
|
|
2095
|
-
function
|
|
2431
|
+
function y() {
|
|
2096
2432
|
return this.bodyUsed = false, this._initBody = function(e4) {
|
|
2097
2433
|
var t4;
|
|
2098
|
-
this._bodyInit = e4, e4 ? "string" == typeof e4 ? this._bodyText = e4 :
|
|
2099
|
-
},
|
|
2100
|
-
var e4 =
|
|
2434
|
+
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"));
|
|
2435
|
+
}, n2 && (this.blob = function() {
|
|
2436
|
+
var e4 = m(this);
|
|
2101
2437
|
if (e4) return e4;
|
|
2102
2438
|
if (this._bodyBlob) return Promise.resolve(this._bodyBlob);
|
|
2103
2439
|
if (this._bodyArrayBuffer) return Promise.resolve(new Blob([this._bodyArrayBuffer]));
|
|
2104
2440
|
if (this._bodyFormData) throw new Error("could not read FormData body as blob");
|
|
2105
2441
|
return Promise.resolve(new Blob([this._bodyText]));
|
|
2106
2442
|
}, this.arrayBuffer = function() {
|
|
2107
|
-
return this._bodyArrayBuffer ?
|
|
2443
|
+
return this._bodyArrayBuffer ? m(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(f);
|
|
2108
2444
|
}), this.text = function() {
|
|
2109
|
-
var e4, t4, i3,
|
|
2110
|
-
if (
|
|
2111
|
-
if (this._bodyBlob) return e4 = this._bodyBlob, i3 =
|
|
2445
|
+
var e4, t4, i3, r3 = m(this);
|
|
2446
|
+
if (r3) return r3;
|
|
2447
|
+
if (this._bodyBlob) return e4 = this._bodyBlob, i3 = h(t4 = new FileReader()), t4.readAsText(e4), i3;
|
|
2112
2448
|
if (this._bodyArrayBuffer) return Promise.resolve((function(e5) {
|
|
2113
|
-
for (var t5 = new Uint8Array(e5), i4 = new Array(t5.length),
|
|
2449
|
+
for (var t5 = new Uint8Array(e5), i4 = new Array(t5.length), r4 = 0; r4 < t5.length; r4++) i4[r4] = String.fromCharCode(t5[r4]);
|
|
2114
2450
|
return i4.join("");
|
|
2115
2451
|
})(this._bodyArrayBuffer));
|
|
2116
2452
|
if (this._bodyFormData) throw new Error("could not read FormData body as text");
|
|
2117
2453
|
return Promise.resolve(this._bodyText);
|
|
2118
|
-
},
|
|
2454
|
+
}, o && (this.formData = function() {
|
|
2119
2455
|
return this.text().then(E);
|
|
2120
2456
|
}), this.json = function() {
|
|
2121
2457
|
return this.text().then(JSON.parse);
|
|
@@ -2150,41 +2486,41 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2150
2486
|
return this.forEach((function(t4, i3) {
|
|
2151
2487
|
e4.push([i3, t4]);
|
|
2152
2488
|
})), u(e4);
|
|
2153
|
-
},
|
|
2154
|
-
var
|
|
2489
|
+
}, r2 && (p.prototype[Symbol.iterator] = p.prototype.entries);
|
|
2490
|
+
var v = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
|
|
2155
2491
|
function b(e4, t4) {
|
|
2156
|
-
var i3,
|
|
2492
|
+
var i3, r3, n3 = (t4 = t4 || {}).body;
|
|
2157
2493
|
if (e4 instanceof b) {
|
|
2158
2494
|
if (e4.bodyUsed) throw new TypeError("Already read");
|
|
2159
|
-
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,
|
|
2495
|
+
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);
|
|
2160
2496
|
} else this.url = String(e4);
|
|
2161
|
-
if (this.credentials = t4.credentials || this.credentials || "same-origin", !t4.headers && this.headers || (this.headers = new p(t4.headers)), this.method = (
|
|
2162
|
-
this._initBody(
|
|
2497
|
+
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");
|
|
2498
|
+
this._initBody(n3);
|
|
2163
2499
|
}
|
|
2164
2500
|
function E(e4) {
|
|
2165
2501
|
var t4 = new FormData();
|
|
2166
2502
|
return e4.trim().split("&").forEach((function(e5) {
|
|
2167
2503
|
if (e5) {
|
|
2168
|
-
var i3 = e5.split("="),
|
|
2169
|
-
t4.append(decodeURIComponent(
|
|
2504
|
+
var i3 = e5.split("="), r3 = i3.shift().replace(/\+/g, " "), n3 = i3.join("=").replace(/\+/g, " ");
|
|
2505
|
+
t4.append(decodeURIComponent(r3), decodeURIComponent(n3));
|
|
2170
2506
|
}
|
|
2171
2507
|
})), t4;
|
|
2172
2508
|
}
|
|
2173
|
-
function
|
|
2509
|
+
function k(e4, t4) {
|
|
2174
2510
|
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);
|
|
2175
2511
|
}
|
|
2176
2512
|
b.prototype.clone = function() {
|
|
2177
2513
|
return new b(this, { body: this._bodyInit });
|
|
2178
|
-
},
|
|
2179
|
-
return new
|
|
2180
|
-
},
|
|
2181
|
-
var e4 = new
|
|
2514
|
+
}, y.call(b.prototype), y.call(k.prototype), k.prototype.clone = function() {
|
|
2515
|
+
return new k(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new p(this.headers), url: this.url });
|
|
2516
|
+
}, k.error = function() {
|
|
2517
|
+
var e4 = new k(null, { status: 0, statusText: "" });
|
|
2182
2518
|
return e4.type = "error", e4;
|
|
2183
2519
|
};
|
|
2184
|
-
var
|
|
2185
|
-
|
|
2186
|
-
if (-1 ===
|
|
2187
|
-
return new
|
|
2520
|
+
var A = [301, 302, 303, 307, 308];
|
|
2521
|
+
k.redirect = function(e4, t4) {
|
|
2522
|
+
if (-1 === A.indexOf(t4)) throw new RangeError("Invalid status code");
|
|
2523
|
+
return new k(null, { status: t4, headers: { location: e4 } });
|
|
2188
2524
|
}, t3.DOMException = e3.DOMException;
|
|
2189
2525
|
try {
|
|
2190
2526
|
new t3.DOMException();
|
|
@@ -2195,112 +2531,112 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2195
2531
|
this.stack = i3.stack;
|
|
2196
2532
|
}, t3.DOMException.prototype = Object.create(Error.prototype), t3.DOMException.prototype.constructor = t3.DOMException;
|
|
2197
2533
|
}
|
|
2198
|
-
function
|
|
2199
|
-
return new Promise((function(
|
|
2200
|
-
var
|
|
2201
|
-
if (
|
|
2202
|
-
var
|
|
2534
|
+
function T(e4, i3) {
|
|
2535
|
+
return new Promise((function(r3, o2) {
|
|
2536
|
+
var a2 = new b(e4, i3);
|
|
2537
|
+
if (a2.signal && a2.signal.aborted) return o2(new t3.DOMException("Aborted", "AbortError"));
|
|
2538
|
+
var s2 = new XMLHttpRequest();
|
|
2203
2539
|
function l2() {
|
|
2204
|
-
|
|
2540
|
+
s2.abort();
|
|
2205
2541
|
}
|
|
2206
|
-
|
|
2207
|
-
var e5, t4, i4 = { status:
|
|
2208
|
-
var i5 = e6.split(":"),
|
|
2209
|
-
if (
|
|
2210
|
-
var
|
|
2211
|
-
t4.append(
|
|
2542
|
+
s2.onload = function() {
|
|
2543
|
+
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) {
|
|
2544
|
+
var i5 = e6.split(":"), r4 = i5.shift().trim();
|
|
2545
|
+
if (r4) {
|
|
2546
|
+
var n4 = i5.join(":").trim();
|
|
2547
|
+
t4.append(r4, n4);
|
|
2212
2548
|
}
|
|
2213
2549
|
})), t4) };
|
|
2214
|
-
i4.url = "responseURL" in
|
|
2215
|
-
var
|
|
2216
|
-
|
|
2217
|
-
},
|
|
2218
|
-
|
|
2219
|
-
},
|
|
2220
|
-
|
|
2221
|
-
},
|
|
2222
|
-
|
|
2223
|
-
},
|
|
2224
|
-
|
|
2225
|
-
})),
|
|
2226
|
-
4 ===
|
|
2227
|
-
}),
|
|
2550
|
+
i4.url = "responseURL" in s2 ? s2.responseURL : i4.headers.get("X-Request-URL");
|
|
2551
|
+
var n3 = "response" in s2 ? s2.response : s2.responseText;
|
|
2552
|
+
r3(new k(n3, i4));
|
|
2553
|
+
}, s2.onerror = function() {
|
|
2554
|
+
o2(new TypeError("Network request failed"));
|
|
2555
|
+
}, s2.ontimeout = function() {
|
|
2556
|
+
o2(new TypeError("Network request failed"));
|
|
2557
|
+
}, s2.onabort = function() {
|
|
2558
|
+
o2(new t3.DOMException("Aborted", "AbortError"));
|
|
2559
|
+
}, 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) {
|
|
2560
|
+
s2.setRequestHeader(t4, e5);
|
|
2561
|
+
})), a2.signal && (a2.signal.addEventListener("abort", l2), s2.onreadystatechange = function() {
|
|
2562
|
+
4 === s2.readyState && a2.signal.removeEventListener("abort", l2);
|
|
2563
|
+
}), s2.send(void 0 === a2._bodyInit ? null : a2._bodyInit);
|
|
2228
2564
|
}));
|
|
2229
2565
|
}
|
|
2230
|
-
|
|
2566
|
+
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 });
|
|
2231
2567
|
})({});
|
|
2232
|
-
})(
|
|
2233
|
-
var
|
|
2234
|
-
(t2 =
|
|
2568
|
+
})(r), r.fetch.ponyfill = true, delete r.fetch.polyfill;
|
|
2569
|
+
var n = r;
|
|
2570
|
+
(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;
|
|
2235
2571
|
}, 317: (e2, t2) => {
|
|
2236
2572
|
"use strict";
|
|
2237
2573
|
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/";
|
|
2238
2574
|
}, 156: function(e2, t2, i) {
|
|
2239
2575
|
"use strict";
|
|
2240
|
-
var
|
|
2576
|
+
var r = this && this.__importDefault || function(e3) {
|
|
2241
2577
|
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
2242
2578
|
};
|
|
2243
2579
|
Object.defineProperty(t2, "__esModule", { value: true });
|
|
2244
|
-
const
|
|
2245
|
-
let
|
|
2246
|
-
|
|
2580
|
+
const n = r(i(927));
|
|
2581
|
+
let o = null;
|
|
2582
|
+
o || (o = (0, n.default)()), t2.default = o;
|
|
2247
2583
|
}, 927: function(e2, t2, i) {
|
|
2248
2584
|
"use strict";
|
|
2249
|
-
var
|
|
2250
|
-
return new (i2 || (i2 = Promise))((function(
|
|
2251
|
-
function
|
|
2585
|
+
var r = this && this.__awaiter || function(e3, t3, i2, r2) {
|
|
2586
|
+
return new (i2 || (i2 = Promise))((function(n2, o2) {
|
|
2587
|
+
function a2(e4) {
|
|
2252
2588
|
try {
|
|
2253
|
-
l2(
|
|
2589
|
+
l2(r2.next(e4));
|
|
2254
2590
|
} catch (e5) {
|
|
2255
|
-
|
|
2591
|
+
o2(e5);
|
|
2256
2592
|
}
|
|
2257
2593
|
}
|
|
2258
|
-
function
|
|
2594
|
+
function s2(e4) {
|
|
2259
2595
|
try {
|
|
2260
|
-
l2(
|
|
2596
|
+
l2(r2.throw(e4));
|
|
2261
2597
|
} catch (e5) {
|
|
2262
|
-
|
|
2598
|
+
o2(e5);
|
|
2263
2599
|
}
|
|
2264
2600
|
}
|
|
2265
2601
|
function l2(e4) {
|
|
2266
2602
|
var t4;
|
|
2267
|
-
e4.done ?
|
|
2603
|
+
e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
2268
2604
|
e5(t4);
|
|
2269
|
-
}))).then(
|
|
2605
|
+
}))).then(a2, s2);
|
|
2270
2606
|
}
|
|
2271
|
-
l2((
|
|
2607
|
+
l2((r2 = r2.apply(e3, t3 || [])).next());
|
|
2272
2608
|
}));
|
|
2273
2609
|
};
|
|
2274
2610
|
Object.defineProperty(t2, "__esModule", { value: true });
|
|
2275
|
-
const
|
|
2611
|
+
const n = i(57), o = i(544), a = i(665), s = i(256), l = i(313), d = i(317);
|
|
2276
2612
|
t2.default = function() {
|
|
2277
|
-
const e3 = new
|
|
2278
|
-
let t3 = new
|
|
2613
|
+
const e3 = new a.Config();
|
|
2614
|
+
let t3 = new s.Log(e3);
|
|
2279
2615
|
return { init: function(i2) {
|
|
2280
2616
|
"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);
|
|
2281
|
-
}, send: function(i2,
|
|
2282
|
-
return
|
|
2283
|
-
i2 || t3.err("No appID provided"),
|
|
2284
|
-
const
|
|
2617
|
+
}, send: function(i2, n2, o2, a2 = true, s2, d2) {
|
|
2618
|
+
return r(this, void 0, void 0, (function* () {
|
|
2619
|
+
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");
|
|
2620
|
+
const r2 = e3.get("url"), c = { integration: i2, publicKey: n2, privateKey: d2, completed: a2, id: s2, feedback: o2 };
|
|
2285
2621
|
try {
|
|
2286
2622
|
if (e3.get("dryRun")) return t3.log("Dry run enabled: skipping native feedback submit"), `dry-run-${Date.now()}`;
|
|
2287
|
-
const i3 = yield (0, l.sendFeedback)(
|
|
2623
|
+
const i3 = yield (0, l.sendFeedback)(r2, c, t3);
|
|
2288
2624
|
return t3.log("sent native feedback"), i3;
|
|
2289
2625
|
} catch (e4) {
|
|
2290
2626
|
return t3.err("error native feedback", e4), false;
|
|
2291
2627
|
}
|
|
2292
2628
|
}));
|
|
2293
|
-
}, form: function(i2,
|
|
2294
|
-
return i2 || t3.err("No appID provided"),
|
|
2295
|
-
}, agentForm: function(i2,
|
|
2296
|
-
return i2 || t3.err("No integrationId provided"),
|
|
2629
|
+
}, form: function(i2, r2, o2, a2) {
|
|
2630
|
+
return i2 || t3.err("No appID provided"), r2 || t3.err("No publicKey provided"), new n.Form(e3, i2, r2, o2, a2);
|
|
2631
|
+
}, agentForm: function(i2, r2, n2) {
|
|
2632
|
+
return i2 || t3.err("No integrationId provided"), r2 || t3.err("No publicKey provided"), new o.AgentForm(e3, i2, r2, n2);
|
|
2297
2633
|
}, session: function(i2) {
|
|
2298
|
-
return i2 || t3.err("No sessionId provided"), new
|
|
2299
|
-
}, previewPage: function(i2,
|
|
2300
|
-
return
|
|
2301
|
-
i2 || t3.err("No selector provided"),
|
|
2302
|
-
const
|
|
2303
|
-
return yield
|
|
2634
|
+
return i2 || t3.err("No sessionId provided"), new n.Form(e3, i2);
|
|
2635
|
+
}, previewPage: function(i2, o2, a2) {
|
|
2636
|
+
return r(this, void 0, void 0, (function* () {
|
|
2637
|
+
i2 || t3.err("No selector provided"), o2 && o2.page || t3.err("No page provided for preview");
|
|
2638
|
+
const r2 = (null == o2 ? void 0 : o2.appId) || `preview-${Date.now()}`, s2 = new n.Form(e3, r2);
|
|
2639
|
+
return yield s2.previewPage(i2, o2, a2), s2;
|
|
2304
2640
|
}));
|
|
2305
2641
|
} };
|
|
2306
2642
|
};
|
|
@@ -2337,40 +2673,40 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2337
2673
|
};
|
|
2338
2674
|
}, 544: function(e2, t2, i) {
|
|
2339
2675
|
"use strict";
|
|
2340
|
-
var
|
|
2341
|
-
return new (i2 || (i2 = Promise))((function(
|
|
2342
|
-
function
|
|
2676
|
+
var r = this && this.__awaiter || function(e3, t3, i2, r2) {
|
|
2677
|
+
return new (i2 || (i2 = Promise))((function(n2, o2) {
|
|
2678
|
+
function a2(e4) {
|
|
2343
2679
|
try {
|
|
2344
|
-
l2(
|
|
2680
|
+
l2(r2.next(e4));
|
|
2345
2681
|
} catch (e5) {
|
|
2346
|
-
|
|
2682
|
+
o2(e5);
|
|
2347
2683
|
}
|
|
2348
2684
|
}
|
|
2349
|
-
function
|
|
2685
|
+
function s2(e4) {
|
|
2350
2686
|
try {
|
|
2351
|
-
l2(
|
|
2687
|
+
l2(r2.throw(e4));
|
|
2352
2688
|
} catch (e5) {
|
|
2353
|
-
|
|
2689
|
+
o2(e5);
|
|
2354
2690
|
}
|
|
2355
2691
|
}
|
|
2356
2692
|
function l2(e4) {
|
|
2357
2693
|
var t4;
|
|
2358
|
-
e4.done ?
|
|
2694
|
+
e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
2359
2695
|
e5(t4);
|
|
2360
|
-
}))).then(
|
|
2696
|
+
}))).then(a2, s2);
|
|
2361
2697
|
}
|
|
2362
|
-
l2((
|
|
2698
|
+
l2((r2 = r2.apply(e3, t3 || [])).next());
|
|
2363
2699
|
}));
|
|
2364
2700
|
};
|
|
2365
2701
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.AgentForm = void 0;
|
|
2366
|
-
const
|
|
2702
|
+
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);
|
|
2367
2703
|
t2.AgentForm = class {
|
|
2368
|
-
constructor(e3, t3, i2,
|
|
2369
|
-
this.config = e3, this.log = new
|
|
2704
|
+
constructor(e3, t3, i2, r2) {
|
|
2705
|
+
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;
|
|
2370
2706
|
}
|
|
2371
2707
|
generate(e3, t3 = {}) {
|
|
2372
2708
|
var i2;
|
|
2373
|
-
return
|
|
2709
|
+
return r(this, void 0, void 0, (function* () {
|
|
2374
2710
|
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");
|
|
2375
2711
|
try {
|
|
2376
2712
|
const e4 = false !== this.formOptionsConfig.resume ? this.restore() : null;
|
|
@@ -2378,7 +2714,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2378
2714
|
else {
|
|
2379
2715
|
const e5 = yield this.startWithRetry();
|
|
2380
2716
|
this.sessionId = e5.sessionId, this.maxTurns = e5.maxTurns, this.currentTurn = null !== (i2 = e5.currentTurn) && void 0 !== i2 ? i2 : 1, this.total = Math.max(this.maxTurns - 1, 0);
|
|
2381
|
-
const t4 = (0,
|
|
2717
|
+
const t4 = (0, s.toAgentStep)(e5, this.adapterContext());
|
|
2382
2718
|
if (this.mountForm(), "END" === t4.kind) return yield this.renderEnd(t4), void (this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, progress: this.progress, total: this.total, sessionId: this.sessionId, completed: true })));
|
|
2383
2719
|
this.acceptQuestion(t4), this.renderStep(), this.persist();
|
|
2384
2720
|
}
|
|
@@ -2389,7 +2725,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2389
2725
|
}));
|
|
2390
2726
|
}
|
|
2391
2727
|
next() {
|
|
2392
|
-
return
|
|
2728
|
+
return r(this, void 0, void 0, (function* () {
|
|
2393
2729
|
return this.runTurn();
|
|
2394
2730
|
}));
|
|
2395
2731
|
}
|
|
@@ -2408,24 +2744,24 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2408
2744
|
}
|
|
2409
2745
|
runTurn() {
|
|
2410
2746
|
var e3;
|
|
2411
|
-
return
|
|
2747
|
+
return r(this, void 0, void 0, (function* () {
|
|
2412
2748
|
if (this.busy || this.completed || !this.currentQuestion) return;
|
|
2413
2749
|
this.busy = true, this.setSubmitDisabled(true), this.clearError();
|
|
2414
2750
|
const t3 = this.currentQuestion;
|
|
2415
2751
|
try {
|
|
2416
|
-
const i2 = document.getElementById(this.formId()),
|
|
2752
|
+
const i2 = document.getElementById(this.formId()), r2 = document.getElementById(this.questionsId());
|
|
2417
2753
|
if (!i2) throw new Error("Agent form not found");
|
|
2418
|
-
yield (0, c.awaitUploadReady)(
|
|
2419
|
-
const
|
|
2420
|
-
let
|
|
2421
|
-
if ("" ===
|
|
2422
|
-
if (t3.require) return void this.showError(this.formOptionsConfig.requiredMessage ||
|
|
2423
|
-
|
|
2754
|
+
yield (0, c.awaitUploadReady)(r2);
|
|
2755
|
+
const n2 = (0, l.scrapeInputs)(i2);
|
|
2756
|
+
let o2 = (0, s.encodeAnswer)(n2, t3, this.formOptionsConfig.answerDelimiter);
|
|
2757
|
+
if ("" === o2) {
|
|
2758
|
+
if (t3.require) return void this.showError(this.formOptionsConfig.requiredMessage || (0, p.t)(this.language, "message.required"));
|
|
2759
|
+
o2 = this.formOptionsConfig.emptyAnswerText || "";
|
|
2424
2760
|
}
|
|
2425
2761
|
this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
|
|
2426
|
-
const d2 = { role: "user", content:
|
|
2427
|
-
this.conversation.push(d2), this.currentTurn = null !== (e3 =
|
|
2428
|
-
const h = (0,
|
|
2762
|
+
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);
|
|
2763
|
+
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);
|
|
2764
|
+
const h = (0, s.toAgentStep)(m, this.adapterContext());
|
|
2429
2765
|
if ("END" === h.kind) return void (yield this.renderEnd(h));
|
|
2430
2766
|
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 }));
|
|
2431
2767
|
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 }));
|
|
@@ -2437,8 +2773,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2437
2773
|
}));
|
|
2438
2774
|
}
|
|
2439
2775
|
handleTurnError(e3) {
|
|
2440
|
-
return
|
|
2441
|
-
this.log.err(`An error occurred during the agent turn ${this.integrationId}:`, e3), e3 instanceof
|
|
2776
|
+
return r(this, void 0, void 0, (function* () {
|
|
2777
|
+
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 }));
|
|
2442
2778
|
}));
|
|
2443
2779
|
}
|
|
2444
2780
|
acceptQuestion(e3) {
|
|
@@ -2453,32 +2789,32 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2453
2789
|
}
|
|
2454
2790
|
mountForm() {
|
|
2455
2791
|
const e3 = (0, d.generateContainer)(this.selector, this.integrationId);
|
|
2456
|
-
this.primaryColor && (0, d.applyPrimaryColor)(e3, this.primaryColor);
|
|
2792
|
+
this.primaryColor && (0, d.applyPrimaryColor)(e3, this.primaryColor), (0, d.applyDirection)(e3, this.language);
|
|
2457
2793
|
const t3 = document.createElement("form");
|
|
2458
2794
|
t3.classList.add("magicfeedback-form"), t3.classList.add("magicfeedback-agent-form"), t3.id = this.formId(), t3.addEventListener("submit", ((e4) => {
|
|
2459
2795
|
e4.preventDefault(), this.runTurn();
|
|
2460
2796
|
}));
|
|
2461
2797
|
const i2 = document.createElement("div");
|
|
2462
|
-
i2.classList.add("magicfeedback-questions"), i2.id = this.questionsId(), t3.appendChild(i2), this.formOptionsConfig.addButton && t3.appendChild((0, u.renderActions)(this.formOptionsConfig.allowBack ? "MAGICSURVEY" : "MAGICFORM", (() => this.back()), this.formOptionsConfig.sendButtonText, this.formOptionsConfig.backButtonText, this.formOptionsConfig.nextButtonText)), e3.appendChild(t3);
|
|
2798
|
+
i2.classList.add("magicfeedback-questions"), i2.id = this.questionsId(), t3.appendChild(i2), this.formOptionsConfig.addButton && t3.appendChild((0, u.renderActions)(this.formOptionsConfig.allowBack ? "MAGICSURVEY" : "MAGICFORM", (() => this.back()), this.formOptionsConfig.sendButtonText || (0, p.t)(this.language, "action.send"), this.formOptionsConfig.backButtonText || (0, p.t)(this.language, "action.back"), this.formOptionsConfig.nextButtonText || (0, p.t)(this.language, "action.next"))), e3.appendChild(t3);
|
|
2463
2799
|
}
|
|
2464
2800
|
renderStep() {
|
|
2465
2801
|
const e3 = document.getElementById(this.questionsId());
|
|
2466
2802
|
e3 && this.currentQuestion && (e3.innerHTML = "", (0, u.renderQuestions)([this.currentQuestion], this.formOptionsConfig.questionFormat, this.language, this.product, (() => this.runTurn())).forEach(((t3) => e3.appendChild(t3))));
|
|
2467
2803
|
}
|
|
2468
2804
|
renderEnd(e3) {
|
|
2469
|
-
return
|
|
2805
|
+
return r(this, void 0, void 0, (function* () {
|
|
2470
2806
|
this.completed = true, this.currentQuestion = null, this.busy = false, this.timeToCompleted = this.timeToCompleted ? Date.now() - this.timeToCompleted : 0, this.clearRateLimitTimer(), this.clearPersisted();
|
|
2471
2807
|
const t3 = document.getElementById("magicfeedback-container-" + this.integrationId);
|
|
2472
2808
|
if (t3 && false !== this.formOptionsConfig.addSuccessScreen) {
|
|
2473
2809
|
t3.innerHTML = "";
|
|
2474
|
-
const i2 = "BLOCKED" === e3.reason ? this.formOptionsConfig.blockedMessage ||
|
|
2475
|
-
|
|
2810
|
+
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);
|
|
2811
|
+
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);
|
|
2476
2812
|
}
|
|
2477
2813
|
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 }));
|
|
2478
2814
|
}));
|
|
2479
2815
|
}
|
|
2480
2816
|
back() {
|
|
2481
|
-
return
|
|
2817
|
+
return r(this, void 0, void 0, (function* () {
|
|
2482
2818
|
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 }))));
|
|
2483
2819
|
}));
|
|
2484
2820
|
}
|
|
@@ -2489,7 +2825,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2489
2825
|
}
|
|
2490
2826
|
}
|
|
2491
2827
|
errorMessageFor(e3) {
|
|
2492
|
-
if (!(e3 instanceof
|
|
2828
|
+
if (!(e3 instanceof o.AgentApiError)) return "Something went wrong. Please try again.";
|
|
2493
2829
|
switch (e3.kind) {
|
|
2494
2830
|
case "AUTH":
|
|
2495
2831
|
case "NOT_FOUND":
|
|
@@ -2505,12 +2841,12 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2505
2841
|
return { integrationId: this.integrationId, sessionId: this.sessionId, language: this.language, log: this.log };
|
|
2506
2842
|
}
|
|
2507
2843
|
startWithRetry() {
|
|
2508
|
-
return
|
|
2844
|
+
return r(this, void 0, void 0, (function* () {
|
|
2509
2845
|
const e3 = { publicKey: this.publicKey, privateKey: this.privateKey, integrationId: this.integrationId };
|
|
2510
2846
|
try {
|
|
2511
|
-
return yield (0,
|
|
2847
|
+
return yield (0, a.startAgentSurvey)(this.url, e3, this.log);
|
|
2512
2848
|
} catch (t3) {
|
|
2513
|
-
if (t3 instanceof
|
|
2849
|
+
if (t3 instanceof o.AgentApiError && "AI_UNAVAILABLE" === t3.kind) return this.log.log("Retrying /start after a transient AI failure"), yield new Promise(((e4) => setTimeout(e4, 1500))), yield (0, a.startAgentSurvey)(this.url, e3, this.log);
|
|
2514
2850
|
throw t3;
|
|
2515
2851
|
}
|
|
2516
2852
|
}));
|
|
@@ -2530,11 +2866,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2530
2866
|
startRateLimitCountdown(e3) {
|
|
2531
2867
|
this.clearRateLimitTimer(), this.setSubmitDisabled(true);
|
|
2532
2868
|
let t3 = Math.ceil(e3 / 1e3);
|
|
2533
|
-
const i2 = this.formOptionsConfig.rateLimitMessage ||
|
|
2869
|
+
const i2 = this.formOptionsConfig.rateLimitMessage || (0, p.t)(this.language, "message.rateLimit"), r2 = () => {
|
|
2534
2870
|
if (t3 <= 0) return this.clearRateLimitTimer(), this.clearError(), void this.setSubmitDisabled(false);
|
|
2535
2871
|
this.showError(i2.replace("{seconds}", String(t3))), t3 -= 1;
|
|
2536
2872
|
};
|
|
2537
|
-
|
|
2873
|
+
r2(), this.rateLimitTimer = setInterval(r2, 1e3);
|
|
2538
2874
|
}
|
|
2539
2875
|
clearRateLimitTimer() {
|
|
2540
2876
|
this.rateLimitTimer && (clearInterval(this.rateLimitTimer), this.rateLimitTimer = null);
|
|
@@ -2587,50 +2923,50 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2587
2923
|
};
|
|
2588
2924
|
}, 57: function(e2, t2, i) {
|
|
2589
2925
|
"use strict";
|
|
2590
|
-
var
|
|
2591
|
-
return new (i2 || (i2 = Promise))((function(
|
|
2592
|
-
function
|
|
2926
|
+
var r = this && this.__awaiter || function(e3, t3, i2, r2) {
|
|
2927
|
+
return new (i2 || (i2 = Promise))((function(n2, o2) {
|
|
2928
|
+
function a2(e4) {
|
|
2593
2929
|
try {
|
|
2594
|
-
l2(
|
|
2930
|
+
l2(r2.next(e4));
|
|
2595
2931
|
} catch (e5) {
|
|
2596
|
-
|
|
2932
|
+
o2(e5);
|
|
2597
2933
|
}
|
|
2598
2934
|
}
|
|
2599
|
-
function
|
|
2935
|
+
function s2(e4) {
|
|
2600
2936
|
try {
|
|
2601
|
-
l2(
|
|
2937
|
+
l2(r2.throw(e4));
|
|
2602
2938
|
} catch (e5) {
|
|
2603
|
-
|
|
2939
|
+
o2(e5);
|
|
2604
2940
|
}
|
|
2605
2941
|
}
|
|
2606
2942
|
function l2(e4) {
|
|
2607
2943
|
var t4;
|
|
2608
|
-
e4.done ?
|
|
2944
|
+
e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
2609
2945
|
e5(t4);
|
|
2610
|
-
}))).then(
|
|
2946
|
+
}))).then(a2, s2);
|
|
2611
2947
|
}
|
|
2612
|
-
l2((
|
|
2948
|
+
l2((r2 = r2.apply(e3, t3 || [])).next());
|
|
2613
2949
|
}));
|
|
2614
2950
|
};
|
|
2615
2951
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Form = void 0;
|
|
2616
|
-
const
|
|
2952
|
+
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);
|
|
2617
2953
|
t2.Form = class {
|
|
2618
|
-
constructor(e3, t3, i2,
|
|
2619
|
-
this.config = e3, this.log = new
|
|
2954
|
+
constructor(e3, t3, i2, r2, n2) {
|
|
2955
|
+
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;
|
|
2620
2956
|
}
|
|
2621
2957
|
generate(e3, t3) {
|
|
2622
|
-
var i2,
|
|
2623
|
-
return
|
|
2958
|
+
var i2, n2, a2, l2, d2, c2, u2;
|
|
2959
|
+
return r(this, void 0, void 0, (function* () {
|
|
2624
2960
|
try {
|
|
2625
2961
|
this.formOptionsConfig = Object.assign(Object.assign({}, this.formOptionsConfig), t3), this.selector = e3;
|
|
2626
|
-
let
|
|
2627
|
-
if (void 0 !== this.formData && this.formData || (
|
|
2628
|
-
if (null === (i2 =
|
|
2629
|
-
if ("AGENT" ===
|
|
2630
|
-
if (
|
|
2962
|
+
let r2 = this.formData;
|
|
2963
|
+
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}`);
|
|
2964
|
+
if (null === (i2 = r2.error) || void 0 === i2 ? void 0 : i2.message) throw new Error(r2.error.message);
|
|
2965
|
+
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));
|
|
2966
|
+
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) => {
|
|
2631
2967
|
var t4;
|
|
2632
2968
|
return e4.integrationQuestions = null === (t4 = e4.integrationQuestions) || void 0 === t4 ? void 0 : t4.filter(((e5) => "ACTIVE" === e5.status));
|
|
2633
|
-
})), this.formData =
|
|
2969
|
+
})), 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}`);
|
|
2634
2970
|
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) => {
|
|
2635
2971
|
var t4;
|
|
2636
2972
|
return (null === (t4 = e4.integrationQuestions) || void 0 === t4 ? void 0 : t4.length) > 0;
|
|
@@ -2641,14 +2977,14 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2641
2977
|
}));
|
|
2642
2978
|
}
|
|
2643
2979
|
previewPage(e3, t3, i2 = {}) {
|
|
2644
|
-
var
|
|
2645
|
-
return
|
|
2980
|
+
var n2, o2, a2, s2, l2, d2, c2, u2, p2;
|
|
2981
|
+
return r(this, void 0, void 0, (function* () {
|
|
2646
2982
|
try {
|
|
2647
2983
|
if (!t3 || !t3.page) throw new Error("[MagicFeedback] No page provided for preview");
|
|
2648
2984
|
if (!t3.page.integrationQuestions || 0 === t3.page.integrationQuestions.length) throw new Error("[MagicFeedback] No questions provided for preview");
|
|
2649
2985
|
this.config.set("dryRun", true), this.formOptionsConfig = Object.assign(Object.assign(Object.assign({}, this.formOptionsConfig), { getMetaData: false }), i2), this.selector = e3;
|
|
2650
|
-
const
|
|
2651
|
-
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:
|
|
2986
|
+
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 : []);
|
|
2987
|
+
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();
|
|
2652
2988
|
} catch (e4) {
|
|
2653
2989
|
return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 })));
|
|
2654
2990
|
}
|
|
@@ -2660,38 +2996,38 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2660
2996
|
case "MAGICSURVEY":
|
|
2661
2997
|
this.formData.pages = [], null === (e3 = this.formData.questions) || void 0 === e3 || e3.forEach(((e4) => {
|
|
2662
2998
|
var t4, i2;
|
|
2663
|
-
const
|
|
2664
|
-
null === (i2 = null === (t4 = this.formData) || void 0 === t4 ? void 0 : t4.pages) || void 0 === i2 || i2.push(
|
|
2999
|
+
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]);
|
|
3000
|
+
null === (i2 = null === (t4 = this.formData) || void 0 === t4 ? void 0 : t4.pages) || void 0 === i2 || i2.push(n2);
|
|
2665
3001
|
}));
|
|
2666
3002
|
break;
|
|
2667
3003
|
case "MAGICFORM":
|
|
2668
|
-
const t3 = new
|
|
3004
|
+
const t3 = new m.Page("1", 1, this.appId, this.formData.questions, []);
|
|
2669
3005
|
this.formData.pages = [t3];
|
|
2670
3006
|
}
|
|
2671
3007
|
}
|
|
2672
3008
|
generateContainer() {
|
|
2673
3009
|
var e3, t3;
|
|
2674
|
-
const i2 = (0, c.generateContainer)(this.selector, this.appId),
|
|
2675
|
-
return
|
|
3010
|
+
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;
|
|
3011
|
+
return r2 && (0, c.applyPrimaryColor)(i2, r2), (0, c.applyDirection)(i2, this.lang()), i2;
|
|
2676
3012
|
}
|
|
2677
3013
|
generateForm() {
|
|
2678
|
-
var e3, t3, i2,
|
|
2679
|
-
return
|
|
3014
|
+
var e3, t3, i2, n2;
|
|
3015
|
+
return r(this, void 0, void 0, (function* () {
|
|
2680
3016
|
try {
|
|
2681
3017
|
if (!this.formData || !this.formData.pages || 0 === this.formData.pages.length) throw new Error("No form data");
|
|
2682
3018
|
this.graph = new p.PageGraph(this.formData.pages.sort(((e4, t4) => e4.position - t4.position)));
|
|
2683
|
-
let
|
|
2684
|
-
const
|
|
2685
|
-
|
|
2686
|
-
const
|
|
2687
|
-
|
|
2688
|
-
const
|
|
2689
|
-
if (!
|
|
2690
|
-
if (this.total = this.graph.findMaxDepth(),
|
|
2691
|
-
const e4 = (0, l.renderActions)(null === (
|
|
2692
|
-
|
|
3019
|
+
let r2 = this.generateContainer();
|
|
3020
|
+
const o2 = document.createElement("form");
|
|
3021
|
+
o2.classList.add("magicfeedback-form"), o2.id = "magicfeedback-" + this.appId, o2.addEventListener("submit", ((e4) => e4.preventDefault()));
|
|
3022
|
+
const a2 = document.createElement("div");
|
|
3023
|
+
a2.classList.add("magicfeedback-questions"), a2.id = "magicfeedback-questions-" + this.appId;
|
|
3024
|
+
const s2 = this.graph.getFirstPage();
|
|
3025
|
+
if (!s2) throw new Error("No page found");
|
|
3026
|
+
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) {
|
|
3027
|
+
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"));
|
|
3028
|
+
o2.appendChild(e4);
|
|
2693
3029
|
}
|
|
2694
|
-
this.formOptionsConfig.addButton &&
|
|
3030
|
+
this.formOptionsConfig.addButton && o2.addEventListener("submit", ((e4) => {
|
|
2695
3031
|
e4.preventDefault(), this.send();
|
|
2696
3032
|
})), 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 }));
|
|
2697
3033
|
} catch (e4) {
|
|
@@ -2702,10 +3038,14 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2702
3038
|
startForm() {
|
|
2703
3039
|
this.generateForm();
|
|
2704
3040
|
}
|
|
3041
|
+
lang() {
|
|
3042
|
+
var e3;
|
|
3043
|
+
return (null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.lang) && this.formData.lang[0] || "en";
|
|
3044
|
+
}
|
|
2705
3045
|
generateWelcomeMessage(e3) {
|
|
2706
|
-
return
|
|
3046
|
+
return r(this, void 0, void 0, (function* () {
|
|
2707
3047
|
try {
|
|
2708
|
-
const t3 = this.generateContainer(), i2 = (0, l.renderStartMessage)(e3, this.formOptionsConfig.addButton, this.formOptionsConfig.startButtonText, (() => this.startForm()));
|
|
3048
|
+
const t3 = this.generateContainer(), i2 = (0, l.renderStartMessage)(e3, this.formOptionsConfig.addButton, this.formOptionsConfig.startButtonText || (0, y.t)(this.lang(), "action.start"), (() => this.startForm()));
|
|
2709
3049
|
t3.appendChild(i2), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, formData: this.formData }));
|
|
2710
3050
|
} catch (e4) {
|
|
2711
3051
|
return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 }));
|
|
@@ -2720,42 +3060,42 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2720
3060
|
i2.length > 0 && this.feedback.metadata.push({ key: `query-${t3}`, value: i2 });
|
|
2721
3061
|
})), 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] });
|
|
2722
3062
|
}
|
|
2723
|
-
send(e3, t3, i2,
|
|
2724
|
-
return
|
|
3063
|
+
send(e3, t3, i2, o2) {
|
|
3064
|
+
return r(this, void 0, void 0, (function* () {
|
|
2725
3065
|
if (this.agentForm) return this.agentForm.next();
|
|
2726
|
-
const
|
|
3066
|
+
const r2 = document.getElementById("magicfeedback-questions-" + this.appId);
|
|
2727
3067
|
try {
|
|
2728
|
-
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]),
|
|
2729
|
-
this.feedback.answers = [...this.feedback.answers, ...
|
|
3068
|
+
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) {
|
|
3069
|
+
this.feedback.answers = [...this.feedback.answers, ...o2], this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
|
|
2730
3070
|
const e4 = yield this.pushAnswers(false);
|
|
2731
3071
|
if (!e4) throw new Error("No response");
|
|
2732
3072
|
return this.id = e4, void (this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total })));
|
|
2733
3073
|
}
|
|
2734
|
-
yield (0, d.awaitUploadReady)(
|
|
2735
|
-
const
|
|
2736
|
-
if (!
|
|
2737
|
-
for (const e4 of
|
|
3074
|
+
yield (0, d.awaitUploadReady)(r2), this.answer(), this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
|
|
3075
|
+
const a2 = this.history.back();
|
|
3076
|
+
if (!a2) throw new Error("No page found");
|
|
3077
|
+
for (const e4 of a2.questions.filter(((e5) => e5.require && ![n.FEEDBACKAPPANSWERTYPE.CONSENT, n.FEEDBACKAPPANSWERTYPE.INFO_PAGE].includes(e5.type)))) {
|
|
2738
3078
|
const t4 = e4.assets, i3 = this.feedback.answers.filter(((t5) => t5.key.includes(e4.ref) && !t5.key.includes("extra-option")));
|
|
2739
3079
|
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");
|
|
2740
3080
|
if (null == t4 ? void 0 : t4.minOptions) {
|
|
2741
|
-
let
|
|
2742
|
-
if ((null == t4 ? void 0 : t4.exclusiveAnswers) && (
|
|
3081
|
+
let r3 = [];
|
|
3082
|
+
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");
|
|
2743
3083
|
}
|
|
2744
|
-
if (e4.type ===
|
|
3084
|
+
if (e4.type === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) {
|
|
2745
3085
|
const i4 = this.feedback.answers.find(((t5) => t5.key === e4.ref));
|
|
2746
3086
|
if (!i4) throw this.log.err(`The matrix question ${e4.ref} is required`), new Error("No response");
|
|
2747
|
-
const
|
|
2748
|
-
if (
|
|
2749
|
-
if (
|
|
2750
|
-
const t5 =
|
|
3087
|
+
const r3 = this.parseMatrixAnswerPre(i4), n2 = Array.isArray(null == t4 ? void 0 : t4.options) ? t4.options : [];
|
|
3088
|
+
if (n2.length > 0) {
|
|
3089
|
+
if (n2.find(((e5) => {
|
|
3090
|
+
const t5 = r3.find(((t6) => t6.key === e5));
|
|
2751
3091
|
return !t5 || !Array.isArray(t5.value) || 0 === t5.value.length;
|
|
2752
3092
|
}))) throw this.log.err(`The matrix question ${e4.ref} requires an answer in every row`), new Error("No response");
|
|
2753
|
-
} else if (0 ===
|
|
3093
|
+
} 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");
|
|
2754
3094
|
}
|
|
2755
3095
|
}
|
|
2756
|
-
const
|
|
2757
|
-
if (!
|
|
2758
|
-
this.id =
|
|
3096
|
+
const s2 = yield this.pushAnswers(false);
|
|
3097
|
+
if (!s2) throw new Error("No response");
|
|
3098
|
+
this.id = s2, yield this.processNextQuestion(r2);
|
|
2759
3099
|
} catch (e4) {
|
|
2760
3100
|
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 }));
|
|
2761
3101
|
}
|
|
@@ -2767,82 +3107,82 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2767
3107
|
const t3 = this.history.back();
|
|
2768
3108
|
if (!t3) return this.feedback.answers = (0, u.scrapeInputs)(e3), this.feedback.answers;
|
|
2769
3109
|
const i2 = [];
|
|
2770
|
-
let
|
|
2771
|
-
const
|
|
2772
|
-
if (
|
|
2773
|
-
const
|
|
3110
|
+
let r2 = false;
|
|
3111
|
+
const o2 = e3.querySelectorAll(".magicfeedback-input"), a2 = {}, l2 = {}, c2 = {};
|
|
3112
|
+
if (o2.forEach(((e4) => {
|
|
3113
|
+
const o3 = e4, u2 = t3.questions.find(((e5) => {
|
|
2774
3114
|
var t4;
|
|
2775
|
-
return null === (t4 =
|
|
2776
|
-
})), p2 =
|
|
2777
|
-
if (
|
|
3115
|
+
return null === (t4 = o3.name) || void 0 === t4 ? void 0 : t4.includes(e5.ref);
|
|
3116
|
+
})), p2 = o3.type, m2 = o3.classList[0], h2 = { key: o3.name, value: [] }, f2 = "magicfeedback-consent" === m2 ? o3.checked.toString() : o3.value;
|
|
3117
|
+
if (h2.key && "" !== h2.key) if (h2.key.startsWith("extra-option-")) "" !== f2 && (h2.value.push(f2), i2.push(h2));
|
|
2778
3118
|
else switch (null == u2 ? void 0 : u2.type) {
|
|
2779
|
-
case
|
|
2780
|
-
case
|
|
2781
|
-
case
|
|
2782
|
-
case
|
|
2783
|
-
case
|
|
2784
|
-
case
|
|
2785
|
-
case
|
|
2786
|
-
"" !== f2 && ("email" === p2 ? (0,
|
|
3119
|
+
case n.FEEDBACKAPPANSWERTYPE.EMAIL:
|
|
3120
|
+
case n.FEEDBACKAPPANSWERTYPE.TEXT:
|
|
3121
|
+
case n.FEEDBACKAPPANSWERTYPE.LONGTEXT:
|
|
3122
|
+
case n.FEEDBACKAPPANSWERTYPE.NUMBER:
|
|
3123
|
+
case n.FEEDBACKAPPANSWERTYPE.DATE:
|
|
3124
|
+
case n.FEEDBACKAPPANSWERTYPE.CONTACT:
|
|
3125
|
+
case n.FEEDBACKAPPANSWERTYPE.PASSWORD:
|
|
3126
|
+
"" !== 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)));
|
|
2787
3127
|
break;
|
|
2788
|
-
case
|
|
2789
|
-
|
|
3128
|
+
case n.FEEDBACKAPPANSWERTYPE.RADIO:
|
|
3129
|
+
o3.checked && (h2.value.push(f2), i2.push(h2));
|
|
2790
3130
|
break;
|
|
2791
|
-
case
|
|
2792
|
-
case
|
|
2793
|
-
|
|
3131
|
+
case n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE:
|
|
3132
|
+
case n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE:
|
|
3133
|
+
o3.checked && (l2[h2.key] || (l2[h2.key] = []), l2[h2.key].push(f2));
|
|
2794
3134
|
break;
|
|
2795
|
-
case
|
|
2796
|
-
|
|
3135
|
+
case n.FEEDBACKAPPANSWERTYPE.BOOLEAN:
|
|
3136
|
+
o3.checked && (h2.value.push(f2), i2.push(h2));
|
|
2797
3137
|
break;
|
|
2798
|
-
case
|
|
2799
|
-
|
|
3138
|
+
case n.FEEDBACKAPPANSWERTYPE.CONSENT:
|
|
3139
|
+
h2.value.push(o3.checked.toString()), i2.push(h2);
|
|
2800
3140
|
break;
|
|
2801
|
-
case
|
|
2802
|
-
case
|
|
2803
|
-
case
|
|
2804
|
-
|
|
3141
|
+
case n.FEEDBACKAPPANSWERTYPE.RATING_EMOJI:
|
|
3142
|
+
case n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER:
|
|
3143
|
+
case n.FEEDBACKAPPANSWERTYPE.RATING_STAR:
|
|
3144
|
+
o3.checked && (h2.value.push(f2), i2.push(h2));
|
|
2805
3145
|
break;
|
|
2806
|
-
case
|
|
2807
|
-
"" !== f2 && (
|
|
3146
|
+
case n.FEEDBACKAPPANSWERTYPE.SELECT:
|
|
3147
|
+
"" !== f2 && (h2.value.push(f2), i2.push(h2));
|
|
2808
3148
|
break;
|
|
2809
|
-
case
|
|
2810
|
-
"number" === p2 &&
|
|
3149
|
+
case n.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM:
|
|
3150
|
+
"number" === p2 && o3.id && (c2[h2.key] || (c2[h2.key] = []), "" !== f2 && c2[h2.key].push(`${o3.id}:${f2}%`));
|
|
2811
3151
|
break;
|
|
2812
|
-
case
|
|
2813
|
-
"hidden" === p2 && (
|
|
3152
|
+
case n.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST:
|
|
3153
|
+
"hidden" === p2 && (a2[h2.key] || (a2[h2.key] = []), a2[h2.key].push(f2));
|
|
2814
3154
|
break;
|
|
2815
|
-
case
|
|
2816
|
-
e4.checked && (
|
|
3155
|
+
case n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX:
|
|
3156
|
+
e4.checked && (h2.value.push(f2), i2.push(h2));
|
|
2817
3157
|
break;
|
|
2818
|
-
case
|
|
2819
|
-
case
|
|
2820
|
-
const e5 = (0, d.getUploadValues)(
|
|
2821
|
-
e5.length && (
|
|
3158
|
+
case n.FEEDBACKAPPANSWERTYPE.UPLOAD_IMAGE:
|
|
3159
|
+
case n.FEEDBACKAPPANSWERTYPE.UPLOAD_FILE: {
|
|
3160
|
+
const e5 = (0, d.getUploadValues)(o3);
|
|
3161
|
+
e5.length && (h2.value.push(...e5), i2.push(h2));
|
|
2822
3162
|
break;
|
|
2823
3163
|
}
|
|
2824
3164
|
}
|
|
2825
|
-
})),
|
|
3165
|
+
})), r2) return [];
|
|
2826
3166
|
Object.entries(l2).forEach((([e4, t4]) => {
|
|
2827
3167
|
t4 && 0 !== t4.length && i2.push({ key: e4, value: t4 });
|
|
2828
3168
|
})), Object.entries(c2).forEach((([e4, t4]) => {
|
|
2829
3169
|
t4 && 0 !== t4.length && i2.push({ key: e4, value: t4 });
|
|
2830
|
-
})), Object.entries(
|
|
3170
|
+
})), Object.entries(a2).forEach((([e4, t4]) => {
|
|
2831
3171
|
if (!t4 || 0 === t4.length) return;
|
|
2832
|
-
const
|
|
2833
|
-
i2.push({ key: e4, value:
|
|
3172
|
+
const r3 = t4.slice().sort(((e5, t5) => Number(e5.split(".")[0]) - Number(t5.split(".")[0])));
|
|
3173
|
+
i2.push({ key: e4, value: r3 });
|
|
2834
3174
|
}));
|
|
2835
3175
|
try {
|
|
2836
|
-
t3.questions.filter(((e4) => e4.type ===
|
|
2837
|
-
const t4 = e4.ref + "-",
|
|
2838
|
-
if (0 ===
|
|
2839
|
-
const
|
|
2840
|
-
for (const e5 of
|
|
3176
|
+
t3.questions.filter(((e4) => e4.type === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX)).forEach(((e4) => {
|
|
3177
|
+
const t4 = e4.ref + "-", r3 = i2.filter(((e5) => e5.key.startsWith(t4)));
|
|
3178
|
+
if (0 === r3.length) return;
|
|
3179
|
+
const n2 = r3.map(((e5) => ({ key: e5.key.substring(t4.length), value: e5.value }))), o3 = { key: e4.ref, value: [JSON.stringify(n2)] };
|
|
3180
|
+
for (const e5 of r3) {
|
|
2841
3181
|
const t5 = i2.findIndex(((t6) => t6.key === e5.key));
|
|
2842
3182
|
-1 !== t5 && i2.splice(t5, 1);
|
|
2843
3183
|
}
|
|
2844
|
-
const
|
|
2845
|
-
-1 !==
|
|
3184
|
+
const a3 = i2.findIndex(((t5) => t5.key === e4.ref));
|
|
3185
|
+
-1 !== a3 ? i2[a3] = o3 : i2.push(o3);
|
|
2846
3186
|
}));
|
|
2847
3187
|
} catch (e4) {
|
|
2848
3188
|
this.log.err("Error agrupando MULTI_QUESTION_MATRIX", e4);
|
|
@@ -2850,11 +3190,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2850
3190
|
return this.feedback.answers = i2, t3.setAnswer(i2), i2;
|
|
2851
3191
|
}
|
|
2852
3192
|
finish() {
|
|
2853
|
-
return
|
|
3193
|
+
return r(this, void 0, void 0, (function* () {
|
|
2854
3194
|
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) {
|
|
2855
3195
|
const e3 = document.getElementById("magicfeedback-container-" + this.appId);
|
|
2856
3196
|
e3.childNodes.length > 0 && e3.removeChild(e3.childNodes[0]);
|
|
2857
|
-
const t3 = (0, l.renderSuccess)(this.formOptionsConfig.successMessage ||
|
|
3197
|
+
const t3 = (0, l.renderSuccess)(this.formOptionsConfig.successMessage || (0, y.t)(this.lang(), "message.success"));
|
|
2858
3198
|
e3.appendChild(t3);
|
|
2859
3199
|
}
|
|
2860
3200
|
this.answer();
|
|
@@ -2868,14 +3208,14 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2868
3208
|
}));
|
|
2869
3209
|
}
|
|
2870
3210
|
pushAnswers(e3 = false) {
|
|
2871
|
-
return
|
|
3211
|
+
return r(this, void 0, void 0, (function* () {
|
|
2872
3212
|
try {
|
|
2873
3213
|
if (this.config.get("dryRun")) {
|
|
2874
3214
|
const e4 = this.id || `dry-run-${this.appId}-${Date.now()}`;
|
|
2875
3215
|
return this.log.log(`Dry run enabled: skipping feedback submit for form ${this.appId}`), e4;
|
|
2876
3216
|
}
|
|
2877
3217
|
const t3 = this.config.get("url"), i2 = { integration: this.appId, publicKey: this.publicKey, feedback: this.feedback, completed: e3 };
|
|
2878
|
-
return yield (0,
|
|
3218
|
+
return yield (0, s.sendFeedback)(t3, this.id ? Object.assign(Object.assign({}, i2), { sessionId: this.id }) : i2, this.log);
|
|
2879
3219
|
} catch (e4) {
|
|
2880
3220
|
return this.log.err(`An error occurred while submitting the form ${this.appId}:`, e4), "";
|
|
2881
3221
|
}
|
|
@@ -2883,89 +3223,89 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2883
3223
|
}
|
|
2884
3224
|
callFollowUpQuestion(e3) {
|
|
2885
3225
|
var t3;
|
|
2886
|
-
return
|
|
3226
|
+
return r(this, void 0, void 0, (function* () {
|
|
2887
3227
|
if (!(null == e3 ? void 0 : e3.followup)) return null;
|
|
2888
3228
|
try {
|
|
2889
3229
|
if (0 === this.feedback.answers.length) throw new Error("No answers provided");
|
|
2890
|
-
const i2 = this.config.get("url"),
|
|
2891
|
-
return yield (0,
|
|
3230
|
+
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 });
|
|
3231
|
+
return yield (0, s.getFollowUpQuestion)(i2, r2, this.log);
|
|
2892
3232
|
} catch (e4) {
|
|
2893
3233
|
throw this.log.err(`An error occurred while submitting the form ${this.appId}:`, e4), e4;
|
|
2894
3234
|
}
|
|
2895
3235
|
}));
|
|
2896
3236
|
}
|
|
2897
3237
|
processNextQuestion(e3) {
|
|
2898
|
-
var t3, i2,
|
|
2899
|
-
return
|
|
2900
|
-
const
|
|
2901
|
-
if (!
|
|
2902
|
-
const
|
|
2903
|
-
if (0 === (null ==
|
|
2904
|
-
const
|
|
2905
|
-
for (const e4 of
|
|
2906
|
-
const t4 =
|
|
3238
|
+
var t3, i2, n2;
|
|
3239
|
+
return r(this, void 0, void 0, (function* () {
|
|
3240
|
+
const r2 = this.history.back();
|
|
3241
|
+
if (!r2) throw new Error("No page found");
|
|
3242
|
+
const o2 = r2.getFollowupQuestions();
|
|
3243
|
+
if (0 === (null == o2 ? void 0 : o2.length)) return void (yield this.renderNextQuestion(e3, r2));
|
|
3244
|
+
const a2 = [];
|
|
3245
|
+
for (const e4 of o2) {
|
|
3246
|
+
const t4 = r2.questions.find(((t5) => t5.ref === e4));
|
|
2907
3247
|
if (t4) {
|
|
2908
3248
|
const e5 = yield this.callFollowUpQuestion(t4);
|
|
2909
|
-
e5 &&
|
|
3249
|
+
e5 && a2.push(e5);
|
|
2910
3250
|
}
|
|
2911
3251
|
}
|
|
2912
|
-
if (0 ===
|
|
2913
|
-
const
|
|
2914
|
-
d2.elements = (0, l.renderQuestions)(
|
|
3252
|
+
if (0 === a2.length) return void (yield this.renderNextQuestion(e3, r2));
|
|
3253
|
+
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);
|
|
3254
|
+
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 }));
|
|
2915
3255
|
}));
|
|
2916
3256
|
}
|
|
2917
3257
|
renderNextQuestion(e3, t3) {
|
|
2918
|
-
var i2,
|
|
2919
|
-
return
|
|
2920
|
-
let
|
|
2921
|
-
if (!
|
|
2922
|
-
const c2 =
|
|
3258
|
+
var i2, o2, a2, s2, d2;
|
|
3259
|
+
return r(this, void 0, void 0, (function* () {
|
|
3260
|
+
let r2 = this.graph.getNextPage(t3, this.feedback.answers);
|
|
3261
|
+
if (!r2) return void this.finish();
|
|
3262
|
+
const c2 = r2.edges.filter(((e4) => "PRECONDITIONAL" === e4.typeCondition)).sort(((e4, t4) => e4.position < t4.position ? -1 : e4.position > t4.position ? 1 : 0));
|
|
2923
3263
|
if ((null == c2 ? void 0 : c2.length) > 0) {
|
|
2924
|
-
const t4 = c2.some(((e4) => e4.transition ===
|
|
2925
|
-
let
|
|
3264
|
+
const t4 = c2.some(((e4) => e4.transition === h.TransitionType.ALLOW));
|
|
3265
|
+
let a3 = t4;
|
|
2926
3266
|
for (const t5 of c2) {
|
|
2927
|
-
let
|
|
3267
|
+
let s3;
|
|
2928
3268
|
for (let e4 = this.history.size() - 1; e4 >= 0; e4--) {
|
|
2929
|
-
const
|
|
2930
|
-
if (
|
|
3269
|
+
const r3 = this.history.get(e4);
|
|
3270
|
+
if (r3 && (s3 = null === (i2 = r3.answers) || void 0 === i2 ? void 0 : i2.find(((e5) => e5.key === t5.questionRef)), s3)) break;
|
|
2931
3271
|
}
|
|
2932
3272
|
let l2 = false;
|
|
2933
|
-
if (
|
|
2934
|
-
const e4 = null === (
|
|
2935
|
-
if ((null == e4 ? void 0 : e4.type) ===
|
|
3273
|
+
if (s3) {
|
|
3274
|
+
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];
|
|
3275
|
+
if ((null == e4 ? void 0 : e4.type) === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) l2 = this.evaluateMatrixPreconditional(t5, s3);
|
|
2936
3276
|
else switch (t5.typeOperator) {
|
|
2937
3277
|
case "EQUAL":
|
|
2938
3278
|
case "INQ":
|
|
2939
|
-
l2 = i3.some(((e5) =>
|
|
3279
|
+
l2 = i3.some(((e5) => r3.includes(e5)));
|
|
2940
3280
|
break;
|
|
2941
3281
|
case "NOEQUAL":
|
|
2942
3282
|
case "NINQ":
|
|
2943
|
-
l2 = i3.every(((e5) => !
|
|
3283
|
+
l2 = i3.every(((e5) => !r3.includes(e5)));
|
|
2944
3284
|
break;
|
|
2945
3285
|
case "GREATER":
|
|
2946
|
-
l2 = i3.some(((e5) => Number(e5) > Number(
|
|
3286
|
+
l2 = i3.some(((e5) => Number(e5) > Number(r3[0])));
|
|
2947
3287
|
break;
|
|
2948
3288
|
case "LESS":
|
|
2949
|
-
l2 = i3.some(((e5) => Number(e5) < Number(
|
|
3289
|
+
l2 = i3.some(((e5) => Number(e5) < Number(r3[0])));
|
|
2950
3290
|
break;
|
|
2951
3291
|
case "GREATEREQUAL":
|
|
2952
|
-
l2 = i3.some(((e5) => Number(e5) >= Number(
|
|
3292
|
+
l2 = i3.some(((e5) => Number(e5) >= Number(r3[0])));
|
|
2953
3293
|
break;
|
|
2954
3294
|
case "LESSEQUAL":
|
|
2955
|
-
l2 = i3.some(((e5) => Number(e5) <= Number(
|
|
3295
|
+
l2 = i3.some(((e5) => Number(e5) <= Number(r3[0])));
|
|
2956
3296
|
}
|
|
2957
3297
|
}
|
|
2958
|
-
if (t5.transition ===
|
|
2959
|
-
else if (t5.transition ===
|
|
3298
|
+
if (t5.transition === h.TransitionType.ALLOW) l2 || (a3 = false);
|
|
3299
|
+
else if (t5.transition === h.TransitionType.NEXT && l2) return this.feedback.answers = [], void (r2 && (yield this.renderNextQuestion(e3, r2)));
|
|
2960
3300
|
}
|
|
2961
|
-
if (t4 && !
|
|
3301
|
+
if (t4 && !a3) return this.feedback.answers = [], void (r2 && (yield this.renderNextQuestion(e3, r2)));
|
|
2962
3302
|
}
|
|
2963
|
-
|
|
3303
|
+
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 }));
|
|
2964
3304
|
}));
|
|
2965
3305
|
}
|
|
2966
3306
|
back() {
|
|
2967
3307
|
var e3;
|
|
2968
|
-
return
|
|
3308
|
+
return r(this, void 0, void 0, (function* () {
|
|
2969
3309
|
if (0 === this.history.size()) return;
|
|
2970
3310
|
const t3 = document.getElementById("magicfeedback-questions-" + this.appId);
|
|
2971
3311
|
t3 && t3.childNodes.length > 0 && (t3.innerHTML = ""), this.history.rollback();
|
|
@@ -2974,25 +3314,25 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2974
3314
|
}));
|
|
2975
3315
|
}
|
|
2976
3316
|
previewQuestion(e3, t3, i2) {
|
|
2977
|
-
var
|
|
2978
|
-
const
|
|
2979
|
-
if (!
|
|
2980
|
-
const
|
|
2981
|
-
if (!
|
|
2982
|
-
const { format: d2 = this.formOptionsConfig.questionFormat || "standard", language: u2 = (null === (
|
|
2983
|
-
|
|
3317
|
+
var r2, n2, o2;
|
|
3318
|
+
const a2 = Array.isArray(t3) ? t3 : [t3];
|
|
3319
|
+
if (!a2 || 0 === a2.length) throw new Error("[MagicFeedback] No question provided for preview");
|
|
3320
|
+
const s2 = document.getElementById(e3);
|
|
3321
|
+
if (!s2) throw new Error(`[MagicFeedback] Element with ID '${e3}' not found.`);
|
|
3322
|
+
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 || {};
|
|
3323
|
+
h2 && (s2.innerHTML = ""), (null == m2 ? void 0 : m2.primaryColor) && (0, c.applyPrimaryColor)(s2, m2.primaryColor), (0, c.applyDirection)(s2, u2);
|
|
2984
3324
|
let g2 = [];
|
|
2985
3325
|
try {
|
|
2986
|
-
g2 = (0, l.renderQuestions)(
|
|
3326
|
+
g2 = (0, l.renderQuestions)(a2, d2, u2, p2);
|
|
2987
3327
|
} catch (e4) {
|
|
2988
3328
|
throw this.log.err(e4), e4;
|
|
2989
3329
|
}
|
|
2990
|
-
let
|
|
3330
|
+
let y2 = s2;
|
|
2991
3331
|
if (f2) {
|
|
2992
3332
|
const e4 = document.createElement("div");
|
|
2993
|
-
e4.classList.add("magicfeedback-preview-question"),
|
|
3333
|
+
e4.classList.add("magicfeedback-preview-question"), y2.appendChild(e4), y2 = e4;
|
|
2994
3334
|
}
|
|
2995
|
-
return g2.forEach(((e4) =>
|
|
3335
|
+
return g2.forEach(((e4) => y2.appendChild(e4))), s2;
|
|
2996
3336
|
}
|
|
2997
3337
|
parseMatrixAnswerPre(e3) {
|
|
2998
3338
|
if (!e3 || !e3.value) return [];
|
|
@@ -3005,25 +3345,25 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3005
3345
|
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 : [];
|
|
3006
3346
|
}
|
|
3007
3347
|
evaluateMatrixPreconditional(e3, t3) {
|
|
3008
|
-
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value],
|
|
3009
|
-
if (!
|
|
3010
|
-
const
|
|
3011
|
-
if (!
|
|
3348
|
+
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value], r2 = new Set(e3.option || []), n2 = this.parseMatrixAnswerPre(t3);
|
|
3349
|
+
if (!n2.length) return false;
|
|
3350
|
+
const o2 = r2.size > 0 ? n2.filter(((e4) => r2.has(e4.key))) : n2;
|
|
3351
|
+
if (!o2.length) return false;
|
|
3012
3352
|
switch (e3.typeOperator) {
|
|
3013
3353
|
case "EQUAL":
|
|
3014
3354
|
case "INQ":
|
|
3015
|
-
return
|
|
3355
|
+
return o2.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => i2.includes(e5)))));
|
|
3016
3356
|
case "NOEQUAL":
|
|
3017
3357
|
case "NINQ":
|
|
3018
|
-
return
|
|
3358
|
+
return o2.every(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).every(((e5) => !i2.includes(e5)))));
|
|
3019
3359
|
case "GREATER":
|
|
3020
|
-
return
|
|
3360
|
+
return o2.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => i2.some(((t4) => Number(e5) > Number(t4)))))));
|
|
3021
3361
|
case "LESS":
|
|
3022
|
-
return
|
|
3362
|
+
return o2.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => i2.some(((t4) => Number(e5) < Number(t4)))))));
|
|
3023
3363
|
case "GREATEREQUAL":
|
|
3024
|
-
return
|
|
3364
|
+
return o2.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => i2.some(((t4) => Number(e5) >= Number(t4)))))));
|
|
3025
3365
|
case "LESSEQUAL":
|
|
3026
|
-
return
|
|
3366
|
+
return o2.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => i2.some(((t4) => Number(e5) <= Number(t4)))))));
|
|
3027
3367
|
default:
|
|
3028
3368
|
return false;
|
|
3029
3369
|
}
|
|
@@ -3032,14 +3372,14 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3032
3372
|
}, 700: (e2, t2) => {
|
|
3033
3373
|
"use strict";
|
|
3034
3374
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Page = void 0, t2.Page = class {
|
|
3035
|
-
constructor(e3, t3, i,
|
|
3036
|
-
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 =
|
|
3375
|
+
constructor(e3, t3, i, r, n) {
|
|
3376
|
+
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;
|
|
3037
3377
|
}
|
|
3038
3378
|
};
|
|
3039
3379
|
}, 989: (e2, t2, i) => {
|
|
3040
3380
|
"use strict";
|
|
3041
3381
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.PageGraph = void 0;
|
|
3042
|
-
const
|
|
3382
|
+
const r = i(636), n = i(558), o = i(591);
|
|
3043
3383
|
t2.PageGraph = class {
|
|
3044
3384
|
constructor(e3) {
|
|
3045
3385
|
this.nodes = /* @__PURE__ */ new Map(), this.buildGraph(e3);
|
|
@@ -3048,10 +3388,10 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3048
3388
|
e3.forEach(((e4) => {
|
|
3049
3389
|
var t3;
|
|
3050
3390
|
e4.integrationPageRoutes && (e4.integrationPageRoutes = (null === (t3 = e4.integrationPageRoutes) || void 0 === t3 ? void 0 : t3.sort(((e5, t4) => {
|
|
3051
|
-
const i3 = new Date((null == e5 ? void 0 : e5.generatedAt) || 0).getTime(),
|
|
3052
|
-
return i3 !==
|
|
3391
|
+
const i3 = new Date((null == e5 ? void 0 : e5.generatedAt) || 0).getTime(), r2 = new Date((null == t4 ? void 0 : t4.generatedAt) || 0).getTime();
|
|
3392
|
+
return i3 !== r2 ? i3 - r2 : "DIRECT" === e5.typeCondition && "DIRECT" !== t4.typeCondition ? 1 : "DIRECT" !== e5.typeCondition && "DIRECT" === t4.typeCondition ? -1 : 0;
|
|
3053
3393
|
}))) || []);
|
|
3054
|
-
const i2 = new
|
|
3394
|
+
const i2 = new r.PageNode(e4.id, e4.position, e4.integrationPageRoutes || [], e4, e4.integrationQuestions);
|
|
3055
3395
|
this.nodes.set(i2.id, i2);
|
|
3056
3396
|
}));
|
|
3057
3397
|
}
|
|
@@ -3060,8 +3400,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3060
3400
|
}
|
|
3061
3401
|
getNextEdgeByDefault(e3) {
|
|
3062
3402
|
if (!e3) return;
|
|
3063
|
-
const t3 = e3.edges.find(((e4) => e4.typeCondition ===
|
|
3064
|
-
if (!t3 || ![
|
|
3403
|
+
const t3 = e3.edges.find(((e4) => e4.typeCondition === o.ConditionType.DIRECT));
|
|
3404
|
+
if (!t3 || ![o.TransitionType.FINISH, o.TransitionType.REDIRECT].includes(t3.transition)) {
|
|
3065
3405
|
if (t3 && t3.transitionDestiny) return t3.transitionDestiny;
|
|
3066
3406
|
for (const t4 of this.nodes.values()) if (t4.position === e3.position + 1) return t4.id;
|
|
3067
3407
|
}
|
|
@@ -3075,46 +3415,46 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3075
3415
|
var i2;
|
|
3076
3416
|
if (!e3) return;
|
|
3077
3417
|
e3.edges.sort(((e4, t4) => "DIRECT" === e4.typeCondition ? 1 : "DIRECT" === t4.typeCondition ? -1 : 0));
|
|
3078
|
-
const
|
|
3079
|
-
const
|
|
3418
|
+
const r2 = e3.edges.find(((i3) => {
|
|
3419
|
+
const r3 = e3.questions.find(((e4) => e4.ref === i3.questionRef)), a = null == t3 ? void 0 : t3.filter(((e4) => e4.key === i3.questionRef));
|
|
3080
3420
|
if ("DIRECT" === i3.typeCondition) return true;
|
|
3081
|
-
if (!
|
|
3082
|
-
if ((null ==
|
|
3083
|
-
const
|
|
3421
|
+
if (!a || 0 === a.length) return false;
|
|
3422
|
+
if ((null == r3 ? void 0 : r3.type) === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) return this.evaluateMatrixCondition(i3, a);
|
|
3423
|
+
const s = Array.isArray(i3.value) ? i3.value : [i3.value];
|
|
3084
3424
|
switch (i3.typeOperator) {
|
|
3085
|
-
case
|
|
3086
|
-
return
|
|
3087
|
-
case
|
|
3088
|
-
return
|
|
3089
|
-
case
|
|
3090
|
-
return
|
|
3091
|
-
case
|
|
3092
|
-
return
|
|
3093
|
-
case
|
|
3094
|
-
return
|
|
3095
|
-
case
|
|
3096
|
-
return
|
|
3097
|
-
case
|
|
3098
|
-
return
|
|
3099
|
-
case
|
|
3100
|
-
return
|
|
3425
|
+
case o.OperatorType.EQUAL:
|
|
3426
|
+
return a.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => s.includes(e5)))));
|
|
3427
|
+
case o.OperatorType.NOEQUAL:
|
|
3428
|
+
return a.every(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).every(((e5) => !s.includes(e5)))));
|
|
3429
|
+
case o.OperatorType.GREATER:
|
|
3430
|
+
return a.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => s.some(((t4) => Number(e5) > Number(t4)))))));
|
|
3431
|
+
case o.OperatorType.LESS:
|
|
3432
|
+
return a.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => s.some(((t4) => Number(e5) < Number(t4)))))));
|
|
3433
|
+
case o.OperatorType.GREATEREQUAL:
|
|
3434
|
+
return a.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => s.some(((t4) => Number(e5) >= Number(t4)))))));
|
|
3435
|
+
case o.OperatorType.LESSEQUAL:
|
|
3436
|
+
return a.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => s.some(((t4) => Number(e5) <= Number(t4)))))));
|
|
3437
|
+
case o.OperatorType.INQ:
|
|
3438
|
+
return a.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => s.includes(e5)))));
|
|
3439
|
+
case o.OperatorType.NINQ:
|
|
3440
|
+
return a.every(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).every(((e5) => !s.includes(e5)))));
|
|
3101
3441
|
default:
|
|
3102
3442
|
return false;
|
|
3103
3443
|
}
|
|
3104
3444
|
}));
|
|
3105
|
-
if (!
|
|
3445
|
+
if (!r2) {
|
|
3106
3446
|
const t4 = this.getNextEdgeByDefault(e3);
|
|
3107
3447
|
if (!t4) return;
|
|
3108
3448
|
return this.getNodeById(t4);
|
|
3109
3449
|
}
|
|
3110
|
-
switch (
|
|
3111
|
-
case
|
|
3112
|
-
if (!
|
|
3113
|
-
return this.getNodeById(
|
|
3114
|
-
case
|
|
3450
|
+
switch (r2.transition) {
|
|
3451
|
+
case o.TransitionType.PAGE:
|
|
3452
|
+
if (!r2.transitionDestiny) return;
|
|
3453
|
+
return this.getNodeById(r2.transitionDestiny);
|
|
3454
|
+
case o.TransitionType.FINISH:
|
|
3115
3455
|
return;
|
|
3116
|
-
case
|
|
3117
|
-
return void (window.location.href = (null === (i2 =
|
|
3456
|
+
case o.TransitionType.REDIRECT:
|
|
3457
|
+
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}`);
|
|
3118
3458
|
default:
|
|
3119
3459
|
return;
|
|
3120
3460
|
}
|
|
@@ -3133,21 +3473,21 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3133
3473
|
}
|
|
3134
3474
|
DFSUtil(e3, t3, i2) {
|
|
3135
3475
|
t3.add(e3);
|
|
3136
|
-
let
|
|
3137
|
-
const
|
|
3138
|
-
if (
|
|
3139
|
-
const i3 = this.getNodeById(
|
|
3140
|
-
i3 && !t3.has(i3) &&
|
|
3476
|
+
let r2 = i2;
|
|
3477
|
+
const n2 = [...e3.edges.filter(((e4) => e4.typeCondition !== o.ConditionType.PRECONDITIONAL)) || []], a = this.getNextEdgeByDefault(e3);
|
|
3478
|
+
if (a) {
|
|
3479
|
+
const i3 = this.getNodeById(a);
|
|
3480
|
+
i3 && !t3.has(i3) && n2.push(new o.PageRoute(i3.id, "", o.OperatorType.DEFAULT, [""], o.TransitionType.PAGE, i3.id, e3.id));
|
|
3141
3481
|
}
|
|
3142
|
-
for (const e4 of
|
|
3482
|
+
for (const e4 of n2) {
|
|
3143
3483
|
if (!e4.transitionDestiny) continue;
|
|
3144
|
-
const
|
|
3145
|
-
if (
|
|
3146
|
-
const e5 = i2 + 1,
|
|
3147
|
-
|
|
3484
|
+
const n3 = this.getNodeById(e4.transitionDestiny);
|
|
3485
|
+
if (n3 && !t3.has(n3)) {
|
|
3486
|
+
const e5 = i2 + 1, o2 = new Set(t3), a2 = this.DFSUtil(n3, o2, e5);
|
|
3487
|
+
r2 = Math.max(r2, a2);
|
|
3148
3488
|
}
|
|
3149
3489
|
}
|
|
3150
|
-
return
|
|
3490
|
+
return r2;
|
|
3151
3491
|
}
|
|
3152
3492
|
parseMatrixAnswer(e3) {
|
|
3153
3493
|
if (!e3 || !e3.value) return [];
|
|
@@ -3160,25 +3500,25 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3160
3500
|
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 : [];
|
|
3161
3501
|
}
|
|
3162
3502
|
evaluateMatrixCondition(e3, t3) {
|
|
3163
|
-
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value],
|
|
3164
|
-
if (!o.length) return false;
|
|
3165
|
-
const a = n2.size > 0 ? o.filter(((e4) => n2.has(e4.key))) : o;
|
|
3503
|
+
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value], r2 = new Set(e3.option || []), n2 = t3[0], a = this.parseMatrixAnswer(n2);
|
|
3166
3504
|
if (!a.length) return false;
|
|
3505
|
+
const s = r2.size > 0 ? a.filter(((e4) => r2.has(e4.key))) : a;
|
|
3506
|
+
if (!s.length) return false;
|
|
3167
3507
|
switch (e3.typeOperator) {
|
|
3168
|
-
case
|
|
3169
|
-
case
|
|
3170
|
-
return
|
|
3171
|
-
case
|
|
3172
|
-
case
|
|
3173
|
-
return
|
|
3174
|
-
case
|
|
3175
|
-
return
|
|
3176
|
-
case
|
|
3177
|
-
return
|
|
3178
|
-
case
|
|
3179
|
-
return
|
|
3180
|
-
case
|
|
3181
|
-
return
|
|
3508
|
+
case o.OperatorType.EQUAL:
|
|
3509
|
+
case o.OperatorType.INQ:
|
|
3510
|
+
return s.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => i2.includes(e5)))));
|
|
3511
|
+
case o.OperatorType.NOEQUAL:
|
|
3512
|
+
case o.OperatorType.NINQ:
|
|
3513
|
+
return s.every(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).every(((e5) => !i2.includes(e5)))));
|
|
3514
|
+
case o.OperatorType.GREATER:
|
|
3515
|
+
return s.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => i2.some(((t4) => Number(e5) > Number(t4)))))));
|
|
3516
|
+
case o.OperatorType.LESS:
|
|
3517
|
+
return s.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => i2.some(((t4) => Number(e5) < Number(t4)))))));
|
|
3518
|
+
case o.OperatorType.GREATEREQUAL:
|
|
3519
|
+
return s.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => i2.some(((t4) => Number(e5) >= Number(t4)))))));
|
|
3520
|
+
case o.OperatorType.LESSEQUAL:
|
|
3521
|
+
return s.some(((e4) => (Array.isArray(e4.value) ? e4.value : [e4.value]).some(((e5) => i2.some(((t4) => Number(e5) <= Number(t4)))))));
|
|
3182
3522
|
default:
|
|
3183
3523
|
return false;
|
|
3184
3524
|
}
|
|
@@ -3187,8 +3527,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3187
3527
|
}, 636: (e2, t2) => {
|
|
3188
3528
|
"use strict";
|
|
3189
3529
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.PageNode = void 0, t2.PageNode = class {
|
|
3190
|
-
constructor(e3, t3, i,
|
|
3191
|
-
this.answers = [], this.id = e3, this.position = t3, this.edges = i, this.data =
|
|
3530
|
+
constructor(e3, t3, i, r, n, o = false) {
|
|
3531
|
+
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;
|
|
3192
3532
|
}
|
|
3193
3533
|
getFollowupQuestions() {
|
|
3194
3534
|
return this.questions.filter(((e3) => e3.followup)).map(((e3) => e3.ref));
|
|
@@ -3202,248 +3542,221 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3202
3542
|
};
|
|
3203
3543
|
}, 591: (e2, t2) => {
|
|
3204
3544
|
"use strict";
|
|
3205
|
-
var i,
|
|
3206
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.PageRoute = t2.StatusType = t2.OperatorType = t2.ConditionType = t2.TransitionType = void 0, (
|
|
3545
|
+
var i, r, n, o;
|
|
3546
|
+
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) {
|
|
3207
3547
|
e3.LOGICAL = "LOGICAL", e3.DIRECT = "DIRECT", e3.PRECONDITIONAL = "PRECONDITIONAL";
|
|
3208
|
-
})(i = t2.ConditionType || (t2.ConditionType = {})), (
|
|
3548
|
+
})(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) {
|
|
3209
3549
|
e3.ACTIVE = "ACTIVE", e3.DEPRECATED = "DEPRECATED", e3.DELETE = "DELETE";
|
|
3210
|
-
})(
|
|
3211
|
-
constructor(e3, t3,
|
|
3212
|
-
this.id = e3, this.questionRef = t3, this.typeCondition = d || i.LOGICAL, this.typeOperator =
|
|
3550
|
+
})(r = t2.StatusType || (t2.StatusType = {})), t2.PageRoute = class {
|
|
3551
|
+
constructor(e3, t3, n2, o2, a, s, l, d, c, u) {
|
|
3552
|
+
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 || [];
|
|
3213
3553
|
}
|
|
3214
3554
|
};
|
|
3215
3555
|
}, 558: (e2, t2) => {
|
|
3216
3556
|
"use strict";
|
|
3217
|
-
var i,
|
|
3218
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.AGENT_ANSWER_TYPE_BLOCKED = t2.QuestionType = t2.FEEDBACKAPPANSWERTYPE = void 0, (
|
|
3557
|
+
var i, r;
|
|
3558
|
+
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 {
|
|
3219
3559
|
}, t2.AGENT_ANSWER_TYPE_BLOCKED = "ABUSIVE_OR_OFFENSIVE", (function(e3) {
|
|
3220
3560
|
e3.FORM = "form", e3.DIV = "div";
|
|
3221
3561
|
})(i || (i = {}));
|
|
3222
|
-
}, 565: (e2, t2) => {
|
|
3562
|
+
}, 565: (e2, t2, i) => {
|
|
3223
3563
|
"use strict";
|
|
3224
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3564
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.applyDirection = t2.applyPrimaryColor = t2.generateContainer = void 0;
|
|
3565
|
+
const r = i(881);
|
|
3566
|
+
t2.generateContainer = function(e3, t3) {
|
|
3567
|
+
let i2 = document.getElementById(e3);
|
|
3568
|
+
if (!i2 && (i2 = document.getElementById("magicfeedback-container-" + t3), !i2)) throw new Error(`Element with ID '${e3}' not found.`);
|
|
3569
|
+
return i2.classList.add("magicfeedback-container"), i2.id = "magicfeedback-container-" + t3, i2.innerHTML = "", i2;
|
|
3228
3570
|
}, t2.applyPrimaryColor = function(e3, t3) {
|
|
3229
3571
|
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);
|
|
3572
|
+
}, t2.applyDirection = function(e3, t3) {
|
|
3573
|
+
const i2 = (0, r.isRtlLanguage)(t3);
|
|
3574
|
+
e3.setAttribute("dir", i2 ? "rtl" : "ltr"), e3.classList.toggle("magicfeedback-rtl", i2);
|
|
3230
3575
|
};
|
|
3231
|
-
}, 516: (e2, t2) => {
|
|
3576
|
+
}, 516: (e2, t2, i) => {
|
|
3232
3577
|
"use strict";
|
|
3233
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.getUrlParam = t2.getBooleanOptions = t2.parseTitle = void 0
|
|
3578
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.getUrlParam = t2.getBooleanOptions = t2.parseTitle = void 0;
|
|
3579
|
+
const r = i(881);
|
|
3580
|
+
t2.parseTitle = function(e3, t3) {
|
|
3234
3581
|
return e3 ? "object" == typeof e3 ? e3[t3] || e3.en : e3 : "";
|
|
3235
3582
|
}, t2.getBooleanOptions = function(e3) {
|
|
3236
|
-
|
|
3237
|
-
case "es":
|
|
3238
|
-
return ["S\xED", "No"];
|
|
3239
|
-
case "fr":
|
|
3240
|
-
return ["Oui", "Non"];
|
|
3241
|
-
case "de":
|
|
3242
|
-
return ["Ja", "Nein"];
|
|
3243
|
-
case "it":
|
|
3244
|
-
return ["S\xEC", "No"];
|
|
3245
|
-
case "pt":
|
|
3246
|
-
return ["Sim", "N\xE3o"];
|
|
3247
|
-
case "nl":
|
|
3248
|
-
return ["Ja", "Nee"];
|
|
3249
|
-
case "pl":
|
|
3250
|
-
return ["Tak", "Nie"];
|
|
3251
|
-
case "ru":
|
|
3252
|
-
return ["\u0414\u0430", "\u041D\u0435\u0442"];
|
|
3253
|
-
case "ja":
|
|
3254
|
-
return ["\u306F\u3044", "\u3044\u3044\u3048"];
|
|
3255
|
-
case "zh":
|
|
3256
|
-
return ["\u662F", "\u4E0D"];
|
|
3257
|
-
case "ko":
|
|
3258
|
-
return ["\uC608", "\uC544\uB2C8"];
|
|
3259
|
-
case "da":
|
|
3260
|
-
case "sv":
|
|
3261
|
-
return ["Ja", "Nej"];
|
|
3262
|
-
case "fi":
|
|
3263
|
-
return ["Kyll\xE4", "Ei"];
|
|
3264
|
-
case "no":
|
|
3265
|
-
return ["Ja", "Nei"];
|
|
3266
|
-
case "ar":
|
|
3267
|
-
return ["\u0646\u0639\u0645", "\u0644\u0627"];
|
|
3268
|
-
case "bn":
|
|
3269
|
-
return ["\u09B9\u09CD\u09AF\u09BE\u0981", "\u09A8\u09BE"];
|
|
3270
|
-
default:
|
|
3271
|
-
return ["Yes", "No"];
|
|
3272
|
-
}
|
|
3583
|
+
return [(0, r.t)(e3, "boolean.yes"), (0, r.t)(e3, "boolean.no")];
|
|
3273
3584
|
}, t2.getUrlParam = function(e3) {
|
|
3274
3585
|
return new URLSearchParams(window.location.search).get(e3);
|
|
3275
3586
|
};
|
|
3276
|
-
}, 559: (e2, t2) => {
|
|
3587
|
+
}, 559: (e2, t2, i) => {
|
|
3277
3588
|
"use strict";
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
const
|
|
3282
|
-
|
|
3283
|
-
const
|
|
3284
|
-
|
|
3589
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.createRatingNumberElement = t2.createStarRating = t2.createRatingPlaceholder = void 0;
|
|
3590
|
+
const r = i(881);
|
|
3591
|
+
function n(e3, t3, i2 = "ltr") {
|
|
3592
|
+
const r2 = document.createElement("div");
|
|
3593
|
+
r2.classList.add("magicfeedback-rating-placeholder");
|
|
3594
|
+
const n2 = document.createElement("span");
|
|
3595
|
+
n2.textContent = null != e3 ? e3 : "", n2.classList.add("magicfeedback-rating-placeholder-value");
|
|
3596
|
+
const o = document.createElement("span");
|
|
3597
|
+
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;
|
|
3285
3598
|
}
|
|
3286
|
-
|
|
3287
|
-
},
|
|
3288
|
-
const
|
|
3289
|
-
|
|
3599
|
+
t2.createRatingPlaceholder = n, t2.createStarRating = function(e3, t3, i2, r2 = () => {
|
|
3600
|
+
}, o) {
|
|
3601
|
+
const a = "magicfeedback-rating-star-selected", s = document.createElement("div");
|
|
3602
|
+
s.classList.add("magicfeedback-rating-star-container"), s.style.maxWidth = "300px", s.style.margin = "auto", s.dataset.originalSelection = "0";
|
|
3290
3603
|
for (let t4 = 1; t4 <= 5; t4++) {
|
|
3291
|
-
const
|
|
3292
|
-
|
|
3604
|
+
const i3 = document.createElement("label");
|
|
3605
|
+
i3.classList.add("magicfeedback-rating-star-option");
|
|
3293
3606
|
const n2 = document.createElement("input");
|
|
3294
|
-
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"),
|
|
3295
|
-
const e4 =
|
|
3296
|
-
for (let t5 = 0; t5 < e4.length; t5++) t5 + 1 <= Number(n2.value) ? e4[t5].classList.contains(
|
|
3297
|
-
|
|
3298
|
-
})),
|
|
3607
|
+
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", (() => {
|
|
3608
|
+
const e4 = s.querySelectorAll(".rating__star");
|
|
3609
|
+
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);
|
|
3610
|
+
s.dataset.originalSelection = n2.value, r2 && r2();
|
|
3611
|
+
})), i3.appendChild(n2);
|
|
3299
3612
|
const l2 = document.createElement("label");
|
|
3300
3613
|
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", (() => {
|
|
3301
|
-
const e4 =
|
|
3614
|
+
const e4 = s.querySelectorAll(".rating__star"), i4 = t4 - 1;
|
|
3302
3615
|
e4.forEach(((e5, t5) => {
|
|
3303
|
-
t5 <=
|
|
3616
|
+
t5 <= i4 ? e5.classList.contains(a) || e5.classList.add(a) : e5.classList.contains(a) && e5.classList.remove(a);
|
|
3304
3617
|
}));
|
|
3305
3618
|
})), l2.addEventListener("mouseleave", (() => {
|
|
3306
|
-
const e4 = Number(
|
|
3307
|
-
|
|
3308
|
-
|
|
3619
|
+
const e4 = Number(s.dataset.originalSelection || "0");
|
|
3620
|
+
s.querySelectorAll(".rating__star").forEach(((t5, i4) => {
|
|
3621
|
+
i4 < e4 ? t5.classList.contains(a) || t5.classList.add(a) : t5.classList.contains(a) && t5.classList.remove(a);
|
|
3309
3622
|
}));
|
|
3310
|
-
})),
|
|
3623
|
+
})), i3.appendChild(l2), s.appendChild(i3);
|
|
3311
3624
|
}
|
|
3312
|
-
const l =
|
|
3313
|
-
return l.childElementCount > 0 &&
|
|
3314
|
-
}, t2.createRatingNumberElement = function(e3, t3, i2,
|
|
3315
|
-
var
|
|
3316
|
-
const
|
|
3317
|
-
|
|
3318
|
-
const
|
|
3319
|
-
|
|
3320
|
-
const
|
|
3321
|
-
!
|
|
3322
|
-
const
|
|
3323
|
-
let
|
|
3324
|
-
if (!
|
|
3325
|
-
|
|
3625
|
+
const l = n(t3, i2);
|
|
3626
|
+
return l.childElementCount > 0 && s.appendChild(l), s;
|
|
3627
|
+
}, t2.createRatingNumberElement = function(e3, t3, i2, n2, o, a, s, l) {
|
|
3628
|
+
var d, c;
|
|
3629
|
+
const u = document.createElement("div");
|
|
3630
|
+
u.classList.add("magicfeedback-rating-number");
|
|
3631
|
+
const p = "column" === n2, m = "ltr" === i2 ? n2 : `${n2}-reverse`, h = document.createElement("div");
|
|
3632
|
+
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"));
|
|
3633
|
+
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;
|
|
3634
|
+
!p && f - g + 1 > 6 && h.classList.add("magicfeedback-rating-number-container-row--dense");
|
|
3635
|
+
const y = (null == t3 ? void 0 : t3.numberPlaceholders) || null, v = !(!y || !Object.keys(y).length);
|
|
3636
|
+
let b = null;
|
|
3637
|
+
if (!p && ((null == t3 ? void 0 : t3.minPlaceholder) || (null == t3 ? void 0 : t3.maxPlaceholder))) {
|
|
3638
|
+
b = document.createElement("div"), b.classList.add("magicfeedback-rating-number-scale-labels");
|
|
3326
3639
|
const e4 = document.createElement("span");
|
|
3327
|
-
e4.classList.add("magicfeedback-rating-number-scale-label"), e4.textContent = null !== (
|
|
3328
|
-
const
|
|
3329
|
-
|
|
3640
|
+
e4.classList.add("magicfeedback-rating-number-scale-label"), e4.textContent = null !== (d = null == t3 ? void 0 : t3.minPlaceholder) && void 0 !== d ? d : "";
|
|
3641
|
+
const r2 = document.createElement("span");
|
|
3642
|
+
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));
|
|
3330
3643
|
}
|
|
3331
|
-
let
|
|
3332
|
-
if (
|
|
3333
|
-
const e4 = "ltr" === i2 ? null == t3 ? void 0 : t3.minPlaceholder : null == t3 ? void 0 : t3.maxPlaceholder,
|
|
3644
|
+
let E = null;
|
|
3645
|
+
if (p && !v && (h.classList.add("magicfeedback-rating-number-container-column--bare"), (null == t3 ? void 0 : t3.minPlaceholder) || (null == t3 ? void 0 : t3.maxPlaceholder))) {
|
|
3646
|
+
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;
|
|
3334
3647
|
if (e4) {
|
|
3335
3648
|
const t4 = document.createElement("div");
|
|
3336
|
-
t4.classList.add("magicfeedback-rating-number-scale-label-block"), t4.textContent = e4,
|
|
3649
|
+
t4.classList.add("magicfeedback-rating-number-scale-label-block"), t4.textContent = e4, u.appendChild(t4);
|
|
3337
3650
|
}
|
|
3338
|
-
|
|
3651
|
+
r2 && (E = document.createElement("div"), E.classList.add("magicfeedback-rating-number-scale-label-block"), E.textContent = r2);
|
|
3339
3652
|
}
|
|
3340
|
-
for (let i3 =
|
|
3341
|
-
const
|
|
3342
|
-
|
|
3653
|
+
for (let i3 = g; i3 <= f; i3++) {
|
|
3654
|
+
const r2 = document.createElement("div");
|
|
3655
|
+
r2.classList.add("magicfeedback-rating-number-option"), r2.classList.add(`magicfeedback-rating-number-option-${n2}`);
|
|
3343
3656
|
const l2 = document.createElement("label");
|
|
3344
3657
|
l2.htmlFor = `rating-${e3}-${i3}`, l2.classList.add("magicfeedback-rating-number-option-label-container");
|
|
3345
|
-
const d2 =
|
|
3346
|
-
|
|
3347
|
-
const
|
|
3348
|
-
|
|
3349
|
-
const
|
|
3350
|
-
if (
|
|
3658
|
+
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");
|
|
3659
|
+
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);
|
|
3660
|
+
const u2 = document.createElement("span");
|
|
3661
|
+
u2.classList.add("magicfeedback-rating-number-value");
|
|
3662
|
+
const m2 = document.createElement("span");
|
|
3663
|
+
if (m2.textContent = i3.toString(), m2.classList.add("magicfeedback-rating-number-value-num"), u2.appendChild(m2), p) {
|
|
3351
3664
|
if (d2) {
|
|
3352
3665
|
const e4 = document.createElement("span");
|
|
3353
|
-
e4.textContent = d2, e4.classList.add("magicfeedback-rating-number-value-label"),
|
|
3666
|
+
e4.textContent = d2, e4.classList.add("magicfeedback-rating-number-value-label"), u2.appendChild(e4);
|
|
3354
3667
|
}
|
|
3355
|
-
} else
|
|
3356
|
-
l2.appendChild(
|
|
3668
|
+
} else y && y[i3] && (l2.title = y[i3]);
|
|
3669
|
+
l2.appendChild(u2), r2.appendChild(l2), h.appendChild(r2);
|
|
3357
3670
|
}
|
|
3358
|
-
if (
|
|
3671
|
+
if (u.appendChild(h), b && u.appendChild(b), E && u.appendChild(E), (null == t3 ? void 0 : t3.extraOption) && (null == t3 ? void 0 : t3.extraOptionText)) {
|
|
3359
3672
|
const i3 = document.createElement("div");
|
|
3360
3673
|
i3.classList.add("magicfeedback-rating-number-extra-row");
|
|
3361
|
-
const
|
|
3362
|
-
|
|
3363
|
-
const
|
|
3364
|
-
|
|
3365
|
-
const
|
|
3366
|
-
|
|
3674
|
+
const r2 = document.createElement("div");
|
|
3675
|
+
r2.classList.add("magicfeedback-rating-number-option"), r2.classList.add("magicfeedback-rating-number-option--extra");
|
|
3676
|
+
const n3 = document.createElement("label");
|
|
3677
|
+
n3.htmlFor = `rating-${e3}-extra`, n3.classList.add("magicfeedback-rating-number-option-label-container");
|
|
3678
|
+
const s2 = document.createElement("input");
|
|
3679
|
+
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()));
|
|
3367
3680
|
const l2 = document.createElement("span");
|
|
3368
3681
|
l2.classList.add("magicfeedback-rating-number-value");
|
|
3369
|
-
const
|
|
3370
|
-
|
|
3682
|
+
const d2 = document.createElement("span");
|
|
3683
|
+
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);
|
|
3371
3684
|
}
|
|
3372
|
-
return
|
|
3685
|
+
return u;
|
|
3373
3686
|
};
|
|
3374
3687
|
}, 42: (e2, t2, i) => {
|
|
3375
3688
|
"use strict";
|
|
3376
3689
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.getQuestionRenderer = void 0;
|
|
3377
|
-
const
|
|
3690
|
+
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]]);
|
|
3378
3691
|
t2.getQuestionRenderer = function(e3) {
|
|
3379
|
-
return
|
|
3692
|
+
return C.get(e3);
|
|
3380
3693
|
};
|
|
3381
3694
|
}, 65: (e2, t2, i) => {
|
|
3382
3695
|
"use strict";
|
|
3383
3696
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderBoolean = void 0;
|
|
3384
|
-
const
|
|
3385
|
-
t2.renderBoolean = ({ question: e3, language: t3, urlParamValue: i2, send:
|
|
3386
|
-
const { ref:
|
|
3387
|
-
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 ==
|
|
3388
|
-
const
|
|
3389
|
-
|
|
3390
|
-
const
|
|
3391
|
-
|
|
3392
|
-
const
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
})), i2 && i2.toLowerCase() ===
|
|
3396
|
-
})),
|
|
3697
|
+
const r = i(516);
|
|
3698
|
+
t2.renderBoolean = ({ question: e3, language: t3, urlParamValue: i2, send: n }) => {
|
|
3699
|
+
const { ref: o, assets: a } = e3, s = document.createElement("div"), l = "magicfeedback-radio", d = document.createElement("div");
|
|
3700
|
+
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) => {
|
|
3701
|
+
const r2 = document.createElement("label");
|
|
3702
|
+
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";
|
|
3703
|
+
const a2 = document.createElement("label");
|
|
3704
|
+
a2.htmlFor = `rating-${o}-${t4}`, a2.textContent = e4, a2.style.margin = "0", a2.style.padding = "0";
|
|
3705
|
+
const s2 = document.createElement("input");
|
|
3706
|
+
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", (() => {
|
|
3707
|
+
n && n();
|
|
3708
|
+
})), i2 && i2.toLowerCase() === s2.value.toLowerCase() && (s2.checked = true), r2.appendChild(s2), r2.appendChild(a2), d.appendChild(r2);
|
|
3709
|
+
})), s.appendChild(d), { element: s, elementTypeClass: l };
|
|
3397
3710
|
};
|
|
3398
3711
|
}, 998: (e2, t2, i) => {
|
|
3399
3712
|
"use strict";
|
|
3400
3713
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderChoice = void 0;
|
|
3401
|
-
const
|
|
3402
|
-
t2.renderChoice = ({ question: e3, language: t3, urlParamValue: i2, randomPosition:
|
|
3403
|
-
const { type:
|
|
3404
|
-
let
|
|
3405
|
-
|
|
3714
|
+
const r = i(558), n = i(784);
|
|
3715
|
+
t2.renderChoice = ({ question: e3, language: t3, urlParamValue: i2, randomPosition: o, send: a }) => {
|
|
3716
|
+
const { type: s, ref: l, value: d, defaultValue: c, assets: u } = e3, p = document.createElement("div"), m = "magicfeedback-" + ("MULTIPLECHOICE" === s ? "checkbox" : "radio");
|
|
3717
|
+
let h = d || [];
|
|
3718
|
+
o && (h = h.sort((() => Math.random() - 0.5)));
|
|
3406
3719
|
let f = (null == u ? void 0 : u.exclusiveAnswers) || [];
|
|
3407
3720
|
(null == u ? void 0 : u.extraOption) && (f = f.filter(((e4) => e4 !== u.extraOptionText))), f.length > 0 && (null == f || f.forEach(((e4) => {
|
|
3408
|
-
|
|
3721
|
+
h.includes(e4) || h.push(e4);
|
|
3409
3722
|
})));
|
|
3410
3723
|
const g = null == u ? void 0 : u.extraOptionText;
|
|
3411
|
-
return (null == u ? void 0 : u.extraOption) && g && !
|
|
3724
|
+
return (null == u ? void 0 : u.extraOption) && g && !h.includes(g) && h.push(g), h.forEach(((e4, o2) => {
|
|
3412
3725
|
const d2 = document.createElement("div");
|
|
3413
|
-
d2.classList.add(`magicfeedback-${"MULTIPLECHOICE" ===
|
|
3414
|
-
const g2 = document.createElement("label"),
|
|
3415
|
-
if (
|
|
3416
|
-
document.querySelectorAll(`input[name="${l}"]:checked`).length > (null == u ? void 0 : u.maxOptions) && (
|
|
3417
|
-
})),
|
|
3418
|
-
|
|
3419
|
-
})), e4 !== c && e4 !== i2 || (
|
|
3726
|
+
d2.classList.add(`magicfeedback-${"MULTIPLECHOICE" === s ? "checkbox" : "radio"}-container`);
|
|
3727
|
+
const g2 = document.createElement("label"), y = document.createElement("input");
|
|
3728
|
+
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", (() => {
|
|
3729
|
+
document.querySelectorAll(`input[name="${l}"]:checked`).length > (null == u ? void 0 : u.maxOptions) && (y.checked = false);
|
|
3730
|
+
})), 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", (() => {
|
|
3731
|
+
a();
|
|
3732
|
+
})), e4 !== c && e4 !== i2 || (y.checked = true), g2.textContent = e4, g2.htmlFor = `rating-${l}-${o2}`, y.addEventListener("change", ((t4) => {
|
|
3420
3733
|
const i3 = document.getElementById(`extra-option-${l}`);
|
|
3421
|
-
t4.target.checked && f.includes(e4) ? (
|
|
3734
|
+
t4.target.checked && f.includes(e4) ? (h.forEach(((t5) => {
|
|
3422
3735
|
t5 !== e4 && (document.querySelector(`input[value="${t5}"]`).checked = false);
|
|
3423
3736
|
})), i3 && (i3.style.display = "none")) : f.forEach(((t5) => {
|
|
3424
3737
|
t5 !== e4 && (document.querySelector(`input[value="${t5}"]`).checked = false);
|
|
3425
3738
|
})), (null == u ? void 0 : u.extraOption) && e4 === (null == u ? void 0 : u.extraOptionText) && i3 && (i3.style.display = t4.target.checked ? "block" : "none");
|
|
3426
|
-
})), d2.appendChild(
|
|
3739
|
+
})), d2.appendChild(y), d2.appendChild(g2), p.appendChild(d2), (null == u ? void 0 : u.extraOption) && e4 === (null == u ? void 0 : u.extraOptionText)) {
|
|
3427
3740
|
const e5 = document.createElement("input");
|
|
3428
|
-
e5.type = "text", e5.placeholder = (null == u ? void 0 : u.extraOptionPlaceholder) ||
|
|
3741
|
+
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);
|
|
3429
3742
|
}
|
|
3430
|
-
})), { element: p, elementTypeClass:
|
|
3743
|
+
})), { element: p, elementTypeClass: m };
|
|
3431
3744
|
};
|
|
3432
3745
|
}, 991: (e2, t2) => {
|
|
3433
3746
|
"use strict";
|
|
3434
3747
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderConsent = void 0, t2.renderConsent = ({ question: e3, urlParamValue: t3, send: i }) => {
|
|
3435
|
-
const { id:
|
|
3436
|
-
return
|
|
3748
|
+
const { id: r, ref: n, value: o, require: a } = e3, s = document.createElement("input");
|
|
3749
|
+
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", (() => {
|
|
3437
3750
|
i();
|
|
3438
|
-
})), { element:
|
|
3751
|
+
})), { element: s, elementTypeClass: "magicfeedback-consent" };
|
|
3439
3752
|
};
|
|
3440
3753
|
}, 817: (e2, t2, i) => {
|
|
3441
3754
|
"use strict";
|
|
3442
3755
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderDate = void 0;
|
|
3443
|
-
const
|
|
3756
|
+
const r = i(784);
|
|
3444
3757
|
t2.renderDate = ({ language: e3, placeholderText: t3, urlParamValue: i2 }) => {
|
|
3445
|
-
const
|
|
3446
|
-
return
|
|
3758
|
+
const n = document.createElement("input");
|
|
3759
|
+
return n.type = "date", n.placeholder = t3 || r.placeholder.date(e3 || "en"), i2 && (n.value = i2), { element: n, elementTypeClass: "magicfeedback-date" };
|
|
3447
3760
|
};
|
|
3448
3761
|
}, 965: (e2, t2) => {
|
|
3449
3762
|
"use strict";
|
|
@@ -3454,76 +3767,76 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3454
3767
|
}, 282: (e2, t2) => {
|
|
3455
3768
|
"use strict";
|
|
3456
3769
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderInfoPage = void 0, t2.renderInfoPage = ({ question: e3, placeholderText: t3 }) => {
|
|
3457
|
-
var i,
|
|
3458
|
-
const
|
|
3459
|
-
if ("string" == typeof (null === (i = e3.assets) || void 0 === i ? void 0 : i.placeholder) ? "" !== e3.assets.placeholder.trim() : Boolean(null === (
|
|
3770
|
+
var i, r;
|
|
3771
|
+
const n = document.createElement("div");
|
|
3772
|
+
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)) {
|
|
3460
3773
|
const e4 = document.createElement("div");
|
|
3461
|
-
e4.classList.add("magicfeedback-info-message"), e4.innerHTML = t3 || "",
|
|
3774
|
+
e4.classList.add("magicfeedback-info-message"), e4.innerHTML = t3 || "", n.appendChild(e4);
|
|
3462
3775
|
}
|
|
3463
|
-
return { element:
|
|
3776
|
+
return { element: n, elementTypeClass: "magicfeedback-info-page" };
|
|
3464
3777
|
};
|
|
3465
3778
|
}, 72: (e2, t2, i) => {
|
|
3466
3779
|
"use strict";
|
|
3467
3780
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderLongText = void 0;
|
|
3468
|
-
const
|
|
3469
|
-
t2.renderLongText = ({ language: e3, placeholderText: t3, urlParamValue: i2, maxCharacters:
|
|
3470
|
-
const
|
|
3471
|
-
return
|
|
3781
|
+
const r = i(784);
|
|
3782
|
+
t2.renderLongText = ({ language: e3, placeholderText: t3, urlParamValue: i2, maxCharacters: n }) => {
|
|
3783
|
+
const o = document.createElement("textarea");
|
|
3784
|
+
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" };
|
|
3472
3785
|
};
|
|
3473
3786
|
}, 644: (e2, t2) => {
|
|
3474
3787
|
"use strict";
|
|
3475
3788
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMatrix = void 0, t2.renderMatrix = ({ question: e3, isPhone: t3, randomPosition: i }) => {
|
|
3476
|
-
const { ref:
|
|
3477
|
-
|
|
3478
|
-
let l = (null ==
|
|
3479
|
-
if (i && (l = null == l ? void 0 : l.sort((() => Math.random() - 0.5)), d = [...d].sort((() => Math.random() - 0.5))), (null ==
|
|
3789
|
+
const { ref: r, value: n, assets: o } = e3, a = document.createElement("div"), s = document.createElement("div");
|
|
3790
|
+
s.classList.add("magicfeedback-multi-question-matrix-container");
|
|
3791
|
+
let l = (null == o ? void 0 : o.options) || [], d = [...n], c = [];
|
|
3792
|
+
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) => {
|
|
3480
3793
|
d.includes(e4) || d.push(e4);
|
|
3481
3794
|
}))), t3) {
|
|
3482
3795
|
const e4 = document.createElement("div");
|
|
3483
3796
|
e4.classList.add("magicfeedback-multi-question-matrix-list"), null == l || l.forEach(((t4) => {
|
|
3484
3797
|
const i2 = document.createElement("div");
|
|
3485
3798
|
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";
|
|
3486
|
-
const
|
|
3487
|
-
|
|
3488
|
-
const
|
|
3489
|
-
|
|
3490
|
-
const
|
|
3491
|
-
|
|
3799
|
+
const n2 = document.createElement("label");
|
|
3800
|
+
n2.classList.add("magicfeedback-multi-question-matrix-label"), n2.style.paddingBottom = "10px", n2.textContent = t4, i2.appendChild(n2), d.forEach(((e5) => {
|
|
3801
|
+
const n3 = document.createElement("div");
|
|
3802
|
+
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";
|
|
3803
|
+
const o2 = document.createElement("label"), a2 = document.createElement("input");
|
|
3804
|
+
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);
|
|
3492
3805
|
})), e4.appendChild(i2);
|
|
3493
|
-
})),
|
|
3806
|
+
})), s.appendChild(e4);
|
|
3494
3807
|
} else {
|
|
3495
3808
|
const e4 = document.createElement("table");
|
|
3496
3809
|
e4.classList.add("magicfeedback-multi-question-matrix-table");
|
|
3497
3810
|
const t4 = document.createElement("thead");
|
|
3498
3811
|
t4.classList.add("magicfeedback-multi-question-matrix-header"), t4.style.paddingBottom = "15px";
|
|
3499
|
-
const i2 = document.createElement("tr"),
|
|
3500
|
-
i2.appendChild(
|
|
3812
|
+
const i2 = document.createElement("tr"), n2 = document.createElement("th");
|
|
3813
|
+
i2.appendChild(n2), d.forEach(((e5) => {
|
|
3501
3814
|
const t5 = document.createElement("th");
|
|
3502
3815
|
t5.textContent = e5, i2.appendChild(t5);
|
|
3503
3816
|
})), t4.appendChild(i2), e4.appendChild(t4);
|
|
3504
|
-
const
|
|
3817
|
+
const o2 = document.createElement("tbody");
|
|
3505
3818
|
null == l || l.forEach(((e5) => {
|
|
3506
3819
|
const t5 = document.createElement("tr");
|
|
3507
3820
|
t5.classList.add("magicfeedback-multi-question-matrix-row-tr");
|
|
3508
3821
|
const i3 = document.createElement("td");
|
|
3509
3822
|
i3.style.minWidth = "200px", i3.style.padding = "10px";
|
|
3510
|
-
const
|
|
3511
|
-
|
|
3512
|
-
const
|
|
3513
|
-
|
|
3514
|
-
})),
|
|
3515
|
-
})), e4.appendChild(
|
|
3823
|
+
const n3 = document.createElement("label");
|
|
3824
|
+
n3.classList.add("magicfeedback-multi-question-matrix-label"), n3.textContent = e5, i3.appendChild(n3), t5.appendChild(i3), d.forEach(((i4) => {
|
|
3825
|
+
const n4 = document.createElement("td"), o3 = document.createElement("input");
|
|
3826
|
+
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);
|
|
3827
|
+
})), o2.appendChild(t5);
|
|
3828
|
+
})), e4.appendChild(o2), s.appendChild(e4);
|
|
3516
3829
|
}
|
|
3517
|
-
return
|
|
3830
|
+
return a.appendChild(s), { element: a, elementTypeClass: "magicfeedback-multi-question-matrix" };
|
|
3518
3831
|
};
|
|
3519
3832
|
}, 409: (e2, t2) => {
|
|
3520
3833
|
"use strict";
|
|
3521
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMultipleChoiceImage = void 0, t2.renderMultipleChoiceImage = ({ question: e3, randomPosition: t3, urlParamValue: i, send:
|
|
3522
|
-
const
|
|
3523
|
-
let
|
|
3834
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMultipleChoiceImage = void 0, t2.renderMultipleChoiceImage = ({ question: e3, randomPosition: t3, urlParamValue: i, send: r }) => {
|
|
3835
|
+
const n = document.createElement("div"), { ref: o, assets: a } = e3;
|
|
3836
|
+
let s = [...e3.value];
|
|
3524
3837
|
const l = document.createElement("div");
|
|
3525
3838
|
l.classList.add("magicfeedback-multiple-choice-image-container"), l.style.display = "flex", l.style.flexDirection = "row", l.style.flexWrap = "wrap", l.style.justifyContent = "center";
|
|
3526
|
-
const d =
|
|
3839
|
+
const d = s.length;
|
|
3527
3840
|
let c = 1, u = 1;
|
|
3528
3841
|
if (window.innerWidth < 600) c = 1, u = d;
|
|
3529
3842
|
else switch (d) {
|
|
@@ -3545,389 +3858,390 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3545
3858
|
default:
|
|
3546
3859
|
u = 4, c = Math.ceil(d / u);
|
|
3547
3860
|
}
|
|
3548
|
-
const p = void 0 !== (null ==
|
|
3861
|
+
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);
|
|
3549
3862
|
function f(e4) {
|
|
3550
3863
|
try {
|
|
3551
|
-
const { position: t4, url:
|
|
3552
|
-
|
|
3864
|
+
const { position: t4, url: n2, value: a2 } = e4, s2 = document.createElement("div");
|
|
3865
|
+
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";
|
|
3553
3866
|
const d2 = document.createElement("label");
|
|
3554
|
-
d2.classList.add("magicfeedback-image-option-label-container"), d2.htmlFor = `rating-${
|
|
3867
|
+
d2.classList.add("magicfeedback-image-option-label-container"), d2.htmlFor = `rating-${o}-${t4}`, d2.style.cursor = "pointer", d2.addEventListener("click", (() => {
|
|
3555
3868
|
d2.style.border = "2px solid #000";
|
|
3556
3869
|
}));
|
|
3557
|
-
const
|
|
3558
|
-
|
|
3870
|
+
const h2 = document.createElement("label");
|
|
3871
|
+
h2.textContent = a2, h2.classList.add("magicfeedback-multiple-choice-image-label");
|
|
3559
3872
|
const f2 = document.createElement("input");
|
|
3560
|
-
f2.id = `rating-${
|
|
3561
|
-
|
|
3873
|
+
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", (() => {
|
|
3874
|
+
r();
|
|
3562
3875
|
}));
|
|
3563
3876
|
const g = document.createElement("img");
|
|
3564
|
-
g.classList.add("magicfeedback-multiple-choice-image-image"), g.src =
|
|
3877
|
+
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);
|
|
3565
3878
|
} catch (e5) {
|
|
3566
3879
|
console.error(e5);
|
|
3567
3880
|
}
|
|
3568
3881
|
}
|
|
3569
|
-
return t3 && (
|
|
3882
|
+
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" };
|
|
3570
3883
|
};
|
|
3571
3884
|
}, 732: (e2, t2, i) => {
|
|
3572
3885
|
"use strict";
|
|
3573
3886
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderNumber = void 0;
|
|
3574
|
-
const
|
|
3575
|
-
t2.renderNumber = ({ question: e3, format: t3, language: i2, urlParamValue:
|
|
3576
|
-
const
|
|
3577
|
-
|
|
3578
|
-
const { value:
|
|
3579
|
-
return
|
|
3887
|
+
const r = i(784), n = i(516);
|
|
3888
|
+
t2.renderNumber = ({ question: e3, format: t3, language: i2, urlParamValue: o }) => {
|
|
3889
|
+
const a = document.createElement("input");
|
|
3890
|
+
a.type = "number", a.placeholder = "slim" === t3 ? (0, n.parseTitle)(e3.title, i2) : r.placeholder.number(i2 || "en");
|
|
3891
|
+
const { value: s } = e3;
|
|
3892
|
+
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" };
|
|
3580
3893
|
};
|
|
3581
3894
|
}, 180: (e2, t2, i) => {
|
|
3582
3895
|
"use strict";
|
|
3583
3896
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPassword = void 0;
|
|
3584
|
-
const
|
|
3897
|
+
const r = i(784);
|
|
3585
3898
|
t2.renderPassword = ({ language: e3, placeholderText: t3, urlParamValue: i2 }) => {
|
|
3586
|
-
const
|
|
3587
|
-
return
|
|
3899
|
+
const n = document.createElement("input");
|
|
3900
|
+
return n.type = "password", n.placeholder = t3 || r.placeholder.password(e3 || "en"), i2 && (n.value = i2), { element: n, elementTypeClass: "magicfeedback-password" };
|
|
3588
3901
|
};
|
|
3589
3902
|
}, 66: (e2, t2, i) => {
|
|
3590
3903
|
"use strict";
|
|
3591
3904
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPointSystem = void 0;
|
|
3592
|
-
const
|
|
3905
|
+
const r = i(784);
|
|
3593
3906
|
t2.renderPointSystem = ({ question: e3, language: t3 }) => {
|
|
3594
|
-
const { ref: i2, value:
|
|
3595
|
-
|
|
3596
|
-
const
|
|
3597
|
-
|
|
3598
|
-
const l = 100 /
|
|
3599
|
-
d.classList.add("magicfeedback-error"), d.textContent =
|
|
3907
|
+
const { ref: i2, value: n } = e3, o = document.createElement("div"), a = document.createElement("div");
|
|
3908
|
+
a.classList.add("magicfeedback-point-system-container");
|
|
3909
|
+
const s = document.createElement("ul");
|
|
3910
|
+
s.classList.add("magicfeedback-point-system-list"), s.style.padding = "0";
|
|
3911
|
+
const l = 100 / n.length, d = document.createElement("div");
|
|
3912
|
+
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";
|
|
3600
3913
|
const c = document.createElement("div");
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
const r2 = document.createElement("
|
|
3605
|
-
r2.
|
|
3606
|
-
const
|
|
3607
|
-
|
|
3608
|
-
const o2 = document.createElement("
|
|
3609
|
-
o2.
|
|
3610
|
-
const
|
|
3611
|
-
|
|
3612
|
-
|
|
3914
|
+
c.classList.add("magicfeedback-point-system-total"), c.style.textAlign = "end", c.style.fontSize = "15px", c.style.marginTop = "5px";
|
|
3915
|
+
const u = document.createElement("bdi");
|
|
3916
|
+
return u.setAttribute("dir", "ltr"), u.textContent = "0 / 100 %", c.appendChild(u), n.forEach(((e4, t4) => {
|
|
3917
|
+
const r2 = document.createElement("li");
|
|
3918
|
+
r2.classList.add("magicfeedback-point-system-item"), r2.style.display = "flex", r2.style.justifyContent = "space-between", r2.style.alignItems = "center", r2.style.margin = "5px";
|
|
3919
|
+
const n2 = document.createElement("label");
|
|
3920
|
+
n2.textContent = e4, n2.style.fontSize = "15px", r2.appendChild(n2);
|
|
3921
|
+
const o2 = document.createElement("span");
|
|
3922
|
+
o2.classList.add("magicfeedback-point-system-input-container");
|
|
3923
|
+
const a2 = document.createElement("input");
|
|
3924
|
+
a2.name = i2, a2.id = `${e4}`, a2.type = "number", a2.min = "0", a2.max = "100", a2.value = "0", a2.classList.add("magicfeedback-input"), a2.style.width = "40px", a2.style.border = "0", a2.style.textAlign = "center", a2.style.margin = "0 5px", a2.autofocus = 0 === t4;
|
|
3925
|
+
const p = document.createElement("span");
|
|
3926
|
+
p.textContent = "%", p.style.color = "#000", a2.addEventListener("input", (() => {
|
|
3927
|
+
const e5 = s.querySelectorAll("input");
|
|
3613
3928
|
let t5 = 0;
|
|
3614
3929
|
e5.forEach(((e6) => {
|
|
3615
3930
|
t5 += Number(e6.value);
|
|
3616
|
-
})), t5 > 100 && (
|
|
3931
|
+
})), t5 > 100 && (a2.value = `${l}%`, t5 -= Number(a2.value));
|
|
3617
3932
|
const i3 = document.getElementById("magicfeedback-submit");
|
|
3618
|
-
i3 && (t5 < 100 ? (c.style.color = "orange", i3.setAttribute("disabled", "true")) : (d.style.display = "none", c.style.color = "green", i3.removeAttribute("disabled"))),
|
|
3619
|
-
})),
|
|
3933
|
+
i3 && (t5 < 100 ? (c.style.color = "orange", i3.setAttribute("disabled", "true")) : (d.style.display = "none", c.style.color = "green", i3.removeAttribute("disabled"))), u.textContent = `${t5} / 100 %`;
|
|
3934
|
+
})), a2.addEventListener("focus", (() => {
|
|
3620
3935
|
const e5 = document.getElementById("magicfeedback-submit");
|
|
3621
3936
|
e5 && (e5.setAttribute("disabled", "true"), e5.addEventListener("pointerover", (() => {
|
|
3622
|
-
const e6 =
|
|
3937
|
+
const e6 = s.querySelectorAll("input");
|
|
3623
3938
|
let t5 = 0;
|
|
3624
3939
|
e6.forEach(((e7) => {
|
|
3625
3940
|
t5 += Number(e7.value);
|
|
3626
3941
|
})), t5 < 100 && (d.style.display = "block");
|
|
3627
3942
|
})));
|
|
3628
|
-
})),
|
|
3629
|
-
})),
|
|
3943
|
+
})), o2.appendChild(a2), o2.appendChild(p), r2.appendChild(o2), s.appendChild(r2);
|
|
3944
|
+
})), a.appendChild(s), a.appendChild(c), a.appendChild(d), o.appendChild(a), { element: o, elementTypeClass: "magicfeedback-point-system" };
|
|
3630
3945
|
};
|
|
3631
|
-
}, 773: (e2, t2) => {
|
|
3946
|
+
}, 773: (e2, t2, i) => {
|
|
3632
3947
|
"use strict";
|
|
3633
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPriorityList = void 0
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
const t5 = { en: { selectUpTo: "Select up to", options: "options", thenOrder: "and then order them", selectOptions: "Select options", cancel: "Cancel", confirm: "Confirm", selectOptionNumber: "Select option #", prioritized: "Prioritized", of: "of", 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." }, es: { selectUpTo: "Selecciona hasta", options: "opciones", thenOrder: "y luego ord\xE9nalas", selectOptions: "Seleccionar opciones", cancel: "Cancelar", confirm: "Confirmar", selectOptionNumber: "Selecciona la opci\xF3n #", prioritized: "Priorizadas", of: "de", instruction: 'Tu lista priorizada se muestra abajo. Si deseas, puedes reordenar las opciones con las flechas. Haz clic en "Siguiente" para confirmar y continuar.' }, pt: { selectUpTo: "Selecione at\xE9", options: "op\xE7\xF5es", thenOrder: "e depois ordene-as", selectOptions: "Selecionar op\xE7\xF5es", cancel: "Cancelar", confirm: "Confirmar", selectOptionNumber: "Selecione a op\xE7\xE3o #", prioritized: "Priorizadas", of: "de", 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.' }, fr: { selectUpTo: "S\xE9lectionnez jusqu'\xE0", options: "options", thenOrder: "puis classez-les", selectOptions: "S\xE9lectionner des options", cancel: "Annuler", confirm: "Confirmer", selectOptionNumber: "S\xE9lectionnez l'option #", prioritized: "Prioris\xE9es", of: "sur", 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.` }, de: { selectUpTo: "W\xE4hlen Sie bis zu", options: "Optionen", thenOrder: "und ordnen Sie sie dann", selectOptions: "Optionen ausw\xE4hlen", cancel: "Abbrechen", confirm: "Best\xE4tigen", selectOptionNumber: "W\xE4hlen Sie Option #", prioritized: "Priorisiert", of: "von", 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.' }, it: { selectUpTo: "Seleziona fino a", options: "opzioni", thenOrder: "e poi ordinali", selectOptions: "Seleziona opzioni", cancel: "Annulla", confirm: "Conferma", selectOptionNumber: "Seleziona opzione #", prioritized: "Prioritizzate", of: "di", 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: { selectUpTo: "Selecteer tot", options: "opties", thenOrder: "en rangschik ze vervolgens", selectOptions: "Selecteer opties", cancel: "Annuleren", confirm: "Bevestigen", selectOptionNumber: "Selecteer optie #", prioritized: "Geprioriteerd", of: "van", 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: { selectUpTo: "Wybierz do", options: "opcje", thenOrder: "a nast\u0119pnie je uporz\u0105dkuj", selectOptions: "Wybierz opcje", cancel: "Anuluj", confirm: "Potwierd\u017A", selectOptionNumber: "Wybierz opcj\u0119 #", prioritized: "Priorytetowe", of: "z", 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: { selectUpTo: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043E", options: "\u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432", thenOrder: "\u0430 \u0437\u0430\u0442\u0435\u043C \u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u044C\u0442\u0435 \u0438\u0445", selectOptions: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B", cancel: "\u041E\u0442\u043C\u0435\u043D\u0430", confirm: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C", selectOptionNumber: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 #", prioritized: "\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u044B", of: "\u0438\u0437", 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: { selectUpTo: "\u6700\u5927", options: "\u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", thenOrder: "\u305D\u306E\u5F8C\u4E26\u3079\u66FF\u3048\u3066\u304F\u3060\u3055\u3044", selectOptions: "\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", cancel: "\u30AD\u30E3\u30F3\u30BB\u30EB", confirm: "\u78BA\u8A8D", selectOptionNumber: "\u30AA\u30D7\u30B7\u30E7\u30F3 # \u3092\u9078\u629E", prioritized: "\u512A\u5148\u9806\u4F4D", of: "\u306E\u3046\u3061", 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: { selectUpTo: "\u6700\u591A\u9009\u62E9", options: "\u4E2A\u9009\u9879", thenOrder: "\u7136\u540E\u6392\u5E8F\u5B83\u4EEC", selectOptions: "\u9009\u62E9\u9009\u9879", cancel: "\u53D6\u6D88", confirm: "\u786E\u8BA4", selectOptionNumber: "\u9009\u62E9\u9009\u9879 #", prioritized: "\u5DF2\u4F18\u5148", of: "\u5171", 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: { selectUpTo: "\uCD5C\uB300", options: "\uAC1C\uC758 \uC635\uC158 \uC120\uD0DD", thenOrder: "\uADF8\uB7F0 \uB2E4\uC74C \uC815\uB82C\uD558\uC138\uC694", selectOptions: "\uC635\uC158 \uC120\uD0DD", cancel: "\uCDE8\uC18C", confirm: "\uD655\uC778", selectOptionNumber: "\uC635\uC158 # \uC120\uD0DD", prioritized: "\uC6B0\uC120\uC21C\uC704", of: "\uC911", 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.' }, ar: { selectUpTo: "\u0627\u062E\u062A\u0631 \u062D\u062A\u0649", options: "\u062E\u064A\u0627\u0631\u0627\u062A", thenOrder: "\u062B\u0645 \u0631\u062A\u0628\u0647\u0627", selectOptions: "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A", cancel: "\u0625\u0644\u063A\u0627\u0621", confirm: "\u062A\u0623\u0643\u064A\u062F", selectOptionNumber: "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631 #", prioritized: "\u062A\u0645 \u0627\u0644\u062A\u0631\u062A\u064A\u0628", of: "\u0645\u0646", 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.' }, bn: { selectUpTo: "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", options: "\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA", thenOrder: "\u09A4\u09BE\u09B0\u09AA\u09B0 \u09B8\u09C7\u0997\u09C1\u09B2\u09CB \u09B8\u09BE\u099C\u09BE\u09A8", selectOptions: "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", cancel: "\u09AC\u09BE\u09A4\u09BF\u09B2", confirm: "\u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8", selectOptionNumber: "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA # \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", prioritized: "\u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0\u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4", of: "\u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7", 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 \u201C\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0\u201D \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" }, da: { selectUpTo: "V\xE6lg op til", options: "muligheder", thenOrder: "og sorter dem derefter", selectOptions: "V\xE6lg muligheder", cancel: "Annuller", confirm: "Bekr\xE6ft", selectOptionNumber: "V\xE6lg mulighed #", prioritized: "Prioriteret", of: "af", 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.' }, fi: { selectUpTo: "Valitse enint\xE4\xE4n", options: "vaihtoehtoa", thenOrder: "ja j\xE4rjest\xE4 ne sitten", selectOptions: "Valitse vaihtoehdot", cancel: "Peruuta", confirm: "Vahvista", selectOptionNumber: "Valitse vaihtoehto #", prioritized: "Priorisoitu", of: " / ", instruction: 'Prioriteettilistasi n\xE4kyy alla. Voit halutessasi j\xE4rjest\xE4\xE4 valinnat uudelleen nuolien avulla. Napsauta "Seuraava" vahvistaaksesi valinnan ja jatkaaksesi.' }, sv: { selectUpTo: "V\xE4lj upp till", options: "alternativ", thenOrder: "och ordna dem sedan", selectOptions: "V\xE4lj alternativ", cancel: "Avbryt", confirm: "Bekr\xE4fta", selectOptionNumber: "V\xE4lj alternativ #", prioritized: "Prioriterat", of: "av", 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.' }, no: { selectUpTo: "Velg opptil", options: "alternativer", thenOrder: "og ordne dem deretter", selectOptions: "Velg alternativer", cancel: "Avbryt", confirm: "Bekreft", selectOptionNumber: "Velg alternativ #", prioritized: "Prioritert", of: "av", 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.' } };
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
r3.classList.add("magicfeedback-priority-list-header");
|
|
3643
|
-
const o3 = document.createElement("div");
|
|
3644
|
-
o3.classList.add("magicfeedback-priority-list-instruction"), o3.textContent = "" !== a2 ? a2 : `${l("instruction")}`, o3.style.display = "none";
|
|
3645
|
-
const c2 = document.createElement("button");
|
|
3646
|
-
c2.type = "button", c2.textContent = l("selectOptions"), c2.classList.add("magicfeedback-button"), c2.classList.add("magicfeedback-priority-list-open-btn"), r3.appendChild(c2), r3.appendChild(o3);
|
|
3948
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPriorityList = void 0;
|
|
3949
|
+
const r = i(881);
|
|
3950
|
+
t2.renderPriorityList = ({ question: e3, randomPosition: t3, language: i2 }) => {
|
|
3951
|
+
var n, o, a;
|
|
3952
|
+
const s = document.createElement("div"), l = (function(e4) {
|
|
3953
|
+
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");
|
|
3954
|
+
if (c.classList.add("magicfeedback-priority-list-container"), o2 && a2 && a2 > 0) {
|
|
3955
|
+
const e5 = [], o3 = document.createElement("div");
|
|
3956
|
+
o3.classList.add("magicfeedback-priority-list-header");
|
|
3647
3957
|
const u2 = document.createElement("div");
|
|
3648
|
-
u2.classList.add("magicfeedback-priority-list-
|
|
3649
|
-
const
|
|
3650
|
-
|
|
3651
|
-
const
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
const
|
|
3658
|
-
|
|
3659
|
-
const
|
|
3660
|
-
|
|
3661
|
-
const
|
|
3662
|
-
|
|
3958
|
+
u2.classList.add("magicfeedback-priority-list-instruction"), u2.textContent = "" !== l2 ? l2 : `${d("instruction")}`, u2.style.display = "none";
|
|
3959
|
+
const p2 = document.createElement("button");
|
|
3960
|
+
p2.type = "button", p2.textContent = d("selectOptions"), p2.classList.add("magicfeedback-button"), p2.classList.add("magicfeedback-priority-list-open-btn"), o3.appendChild(p2), o3.appendChild(u2);
|
|
3961
|
+
const m = document.createElement("div");
|
|
3962
|
+
m.classList.add("magicfeedback-priority-list-reorder");
|
|
3963
|
+
const h = document.createElement("ul");
|
|
3964
|
+
h.classList.add("magicfeedback-priority-list-list"), m.appendChild(h);
|
|
3965
|
+
const f = () => {
|
|
3966
|
+
h.innerHTML = "", e5.forEach(((t5, r2) => {
|
|
3967
|
+
const n3 = document.createElement("li");
|
|
3968
|
+
n3.classList.add("magicfeedback-priority-list-item");
|
|
3969
|
+
const o4 = document.createElement("input");
|
|
3970
|
+
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);
|
|
3971
|
+
const a3 = document.createElement("label");
|
|
3972
|
+
a3.classList.add("magicfeedback-priority-list-item-label"), a3.textContent = `${r2 + 1}. ${t5}`, n3.appendChild(a3);
|
|
3973
|
+
const s3 = document.createElement("div");
|
|
3974
|
+
s3.classList.add("magicfeedback-priority-list-arrows");
|
|
3975
|
+
const l3 = document.createElement("img");
|
|
3976
|
+
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";
|
|
3663
3977
|
const d2 = document.createElement("img");
|
|
3664
|
-
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 =
|
|
3665
|
-
var
|
|
3666
|
-
const u3 =
|
|
3978
|
+
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", (() => {
|
|
3979
|
+
var i4, r3, s4, c2;
|
|
3980
|
+
const u3 = n3.previousElementSibling;
|
|
3667
3981
|
if (u3) {
|
|
3668
|
-
const
|
|
3669
|
-
|
|
3670
|
-
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"),
|
|
3671
|
-
if (m2 && f2 && g2 &&
|
|
3672
|
-
const t6 = Number(null === (
|
|
3673
|
-
m2.value = `${t6}.${null === (
|
|
3982
|
+
const p3 = Number(null === (i4 = o4.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) - 1;
|
|
3983
|
+
o4.value = `${p3}. ${t5}`, a3.textContent = `${p3}. ${t5}`, l3.style.visibility = 1 === p3 ? "hidden" : "visible", d2.style.visibility = p3 === e5.length ? "hidden" : "visible";
|
|
3984
|
+
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");
|
|
3985
|
+
if (m2 && f2 && g2 && y2) {
|
|
3986
|
+
const t6 = Number(null === (r3 = m2.value) || void 0 === r3 ? void 0 : r3.split(".")[0]) + 1;
|
|
3987
|
+
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";
|
|
3674
3988
|
}
|
|
3675
|
-
|
|
3989
|
+
h.insertBefore(n3, u3);
|
|
3676
3990
|
}
|
|
3677
3991
|
})), d2.addEventListener("click", (() => {
|
|
3678
|
-
var
|
|
3679
|
-
const
|
|
3680
|
-
if (
|
|
3681
|
-
const u3 = Number(null === (
|
|
3682
|
-
|
|
3683
|
-
const
|
|
3684
|
-
if (
|
|
3685
|
-
const t6 = Number(
|
|
3686
|
-
|
|
3992
|
+
var i4, r3, s4;
|
|
3993
|
+
const c2 = n3.nextElementSibling;
|
|
3994
|
+
if (c2) {
|
|
3995
|
+
const u3 = Number(null === (i4 = o4.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) + 1;
|
|
3996
|
+
o4.value = `${u3}. ${t5}`, a3.textContent = `${u3}. ${t5}`, l3.style.visibility = 1 === u3 ? "hidden" : "visible", d2.style.visibility = u3 === e5.length ? "hidden" : "visible";
|
|
3997
|
+
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");
|
|
3998
|
+
if (p3 && m2 && f2 && g2) {
|
|
3999
|
+
const t6 = Number(p3.value.split(".")[0]) - 1;
|
|
4000
|
+
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";
|
|
3687
4001
|
}
|
|
3688
|
-
|
|
4002
|
+
h.insertBefore(c2, n3);
|
|
3689
4003
|
}
|
|
3690
|
-
})),
|
|
4004
|
+
})), s3.appendChild(l3), s3.appendChild(d2), n3.appendChild(s3), h.appendChild(n3);
|
|
3691
4005
|
}));
|
|
3692
|
-
},
|
|
3693
|
-
|
|
3694
|
-
const
|
|
3695
|
-
|
|
3696
|
-
const
|
|
3697
|
-
|
|
3698
|
-
const
|
|
3699
|
-
|
|
4006
|
+
}, g = document.createElement("div");
|
|
4007
|
+
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";
|
|
4008
|
+
const y = document.createElement("div");
|
|
4009
|
+
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";
|
|
4010
|
+
const v = document.createElement("h5");
|
|
4011
|
+
v.classList.add("magicfeedback-modal-title"), v.style.flexShrink = "0", v.style.marginTop = "0";
|
|
4012
|
+
const b = () => Math.min(e5.length + 1, a2), E = () => {
|
|
4013
|
+
v.textContent = `${d("selectOptionNumber")}${b()}`;
|
|
3700
4014
|
};
|
|
3701
|
-
|
|
3702
|
-
const
|
|
3703
|
-
|
|
3704
|
-
const
|
|
3705
|
-
|
|
3706
|
-
const
|
|
3707
|
-
|
|
4015
|
+
E();
|
|
4016
|
+
const k = document.createElement("div");
|
|
4017
|
+
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) => {
|
|
4018
|
+
const r2 = document.createElement("label");
|
|
4019
|
+
r2.classList.add("magicfeedback-modal-row");
|
|
4020
|
+
const n3 = document.createElement("input");
|
|
4021
|
+
n3.type = "checkbox", n3.classList.add("magicfeedback-input"), n3.name = `${i3}-selection`, n3.value = t5;
|
|
3708
4022
|
const o4 = document.createElement("span");
|
|
3709
|
-
o4.textContent = t5,
|
|
3710
|
-
if (
|
|
3711
|
-
if (e5.length >=
|
|
3712
|
-
|
|
4023
|
+
o4.textContent = t5, n3.addEventListener("change", (() => {
|
|
4024
|
+
if (n3.checked) {
|
|
4025
|
+
if (e5.length >= a2) return n3.checked = false, r2.classList.add("magicfeedback-warning"), void setTimeout((() => {
|
|
4026
|
+
r2.classList.remove("magicfeedback-warning");
|
|
3713
4027
|
}), 800);
|
|
3714
4028
|
e5.push(t5);
|
|
3715
4029
|
} else {
|
|
3716
|
-
const
|
|
3717
|
-
-1 !==
|
|
4030
|
+
const i4 = e5.indexOf(t5);
|
|
4031
|
+
-1 !== i4 && e5.splice(i4, 1);
|
|
3718
4032
|
}
|
|
3719
|
-
|
|
3720
|
-
})),
|
|
4033
|
+
E(), C();
|
|
4034
|
+
})), r2.appendChild(n3), r2.appendChild(o4), k.appendChild(r2);
|
|
3721
4035
|
}));
|
|
3722
|
-
const E = document.createElement("div");
|
|
3723
|
-
E.classList.add("magicfeedback-modal-actions"), E.style.flexShrink = "0";
|
|
3724
4036
|
const A = document.createElement("div");
|
|
3725
|
-
A.classList.add("magicfeedback-modal-
|
|
3726
|
-
const
|
|
3727
|
-
|
|
3728
|
-
|
|
4037
|
+
A.classList.add("magicfeedback-modal-actions"), A.style.flexShrink = "0";
|
|
4038
|
+
const T = document.createElement("div");
|
|
4039
|
+
T.classList.add("magicfeedback-modal-counter");
|
|
4040
|
+
const C = () => {
|
|
4041
|
+
const t5 = d("of");
|
|
4042
|
+
T.textContent = `${d("prioritized")} ${e5.length} ${t5} ${a2}`, u2.style.display = e5.length > 0 ? "block" : "none";
|
|
3729
4043
|
};
|
|
3730
|
-
|
|
3731
|
-
const
|
|
3732
|
-
|
|
3733
|
-
const
|
|
3734
|
-
document.body.appendChild(
|
|
3735
|
-
},
|
|
3736
|
-
|
|
4044
|
+
C();
|
|
4045
|
+
const L = document.createElement("button");
|
|
4046
|
+
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";
|
|
4047
|
+
const x = () => {
|
|
4048
|
+
document.body.appendChild(g), g.style.display = "flex", E(), C();
|
|
4049
|
+
}, S = () => {
|
|
4050
|
+
g.style.display = "none", c.appendChild(g);
|
|
3737
4051
|
};
|
|
3738
|
-
|
|
3739
|
-
|
|
4052
|
+
L.addEventListener("click", (() => {
|
|
4053
|
+
S();
|
|
3740
4054
|
}));
|
|
3741
4055
|
const O = document.createElement("button");
|
|
3742
|
-
return O.type = "button", O.textContent =
|
|
3743
|
-
|
|
3744
|
-
})),
|
|
3745
|
-
|
|
3746
|
-
})),
|
|
3747
|
-
e6.target ===
|
|
3748
|
-
})),
|
|
4056
|
+
return O.type = "button", O.textContent = d("confirm"), O.classList.add("magicfeedback-button"), O.classList.add("magicfeedback-button-primary"), O.addEventListener("click", (() => {
|
|
4057
|
+
S(), f();
|
|
4058
|
+
})), A.appendChild(T), A.appendChild(O), y.appendChild(L), y.appendChild(v), y.appendChild(k), y.appendChild(A), g.appendChild(y), p2.addEventListener("click", (() => {
|
|
4059
|
+
x();
|
|
4060
|
+
})), g.addEventListener("click", ((e6) => {
|
|
4061
|
+
e6.target === g && S();
|
|
4062
|
+
})), c.appendChild(o3), c.appendChild(m), c.appendChild(g), f(), c;
|
|
3749
4063
|
}
|
|
3750
|
-
const
|
|
3751
|
-
|
|
3752
|
-
const
|
|
3753
|
-
return
|
|
3754
|
-
const
|
|
3755
|
-
|
|
3756
|
-
const
|
|
3757
|
-
|
|
3758
|
-
const
|
|
3759
|
-
|
|
3760
|
-
const
|
|
3761
|
-
|
|
3762
|
-
const
|
|
3763
|
-
|
|
3764
|
-
var t6,
|
|
3765
|
-
const
|
|
3766
|
-
if (
|
|
3767
|
-
const
|
|
3768
|
-
|
|
3769
|
-
const
|
|
3770
|
-
if (
|
|
3771
|
-
const e6 = Number(null === (
|
|
3772
|
-
|
|
4064
|
+
const u = document.createElement("ul");
|
|
4065
|
+
u.classList.add("magicfeedback-priority-list-list");
|
|
4066
|
+
const p = n2 ? [...t4].sort((() => Math.random() - 0.5)) : [...t4];
|
|
4067
|
+
return p.forEach(((e5, t5) => {
|
|
4068
|
+
const r2 = document.createElement("li");
|
|
4069
|
+
r2.classList.add("magicfeedback-priority-list-item"), r2.style.display = "flex", r2.style.justifyContent = "space-between", r2.style.alignItems = "center", r2.style.margin = "5px";
|
|
4070
|
+
const n3 = document.createElement("input");
|
|
4071
|
+
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);
|
|
4072
|
+
const o3 = document.createElement("label");
|
|
4073
|
+
o3.classList.add("magicfeedback-priority-list-item-label"), o3.textContent = `${t5 + 1}. ${e5}`, r2.appendChild(o3);
|
|
4074
|
+
const a3 = document.createElement("div");
|
|
4075
|
+
a3.style.display = "flex", a3.style.alignItems = "center", a3.style.justifyContent = "space-between";
|
|
4076
|
+
const s3 = document.createElement("img");
|
|
4077
|
+
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", (() => {
|
|
4078
|
+
var t6, i4, a4, d2;
|
|
4079
|
+
const c2 = r2.previousElementSibling;
|
|
4080
|
+
if (c2) {
|
|
4081
|
+
const m = Number(null === (t6 = n3.value) || void 0 === t6 ? void 0 : t6.split(".")[0]) - 1;
|
|
4082
|
+
n3.value = `${m}. ${e5}`, o3.textContent = `${m}. ${e5}`, s3.style.visibility = 1 === m ? "hidden" : "visible", l3.style.visibility = m === p.length ? "hidden" : "visible";
|
|
4083
|
+
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");
|
|
4084
|
+
if (h && f && g && y) {
|
|
4085
|
+
const e6 = Number(null === (i4 = h.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) + 1;
|
|
4086
|
+
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";
|
|
3773
4087
|
}
|
|
3774
|
-
|
|
4088
|
+
u.insertBefore(r2, c2);
|
|
3775
4089
|
}
|
|
3776
4090
|
}));
|
|
3777
|
-
const
|
|
3778
|
-
|
|
3779
|
-
var t6,
|
|
3780
|
-
const d2 =
|
|
4091
|
+
const l3 = document.createElement("img");
|
|
4092
|
+
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", (() => {
|
|
4093
|
+
var t6, i4, a4;
|
|
4094
|
+
const d2 = r2.nextElementSibling;
|
|
3781
4095
|
if (d2) {
|
|
3782
|
-
const
|
|
3783
|
-
|
|
3784
|
-
const
|
|
3785
|
-
if (
|
|
3786
|
-
const e6 = Number(
|
|
3787
|
-
|
|
4096
|
+
const c2 = Number(null === (t6 = n3.value) || void 0 === t6 ? void 0 : t6.split(".")[0]) + 1;
|
|
4097
|
+
n3.value = `${c2}. ${e5}`, o3.textContent = `${c2}. ${e5}`, s3.style.visibility = 1 === c2 ? "hidden" : "visible", l3.style.visibility = c2 === p.length ? "hidden" : "visible";
|
|
4098
|
+
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");
|
|
4099
|
+
if (m && h && f && g) {
|
|
4100
|
+
const e6 = Number(m.value.split(".")[0]) - 1;
|
|
4101
|
+
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";
|
|
3788
4102
|
}
|
|
3789
|
-
|
|
4103
|
+
u.insertBefore(d2, r2);
|
|
3790
4104
|
}
|
|
3791
|
-
})),
|
|
3792
|
-
})),
|
|
3793
|
-
})({ value: e3.value, ref: e3.ref, randomPosition: t3, limitPriority: (null === (n = e3.assets) || void 0 === n ? void 0 : n.limitPriority) || false, maxPriority: (null === (
|
|
3794
|
-
return
|
|
4105
|
+
})), a3.appendChild(s3), a3.appendChild(l3), r2.appendChild(a3), u.appendChild(r2);
|
|
4106
|
+
})), c.appendChild(u), c;
|
|
4107
|
+
})({ 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" });
|
|
4108
|
+
return s.appendChild(l), { element: s, elementTypeClass: "magicfeedback-priority-list" };
|
|
3795
4109
|
};
|
|
3796
4110
|
}, 152: (e2, t2, i) => {
|
|
3797
4111
|
"use strict";
|
|
3798
4112
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingEmoji = void 0;
|
|
3799
|
-
const
|
|
3800
|
-
t2.renderRatingEmoji = ({ question: e3, url: t3, send: i2, urlParamValue:
|
|
3801
|
-
const { ref:
|
|
4113
|
+
const r = i(559), n = "https://survey-dev.magicfeedback.io/assets/emojis";
|
|
4114
|
+
t2.renderRatingEmoji = ({ question: e3, url: t3, send: i2, urlParamValue: o }) => {
|
|
4115
|
+
const { ref: a, assets: s } = e3, l = document.createElement("div"), d = "magicfeedback-rating", c = document.createElement("div");
|
|
3802
4116
|
c.classList.add("magicfeedback-rating-container");
|
|
3803
|
-
const u = (null ==
|
|
4117
|
+
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);
|
|
3804
4118
|
for (let e4 = p; e4 <= u; e4++) {
|
|
3805
|
-
const
|
|
3806
|
-
|
|
3807
|
-
const
|
|
3808
|
-
|
|
4119
|
+
const r2 = document.createElement("div");
|
|
4120
|
+
r2.classList.add("magicfeedback-rating-option");
|
|
4121
|
+
const s2 = document.createElement("label");
|
|
4122
|
+
s2.htmlFor = `rating-${a}-${e4}`, s2.classList.add("magicfeedback-rating-option-label-container");
|
|
3809
4123
|
const l2 = document.createElement("label");
|
|
3810
|
-
l2.htmlFor = `rating-${
|
|
3811
|
-
const
|
|
3812
|
-
if (
|
|
4124
|
+
l2.htmlFor = `rating-${a}-${e4}`, l2.textContent = e4.toString();
|
|
4125
|
+
const m2 = document.createElement("img");
|
|
4126
|
+
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`;
|
|
3813
4127
|
else if (1 === p && 5 === u) switch (e4) {
|
|
3814
4128
|
case 1:
|
|
3815
|
-
|
|
4129
|
+
m2.src = `${t3}/1.svg`, m2.onerror = () => m2.src = `${n}/1.svg`;
|
|
3816
4130
|
break;
|
|
3817
4131
|
case 2:
|
|
3818
|
-
|
|
4132
|
+
m2.src = `${t3}/2.svg`, m2.onerror = () => m2.src = `${n}/2.svg`;
|
|
3819
4133
|
break;
|
|
3820
4134
|
case 3:
|
|
3821
|
-
|
|
4135
|
+
m2.src = `${t3}/6.svg`, m2.onerror = () => m2.src = `${n}/6.svg`;
|
|
3822
4136
|
break;
|
|
3823
4137
|
case 4:
|
|
3824
|
-
|
|
4138
|
+
m2.src = `${t3}/9.svg`, m2.onerror = () => m2.src = `${n}/9.svg`;
|
|
3825
4139
|
break;
|
|
3826
4140
|
case 5:
|
|
3827
|
-
|
|
4141
|
+
m2.src = `${t3}/10.svg`, m2.onerror = () => m2.src = `${n}/10.svg`;
|
|
3828
4142
|
}
|
|
3829
4143
|
else {
|
|
3830
4144
|
const i3 = Math.round(10 / (u - p) * (e4 - p));
|
|
3831
|
-
|
|
4145
|
+
m2.src = `${t3}/${i3}.svg`, m2.onerror = () => m2.src = `${n}/${i3}.svg`;
|
|
3832
4146
|
}
|
|
3833
|
-
const
|
|
3834
|
-
|
|
4147
|
+
const h = document.createElement("input");
|
|
4148
|
+
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", (() => {
|
|
3835
4149
|
i2();
|
|
3836
|
-
})),
|
|
4150
|
+
})), o && o === h.value && (h.checked = true), s2.appendChild(h), s2.appendChild(m2), s2.appendChild(l2), r2.appendChild(s2), c.appendChild(r2);
|
|
3837
4151
|
}
|
|
3838
|
-
if ((null ==
|
|
4152
|
+
if ((null == s ? void 0 : s.extraOption) && (null == s ? void 0 : s.extraOptionText)) {
|
|
3839
4153
|
const e4 = document.createElement("div");
|
|
3840
4154
|
e4.classList.add("magicfeedback-rating-option");
|
|
3841
4155
|
const t4 = document.createElement("label");
|
|
3842
|
-
t4.htmlFor = `rating-${
|
|
3843
|
-
const
|
|
3844
|
-
|
|
3845
|
-
const
|
|
3846
|
-
|
|
3847
|
-
const
|
|
3848
|
-
|
|
4156
|
+
t4.htmlFor = `rating-${a}-extra`, t4.classList.add("magicfeedback-rating-option-label-container");
|
|
4157
|
+
const r2 = document.createElement("label");
|
|
4158
|
+
r2.htmlFor = `rating-${a}-extra`, r2.textContent = null == s ? void 0 : s.extraOptionText;
|
|
4159
|
+
const n2 = document.createElement("img");
|
|
4160
|
+
n2.src = "https://magicfeedback-c6458-dev.web.app/assets/question.svg", n2.alt = `face-${a}-extra`, n2.className = "magicfeedback-rating-image-extra";
|
|
4161
|
+
const o2 = document.createElement("input");
|
|
4162
|
+
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", (() => {
|
|
3849
4163
|
i2();
|
|
3850
|
-
})), t4.appendChild(
|
|
4164
|
+
})), t4.appendChild(o2), t4.appendChild(n2), t4.appendChild(r2), e4.appendChild(t4), c.appendChild(e4);
|
|
3851
4165
|
}
|
|
3852
|
-
return
|
|
4166
|
+
return m.childElementCount > 0 && c.appendChild(m), l.appendChild(c), { element: l, elementTypeClass: d };
|
|
3853
4167
|
};
|
|
3854
4168
|
}, 917: (e2, t2, i) => {
|
|
3855
4169
|
"use strict";
|
|
3856
4170
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingNumber = void 0;
|
|
3857
|
-
const
|
|
3858
|
-
t2.renderRatingNumber = ({ question: e3, order: t3, direction: i2, send:
|
|
3859
|
-
const
|
|
3860
|
-
return { element: (0,
|
|
4171
|
+
const r = i(559);
|
|
4172
|
+
t2.renderRatingNumber = ({ question: e3, order: t3, direction: i2, send: n, urlParamValue: o, language: a }) => {
|
|
4173
|
+
const s = "magicfeedback-rating-number";
|
|
4174
|
+
return { element: (0, r.createRatingNumberElement)(e3.ref, e3.assets, t3, i2, s, n, o, a), elementTypeClass: s };
|
|
3861
4175
|
};
|
|
3862
4176
|
}, 452: (e2, t2, i) => {
|
|
3863
4177
|
"use strict";
|
|
3864
4178
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingStar = void 0;
|
|
3865
|
-
const
|
|
4179
|
+
const r = i(559);
|
|
3866
4180
|
t2.renderRatingStar = ({ question: e3, send: t3, urlParamValue: i2 }) => {
|
|
3867
|
-
var
|
|
3868
|
-
const
|
|
3869
|
-
return
|
|
4181
|
+
var n, o;
|
|
4182
|
+
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);
|
|
4183
|
+
return a.appendChild(s), { element: a, elementTypeClass: "magicfeedback-rating-star" };
|
|
3870
4184
|
};
|
|
3871
4185
|
}, 85: (e2, t2, i) => {
|
|
3872
4186
|
"use strict";
|
|
3873
4187
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderSelect = void 0;
|
|
3874
|
-
const
|
|
3875
|
-
t2.renderSelect = ({ question: e3, format: t3, language: i2, urlParamValue:
|
|
3876
|
-
const { title:
|
|
3877
|
-
return
|
|
4188
|
+
const r = i(516), n = i(881);
|
|
4189
|
+
t2.renderSelect = ({ question: e3, format: t3, language: i2, urlParamValue: o }) => {
|
|
4190
|
+
const { title: a, value: s, defaultValue: l } = e3, d = document.createElement("select"), c = document.createElement("option");
|
|
4191
|
+
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) => {
|
|
3878
4192
|
const t4 = document.createElement("option");
|
|
3879
|
-
t4.value = e4, t4.text = e4,
|
|
3880
|
-
})),
|
|
4193
|
+
t4.value = e4, t4.text = e4, d.appendChild(t4);
|
|
4194
|
+
})), o && s.includes(o) && (d.value = o), { element: d, elementTypeClass: "magicfeedback-select" };
|
|
3881
4195
|
};
|
|
3882
4196
|
}, 90: (e2, t2, i) => {
|
|
3883
4197
|
"use strict";
|
|
3884
4198
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderText = void 0;
|
|
3885
|
-
const
|
|
3886
|
-
t2.renderText = ({ language: e3, placeholderText: t3, urlParamValue: i2, send:
|
|
3887
|
-
const
|
|
3888
|
-
return
|
|
3889
|
-
e4.preventDefault(), "Enter" === e4.key &&
|
|
3890
|
-
})), { element:
|
|
4199
|
+
const r = i(784);
|
|
4200
|
+
t2.renderText = ({ language: e3, placeholderText: t3, urlParamValue: i2, send: n }) => {
|
|
4201
|
+
const o = document.createElement("input");
|
|
4202
|
+
return o.type = "text", o.placeholder = t3 || r.placeholder.answer(e3 || "en"), i2 && (o.value = i2), o.addEventListener("keyup", ((e4) => {
|
|
4203
|
+
e4.preventDefault(), "Enter" === e4.key && n && n();
|
|
4204
|
+
})), { element: o, elementTypeClass: "magicfeedback-text" };
|
|
3891
4205
|
};
|
|
3892
4206
|
}, 250: (e2, t2, i) => {
|
|
3893
4207
|
"use strict";
|
|
3894
4208
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderUploadFile = void 0;
|
|
3895
|
-
const
|
|
3896
|
-
t2.renderUploadFile = ({ question: e3, language: t3 }) => (0,
|
|
4209
|
+
const r = i(571);
|
|
4210
|
+
t2.renderUploadFile = ({ question: e3, language: t3 }) => (0, r.createUploadControl)(e3, t3, "file");
|
|
3897
4211
|
}, 843: (e2, t2, i) => {
|
|
3898
4212
|
"use strict";
|
|
3899
4213
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderUploadImage = void 0;
|
|
3900
|
-
const
|
|
3901
|
-
t2.renderUploadImage = ({ question: e3, language: t3 }) => (0,
|
|
4214
|
+
const r = i(571);
|
|
4215
|
+
t2.renderUploadImage = ({ question: e3, language: t3 }) => (0, r.createUploadControl)(e3, t3, "image");
|
|
3902
4216
|
}, 571: function(e2, t2, i) {
|
|
3903
4217
|
"use strict";
|
|
3904
|
-
var
|
|
3905
|
-
return new (i2 || (i2 = Promise))((function(
|
|
3906
|
-
function
|
|
4218
|
+
var r = this && this.__awaiter || function(e3, t3, i2, r2) {
|
|
4219
|
+
return new (i2 || (i2 = Promise))((function(n2, o2) {
|
|
4220
|
+
function a2(e4) {
|
|
3907
4221
|
try {
|
|
3908
|
-
l2(
|
|
4222
|
+
l2(r2.next(e4));
|
|
3909
4223
|
} catch (e5) {
|
|
3910
|
-
|
|
4224
|
+
o2(e5);
|
|
3911
4225
|
}
|
|
3912
4226
|
}
|
|
3913
|
-
function
|
|
4227
|
+
function s2(e4) {
|
|
3914
4228
|
try {
|
|
3915
|
-
l2(
|
|
4229
|
+
l2(r2.throw(e4));
|
|
3916
4230
|
} catch (e5) {
|
|
3917
|
-
|
|
4231
|
+
o2(e5);
|
|
3918
4232
|
}
|
|
3919
4233
|
}
|
|
3920
4234
|
function l2(e4) {
|
|
3921
4235
|
var t4;
|
|
3922
|
-
e4.done ?
|
|
4236
|
+
e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
3923
4237
|
e5(t4);
|
|
3924
|
-
}))).then(
|
|
4238
|
+
}))).then(a2, s2);
|
|
3925
4239
|
}
|
|
3926
|
-
l2((
|
|
4240
|
+
l2((r2 = r2.apply(e3, t3 || [])).next());
|
|
3927
4241
|
}));
|
|
3928
4242
|
};
|
|
3929
4243
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.createUploadControl = t2.awaitUploadReady = t2.getUploadValues = t2.formatFileSize = void 0;
|
|
3930
|
-
const
|
|
4244
|
+
const n = i(784), o = i(516), a = "__mfUploadValues", s = "__mfUploadReady";
|
|
3931
4245
|
function l(e3) {
|
|
3932
4246
|
if ("number" != typeof e3 || isNaN(e3)) return "";
|
|
3933
4247
|
if (e3 < 1024) return `${e3} B`;
|
|
@@ -3937,93 +4251,93 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3937
4251
|
return `${i2 < 10 ? i2.toFixed(1) : Math.round(i2)} MB`;
|
|
3938
4252
|
}
|
|
3939
4253
|
t2.formatFileSize = l, t2.getUploadValues = function(e3) {
|
|
3940
|
-
const t3 = e3[
|
|
4254
|
+
const t3 = e3[a];
|
|
3941
4255
|
return Array.isArray(t3) ? t3 : [];
|
|
3942
4256
|
}, t2.awaitUploadReady = function(e3) {
|
|
3943
|
-
return
|
|
4257
|
+
return r(this, void 0, void 0, (function* () {
|
|
3944
4258
|
if (!e3) return;
|
|
3945
4259
|
const t3 = Array.from(e3.querySelectorAll(".magicfeedback-upload-native"));
|
|
3946
|
-
yield Promise.all(t3.map(((e4) => e4[
|
|
4260
|
+
yield Promise.all(t3.map(((e4) => e4[s])).filter(Boolean));
|
|
3947
4261
|
}));
|
|
3948
4262
|
}, t2.createUploadControl = function(e3, t3, i2) {
|
|
3949
|
-
const { ref:
|
|
3950
|
-
|
|
3951
|
-
const
|
|
3952
|
-
|
|
3953
|
-
const b = (0,
|
|
3954
|
-
b &&
|
|
4263
|
+
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");
|
|
4264
|
+
y.classList.add("magicfeedback-upload");
|
|
4265
|
+
const v = document.createElement("input");
|
|
4266
|
+
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();
|
|
4267
|
+
const b = (0, o.parseTitle)(c, t3);
|
|
4268
|
+
b && v.setAttribute("aria-label", b);
|
|
3955
4269
|
const E = document.createElement("div");
|
|
3956
4270
|
E.classList.add("magicfeedback-upload-dropzone");
|
|
3957
|
-
const A = document.createElement("span");
|
|
3958
|
-
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>';
|
|
3959
4271
|
const k = document.createElement("span");
|
|
3960
|
-
k.classList.add("magicfeedback-upload-
|
|
3961
|
-
const
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
const
|
|
3969
|
-
|
|
3970
|
-
const
|
|
3971
|
-
|
|
4272
|
+
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>';
|
|
4273
|
+
const A = document.createElement("span");
|
|
4274
|
+
A.classList.add("magicfeedback-upload-cta"), A.textContent = n.placeholder.upload.cta(t3);
|
|
4275
|
+
const T = document.createElement("span");
|
|
4276
|
+
T.classList.add("magicfeedback-upload-hint"), T.textContent = (function(e4, t4, i3, r3, o2) {
|
|
4277
|
+
const a2 = [n.placeholder.upload.formats(e4, t4)];
|
|
4278
|
+
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 ");
|
|
4279
|
+
})(t3, i2, m, h, f), E.appendChild(v), E.appendChild(k), E.appendChild(A), E.appendChild(T);
|
|
4280
|
+
const C = document.createElement("div");
|
|
4281
|
+
C.classList.add("magicfeedback-upload-error");
|
|
4282
|
+
const L = document.createElement("ul");
|
|
4283
|
+
L.classList.add("magicfeedback-upload-list"), y.appendChild(E), y.appendChild(C), y.appendChild(L);
|
|
4284
|
+
const x = /* @__PURE__ */ new WeakMap(), S = (e4) => {
|
|
4285
|
+
const t4 = x.get(e4);
|
|
3972
4286
|
return t4 ? Promise.resolve(t4) : new Promise(((t5) => {
|
|
3973
|
-
const i3 = new FileReader(),
|
|
3974
|
-
const
|
|
3975
|
-
|
|
4287
|
+
const i3 = new FileReader(), r3 = (i4) => {
|
|
4288
|
+
const r4 = JSON.stringify({ name: e4.name, type: e4.type, size: e4.size, content: i4 });
|
|
4289
|
+
x.set(e4, r4), t5(r4);
|
|
3976
4290
|
};
|
|
3977
|
-
i3.onload = () =>
|
|
4291
|
+
i3.onload = () => r3("string" == typeof i3.result ? i3.result : ""), i3.onerror = () => r3(""), i3.readAsDataURL(e4);
|
|
3978
4292
|
}));
|
|
3979
|
-
},
|
|
4293
|
+
}, O = [], P = (e4) => {
|
|
3980
4294
|
try {
|
|
3981
|
-
const t4 =
|
|
3982
|
-
t4.forEach(((e5) => i3.items.add(e5))),
|
|
4295
|
+
const t4 = h > 0 ? e4.slice(0, h) : e4, i3 = new DataTransfer();
|
|
4296
|
+
t4.forEach(((e5) => i3.items.add(e5))), v.files = i3.files;
|
|
3983
4297
|
} catch (e5) {
|
|
3984
4298
|
}
|
|
3985
4299
|
!(function() {
|
|
3986
|
-
|
|
3987
|
-
const e5 = Array.from(
|
|
3988
|
-
|
|
3989
|
-
const
|
|
3990
|
-
|
|
3991
|
-
const
|
|
3992
|
-
if (
|
|
4300
|
+
O.forEach(((e6) => URL.revokeObjectURL(e6))), O.length = 0, L.innerHTML = "";
|
|
4301
|
+
const e5 = Array.from(v.files || []);
|
|
4302
|
+
y.classList.toggle("magicfeedback-upload--has-files", e5.length > 0), e5.forEach(((e6, r3) => {
|
|
4303
|
+
const o2 = document.createElement("li");
|
|
4304
|
+
o2.classList.add("magicfeedback-upload-file-item");
|
|
4305
|
+
const a2 = document.createElement("span");
|
|
4306
|
+
if (a2.classList.add("magicfeedback-upload-thumb"), "image" === i2 && e6.type.startsWith("image/")) {
|
|
3993
4307
|
const t4 = URL.createObjectURL(e6);
|
|
3994
|
-
|
|
4308
|
+
O.push(t4);
|
|
3995
4309
|
const i3 = document.createElement("img");
|
|
3996
|
-
i3.src = t4, i3.alt = e6.name,
|
|
3997
|
-
} else
|
|
3998
|
-
const
|
|
3999
|
-
|
|
4310
|
+
i3.src = t4, i3.alt = e6.name, a2.appendChild(i3);
|
|
4311
|
+
} 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>';
|
|
4312
|
+
const s2 = document.createElement("span");
|
|
4313
|
+
s2.classList.add("magicfeedback-upload-file-info");
|
|
4000
4314
|
const d2 = document.createElement("span");
|
|
4001
4315
|
d2.classList.add("magicfeedback-upload-file-name"), d2.textContent = e6.name, d2.title = e6.name;
|
|
4002
4316
|
const c2 = document.createElement("span");
|
|
4003
|
-
c2.classList.add("magicfeedback-upload-file-size"), c2.textContent = l(e6.size),
|
|
4317
|
+
c2.classList.add("magicfeedback-upload-file-size"), c2.textContent = l(e6.size), s2.appendChild(d2), s2.appendChild(c2);
|
|
4004
4318
|
const u2 = document.createElement("button");
|
|
4005
|
-
u2.type = "button", u2.classList.add("magicfeedback-upload-remove"), u2.setAttribute("aria-label", `${
|
|
4006
|
-
e7.preventDefault(), e7.stopPropagation(),
|
|
4007
|
-
})),
|
|
4319
|
+
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) => {
|
|
4320
|
+
e7.preventDefault(), e7.stopPropagation(), P(Array.from(v.files || []).filter(((e8, t4) => t4 !== r3)));
|
|
4321
|
+
})), o2.appendChild(a2), o2.appendChild(s2), o2.appendChild(u2), L.appendChild(o2);
|
|
4008
4322
|
}));
|
|
4009
4323
|
})(), (() => {
|
|
4010
|
-
const e5 = Array.from(
|
|
4011
|
-
|
|
4324
|
+
const e5 = Array.from(v.files || []), t4 = Promise.all(e5.map(S)).then(((e6) => {
|
|
4325
|
+
v[a] = e6;
|
|
4012
4326
|
}));
|
|
4013
|
-
|
|
4327
|
+
v[s] = t4;
|
|
4014
4328
|
})();
|
|
4015
|
-
},
|
|
4016
|
-
if (!e4.length) return
|
|
4329
|
+
}, w = (e4) => {
|
|
4330
|
+
if (!e4.length) return C.textContent = "", void C.classList.remove("is-visible");
|
|
4017
4331
|
const i3 = e4.map(((e5) => e5.name)).join(", ");
|
|
4018
|
-
|
|
4332
|
+
C.textContent = `${n.placeholder.upload.tooLarge(t3, f)}: ${i3}`, C.classList.add("is-visible");
|
|
4019
4333
|
}, N = (e4) => {
|
|
4020
4334
|
if (!g) return { accepted: e4, rejected: [] };
|
|
4021
4335
|
const t4 = [], i3 = [];
|
|
4022
4336
|
return e4.forEach(((e5) => (e5.size <= g ? t4 : i3).push(e5))), { accepted: t4, rejected: i3 };
|
|
4023
4337
|
};
|
|
4024
|
-
|
|
4025
|
-
const { accepted: e4, rejected: t4 } = N(Array.from(
|
|
4026
|
-
|
|
4338
|
+
v.addEventListener("change", (() => {
|
|
4339
|
+
const { accepted: e4, rejected: t4 } = N(Array.from(v.files || []));
|
|
4340
|
+
w(t4), P(e4);
|
|
4027
4341
|
}));
|
|
4028
4342
|
const I = (e4) => {
|
|
4029
4343
|
e4.preventDefault(), e4.stopPropagation();
|
|
@@ -4035,86 +4349,86 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4035
4349
|
})))), E.addEventListener("drop", ((e4) => {
|
|
4036
4350
|
I(e4), E.classList.remove("is-dragover");
|
|
4037
4351
|
const t4 = e4.dataTransfer;
|
|
4038
|
-
let
|
|
4039
|
-
if ("image" === i2 && (
|
|
4040
|
-
const { accepted:
|
|
4041
|
-
if (
|
|
4042
|
-
const
|
|
4043
|
-
|
|
4044
|
-
})), { element:
|
|
4352
|
+
let r3 = t4 ? Array.from(t4.files) : [];
|
|
4353
|
+
if ("image" === i2 && (r3 = r3.filter(((e5) => e5.type.startsWith("image/")))), !r3.length) return;
|
|
4354
|
+
const { accepted: n2, rejected: o2 } = N(r3);
|
|
4355
|
+
if (w(o2), !n2.length) return;
|
|
4356
|
+
const a2 = m ? Array.from(v.files || []) : [];
|
|
4357
|
+
P(a2.concat(n2));
|
|
4358
|
+
})), { element: y, elementTypeClass: p };
|
|
4045
4359
|
};
|
|
4046
4360
|
}, 945: function(e2, t2, i) {
|
|
4047
4361
|
"use strict";
|
|
4048
|
-
var
|
|
4049
|
-
return new (i2 || (i2 = Promise))((function(
|
|
4050
|
-
function
|
|
4362
|
+
var r = this && this.__awaiter || function(e3, t3, i2, r2) {
|
|
4363
|
+
return new (i2 || (i2 = Promise))((function(n2, o2) {
|
|
4364
|
+
function a2(e4) {
|
|
4051
4365
|
try {
|
|
4052
|
-
l2(
|
|
4366
|
+
l2(r2.next(e4));
|
|
4053
4367
|
} catch (e5) {
|
|
4054
|
-
|
|
4368
|
+
o2(e5);
|
|
4055
4369
|
}
|
|
4056
4370
|
}
|
|
4057
|
-
function
|
|
4371
|
+
function s2(e4) {
|
|
4058
4372
|
try {
|
|
4059
|
-
l2(
|
|
4373
|
+
l2(r2.throw(e4));
|
|
4060
4374
|
} catch (e5) {
|
|
4061
|
-
|
|
4375
|
+
o2(e5);
|
|
4062
4376
|
}
|
|
4063
4377
|
}
|
|
4064
4378
|
function l2(e4) {
|
|
4065
4379
|
var t4;
|
|
4066
|
-
e4.done ?
|
|
4380
|
+
e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
4067
4381
|
e5(t4);
|
|
4068
|
-
}))).then(
|
|
4382
|
+
}))).then(a2, s2);
|
|
4069
4383
|
}
|
|
4070
|
-
l2((
|
|
4384
|
+
l2((r2 = r2.apply(e3, t3 || [])).next());
|
|
4071
4385
|
}));
|
|
4072
|
-
},
|
|
4386
|
+
}, n = this && this.__importDefault || function(e3) {
|
|
4073
4387
|
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
4074
4388
|
};
|
|
4075
4389
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.nextAgentTurn = t2.startAgentSurvey = void 0;
|
|
4076
|
-
const
|
|
4077
|
-
function d(e3, t3, i2,
|
|
4390
|
+
const o = n(i(326)), a = i(313), s = i(857), l = i(279);
|
|
4391
|
+
function d(e3, t3, i2, n2, s2) {
|
|
4078
4392
|
var d2;
|
|
4079
|
-
return
|
|
4080
|
-
let
|
|
4393
|
+
return r(this, void 0, void 0, (function* () {
|
|
4394
|
+
let r2;
|
|
4081
4395
|
try {
|
|
4082
|
-
|
|
4396
|
+
r2 = yield (0, o.default)(e3 + t3, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, a.header), body: JSON.stringify(i2) });
|
|
4083
4397
|
} catch (e4) {
|
|
4084
|
-
throw
|
|
4398
|
+
throw n2.err(`[agentSurvey/${s2}] network error`, e4), new l.AgentApiError("NETWORK", (null == e4 ? void 0 : e4.message) || "Network error");
|
|
4085
4399
|
}
|
|
4086
|
-
if (!
|
|
4400
|
+
if (!r2.ok) {
|
|
4087
4401
|
let e4 = null;
|
|
4088
4402
|
try {
|
|
4089
|
-
e4 = yield
|
|
4403
|
+
e4 = yield r2.json();
|
|
4090
4404
|
} catch (e5) {
|
|
4091
4405
|
}
|
|
4092
|
-
const t4 = (0, l.mapAgentStatus)(
|
|
4093
|
-
throw
|
|
4406
|
+
const t4 = (0, l.mapAgentStatus)(r2.status, s2);
|
|
4407
|
+
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) {
|
|
4094
4408
|
var t5, i3;
|
|
4095
|
-
const
|
|
4096
|
-
return Number.isFinite(
|
|
4097
|
-
})(
|
|
4409
|
+
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;
|
|
4410
|
+
return Number.isFinite(n3) && n3 > 0 ? 1e3 * n3 : 6e4;
|
|
4411
|
+
})(r2) : void 0, e4);
|
|
4098
4412
|
}
|
|
4099
4413
|
try {
|
|
4100
|
-
const e4 = yield
|
|
4101
|
-
return
|
|
4414
|
+
const e4 = yield r2.json();
|
|
4415
|
+
return n2.log(`[agentSurvey/${s2}] ok`, e4), e4;
|
|
4102
4416
|
} catch (e4) {
|
|
4103
|
-
throw new l.AgentApiError("MALFORMED", "Unreadable response body",
|
|
4417
|
+
throw new l.AgentApiError("MALFORMED", "Unreadable response body", r2.status);
|
|
4104
4418
|
}
|
|
4105
4419
|
}));
|
|
4106
4420
|
}
|
|
4107
4421
|
t2.startAgentSurvey = function(e3, t3, i2) {
|
|
4108
|
-
return d(e3,
|
|
4422
|
+
return d(e3, s.endpoints.sdk.agentSurveyStart, t3, i2, "start");
|
|
4109
4423
|
}, t2.nextAgentTurn = function(e3, t3, i2) {
|
|
4110
|
-
return d(e3,
|
|
4424
|
+
return d(e3, s.endpoints.sdk.agentSurveyNext, t3, i2, "next");
|
|
4111
4425
|
};
|
|
4112
4426
|
}, 279: (e2, t2) => {
|
|
4113
4427
|
"use strict";
|
|
4114
4428
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.mapAgentStatus = t2.AgentApiError = void 0;
|
|
4115
4429
|
class i extends Error {
|
|
4116
|
-
constructor(e3, t3,
|
|
4117
|
-
super(t3), this.kind = e3, this.status =
|
|
4430
|
+
constructor(e3, t3, r, n, o) {
|
|
4431
|
+
super(t3), this.kind = e3, this.status = r, this.retryAfterMs = n, this.body = o, this.name = "AgentApiError", Object.setPrototypeOf(this, i.prototype);
|
|
4118
4432
|
}
|
|
4119
4433
|
get retryable() {
|
|
4120
4434
|
return "RATE_LIMITED" === this.kind || "AI_UNAVAILABLE" === this.kind || "NETWORK" === this.kind;
|
|
@@ -4126,36 +4440,36 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4126
4440
|
}, 177: (e2, t2, i) => {
|
|
4127
4441
|
"use strict";
|
|
4128
4442
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.encodeAnswer = t2.toAgentStep = t2.ratingBounds = t2.mapAgentType = t2.DEFAULT_ANSWER_DELIMITER = void 0;
|
|
4129
|
-
const
|
|
4443
|
+
const r = i(558), n = i(516);
|
|
4130
4444
|
t2.DEFAULT_ANSWER_DELIMITER = ", ";
|
|
4131
|
-
const
|
|
4132
|
-
function
|
|
4133
|
-
var
|
|
4445
|
+
const o = [r.FEEDBACKAPPANSWERTYPE.RADIO, r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, r.FEEDBACKAPPANSWERTYPE.SELECT, r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE], a = Object.values(r.FEEDBACKAPPANSWERTYPE);
|
|
4446
|
+
function s(e3, t3, i2) {
|
|
4447
|
+
var s2, l2, d2;
|
|
4134
4448
|
const c2 = String(e3 || "").trim().toUpperCase();
|
|
4135
|
-
return "RATING" === c2 ?
|
|
4449
|
+
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) {
|
|
4136
4450
|
if (2 !== e4.length) return false;
|
|
4137
|
-
const i3 = e4.map(((e5) => String(e5).trim().toLowerCase())),
|
|
4138
|
-
return i3[0] ===
|
|
4139
|
-
})(t3, i2.language) ? c2 :
|
|
4451
|
+
const i3 = e4.map(((e5) => String(e5).trim().toLowerCase())), r2 = (0, n.getBooleanOptions)(t4).map(((e5) => e5.toLowerCase())), o2 = ["yes", "no"];
|
|
4452
|
+
return i3[0] === o2[0] && i3[1] === o2[1] || i3[0] === r2[0] && i3[1] === r2[1];
|
|
4453
|
+
})(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);
|
|
4140
4454
|
}
|
|
4141
4455
|
function l(e3) {
|
|
4142
4456
|
const t3 = e3.map(Number).filter(((e4) => Number.isFinite(e4)));
|
|
4143
4457
|
return t3.length >= 2 ? { min: Math.min(...t3), max: Math.max(...t3) } : { min: 1, max: 5 };
|
|
4144
4458
|
}
|
|
4145
4459
|
function d(e3, t3, i2) {
|
|
4146
|
-
const
|
|
4147
|
-
return e3 !==
|
|
4460
|
+
const n2 = { randomPosition: false, direction: "row", order: "ltr" };
|
|
4461
|
+
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) || {});
|
|
4148
4462
|
}
|
|
4149
4463
|
function c(e3, t3, i2) {
|
|
4150
|
-
var
|
|
4151
|
-
const { full: l2, title: c2 } = t3, u = [...null !== (
|
|
4152
|
-
return { id: (null == l2 ? void 0 : l2.id) || `agent-${i2.sessionId}-${e3.currentTurn}`, title: c2 || "", type: p, questionType: { conf: null }, ref:
|
|
4464
|
+
var r2, n2, o2, a2;
|
|
4465
|
+
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}`;
|
|
4466
|
+
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" };
|
|
4153
4467
|
}
|
|
4154
|
-
t2.mapAgentType =
|
|
4155
|
-
var i2,
|
|
4156
|
-
const
|
|
4157
|
-
if (
|
|
4158
|
-
if (true ===
|
|
4468
|
+
t2.mapAgentType = s, t2.ratingBounds = l, t2.toAgentStep = function(e3, t3) {
|
|
4469
|
+
var i2, n2, o2;
|
|
4470
|
+
const a2 = e3, s2 = e3.currentTurn, l2 = e3.maxTurns, d2 = a2.coverageSummary, u = (e4) => ({ kind: "END", reason: e4, currentTurn: s2, maxTurns: l2, coverageSummary: d2 });
|
|
4471
|
+
if (a2.answerType === r.AGENT_ANSWER_TYPE_BLOCKED) return u("BLOCKED");
|
|
4472
|
+
if (true === a2.shouldEnd) return u("SHOULD_END");
|
|
4159
4473
|
const p = (function(e4) {
|
|
4160
4474
|
const t4 = e4.question && "object" == typeof e4.question ? e4.question : e4.nextQuestion && "object" == typeof e4.nextQuestion ? e4.nextQuestion : null;
|
|
4161
4475
|
if (t4) {
|
|
@@ -4164,343 +4478,125 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4164
4478
|
}
|
|
4165
4479
|
return { full: null, title: "string" == typeof e4.nextQuestion ? e4.nextQuestion : null };
|
|
4166
4480
|
})(e3);
|
|
4167
|
-
return "NONE" === String(null !== (
|
|
4168
|
-
}, t2.encodeAnswer = function(e3, i2,
|
|
4169
|
-
const
|
|
4170
|
-
return [
|
|
4481
|
+
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");
|
|
4482
|
+
}, t2.encodeAnswer = function(e3, i2, r2 = t2.DEFAULT_ANSWER_DELIMITER) {
|
|
4483
|
+
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}`)));
|
|
4484
|
+
return [a2.filter(((e4, t3) => a2.indexOf(e4) === t3)).join(r2), s2.join(r2)].filter(((e4) => "" !== e4)).join(r2);
|
|
4171
4485
|
};
|
|
4172
4486
|
}, 107: (e2, t2, i) => {
|
|
4173
4487
|
"use strict";
|
|
4174
4488
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.scrapeInputs = void 0;
|
|
4175
|
-
const
|
|
4489
|
+
const r = i(571);
|
|
4176
4490
|
t2.scrapeInputs = function(e3) {
|
|
4177
|
-
const t3 = e3.querySelectorAll(".magicfeedback-input"), i2 = [],
|
|
4491
|
+
const t3 = e3.querySelectorAll(".magicfeedback-input"), i2 = [], n = {};
|
|
4178
4492
|
return t3.forEach(((e4) => {
|
|
4179
4493
|
var t4;
|
|
4180
|
-
const
|
|
4181
|
-
if (!
|
|
4182
|
-
const
|
|
4183
|
-
if (("radio" ===
|
|
4184
|
-
const l =
|
|
4185
|
-
if ((null == d ? void 0 : d.includes("magicfeedback-priority-list")) || (null === (t4 =
|
|
4494
|
+
const o = e4, a = o.name;
|
|
4495
|
+
if (!a) return;
|
|
4496
|
+
const s = o.type;
|
|
4497
|
+
if (("radio" === s || "checkbox" === s) && !o.checked) return;
|
|
4498
|
+
const l = o.value, d = o.classList[0];
|
|
4499
|
+
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);
|
|
4186
4500
|
if (null == d ? void 0 : d.includes("magicfeedback-upload")) {
|
|
4187
|
-
const e5 = (0,
|
|
4188
|
-
return void (e5.length && i2.push({ key:
|
|
4501
|
+
const e5 = (0, r.getUploadValues)(o);
|
|
4502
|
+
return void (e5.length && i2.push({ key: a, value: e5 }));
|
|
4189
4503
|
}
|
|
4190
|
-
const c = "magicfeedback-consent" === d ?
|
|
4191
|
-
null != c && i2.push({ key:
|
|
4192
|
-
})), Object.entries(
|
|
4193
|
-
const
|
|
4194
|
-
i2.push({ key: e4, value:
|
|
4504
|
+
const c = "magicfeedback-consent" === d ? o.checked.toString() : l;
|
|
4505
|
+
null != c && i2.push({ key: a, value: [c] });
|
|
4506
|
+
})), Object.entries(n).forEach((([e4, t4]) => {
|
|
4507
|
+
const r2 = t4.slice().sort(((e5, t5) => Number(e5.split(".")[0]) - Number(t5.split(".")[0])));
|
|
4508
|
+
i2.push({ key: e4, value: r2 });
|
|
4195
4509
|
})), i2;
|
|
4196
4510
|
};
|
|
4511
|
+
}, 881: (e2, t2) => {
|
|
4512
|
+
"use strict";
|
|
4513
|
+
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;
|
|
4514
|
+
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.' } };
|
|
4515
|
+
t2.SUPPORTED_LANGUAGES = ["en", "da", "fi", "no", "es", "sv", "ar", "bn", "de", "pt", "fr"], t2.AVAILABLE_LANGUAGES = Object.keys(r), t2.RTL_LANGUAGES = ["ar"];
|
|
4516
|
+
const n = { nb: "no", nn: "no", nob: "no", nno: "no", iw: "he", in: "id", cmn: "zh" };
|
|
4517
|
+
function o(e3) {
|
|
4518
|
+
if (!e3) return null;
|
|
4519
|
+
const t3 = e3.trim().toLowerCase().replace(/_/g, "-");
|
|
4520
|
+
if (!t3) return null;
|
|
4521
|
+
if (r[t3]) return t3;
|
|
4522
|
+
const i2 = t3.split("-")[0], o2 = n[i2] || i2;
|
|
4523
|
+
return r[o2] ? o2 : null;
|
|
4524
|
+
}
|
|
4525
|
+
function a(e3) {
|
|
4526
|
+
return o(e3) || "en";
|
|
4527
|
+
}
|
|
4528
|
+
t2.normalizeLanguage = a, t2.TRANSLATION_KEYS = Object.keys(i), t2.hasOwnTranslation = function(e3, t3) {
|
|
4529
|
+
const i2 = o(e3);
|
|
4530
|
+
return !!i2 && void 0 !== r[i2][t3];
|
|
4531
|
+
}, t2.isRtlLanguage = function(e3) {
|
|
4532
|
+
return -1 !== t2.RTL_LANGUAGES.indexOf(a(e3));
|
|
4533
|
+
}, t2.isLanguageSupported = function(e3) {
|
|
4534
|
+
const i2 = o(e3);
|
|
4535
|
+
return !!i2 && -1 !== t2.SUPPORTED_LANGUAGES.indexOf(i2);
|
|
4536
|
+
}, t2.t = function(e3, t3, n2) {
|
|
4537
|
+
const o2 = r[a(e3)] || i, s = void 0 !== o2[t3] ? o2[t3] : i[t3];
|
|
4538
|
+
return n2 ? (function(e4, t4) {
|
|
4539
|
+
return Object.keys(t4).reduce(((e5, i2) => e5.replace(new RegExp("\\{" + i2 + "\\}", "g"), String(t4[i2]))), e4);
|
|
4540
|
+
})(s, n2) : s;
|
|
4541
|
+
};
|
|
4197
4542
|
}, 857: (e2, t2) => {
|
|
4198
4543
|
"use strict";
|
|
4199
4544
|
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" } };
|
|
4200
|
-
}, 784: (e2, t2) => {
|
|
4545
|
+
}, 784: (e2, t2, i) => {
|
|
4201
4546
|
"use strict";
|
|
4202
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.placeholder = void 0
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
default:
|
|
4206
|
-
return "Write your answer here...";
|
|
4207
|
-
case "es":
|
|
4208
|
-
return "Escribe tu respuesta aqu\xED...";
|
|
4209
|
-
case "da":
|
|
4210
|
-
return "Skriv dit svar her...";
|
|
4211
|
-
case "fi":
|
|
4212
|
-
return "Kirjoita vastauksesi t\xE4h\xE4n...";
|
|
4213
|
-
case "sv":
|
|
4214
|
-
return "Skriv ditt svar h\xE4r...";
|
|
4215
|
-
case "no":
|
|
4216
|
-
return "Skriv svaret ditt her...";
|
|
4217
|
-
case "ar":
|
|
4218
|
-
return "\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0647\u0646\u0627...";
|
|
4219
|
-
case "bn":
|
|
4220
|
-
return "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0";
|
|
4221
|
-
}
|
|
4222
|
-
}, number: (e3) => {
|
|
4223
|
-
switch (e3) {
|
|
4224
|
-
case "en":
|
|
4225
|
-
default:
|
|
4226
|
-
return "Write your number here...";
|
|
4227
|
-
case "es":
|
|
4228
|
-
return "Escribe tu n\xFAmero aqu\xED...";
|
|
4229
|
-
case "da":
|
|
4230
|
-
return "Skriv dit nummer her...";
|
|
4231
|
-
case "fi":
|
|
4232
|
-
return "Kirjoita numerosi t\xE4h\xE4n...";
|
|
4233
|
-
case "sv":
|
|
4234
|
-
return "Skriv ditt nummer h\xE4r...";
|
|
4235
|
-
case "no":
|
|
4236
|
-
return "Skriv nummeret ditt her...";
|
|
4237
|
-
case "ar":
|
|
4238
|
-
return "\u0627\u0643\u062A\u0628 \u0631\u0642\u0645\u0643 \u0647\u0646\u0627...";
|
|
4239
|
-
case "bn":
|
|
4240
|
-
return "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0";
|
|
4241
|
-
}
|
|
4242
|
-
}, email: (e3) => {
|
|
4243
|
-
switch (e3) {
|
|
4244
|
-
case "en":
|
|
4245
|
-
default:
|
|
4246
|
-
return "Write your email here...";
|
|
4247
|
-
case "es":
|
|
4248
|
-
return "Escribe tu correo electr\xF3nico aqu\xED...";
|
|
4249
|
-
case "da":
|
|
4250
|
-
return "Skriv din e-mail her...";
|
|
4251
|
-
case "fi":
|
|
4252
|
-
return "Kirjoita s\xE4hk\xF6postiosoitteesi t\xE4h\xE4n...";
|
|
4253
|
-
case "sv":
|
|
4254
|
-
return "Skriv din e-post h\xE4r...";
|
|
4255
|
-
case "no":
|
|
4256
|
-
return "Skriv e-posten din her...";
|
|
4257
|
-
case "ar":
|
|
4258
|
-
return "\u0627\u0643\u062A\u0628 \u0628\u0631\u064A\u062F\u0643 \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A \u0647\u0646\u0627...";
|
|
4259
|
-
case "bn":
|
|
4260
|
-
return "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0";
|
|
4261
|
-
}
|
|
4262
|
-
}, date: (e3) => {
|
|
4263
|
-
switch (e3) {
|
|
4264
|
-
case "en":
|
|
4265
|
-
default:
|
|
4266
|
-
return "Write your date here...";
|
|
4267
|
-
case "es":
|
|
4268
|
-
return "Escribe tu fecha aqu\xED...";
|
|
4269
|
-
case "da":
|
|
4270
|
-
return "Skriv din dato her...";
|
|
4271
|
-
case "fi":
|
|
4272
|
-
return "Kirjoita p\xE4iv\xE4m\xE4\xE4r\xE4si t\xE4h\xE4n...";
|
|
4273
|
-
case "sv":
|
|
4274
|
-
return "Skriv ditt datum h\xE4r...";
|
|
4275
|
-
case "no":
|
|
4276
|
-
return "Skriv datoen din her...";
|
|
4277
|
-
case "ar":
|
|
4278
|
-
return "\u0627\u0643\u062A\u0628 \u062A\u0627\u0631\u064A\u062E\u0643 \u0647\u0646\u0627...";
|
|
4279
|
-
case "bn":
|
|
4280
|
-
return "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0";
|
|
4281
|
-
}
|
|
4282
|
-
}, password: (e3) => {
|
|
4283
|
-
switch (e3) {
|
|
4284
|
-
case "en":
|
|
4285
|
-
default:
|
|
4286
|
-
return "Write your password here...";
|
|
4287
|
-
case "es":
|
|
4288
|
-
return "Escribe tu contrase\xF1a aqu\xED...";
|
|
4289
|
-
case "da":
|
|
4290
|
-
return "Skriv dit kodeord her...";
|
|
4291
|
-
case "fi":
|
|
4292
|
-
return "Kirjoita salasanasi t\xE4h\xE4n...";
|
|
4293
|
-
case "sv":
|
|
4294
|
-
return "Skriv ditt l\xF6senord h\xE4r...";
|
|
4295
|
-
case "no":
|
|
4296
|
-
return "Skriv passordet ditt her...";
|
|
4297
|
-
case "ar":
|
|
4298
|
-
return "\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...";
|
|
4299
|
-
case "bn":
|
|
4300
|
-
return "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0";
|
|
4301
|
-
}
|
|
4302
|
-
}, pointsystemerror: (e3) => {
|
|
4303
|
-
switch (e3) {
|
|
4304
|
-
case "en":
|
|
4305
|
-
default:
|
|
4306
|
-
return "The total points must be 100 %";
|
|
4307
|
-
case "es":
|
|
4308
|
-
return "El total de puntos debe ser 100 %";
|
|
4309
|
-
case "da":
|
|
4310
|
-
return "Samlet antal point skal v\xE6re 100 %";
|
|
4311
|
-
case "fi":
|
|
4312
|
-
return "Kokonaispisteiden on oltava 100 %";
|
|
4313
|
-
case "sv":
|
|
4314
|
-
return "Totala po\xE4ng m\xE5ste vara 100 %";
|
|
4315
|
-
case "no":
|
|
4316
|
-
return "Totalt antall poeng m\xE5 v\xE6re 100 %";
|
|
4317
|
-
case "ar":
|
|
4318
|
-
return "\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 %";
|
|
4319
|
-
case "bn":
|
|
4320
|
-
return "\u09AE\u09CB\u099F \u09AA\u09AF\u09BC\u09C7\u09A8\u09CD\u099F 100 % \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7";
|
|
4321
|
-
}
|
|
4322
|
-
}, upload: { cta: (e3) => {
|
|
4323
|
-
switch (e3) {
|
|
4324
|
-
case "es":
|
|
4325
|
-
return "Arrastra y suelta o haz clic para subir";
|
|
4326
|
-
case "da":
|
|
4327
|
-
return "Tr\xE6k og slip eller klik for at uploade";
|
|
4328
|
-
case "fi":
|
|
4329
|
-
return "Ved\xE4 ja pudota tai napsauta ladataksesi";
|
|
4330
|
-
case "sv":
|
|
4331
|
-
return "Dra och sl\xE4pp eller klicka f\xF6r att ladda upp";
|
|
4332
|
-
case "no":
|
|
4333
|
-
return "Dra og slipp eller klikk for \xE5 laste opp";
|
|
4334
|
-
case "ar":
|
|
4335
|
-
return "\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u062D\u0645\u064A\u0644";
|
|
4336
|
-
case "bn":
|
|
4337
|
-
return "\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";
|
|
4338
|
-
default:
|
|
4339
|
-
return "Drag & drop or click to upload";
|
|
4340
|
-
}
|
|
4341
|
-
}, formats: (e3, t3) => {
|
|
4342
|
-
if ("image" === t3) switch (e3) {
|
|
4343
|
-
case "es":
|
|
4344
|
-
return "Solo im\xE1genes";
|
|
4345
|
-
case "da":
|
|
4346
|
-
return "Kun billeder";
|
|
4347
|
-
case "fi":
|
|
4348
|
-
return "Vain kuvat";
|
|
4349
|
-
case "sv":
|
|
4350
|
-
return "Endast bilder";
|
|
4351
|
-
case "no":
|
|
4352
|
-
return "Kun bilder";
|
|
4353
|
-
case "ar":
|
|
4354
|
-
return "\u0627\u0644\u0635\u0648\u0631 \u0641\u0642\u0637";
|
|
4355
|
-
case "bn":
|
|
4356
|
-
return "\u09B6\u09C1\u09A7\u09C1\u09AE\u09BE\u09A4\u09CD\u09B0 \u099B\u09AC\u09BF";
|
|
4357
|
-
default:
|
|
4358
|
-
return "Images only";
|
|
4359
|
-
}
|
|
4360
|
-
switch (e3) {
|
|
4361
|
-
case "es":
|
|
4362
|
-
return "Cualquier tipo de archivo";
|
|
4363
|
-
case "da":
|
|
4364
|
-
return "Enhver filtype";
|
|
4365
|
-
case "fi":
|
|
4366
|
-
return "Mik\xE4 tahansa tiedostotyyppi";
|
|
4367
|
-
case "sv":
|
|
4368
|
-
return "Alla filtyper";
|
|
4369
|
-
case "no":
|
|
4370
|
-
return "Alle filtyper";
|
|
4371
|
-
case "ar":
|
|
4372
|
-
return "\u0623\u064A \u0646\u0648\u0639 \u0645\u0646 \u0627\u0644\u0645\u0644\u0641\u0627\u062A";
|
|
4373
|
-
case "bn":
|
|
4374
|
-
return "\u09AF\u09C7\u0995\u09CB\u09A8\u09CB \u09A7\u09B0\u09A8\u09C7\u09B0 \u09AB\u09BE\u0987\u09B2";
|
|
4375
|
-
default:
|
|
4376
|
-
return "Any file type";
|
|
4377
|
-
}
|
|
4378
|
-
}, maxFiles: (e3, t3) => {
|
|
4379
|
-
switch (e3) {
|
|
4380
|
-
case "es":
|
|
4381
|
-
return `M\xE1x. ${t3} archivos`;
|
|
4382
|
-
case "da":
|
|
4383
|
-
return `Maks. ${t3} filer`;
|
|
4384
|
-
case "fi":
|
|
4385
|
-
return `Enint\xE4\xE4n ${t3} tiedostoa`;
|
|
4386
|
-
case "sv":
|
|
4387
|
-
return `Max ${t3} filer`;
|
|
4388
|
-
case "no":
|
|
4389
|
-
return `Maks ${t3} filer`;
|
|
4390
|
-
case "ar":
|
|
4391
|
-
return `${t3} \u0645\u0644\u0641\u0627\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649`;
|
|
4392
|
-
case "bn":
|
|
4393
|
-
return `\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A ${t3}\u099F\u09BF \u09AB\u09BE\u0987\u09B2`;
|
|
4394
|
-
default:
|
|
4395
|
-
return `Max ${t3} files`;
|
|
4396
|
-
}
|
|
4397
|
-
}, maxSize: (e3, t3) => {
|
|
4398
|
-
switch (e3) {
|
|
4399
|
-
case "es":
|
|
4400
|
-
return `M\xE1x. ${t3} MB`;
|
|
4401
|
-
case "da":
|
|
4402
|
-
return `Maks. ${t3} MB`;
|
|
4403
|
-
case "fi":
|
|
4404
|
-
return `Enint\xE4\xE4n ${t3} MB`;
|
|
4405
|
-
case "sv":
|
|
4406
|
-
case "en":
|
|
4407
|
-
default:
|
|
4408
|
-
return `Max ${t3} MB`;
|
|
4409
|
-
case "no":
|
|
4410
|
-
return `Maks ${t3} MB`;
|
|
4411
|
-
case "ar":
|
|
4412
|
-
return `${t3} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649`;
|
|
4413
|
-
case "bn":
|
|
4414
|
-
return `\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A ${t3} MB`;
|
|
4415
|
-
}
|
|
4416
|
-
}, tooLarge: (e3, t3) => {
|
|
4417
|
-
switch (e3) {
|
|
4418
|
-
case "es":
|
|
4419
|
-
return `Archivo demasiado grande (m\xE1x. ${t3} MB)`;
|
|
4420
|
-
case "da":
|
|
4421
|
-
return `Filen er for stor (maks. ${t3} MB)`;
|
|
4422
|
-
case "fi":
|
|
4423
|
-
return `Tiedosto on liian suuri (enint\xE4\xE4n ${t3} MB)`;
|
|
4424
|
-
case "sv":
|
|
4425
|
-
return `Filen \xE4r f\xF6r stor (max ${t3} MB)`;
|
|
4426
|
-
case "no":
|
|
4427
|
-
return `Filen er for stor (maks ${t3} MB)`;
|
|
4428
|
-
case "ar":
|
|
4429
|
-
return `\u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 ${t3} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A)`;
|
|
4430
|
-
case "bn":
|
|
4431
|
-
return `\u09AB\u09BE\u0987\u09B2\u099F\u09BF \u0996\u09C1\u09AC \u09AC\u09A1\u09BC (\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A ${t3} MB)`;
|
|
4432
|
-
default:
|
|
4433
|
-
return `File is too large (max ${t3} MB)`;
|
|
4434
|
-
}
|
|
4435
|
-
}, remove: (e3) => {
|
|
4436
|
-
switch (e3) {
|
|
4437
|
-
case "es":
|
|
4438
|
-
return "Eliminar";
|
|
4439
|
-
case "da":
|
|
4440
|
-
case "no":
|
|
4441
|
-
return "Fjern";
|
|
4442
|
-
case "fi":
|
|
4443
|
-
return "Poista";
|
|
4444
|
-
case "sv":
|
|
4445
|
-
return "Ta bort";
|
|
4446
|
-
case "ar":
|
|
4447
|
-
return "\u0625\u0632\u0627\u0644\u0629";
|
|
4448
|
-
case "bn":
|
|
4449
|
-
return "\u09B8\u09B0\u09BE\u09A8";
|
|
4450
|
-
default:
|
|
4451
|
-
return "Remove";
|
|
4452
|
-
}
|
|
4453
|
-
} } };
|
|
4547
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.placeholder = void 0;
|
|
4548
|
+
const r = i(881);
|
|
4549
|
+
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") } };
|
|
4454
4550
|
}, 213: (e2, t2, i) => {
|
|
4455
4551
|
"use strict";
|
|
4456
4552
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderStartMessage = t2.renderSuccess = t2.renderError = t2.renderActions = t2.renderQuestions = void 0;
|
|
4457
|
-
const
|
|
4458
|
-
t2.renderQuestions = function e3(t3, i2 = "standard",
|
|
4553
|
+
const r = i(42), n = i(516), o = { small: "1rem", medium: "1.2rem", large: "1.5rem" };
|
|
4554
|
+
t2.renderQuestions = function e3(t3, i2 = "standard", a = "en", s = { customIcons: false }, l) {
|
|
4459
4555
|
if (!t3) throw new Error("[MagicFeedback] No questions provided");
|
|
4460
|
-
const d = [], { customIcons: c, id: u } =
|
|
4556
|
+
const d = [], { customIcons: c, id: u } = s;
|
|
4461
4557
|
return t3.forEach(((p) => {
|
|
4462
|
-
var
|
|
4463
|
-
if ((null === (
|
|
4558
|
+
var m, h;
|
|
4559
|
+
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) {
|
|
4464
4560
|
let t4 = document.createElement("div");
|
|
4465
4561
|
t4.classList.add("magicfeedback-div");
|
|
4466
|
-
const
|
|
4467
|
-
|
|
4562
|
+
const r2 = document.createElement("label");
|
|
4563
|
+
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) => {
|
|
4468
4564
|
e4.ref = p.ref, p.assets[e4.id] && (e4.assets = { placeholder: p.assets[e4.id] });
|
|
4469
|
-
})), e3(p.questionType.conf, i2,
|
|
4565
|
+
})), e3(p.questionType.conf, i2, a, s, l).forEach(((e4) => {
|
|
4470
4566
|
t4.appendChild(e4);
|
|
4471
4567
|
})), d.push(t4);
|
|
4472
4568
|
} else {
|
|
4473
|
-
const e4 = (function(e5, t4, i3,
|
|
4569
|
+
const e4 = (function(e5, t4, i3, a2, s2) {
|
|
4474
4570
|
var l2, d2, c2;
|
|
4475
|
-
let u2, p2, { id:
|
|
4571
|
+
let u2, p2, { id: m2, title: h2, type: f, ref: g, require: y, defaultValue: v, assets: b } = e5, E = document.createElement("div");
|
|
4476
4572
|
E.classList.add("magicfeedback-div");
|
|
4477
|
-
const
|
|
4478
|
-
if (!
|
|
4573
|
+
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);
|
|
4574
|
+
if (!O) return E;
|
|
4479
4575
|
{
|
|
4480
|
-
const
|
|
4481
|
-
u2 =
|
|
4576
|
+
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 });
|
|
4577
|
+
u2 = r2.element, p2 = r2.elementTypeClass;
|
|
4482
4578
|
}
|
|
4483
|
-
u2.id = `magicfeedback-${
|
|
4484
|
-
const
|
|
4485
|
-
|
|
4579
|
+
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);
|
|
4580
|
+
const P = document.createElement("label");
|
|
4581
|
+
P.setAttribute("for", `magicfeedback-${m2}`), P.textContent = (0, n.parseTitle)(h2, i3), P.classList.add("magicfeedback-label"), (function(e6, t5) {
|
|
4486
4582
|
if ("INFO_PAGE" !== t5.type) return;
|
|
4487
|
-
const { assets: i4 } = t5,
|
|
4488
|
-
if (e7) return
|
|
4489
|
-
})(null == i4 ? void 0 : i4.titleSize),
|
|
4490
|
-
var
|
|
4491
|
-
|
|
4492
|
-
})(
|
|
4493
|
-
const
|
|
4494
|
-
if (
|
|
4583
|
+
const { assets: i4 } = t5, r2 = (function(e7) {
|
|
4584
|
+
if (e7) return o[e7] || e7;
|
|
4585
|
+
})(null == i4 ? void 0 : i4.titleSize), n2 = (a3 = null == i4 ? void 0 : i4.titleStyle, Array.isArray(a3) ? a3 : a3 ? [a3] : []);
|
|
4586
|
+
var a3;
|
|
4587
|
+
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");
|
|
4588
|
+
})(P, e5);
|
|
4589
|
+
const w = document.createElement("label");
|
|
4590
|
+
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);
|
|
4495
4591
|
else {
|
|
4496
|
-
if ("slim" !== t4 && (E.appendChild(
|
|
4592
|
+
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))) {
|
|
4497
4593
|
const e6 = document.createElement("img");
|
|
4498
4594
|
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);
|
|
4499
4595
|
}
|
|
4500
|
-
if ("LONGTEXT" === f &&
|
|
4596
|
+
if ("LONGTEXT" === f && C > 0) {
|
|
4501
4597
|
const e6 = document.createElement("div");
|
|
4502
|
-
if (e6.classList.add("magicfeedback-counter"), e6.textContent = `${u2.value.length}/${
|
|
4503
|
-
e6.textContent = `${u2.value.length}/${
|
|
4598
|
+
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", (() => {
|
|
4599
|
+
e6.textContent = `${u2.value.length}/${C}`;
|
|
4504
4600
|
})), E.appendChild(u2), E.appendChild(e6), (null == b ? void 0 : b.extraOption) && (null == b ? void 0 : b.extraOptionText)) {
|
|
4505
4601
|
const e7 = document.createElement("div");
|
|
4506
4602
|
e7.classList.add("magicfeedback-skip-container"), e7.classList.add("magicfeedback-checkbox-container"), e7.style.display = "flex", e7.style.justifyContent = "flex-start";
|
|
@@ -4508,124 +4604,124 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4508
4604
|
t5.classList.add("magicfeedback-skip"), t5.type = "checkbox", t5.id = `skip-${g}`, t5.name = g, t5.value = "-", t5.style.cursor = "pointer";
|
|
4509
4605
|
const i4 = document.createElement("label");
|
|
4510
4606
|
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", (() => {
|
|
4511
|
-
u2.value = "-",
|
|
4607
|
+
u2.value = "-", s2 && s2();
|
|
4512
4608
|
})), e7.appendChild(t5), e7.appendChild(i4), E.appendChild(e7);
|
|
4513
4609
|
}
|
|
4514
4610
|
} else E.appendChild(u2);
|
|
4515
4611
|
}
|
|
4516
4612
|
return E;
|
|
4517
|
-
})(p, i2,
|
|
4613
|
+
})(p, i2, a, "https://survey-dev.magicfeedback.io/assets/emojis" + (c ? `/${u}` : ""), 1 === t3.length ? l : void 0);
|
|
4518
4614
|
d.push(e4);
|
|
4519
4615
|
}
|
|
4520
4616
|
})), d;
|
|
4521
|
-
}, t2.renderActions = function(e3 = "", t3, i2 = "Submit",
|
|
4522
|
-
const
|
|
4523
|
-
|
|
4524
|
-
const o = document.createElement("button");
|
|
4525
|
-
o.id = "magicfeedback-submit", o.type = "submit", o.classList.add("magicfeedback-submit"), o.textContent = "MAGICSURVEY" === e3 ? r2 || "Next" : i2 || "Submit";
|
|
4617
|
+
}, t2.renderActions = function(e3 = "", t3, i2 = "Submit", r2 = "Back", n2 = "Next") {
|
|
4618
|
+
const o2 = document.createElement("div");
|
|
4619
|
+
o2.classList.add("magicfeedback-action-container");
|
|
4526
4620
|
const a = document.createElement("button");
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4621
|
+
a.id = "magicfeedback-submit", a.type = "submit", a.classList.add("magicfeedback-submit"), a.textContent = "MAGICSURVEY" === e3 ? n2 || "Next" : i2 || "Submit";
|
|
4622
|
+
const s = document.createElement("button");
|
|
4623
|
+
return s.id = "magicfeedback-back", s.type = "button", s.classList.add("magicfeedback-back"), s.textContent = r2 || "Back", s.addEventListener("click", t3), s.addEventListener("click", (() => {
|
|
4624
|
+
a.removeAttribute("disabled");
|
|
4625
|
+
})), "MAGICSURVEY" === e3 && o2.appendChild(s), o2.appendChild(a), o2;
|
|
4530
4626
|
}, t2.renderError = function(e3) {
|
|
4531
4627
|
const t3 = document.createElement("div");
|
|
4532
4628
|
return t3.classList.add("magicfeedback-error"), t3.textContent = e3, t3;
|
|
4533
4629
|
}, t2.renderSuccess = function(e3) {
|
|
4534
4630
|
const t3 = document.createElement("div");
|
|
4535
4631
|
return t3.classList.add("magicfeedback-success"), t3.textContent = e3, t3;
|
|
4536
|
-
}, t2.renderStartMessage = function(e3, t3 = false, i2 = "Go!",
|
|
4632
|
+
}, t2.renderStartMessage = function(e3, t3 = false, i2 = "Go!", r2 = () => {
|
|
4537
4633
|
}) {
|
|
4538
|
-
const
|
|
4539
|
-
|
|
4540
|
-
const
|
|
4541
|
-
if (
|
|
4634
|
+
const n2 = document.createElement("div");
|
|
4635
|
+
n2.classList.add("magicfeedback-start-message-container");
|
|
4636
|
+
const o2 = document.createElement("div");
|
|
4637
|
+
if (o2.classList.add("magicfeedback-start-message"), o2.innerHTML = e3, n2.appendChild(o2), t3) {
|
|
4542
4638
|
const e4 = document.createElement("button");
|
|
4543
|
-
e4.id = "magicfeedback-start-message-button", e4.classList.add("magicfeedback-start-message-button"), e4.textContent = i2, e4.addEventListener("click", (() =>
|
|
4639
|
+
e4.id = "magicfeedback-start-message-button", e4.classList.add("magicfeedback-start-message-button"), e4.textContent = i2, e4.addEventListener("click", (() => r2())), n2.appendChild(e4);
|
|
4544
4640
|
}
|
|
4545
|
-
return
|
|
4641
|
+
return n2;
|
|
4546
4642
|
};
|
|
4547
4643
|
}, 313: function(e2, t2, i) {
|
|
4548
4644
|
"use strict";
|
|
4549
|
-
var
|
|
4550
|
-
return new (i2 || (i2 = Promise))((function(
|
|
4551
|
-
function
|
|
4645
|
+
var r = this && this.__awaiter || function(e3, t3, i2, r2) {
|
|
4646
|
+
return new (i2 || (i2 = Promise))((function(n2, o2) {
|
|
4647
|
+
function a2(e4) {
|
|
4552
4648
|
try {
|
|
4553
|
-
l(
|
|
4649
|
+
l(r2.next(e4));
|
|
4554
4650
|
} catch (e5) {
|
|
4555
|
-
|
|
4651
|
+
o2(e5);
|
|
4556
4652
|
}
|
|
4557
4653
|
}
|
|
4558
|
-
function
|
|
4654
|
+
function s2(e4) {
|
|
4559
4655
|
try {
|
|
4560
|
-
l(
|
|
4656
|
+
l(r2.throw(e4));
|
|
4561
4657
|
} catch (e5) {
|
|
4562
|
-
|
|
4658
|
+
o2(e5);
|
|
4563
4659
|
}
|
|
4564
4660
|
}
|
|
4565
4661
|
function l(e4) {
|
|
4566
4662
|
var t4;
|
|
4567
|
-
e4.done ?
|
|
4663
|
+
e4.done ? n2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
4568
4664
|
e5(t4);
|
|
4569
|
-
}))).then(
|
|
4665
|
+
}))).then(a2, s2);
|
|
4570
4666
|
}
|
|
4571
|
-
l((
|
|
4667
|
+
l((r2 = r2.apply(e3, t3 || [])).next());
|
|
4572
4668
|
}));
|
|
4573
|
-
},
|
|
4669
|
+
}, n = this && this.__importDefault || function(e3) {
|
|
4574
4670
|
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
4575
4671
|
};
|
|
4576
4672
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.getFollowUpQuestion = t2.sendFeedback = t2.getQuestions = t2.getSessionForm = t2.getForm = t2.validateEmail = t2.header = void 0;
|
|
4577
|
-
const
|
|
4578
|
-
t2.header = { Accept: "application/json", "Magicfeedback-Sdk-Version":
|
|
4673
|
+
const o = n(i(326)), a = n(i(330)), s = i(857);
|
|
4674
|
+
t2.header = { Accept: "application/json", "Magicfeedback-Sdk-Version": a.default.version, "x-magicfeedback-parameters": window.location.search || "" }, t2.validateEmail = function(e3) {
|
|
4579
4675
|
return /\S+@\S+\.\S+/.test(e3);
|
|
4580
|
-
}, t2.getForm = function(e3, i2,
|
|
4581
|
-
return
|
|
4676
|
+
}, t2.getForm = function(e3, i2, n2, a2) {
|
|
4677
|
+
return r(this, void 0, void 0, (function* () {
|
|
4582
4678
|
try {
|
|
4583
|
-
const
|
|
4584
|
-
return yield
|
|
4679
|
+
const r2 = yield (0, o.default)(e3 + s.endpoints.sdk.app_info(i2, n2), { method: "GET", headers: t2.header });
|
|
4680
|
+
return yield r2.json();
|
|
4585
4681
|
} catch (e4) {
|
|
4586
|
-
|
|
4682
|
+
a2.err(e4);
|
|
4587
4683
|
}
|
|
4588
4684
|
}));
|
|
4589
|
-
}, t2.getSessionForm = function(e3, i2,
|
|
4590
|
-
return
|
|
4685
|
+
}, t2.getSessionForm = function(e3, i2, n2) {
|
|
4686
|
+
return r(this, void 0, void 0, (function* () {
|
|
4591
4687
|
try {
|
|
4592
|
-
const
|
|
4593
|
-
return yield
|
|
4688
|
+
const r2 = yield (0, o.default)(e3 + s.endpoints.sdk.session(i2), { method: "GET", headers: t2.header });
|
|
4689
|
+
return yield r2.json();
|
|
4594
4690
|
} catch (e4) {
|
|
4595
|
-
|
|
4691
|
+
n2.err(e4);
|
|
4596
4692
|
}
|
|
4597
4693
|
}));
|
|
4598
|
-
}, t2.getQuestions = function(e3, i2,
|
|
4599
|
-
return
|
|
4694
|
+
}, t2.getQuestions = function(e3, i2, n2, a2) {
|
|
4695
|
+
return r(this, void 0, void 0, (function* () {
|
|
4600
4696
|
try {
|
|
4601
|
-
const
|
|
4602
|
-
if (
|
|
4603
|
-
const e4 = yield
|
|
4604
|
-
return
|
|
4697
|
+
const r2 = yield (0, o.default)(e3 + s.endpoints.sdk.app(i2, n2), { method: "GET", headers: t2.header });
|
|
4698
|
+
if (r2.ok) {
|
|
4699
|
+
const e4 = yield r2.json();
|
|
4700
|
+
return a2.log(`Received questions for app ${i2}`, e4), e4;
|
|
4605
4701
|
}
|
|
4606
|
-
throw
|
|
4702
|
+
throw a2.err(`Failed to get questions for app ${i2}:`, r2.status, r2.statusText), new Error("[MagicFeedback] Bad response from server");
|
|
4607
4703
|
} catch (e4) {
|
|
4608
|
-
return
|
|
4704
|
+
return a2.err(e4), [];
|
|
4609
4705
|
}
|
|
4610
4706
|
}));
|
|
4611
|
-
}, t2.sendFeedback = function(e3, i2,
|
|
4612
|
-
return
|
|
4707
|
+
}, t2.sendFeedback = function(e3, i2, n2) {
|
|
4708
|
+
return r(this, void 0, void 0, (function* () {
|
|
4613
4709
|
try {
|
|
4614
|
-
const
|
|
4615
|
-
if (
|
|
4616
|
-
throw
|
|
4710
|
+
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) });
|
|
4711
|
+
if (r2.ok) return n2.log(`Form ${i2.integration} submitted successfully!`), (yield r2.json()).sessionId;
|
|
4712
|
+
throw n2.err(`Failed to submit form ${i2.integration}:`, r2.status, r2.statusText), new Error(r2.statusText);
|
|
4617
4713
|
} catch (e4) {
|
|
4618
|
-
return
|
|
4714
|
+
return n2.err(e4), "";
|
|
4619
4715
|
}
|
|
4620
4716
|
}));
|
|
4621
|
-
}, t2.getFollowUpQuestion = function(e3, i2,
|
|
4622
|
-
return
|
|
4717
|
+
}, t2.getFollowUpQuestion = function(e3, i2, n2) {
|
|
4718
|
+
return r(this, void 0, void 0, (function* () {
|
|
4623
4719
|
try {
|
|
4624
|
-
const
|
|
4625
|
-
if (
|
|
4626
|
-
throw
|
|
4720
|
+
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) });
|
|
4721
|
+
if (r2.ok) return n2.log(`Received follow up question for form ${i2.integration}`), (yield r2.json()) || "";
|
|
4722
|
+
throw n2.err(`Failed to get follow up question for form ${i2.integration}:`, r2.status, r2.statusText), new Error(r2.statusText);
|
|
4627
4723
|
} catch (e4) {
|
|
4628
|
-
return
|
|
4724
|
+
return n2.err(e4), "";
|
|
4629
4725
|
}
|
|
4630
4726
|
}));
|
|
4631
4727
|
};
|
|
@@ -4644,12 +4740,12 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4644
4740
|
};
|
|
4645
4741
|
}, 330: (e2) => {
|
|
4646
4742
|
"use strict";
|
|
4647
|
-
e2.exports = JSON.parse('{"name":"@magicfeedback/native","version":"2.2.
|
|
4648
|
-
} }, t = {}, (function i(
|
|
4649
|
-
var
|
|
4650
|
-
if (void 0 !==
|
|
4651
|
-
var
|
|
4652
|
-
return e[
|
|
4743
|
+
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"}');
|
|
4744
|
+
} }, t = {}, (function i(r) {
|
|
4745
|
+
var n = t[r];
|
|
4746
|
+
if (void 0 !== n) return n.exports;
|
|
4747
|
+
var o = t[r] = { exports: {} };
|
|
4748
|
+
return e[r].call(o.exports, o, o.exports, i), o.exports;
|
|
4653
4749
|
})(156).default;
|
|
4654
4750
|
var e, t;
|
|
4655
4751
|
}));
|
|
@@ -4753,6 +4849,9 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
4753
4849
|
let stylesInjected = false;
|
|
4754
4850
|
let pageDepth = 0;
|
|
4755
4851
|
let onStartPage = false;
|
|
4852
|
+
let labels = getLabels(options?.language);
|
|
4853
|
+
let actionLabels = resolveActionLabels(actions, options?.language);
|
|
4854
|
+
let direction = directionFor(options?.language);
|
|
4756
4855
|
const isDark = style?.theme === "dark";
|
|
4757
4856
|
const theme = {
|
|
4758
4857
|
popupBg: isDark ? "#1e1e1e" : "#fff",
|
|
@@ -4779,6 +4878,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
4779
4878
|
const popup = document.createElement("div");
|
|
4780
4879
|
popup.id = "dd-popup";
|
|
4781
4880
|
popup.className = "deepdots-popup";
|
|
4881
|
+
popup.setAttribute("dir", direction);
|
|
4782
4882
|
popup.style.cssText = `
|
|
4783
4883
|
position: relative;
|
|
4784
4884
|
display: flex;
|
|
@@ -4808,7 +4908,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
4808
4908
|
const titleEl = document.createElement("h2");
|
|
4809
4909
|
titleEl.id = "dd-title";
|
|
4810
4910
|
titleEl.className = "deepdots-popup-title";
|
|
4811
|
-
titleEl.style.cssText = `margin:0; font-size:17px; font-weight:600; line-height:1.3; color:${theme.textPrimary}; text-transform:none; text-align:
|
|
4911
|
+
titleEl.style.cssText = `margin:0; font-size:17px; font-weight:600; line-height:1.3; color:${theme.textPrimary}; text-transform:none; text-align:start; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;`;
|
|
4812
4912
|
titleEl.hidden = true;
|
|
4813
4913
|
const setTitle = (value) => {
|
|
4814
4914
|
if (!value) return;
|
|
@@ -4820,7 +4920,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
4820
4920
|
const closeBtn = document.createElement("button");
|
|
4821
4921
|
closeBtn.id = "dd-close";
|
|
4822
4922
|
closeBtn.type = "button";
|
|
4823
|
-
closeBtn.setAttribute("aria-label",
|
|
4923
|
+
closeBtn.setAttribute("aria-label", labels.closeAria);
|
|
4824
4924
|
closeBtn.innerHTML = `
|
|
4825
4925
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4826
4926
|
<path d="M5 5L19 19M5 19L19 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="butt"/>
|
|
@@ -4879,7 +4979,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
4879
4979
|
progressLabel.appendChild(progressTotal);
|
|
4880
4980
|
const progressFollowUp = document.createElement("span");
|
|
4881
4981
|
progressFollowUp.id = "dd-progress-followup";
|
|
4882
|
-
progressFollowUp.textContent =
|
|
4982
|
+
progressFollowUp.textContent = labels.followUp;
|
|
4883
4983
|
progressFollowUp.style.cssText = "display:none; font-size:12px; font-weight:600; color:#fff; background:rgba(59,130,246,0.44); border-radius:999px; padding:2px 10px;";
|
|
4884
4984
|
progressHead.appendChild(progressLabel);
|
|
4885
4985
|
progressHead.appendChild(progressFollowUp);
|
|
@@ -4911,8 +5011,8 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
4911
5011
|
progressCurrent.textContent = `${Math.round(pct)}%`;
|
|
4912
5012
|
progressTotal.textContent = "";
|
|
4913
5013
|
} else {
|
|
4914
|
-
progressCurrent.textContent =
|
|
4915
|
-
progressTotal.textContent = ` of ${total}`;
|
|
5014
|
+
progressCurrent.textContent = `${labels.question} ${label}`;
|
|
5015
|
+
progressTotal.textContent = ` ${labels.of} ${total}`;
|
|
4916
5016
|
}
|
|
4917
5017
|
progressFollowUp.style.display = p.followup ? "inline-block" : "none";
|
|
4918
5018
|
}
|
|
@@ -4949,7 +5049,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
4949
5049
|
const spinnerEl = document.createElement("div");
|
|
4950
5050
|
spinnerEl.className = "mf-spinner";
|
|
4951
5051
|
spinnerEl.setAttribute("role", "status");
|
|
4952
|
-
spinnerEl.setAttribute("aria-label",
|
|
5052
|
+
spinnerEl.setAttribute("aria-label", labels.loadingAria);
|
|
4953
5053
|
spinnerEl.innerHTML = '<div class="mf-spinner-circle"></div>';
|
|
4954
5054
|
spinnerEl.style.cssText = "position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);";
|
|
4955
5055
|
const formDivId = `magicfeedback-form-${surveyId}`;
|
|
@@ -4968,7 +5068,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
4968
5068
|
const backButton = document.createElement("button");
|
|
4969
5069
|
backButton.id = "dd-back";
|
|
4970
5070
|
backButton.className = "dd-nav-btn";
|
|
4971
|
-
backButton.textContent =
|
|
5071
|
+
backButton.textContent = actionLabels.back;
|
|
4972
5072
|
backButton.style.cssText = `
|
|
4973
5073
|
background: transparent;
|
|
4974
5074
|
color: ${theme.textMuted};
|
|
@@ -4998,7 +5098,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
4998
5098
|
const startButton = document.createElement("button");
|
|
4999
5099
|
startButton.id = "dd-start";
|
|
5000
5100
|
startButton.className = "dd-nav-btn";
|
|
5001
|
-
startButton.textContent =
|
|
5101
|
+
startButton.textContent = actionLabels.start;
|
|
5002
5102
|
startButton.style.cssText = `
|
|
5003
5103
|
background: #1E293B;
|
|
5004
5104
|
color: #fff;
|
|
@@ -5025,7 +5125,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5025
5125
|
const closeButton = document.createElement("button");
|
|
5026
5126
|
closeButton.id = "dd-complete";
|
|
5027
5127
|
closeButton.className = "dd-nav-btn";
|
|
5028
|
-
closeButton.textContent =
|
|
5128
|
+
closeButton.textContent = actionLabels.complete;
|
|
5029
5129
|
closeButton.style.cssText = `
|
|
5030
5130
|
background: #1E293B;
|
|
5031
5131
|
color: #fff;
|
|
@@ -5056,7 +5156,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5056
5156
|
const submitButton = document.createElement("button");
|
|
5057
5157
|
submitButton.id = "dd-submit";
|
|
5058
5158
|
submitButton.className = "dd-nav-btn";
|
|
5059
|
-
submitButton.textContent =
|
|
5159
|
+
submitButton.textContent = actionLabels.accept;
|
|
5060
5160
|
submitButton.style.cssText = `
|
|
5061
5161
|
background: #1E293B;
|
|
5062
5162
|
color: #fff;
|
|
@@ -5080,6 +5180,19 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5080
5180
|
formInstance?.send?.();
|
|
5081
5181
|
}
|
|
5082
5182
|
};
|
|
5183
|
+
function applyLabels(lang) {
|
|
5184
|
+
labels = getLabels(lang);
|
|
5185
|
+
actionLabels = resolveActionLabels(actions, lang);
|
|
5186
|
+
backButton.textContent = actionLabels.back;
|
|
5187
|
+
startButton.textContent = actionLabels.start;
|
|
5188
|
+
closeButton.textContent = actionLabels.complete;
|
|
5189
|
+
submitButton.textContent = actionLabels.accept;
|
|
5190
|
+
closeBtn.setAttribute("aria-label", labels.closeAria);
|
|
5191
|
+
spinnerEl.setAttribute("aria-label", labels.loadingAria);
|
|
5192
|
+
progressFollowUp.textContent = labels.followUp;
|
|
5193
|
+
direction = directionFor(lang);
|
|
5194
|
+
popup.setAttribute("dir", direction);
|
|
5195
|
+
}
|
|
5083
5196
|
backButton.style.display = "none";
|
|
5084
5197
|
startButton.style.display = "none";
|
|
5085
5198
|
submitButton.style.display = "none";
|
|
@@ -5200,6 +5313,8 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5200
5313
|
addSuccessScreen: false
|
|
5201
5314
|
};
|
|
5202
5315
|
generateOptions.onLoadedEvent = ({ formData }) => {
|
|
5316
|
+
const surveyLang = Array.isArray(formData?.lang) ? formData.lang.find((l) => typeof l === "string" && l.trim().length > 0) : void 0;
|
|
5317
|
+
if (surveyLang) applyLabels(surveyLang);
|
|
5203
5318
|
try {
|
|
5204
5319
|
} catch {
|
|
5205
5320
|
}
|
|
@@ -5260,13 +5375,13 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5260
5375
|
if (errText) {
|
|
5261
5376
|
setLoading(false);
|
|
5262
5377
|
if (errText.toLowerCase().includes("no response")) {
|
|
5263
|
-
errorHint.textContent =
|
|
5378
|
+
errorHint.textContent = labels.errorRequired;
|
|
5264
5379
|
errorHint.style.display = "block";
|
|
5265
5380
|
emit("popup_clicked", surveyId, { action: "validation_error_required" });
|
|
5266
5381
|
updateNavButtons();
|
|
5267
5382
|
return;
|
|
5268
5383
|
}
|
|
5269
|
-
errorHint.textContent =
|
|
5384
|
+
errorHint.textContent = labels.errorSubmit;
|
|
5270
5385
|
errorHint.style.display = "block";
|
|
5271
5386
|
emit("popup_clicked", surveyId, { action: "submit_error", error: errText });
|
|
5272
5387
|
return;
|
|
@@ -5309,6 +5424,7 @@ var init_renderPopup = __esm({
|
|
|
5309
5424
|
init_font();
|
|
5310
5425
|
init_logo();
|
|
5311
5426
|
init_logger();
|
|
5427
|
+
init_labels();
|
|
5312
5428
|
import_native = __toESM(require_magicfeedback_sdk_browser());
|
|
5313
5429
|
init_style();
|
|
5314
5430
|
}
|
|
@@ -5322,12 +5438,15 @@ __export(index_exports, {
|
|
|
5322
5438
|
CrashReporter: () => CrashReporter,
|
|
5323
5439
|
DeepdotsPopups: () => DeepdotsPopups,
|
|
5324
5440
|
InMemoryStorage: () => InMemoryStorage,
|
|
5441
|
+
LABELS: () => LABELS,
|
|
5325
5442
|
MAX_TRACKED_MESSAGES: () => MAX_TRACKED_MESSAGES,
|
|
5326
5443
|
MESSAGE_CHANNELS: () => MESSAGE_CHANNELS,
|
|
5327
5444
|
MessageGuard: () => MessageGuard,
|
|
5328
5445
|
NoopPopupRenderer: () => NoopPopupRenderer,
|
|
5329
5446
|
POPUP_TRIGGER_CONDITION_STATUSES: () => POPUP_TRIGGER_CONDITION_STATUSES,
|
|
5447
|
+
RTL_LOCALES: () => RTL_LOCALES,
|
|
5330
5448
|
ReactNativePopupRenderer: () => ReactNativePopupRenderer,
|
|
5449
|
+
SUPPORTED_LANGUAGES: () => SUPPORTED_LANGUAGES,
|
|
5331
5450
|
buildAnalyticsFeedbackBody: () => buildAnalyticsFeedbackBody,
|
|
5332
5451
|
buildMessageParams: () => buildMessageParams,
|
|
5333
5452
|
buildSurveyHtml: () => buildSurveyHtml,
|
|
@@ -5335,7 +5454,12 @@ __export(index_exports, {
|
|
|
5335
5454
|
crashRecordToParams: () => crashRecordToParams,
|
|
5336
5455
|
createDefaultRenderer: () => createDefaultRenderer,
|
|
5337
5456
|
createFeedbackSink: () => createFeedbackSink,
|
|
5457
|
+
directionFor: () => directionFor,
|
|
5458
|
+
getLabels: () => getLabels,
|
|
5459
|
+
isRtlLanguage: () => isRtlLanguage,
|
|
5338
5460
|
mmkvStorage: () => mmkvStorage,
|
|
5461
|
+
resolveActionLabels: () => resolveActionLabels,
|
|
5462
|
+
resolveLocale: () => resolveLocale,
|
|
5339
5463
|
setupReactNative: () => setupReactNative
|
|
5340
5464
|
});
|
|
5341
5465
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -5533,6 +5657,7 @@ init_tracking_manager();
|
|
|
5533
5657
|
|
|
5534
5658
|
// src/ui/surveyHtml.ts
|
|
5535
5659
|
init_font();
|
|
5660
|
+
init_labels();
|
|
5536
5661
|
init_style();
|
|
5537
5662
|
var POSITION_MAP = {
|
|
5538
5663
|
center: { justifyContent: "center", alignItems: "center", padding: "0", background: "rgba(0,0,0,0.5)" },
|
|
@@ -5546,9 +5671,13 @@ var POSITION_MAP = {
|
|
|
5546
5671
|
function jsonForScript(value) {
|
|
5547
5672
|
return JSON.stringify(value ?? null).replace(/</g, "\\u003C").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
5548
5673
|
}
|
|
5674
|
+
function trimmedOrNull(value) {
|
|
5675
|
+
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
5676
|
+
return trimmed ? value : null;
|
|
5677
|
+
}
|
|
5549
5678
|
function buildSurveyHtml(opts) {
|
|
5550
5679
|
const env = opts.env === "development" ? "dev" : "prod";
|
|
5551
|
-
const version = opts.version ?? "2.2.
|
|
5680
|
+
const version = opts.version ?? "2.2.22";
|
|
5552
5681
|
const cdn = `https://cdn.jsdelivr.net/npm/@magicfeedback/native@${version}/dist/magicfeedback-sdk.browser.js`;
|
|
5553
5682
|
const sid = jsonForScript(opts.surveyId);
|
|
5554
5683
|
const pid = jsonForScript(opts.productId);
|
|
@@ -5580,10 +5709,22 @@ function buildSurveyHtml(opts) {
|
|
|
5580
5709
|
const titleJson = jsonForScript(opts.title ?? "");
|
|
5581
5710
|
const customCss = (opts.surveyCss ?? "").replace(/<\/\s*style/gi, "<\\/style");
|
|
5582
5711
|
const progressPref = opts.showProgressBar === void 0 ? "null" : String(opts.showProgressBar);
|
|
5583
|
-
const
|
|
5584
|
-
const
|
|
5585
|
-
const
|
|
5586
|
-
const
|
|
5712
|
+
const initLabels = getLabels(opts.language);
|
|
5713
|
+
const initActionLabels = resolveActionLabels(opts.actions, opts.language);
|
|
5714
|
+
const backLabel = jsonForScript(initActionLabels.back);
|
|
5715
|
+
const startLabel = jsonForScript(initActionLabels.start);
|
|
5716
|
+
const completeLabel = jsonForScript(initActionLabels.complete);
|
|
5717
|
+
const submitLabel = jsonForScript(initActionLabels.accept);
|
|
5718
|
+
const labelsTableJson = jsonForScript(LABELS);
|
|
5719
|
+
const actionOverridesJson = jsonForScript({
|
|
5720
|
+
accept: trimmedOrNull(opts.actions?.accept?.label),
|
|
5721
|
+
start: trimmedOrNull(opts.actions?.start?.label),
|
|
5722
|
+
complete: trimmedOrNull(opts.actions?.complete?.label),
|
|
5723
|
+
back: trimmedOrNull(opts.actions?.back?.label)
|
|
5724
|
+
});
|
|
5725
|
+
const initLangJson = jsonForScript(opts.language ?? "");
|
|
5726
|
+
const initDirection = directionFor(opts.language);
|
|
5727
|
+
const rtlLocalesJson = jsonForScript(RTL_LOCALES);
|
|
5587
5728
|
return `<!DOCTYPE html><html><head>
|
|
5588
5729
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
5589
5730
|
<meta name="color-scheme" content="${colorScheme}"/>
|
|
@@ -5596,8 +5737,8 @@ body{display:${bodyDisplay};justify-content:${pos.justifyContent};align-items:${
|
|
|
5596
5737
|
.deepdots-popup-header{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;flex:0 0 auto}
|
|
5597
5738
|
/* Neutraliza la regla \`.deepdots-popup h2\` del CSS del survey (uppercase, centrado y
|
|
5598
5739
|
margin-bottom 40px), pensada para los enunciados y no para el t\xEDtulo de la cabecera. */
|
|
5599
|
-
#dd-title{margin:0;font-family:var(--deepdots-font,'Montserrat',inherit);font-size:17px;font-weight:600;line-height:1.3;color:${textPrimary};text-transform:none;text-align:
|
|
5600
|
-
#dd-close{background:transparent;border:none;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;color:${textPrimary};padding:4px;flex:0 0 auto;margin-
|
|
5740
|
+
#dd-title{margin:0;font-family:var(--deepdots-font,'Montserrat',inherit);font-size:17px;font-weight:600;line-height:1.3;color:${textPrimary};text-transform:none;text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
5741
|
+
#dd-close{background:transparent;border:none;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;color:${textPrimary};padding:4px;flex:0 0 auto;margin-inline-start:auto}
|
|
5601
5742
|
/* Progreso alineado con la cabecera: sin padding horizontal propio, lo marca la tarjeta.
|
|
5602
5743
|
El vertical es el mismo arriba y abajo, y del mismo valor que el padding de la tarjeta. */
|
|
5603
5744
|
.deepdots-progress{display:none;flex-direction:column;gap:8px;width:100%;flex:0 0 auto;padding:16px 0;box-sizing:border-box}
|
|
@@ -5654,10 +5795,10 @@ body{display:${bodyDisplay};justify-content:${pos.justifyContent};align-items:${
|
|
|
5654
5795
|
${customCss}
|
|
5655
5796
|
</style>
|
|
5656
5797
|
</head><body>
|
|
5657
|
-
<div class="${popupClass}" id="dd-popup">
|
|
5798
|
+
<div class="${popupClass}" id="dd-popup" dir="${initDirection}">
|
|
5658
5799
|
<div class="deepdots-popup-header">
|
|
5659
5800
|
<h2 id="dd-title" class="deepdots-popup-title" hidden></h2>
|
|
5660
|
-
<button type="button" id="dd-close" aria-label="
|
|
5801
|
+
<button type="button" id="dd-close" aria-label="${initLabels.closeAria}">
|
|
5661
5802
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5662
5803
|
<path d="M5 5L19 19M5 19L19 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="butt"/>
|
|
5663
5804
|
</svg>
|
|
@@ -5666,23 +5807,23 @@ ${customCss}
|
|
|
5666
5807
|
<div class="deepdots-progress" id="dd-progress">
|
|
5667
5808
|
<div class="deepdots-progress-head">
|
|
5668
5809
|
<span id="dd-progress-label"><span id="dd-progress-current"></span><span id="dd-progress-total"></span></span>
|
|
5669
|
-
<span id="dd-progress-followup"
|
|
5810
|
+
<span id="dd-progress-followup">${initLabels.followUp}</span>
|
|
5670
5811
|
</div>
|
|
5671
5812
|
<div class="deepdots-progress-track"><div id="dd-progress-bar"></div></div>
|
|
5672
5813
|
</div>
|
|
5673
5814
|
<div class="deepdots-popup-container-content" id="dd-content">
|
|
5674
5815
|
<div class="deepdots-popup-main" id="dd-main">
|
|
5675
5816
|
<div id="dd-form-wrapper">
|
|
5676
|
-
<div class="mf-spinner" id="dd-spinner" role="status" aria-label="
|
|
5817
|
+
<div class="mf-spinner" id="dd-spinner" role="status" aria-label="${initLabels.loadingAria}"><div class="mf-spinner-circle"></div></div>
|
|
5677
5818
|
<div id="mf"></div>
|
|
5678
5819
|
</div>
|
|
5679
5820
|
<div class="deepdots-error-hint" id="dd-error" role="alert" aria-live="polite"></div>
|
|
5680
5821
|
</div>
|
|
5681
5822
|
<div class="deepdots-popup-footer" id="dd-footer">
|
|
5682
|
-
<button type="button" class="dd-nav-btn" id="dd-submit"
|
|
5683
|
-
<button type="button" class="dd-nav-btn" id="dd-back"
|
|
5684
|
-
<button type="button" class="dd-nav-btn" id="dd-complete"
|
|
5685
|
-
<button type="button" class="dd-nav-btn" id="dd-start"
|
|
5823
|
+
<button type="button" class="dd-nav-btn" id="dd-submit"></button>
|
|
5824
|
+
<button type="button" class="dd-nav-btn" id="dd-back"></button>
|
|
5825
|
+
<button type="button" class="dd-nav-btn" id="dd-complete"></button>
|
|
5826
|
+
<button type="button" class="dd-nav-btn" id="dd-start"></button>
|
|
5686
5827
|
</div>
|
|
5687
5828
|
</div>
|
|
5688
5829
|
</div>
|
|
@@ -5711,6 +5852,32 @@ ${customCss}
|
|
|
5711
5852
|
var progressTotal=document.getElementById('dd-progress-total');
|
|
5712
5853
|
var progressFollowUp=document.getElementById('dd-progress-followup');
|
|
5713
5854
|
var progressBar=document.getElementById('dd-progress-bar');
|
|
5855
|
+
var closeEl=document.getElementById('dd-close');
|
|
5856
|
+
|
|
5857
|
+
// --- i18n del chrome -------------------------------------------------------------------
|
|
5858
|
+
// La tabla completa viaja embebida porque el idioma del survey (\`formData.lang[0]\`) solo se
|
|
5859
|
+
// conoce ya dentro del WebView. \`ddResolveLocale\` es el espejo del \`resolveLocale\` de TS
|
|
5860
|
+
// (paridad cubierta por test).
|
|
5861
|
+
var DD_LABELS=${labelsTableJson};
|
|
5862
|
+
var DD_ACTION_OVERRIDES=${actionOverridesJson};
|
|
5863
|
+
${RESOLVE_LOCALE_JS}
|
|
5864
|
+
var DD_LABELS_ACTIVE=DD_LABELS[ddResolveLocale(${initLangJson})];
|
|
5865
|
+
var DD_RTL=${rtlLocalesJson};
|
|
5866
|
+
function ddIsRtl(lang){ return DD_RTL.indexOf(ddResolveLocale(lang))!==-1; }
|
|
5867
|
+
function ddApplyLabels(lang){
|
|
5868
|
+
var next=DD_LABELS[ddResolveLocale(lang)];
|
|
5869
|
+
if(!next) return;
|
|
5870
|
+
DD_LABELS_ACTIVE=next;
|
|
5871
|
+
// El survey ya se ha volteado a s\xED mismo: el chrome tiene que acompa\xF1arlo.
|
|
5872
|
+
popup.setAttribute('dir', ddIsRtl(lang) ? 'rtl' : 'ltr');
|
|
5873
|
+
backBtn.textContent=DD_ACTION_OVERRIDES.back||next.back;
|
|
5874
|
+
startBtn.textContent=DD_ACTION_OVERRIDES.start||next.start;
|
|
5875
|
+
completeBtn.textContent=DD_ACTION_OVERRIDES.complete||next.complete;
|
|
5876
|
+
submitBtn.textContent=DD_ACTION_OVERRIDES.accept||next.accept;
|
|
5877
|
+
if(closeEl){ closeEl.setAttribute('aria-label',next.closeAria); }
|
|
5878
|
+
if(spinner){ spinner.setAttribute('aria-label',next.loadingAria); }
|
|
5879
|
+
progressFollowUp.textContent=next.followUp;
|
|
5880
|
+
}
|
|
5714
5881
|
|
|
5715
5882
|
function setTitle(t){
|
|
5716
5883
|
if(!t) return;
|
|
@@ -5751,8 +5918,8 @@ ${customCss}
|
|
|
5751
5918
|
progressCurrent.textContent=Math.round(pct)+'%';
|
|
5752
5919
|
progressTotal.textContent='';
|
|
5753
5920
|
} else {
|
|
5754
|
-
progressCurrent.textContent='
|
|
5755
|
-
progressTotal.textContent=' of '+total;
|
|
5921
|
+
progressCurrent.textContent=DD_LABELS_ACTIVE.question+' '+label;
|
|
5922
|
+
progressTotal.textContent=' '+DD_LABELS_ACTIVE.of+' '+total;
|
|
5756
5923
|
}
|
|
5757
5924
|
progressFollowUp.style.display=p&&p.followup?'inline-block':'none';
|
|
5758
5925
|
}
|
|
@@ -5762,7 +5929,7 @@ ${customCss}
|
|
|
5762
5929
|
completeBtn.textContent=${completeLabel};
|
|
5763
5930
|
submitBtn.textContent=${submitLabel};
|
|
5764
5931
|
|
|
5765
|
-
|
|
5932
|
+
closeEl.onclick=function(){ emitJSON('popup_close'); };
|
|
5766
5933
|
backBtn.onclick=function(){ if(window.DeepdotsForm && window.DeepdotsForm.back){ window.DeepdotsForm.back(); } };
|
|
5767
5934
|
startBtn.onclick=function(){
|
|
5768
5935
|
if(window.DeepdotsForm && window.DeepdotsForm.startForm){
|
|
@@ -5857,6 +6024,14 @@ ${customCss}
|
|
|
5857
6024
|
// fallback es un literal gen\xE9rico que ignora style.successMessage.
|
|
5858
6025
|
addSuccessScreen:false,
|
|
5859
6026
|
onLoadedEvent:function(args){
|
|
6027
|
+
// Idioma del survey: manda sobre el del init para que el chrome no se quede en
|
|
6028
|
+
// ingl\xE9s delante de un survey traducido.
|
|
6029
|
+
var langs=args && args.formData ? args.formData.lang : null;
|
|
6030
|
+
if(langs && langs.length){
|
|
6031
|
+
for(var li=0;li<langs.length;li++){
|
|
6032
|
+
if(typeof langs[li]==='string' && langs[li].trim()){ ddApplyLabels(langs[li]); break; }
|
|
6033
|
+
}
|
|
6034
|
+
}
|
|
5860
6035
|
var s=args && args.formData ? args.formData.style : null;
|
|
5861
6036
|
if(s && !stylesInjected){
|
|
5862
6037
|
stylesInjected=true;
|
|
@@ -5883,8 +6058,10 @@ ${customCss}
|
|
|
5883
6058
|
if(s.logoSize==='small'){ logoImg.style.maxHeight='30px'; }
|
|
5884
6059
|
else if(s.logoSize==='medium'){ logoImg.style.maxHeight='50px'; }
|
|
5885
6060
|
else if(s.logoSize==='large'){ logoImg.style.maxHeight='70px'; }
|
|
5886
|
-
|
|
5887
|
-
|
|
6061
|
+
// M\xE1rgenes l\xF3gicos: con un survey RTL el popup va con dir="rtl" y el logo
|
|
6062
|
+
// tiene que acompa\xF1ar al chrome. En LTR el resultado es el mismo de antes.
|
|
6063
|
+
if(s.logoPosition==='left'){ logoImg.style.margin='12px 0 0 0'; logoImg.style.setProperty('margin-inline-start','0'); logoImg.style.setProperty('margin-inline-end','16px'); }
|
|
6064
|
+
else if(s.logoPosition==='right'){ logoImg.style.margin='12px 0 0 0'; logoImg.style.setProperty('margin-inline-start','auto'); logoImg.style.setProperty('margin-inline-end','0'); }
|
|
5888
6065
|
else if(s.logoPosition==='center'){ logoImg.style.margin='12px auto 0 auto'; }
|
|
5889
6066
|
// Encima de la barra de progreso, como hermano del header (espejo de ui/logo.ts en
|
|
5890
6067
|
// web). Fuera de #dd-main, as\xED el logo no se va con el scroll del formulario.
|
|
@@ -5910,12 +6087,12 @@ ${customCss}
|
|
|
5910
6087
|
setLoading(false);
|
|
5911
6088
|
if(error.toLowerCase().indexOf('no response')!==-1){
|
|
5912
6089
|
// La p\xE1gina no ha cambiado: el estado de navegaci\xF3n se queda como estaba.
|
|
5913
|
-
errorHint.textContent=
|
|
6090
|
+
errorHint.textContent=DD_LABELS_ACTIVE.errorRequired;
|
|
5914
6091
|
errorHint.style.display='block';
|
|
5915
6092
|
updateNavButtons();
|
|
5916
6093
|
return;
|
|
5917
6094
|
}
|
|
5918
|
-
errorHint.textContent=
|
|
6095
|
+
errorHint.textContent=DD_LABELS_ACTIVE.errorSubmit;
|
|
5919
6096
|
errorHint.style.display='block';
|
|
5920
6097
|
return;
|
|
5921
6098
|
}
|
|
@@ -5988,7 +6165,8 @@ var ReactNativePopupRenderer = class {
|
|
|
5988
6165
|
chrome: renderChrome,
|
|
5989
6166
|
title: options?.title,
|
|
5990
6167
|
showProgressBar: options?.showProgressBar,
|
|
5991
|
-
surveyCss: options?.surveyCss
|
|
6168
|
+
surveyCss: options?.surveyCss,
|
|
6169
|
+
language: options?.language
|
|
5992
6170
|
});
|
|
5993
6171
|
if (this.options.onShow) {
|
|
5994
6172
|
this.options.onShow({ surveyId, productId, html });
|
|
@@ -7801,7 +7979,7 @@ var DeepdotsPopups = class {
|
|
|
7801
7979
|
miniService,
|
|
7802
7980
|
analyticsFeedbackSessionId,
|
|
7803
7981
|
this.renderChrome,
|
|
7804
|
-
{ title, showProgressBar: this.showProgressBar, surveyCss: this.surveyCss }
|
|
7982
|
+
{ title, showProgressBar: this.showProgressBar, surveyCss: this.surveyCss, language: this.language }
|
|
7805
7983
|
);
|
|
7806
7984
|
return;
|
|
7807
7985
|
}
|
|
@@ -7821,7 +7999,7 @@ var DeepdotsPopups = class {
|
|
|
7821
7999
|
sessionId,
|
|
7822
8000
|
miniService,
|
|
7823
8001
|
analyticsFeedbackSessionId,
|
|
7824
|
-
{ title, showProgressBar: this.showProgressBar, surveyCss: this.surveyCss }
|
|
8002
|
+
{ title, showProgressBar: this.showProgressBar, surveyCss: this.surveyCss, language: this.language }
|
|
7825
8003
|
);
|
|
7826
8004
|
});
|
|
7827
8005
|
}
|
|
@@ -7993,6 +8171,7 @@ var DeepdotsPopups = class {
|
|
|
7993
8171
|
|
|
7994
8172
|
// src/index.ts
|
|
7995
8173
|
init_tracking_manager();
|
|
8174
|
+
init_labels();
|
|
7996
8175
|
|
|
7997
8176
|
// src/react-native/setup.ts
|
|
7998
8177
|
function mmkvStorage(mmkv) {
|