@magicfeedback/popup-sdk 1.9.0 → 1.11.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 +23 -1
- package/dist/assets/assets/style.css +303 -1
- package/dist/{chunk-MTV7T4OW.mjs → chunk-GXEPYT33.mjs} +304 -2
- package/dist/{chunk-MTV7T4OW.mjs.map → chunk-GXEPYT33.mjs.map} +1 -1
- package/dist/{chunk-AKVMUQXO.mjs → chunk-TSORXOQG.mjs} +304 -2
- package/dist/{chunk-AKVMUQXO.mjs.map → chunk-TSORXOQG.mjs.map} +1 -1
- package/dist/index.d.mts +57 -1
- package/dist/index.d.ts +57 -1
- package/dist/index.js +1752 -898
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +229 -16
- package/dist/index.mjs.map +1 -1
- package/dist/react-native.d.mts +52 -1
- package/dist/react-native.d.ts +52 -1
- package/dist/react-native.js +556 -21
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +230 -16
- package/dist/react-native.mjs.map +1 -1
- package/dist/{renderPopup-LEM2MLWT.mjs → renderPopup-JF6IB6HL.mjs} +29 -10
- package/dist/renderPopup-JF6IB6HL.mjs.map +1 -0
- package/dist/{renderPopup-LEGTSBLD.mjs → renderPopup-KSZJ5AN4.mjs} +1231 -892
- package/dist/renderPopup-KSZJ5AN4.mjs.map +1 -0
- package/package.json +5 -3
- package/dist/renderPopup-LEGTSBLD.mjs.map +0 -1
- package/dist/renderPopup-LEM2MLWT.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -572,7 +572,7 @@ var init_style = __esm({
|
|
|
572
572
|
style_default = `/**
|
|
573
573
|
* NO EDITAR A MANO \u2014 generado por scripts/vendor-survey-css.mjs
|
|
574
574
|
*
|
|
575
|
-
* Copia de @magicfeedback/native@2.2.
|
|
575
|
+
* Copia de @magicfeedback/native@2.2.31 \u2192 dist/styles/magicfeedback-default.css
|
|
576
576
|
* (la hoja can\xF3nica del paquete, la que apunta su campo "style"), con estos cambios locales:
|
|
577
577
|
*
|
|
578
578
|
* 1. Sin el @import de Google Fonts (Nunito): no queremos una petici\xF3n externa desde la
|
|
@@ -1556,6 +1556,9 @@ div.magicfeedback-radio {
|
|
|
1556
1556
|
width: 100%;
|
|
1557
1557
|
overflow-x: auto;
|
|
1558
1558
|
border-radius: var(--mf-radius-md);
|
|
1559
|
+
/* the layout follows the space the survey gets (a pop-in, a sidebar),
|
|
1560
|
+
not the size of the window */
|
|
1561
|
+
container-type: inline-size;
|
|
1559
1562
|
}
|
|
1560
1563
|
|
|
1561
1564
|
.magicfeedback-multi-question-matrix-table {
|
|
@@ -1607,6 +1610,296 @@ div.magicfeedback-radio {
|
|
|
1607
1610
|
accent-color: var(--mf-primary);
|
|
1608
1611
|
}
|
|
1609
1612
|
|
|
1613
|
+
.magicfeedback-multi-question-matrix-question {
|
|
1614
|
+
min-width: 200px;
|
|
1615
|
+
padding: 10px;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
/* the column header names the option in a table; the per-cell label is for
|
|
1619
|
+
screen readers until the rows stack */
|
|
1620
|
+
.magicfeedback-multi-question-matrix-option-label {
|
|
1621
|
+
position: absolute;
|
|
1622
|
+
width: 1px;
|
|
1623
|
+
height: 1px;
|
|
1624
|
+
overflow: hidden;
|
|
1625
|
+
clip: rect(0, 0, 0, 0);
|
|
1626
|
+
white-space: nowrap;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
/* narrow container: every row becomes its own question with the options
|
|
1630
|
+
stacked underneath, instead of a table cut off at the side */
|
|
1631
|
+
@container (max-width: 599px) {
|
|
1632
|
+
.magicfeedback-multi-question-matrix-table,
|
|
1633
|
+
.magicfeedback-multi-question-matrix-table tbody,
|
|
1634
|
+
.magicfeedback-multi-question-matrix-table tr,
|
|
1635
|
+
.magicfeedback-multi-question-matrix-table td {
|
|
1636
|
+
display: block;
|
|
1637
|
+
width: 100%;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
.magicfeedback-multi-question-matrix-table thead {
|
|
1641
|
+
display: none;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
.magicfeedback-multi-question-matrix-row-tr,
|
|
1645
|
+
.magicfeedback-multi-question-matrix-row-tr:nth-child(even) {
|
|
1646
|
+
margin-bottom: var(--mf-space-lg);
|
|
1647
|
+
background: transparent;
|
|
1648
|
+
box-shadow: none;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
@media (hover: hover) {
|
|
1652
|
+
.magicfeedback-multi-question-matrix-row-tr:hover {
|
|
1653
|
+
margin-bottom: var(--mf-space-lg);
|
|
1654
|
+
background: transparent;
|
|
1655
|
+
box-shadow: none;
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
.magicfeedback-multi-question-matrix-table td.magicfeedback-multi-question-matrix-question {
|
|
1660
|
+
min-width: 0;
|
|
1661
|
+
padding: 0 0 var(--mf-space-sm);
|
|
1662
|
+
text-align: start;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
.magicfeedback-multi-question-matrix-question .magicfeedback-multi-question-matrix-label {
|
|
1666
|
+
font-weight: 600;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
.magicfeedback-multi-question-matrix-table td.magicfeedback-multi-question-matrix-option {
|
|
1670
|
+
display: flex;
|
|
1671
|
+
align-items: center;
|
|
1672
|
+
gap: var(--mf-space-sm);
|
|
1673
|
+
margin-bottom: var(--mf-space-sm);
|
|
1674
|
+
padding: 0 var(--mf-space-md);
|
|
1675
|
+
text-align: start;
|
|
1676
|
+
background: var(--mf-bg-secondary);
|
|
1677
|
+
border: 2px solid var(--mf-border);
|
|
1678
|
+
border-radius: var(--mf-radius-md);
|
|
1679
|
+
cursor: pointer;
|
|
1680
|
+
transition: var(--mf-transition-fast);
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
@media (hover: hover) {
|
|
1684
|
+
.magicfeedback-multi-question-matrix-option:hover {
|
|
1685
|
+
border-color: var(--mf-primary-border);
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
.magicfeedback-multi-question-matrix-option:has(input:checked) {
|
|
1690
|
+
border-color: var(--mf-primary);
|
|
1691
|
+
background: var(--mf-primary-light);
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
.magicfeedback-multi-question-matrix-table .magicfeedback-multi-question-matrix-option input[type="radio"] {
|
|
1695
|
+
flex-shrink: 0;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
/* the whole card is the click target */
|
|
1699
|
+
.magicfeedback-multi-question-matrix-option-label {
|
|
1700
|
+
position: static;
|
|
1701
|
+
flex: 1;
|
|
1702
|
+
width: auto;
|
|
1703
|
+
height: auto;
|
|
1704
|
+
padding: var(--mf-space-md) 0;
|
|
1705
|
+
overflow: visible;
|
|
1706
|
+
clip: auto;
|
|
1707
|
+
white-space: normal;
|
|
1708
|
+
font-size: var(--mf-font-size-base);
|
|
1709
|
+
color: var(--mf-text-primary);
|
|
1710
|
+
cursor: pointer;
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
/* ========================================
|
|
1715
|
+
MAXDIFF (BEST\u2013WORST)
|
|
1716
|
+
======================================== */
|
|
1717
|
+
.magicfeedback-max-diff {
|
|
1718
|
+
/* "least" gets its own hue, apart from the brand color "most" uses; dark
|
|
1719
|
+
enough to read as header text and to hold the white center dot */
|
|
1720
|
+
--mf-max-diff-worst: #b45309;
|
|
1721
|
+
width: 100%;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
.magicfeedback-max-diff-container {
|
|
1725
|
+
width: 100%;
|
|
1726
|
+
/* the layout follows the space the survey gets (a pop-in, a sidebar),
|
|
1727
|
+
not the size of the window */
|
|
1728
|
+
container-type: inline-size;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
.magicfeedback-max-diff-progress {
|
|
1732
|
+
display: flex;
|
|
1733
|
+
align-items: center;
|
|
1734
|
+
gap: var(--mf-space-md);
|
|
1735
|
+
margin-bottom: var(--mf-space-lg);
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
.magicfeedback-max-diff-progress-label {
|
|
1739
|
+
font-size: 0.8125rem;
|
|
1740
|
+
font-weight: var(--mf-font-weight-bold);
|
|
1741
|
+
letter-spacing: 0.04em;
|
|
1742
|
+
text-transform: uppercase;
|
|
1743
|
+
white-space: nowrap;
|
|
1744
|
+
color: var(--mf-text-secondary);
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
.magicfeedback-max-diff-progress-track {
|
|
1748
|
+
flex: 1;
|
|
1749
|
+
height: 6px;
|
|
1750
|
+
overflow: hidden;
|
|
1751
|
+
border-radius: var(--mf-radius-full);
|
|
1752
|
+
background: var(--mf-border);
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
.magicfeedback-max-diff-progress-fill {
|
|
1756
|
+
display: block;
|
|
1757
|
+
height: 100%;
|
|
1758
|
+
border-radius: var(--mf-radius-full);
|
|
1759
|
+
background: var(--mf-primary);
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
.magicfeedback-max-diff-table {
|
|
1763
|
+
width: 100%;
|
|
1764
|
+
border-collapse: collapse;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
.magicfeedback-max-diff-head,
|
|
1768
|
+
.magicfeedback-max-diff-head-spacer {
|
|
1769
|
+
border-bottom: 1px solid var(--mf-border);
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
.magicfeedback-max-diff-head {
|
|
1773
|
+
width: 11rem;
|
|
1774
|
+
padding: 0 var(--mf-space-sm) var(--mf-space-sm);
|
|
1775
|
+
font-size: 0.8125rem;
|
|
1776
|
+
font-weight: var(--mf-font-weight-extrabold);
|
|
1777
|
+
letter-spacing: 0.04em;
|
|
1778
|
+
text-transform: uppercase;
|
|
1779
|
+
text-align: center;
|
|
1780
|
+
vertical-align: bottom;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
.magicfeedback-max-diff-head-best {
|
|
1784
|
+
color: var(--mf-primary);
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
.magicfeedback-max-diff-head-worst {
|
|
1788
|
+
color: var(--mf-max-diff-worst);
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
.magicfeedback-max-diff-head-label {
|
|
1792
|
+
display: inline-flex;
|
|
1793
|
+
align-items: center;
|
|
1794
|
+
gap: 6px;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
.magicfeedback-max-diff-row {
|
|
1798
|
+
transition: background-color 0.15s ease;
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
.magicfeedback-max-diff-row > * {
|
|
1802
|
+
border-bottom: 1px solid var(--mf-border);
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
.magicfeedback-max-diff-row:has(.magicfeedback-max-diff-best:checked) {
|
|
1806
|
+
background-color: color-mix(in srgb, var(--mf-primary) 8%, transparent);
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
.magicfeedback-max-diff-row:has(.magicfeedback-max-diff-worst:checked) {
|
|
1810
|
+
background-color: color-mix(in srgb, var(--mf-max-diff-worst) 8%, transparent);
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
.magicfeedback-max-diff-item {
|
|
1814
|
+
padding: var(--mf-space-md) var(--mf-space-sm);
|
|
1815
|
+
font-size: 1.0625rem;
|
|
1816
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
1817
|
+
line-height: 1.4;
|
|
1818
|
+
text-align: center;
|
|
1819
|
+
color: var(--mf-text-primary);
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
.magicfeedback-max-diff-row:has(input:checked) .magicfeedback-max-diff-item {
|
|
1823
|
+
font-weight: var(--mf-font-weight-extrabold);
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
.magicfeedback-max-diff-cell {
|
|
1827
|
+
padding: 0;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
/* the whole cell is the click target */
|
|
1831
|
+
.magicfeedback-max-diff-pick {
|
|
1832
|
+
display: flex;
|
|
1833
|
+
align-items: center;
|
|
1834
|
+
justify-content: center;
|
|
1835
|
+
min-height: 64px;
|
|
1836
|
+
cursor: pointer;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
.magicfeedback-max-diff-input {
|
|
1840
|
+
appearance: none;
|
|
1841
|
+
-webkit-appearance: none;
|
|
1842
|
+
flex-shrink: 0;
|
|
1843
|
+
width: 26px;
|
|
1844
|
+
height: 26px;
|
|
1845
|
+
margin: 0;
|
|
1846
|
+
border: 2px solid color-mix(in srgb, var(--mf-text-secondary) 80%, white);
|
|
1847
|
+
border-radius: var(--mf-radius-full);
|
|
1848
|
+
background: var(--mf-bg-secondary);
|
|
1849
|
+
cursor: pointer;
|
|
1850
|
+
transition: var(--mf-transition-fast);
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
@media (hover: hover) {
|
|
1854
|
+
.magicfeedback-max-diff-pick:hover .magicfeedback-max-diff-input {
|
|
1855
|
+
transform: scale(1.08);
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
.magicfeedback-max-diff-best:checked {
|
|
1860
|
+
border-color: var(--mf-primary);
|
|
1861
|
+
background: radial-gradient(circle, #FFFFFF 0 4px, var(--mf-primary) 4.5px);
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
.magicfeedback-max-diff-worst:checked {
|
|
1865
|
+
border-color: var(--mf-max-diff-worst);
|
|
1866
|
+
background: radial-gradient(circle, #FFFFFF 0 4px, var(--mf-max-diff-worst) 4.5px);
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
.magicfeedback-max-diff-input:focus-visible {
|
|
1870
|
+
outline: 3px solid var(--mf-primary-border);
|
|
1871
|
+
outline-offset: 3px;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
/* narrow container: same table, slimmer pick columns and the header icon
|
|
1875
|
+
stacked over its label */
|
|
1876
|
+
@container (max-width: 599px) {
|
|
1877
|
+
.magicfeedback-max-diff-head {
|
|
1878
|
+
width: 4.75rem;
|
|
1879
|
+
padding-inline: 2px;
|
|
1880
|
+
font-size: 0.6875rem;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
.magicfeedback-max-diff-head-label {
|
|
1884
|
+
flex-direction: column;
|
|
1885
|
+
gap: 2px;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
.magicfeedback-max-diff-item {
|
|
1889
|
+
padding-inline: 4px;
|
|
1890
|
+
font-size: var(--mf-font-size-base);
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
.magicfeedback-max-diff-pick {
|
|
1894
|
+
min-height: 68px;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
.magicfeedback-max-diff-input {
|
|
1898
|
+
width: 28px;
|
|
1899
|
+
height: 28px;
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1610
1903
|
/* ========================================
|
|
1611
1904
|
PRIORITY LIST
|
|
1612
1905
|
======================================== */
|
|
@@ -1797,6 +2090,15 @@ div.magicfeedback-radio {
|
|
|
1797
2090
|
}
|
|
1798
2091
|
}
|
|
1799
2092
|
|
|
2093
|
+
/* hidden on the first page; keep the submit button on the right */
|
|
2094
|
+
.magicfeedback-back[hidden] {
|
|
2095
|
+
display: none;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
.magicfeedback-action-container .magicfeedback-submit {
|
|
2099
|
+
margin-left: auto;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
1800
2102
|
/* ========================================
|
|
1801
2103
|
SKIP & COUNTER
|
|
1802
2104
|
======================================== */
|
|
@@ -2514,8 +2816,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2514
2816
|
!(function(e, t) {
|
|
2515
2817
|
"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();
|
|
2516
2818
|
})(self, (() => {
|
|
2517
|
-
return e = {
|
|
2518
|
-
var i = "undefined" != typeof self ? self : this,
|
|
2819
|
+
return e = { 6911: function(e2, t2) {
|
|
2820
|
+
var i = "undefined" != typeof self ? self : this, n = (function() {
|
|
2519
2821
|
function e3() {
|
|
2520
2822
|
this.fetch = false, this.DOMException = i.DOMException;
|
|
2521
2823
|
}
|
|
@@ -2523,7 +2825,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2523
2825
|
})();
|
|
2524
2826
|
!(function(e3) {
|
|
2525
2827
|
!(function(t3) {
|
|
2526
|
-
var i2 = "URLSearchParams" in e3,
|
|
2828
|
+
var i2 = "URLSearchParams" in e3, n2 = "Symbol" in e3 && "iterator" in Symbol, r2 = "FileReader" in e3 && "Blob" in e3 && (function() {
|
|
2527
2829
|
try {
|
|
2528
2830
|
return new Blob(), true;
|
|
2529
2831
|
} catch (e4) {
|
|
@@ -2545,7 +2847,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2545
2847
|
var t5 = e4.shift();
|
|
2546
2848
|
return { done: void 0 === t5, value: t5 };
|
|
2547
2849
|
} };
|
|
2548
|
-
return
|
|
2850
|
+
return n2 && (t4[Symbol.iterator] = function() {
|
|
2549
2851
|
return t4;
|
|
2550
2852
|
}), t4;
|
|
2551
2853
|
}
|
|
@@ -2583,8 +2885,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2583
2885
|
function y() {
|
|
2584
2886
|
return this.bodyUsed = false, this._initBody = function(e4) {
|
|
2585
2887
|
var t4;
|
|
2586
|
-
this._bodyInit = e4, e4 ? "string" == typeof e4 ? this._bodyText = e4 :
|
|
2587
|
-
},
|
|
2888
|
+
this._bodyInit = e4, e4 ? "string" == typeof e4 ? this._bodyText = e4 : r2 && Blob.prototype.isPrototypeOf(e4) ? this._bodyBlob = e4 : o && FormData.prototype.isPrototypeOf(e4) ? this._bodyFormData = e4 : i2 && URLSearchParams.prototype.isPrototypeOf(e4) ? this._bodyText = e4.toString() : a && r2 && (t4 = e4) && DataView.prototype.isPrototypeOf(t4) ? (this._bodyArrayBuffer = g(e4.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : a && (ArrayBuffer.prototype.isPrototypeOf(e4) || l(e4)) ? this._bodyArrayBuffer = g(e4) : this._bodyText = e4 = Object.prototype.toString.call(e4) : this._bodyText = "", this.headers.get("content-type") || ("string" == typeof e4 ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : i2 && URLSearchParams.prototype.isPrototypeOf(e4) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
2889
|
+
}, r2 && (this.blob = function() {
|
|
2588
2890
|
var e4 = m(this);
|
|
2589
2891
|
if (e4) return e4;
|
|
2590
2892
|
if (this._bodyBlob) return Promise.resolve(this._bodyBlob);
|
|
@@ -2594,11 +2896,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2594
2896
|
}, this.arrayBuffer = function() {
|
|
2595
2897
|
return this._bodyArrayBuffer ? m(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(f);
|
|
2596
2898
|
}), this.text = function() {
|
|
2597
|
-
var e4, t4, i3,
|
|
2598
|
-
if (
|
|
2899
|
+
var e4, t4, i3, n3 = m(this);
|
|
2900
|
+
if (n3) return n3;
|
|
2599
2901
|
if (this._bodyBlob) return e4 = this._bodyBlob, i3 = h(t4 = new FileReader()), t4.readAsText(e4), i3;
|
|
2600
2902
|
if (this._bodyArrayBuffer) return Promise.resolve((function(e5) {
|
|
2601
|
-
for (var t5 = new Uint8Array(e5), i4 = new Array(t5.length),
|
|
2903
|
+
for (var t5 = new Uint8Array(e5), i4 = new Array(t5.length), n4 = 0; n4 < t5.length; n4++) i4[n4] = String.fromCharCode(t5[n4]);
|
|
2602
2904
|
return i4.join("");
|
|
2603
2905
|
})(this._bodyArrayBuffer));
|
|
2604
2906
|
if (this._bodyFormData) throw new Error("could not read FormData body as text");
|
|
@@ -2638,41 +2940,41 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2638
2940
|
return this.forEach((function(t4, i3) {
|
|
2639
2941
|
e4.push([i3, t4]);
|
|
2640
2942
|
})), u(e4);
|
|
2641
|
-
},
|
|
2943
|
+
}, n2 && (p.prototype[Symbol.iterator] = p.prototype.entries);
|
|
2642
2944
|
var v = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
|
|
2643
2945
|
function b(e4, t4) {
|
|
2644
|
-
var i3,
|
|
2946
|
+
var i3, n3, r3 = (t4 = t4 || {}).body;
|
|
2645
2947
|
if (e4 instanceof b) {
|
|
2646
2948
|
if (e4.bodyUsed) throw new TypeError("Already read");
|
|
2647
|
-
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,
|
|
2949
|
+
this.url = e4.url, this.credentials = e4.credentials, t4.headers || (this.headers = new p(e4.headers)), this.method = e4.method, this.mode = e4.mode, this.signal = e4.signal, r3 || null == e4._bodyInit || (r3 = e4._bodyInit, e4.bodyUsed = true);
|
|
2648
2950
|
} else this.url = String(e4);
|
|
2649
|
-
if (this.credentials = t4.credentials || this.credentials || "same-origin", !t4.headers && this.headers || (this.headers = new p(t4.headers)), this.method = (
|
|
2650
|
-
this._initBody(
|
|
2951
|
+
if (this.credentials = t4.credentials || this.credentials || "same-origin", !t4.headers && this.headers || (this.headers = new p(t4.headers)), this.method = (n3 = (i3 = t4.method || this.method || "GET").toUpperCase(), v.indexOf(n3) > -1 ? n3 : i3), this.mode = t4.mode || this.mode || null, this.signal = t4.signal || this.signal, this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && r3) throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
2952
|
+
this._initBody(r3);
|
|
2651
2953
|
}
|
|
2652
2954
|
function E(e4) {
|
|
2653
2955
|
var t4 = new FormData();
|
|
2654
2956
|
return e4.trim().split("&").forEach((function(e5) {
|
|
2655
2957
|
if (e5) {
|
|
2656
|
-
var i3 = e5.split("="),
|
|
2657
|
-
t4.append(decodeURIComponent(
|
|
2958
|
+
var i3 = e5.split("="), n3 = i3.shift().replace(/\+/g, " "), r3 = i3.join("=").replace(/\+/g, " ");
|
|
2959
|
+
t4.append(decodeURIComponent(n3), decodeURIComponent(r3));
|
|
2658
2960
|
}
|
|
2659
2961
|
})), t4;
|
|
2660
2962
|
}
|
|
2661
|
-
function
|
|
2963
|
+
function A(e4, t4) {
|
|
2662
2964
|
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);
|
|
2663
2965
|
}
|
|
2664
2966
|
b.prototype.clone = function() {
|
|
2665
2967
|
return new b(this, { body: this._bodyInit });
|
|
2666
|
-
}, y.call(b.prototype), y.call(
|
|
2667
|
-
return new
|
|
2668
|
-
},
|
|
2669
|
-
var e4 = new
|
|
2968
|
+
}, y.call(b.prototype), y.call(A.prototype), A.prototype.clone = function() {
|
|
2969
|
+
return new A(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new p(this.headers), url: this.url });
|
|
2970
|
+
}, A.error = function() {
|
|
2971
|
+
var e4 = new A(null, { status: 0, statusText: "" });
|
|
2670
2972
|
return e4.type = "error", e4;
|
|
2671
2973
|
};
|
|
2672
|
-
var
|
|
2673
|
-
|
|
2674
|
-
if (-1 ===
|
|
2675
|
-
return new
|
|
2974
|
+
var k = [301, 302, 303, 307, 308];
|
|
2975
|
+
A.redirect = function(e4, t4) {
|
|
2976
|
+
if (-1 === k.indexOf(t4)) throw new RangeError("Invalid status code");
|
|
2977
|
+
return new A(null, { status: t4, headers: { location: e4 } });
|
|
2676
2978
|
}, t3.DOMException = e3.DOMException;
|
|
2677
2979
|
try {
|
|
2678
2980
|
new t3.DOMException();
|
|
@@ -2684,7 +2986,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2684
2986
|
}, t3.DOMException.prototype = Object.create(Error.prototype), t3.DOMException.prototype.constructor = t3.DOMException;
|
|
2685
2987
|
}
|
|
2686
2988
|
function T(e4, i3) {
|
|
2687
|
-
return new Promise((function(
|
|
2989
|
+
return new Promise((function(n3, o2) {
|
|
2688
2990
|
var a2 = new b(e4, i3);
|
|
2689
2991
|
if (a2.signal && a2.signal.aborted) return o2(new t3.DOMException("Aborted", "AbortError"));
|
|
2690
2992
|
var s2 = new XMLHttpRequest();
|
|
@@ -2693,106 +2995,107 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2693
2995
|
}
|
|
2694
2996
|
s2.onload = function() {
|
|
2695
2997
|
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) {
|
|
2696
|
-
var i5 = e6.split(":"),
|
|
2697
|
-
if (
|
|
2698
|
-
var
|
|
2699
|
-
t4.append(
|
|
2998
|
+
var i5 = e6.split(":"), n4 = i5.shift().trim();
|
|
2999
|
+
if (n4) {
|
|
3000
|
+
var r4 = i5.join(":").trim();
|
|
3001
|
+
t4.append(n4, r4);
|
|
2700
3002
|
}
|
|
2701
3003
|
})), t4) };
|
|
2702
3004
|
i4.url = "responseURL" in s2 ? s2.responseURL : i4.headers.get("X-Request-URL");
|
|
2703
|
-
var
|
|
2704
|
-
|
|
3005
|
+
var r3 = "response" in s2 ? s2.response : s2.responseText;
|
|
3006
|
+
n3(new A(r3, i4));
|
|
2705
3007
|
}, s2.onerror = function() {
|
|
2706
3008
|
o2(new TypeError("Network request failed"));
|
|
2707
3009
|
}, s2.ontimeout = function() {
|
|
2708
3010
|
o2(new TypeError("Network request failed"));
|
|
2709
3011
|
}, s2.onabort = function() {
|
|
2710
3012
|
o2(new t3.DOMException("Aborted", "AbortError"));
|
|
2711
|
-
}, s2.open(a2.method, a2.url, true), "include" === a2.credentials ? s2.withCredentials = true : "omit" === a2.credentials && (s2.withCredentials = false), "responseType" in s2 &&
|
|
3013
|
+
}, s2.open(a2.method, a2.url, true), "include" === a2.credentials ? s2.withCredentials = true : "omit" === a2.credentials && (s2.withCredentials = false), "responseType" in s2 && r2 && (s2.responseType = "blob"), a2.headers.forEach((function(e5, t4) {
|
|
2712
3014
|
s2.setRequestHeader(t4, e5);
|
|
2713
3015
|
})), a2.signal && (a2.signal.addEventListener("abort", l2), s2.onreadystatechange = function() {
|
|
2714
3016
|
4 === s2.readyState && a2.signal.removeEventListener("abort", l2);
|
|
2715
3017
|
}), s2.send(void 0 === a2._bodyInit ? null : a2._bodyInit);
|
|
2716
3018
|
}));
|
|
2717
3019
|
}
|
|
2718
|
-
T.polyfill = true, e3.fetch || (e3.fetch = T, e3.Headers = p, e3.Request = b, e3.Response =
|
|
3020
|
+
T.polyfill = true, e3.fetch || (e3.fetch = T, e3.Headers = p, e3.Request = b, e3.Response = A), t3.Headers = p, t3.Request = b, t3.Response = A, t3.fetch = T, Object.defineProperty(t3, "__esModule", { value: true });
|
|
2719
3021
|
})({});
|
|
2720
|
-
})(
|
|
2721
|
-
var
|
|
2722
|
-
(t2 =
|
|
2723
|
-
},
|
|
3022
|
+
})(n), n.fetch.ponyfill = true, delete n.fetch.polyfill;
|
|
3023
|
+
var r = n;
|
|
3024
|
+
(t2 = r.fetch).default = r.fetch, t2.fetch = r.fetch, t2.Headers = r.Headers, t2.Request = r.Request, t2.Response = r.Response, e2.exports = t2;
|
|
3025
|
+
}, 431: (e2, t2) => {
|
|
2724
3026
|
"use strict";
|
|
2725
3027
|
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/";
|
|
2726
|
-
},
|
|
3028
|
+
}, 2474: function(e2, t2, i) {
|
|
2727
3029
|
"use strict";
|
|
2728
|
-
var
|
|
3030
|
+
var n = this && this.__importDefault || function(e3) {
|
|
2729
3031
|
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
2730
3032
|
};
|
|
2731
3033
|
Object.defineProperty(t2, "__esModule", { value: true });
|
|
2732
|
-
const
|
|
3034
|
+
const r = n(i(5969));
|
|
2733
3035
|
let o = null;
|
|
2734
|
-
o || (o = (0,
|
|
2735
|
-
},
|
|
3036
|
+
o || (o = (0, r.default)()), t2.default = o;
|
|
3037
|
+
}, 5969: function(e2, t2, i) {
|
|
2736
3038
|
"use strict";
|
|
2737
|
-
var
|
|
2738
|
-
return new (i2 || (i2 = Promise))((function(
|
|
3039
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
3040
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
2739
3041
|
function a2(e4) {
|
|
2740
3042
|
try {
|
|
2741
|
-
l2(
|
|
3043
|
+
l2(n2.next(e4));
|
|
2742
3044
|
} catch (e5) {
|
|
2743
3045
|
o2(e5);
|
|
2744
3046
|
}
|
|
2745
3047
|
}
|
|
2746
3048
|
function s2(e4) {
|
|
2747
3049
|
try {
|
|
2748
|
-
l2(
|
|
3050
|
+
l2(n2.throw(e4));
|
|
2749
3051
|
} catch (e5) {
|
|
2750
3052
|
o2(e5);
|
|
2751
3053
|
}
|
|
2752
3054
|
}
|
|
2753
3055
|
function l2(e4) {
|
|
2754
3056
|
var t4;
|
|
2755
|
-
e4.done ?
|
|
3057
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
2756
3058
|
e5(t4);
|
|
2757
3059
|
}))).then(a2, s2);
|
|
2758
3060
|
}
|
|
2759
|
-
l2((
|
|
3061
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
2760
3062
|
}));
|
|
2761
3063
|
};
|
|
2762
3064
|
Object.defineProperty(t2, "__esModule", { value: true });
|
|
2763
|
-
const
|
|
3065
|
+
const r = i(139), o = i(7350), a = i(8587), s = i(1874), l = i(6891), d = i(431), c = i(6029);
|
|
2764
3066
|
t2.default = function() {
|
|
2765
3067
|
const e3 = new a.Config();
|
|
2766
3068
|
let t3 = new s.Log(e3);
|
|
2767
3069
|
return { init: function(i2) {
|
|
2768
|
-
"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);
|
|
2769
|
-
}, send: function(i2,
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
3070
|
+
"boolean" == typeof (null == i2 ? void 0 : i2.debug) && e3.set("debug", i2.debug), "boolean" == typeof (null == i2 ? void 0 : i2.dryRun) && e3.set("dryRun", i2.dryRun), (null == i2 ? void 0 : i2.lang) && e3.set("lang", (0, c.normalizeSurveyLang)(i2.lang)), e3.set("url", (null == i2 ? void 0 : i2.env) && "dev" === (null == i2 ? void 0 : i2.env) ? d.HOST_API_URL_DEV : d.HOST_API_URL), e3.set("env", null == i2 ? void 0 : i2.env), t3.log("Initialized Magicfeedback", e3);
|
|
3071
|
+
}, send: function(i2, r2, o2, a2 = true, s2, d2) {
|
|
3072
|
+
var u;
|
|
3073
|
+
return n(this, void 0, void 0, (function* () {
|
|
3074
|
+
i2 || t3.err("No appID provided"), r2 || t3.err("No publicKey provided"), o2 || t3.err("No feedback provided"), o2.answers || o2.profile || o2.metrics || o2.metadata || t3.err("No feedback data provided");
|
|
3075
|
+
const n2 = e3.get("url"), p = { integration: i2, publicKey: r2, privateKey: d2, completed: a2, id: s2, feedback: o2, lang: null !== (u = (0, c.detectSurveyLang)(e3.get("lang"))) && void 0 !== u ? u : void 0 };
|
|
2773
3076
|
try {
|
|
2774
3077
|
if (e3.get("dryRun")) return t3.log("Dry run enabled: skipping native feedback submit"), `dry-run-${Date.now()}`;
|
|
2775
|
-
const i3 = yield (0, l.sendFeedback)(
|
|
3078
|
+
const i3 = yield (0, l.sendFeedback)(n2, p, t3);
|
|
2776
3079
|
return t3.log("sent native feedback"), i3;
|
|
2777
3080
|
} catch (e4) {
|
|
2778
3081
|
return t3.err("error native feedback", e4), false;
|
|
2779
3082
|
}
|
|
2780
3083
|
}));
|
|
2781
|
-
}, form: function(i2,
|
|
2782
|
-
return i2 || t3.err("No appID provided"),
|
|
2783
|
-
}, agentForm: function(i2,
|
|
2784
|
-
return i2 || t3.err("No integrationId provided"),
|
|
3084
|
+
}, form: function(i2, n2, o2, a2) {
|
|
3085
|
+
return i2 || t3.err("No appID provided"), n2 || t3.err("No publicKey provided"), new r.Form(e3, i2, n2, o2, a2);
|
|
3086
|
+
}, agentForm: function(i2, n2, r2) {
|
|
3087
|
+
return i2 || t3.err("No integrationId provided"), n2 || t3.err("No publicKey provided"), new o.AgentForm(e3, i2, n2, r2);
|
|
2785
3088
|
}, session: function(i2) {
|
|
2786
|
-
return i2 || t3.err("No sessionId provided"), new
|
|
3089
|
+
return i2 || t3.err("No sessionId provided"), new r.Form(e3, i2);
|
|
2787
3090
|
}, previewPage: function(i2, o2, a2) {
|
|
2788
|
-
return
|
|
3091
|
+
return n(this, void 0, void 0, (function* () {
|
|
2789
3092
|
i2 || t3.err("No selector provided"), o2 && o2.page || t3.err("No page provided for preview");
|
|
2790
|
-
const
|
|
3093
|
+
const n2 = (null == o2 ? void 0 : o2.appId) || `preview-${Date.now()}`, s2 = new r.Form(e3, n2);
|
|
2791
3094
|
return yield s2.previewPage(i2, o2, a2), s2;
|
|
2792
3095
|
}));
|
|
2793
3096
|
} };
|
|
2794
3097
|
};
|
|
2795
|
-
},
|
|
3098
|
+
}, 1701: (e2, t2) => {
|
|
2796
3099
|
"use strict";
|
|
2797
3100
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.History = void 0, t2.History = class {
|
|
2798
3101
|
constructor() {
|
|
@@ -2823,42 +3126,42 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2823
3126
|
return this.items[e3];
|
|
2824
3127
|
}
|
|
2825
3128
|
};
|
|
2826
|
-
},
|
|
3129
|
+
}, 7350: function(e2, t2, i) {
|
|
2827
3130
|
"use strict";
|
|
2828
|
-
var
|
|
2829
|
-
return new (i2 || (i2 = Promise))((function(
|
|
3131
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
3132
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
2830
3133
|
function a2(e4) {
|
|
2831
3134
|
try {
|
|
2832
|
-
l2(
|
|
3135
|
+
l2(n2.next(e4));
|
|
2833
3136
|
} catch (e5) {
|
|
2834
3137
|
o2(e5);
|
|
2835
3138
|
}
|
|
2836
3139
|
}
|
|
2837
3140
|
function s2(e4) {
|
|
2838
3141
|
try {
|
|
2839
|
-
l2(
|
|
3142
|
+
l2(n2.throw(e4));
|
|
2840
3143
|
} catch (e5) {
|
|
2841
3144
|
o2(e5);
|
|
2842
3145
|
}
|
|
2843
3146
|
}
|
|
2844
3147
|
function l2(e4) {
|
|
2845
3148
|
var t4;
|
|
2846
|
-
e4.done ?
|
|
3149
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
2847
3150
|
e5(t4);
|
|
2848
3151
|
}))).then(a2, s2);
|
|
2849
3152
|
}
|
|
2850
|
-
l2((
|
|
3153
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
2851
3154
|
}));
|
|
2852
3155
|
};
|
|
2853
3156
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.AgentForm = void 0;
|
|
2854
|
-
const
|
|
3157
|
+
const r = i(1874), o = i(9), a = i(8019), s = i(3963), l = i(1817), d = i(459), c = i(1853), u = i(3903), p = i(7031), m = i(93), h = i(2139);
|
|
2855
3158
|
t2.AgentForm = class {
|
|
2856
|
-
constructor(e3, t3, i2,
|
|
2857
|
-
this.config = e3, this.log = new
|
|
3159
|
+
constructor(e3, t3, i2, n2) {
|
|
3160
|
+
this.config = e3, this.log = new r.Log(e3), this.url = e3.get("url"), this.integrationId = t3, this.publicKey = i2, this.privateKey = n2, this.formOptionsConfig = { addButton: true, addSuccessScreen: true, questionFormat: "standard", answerDelimiter: s.DEFAULT_ANSWER_DELIMITER, resume: true, allowBack: false, emptyAnswerText: "" }, this.selector = "", this.language = "en", this.product = { customIcons: false }, this.sessionId = "", this.conversation = [], this.askedRefs = [], this.currentTurn = 1, this.maxTurns = 0, this.currentQuestion = null, this.questionHistory = [], this.busy = false, this.rateLimitTimer = null, this.progress = 0, this.total = 0, this.completed = false, this.timeToCompleted = 0;
|
|
2858
3161
|
}
|
|
2859
3162
|
generate(e3, t3 = {}) {
|
|
2860
3163
|
var i2;
|
|
2861
|
-
return
|
|
3164
|
+
return n(this, void 0, void 0, (function* () {
|
|
2862
3165
|
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");
|
|
2863
3166
|
try {
|
|
2864
3167
|
const e4 = false !== this.formOptionsConfig.resume ? this.restore() : null;
|
|
@@ -2877,7 +3180,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2877
3180
|
}));
|
|
2878
3181
|
}
|
|
2879
3182
|
next() {
|
|
2880
|
-
return
|
|
3183
|
+
return n(this, void 0, void 0, (function* () {
|
|
2881
3184
|
return this.runTurn();
|
|
2882
3185
|
}));
|
|
2883
3186
|
}
|
|
@@ -2896,27 +3199,27 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2896
3199
|
}
|
|
2897
3200
|
runTurn() {
|
|
2898
3201
|
var e3;
|
|
2899
|
-
return
|
|
3202
|
+
return n(this, void 0, void 0, (function* () {
|
|
2900
3203
|
if (this.busy || this.completed || !this.currentQuestion) return;
|
|
2901
|
-
this.busy = true, this.setSubmitDisabled(true), this.clearError();
|
|
3204
|
+
(0, h.cancelAutoAdvance)(document.getElementById(this.questionsId())), this.busy = true, this.setSubmitDisabled(true), this.clearError();
|
|
2902
3205
|
const t3 = this.currentQuestion;
|
|
2903
3206
|
try {
|
|
2904
|
-
const i2 = document.getElementById(this.formId()),
|
|
3207
|
+
const i2 = document.getElementById(this.formId()), n2 = document.getElementById(this.questionsId());
|
|
2905
3208
|
if (!i2) throw new Error("Agent form not found");
|
|
2906
|
-
yield (0, c.awaitUploadReady)(
|
|
2907
|
-
const
|
|
2908
|
-
let o2 = (0, s.encodeAnswer)(
|
|
3209
|
+
yield (0, c.awaitUploadReady)(n2);
|
|
3210
|
+
const r2 = (0, l.scrapeInputs)(i2);
|
|
3211
|
+
let o2 = (0, s.encodeAnswer)(r2, t3, this.formOptionsConfig.answerDelimiter);
|
|
2909
3212
|
if ("" === o2) {
|
|
2910
3213
|
if (t3.require) return void this.showError(this.formOptionsConfig.requiredMessage || (0, p.t)(this.language, "message.required"));
|
|
2911
3214
|
o2 = this.formOptionsConfig.emptyAnswerText || "";
|
|
2912
3215
|
}
|
|
2913
3216
|
this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
|
|
2914
|
-
const d2 = { role: "user", content: o2, questionType: t3.type, questionRef: t3.ref }, u2 = this.currentTurn + 1,
|
|
2915
|
-
this.conversation.push(d2), this.currentTurn = null !== (e3 =
|
|
2916
|
-
const
|
|
2917
|
-
if ("END" ===
|
|
3217
|
+
const d2 = { role: "user", content: o2, questionType: t3.type, questionRef: t3.ref }, u2 = this.currentTurn + 1, m2 = yield (0, a.nextAgentTurn)(this.url, { publicKey: this.publicKey, privateKey: this.privateKey, integrationId: this.integrationId, sessionId: this.sessionId, conversation: [...this.conversation], currentTurn: u2, lastAnswer: o2, lastQuestionRef: t3.ref, askedRefs: [...this.askedRefs] }, this.log);
|
|
3218
|
+
this.conversation.push(d2), this.currentTurn = null !== (e3 = m2.currentTurn) && void 0 !== e3 ? e3 : u2, m2.maxTurns && (this.maxTurns = m2.maxTurns), this.total = Math.max(this.maxTurns - 1, 0);
|
|
3219
|
+
const h2 = (0, s.toAgentStep)(m2, this.adapterContext());
|
|
3220
|
+
if ("END" === h2.kind) return void (yield this.renderEnd(h2));
|
|
2918
3221
|
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 }));
|
|
2919
|
-
this.acceptQuestion(
|
|
3222
|
+
this.acceptQuestion(h2), this.renderStep(), this.persist(), this.formOptionsConfig.onAgentTurnEvent && (yield this.formOptionsConfig.onAgentTurnEvent({ turn: this.currentTurn, maxTurns: this.maxTurns, question: h2.question, isFromBase: h2.isFromBase, topic: h2.topic, coverageGaps: h2.coverageGaps, coverageSummary: h2.coverageSummary, conversation: this.getConversation() })), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.sessionId, loading: false, progress: this.progress, total: this.total, completed: false, error: null }));
|
|
2920
3223
|
} catch (e4) {
|
|
2921
3224
|
yield this.handleTurnError(e4);
|
|
2922
3225
|
} finally {
|
|
@@ -2925,7 +3228,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2925
3228
|
}));
|
|
2926
3229
|
}
|
|
2927
3230
|
handleTurnError(e3) {
|
|
2928
|
-
return
|
|
3231
|
+
return n(this, void 0, void 0, (function* () {
|
|
2929
3232
|
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 }));
|
|
2930
3233
|
}));
|
|
2931
3234
|
}
|
|
@@ -2951,22 +3254,22 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2951
3254
|
}
|
|
2952
3255
|
renderStep() {
|
|
2953
3256
|
const e3 = document.getElementById(this.questionsId());
|
|
2954
|
-
e3 && this.currentQuestion && (e3.innerHTML = "", (0, u.renderQuestions)([this.currentQuestion], this.formOptionsConfig.questionFormat, this.language, this.product, (() => this.runTurn())).forEach(((t3) => e3.appendChild(t3))));
|
|
3257
|
+
e3 && this.currentQuestion && (e3.innerHTML = "", (0, u.renderQuestions)([this.currentQuestion], this.formOptionsConfig.questionFormat, this.language, this.product, (() => this.runTurn())).forEach(((t3) => e3.appendChild(t3))), (0, m.armGhostTapGuard)(e3));
|
|
2955
3258
|
}
|
|
2956
3259
|
renderEnd(e3) {
|
|
2957
|
-
return
|
|
3260
|
+
return n(this, void 0, void 0, (function* () {
|
|
2958
3261
|
this.completed = true, this.currentQuestion = null, this.busy = false, this.timeToCompleted = this.timeToCompleted ? Date.now() - this.timeToCompleted : 0, this.clearRateLimitTimer(), this.clearPersisted();
|
|
2959
3262
|
const t3 = document.getElementById("magicfeedback-container-" + this.integrationId);
|
|
2960
3263
|
if (t3 && false !== this.formOptionsConfig.addSuccessScreen) {
|
|
2961
3264
|
t3.innerHTML = "";
|
|
2962
|
-
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"),
|
|
2963
|
-
|
|
3265
|
+
const i2 = "BLOCKED" === e3.reason ? this.formOptionsConfig.blockedMessage || (0, p.t)(this.language, "message.blocked") : this.formOptionsConfig.successMessage || (0, p.t)(this.language, "message.success"), n2 = (0, u.renderSuccess)(i2);
|
|
3266
|
+
n2.classList.add("magicfeedback-success-message"), n2.classList.add("magicfeedback-agent-end"), "BLOCKED" === e3.reason && n2.classList.add("magicfeedback-agent-end--blocked"), t3.appendChild(n2);
|
|
2964
3267
|
}
|
|
2965
3268
|
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 }));
|
|
2966
3269
|
}));
|
|
2967
3270
|
}
|
|
2968
3271
|
back() {
|
|
2969
|
-
return
|
|
3272
|
+
return n(this, void 0, void 0, (function* () {
|
|
2970
3273
|
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 }))));
|
|
2971
3274
|
}));
|
|
2972
3275
|
}
|
|
@@ -2993,7 +3296,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2993
3296
|
return { integrationId: this.integrationId, sessionId: this.sessionId, language: this.language, log: this.log };
|
|
2994
3297
|
}
|
|
2995
3298
|
startWithRetry() {
|
|
2996
|
-
return
|
|
3299
|
+
return n(this, void 0, void 0, (function* () {
|
|
2997
3300
|
const e3 = { publicKey: this.publicKey, privateKey: this.privateKey, integrationId: this.integrationId };
|
|
2998
3301
|
try {
|
|
2999
3302
|
return yield (0, a.startAgentSurvey)(this.url, e3, this.log);
|
|
@@ -3018,11 +3321,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3018
3321
|
startRateLimitCountdown(e3) {
|
|
3019
3322
|
this.clearRateLimitTimer(), this.setSubmitDisabled(true);
|
|
3020
3323
|
let t3 = Math.ceil(e3 / 1e3);
|
|
3021
|
-
const i2 = this.formOptionsConfig.rateLimitMessage || (0, p.t)(this.language, "message.rateLimit"),
|
|
3324
|
+
const i2 = this.formOptionsConfig.rateLimitMessage || (0, p.t)(this.language, "message.rateLimit"), n2 = () => {
|
|
3022
3325
|
if (t3 <= 0) return this.clearRateLimitTimer(), this.clearError(), void this.setSubmitDisabled(false);
|
|
3023
3326
|
this.showError(i2.replace("{seconds}", String(t3))), t3 -= 1;
|
|
3024
3327
|
};
|
|
3025
|
-
|
|
3328
|
+
n2(), this.rateLimitTimer = setInterval(n2, 1e3);
|
|
3026
3329
|
}
|
|
3027
3330
|
clearRateLimitTimer() {
|
|
3028
3331
|
this.rateLimitTimer && (clearInterval(this.rateLimitTimer), this.rateLimitTimer = null);
|
|
@@ -3060,7 +3363,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3060
3363
|
(null === (t3 = null == e3 ? void 0 : e3.lang) || void 0 === t3 ? void 0 : t3.length) && (this.language = e3.lang[0]), (null == e3 ? void 0 : e3.product) && (this.product = e3.product), (null === (i2 = null == e3 ? void 0 : e3.style) || void 0 === i2 ? void 0 : i2.primaryColor) && (this.primaryColor = e3.style.primaryColor);
|
|
3061
3364
|
}
|
|
3062
3365
|
};
|
|
3063
|
-
},
|
|
3366
|
+
}, 8587: (e2, t2) => {
|
|
3064
3367
|
"use strict";
|
|
3065
3368
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Config = void 0, t2.Config = class {
|
|
3066
3369
|
constructor() {
|
|
@@ -3073,70 +3376,79 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3073
3376
|
this.variables[e3] = t3;
|
|
3074
3377
|
}
|
|
3075
3378
|
};
|
|
3076
|
-
},
|
|
3379
|
+
}, 139: function(e2, t2, i) {
|
|
3077
3380
|
"use strict";
|
|
3078
|
-
var
|
|
3079
|
-
return new (i2 || (i2 = Promise))((function(
|
|
3381
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
3382
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
3080
3383
|
function a2(e4) {
|
|
3081
3384
|
try {
|
|
3082
|
-
l2(
|
|
3385
|
+
l2(n2.next(e4));
|
|
3083
3386
|
} catch (e5) {
|
|
3084
3387
|
o2(e5);
|
|
3085
3388
|
}
|
|
3086
3389
|
}
|
|
3087
3390
|
function s2(e4) {
|
|
3088
3391
|
try {
|
|
3089
|
-
l2(
|
|
3392
|
+
l2(n2.throw(e4));
|
|
3090
3393
|
} catch (e5) {
|
|
3091
3394
|
o2(e5);
|
|
3092
3395
|
}
|
|
3093
3396
|
}
|
|
3094
3397
|
function l2(e4) {
|
|
3095
3398
|
var t4;
|
|
3096
|
-
e4.done ?
|
|
3399
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
3097
3400
|
e5(t4);
|
|
3098
3401
|
}))).then(a2, s2);
|
|
3099
3402
|
}
|
|
3100
|
-
l2((
|
|
3403
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
3101
3404
|
}));
|
|
3102
3405
|
};
|
|
3103
3406
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Form = void 0;
|
|
3104
|
-
const
|
|
3407
|
+
const r = i(1140), o = i(7350), a = i(1874), s = i(6891), l = i(3903), d = i(1853), c = i(459), u = i(1817), p = i(2531), m = i(198), h = i(4245), f = i(1701), g = i(1814), y = i(7031), v = i(6029), b = i(93), E = i(9033), A = i(2139);
|
|
3105
3408
|
t2.Form = class {
|
|
3106
|
-
constructor(e3, t3, i2,
|
|
3107
|
-
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 !=
|
|
3409
|
+
constructor(e3, t3, i2, n2, r2) {
|
|
3410
|
+
this.config = e3, this.log = new a.Log(e3), this.formOptionsConfig = { addButton: true, addSuccessScreen: true, getMetaData: true, customMetaData: [], questionFormat: "standard" }, this.selector = "", this.appId = t3, this.publicKey = i2 || "", this.url = e3.get("url"), this.id = "", this.formData = null, this.activeLang = null, this.feedback = { text: "", answers: [], profile: null != n2 ? n2 : [], metrics: [], metadata: null != r2 ? r2 : [] }, this.history = new f.History(), this.agentForm = null, this.graph = new p.PageGraph([]), this.progress = 0, this.total = 0, this.completed = false, this.sending = false, this.timeToCompleted = 0;
|
|
3108
3411
|
}
|
|
3109
3412
|
generate(e3, t3) {
|
|
3110
|
-
var i2,
|
|
3111
|
-
return
|
|
3413
|
+
var i2, r2, a2, l2, d2, c2, u2;
|
|
3414
|
+
return n(this, void 0, void 0, (function* () {
|
|
3112
3415
|
try {
|
|
3113
3416
|
this.formOptionsConfig = Object.assign(Object.assign({}, this.formOptionsConfig), t3), this.selector = e3;
|
|
3114
|
-
let
|
|
3115
|
-
|
|
3116
|
-
if (
|
|
3117
|
-
if (
|
|
3118
|
-
if (
|
|
3417
|
+
let n2 = this.formData;
|
|
3418
|
+
const p2 = (0, v.detectSurveyLang)((null == t3 ? void 0 : t3.lang) || this.config.get("lang"));
|
|
3419
|
+
if (void 0 !== this.formData && this.formData || (n2 = "" !== this.publicKey ? yield (0, s.getForm)(this.url, this.appId, this.publicKey, this.log, p2) : yield (0, s.getSessionForm)(this.url, this.appId, this.log, p2)), void 0 === n2 || !n2) throw new Error(`No data for app ${this.appId}`);
|
|
3420
|
+
if (null === (i2 = n2.error) || void 0 === i2 ? void 0 : i2.message) throw new Error(n2.error.message);
|
|
3421
|
+
if ("AGENT" === n2.mode) return this.agentForm = new o.AgentForm(this.config, this.appId, this.publicKey), this.agentForm.applyIntegrationContext(n2), void (yield this.agentForm.generate(e3, t3));
|
|
3422
|
+
if (n2.questions = (null === (r2 = n2.questions) || void 0 === r2 ? void 0 : r2.filter(((e4) => "ACTIVE" === e4.status))) || [], n2.pages = (null === (a2 = n2.pages) || void 0 === a2 ? void 0 : a2.filter(((e4) => "ACTIVE" === e4.status))) || [], null === (l2 = n2.pages) || void 0 === l2 || l2.forEach(((e4) => {
|
|
3119
3423
|
var t4;
|
|
3120
3424
|
return e4.integrationQuestions = null === (t4 = e4.integrationQuestions) || void 0 === t4 ? void 0 : t4.filter(((e5) => "ACTIVE" === e5.status));
|
|
3121
|
-
})), this.formData =
|
|
3425
|
+
})), this.formData = n2, this.activeLang = this.resolveActiveLang(p2), !this.formData.savedAt) {
|
|
3426
|
+
this.formData.savedAt = /* @__PURE__ */ new Date();
|
|
3427
|
+
try {
|
|
3428
|
+
localStorage.setItem(`magicfeedback-${this.appId}-${this.lang()}`, JSON.stringify(this.formData));
|
|
3429
|
+
} catch (e4) {
|
|
3430
|
+
this.log.log("Could not cache the form data", e4);
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3433
|
+
if (void 0 === this.formData.questions || !this.formData.questions) throw new Error(`No questions for app ${this.appId}`);
|
|
3122
3434
|
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) => {
|
|
3123
3435
|
var t4;
|
|
3124
3436
|
return (null === (t4 = e4.integrationQuestions) || void 0 === t4 ? void 0 : t4.length) > 0;
|
|
3125
|
-
})), this.formOptionsConfig.getMetaData && this.getMetaData(), (null === (u2 = this.formData.style) || void 0 === u2 ? void 0 : u2.startMessage) ? yield this.generateWelcomeMessage(this.formData.style.startMessage) : this.
|
|
3437
|
+
})), this.formOptionsConfig.getMetaData && this.getMetaData(), (null === (u2 = this.formData.style) || void 0 === u2 ? void 0 : u2.startMessage) ? yield this.generateWelcomeMessage(this.formData.style.startMessage) : this.generateForm("open");
|
|
3126
3438
|
} catch (e4) {
|
|
3127
3439
|
return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 })));
|
|
3128
3440
|
}
|
|
3129
3441
|
}));
|
|
3130
3442
|
}
|
|
3131
3443
|
previewPage(e3, t3, i2 = {}) {
|
|
3132
|
-
var
|
|
3133
|
-
return
|
|
3444
|
+
var r2, o2, a2, s2, l2, d2, c2, u2, p2;
|
|
3445
|
+
return n(this, void 0, void 0, (function* () {
|
|
3134
3446
|
try {
|
|
3135
3447
|
if (!t3 || !t3.page) throw new Error("[MagicFeedback] No page provided for preview");
|
|
3136
3448
|
if (!t3.page.integrationQuestions || 0 === t3.page.integrationQuestions.length) throw new Error("[MagicFeedback] No questions provided for preview");
|
|
3137
3449
|
this.config.set("dryRun", true), this.formOptionsConfig = Object.assign(Object.assign(Object.assign({}, this.formOptionsConfig), { getMetaData: false }), i2), this.selector = e3;
|
|
3138
|
-
const
|
|
3139
|
-
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:
|
|
3450
|
+
const n2 = (t3.page.integrationQuestions || []).filter(((e4) => !e4.status || "ACTIVE" === e4.status)).sort(((e4, t4) => e4.position - t4.position)), h2 = new m.Page(null !== (r2 = t3.page.id) && void 0 !== r2 ? r2 : "1", null !== (o2 = t3.page.position) && void 0 !== o2 ? o2 : 1, null !== (a2 = t3.appId) && void 0 !== a2 ? a2 : this.appId, n2, null !== (s2 = t3.page.integrationPageRoutes) && void 0 !== s2 ? s2 : []);
|
|
3451
|
+
this.formData = { id: null !== (l2 = t3.appId) && void 0 !== l2 ? l2 : this.appId, identity: null !== (d2 = t3.identity) && void 0 !== d2 ? d2 : "MAGICFORM", lang: [null !== (c2 = t3.lang) && void 0 !== c2 ? c2 : "en"], product: null !== (u2 = t3.product) && void 0 !== u2 ? u2 : { customIcons: false }, style: null !== (p2 = t3.style) && void 0 !== p2 ? p2 : {}, questions: n2, pages: [h2] }, yield this.generateForm();
|
|
3140
3452
|
} catch (e4) {
|
|
3141
3453
|
return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 })));
|
|
3142
3454
|
}
|
|
@@ -3148,8 +3460,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3148
3460
|
case "MAGICSURVEY":
|
|
3149
3461
|
this.formData.pages = [], null === (e3 = this.formData.questions) || void 0 === e3 || e3.forEach(((e4) => {
|
|
3150
3462
|
var t4, i2;
|
|
3151
|
-
const
|
|
3152
|
-
null === (i2 = null === (t4 = this.formData) || void 0 === t4 ? void 0 : t4.pages) || void 0 === i2 || i2.push(
|
|
3463
|
+
const n2 = new h.PageRoute(e4.id, e4.ref, h.OperatorType.NOEQUAL, [], h.TransitionType.PAGE, (e4.position + 1).toString(), e4.position.toString()), r2 = new m.Page(e4.position.toString(), e4.position, this.appId, [e4], [n2]);
|
|
3464
|
+
null === (i2 = null === (t4 = this.formData) || void 0 === t4 ? void 0 : t4.pages) || void 0 === i2 || i2.push(r2);
|
|
3153
3465
|
}));
|
|
3154
3466
|
break;
|
|
3155
3467
|
case "MAGICFORM":
|
|
@@ -3159,46 +3471,61 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3159
3471
|
}
|
|
3160
3472
|
generateContainer() {
|
|
3161
3473
|
var e3, t3;
|
|
3162
|
-
const i2 = (0, c.generateContainer)(this.selector, this.appId),
|
|
3163
|
-
return
|
|
3474
|
+
const i2 = (0, c.generateContainer)(this.selector, this.appId), n2 = null === (t3 = null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.style) || void 0 === t3 ? void 0 : t3.primaryColor;
|
|
3475
|
+
return n2 && (0, c.applyPrimaryColor)(i2, n2), (0, c.applyDirection)(i2, this.lang()), i2;
|
|
3164
3476
|
}
|
|
3165
|
-
generateForm() {
|
|
3166
|
-
var
|
|
3167
|
-
return
|
|
3477
|
+
generateForm(e3 = "open") {
|
|
3478
|
+
var t3, i2, r2;
|
|
3479
|
+
return n(this, void 0, void 0, (function* () {
|
|
3168
3480
|
try {
|
|
3169
3481
|
if (!this.formData || !this.formData.pages || 0 === this.formData.pages.length) throw new Error("No form data");
|
|
3170
3482
|
this.graph = new p.PageGraph(this.formData.pages.sort(((e4, t4) => e4.position - t4.position)));
|
|
3171
|
-
let
|
|
3483
|
+
let n2 = this.generateContainer();
|
|
3172
3484
|
const o2 = document.createElement("form");
|
|
3173
3485
|
o2.classList.add("magicfeedback-form"), o2.id = "magicfeedback-" + this.appId, o2.addEventListener("submit", ((e4) => e4.preventDefault()));
|
|
3174
3486
|
const a2 = document.createElement("div");
|
|
3175
3487
|
a2.classList.add("magicfeedback-questions"), a2.id = "magicfeedback-questions-" + this.appId;
|
|
3176
3488
|
const s2 = this.graph.getFirstPage();
|
|
3177
3489
|
if (!s2) throw new Error("No page found");
|
|
3178
|
-
if (this.total = this.graph.findMaxDepth(), s2.elements = (0, l.renderQuestions)(s2.questions, this.formOptionsConfig.questionFormat,
|
|
3179
|
-
const e4 = (0, l.renderActions)(null === (
|
|
3180
|
-
o2.appendChild(e4);
|
|
3490
|
+
if (this.total = this.graph.findMaxDepth(), s2.elements = (0, l.renderQuestions)(s2.questions, this.formOptionsConfig.questionFormat, this.lang(), null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.product, (() => this.autoSend())), null === (i2 = s2.elements) || void 0 === i2 || i2.forEach(((e4) => a2.appendChild(e4))), o2.appendChild(a2), (0, b.armGhostTapGuard)(a2), this.history.enqueue(s2), n2.appendChild(o2), this.progress = this.total - this.graph.findMaxDepth(s2), this.formOptionsConfig.addButton) {
|
|
3491
|
+
const e4 = (0, l.renderActions)(null === (r2 = this.formData) || void 0 === r2 ? void 0 : r2.identity, (() => this.back()), this.formOptionsConfig.sendButtonText || (0, y.t)(this.lang(), "action.send"), this.formOptionsConfig.backButtonText || (0, y.t)(this.lang(), "action.back"), this.formOptionsConfig.nextButtonText || (0, y.t)(this.lang(), "action.next"));
|
|
3492
|
+
o2.appendChild(e4), this.syncBackButton();
|
|
3181
3493
|
}
|
|
3182
3494
|
this.formOptionsConfig.addButton && o2.addEventListener("submit", ((e4) => {
|
|
3183
3495
|
e4.preventDefault(), this.send();
|
|
3184
|
-
})), 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 }));
|
|
3496
|
+
})), this.timeToCompleted = Date.now(), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, progress: this.progress, total: this.total, formData: this.formData, lang: this.lang(), formOptionsConfig: this.formOptionsConfig })), this.autofocusAfterRender(e3);
|
|
3185
3497
|
} catch (e4) {
|
|
3186
3498
|
return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 }));
|
|
3187
3499
|
}
|
|
3188
3500
|
}));
|
|
3189
3501
|
}
|
|
3190
3502
|
startForm() {
|
|
3191
|
-
this.generateForm();
|
|
3503
|
+
this.generateForm("navigation");
|
|
3504
|
+
}
|
|
3505
|
+
focusFirstQuestion() {
|
|
3506
|
+
return "undefined" != typeof document && (0, E.focusFirstTextQuestion)(document.getElementById("magicfeedback-questions-" + this.appId));
|
|
3507
|
+
}
|
|
3508
|
+
autofocusAfterRender(e3) {
|
|
3509
|
+
const t3 = this.formOptionsConfig.autofocus;
|
|
3510
|
+
t3 && ("open" === e3 && "always" !== t3 || this.focusFirstQuestion());
|
|
3192
3511
|
}
|
|
3193
3512
|
lang() {
|
|
3194
3513
|
var e3;
|
|
3195
|
-
return (null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.lang) && this.formData.lang[0] || "en";
|
|
3514
|
+
return this.activeLang || (null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.lang) && this.formData.lang[0] || "en";
|
|
3515
|
+
}
|
|
3516
|
+
getLang() {
|
|
3517
|
+
return this.lang();
|
|
3518
|
+
}
|
|
3519
|
+
resolveActiveLang(e3) {
|
|
3520
|
+
var t3, i2;
|
|
3521
|
+
const n2 = (null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.lang) || [];
|
|
3522
|
+
return (null === (i2 = this.formData) || void 0 === i2 ? void 0 : i2.servedLang) ? this.formData.servedLang : e3 && n2.includes(e3) ? e3 : n2[0] || null;
|
|
3196
3523
|
}
|
|
3197
3524
|
generateWelcomeMessage(e3) {
|
|
3198
|
-
return
|
|
3525
|
+
return n(this, void 0, void 0, (function* () {
|
|
3199
3526
|
try {
|
|
3200
3527
|
const t3 = this.generateContainer(), i2 = (0, l.renderStartMessage)(e3, this.formOptionsConfig.addButton, this.formOptionsConfig.startButtonText || (0, y.t)(this.lang(), "action.start"), (() => this.startForm()));
|
|
3201
|
-
t3.appendChild(i2), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, formData: this.formData }));
|
|
3528
|
+
t3.appendChild(i2), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, formData: this.formData, lang: this.lang() }));
|
|
3202
3529
|
} catch (e4) {
|
|
3203
3530
|
return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 }));
|
|
3204
3531
|
}
|
|
@@ -3213,9 +3540,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3213
3540
|
})), 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] });
|
|
3214
3541
|
}
|
|
3215
3542
|
send(e3, t3, i2, o2) {
|
|
3216
|
-
|
|
3543
|
+
var a2, s2;
|
|
3544
|
+
return n(this, void 0, void 0, (function* () {
|
|
3217
3545
|
if (this.agentForm) return this.agentForm.next();
|
|
3218
|
-
const
|
|
3546
|
+
const n2 = document.getElementById("magicfeedback-questions-" + this.appId);
|
|
3547
|
+
(0, A.cancelAutoAdvance)(n2), this.sending = true;
|
|
3219
3548
|
try {
|
|
3220
3549
|
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) {
|
|
3221
3550
|
this.feedback.answers = [...this.feedback.answers, ...o2], this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
|
|
@@ -3223,133 +3552,169 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3223
3552
|
if (!e4) throw new Error("No response");
|
|
3224
3553
|
return this.id = e4, void (this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total })));
|
|
3225
3554
|
}
|
|
3226
|
-
yield (0, d.awaitUploadReady)(
|
|
3227
|
-
const
|
|
3228
|
-
if (!
|
|
3229
|
-
for (const e4 of
|
|
3555
|
+
yield (0, d.awaitUploadReady)(n2), this.answer(), this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
|
|
3556
|
+
const l2 = this.history.back();
|
|
3557
|
+
if (!l2) throw new Error("No page found");
|
|
3558
|
+
for (const e4 of l2.questions.filter(((e5) => e5.require && ![r.FEEDBACKAPPANSWERTYPE.CONSENT, r.FEEDBACKAPPANSWERTYPE.INFO_PAGE].includes(e5.type)))) {
|
|
3230
3559
|
const t4 = e4.assets, i3 = this.feedback.answers.filter(((t5) => t5.key.includes(e4.ref) && !t5.key.includes("extra-option")));
|
|
3231
3560
|
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");
|
|
3232
3561
|
if (null == t4 ? void 0 : t4.minOptions) {
|
|
3233
|
-
let
|
|
3234
|
-
if ((null == t4 ? void 0 : t4.exclusiveAnswers) && (
|
|
3562
|
+
let n3 = [];
|
|
3563
|
+
if ((null == t4 ? void 0 : t4.exclusiveAnswers) && (n3 = null == t4 ? void 0 : t4.exclusiveAnswers), !i3[0].value.find(((e5) => n3.includes(e5))) && i3[0].value.length < (null == t4 ? void 0 : t4.minOptions)) throw this.log.err(`The question ${e4.ref} requires at least ${null == t4 ? void 0 : t4.minOptions} options`), new Error("No response");
|
|
3235
3564
|
}
|
|
3236
|
-
if (e4.type ===
|
|
3565
|
+
if (e4.type === r.FEEDBACKAPPANSWERTYPE.MAX_DIFF) {
|
|
3566
|
+
const t5 = null !== (s2 = null === (a2 = e4.assets) || void 0 === a2 ? void 0 : a2.setIndex) && void 0 !== s2 ? s2 : 1, i4 = this.parseMaxDiffAnswer(this.feedback.answers.find(((t6) => t6.key === e4.ref))).find(((e5) => e5.set === t5));
|
|
3567
|
+
if (!(null == i4 ? void 0 : i4.best) || !(null == i4 ? void 0 : i4.worst)) throw this.log.err(`The MaxDiff question ${e4.ref} requires the most and the least important`), new Error("No response");
|
|
3568
|
+
}
|
|
3569
|
+
if (e4.type === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) {
|
|
3237
3570
|
const i4 = this.feedback.answers.find(((t5) => t5.key === e4.ref));
|
|
3238
3571
|
if (!i4) throw this.log.err(`The matrix question ${e4.ref} is required`), new Error("No response");
|
|
3239
|
-
const
|
|
3240
|
-
if (
|
|
3241
|
-
if (
|
|
3242
|
-
const t5 =
|
|
3572
|
+
const n3 = this.parseMatrixAnswerPre(i4), r2 = Array.isArray(null == t4 ? void 0 : t4.options) ? t4.options : [];
|
|
3573
|
+
if (r2.length > 0) {
|
|
3574
|
+
if (r2.find(((e5) => {
|
|
3575
|
+
const t5 = n3.find(((t6) => t6.key === e5));
|
|
3243
3576
|
return !t5 || !Array.isArray(t5.value) || 0 === t5.value.length;
|
|
3244
3577
|
}))) throw this.log.err(`The matrix question ${e4.ref} requires an answer in every row`), new Error("No response");
|
|
3245
|
-
} else if (0 ===
|
|
3578
|
+
} else if (0 === n3.length || n3.some(((e5) => !Array.isArray(e5.value) || 0 === e5.value.length))) throw this.log.err(`The matrix question ${e4.ref} requires an answer in every row`), new Error("No response");
|
|
3246
3579
|
}
|
|
3247
3580
|
}
|
|
3248
|
-
const
|
|
3249
|
-
if (!
|
|
3250
|
-
this.id =
|
|
3581
|
+
const c2 = yield this.pushAnswers(false);
|
|
3582
|
+
if (!c2) throw new Error("No response");
|
|
3583
|
+
this.id = c2, yield this.processNextQuestion(n2);
|
|
3251
3584
|
} catch (e4) {
|
|
3252
3585
|
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 }));
|
|
3586
|
+
} finally {
|
|
3587
|
+
this.sending = false;
|
|
3253
3588
|
}
|
|
3254
3589
|
}));
|
|
3255
3590
|
}
|
|
3591
|
+
autoSend() {
|
|
3592
|
+
if (!this.sending) return this.send();
|
|
3593
|
+
}
|
|
3256
3594
|
answer() {
|
|
3257
|
-
const e3 =
|
|
3258
|
-
if (!
|
|
3259
|
-
const
|
|
3260
|
-
if (!
|
|
3261
|
-
const
|
|
3262
|
-
let
|
|
3263
|
-
const
|
|
3264
|
-
if (
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
case
|
|
3273
|
-
case
|
|
3274
|
-
case
|
|
3275
|
-
case
|
|
3276
|
-
case
|
|
3277
|
-
case
|
|
3278
|
-
|
|
3595
|
+
const e3 = "magicfeedback-" + this.appId, t3 = document.getElementById(e3);
|
|
3596
|
+
if (!t3) return this.log.err(`Form "${e3}" not found.`), this.feedback.answers = [], [];
|
|
3597
|
+
const i2 = this.history.back();
|
|
3598
|
+
if (!i2) return this.feedback.answers = (0, u.scrapeInputs)(t3), this.feedback.answers;
|
|
3599
|
+
const n2 = [];
|
|
3600
|
+
let o2 = false;
|
|
3601
|
+
const a2 = t3.querySelectorAll(".magicfeedback-input"), l2 = {}, c2 = {}, p2 = {}, m2 = {};
|
|
3602
|
+
if (a2.forEach(((e4) => {
|
|
3603
|
+
var t4, a3;
|
|
3604
|
+
const u2 = e4, h3 = i2.questions.find(((e5) => {
|
|
3605
|
+
var t5;
|
|
3606
|
+
return null === (t5 = u2.name) || void 0 === t5 ? void 0 : t5.includes(e5.ref);
|
|
3607
|
+
})), f2 = u2.type, g2 = u2.classList[0], y2 = { key: u2.name, value: [] }, v2 = "magicfeedback-consent" === g2 ? u2.checked.toString() : u2.value;
|
|
3608
|
+
if (y2.key && "" !== y2.key) if (y2.key.startsWith("extra-option-")) "" !== v2 && (y2.value.push(v2), n2.push(y2));
|
|
3609
|
+
else switch (null == h3 ? void 0 : h3.type) {
|
|
3610
|
+
case r.FEEDBACKAPPANSWERTYPE.EMAIL:
|
|
3611
|
+
case r.FEEDBACKAPPANSWERTYPE.TEXT:
|
|
3612
|
+
case r.FEEDBACKAPPANSWERTYPE.LONGTEXT:
|
|
3613
|
+
case r.FEEDBACKAPPANSWERTYPE.NUMBER:
|
|
3614
|
+
case r.FEEDBACKAPPANSWERTYPE.DATE:
|
|
3615
|
+
case r.FEEDBACKAPPANSWERTYPE.CONTACT:
|
|
3616
|
+
case r.FEEDBACKAPPANSWERTYPE.PASSWORD:
|
|
3617
|
+
"" !== v2 && ("email" === f2 ? (0, s.validateEmail)(v2) ? (this.feedback.profile.push({ key: "email", value: [v2] }), y2.value.push(v2), n2.push(y2)) : (this.log.err("Invalid email"), o2 = true) : (y2.value.push(v2), n2.push(y2)));
|
|
3279
3618
|
break;
|
|
3280
|
-
case
|
|
3281
|
-
|
|
3619
|
+
case r.FEEDBACKAPPANSWERTYPE.RADIO:
|
|
3620
|
+
u2.checked && (y2.value.push(v2), n2.push(y2));
|
|
3282
3621
|
break;
|
|
3283
|
-
case
|
|
3284
|
-
case
|
|
3285
|
-
|
|
3622
|
+
case r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE:
|
|
3623
|
+
case r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE:
|
|
3624
|
+
u2.checked && (c2[y2.key] || (c2[y2.key] = []), c2[y2.key].push(v2));
|
|
3286
3625
|
break;
|
|
3287
|
-
case
|
|
3288
|
-
|
|
3626
|
+
case r.FEEDBACKAPPANSWERTYPE.BOOLEAN:
|
|
3627
|
+
u2.checked && (y2.value.push(v2), n2.push(y2));
|
|
3289
3628
|
break;
|
|
3290
|
-
case
|
|
3291
|
-
|
|
3629
|
+
case r.FEEDBACKAPPANSWERTYPE.CONSENT:
|
|
3630
|
+
y2.value.push(u2.checked.toString()), n2.push(y2);
|
|
3292
3631
|
break;
|
|
3293
|
-
case
|
|
3294
|
-
case
|
|
3295
|
-
case
|
|
3296
|
-
|
|
3632
|
+
case r.FEEDBACKAPPANSWERTYPE.RATING_EMOJI:
|
|
3633
|
+
case r.FEEDBACKAPPANSWERTYPE.RATING_NUMBER:
|
|
3634
|
+
case r.FEEDBACKAPPANSWERTYPE.RATING_STAR:
|
|
3635
|
+
u2.checked && (y2.value.push(v2), n2.push(y2));
|
|
3297
3636
|
break;
|
|
3298
|
-
case
|
|
3299
|
-
"" !==
|
|
3637
|
+
case r.FEEDBACKAPPANSWERTYPE.SELECT:
|
|
3638
|
+
"" !== v2 && (y2.value.push(v2), n2.push(y2));
|
|
3300
3639
|
break;
|
|
3301
|
-
case
|
|
3302
|
-
"number" ===
|
|
3640
|
+
case r.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM:
|
|
3641
|
+
"number" === f2 && u2.id && (p2[y2.key] || (p2[y2.key] = []), "" !== v2 && p2[y2.key].push(`${u2.id}:${v2}%`));
|
|
3303
3642
|
break;
|
|
3304
|
-
case
|
|
3305
|
-
"hidden" ===
|
|
3643
|
+
case r.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST:
|
|
3644
|
+
"hidden" === f2 && (l2[y2.key] || (l2[y2.key] = []), l2[y2.key].push(v2));
|
|
3306
3645
|
break;
|
|
3307
|
-
case
|
|
3308
|
-
e4.checked && (
|
|
3646
|
+
case r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX:
|
|
3647
|
+
e4.checked && (y2.value.push(v2), n2.push(y2));
|
|
3309
3648
|
break;
|
|
3310
|
-
case
|
|
3311
|
-
|
|
3312
|
-
const e5 =
|
|
3313
|
-
|
|
3649
|
+
case r.FEEDBACKAPPANSWERTYPE.MAX_DIFF: {
|
|
3650
|
+
if ("radio" !== f2 || !h3) break;
|
|
3651
|
+
const e5 = y2.key === `${h3.ref}-best` ? "best" : y2.key === `${h3.ref}-worst` ? "worst" : null;
|
|
3652
|
+
if (!e5) break;
|
|
3653
|
+
m2[h3.ref] || (m2[h3.ref] = { set: null !== (a3 = null === (t4 = h3.assets) || void 0 === t4 ? void 0 : t4.setIndex) && void 0 !== a3 ? a3 : 1, shown: [], best: null, worst: null });
|
|
3654
|
+
const i3 = m2[h3.ref];
|
|
3655
|
+
"best" === e5 && i3.shown.push(v2), u2.checked && (i3[e5] = v2);
|
|
3656
|
+
break;
|
|
3657
|
+
}
|
|
3658
|
+
case r.FEEDBACKAPPANSWERTYPE.UPLOAD_IMAGE:
|
|
3659
|
+
case r.FEEDBACKAPPANSWERTYPE.UPLOAD_FILE: {
|
|
3660
|
+
const e5 = (0, d.getUploadValues)(u2);
|
|
3661
|
+
e5.length && (y2.value.push(...e5), n2.push(y2));
|
|
3314
3662
|
break;
|
|
3315
3663
|
}
|
|
3316
3664
|
}
|
|
3317
|
-
})),
|
|
3318
|
-
Object.entries(
|
|
3319
|
-
t4 && 0 !== t4.length &&
|
|
3320
|
-
})), Object.entries(
|
|
3321
|
-
t4 && 0 !== t4.length &&
|
|
3322
|
-
})), Object.entries(
|
|
3665
|
+
})), o2) return [];
|
|
3666
|
+
Object.entries(c2).forEach((([e4, t4]) => {
|
|
3667
|
+
t4 && 0 !== t4.length && n2.push({ key: e4, value: t4 });
|
|
3668
|
+
})), Object.entries(p2).forEach((([e4, t4]) => {
|
|
3669
|
+
t4 && 0 !== t4.length && n2.push({ key: e4, value: t4 });
|
|
3670
|
+
})), Object.entries(l2).forEach((([e4, t4]) => {
|
|
3323
3671
|
if (!t4 || 0 === t4.length) return;
|
|
3324
|
-
const
|
|
3325
|
-
|
|
3672
|
+
const i3 = t4.slice().sort(((e5, t5) => Number(e5.split(".")[0]) - Number(t5.split(".")[0])));
|
|
3673
|
+
n2.push({ key: e4, value: i3 });
|
|
3674
|
+
})), Object.entries(m2).forEach((([e4, t4]) => {
|
|
3675
|
+
(t4.best || t4.worst) && n2.push({ key: e4, value: [JSON.stringify([t4])] });
|
|
3326
3676
|
}));
|
|
3327
3677
|
try {
|
|
3328
|
-
|
|
3329
|
-
const t4 = e4.ref + "-",
|
|
3330
|
-
if (0 ===
|
|
3331
|
-
const
|
|
3332
|
-
for (const e5 of
|
|
3333
|
-
const t5 =
|
|
3334
|
-
-1 !== t5 &&
|
|
3678
|
+
i2.questions.filter(((e4) => e4.type === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX)).forEach(((e4) => {
|
|
3679
|
+
const t4 = e4.ref + "-", i3 = n2.filter(((e5) => e5.key.startsWith(t4)));
|
|
3680
|
+
if (0 === i3.length) return;
|
|
3681
|
+
const r2 = i3.map(((e5) => ({ key: e5.key.substring(t4.length), value: e5.value }))), o3 = { key: e4.ref, value: [JSON.stringify(r2)] };
|
|
3682
|
+
for (const e5 of i3) {
|
|
3683
|
+
const t5 = n2.findIndex(((t6) => t6.key === e5.key));
|
|
3684
|
+
-1 !== t5 && n2.splice(t5, 1);
|
|
3335
3685
|
}
|
|
3336
|
-
const a3 =
|
|
3337
|
-
-1 !== a3 ?
|
|
3686
|
+
const a3 = n2.findIndex(((t5) => t5.key === e4.ref));
|
|
3687
|
+
-1 !== a3 ? n2[a3] = o3 : n2.push(o3);
|
|
3338
3688
|
}));
|
|
3339
3689
|
} catch (e4) {
|
|
3340
3690
|
this.log.err("Error agrupando MULTI_QUESTION_MATRIX", e4);
|
|
3341
3691
|
}
|
|
3342
|
-
|
|
3692
|
+
const h2 = this.withEarlierMaxDiffSets((0, v.toBaseAnswers)(n2, i2.questions), i2.questions);
|
|
3693
|
+
return this.feedback.answers = h2, i2.setAnswer(h2), h2;
|
|
3694
|
+
}
|
|
3695
|
+
withEarlierMaxDiffSets(e3, t3) {
|
|
3696
|
+
return e3.map(((e4) => {
|
|
3697
|
+
if (!t3.some(((t4) => t4.ref === e4.key && t4.type === r.FEEDBACKAPPANSWERTYPE.MAX_DIFF))) return e4;
|
|
3698
|
+
const i2 = this.parseMaxDiffAnswer(e4), n2 = [...this.parseMaxDiffAnswer(this.earlierAnswer(e4.key)).filter(((e5) => !i2.some(((t4) => t4.set === e5.set)))), ...i2].sort(((e5, t4) => e5.set - t4.set));
|
|
3699
|
+
return Object.assign(Object.assign({}, e4), { value: [JSON.stringify(n2)] });
|
|
3700
|
+
}));
|
|
3701
|
+
}
|
|
3702
|
+
earlierAnswer(e3) {
|
|
3703
|
+
var t3, i2;
|
|
3704
|
+
for (let n2 = this.history.size() - 2; n2 >= 0; n2--) {
|
|
3705
|
+
const r2 = null === (i2 = null === (t3 = this.history.get(n2)) || void 0 === t3 ? void 0 : t3.answers) || void 0 === i2 ? void 0 : i2.find(((t4) => t4.key === e3));
|
|
3706
|
+
if (r2) return r2;
|
|
3707
|
+
}
|
|
3343
3708
|
}
|
|
3344
3709
|
finish() {
|
|
3345
|
-
return
|
|
3710
|
+
return n(this, void 0, void 0, (function* () {
|
|
3346
3711
|
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) {
|
|
3347
3712
|
const e3 = document.getElementById("magicfeedback-container-" + this.appId);
|
|
3348
3713
|
e3.childNodes.length > 0 && e3.removeChild(e3.childNodes[0]);
|
|
3349
3714
|
const t3 = (0, l.renderSuccess)(this.formOptionsConfig.successMessage || (0, y.t)(this.lang(), "message.success"));
|
|
3350
3715
|
e3.appendChild(t3);
|
|
3351
3716
|
}
|
|
3352
|
-
this.
|
|
3717
|
+
this.feedback.answers = [];
|
|
3353
3718
|
try {
|
|
3354
3719
|
const e3 = yield this.pushAnswers(true);
|
|
3355
3720
|
if (!e3) throw this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total, completed: this.completed, error: `An error occurred while submitting the form ${this.appId}:` })), new Error("An error occurred while submitting the form ${this.appId}:");
|
|
@@ -3360,13 +3725,13 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3360
3725
|
}));
|
|
3361
3726
|
}
|
|
3362
3727
|
pushAnswers(e3 = false) {
|
|
3363
|
-
return
|
|
3728
|
+
return n(this, void 0, void 0, (function* () {
|
|
3364
3729
|
try {
|
|
3365
3730
|
if (this.config.get("dryRun")) {
|
|
3366
3731
|
const e4 = this.id || `dry-run-${this.appId}-${Date.now()}`;
|
|
3367
3732
|
return this.log.log(`Dry run enabled: skipping feedback submit for form ${this.appId}`), e4;
|
|
3368
3733
|
}
|
|
3369
|
-
const t3 = this.config.get("url"), i2 = { integration: this.appId, publicKey: this.publicKey, feedback: this.feedback, completed: e3 };
|
|
3734
|
+
const t3 = this.config.get("url"), i2 = { integration: this.appId, publicKey: this.publicKey, feedback: this.feedback, completed: e3, lang: this.lang() };
|
|
3370
3735
|
return yield (0, s.sendFeedback)(t3, this.id ? Object.assign(Object.assign({}, i2), { sessionId: this.id }) : i2, this.log);
|
|
3371
3736
|
} catch (e4) {
|
|
3372
3737
|
return this.log.err(`An error occurred while submitting the form ${this.appId}:`, e4), "";
|
|
@@ -3374,117 +3739,133 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3374
3739
|
}));
|
|
3375
3740
|
}
|
|
3376
3741
|
callFollowUpQuestion(e3) {
|
|
3377
|
-
var t3;
|
|
3378
|
-
return
|
|
3742
|
+
var t3, i2;
|
|
3743
|
+
return n(this, void 0, void 0, (function* () {
|
|
3379
3744
|
if (!(null == e3 ? void 0 : e3.followup)) return null;
|
|
3745
|
+
const n2 = null !== (t3 = this.feedback.answers.find(((t4) => t4.key === e3.ref))) && void 0 !== t3 ? t3 : this.feedback.answers.find(((t4) => t4.key.includes(e3.ref) && !t4.key.includes("extra-option"))), r2 = null === (i2 = null == n2 ? void 0 : n2.value) || void 0 === i2 ? void 0 : i2.find(((e4) => null != e4 && "" !== e4));
|
|
3746
|
+
if (void 0 === r2) return this.log.log(`The question ${e3.ref} has no answer, skipping its follow up`), null;
|
|
3380
3747
|
try {
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
throw this.log.err(`An error occurred while submitting the form ${this.appId}:`, e4), e4;
|
|
3748
|
+
const t4 = this.config.get("url"), i3 = Object.assign(Object.assign(Object.assign({ answer: r2 }, "" !== this.publicKey && { publicKey: this.publicKey }), "" === this.publicKey && { campaignSessionId: this.appId }), { sessionId: this.id, question: e3 });
|
|
3749
|
+
return yield (0, s.getFollowUpQuestion)(t4, i3, this.log);
|
|
3750
|
+
} catch (t4) {
|
|
3751
|
+
return this.log.err(`An error occurred while requesting the follow up of ${e3.ref} in the form ${this.appId}:`, t4), null;
|
|
3386
3752
|
}
|
|
3387
3753
|
}));
|
|
3388
3754
|
}
|
|
3389
3755
|
processNextQuestion(e3) {
|
|
3390
|
-
var t3, i2
|
|
3391
|
-
return
|
|
3392
|
-
const
|
|
3393
|
-
if (!
|
|
3394
|
-
const
|
|
3395
|
-
if (0 === (null ==
|
|
3396
|
-
const
|
|
3397
|
-
for (const e4 of
|
|
3398
|
-
const t4 =
|
|
3756
|
+
var t3, i2;
|
|
3757
|
+
return n(this, void 0, void 0, (function* () {
|
|
3758
|
+
const n2 = this.history.back();
|
|
3759
|
+
if (!n2) throw new Error("No page found");
|
|
3760
|
+
const r2 = n2.isFollowup ? [] : n2.getFollowupQuestions();
|
|
3761
|
+
if (0 === (null == r2 ? void 0 : r2.length)) return void (yield this.renderNextQuestion(e3, n2));
|
|
3762
|
+
const o2 = [];
|
|
3763
|
+
for (const e4 of r2) {
|
|
3764
|
+
const t4 = n2.questions.find(((t5) => t5.ref === e4));
|
|
3399
3765
|
if (t4) {
|
|
3400
3766
|
const e5 = yield this.callFollowUpQuestion(t4);
|
|
3401
|
-
e5 &&
|
|
3767
|
+
e5 && o2.push(e5);
|
|
3402
3768
|
}
|
|
3403
3769
|
}
|
|
3404
|
-
if (0 ===
|
|
3405
|
-
const
|
|
3406
|
-
|
|
3770
|
+
if (0 === o2.length) return void (yield this.renderNextQuestion(e3, n2));
|
|
3771
|
+
const a2 = new m.Page(n2.id, n2.position, this.appId, o2, n2.edges), s2 = new g.PageNode(n2.id, n2.position, n2.edges, a2, o2, true);
|
|
3772
|
+
s2.origin = n2.isFollowup && n2.origin ? n2.origin : n2, s2.elements = (0, l.renderQuestions)(o2, this.formOptionsConfig.questionFormat, this.lang(), null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.product, (() => this.autoSend())), this.history.enqueue(s2), this.syncBackButton(), this.progress += 0.5, e3.innerHTML = "", null === (i2 = s2.elements) || void 0 === i2 || i2.forEach(((t4) => e3.appendChild(t4))), (0, b.armGhostTapGuard)(e3), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.id, loading: false, progress: this.progress, total: this.total, followup: s2.isFollowup, completed: this.completed, error: null })), this.autofocusAfterRender("navigation");
|
|
3407
3773
|
}));
|
|
3408
3774
|
}
|
|
3409
3775
|
renderNextQuestion(e3, t3) {
|
|
3410
3776
|
var i2, o2, a2, s2, d2;
|
|
3411
|
-
return
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3777
|
+
return n(this, void 0, void 0, (function* () {
|
|
3778
|
+
const n2 = t3.isFollowup && t3.origin ? t3.origin : t3, c2 = n2 === t3 ? this.feedback.answers : [...null !== (i2 = n2.answers) && void 0 !== i2 ? i2 : [], ...this.feedback.answers];
|
|
3779
|
+
let u2 = this.graph.getNextPage(n2, c2);
|
|
3780
|
+
if (!u2) return void this.finish();
|
|
3781
|
+
const p2 = u2.edges.filter(((e4) => "PRECONDITIONAL" === e4.typeCondition)).sort(((e4, t4) => e4.position < t4.position ? -1 : e4.position > t4.position ? 1 : 0));
|
|
3782
|
+
if ((null == p2 ? void 0 : p2.length) > 0) {
|
|
3783
|
+
const t4 = p2.some(((e4) => e4.transition === h.TransitionType.ALLOW));
|
|
3784
|
+
let i3 = t4;
|
|
3785
|
+
for (const t5 of p2) {
|
|
3786
|
+
let n3;
|
|
3420
3787
|
for (let e4 = this.history.size() - 1; e4 >= 0; e4--) {
|
|
3421
|
-
const
|
|
3422
|
-
if (
|
|
3788
|
+
const i4 = this.history.get(e4);
|
|
3789
|
+
if (i4 && (n3 = null === (o2 = i4.answers) || void 0 === o2 ? void 0 : o2.find(((e5) => e5.key === t5.questionRef)), n3)) break;
|
|
3423
3790
|
}
|
|
3424
|
-
let
|
|
3425
|
-
if (
|
|
3426
|
-
const e4 = null === (
|
|
3427
|
-
if ((null == e4 ? void 0 : e4.type) ===
|
|
3791
|
+
let s3 = false;
|
|
3792
|
+
if (n3) {
|
|
3793
|
+
const e4 = null === (a2 = this.formData) || void 0 === a2 ? void 0 : a2.questions.find(((e5) => e5.ref === t5.questionRef)), i4 = Array.isArray(n3.value) ? n3.value : [n3.value], o3 = Array.isArray(t5.value) ? t5.value : [t5.value];
|
|
3794
|
+
if ((null == e4 ? void 0 : e4.type) === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) s3 = this.evaluateMatrixPreconditional(t5, n3);
|
|
3428
3795
|
else switch (t5.typeOperator) {
|
|
3429
3796
|
case "EQUAL":
|
|
3430
3797
|
case "INQ":
|
|
3431
|
-
|
|
3798
|
+
s3 = i4.some(((e5) => o3.includes(e5)));
|
|
3432
3799
|
break;
|
|
3433
3800
|
case "NOEQUAL":
|
|
3434
3801
|
case "NINQ":
|
|
3435
|
-
|
|
3802
|
+
s3 = i4.every(((e5) => !o3.includes(e5)));
|
|
3436
3803
|
break;
|
|
3437
3804
|
case "GREATER":
|
|
3438
|
-
|
|
3805
|
+
s3 = i4.some(((e5) => Number(e5) > Number(o3[0])));
|
|
3439
3806
|
break;
|
|
3440
3807
|
case "LESS":
|
|
3441
|
-
|
|
3808
|
+
s3 = i4.some(((e5) => Number(e5) < Number(o3[0])));
|
|
3442
3809
|
break;
|
|
3443
3810
|
case "GREATEREQUAL":
|
|
3444
|
-
|
|
3811
|
+
s3 = i4.some(((e5) => Number(e5) >= Number(o3[0])));
|
|
3445
3812
|
break;
|
|
3446
3813
|
case "LESSEQUAL":
|
|
3447
|
-
|
|
3814
|
+
s3 = i4.some(((e5) => Number(e5) <= Number(o3[0])));
|
|
3448
3815
|
}
|
|
3449
3816
|
}
|
|
3450
|
-
if (t5.transition === h.TransitionType.ALLOW)
|
|
3451
|
-
else if (t5.transition === h.TransitionType.NEXT &&
|
|
3817
|
+
if (t5.transition === h.TransitionType.ALLOW) s3 || (i3 = false);
|
|
3818
|
+
else if (t5.transition === h.TransitionType.NEXT && s3) return this.feedback.answers = [], void (u2 && (yield this.renderNextQuestion(e3, u2)));
|
|
3452
3819
|
}
|
|
3453
|
-
if (t4 && !
|
|
3820
|
+
if (t4 && !i3) return this.feedback.answers = [], void (u2 && (yield this.renderNextQuestion(e3, u2)));
|
|
3454
3821
|
}
|
|
3455
|
-
|
|
3822
|
+
u2.elements = (0, l.renderQuestions)(u2.questions, this.formOptionsConfig.questionFormat, this.lang(), null === (s2 = this.formData) || void 0 === s2 ? void 0 : s2.product, (() => this.autoSend())), e3.innerHTML = "", null === (d2 = u2.elements) || void 0 === d2 || d2.forEach(((t4) => e3.appendChild(t4))), (0, b.armGhostTapGuard)(e3), this.history.enqueue(u2), this.syncBackButton(), this.progress = this.total - this.graph.findMaxDepth(u2), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.id, loading: false, progress: this.progress, total: this.total, followup: u2.isFollowup, completed: this.completed, error: null })), this.autofocusAfterRender("navigation");
|
|
3456
3823
|
}));
|
|
3457
3824
|
}
|
|
3825
|
+
syncBackButton() {
|
|
3826
|
+
const e3 = document.getElementById("magicfeedback-" + this.appId), t3 = null == e3 ? void 0 : e3.querySelector(".magicfeedback-back");
|
|
3827
|
+
t3 && (t3.hidden = this.history.size() <= 1);
|
|
3828
|
+
}
|
|
3458
3829
|
back() {
|
|
3459
3830
|
var e3;
|
|
3460
|
-
return
|
|
3461
|
-
if (
|
|
3831
|
+
return n(this, void 0, void 0, (function* () {
|
|
3832
|
+
if (this.history.size() <= 1) return;
|
|
3462
3833
|
const t3 = document.getElementById("magicfeedback-questions-" + this.appId);
|
|
3463
|
-
t3 && t3.childNodes.length > 0 && (t3.innerHTML = ""), this.history.rollback();
|
|
3834
|
+
(0, A.cancelAutoAdvance)(t3), t3 && t3.childNodes.length > 0 && (t3.innerHTML = ""), this.history.rollback(), this.syncBackButton();
|
|
3464
3835
|
const i2 = this.history.back();
|
|
3465
|
-
i2 ? (null === (e3 = i2.elements) || void 0 === e3 || e3.forEach(((e4) => t3.appendChild(e4))), this.progress = this.total - this.graph.findMaxDepth(i2)) : this.progress = this.history.size(), this.formOptionsConfig.onBackEvent && (yield this.formOptionsConfig.onBackEvent({ loading: false, progress: this.progress, followup: (null == i2 ? void 0 : i2.isFollowup) || false, error: i2 ? null : "No page found" }));
|
|
3836
|
+
i2 ? (null === (e3 = i2.elements) || void 0 === e3 || e3.forEach(((e4) => t3.appendChild(e4))), (0, b.armGhostTapGuard)(t3), this.progress = this.total - this.graph.findMaxDepth(i2)) : this.progress = this.history.size(), this.formOptionsConfig.onBackEvent && (yield this.formOptionsConfig.onBackEvent({ loading: false, progress: this.progress, followup: (null == i2 ? void 0 : i2.isFollowup) || false, error: i2 ? null : "No page found" })), i2 && this.autofocusAfterRender("navigation");
|
|
3466
3837
|
}));
|
|
3467
3838
|
}
|
|
3468
3839
|
previewQuestion(e3, t3, i2) {
|
|
3469
|
-
var
|
|
3470
|
-
const
|
|
3471
|
-
if (!
|
|
3472
|
-
const
|
|
3473
|
-
if (!
|
|
3474
|
-
const { format:
|
|
3475
|
-
|
|
3476
|
-
let
|
|
3840
|
+
var n2, r2;
|
|
3841
|
+
const o2 = Array.isArray(t3) ? t3 : [t3];
|
|
3842
|
+
if (!o2 || 0 === o2.length) throw new Error("[MagicFeedback] No question provided for preview");
|
|
3843
|
+
const a2 = document.getElementById(e3);
|
|
3844
|
+
if (!a2) throw new Error(`[MagicFeedback] Element with ID '${e3}' not found.`);
|
|
3845
|
+
const { format: s2 = this.formOptionsConfig.questionFormat || "standard", language: d2 = this.lang(), product: u2 = (null === (n2 = this.formData) || void 0 === n2 ? void 0 : n2.product) || { customIcons: false }, style: p2 = (null === (r2 = this.formData) || void 0 === r2 ? void 0 : r2.style) || {}, clearContainer: m2 = true, wrap: h2 = true } = i2 || {};
|
|
3846
|
+
m2 && (a2.innerHTML = ""), (null == p2 ? void 0 : p2.primaryColor) && (0, c.applyPrimaryColor)(a2, p2.primaryColor), (0, c.applyDirection)(a2, d2);
|
|
3847
|
+
let f2 = [];
|
|
3477
3848
|
try {
|
|
3478
|
-
|
|
3849
|
+
f2 = (0, l.renderQuestions)(o2, s2, d2, u2);
|
|
3479
3850
|
} catch (e4) {
|
|
3480
3851
|
throw this.log.err(e4), e4;
|
|
3481
3852
|
}
|
|
3482
|
-
let
|
|
3483
|
-
if (
|
|
3853
|
+
let g2 = a2;
|
|
3854
|
+
if (h2) {
|
|
3484
3855
|
const e4 = document.createElement("div");
|
|
3485
|
-
e4.classList.add("magicfeedback-preview-question"),
|
|
3856
|
+
e4.classList.add("magicfeedback-preview-question"), g2.appendChild(e4), g2 = e4;
|
|
3857
|
+
}
|
|
3858
|
+
return f2.forEach(((e4) => g2.appendChild(e4))), a2;
|
|
3859
|
+
}
|
|
3860
|
+
parseMaxDiffAnswer(e3) {
|
|
3861
|
+
var t3;
|
|
3862
|
+
if (!e3 || "string" != typeof (null === (t3 = e3.value) || void 0 === t3 ? void 0 : t3[0])) return [];
|
|
3863
|
+
try {
|
|
3864
|
+
const t4 = JSON.parse(e3.value[0]);
|
|
3865
|
+
return Array.isArray(t4) ? t4 : [];
|
|
3866
|
+
} catch (e4) {
|
|
3867
|
+
return [];
|
|
3486
3868
|
}
|
|
3487
|
-
return g2.forEach(((e4) => y2.appendChild(e4))), s2;
|
|
3488
3869
|
}
|
|
3489
3870
|
parseMatrixAnswerPre(e3) {
|
|
3490
3871
|
if (!e3 || !e3.value) return [];
|
|
@@ -3497,9 +3878,9 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3497
3878
|
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 : [];
|
|
3498
3879
|
}
|
|
3499
3880
|
evaluateMatrixPreconditional(e3, t3) {
|
|
3500
|
-
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value],
|
|
3501
|
-
if (!
|
|
3502
|
-
const o2 =
|
|
3881
|
+
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value], n2 = new Set(e3.option || []), r2 = this.parseMatrixAnswerPre(t3);
|
|
3882
|
+
if (!r2.length) return false;
|
|
3883
|
+
const o2 = n2.size > 0 ? r2.filter(((e4) => n2.has(e4.key))) : r2;
|
|
3503
3884
|
if (!o2.length) return false;
|
|
3504
3885
|
switch (e3.typeOperator) {
|
|
3505
3886
|
case "EQUAL":
|
|
@@ -3521,17 +3902,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3521
3902
|
}
|
|
3522
3903
|
}
|
|
3523
3904
|
};
|
|
3524
|
-
},
|
|
3905
|
+
}, 198: (e2, t2) => {
|
|
3525
3906
|
"use strict";
|
|
3526
3907
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Page = void 0, t2.Page = class {
|
|
3527
|
-
constructor(e3, t3, i,
|
|
3528
|
-
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 =
|
|
3908
|
+
constructor(e3, t3, i, n, r) {
|
|
3909
|
+
this.id = e3, this.position = t3, this.generatedAt = (/* @__PURE__ */ new Date()).toISOString(), this.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), this.status = "ACTIVE", this.integrationId = i, this.integrationQuestions = n, this.integrationPageRoutes = r;
|
|
3529
3910
|
}
|
|
3530
3911
|
};
|
|
3531
|
-
},
|
|
3912
|
+
}, 2531: (e2, t2, i) => {
|
|
3532
3913
|
"use strict";
|
|
3533
3914
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.PageGraph = void 0;
|
|
3534
|
-
const
|
|
3915
|
+
const n = i(1814), r = i(1140), o = i(4245);
|
|
3535
3916
|
t2.PageGraph = class {
|
|
3536
3917
|
constructor(e3) {
|
|
3537
3918
|
this.nodes = /* @__PURE__ */ new Map(), this.buildGraph(e3);
|
|
@@ -3540,10 +3921,10 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3540
3921
|
e3.forEach(((e4) => {
|
|
3541
3922
|
var t3;
|
|
3542
3923
|
e4.integrationPageRoutes && (e4.integrationPageRoutes = (null === (t3 = e4.integrationPageRoutes) || void 0 === t3 ? void 0 : t3.sort(((e5, t4) => {
|
|
3543
|
-
const i3 = new Date((null == e5 ? void 0 : e5.generatedAt) || 0).getTime(),
|
|
3544
|
-
return i3 !==
|
|
3924
|
+
const i3 = new Date((null == e5 ? void 0 : e5.generatedAt) || 0).getTime(), n2 = new Date((null == t4 ? void 0 : t4.generatedAt) || 0).getTime();
|
|
3925
|
+
return i3 !== n2 ? i3 - n2 : "DIRECT" === e5.typeCondition && "DIRECT" !== t4.typeCondition ? 1 : "DIRECT" !== e5.typeCondition && "DIRECT" === t4.typeCondition ? -1 : 0;
|
|
3545
3926
|
}))) || []);
|
|
3546
|
-
const i2 = new
|
|
3927
|
+
const i2 = new n.PageNode(e4.id, e4.position, e4.integrationPageRoutes || [], e4, e4.integrationQuestions);
|
|
3547
3928
|
this.nodes.set(i2.id, i2);
|
|
3548
3929
|
}));
|
|
3549
3930
|
}
|
|
@@ -3567,11 +3948,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3567
3948
|
var i2;
|
|
3568
3949
|
if (!e3) return;
|
|
3569
3950
|
e3.edges.sort(((e4, t4) => "DIRECT" === e4.typeCondition ? 1 : "DIRECT" === t4.typeCondition ? -1 : 0));
|
|
3570
|
-
const
|
|
3571
|
-
const
|
|
3951
|
+
const n2 = e3.edges.find(((i3) => {
|
|
3952
|
+
const n3 = e3.questions.find(((e4) => e4.ref === i3.questionRef)), a = null == t3 ? void 0 : t3.filter(((e4) => e4.key === i3.questionRef));
|
|
3572
3953
|
if ("DIRECT" === i3.typeCondition) return true;
|
|
3573
3954
|
if (!a || 0 === a.length) return false;
|
|
3574
|
-
if ((null ==
|
|
3955
|
+
if ((null == n3 ? void 0 : n3.type) === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) return this.evaluateMatrixCondition(i3, a);
|
|
3575
3956
|
const s = Array.isArray(i3.value) ? i3.value : [i3.value];
|
|
3576
3957
|
switch (i3.typeOperator) {
|
|
3577
3958
|
case o.OperatorType.EQUAL:
|
|
@@ -3594,19 +3975,19 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3594
3975
|
return false;
|
|
3595
3976
|
}
|
|
3596
3977
|
}));
|
|
3597
|
-
if (!
|
|
3978
|
+
if (!n2) {
|
|
3598
3979
|
const t4 = this.getNextEdgeByDefault(e3);
|
|
3599
3980
|
if (!t4) return;
|
|
3600
3981
|
return this.getNodeById(t4);
|
|
3601
3982
|
}
|
|
3602
|
-
switch (
|
|
3983
|
+
switch (n2.transition) {
|
|
3603
3984
|
case o.TransitionType.PAGE:
|
|
3604
|
-
if (!
|
|
3605
|
-
return this.getNodeById(
|
|
3985
|
+
if (!n2.transitionDestiny) return;
|
|
3986
|
+
return this.getNodeById(n2.transitionDestiny);
|
|
3606
3987
|
case o.TransitionType.FINISH:
|
|
3607
3988
|
return;
|
|
3608
3989
|
case o.TransitionType.REDIRECT:
|
|
3609
|
-
return void (window.location.href = (null === (i2 =
|
|
3990
|
+
return void (window.location.href = (null === (i2 = n2.transitionDestiny) || void 0 === i2 ? void 0 : i2.includes("?")) ? `${n2.transitionDestiny}&${window.location.search.slice(1)}` : `${n2.transitionDestiny}${window.location.search}`);
|
|
3610
3991
|
default:
|
|
3611
3992
|
return;
|
|
3612
3993
|
}
|
|
@@ -3625,21 +4006,21 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3625
4006
|
}
|
|
3626
4007
|
DFSUtil(e3, t3, i2) {
|
|
3627
4008
|
t3.add(e3);
|
|
3628
|
-
let
|
|
3629
|
-
const
|
|
4009
|
+
let n2 = i2;
|
|
4010
|
+
const r2 = [...e3.edges.filter(((e4) => e4.typeCondition !== o.ConditionType.PRECONDITIONAL)) || []], a = this.getNextEdgeByDefault(e3);
|
|
3630
4011
|
if (a) {
|
|
3631
4012
|
const i3 = this.getNodeById(a);
|
|
3632
|
-
i3 && !t3.has(i3) &&
|
|
4013
|
+
i3 && !t3.has(i3) && r2.push(new o.PageRoute(i3.id, "", o.OperatorType.DEFAULT, [""], o.TransitionType.PAGE, i3.id, e3.id));
|
|
3633
4014
|
}
|
|
3634
|
-
for (const e4 of
|
|
4015
|
+
for (const e4 of r2) {
|
|
3635
4016
|
if (!e4.transitionDestiny) continue;
|
|
3636
|
-
const
|
|
3637
|
-
if (
|
|
3638
|
-
const e5 = i2 + 1, o2 = new Set(t3), a2 = this.DFSUtil(
|
|
3639
|
-
|
|
4017
|
+
const r3 = this.getNodeById(e4.transitionDestiny);
|
|
4018
|
+
if (r3 && !t3.has(r3)) {
|
|
4019
|
+
const e5 = i2 + 1, o2 = new Set(t3), a2 = this.DFSUtil(r3, o2, e5);
|
|
4020
|
+
n2 = Math.max(n2, a2);
|
|
3640
4021
|
}
|
|
3641
4022
|
}
|
|
3642
|
-
return
|
|
4023
|
+
return n2;
|
|
3643
4024
|
}
|
|
3644
4025
|
parseMatrixAnswer(e3) {
|
|
3645
4026
|
if (!e3 || !e3.value) return [];
|
|
@@ -3652,9 +4033,9 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3652
4033
|
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 : [];
|
|
3653
4034
|
}
|
|
3654
4035
|
evaluateMatrixCondition(e3, t3) {
|
|
3655
|
-
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value],
|
|
4036
|
+
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value], n2 = new Set(e3.option || []), r2 = t3[0], a = this.parseMatrixAnswer(r2);
|
|
3656
4037
|
if (!a.length) return false;
|
|
3657
|
-
const s =
|
|
4038
|
+
const s = n2.size > 0 ? a.filter(((e4) => n2.has(e4.key))) : a;
|
|
3658
4039
|
if (!s.length) return false;
|
|
3659
4040
|
switch (e3.typeOperator) {
|
|
3660
4041
|
case o.OperatorType.EQUAL:
|
|
@@ -3676,11 +4057,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3676
4057
|
}
|
|
3677
4058
|
}
|
|
3678
4059
|
};
|
|
3679
|
-
},
|
|
4060
|
+
}, 1814: (e2, t2) => {
|
|
3680
4061
|
"use strict";
|
|
3681
4062
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.PageNode = void 0, t2.PageNode = class {
|
|
3682
|
-
constructor(e3, t3, i,
|
|
3683
|
-
this.answers = [], this.id = e3, this.position = t3, this.edges = i, this.data =
|
|
4063
|
+
constructor(e3, t3, i, n, r, o = false) {
|
|
4064
|
+
this.answers = [], this.id = e3, this.position = t3, this.edges = i, this.data = n, this.questions = r.sort(((e4, t4) => e4.position - t4.position)), this.elements = [], this.isFollowup = o;
|
|
3684
4065
|
}
|
|
3685
4066
|
getFollowupQuestions() {
|
|
3686
4067
|
return this.questions.filter(((e3) => e3.followup)).map(((e3) => e3.ref));
|
|
@@ -3692,29 +4073,29 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3692
4073
|
this.answers = e3;
|
|
3693
4074
|
}
|
|
3694
4075
|
};
|
|
3695
|
-
},
|
|
4076
|
+
}, 4245: (e2, t2) => {
|
|
3696
4077
|
"use strict";
|
|
3697
|
-
var i,
|
|
4078
|
+
var i, n, r, o;
|
|
3698
4079
|
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) {
|
|
3699
4080
|
e3.LOGICAL = "LOGICAL", e3.DIRECT = "DIRECT", e3.PRECONDITIONAL = "PRECONDITIONAL";
|
|
3700
|
-
})(i = t2.ConditionType || (t2.ConditionType = {})), (
|
|
4081
|
+
})(i = t2.ConditionType || (t2.ConditionType = {})), (r = t2.OperatorType || (t2.OperatorType = {})).EQUAL = "EQUAL", r.NOEQUAL = "NOEQUAL", r.GREATER = "GREATER", r.LESS = "LESS", r.GREATEREQUAL = "GREATEREQUAL", r.LESSEQUAL = "LESSEQUAL", r.INQ = "INQ", r.NINQ = "NINQ", r.DEFAULT = "DEFAULT", (function(e3) {
|
|
3701
4082
|
e3.ACTIVE = "ACTIVE", e3.DEPRECATED = "DEPRECATED", e3.DELETE = "DELETE";
|
|
3702
|
-
})(
|
|
3703
|
-
constructor(e3, t3,
|
|
3704
|
-
this.id = e3, this.questionRef = t3, this.typeCondition = d || i.LOGICAL, this.typeOperator =
|
|
4083
|
+
})(n = t2.StatusType || (t2.StatusType = {})), t2.PageRoute = class {
|
|
4084
|
+
constructor(e3, t3, r2, o2, a, s, l, d, c, u) {
|
|
4085
|
+
this.id = e3, this.questionRef = t3, this.typeCondition = d || i.LOGICAL, this.typeOperator = r2, this.value = o2 || [], this.transition = a, this.transitionDestiny = s, this.status = n.ACTIVE, this.generatedAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.integrationPageId = l, this.position = c || 0, this.option = u || [];
|
|
3705
4086
|
}
|
|
3706
4087
|
};
|
|
3707
|
-
},
|
|
4088
|
+
}, 1140: (e2, t2) => {
|
|
3708
4089
|
"use strict";
|
|
3709
|
-
var i,
|
|
3710
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.AGENT_ANSWER_TYPE_BLOCKED = t2.QuestionType = t2.FEEDBACKAPPANSWERTYPE = void 0, (
|
|
4090
|
+
var i, n;
|
|
4091
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.AGENT_ANSWER_TYPE_BLOCKED = t2.QuestionType = t2.FEEDBACKAPPANSWERTYPE = void 0, (n = t2.FEEDBACKAPPANSWERTYPE || (t2.FEEDBACKAPPANSWERTYPE = {})).CONTACT = "CONTACT", n.MULTIPLECHOISE_IMAGE = "MULTIPLECHOISE_IMAGE", n.EMAIL = "EMAIL", n.RATING_STAR = "RATING_STAR", n.RADIO = "RADIO", n.MULTIPLECHOICE = "MULTIPLECHOICE", n.SELECT = "SELECT", n.TEXT = "TEXT", n.LONGTEXT = "LONGTEXT", n.NUMBER = "NUMBER", n.RATING_EMOJI = "RATING_EMOJI", n.RATING_NUMBER = "RATING_NUMBER", n.DATE = "DATE", n.BOOLEAN = "BOOLEAN", n.PASSWORD = "PASSWORD", n.CONSENT = "CONSENT", n.MULTI_QUESTION_MATRIX = "MULTI_QUESTION_MATRIX", n.POINT_SYSTEM = "POINT_SYSTEM", n.PRIORITY_LIST = "PRIORITY_LIST", n.INFO_PAGE = "INFO_PAGE", n.UPLOAD_FILE = "UPLOAD_FILE", n.UPLOAD_IMAGE = "UPLOAD_IMAGE", n.MAX_DIFF = "MAX_DIFF", t2.QuestionType = class {
|
|
3711
4092
|
}, t2.AGENT_ANSWER_TYPE_BLOCKED = "ABUSIVE_OR_OFFENSIVE", (function(e3) {
|
|
3712
4093
|
e3.FORM = "form", e3.DIV = "div";
|
|
3713
4094
|
})(i || (i = {}));
|
|
3714
|
-
},
|
|
4095
|
+
}, 459: (e2, t2, i) => {
|
|
3715
4096
|
"use strict";
|
|
3716
4097
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.applyDirection = t2.applyPrimaryColor = t2.generateContainer = void 0;
|
|
3717
|
-
const
|
|
4098
|
+
const n = i(7031);
|
|
3718
4099
|
t2.generateContainer = function(e3, t3) {
|
|
3719
4100
|
let i2 = document.getElementById(e3);
|
|
3720
4101
|
if (!i2 && (i2 = document.getElementById("magicfeedback-container-" + t3), !i2)) throw new Error(`Element with ID '${e3}' not found.`);
|
|
@@ -3722,225 +4103,254 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3722
4103
|
}, t2.applyPrimaryColor = function(e3, t3) {
|
|
3723
4104
|
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);
|
|
3724
4105
|
}, t2.applyDirection = function(e3, t3) {
|
|
3725
|
-
const i2 = (0,
|
|
4106
|
+
const i2 = (0, n.isRtlLanguage)(t3);
|
|
3726
4107
|
e3.setAttribute("dir", i2 ? "rtl" : "ltr"), e3.classList.toggle("magicfeedback-rtl", i2);
|
|
3727
4108
|
};
|
|
3728
|
-
},
|
|
4109
|
+
}, 6658: (e2, t2, i) => {
|
|
3729
4110
|
"use strict";
|
|
3730
4111
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.getUrlParam = t2.getBooleanOptions = t2.parseTitle = void 0;
|
|
3731
|
-
const
|
|
4112
|
+
const n = i(7031);
|
|
3732
4113
|
t2.parseTitle = function(e3, t3) {
|
|
3733
4114
|
return e3 ? "object" == typeof e3 ? e3[t3] || e3.en : e3 : "";
|
|
3734
4115
|
}, t2.getBooleanOptions = function(e3) {
|
|
3735
|
-
return [(0,
|
|
4116
|
+
return [(0, n.t)(e3, "boolean.yes"), (0, n.t)(e3, "boolean.no")];
|
|
3736
4117
|
}, t2.getUrlParam = function(e3) {
|
|
3737
4118
|
return new URLSearchParams(window.location.search).get(e3);
|
|
3738
4119
|
};
|
|
3739
|
-
},
|
|
4120
|
+
}, 1433: (e2, t2, i) => {
|
|
3740
4121
|
"use strict";
|
|
3741
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.createRatingNumberElement = t2.createStarRating = t2.createRatingPlaceholder = void 0;
|
|
3742
|
-
const r = i(
|
|
3743
|
-
function
|
|
3744
|
-
const
|
|
3745
|
-
|
|
3746
|
-
const
|
|
3747
|
-
|
|
3748
|
-
const
|
|
3749
|
-
return
|
|
4122
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.RATING_NUMBER_MIN_CHIP_WIDTH = t2.usesLegacyRatingNumber = t2.createRatingNumberElement = t2.createStarRating = t2.createRatingPlaceholder = void 0;
|
|
4123
|
+
const n = i(7031), r = i(2139);
|
|
4124
|
+
function o(e3, t3, i2 = "ltr") {
|
|
4125
|
+
const n2 = document.createElement("div");
|
|
4126
|
+
n2.classList.add("magicfeedback-rating-placeholder");
|
|
4127
|
+
const r2 = document.createElement("span");
|
|
4128
|
+
r2.textContent = null != e3 ? e3 : "", r2.classList.add("magicfeedback-rating-placeholder-value");
|
|
4129
|
+
const o2 = document.createElement("span");
|
|
4130
|
+
return o2.textContent = null != t3 ? t3 : "", o2.classList.add("magicfeedback-rating-placeholder-value"), "ltr" === i2 ? (e3 && n2.appendChild(r2), t3 && n2.appendChild(o2)) : (t3 && n2.appendChild(o2), e3 && n2.appendChild(r2)), n2;
|
|
3750
4131
|
}
|
|
3751
|
-
t2.createRatingPlaceholder =
|
|
3752
|
-
},
|
|
3753
|
-
const
|
|
3754
|
-
|
|
4132
|
+
t2.createRatingPlaceholder = o, t2.createStarRating = function(e3, t3, i2, n2 = () => {
|
|
4133
|
+
}, a) {
|
|
4134
|
+
const s = "magicfeedback-rating-star-selected", l = document.createElement("div");
|
|
4135
|
+
l.classList.add("magicfeedback-rating-star-container"), l.style.maxWidth = "300px", l.style.margin = "auto", l.dataset.originalSelection = "0";
|
|
3755
4136
|
for (let t4 = 1; t4 <= 5; t4++) {
|
|
3756
4137
|
const i3 = document.createElement("label");
|
|
3757
4138
|
i3.classList.add("magicfeedback-rating-star-option");
|
|
3758
|
-
const
|
|
3759
|
-
|
|
3760
|
-
const e4 =
|
|
3761
|
-
for (let t5 = 0; t5 < e4.length; t5++) t5 + 1 <= Number(
|
|
3762
|
-
|
|
3763
|
-
})), i3.appendChild(
|
|
3764
|
-
const
|
|
3765
|
-
|
|
3766
|
-
const e4 =
|
|
4139
|
+
const o2 = document.createElement("input");
|
|
4140
|
+
o2.id = `rating-${e3}-${t4}`, o2.type = "radio", o2.name = e3, o2.value = t4.toString(), o2.style.position = "absolute", o2.style.opacity = "0", o2.style.width = "0", o2.style.height = "0", o2.classList.add("magicfeedback-input"), a && a === o2.value && (o2.checked = true), o2.addEventListener("change", (() => {
|
|
4141
|
+
const e4 = l.querySelectorAll(".rating__star");
|
|
4142
|
+
for (let t5 = 0; t5 < e4.length; t5++) t5 + 1 <= Number(o2.value) ? e4[t5].classList.contains(s) || e4[t5].classList.add(s) : e4[t5].classList.contains(s) && e4[t5].classList.remove(s);
|
|
4143
|
+
l.dataset.originalSelection = o2.value;
|
|
4144
|
+
})), (0, r.autoAdvanceOn)(o2, n2), i3.appendChild(o2);
|
|
4145
|
+
const d2 = document.createElement("label");
|
|
4146
|
+
d2.htmlFor = `rating-${e3}-${t4}`, d2.classList.add("rating__star"), d2.textContent = "\u2605", d2.style.fontSize = "40px", d2.style.color = "#CCCCCC", d2.style.cursor = "pointer", d2.addEventListener("mouseenter", (() => {
|
|
4147
|
+
const e4 = l.querySelectorAll(".rating__star"), i4 = t4 - 1;
|
|
3767
4148
|
e4.forEach(((e5, t5) => {
|
|
3768
|
-
t5 <= i4 ? e5.classList.contains(
|
|
4149
|
+
t5 <= i4 ? e5.classList.contains(s) || e5.classList.add(s) : e5.classList.contains(s) && e5.classList.remove(s);
|
|
3769
4150
|
}));
|
|
3770
|
-
})),
|
|
3771
|
-
const e4 = Number(
|
|
3772
|
-
|
|
3773
|
-
i4 < e4 ? t5.classList.contains(
|
|
4151
|
+
})), d2.addEventListener("mouseleave", (() => {
|
|
4152
|
+
const e4 = Number(l.dataset.originalSelection || "0");
|
|
4153
|
+
l.querySelectorAll(".rating__star").forEach(((t5, i4) => {
|
|
4154
|
+
i4 < e4 ? t5.classList.contains(s) || t5.classList.add(s) : t5.classList.contains(s) && t5.classList.remove(s);
|
|
3774
4155
|
}));
|
|
3775
|
-
})), i3.appendChild(
|
|
4156
|
+
})), i3.appendChild(d2), l.appendChild(i3);
|
|
3776
4157
|
}
|
|
3777
|
-
const
|
|
3778
|
-
return
|
|
3779
|
-
}, t2.createRatingNumberElement = function(e3,
|
|
3780
|
-
var
|
|
3781
|
-
const
|
|
3782
|
-
|
|
3783
|
-
const
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
4158
|
+
const d = o(t3, i2);
|
|
4159
|
+
return d.childElementCount > 0 && l.appendChild(d), l;
|
|
4160
|
+
}, t2.createRatingNumberElement = function(e3, i2, o2, a, s, l, d, c, u = {}) {
|
|
4161
|
+
var p, m;
|
|
4162
|
+
const h = document.createElement("div");
|
|
4163
|
+
h.classList.add("magicfeedback-rating-number");
|
|
4164
|
+
const f = !!u.legacy, g = f && !!u.isPhone, y = g ? (function(e4) {
|
|
4165
|
+
const t3 = (null == e4 ? void 0 : e4.max) ? Number(e4.max) : 10, i3 = (null == e4 ? void 0 : e4.min) ? Number(e4.min) : 0;
|
|
4166
|
+
return (n2) => {
|
|
4167
|
+
var r2;
|
|
4168
|
+
return (null === (r2 = null == e4 ? void 0 : e4.numberPlaceholders) || void 0 === r2 ? void 0 : r2[n2]) || (n2 === i3 ? null == e4 ? void 0 : e4.minPlaceholder : void 0) || (n2 === t3 ? null == e4 ? void 0 : e4.maxPlaceholder : void 0) || void 0;
|
|
4169
|
+
};
|
|
4170
|
+
})(i2) : null;
|
|
4171
|
+
g && (a = "column", i2 = Object.assign(Object.assign({}, i2), { minPlaceholder: void 0, maxPlaceholder: void 0, numberPlaceholders: void 0 })), f && h.classList.add("magicfeedback-rating-number--legacy");
|
|
4172
|
+
const v = "column" === a, b = "ltr" === o2 ? a : `${a}-reverse`, E = document.createElement("div");
|
|
4173
|
+
E.classList.add("magicfeedback-rating-number-container"), E.classList.add(`magicfeedback-rating-number-container-${o2}`), E.classList.add(`magicfeedback-rating-number-container-${a}`), E.style.display = "flex", E.style.flexDirection = b, E.setAttribute("role", "radiogroup"), E.setAttribute("aria-label", (null == i2 ? void 0 : i2.ariaLabel) || (0, n.t)(c, "rating.ariaLabel"));
|
|
4174
|
+
const A = (null == i2 ? void 0 : i2.max) ? Number(null == i2 ? void 0 : i2.max) : 10, k = (null == i2 ? void 0 : i2.min) ? Number(null == i2 ? void 0 : i2.min) : 0;
|
|
4175
|
+
!v && A - k + 1 > 6 && E.classList.add("magicfeedback-rating-number-container-row--dense");
|
|
4176
|
+
const T = (null == i2 ? void 0 : i2.numberPlaceholders) || null, C = !(!T || !Object.keys(T).length);
|
|
4177
|
+
let x = null;
|
|
4178
|
+
if (!v && ((null == i2 ? void 0 : i2.minPlaceholder) || (null == i2 ? void 0 : i2.maxPlaceholder))) {
|
|
4179
|
+
x = document.createElement("div"), x.classList.add("magicfeedback-rating-number-scale-labels");
|
|
3791
4180
|
const e4 = document.createElement("span");
|
|
3792
|
-
e4.classList.add("magicfeedback-rating-number-scale-label"), e4.textContent = null !== (
|
|
3793
|
-
const
|
|
3794
|
-
|
|
4181
|
+
e4.classList.add("magicfeedback-rating-number-scale-label"), e4.textContent = null !== (p = null == i2 ? void 0 : i2.minPlaceholder) && void 0 !== p ? p : "";
|
|
4182
|
+
const t3 = document.createElement("span");
|
|
4183
|
+
t3.classList.add("magicfeedback-rating-number-scale-label"), t3.textContent = null !== (m = null == i2 ? void 0 : i2.maxPlaceholder) && void 0 !== m ? m : "", "ltr" === o2 ? (x.appendChild(e4), x.appendChild(t3)) : (x.appendChild(t3), x.appendChild(e4));
|
|
3795
4184
|
}
|
|
3796
|
-
let
|
|
3797
|
-
if (
|
|
3798
|
-
const e4 = "ltr" ===
|
|
3799
|
-
if (e4) {
|
|
4185
|
+
let P = null;
|
|
4186
|
+
if (v && !C && E.classList.add("magicfeedback-rating-number-container-column--bare"), (!v || !C) && ((null == i2 ? void 0 : i2.minPlaceholder) || (null == i2 ? void 0 : i2.maxPlaceholder))) {
|
|
4187
|
+
const e4 = "ltr" === o2 ? null == i2 ? void 0 : i2.minPlaceholder : null == i2 ? void 0 : i2.maxPlaceholder, t3 = "ltr" === o2 ? null == i2 ? void 0 : i2.maxPlaceholder : null == i2 ? void 0 : i2.minPlaceholder, n2 = (e5) => {
|
|
3800
4188
|
const t4 = document.createElement("div");
|
|
3801
|
-
t4.classList.add("magicfeedback-rating-number-scale-label-block"), t4.textContent =
|
|
3802
|
-
}
|
|
3803
|
-
|
|
4189
|
+
return t4.classList.add("magicfeedback-rating-number-scale-label-block"), v || (t4.classList.add("magicfeedback-rating-number-scale-label-block--stacked"), t4.style.display = "none"), t4.textContent = e5, t4;
|
|
4190
|
+
};
|
|
4191
|
+
e4 && h.appendChild(n2(e4)), t3 && (P = n2(t3));
|
|
3804
4192
|
}
|
|
3805
|
-
for (let
|
|
3806
|
-
const
|
|
3807
|
-
|
|
3808
|
-
const
|
|
3809
|
-
|
|
3810
|
-
const
|
|
3811
|
-
|
|
3812
|
-
const
|
|
3813
|
-
u2.
|
|
4193
|
+
for (let t3 = k; t3 <= A; t3++) {
|
|
4194
|
+
const n2 = document.createElement("div");
|
|
4195
|
+
n2.classList.add("magicfeedback-rating-number-option"), n2.classList.add(`magicfeedback-rating-number-option-${a}`);
|
|
4196
|
+
const o3 = document.createElement("label");
|
|
4197
|
+
o3.htmlFor = `rating-${e3}-${t3}`, o3.classList.add("magicfeedback-rating-number-option-label-container");
|
|
4198
|
+
const c2 = C && (T[t3] || (t3 === k ? null == i2 ? void 0 : i2.minPlaceholder : void 0) || (t3 === A ? null == i2 ? void 0 : i2.maxPlaceholder : void 0)), u2 = document.createElement("input");
|
|
4199
|
+
u2.id = `rating-${e3}-${t3}`, u2.type = "radio", u2.name = e3, u2.value = t3.toString(), u2.classList.add(s), u2.classList.add("magicfeedback-input");
|
|
4200
|
+
const p2 = null == y ? void 0 : y(t3);
|
|
4201
|
+
u2.setAttribute("aria-label", c2 ? `${t3} \u2014 ${c2}` : p2 ? `${t3} \u2014 ${p2}` : `${t3}`), (0, r.autoAdvanceOn)(u2, l), d && d === u2.value && (u2.checked = true), o3.appendChild(u2);
|
|
3814
4202
|
const m2 = document.createElement("span");
|
|
3815
|
-
|
|
3816
|
-
|
|
4203
|
+
m2.classList.add("magicfeedback-rating-number-value");
|
|
4204
|
+
const h2 = document.createElement("span");
|
|
4205
|
+
if (h2.textContent = p2 ? `${t3} = ${p2}` : t3.toString(), h2.classList.add("magicfeedback-rating-number-value-num"), f && (h2.style.fontWeight = "normal"), m2.appendChild(h2), v) {
|
|
4206
|
+
if (c2) {
|
|
3817
4207
|
const e4 = document.createElement("span");
|
|
3818
|
-
e4.textContent =
|
|
4208
|
+
e4.textContent = c2, e4.classList.add("magicfeedback-rating-number-value-label"), m2.appendChild(e4);
|
|
3819
4209
|
}
|
|
3820
|
-
} else
|
|
3821
|
-
|
|
4210
|
+
} else T && T[t3] && (o3.title = T[t3]);
|
|
4211
|
+
o3.appendChild(m2), n2.appendChild(o3), E.appendChild(n2);
|
|
3822
4212
|
}
|
|
3823
|
-
if (
|
|
3824
|
-
|
|
3825
|
-
i3.classList.
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
4213
|
+
if (h.appendChild(E), P && h.appendChild(P), x && h.appendChild(x), v || f || (function(e4, i3, n2, r2) {
|
|
4214
|
+
if ("undefined" == typeof ResizeObserver) return;
|
|
4215
|
+
const o3 = i3.classList.contains("magicfeedback-rating-number-container-row--dense");
|
|
4216
|
+
let a2 = 0, s2 = false;
|
|
4217
|
+
const l2 = "function" == typeof requestAnimationFrame ? requestAnimationFrame : (e5) => (e5(0), 0);
|
|
4218
|
+
let d2 = 0, c2 = false;
|
|
4219
|
+
new ResizeObserver(((u2) => {
|
|
4220
|
+
var p2;
|
|
4221
|
+
const m2 = null === (p2 = u2[0]) || void 0 === p2 ? void 0 : p2.contentRect.width;
|
|
4222
|
+
m2 && m2 !== d2 && (d2 = m2, c2 || (c2 = true, l2((() => {
|
|
4223
|
+
c2 = false, s2 || (a2 = parseFloat(getComputedStyle(i3).columnGap) || 0);
|
|
4224
|
+
const l3 = n2 * t2.RATING_NUMBER_MIN_CHIP_WIDTH + (n2 - 1) * a2;
|
|
4225
|
+
var u3;
|
|
4226
|
+
(u3 = d2 < l3) !== s2 && (s2 = u3, e4.classList.toggle("magicfeedback-rating-number--stacked", u3), e4.querySelectorAll(":scope > .magicfeedback-rating-number-scale-labels").forEach(((e5) => {
|
|
4227
|
+
e5.style.display = u3 ? "none" : "";
|
|
4228
|
+
})), e4.querySelectorAll(":scope > .magicfeedback-rating-number-scale-label-block--stacked").forEach(((e5) => {
|
|
4229
|
+
e5.style.display = u3 ? "" : "none";
|
|
4230
|
+
})), i3.classList.toggle("magicfeedback-rating-number-container-row", !u3), i3.classList.toggle("magicfeedback-rating-number-container-row--dense", !u3 && o3), i3.classList.toggle("magicfeedback-rating-number-container-column", u3), i3.classList.toggle("magicfeedback-rating-number-container-column--bare", u3), i3.style.flexDirection = u3 ? "ltr" === r2 ? "column" : "column-reverse" : "ltr" === r2 ? "row" : "row-reverse", i3.querySelectorAll(":scope > .magicfeedback-rating-number-option").forEach(((e5) => {
|
|
4231
|
+
e5.classList.toggle("magicfeedback-rating-number-option-row", !u3), e5.classList.toggle("magicfeedback-rating-number-option-column", u3);
|
|
4232
|
+
})));
|
|
4233
|
+
}))));
|
|
4234
|
+
})).observe(e4);
|
|
4235
|
+
})(h, E, A - k + 1, o2), (null == i2 ? void 0 : i2.extraOption) && (null == i2 ? void 0 : i2.extraOptionText)) {
|
|
4236
|
+
const t3 = document.createElement("div");
|
|
4237
|
+
t3.classList.add("magicfeedback-rating-number-extra-row");
|
|
4238
|
+
const n2 = document.createElement("div");
|
|
4239
|
+
n2.classList.add("magicfeedback-rating-number-option"), n2.classList.add("magicfeedback-rating-number-option--extra");
|
|
4240
|
+
const o3 = document.createElement("label");
|
|
4241
|
+
o3.htmlFor = `rating-${e3}-extra`, o3.classList.add("magicfeedback-rating-number-option-label-container");
|
|
4242
|
+
const a2 = document.createElement("input");
|
|
4243
|
+
a2.id = `rating-${e3}-extra`, a2.type = "radio", a2.name = e3, a2.value = "-", a2.classList.add(s), a2.classList.add("magicfeedback-input"), a2.setAttribute("aria-label", null == i2 ? void 0 : i2.extraOptionText), (0, r.autoAdvanceOn)(a2, l);
|
|
3834
4244
|
const d2 = document.createElement("span");
|
|
3835
|
-
d2.
|
|
4245
|
+
d2.classList.add("magicfeedback-rating-number-value");
|
|
4246
|
+
const c2 = document.createElement("span");
|
|
4247
|
+
c2.textContent = null == i2 ? void 0 : i2.extraOptionText, c2.classList.add("magicfeedback-rating-number-value-label"), d2.appendChild(c2), o3.appendChild(a2), o3.appendChild(d2), n2.appendChild(o3), t3.appendChild(n2), h.appendChild(t3);
|
|
3836
4248
|
}
|
|
3837
|
-
return
|
|
3838
|
-
}
|
|
3839
|
-
|
|
4249
|
+
return h;
|
|
4250
|
+
}, t2.usesLegacyRatingNumber = function(e3) {
|
|
4251
|
+
return !!e3 && /matas/i.test(e3);
|
|
4252
|
+
}, t2.RATING_NUMBER_MIN_CHIP_WIDTH = 44;
|
|
4253
|
+
}, 7156: (e2, t2, i) => {
|
|
3840
4254
|
"use strict";
|
|
3841
4255
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.getQuestionRenderer = void 0;
|
|
3842
|
-
const
|
|
4256
|
+
const n = i(1140), r = i(7352), o = i(5826), a = i(6054), s = i(8416), l = i(227), d = i(8707), c = i(511), u = i(6055), p = i(4310), m = i(5429), h = i(8822), f = i(6083), g = i(9102), y = i(6838), v = i(2427), b = i(1732), E = i(5469), A = i(4336), k = i(5963), T = i(4792), C = i(7754), x = /* @__PURE__ */ new Map([[n.FEEDBACKAPPANSWERTYPE.TEXT, s.renderText], [n.FEEDBACKAPPANSWERTYPE.LONGTEXT, o.renderLongText], [n.FEEDBACKAPPANSWERTYPE.NUMBER, a.renderNumber], [n.FEEDBACKAPPANSWERTYPE.RADIO, r.renderChoice], [n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, r.renderChoice], [n.FEEDBACKAPPANSWERTYPE.BOOLEAN, l.renderBoolean], [n.FEEDBACKAPPANSWERTYPE.SELECT, d.renderSelect], [n.FEEDBACKAPPANSWERTYPE.DATE, c.renderDate], [n.FEEDBACKAPPANSWERTYPE.EMAIL, u.renderEmail], [n.FEEDBACKAPPANSWERTYPE.PASSWORD, p.renderPassword], [n.FEEDBACKAPPANSWERTYPE.CONSENT, m.renderConsent], [n.FEEDBACKAPPANSWERTYPE.RATING_EMOJI, h.renderRatingEmoji], [n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER, f.renderRatingNumber], [n.FEEDBACKAPPANSWERTYPE.RATING_STAR, g.renderRatingStar], [n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX, y.renderMatrix], [n.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST, v.renderPriorityList], [n.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM, b.renderPointSystem], [n.FEEDBACKAPPANSWERTYPE.UPLOAD_IMAGE, E.renderUploadImage], [n.FEEDBACKAPPANSWERTYPE.UPLOAD_FILE, A.renderUploadFile], [n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE, k.renderMultipleChoiceImage], [n.FEEDBACKAPPANSWERTYPE.INFO_PAGE, T.renderInfoPage], [n.FEEDBACKAPPANSWERTYPE.MAX_DIFF, C.renderMaxDiff]]);
|
|
3843
4257
|
t2.getQuestionRenderer = function(e3) {
|
|
3844
|
-
return
|
|
4258
|
+
return x.get(e3);
|
|
3845
4259
|
};
|
|
3846
|
-
},
|
|
4260
|
+
}, 227: (e2, t2, i) => {
|
|
3847
4261
|
"use strict";
|
|
3848
4262
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderBoolean = void 0;
|
|
3849
|
-
const r = i(
|
|
3850
|
-
t2.renderBoolean = ({ question: e3, language: t3, urlParamValue: i2, send:
|
|
3851
|
-
const { ref:
|
|
3852
|
-
return
|
|
3853
|
-
const
|
|
3854
|
-
|
|
3855
|
-
const
|
|
3856
|
-
|
|
3857
|
-
const
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
})), i2 && i2.toLowerCase() === s2.value.toLowerCase() && (s2.checked = true), r2.appendChild(s2), r2.appendChild(a2), d.appendChild(r2);
|
|
3861
|
-
})), s.appendChild(d), { element: s, elementTypeClass: l };
|
|
4263
|
+
const n = i(6658), r = i(2139);
|
|
4264
|
+
t2.renderBoolean = ({ question: e3, language: t3, urlParamValue: i2, send: o }) => {
|
|
4265
|
+
const { ref: a, assets: s } = e3, l = document.createElement("div"), d = "magicfeedback-radio", c = document.createElement("div");
|
|
4266
|
+
return c.classList.add("magicfeedback-boolean-container"), c.style.display = "flex", c.style.flexDirection = "row", c.style.justifyContent = "space-between", c.style.width = "70%", c.style.margin = "auto", ((null == s ? void 0 : s.addIcon) ? ["\u{1F44D}", "\u{1F44E}"] : (0, n.getBooleanOptions)(t3)).forEach(((e4, t4) => {
|
|
4267
|
+
const n2 = document.createElement("label");
|
|
4268
|
+
n2.classList.add("magicfeedback-boolean-option"), n2.htmlFor = `rating-${a}-${t4}`, n2.style.cursor = "pointer", n2.style.display = "flex", n2.style.justifyContent = "center", n2.style.alignItems = "center", n2.style.margin = "auto", n2.style.padding = "0", n2.style.width = "45%", n2.style.height = "38px";
|
|
4269
|
+
const s2 = document.createElement("label");
|
|
4270
|
+
s2.htmlFor = `rating-${a}-${t4}`, s2.textContent = e4, s2.style.margin = "0", s2.style.padding = "0";
|
|
4271
|
+
const l2 = document.createElement("input");
|
|
4272
|
+
l2.id = `rating-${a}-${t4}`, l2.type = "radio", l2.name = a, l2.value = ["Yes", "No"][t4], l2.classList.add(d), l2.classList.add("magicfeedback-input"), l2.style.position = "absolute", l2.style.opacity = "0", l2.style.width = "0", l2.style.height = "0", l2.style.margin = "0", (0, r.autoAdvanceOn)(l2, o), i2 && i2.toLowerCase() === l2.value.toLowerCase() && (l2.checked = true), n2.appendChild(l2), n2.appendChild(s2), c.appendChild(n2);
|
|
4273
|
+
})), l.appendChild(c), { element: l, elementTypeClass: d };
|
|
3862
4274
|
};
|
|
3863
|
-
},
|
|
4275
|
+
}, 7352: (e2, t2, i) => {
|
|
3864
4276
|
"use strict";
|
|
3865
4277
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderChoice = void 0;
|
|
3866
|
-
const r = i(
|
|
3867
|
-
t2.renderChoice = ({ question: e3, language: t3, urlParamValue: i2, randomPosition:
|
|
3868
|
-
const { type:
|
|
3869
|
-
let
|
|
3870
|
-
|
|
3871
|
-
let
|
|
3872
|
-
(null ==
|
|
3873
|
-
|
|
4278
|
+
const n = i(1140), r = i(9930), o = i(2139);
|
|
4279
|
+
t2.renderChoice = ({ question: e3, language: t3, urlParamValue: i2, randomPosition: a, send: s }) => {
|
|
4280
|
+
const { type: l, ref: d, value: c, defaultValue: u, assets: p } = e3, m = document.createElement("div"), h = "magicfeedback-" + ("MULTIPLECHOICE" === l ? "checkbox" : "radio");
|
|
4281
|
+
let f = c || [];
|
|
4282
|
+
a && (f = f.sort((() => Math.random() - 0.5)));
|
|
4283
|
+
let g = (null == p ? void 0 : p.exclusiveAnswers) || [];
|
|
4284
|
+
(null == p ? void 0 : p.extraOption) && (g = g.filter(((e4) => e4 !== p.extraOptionText))), g.length > 0 && (null == g || g.forEach(((e4) => {
|
|
4285
|
+
f.includes(e4) || f.push(e4);
|
|
3874
4286
|
})));
|
|
3875
|
-
const
|
|
3876
|
-
return (null ==
|
|
3877
|
-
const
|
|
3878
|
-
|
|
3879
|
-
const
|
|
3880
|
-
if (
|
|
3881
|
-
document.querySelectorAll(`input[name="${
|
|
3882
|
-
})),
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
const i3 = document.getElementById(`extra-option-${l}`);
|
|
3886
|
-
t4.target.checked && f.includes(e4) ? (h.forEach(((t5) => {
|
|
4287
|
+
const y = null == p ? void 0 : p.extraOptionText;
|
|
4288
|
+
return (null == p ? void 0 : p.extraOption) && y && !f.includes(y) && f.push(y), f.forEach(((e4, a2) => {
|
|
4289
|
+
const c2 = document.createElement("div");
|
|
4290
|
+
c2.classList.add(`magicfeedback-${"MULTIPLECHOICE" === l ? "checkbox" : "radio"}-container`);
|
|
4291
|
+
const y2 = document.createElement("label"), v = document.createElement("input");
|
|
4292
|
+
if (v.id = `rating-${d}-${a2}`, v.type = "MULTIPLECHOICE" === l ? "checkbox" : "radio", v.name = d, v.value = e4, v.classList.add(h), v.classList.add("magicfeedback-input"), l === n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE && (null == p ? void 0 : p.maxOptions) && (null == p ? void 0 : p.maxOptions) > 0 && v.addEventListener("change", (() => {
|
|
4293
|
+
document.querySelectorAll(`input[name="${d}"]:checked`).length > (null == p ? void 0 : p.maxOptions) && (v.checked = false);
|
|
4294
|
+
})), l === n.FEEDBACKAPPANSWERTYPE.RADIO && s && (!(null == p ? void 0 : p.extraOptionText) || (null == p ? void 0 : p.extraOptionText) && e4 !== (null == p ? void 0 : p.extraOptionText)) && (0, o.autoAdvanceOn)(v, s), e4 !== u && e4 !== i2 || (v.checked = true), y2.textContent = e4, y2.htmlFor = `rating-${d}-${a2}`, v.addEventListener("change", ((t4) => {
|
|
4295
|
+
const i3 = document.getElementById(`extra-option-${d}`);
|
|
4296
|
+
t4.target.checked && g.includes(e4) ? (f.forEach(((t5) => {
|
|
3887
4297
|
t5 !== e4 && (document.querySelector(`input[value="${t5}"]`).checked = false);
|
|
3888
|
-
})), i3 && (i3.style.display = "none")) :
|
|
4298
|
+
})), i3 && (i3.style.display = "none")) : g.forEach(((t5) => {
|
|
3889
4299
|
t5 !== e4 && (document.querySelector(`input[value="${t5}"]`).checked = false);
|
|
3890
|
-
})), (null ==
|
|
3891
|
-
})),
|
|
4300
|
+
})), (null == p ? void 0 : p.extraOption) && e4 === (null == p ? void 0 : p.extraOptionText) && i3 && (i3.style.display = t4.target.checked ? "block" : "none");
|
|
4301
|
+
})), c2.appendChild(v), c2.appendChild(y2), m.appendChild(c2), (null == p ? void 0 : p.extraOption) && e4 === (null == p ? void 0 : p.extraOptionText)) {
|
|
3892
4302
|
const e5 = document.createElement("input");
|
|
3893
|
-
e5.type = "text", e5.placeholder = (null ==
|
|
4303
|
+
e5.type = "text", e5.placeholder = (null == p ? void 0 : p.extraOptionPlaceholder) || r.placeholder.answer(t3 || "en"), e5.classList.add("magicfeedback-extra-option"), e5.classList.add("magicfeedback-input"), e5.id = `extra-option-${d}`, e5.name = `extra-option-${d}`, e5.style.display = "none", m.appendChild(e5);
|
|
3894
4304
|
}
|
|
3895
|
-
})), { element:
|
|
4305
|
+
})), { element: m, elementTypeClass: h };
|
|
3896
4306
|
};
|
|
3897
|
-
},
|
|
4307
|
+
}, 5429: (e2, t2, i) => {
|
|
3898
4308
|
"use strict";
|
|
3899
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderConsent = void 0
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
})), { element:
|
|
4309
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderConsent = void 0;
|
|
4310
|
+
const n = i(2139);
|
|
4311
|
+
t2.renderConsent = ({ question: e3, urlParamValue: t3, send: i2 }) => {
|
|
4312
|
+
const { id: r, ref: o, value: a, require: s } = e3, l = document.createElement("input");
|
|
4313
|
+
return l.type = "checkbox", l.id = `magicfeedback-${r}`, l.name = o, l.value = "true", l.required = s, l.classList.add("magicfeedback-consent"), l.classList.add("magicfeedback-input"), t3 && a.includes(t3) && (l.checked = true), (0, n.autoAdvanceOn)(l, i2), { element: l, elementTypeClass: "magicfeedback-consent" };
|
|
3904
4314
|
};
|
|
3905
|
-
},
|
|
4315
|
+
}, 511: (e2, t2, i) => {
|
|
3906
4316
|
"use strict";
|
|
3907
4317
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderDate = void 0;
|
|
3908
|
-
const
|
|
4318
|
+
const n = i(9930);
|
|
3909
4319
|
t2.renderDate = ({ language: e3, placeholderText: t3, urlParamValue: i2 }) => {
|
|
3910
|
-
const
|
|
3911
|
-
return
|
|
4320
|
+
const r = document.createElement("input");
|
|
4321
|
+
return r.type = "date", r.placeholder = t3 || n.placeholder.date(e3 || "en"), i2 && (r.value = i2), { element: r, elementTypeClass: "magicfeedback-date" };
|
|
3912
4322
|
};
|
|
3913
|
-
},
|
|
4323
|
+
}, 6055: (e2, t2) => {
|
|
3914
4324
|
"use strict";
|
|
3915
4325
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderEmail = void 0, t2.renderEmail = ({ placeholderText: e3, urlParamValue: t3 }) => {
|
|
3916
4326
|
const i = document.createElement("input");
|
|
3917
4327
|
return i.type = "email", i.placeholder = e3 || "you@example.com", t3 && (i.value = t3), { element: i, elementTypeClass: "magicfeedback-email" };
|
|
3918
4328
|
};
|
|
3919
|
-
},
|
|
4329
|
+
}, 4792: (e2, t2) => {
|
|
3920
4330
|
"use strict";
|
|
3921
4331
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderInfoPage = void 0, t2.renderInfoPage = ({ question: e3, placeholderText: t3 }) => {
|
|
3922
|
-
var i,
|
|
3923
|
-
const
|
|
3924
|
-
if ("string" == typeof (null === (i = e3.assets) || void 0 === i ? void 0 : i.placeholder) ? "" !== e3.assets.placeholder.trim() : Boolean(null === (
|
|
4332
|
+
var i, n;
|
|
4333
|
+
const r = document.createElement("div");
|
|
4334
|
+
if ("string" == typeof (null === (i = e3.assets) || void 0 === i ? void 0 : i.placeholder) ? "" !== e3.assets.placeholder.trim() : Boolean(null === (n = e3.assets) || void 0 === n ? void 0 : n.placeholder)) {
|
|
3925
4335
|
const e4 = document.createElement("div");
|
|
3926
|
-
e4.classList.add("magicfeedback-info-message"), e4.innerHTML = t3 || "",
|
|
4336
|
+
e4.classList.add("magicfeedback-info-message"), e4.innerHTML = t3 || "", r.appendChild(e4);
|
|
3927
4337
|
}
|
|
3928
|
-
return { element:
|
|
4338
|
+
return { element: r, elementTypeClass: "magicfeedback-info-page" };
|
|
3929
4339
|
};
|
|
3930
|
-
},
|
|
4340
|
+
}, 5826: (e2, t2, i) => {
|
|
3931
4341
|
"use strict";
|
|
3932
4342
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderLongText = void 0;
|
|
3933
|
-
const
|
|
3934
|
-
t2.renderLongText = ({ language: e3, placeholderText: t3, urlParamValue: i2, maxCharacters:
|
|
4343
|
+
const n = i(9930);
|
|
4344
|
+
t2.renderLongText = ({ language: e3, placeholderText: t3, urlParamValue: i2, maxCharacters: r }) => {
|
|
3935
4345
|
const o = document.createElement("textarea");
|
|
3936
|
-
return o.rows = 3,
|
|
4346
|
+
return o.rows = 3, r > 0 && (o.maxLength = r), o.placeholder = t3 || n.placeholder.answer(e3 || "en"), i2 && (o.value = i2), { element: o, elementTypeClass: "magicfeedback-longtext" };
|
|
3937
4347
|
};
|
|
3938
|
-
},
|
|
4348
|
+
}, 6838: (e2, t2) => {
|
|
3939
4349
|
"use strict";
|
|
3940
4350
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMatrix = void 0, t2.renderMatrix = ({ question: e3, isPhone: t3, randomPosition: i }) => {
|
|
3941
|
-
const { ref:
|
|
4351
|
+
const { ref: n, value: r, assets: o } = e3, a = document.createElement("div"), s = document.createElement("div");
|
|
3942
4352
|
s.classList.add("magicfeedback-multi-question-matrix-container");
|
|
3943
|
-
let l = (null == o ? void 0 : o.options) || [], d = [...
|
|
4353
|
+
let l = (null == o ? void 0 : o.options) || [], d = [...r], c = [];
|
|
3944
4354
|
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) => {
|
|
3945
4355
|
d.includes(e4) || d.push(e4);
|
|
3946
4356
|
}))), t3) {
|
|
@@ -3948,12 +4358,12 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3948
4358
|
e4.classList.add("magicfeedback-multi-question-matrix-list"), null == l || l.forEach(((t4) => {
|
|
3949
4359
|
const i2 = document.createElement("div");
|
|
3950
4360
|
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";
|
|
3951
|
-
const
|
|
3952
|
-
|
|
3953
|
-
const
|
|
3954
|
-
|
|
4361
|
+
const r2 = document.createElement("label");
|
|
4362
|
+
r2.classList.add("magicfeedback-multi-question-matrix-label"), r2.style.paddingBottom = "10px", r2.textContent = t4, i2.appendChild(r2), d.forEach(((e5) => {
|
|
4363
|
+
const r3 = document.createElement("div");
|
|
4364
|
+
r3.classList.add("magicfeedback-radio-container"), r3.style.display = "flex", r3.style.alignItems = "center", r3.style.justifyContent = "flex-start", r3.style.width = "99%", r3.style.margin = "5px auto";
|
|
3955
4365
|
const o2 = document.createElement("label"), a2 = document.createElement("input");
|
|
3956
|
-
a2.id = `${
|
|
4366
|
+
a2.id = `${n}-${t4}-${e5}`, a2.type = "radio", a2.name = `${n}-${t4}`, a2.value = e5, a2.classList.add("magicfeedback-input"), o2.textContent = e5, o2.htmlFor = `${n}-${t4}-${e5}`, r3.appendChild(a2), r3.appendChild(o2), i2.appendChild(r3);
|
|
3957
4367
|
})), e4.appendChild(i2);
|
|
3958
4368
|
})), s.appendChild(e4);
|
|
3959
4369
|
} else {
|
|
@@ -3961,8 +4371,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3961
4371
|
e4.classList.add("magicfeedback-multi-question-matrix-table");
|
|
3962
4372
|
const t4 = document.createElement("thead");
|
|
3963
4373
|
t4.classList.add("magicfeedback-multi-question-matrix-header"), t4.style.paddingBottom = "15px";
|
|
3964
|
-
const i2 = document.createElement("tr"),
|
|
3965
|
-
i2.appendChild(
|
|
4374
|
+
const i2 = document.createElement("tr"), r2 = document.createElement("th");
|
|
4375
|
+
i2.appendChild(r2), d.forEach(((e5) => {
|
|
3966
4376
|
const t5 = document.createElement("th");
|
|
3967
4377
|
t5.textContent = e5, i2.appendChild(t5);
|
|
3968
4378
|
})), t4.appendChild(i2), e4.appendChild(t4);
|
|
@@ -3971,105 +4381,163 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3971
4381
|
const t5 = document.createElement("tr");
|
|
3972
4382
|
t5.classList.add("magicfeedback-multi-question-matrix-row-tr");
|
|
3973
4383
|
const i3 = document.createElement("td");
|
|
3974
|
-
i3.
|
|
3975
|
-
const
|
|
3976
|
-
|
|
3977
|
-
const
|
|
3978
|
-
o3.type = "radio", o3.name = `${
|
|
4384
|
+
i3.classList.add("magicfeedback-multi-question-matrix-question");
|
|
4385
|
+
const r3 = document.createElement("label");
|
|
4386
|
+
r3.classList.add("magicfeedback-multi-question-matrix-label"), r3.textContent = e5, i3.appendChild(r3), t5.appendChild(i3), d.forEach(((i4) => {
|
|
4387
|
+
const r4 = document.createElement("td"), o3 = document.createElement("input");
|
|
4388
|
+
o3.type = "radio", o3.name = `${n}-${e5}`, o3.value = i4, o3.id = `${n}-${e5}-${i4}`, o3.classList.add("magicfeedback-input");
|
|
4389
|
+
const a2 = document.createElement("label");
|
|
4390
|
+
a2.classList.add("magicfeedback-multi-question-matrix-option-label"), a2.htmlFor = o3.id, a2.textContent = i4, r4.classList.add("magicfeedback-multi-question-matrix-option"), r4.appendChild(o3), r4.appendChild(a2), t5.appendChild(r4);
|
|
3979
4391
|
})), o2.appendChild(t5);
|
|
3980
4392
|
})), e4.appendChild(o2), s.appendChild(e4);
|
|
3981
4393
|
}
|
|
3982
4394
|
return a.appendChild(s), { element: a, elementTypeClass: "magicfeedback-multi-question-matrix" };
|
|
3983
4395
|
};
|
|
3984
|
-
},
|
|
4396
|
+
}, 7754: (e2, t2, i) => {
|
|
4397
|
+
"use strict";
|
|
4398
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMaxDiff = void 0;
|
|
4399
|
+
const n = i(6658), r = i(7031), o = "http://www.w3.org/2000/svg";
|
|
4400
|
+
t2.renderMaxDiff = ({ question: e3, language: t3, randomPosition: i2 }) => {
|
|
4401
|
+
const { ref: a, value: s, assets: l } = e3, d = document.createElement("div");
|
|
4402
|
+
let c = [...s || []];
|
|
4403
|
+
i2 && (c = c.sort((() => Math.random() - 0.5)));
|
|
4404
|
+
const u = { best: (0, n.parseTitle)(null == l ? void 0 : l.bestLabel, t3) || (0, r.t)(t3, "maxDiff.best"), worst: (0, n.parseTitle)(null == l ? void 0 : l.worstLabel, t3) || (0, r.t)(t3, "maxDiff.worst") }, p = document.createElement("div");
|
|
4405
|
+
p.classList.add("magicfeedback-max-diff-container");
|
|
4406
|
+
const m = Number(null == l ? void 0 : l.setIndex) || 1, h = Number(null == l ? void 0 : l.setCount) || 1;
|
|
4407
|
+
(null == l ? void 0 : l.showSetProgress) && h > 1 && p.appendChild((function(e4, t4, i3) {
|
|
4408
|
+
const n2 = document.createElement("div");
|
|
4409
|
+
n2.classList.add("magicfeedback-max-diff-progress");
|
|
4410
|
+
const o2 = document.createElement("span");
|
|
4411
|
+
o2.classList.add("magicfeedback-max-diff-progress-label"), o2.textContent = (0, r.t)(i3, "maxDiff.setProgress", { k: e4, n: t4 });
|
|
4412
|
+
const a2 = document.createElement("span");
|
|
4413
|
+
a2.classList.add("magicfeedback-max-diff-progress-track"), a2.setAttribute("aria-hidden", "true");
|
|
4414
|
+
const s2 = document.createElement("span");
|
|
4415
|
+
return s2.classList.add("magicfeedback-max-diff-progress-fill"), s2.style.width = `${Math.min(100, e4 / t4 * 100)}%`, a2.appendChild(s2), n2.appendChild(o2), n2.appendChild(a2), n2;
|
|
4416
|
+
})(m, h, t3));
|
|
4417
|
+
const f = document.createElement("table");
|
|
4418
|
+
f.classList.add("magicfeedback-max-diff-table");
|
|
4419
|
+
const g = (e4) => {
|
|
4420
|
+
const t4 = document.createElement("th");
|
|
4421
|
+
t4.scope = "col", t4.classList.add("magicfeedback-max-diff-head", `magicfeedback-max-diff-head-${e4}`);
|
|
4422
|
+
const i3 = document.createElement("span");
|
|
4423
|
+
return i3.classList.add("magicfeedback-max-diff-head-label"), i3.appendChild((function(e5) {
|
|
4424
|
+
const t5 = document.createElementNS(o, "svg");
|
|
4425
|
+
t5.setAttribute("viewBox", "0 0 24 24"), t5.setAttribute("width", "16"), t5.setAttribute("height", "16"), t5.setAttribute("fill", "none"), t5.setAttribute("stroke", "currentColor"), t5.setAttribute("stroke-width", "2.6"), t5.setAttribute("stroke-linecap", "round"), t5.setAttribute("stroke-linejoin", "round"), t5.setAttribute("aria-hidden", "true");
|
|
4426
|
+
const i4 = document.createElementNS(o, "path");
|
|
4427
|
+
return i4.setAttribute("d", "best" === e5 ? "M12 19V5M5 12l7-7 7 7" : "M12 5v14M19 12l-7 7-7-7"), t5.appendChild(i4), t5;
|
|
4428
|
+
})(e4)), i3.appendChild(document.createTextNode(u[e4])), t4.appendChild(i3), t4;
|
|
4429
|
+
}, y = document.createElement("thead"), v = document.createElement("tr"), b = document.createElement("td");
|
|
4430
|
+
b.classList.add("magicfeedback-max-diff-head-spacer"), v.appendChild(g("best")), v.appendChild(b), v.appendChild(g("worst")), y.appendChild(v), f.appendChild(y);
|
|
4431
|
+
const E = (e4, t4, i3) => {
|
|
4432
|
+
const n2 = document.createElement("td");
|
|
4433
|
+
n2.classList.add("magicfeedback-max-diff-cell");
|
|
4434
|
+
const r2 = document.createElement("label");
|
|
4435
|
+
r2.classList.add("magicfeedback-max-diff-pick");
|
|
4436
|
+
const o2 = document.createElement("input");
|
|
4437
|
+
return o2.type = "radio", o2.name = `${a}-${e4}`, o2.value = t4, o2.id = `${a}-${e4}-${i3}`, o2.classList.add("magicfeedback-input", "magicfeedback-max-diff-input", `magicfeedback-max-diff-${e4}`), o2.setAttribute("aria-label", `${t4}: ${u[e4]}`), r2.appendChild(o2), n2.appendChild(r2), n2;
|
|
4438
|
+
}, A = document.createElement("tbody");
|
|
4439
|
+
return c.forEach(((e4, t4) => {
|
|
4440
|
+
const i3 = document.createElement("tr");
|
|
4441
|
+
i3.classList.add("magicfeedback-max-diff-row");
|
|
4442
|
+
const n2 = document.createElement("th");
|
|
4443
|
+
n2.scope = "row", n2.classList.add("magicfeedback-max-diff-item"), n2.textContent = e4, i3.appendChild(E("best", e4, t4)), i3.appendChild(n2), i3.appendChild(E("worst", e4, t4)), A.appendChild(i3);
|
|
4444
|
+
})), f.appendChild(A), f.addEventListener("change", ((e4) => {
|
|
4445
|
+
var t4;
|
|
4446
|
+
const i3 = e4.target;
|
|
4447
|
+
i3.classList.contains("magicfeedback-max-diff-input") && (null === (t4 = i3.closest("tr")) || void 0 === t4 || t4.querySelectorAll(".magicfeedback-max-diff-input").forEach(((e5) => {
|
|
4448
|
+
e5 !== i3 && (e5.checked = false);
|
|
4449
|
+
})));
|
|
4450
|
+
})), p.appendChild(f), d.appendChild(p), { element: d, elementTypeClass: "magicfeedback-max-diff" };
|
|
4451
|
+
};
|
|
4452
|
+
}, 5963: (e2, t2, i) => {
|
|
3985
4453
|
"use strict";
|
|
3986
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMultipleChoiceImage = void 0
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
const
|
|
3990
|
-
|
|
3991
|
-
const d =
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
4454
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMultipleChoiceImage = void 0;
|
|
4455
|
+
const n = i(2139);
|
|
4456
|
+
t2.renderMultipleChoiceImage = ({ question: e3, randomPosition: t3, urlParamValue: i2, send: r }) => {
|
|
4457
|
+
const o = document.createElement("div"), { ref: a, assets: s } = e3;
|
|
4458
|
+
let l = [...e3.value];
|
|
4459
|
+
const d = document.createElement("div");
|
|
4460
|
+
d.classList.add("magicfeedback-multiple-choice-image-container"), d.style.display = "flex", d.style.flexDirection = "row", d.style.flexWrap = "wrap", d.style.justifyContent = "center";
|
|
4461
|
+
const c = l.length;
|
|
4462
|
+
let u = 1, p = 1;
|
|
4463
|
+
if (window.innerWidth < 600) u = 1, p = c;
|
|
4464
|
+
else switch (c) {
|
|
3995
4465
|
case 1:
|
|
3996
4466
|
case 2:
|
|
3997
4467
|
case 3:
|
|
3998
|
-
|
|
4468
|
+
u = c, p = 1;
|
|
3999
4469
|
break;
|
|
4000
4470
|
case 4:
|
|
4001
4471
|
case 5:
|
|
4002
4472
|
case 6:
|
|
4003
|
-
|
|
4473
|
+
p = 2, u = Math.ceil(c / p);
|
|
4004
4474
|
break;
|
|
4005
4475
|
case 7:
|
|
4006
4476
|
case 8:
|
|
4007
4477
|
case 9:
|
|
4008
|
-
|
|
4478
|
+
p = 3, u = Math.ceil(c / p);
|
|
4009
4479
|
break;
|
|
4010
4480
|
default:
|
|
4011
|
-
|
|
4481
|
+
p = 4, u = Math.ceil(c / p);
|
|
4012
4482
|
}
|
|
4013
|
-
const
|
|
4014
|
-
function
|
|
4483
|
+
const m = void 0 !== (null == s ? void 0 : s.addTitle) && (null == s ? void 0 : s.addTitle), h = void 0 !== (null == s ? void 0 : s.multiOption) && (null == s ? void 0 : s.multiOption), f = void 0 !== (null == s ? void 0 : s.extraOption) && (null == s ? void 0 : s.extraOption);
|
|
4484
|
+
function g(e4) {
|
|
4015
4485
|
try {
|
|
4016
|
-
const { position: t4, url:
|
|
4017
|
-
|
|
4018
|
-
const
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
}));
|
|
4022
|
-
const h2 = document.createElement("label");
|
|
4023
|
-
h2.textContent = a2, h2.classList.add("magicfeedback-multiple-choice-image-label");
|
|
4024
|
-
const f2 = document.createElement("input");
|
|
4025
|
-
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", (() => {
|
|
4026
|
-
r();
|
|
4486
|
+
const { position: t4, url: o2, value: s2 } = e4, l2 = document.createElement("div");
|
|
4487
|
+
l2.classList.add("magicfeedback-multiple-choice-image-option"), l2.style.width = `calc(100% / ${u} - 2px)`, l2.style.height = `calc(100% / ${p} - 2px)`, l2.style.padding = "8px", l2.style.margin = "0";
|
|
4488
|
+
const c2 = document.createElement("label");
|
|
4489
|
+
c2.classList.add("magicfeedback-image-option-label-container"), c2.htmlFor = `rating-${a}-${t4}`, c2.style.cursor = "pointer", c2.addEventListener("click", (() => {
|
|
4490
|
+
c2.style.border = "2px solid #000";
|
|
4027
4491
|
}));
|
|
4028
|
-
const
|
|
4029
|
-
|
|
4492
|
+
const f2 = document.createElement("label");
|
|
4493
|
+
f2.textContent = s2, f2.classList.add("magicfeedback-multiple-choice-image-label");
|
|
4494
|
+
const g2 = document.createElement("input");
|
|
4495
|
+
g2.id = `rating-${a}-${t4}`, g2.type = h ? "checkbox" : "radio", g2.name = a, g2.value = s2, g2.style.position = "absolute", g2.style.opacity = "0", g2.style.width = "0", g2.style.height = "0", g2.classList.add("magicfeedback-input"), i2 && i2 === g2.value && (g2.checked = true), h || (0, n.autoAdvanceOn)(g2, r);
|
|
4496
|
+
const y = document.createElement("img");
|
|
4497
|
+
y.classList.add("magicfeedback-multiple-choice-image-image"), y.src = o2, y.style.cursor = "pointer", y.style.backgroundSize = "cover", y.style.backgroundPosition = "center", y.style.width = "100%", y.style.height = "100%", y.style.objectFit = "cover", y.style.margin = "auto", c2.appendChild(g2), c2.appendChild(y), m && c2.appendChild(f2), l2.appendChild(c2), d.appendChild(l2);
|
|
4030
4498
|
} catch (e5) {
|
|
4031
4499
|
console.error(e5);
|
|
4032
4500
|
}
|
|
4033
4501
|
}
|
|
4034
|
-
return t3 && (
|
|
4502
|
+
return t3 && (l = l.sort((() => Math.random() - 0.5))), l.forEach(((e4) => g(JSON.parse(e4)))), f && (null == s ? void 0 : s.extraOptionValue) && (null == s ? void 0 : s.extraOptionValue.length) > 0 && g(null == s ? void 0 : s.extraOptionValue[0]), o.appendChild(d), { element: o, elementTypeClass: "magicfeedback-multiple-choice-image" };
|
|
4035
4503
|
};
|
|
4036
|
-
},
|
|
4504
|
+
}, 6054: (e2, t2, i) => {
|
|
4037
4505
|
"use strict";
|
|
4038
4506
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderNumber = void 0;
|
|
4039
|
-
const
|
|
4507
|
+
const n = i(9930), r = i(6658);
|
|
4040
4508
|
t2.renderNumber = ({ question: e3, format: t3, language: i2, urlParamValue: o }) => {
|
|
4041
4509
|
const a = document.createElement("input");
|
|
4042
|
-
a.type = "number", a.placeholder = "slim" === t3 ? (0,
|
|
4510
|
+
a.type = "number", a.placeholder = "slim" === t3 ? (0, r.parseTitle)(e3.title, i2) : n.placeholder.number(i2 || "en");
|
|
4043
4511
|
const { value: s } = e3;
|
|
4044
4512
|
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" };
|
|
4045
4513
|
};
|
|
4046
|
-
},
|
|
4514
|
+
}, 4310: (e2, t2, i) => {
|
|
4047
4515
|
"use strict";
|
|
4048
4516
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPassword = void 0;
|
|
4049
|
-
const
|
|
4517
|
+
const n = i(9930);
|
|
4050
4518
|
t2.renderPassword = ({ language: e3, placeholderText: t3, urlParamValue: i2 }) => {
|
|
4051
|
-
const
|
|
4052
|
-
return
|
|
4519
|
+
const r = document.createElement("input");
|
|
4520
|
+
return r.type = "password", r.placeholder = t3 || n.placeholder.password(e3 || "en"), i2 && (r.value = i2), { element: r, elementTypeClass: "magicfeedback-password" };
|
|
4053
4521
|
};
|
|
4054
|
-
},
|
|
4522
|
+
}, 1732: (e2, t2, i) => {
|
|
4055
4523
|
"use strict";
|
|
4056
4524
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPointSystem = void 0;
|
|
4057
|
-
const
|
|
4525
|
+
const n = i(9930);
|
|
4058
4526
|
t2.renderPointSystem = ({ question: e3, language: t3 }) => {
|
|
4059
|
-
const { ref: i2, value:
|
|
4527
|
+
const { ref: i2, value: r } = e3, o = document.createElement("div"), a = document.createElement("div");
|
|
4060
4528
|
a.classList.add("magicfeedback-point-system-container");
|
|
4061
4529
|
const s = document.createElement("ul");
|
|
4062
4530
|
s.classList.add("magicfeedback-point-system-list"), s.style.padding = "0";
|
|
4063
|
-
const l = 100 /
|
|
4064
|
-
d.classList.add("magicfeedback-error"), d.textContent =
|
|
4531
|
+
const l = 100 / r.length, d = document.createElement("div");
|
|
4532
|
+
d.classList.add("magicfeedback-error"), d.textContent = n.placeholder.pointsystemerror(t3 || "en"), d.style.color = "#C70039", d.style.fontSize = "14px", d.style.textAlign = "end", d.style.width = "100%", d.style.display = "none";
|
|
4065
4533
|
const c = document.createElement("div");
|
|
4066
4534
|
c.classList.add("magicfeedback-point-system-total"), c.style.textAlign = "end", c.style.fontSize = "15px", c.style.marginTop = "5px";
|
|
4067
4535
|
const u = document.createElement("bdi");
|
|
4068
|
-
return u.setAttribute("dir", "ltr"), u.textContent = "0 / 100 %", c.appendChild(u),
|
|
4069
|
-
const
|
|
4070
|
-
|
|
4071
|
-
const
|
|
4072
|
-
|
|
4536
|
+
return u.setAttribute("dir", "ltr"), u.textContent = "0 / 100 %", c.appendChild(u), r.forEach(((e4, t4) => {
|
|
4537
|
+
const n2 = document.createElement("li");
|
|
4538
|
+
n2.classList.add("magicfeedback-point-system-item"), n2.style.display = "flex", n2.style.justifyContent = "space-between", n2.style.alignItems = "center", n2.style.margin = "5px";
|
|
4539
|
+
const r2 = document.createElement("label");
|
|
4540
|
+
r2.textContent = e4, r2.style.fontSize = "15px", n2.appendChild(r2);
|
|
4073
4541
|
const o2 = document.createElement("span");
|
|
4074
4542
|
o2.classList.add("magicfeedback-point-system-input-container");
|
|
4075
4543
|
const a2 = document.createElement("input");
|
|
@@ -4092,17 +4560,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4092
4560
|
t5 += Number(e7.value);
|
|
4093
4561
|
})), t5 < 100 && (d.style.display = "block");
|
|
4094
4562
|
})));
|
|
4095
|
-
})), o2.appendChild(a2), o2.appendChild(p),
|
|
4563
|
+
})), o2.appendChild(a2), o2.appendChild(p), n2.appendChild(o2), s.appendChild(n2);
|
|
4096
4564
|
})), a.appendChild(s), a.appendChild(c), a.appendChild(d), o.appendChild(a), { element: o, elementTypeClass: "magicfeedback-point-system" };
|
|
4097
4565
|
};
|
|
4098
|
-
},
|
|
4566
|
+
}, 2427: (e2, t2, i) => {
|
|
4099
4567
|
"use strict";
|
|
4100
4568
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPriorityList = void 0;
|
|
4101
|
-
const
|
|
4569
|
+
const n = i(7031);
|
|
4102
4570
|
t2.renderPriorityList = ({ question: e3, randomPosition: t3, language: i2 }) => {
|
|
4103
|
-
var
|
|
4571
|
+
var r, o, a;
|
|
4104
4572
|
const s = document.createElement("div"), l = (function(e4) {
|
|
4105
|
-
const { value: t4, ref: i3, randomPosition:
|
|
4573
|
+
const { value: t4, ref: i3, randomPosition: r2 = false, limitPriority: o2 = false, maxPriority: a2 = 0, language: s2 = "en", placeholder: l2 = "" } = e4, d = (e5) => (0, n.t)(s2, "priority." + e5), c = document.createElement("div");
|
|
4106
4574
|
if (c.classList.add("magicfeedback-priority-list-container"), o2 && a2 && a2 > 0) {
|
|
4107
4575
|
const e5 = [], o3 = document.createElement("div");
|
|
4108
4576
|
o3.classList.add("magicfeedback-priority-list-header");
|
|
@@ -4115,48 +4583,48 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4115
4583
|
const h = document.createElement("ul");
|
|
4116
4584
|
h.classList.add("magicfeedback-priority-list-list"), m.appendChild(h);
|
|
4117
4585
|
const f = () => {
|
|
4118
|
-
h.innerHTML = "", e5.forEach(((t5,
|
|
4119
|
-
const
|
|
4120
|
-
|
|
4586
|
+
h.innerHTML = "", e5.forEach(((t5, n2) => {
|
|
4587
|
+
const r3 = document.createElement("li");
|
|
4588
|
+
r3.classList.add("magicfeedback-priority-list-item");
|
|
4121
4589
|
const o4 = document.createElement("input");
|
|
4122
|
-
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 = `${
|
|
4590
|
+
o4.classList.add("magicfeedback-input-magicfeedback-priority-list"), o4.classList.add("magicfeedback-input"), o4.type = "hidden", o4.id = `priority-list-${i3}`, o4.name = i3, o4.value = `${n2 + 1}. ${t5}`, r3.appendChild(o4);
|
|
4123
4591
|
const a3 = document.createElement("label");
|
|
4124
|
-
a3.classList.add("magicfeedback-priority-list-item-label"), a3.textContent = `${
|
|
4592
|
+
a3.classList.add("magicfeedback-priority-list-item-label"), a3.textContent = `${n2 + 1}. ${t5}`, r3.appendChild(a3);
|
|
4125
4593
|
const s3 = document.createElement("div");
|
|
4126
4594
|
s3.classList.add("magicfeedback-priority-list-arrows");
|
|
4127
4595
|
const l3 = document.createElement("img");
|
|
4128
|
-
l3.classList.add("magicfeedback-priority-list-arrow-up"), l3.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", l3.style.visibility = 0 ===
|
|
4596
|
+
l3.classList.add("magicfeedback-priority-list-arrow-up"), l3.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", l3.style.visibility = 0 === n2 ? "hidden" : "visible";
|
|
4129
4597
|
const d2 = document.createElement("img");
|
|
4130
|
-
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 =
|
|
4131
|
-
var i4,
|
|
4132
|
-
const u3 =
|
|
4598
|
+
d2.classList.add("magicfeedback-priority-list-arrow-down"), d2.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", d2.style.transform = "rotate(180deg)", d2.style.visibility = n2 === e5.length - 1 ? "hidden" : "visible", l3.addEventListener("click", (() => {
|
|
4599
|
+
var i4, n3, s4, c2;
|
|
4600
|
+
const u3 = r3.previousElementSibling;
|
|
4133
4601
|
if (u3) {
|
|
4134
4602
|
const p3 = Number(null === (i4 = o4.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) - 1;
|
|
4135
4603
|
o4.value = `${p3}. ${t5}`, a3.textContent = `${p3}. ${t5}`, l3.style.visibility = 1 === p3 ? "hidden" : "visible", d2.style.visibility = p3 === e5.length ? "hidden" : "visible";
|
|
4136
4604
|
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");
|
|
4137
4605
|
if (m2 && f2 && g2 && y2) {
|
|
4138
|
-
const t6 = Number(null === (
|
|
4606
|
+
const t6 = Number(null === (n3 = m2.value) || void 0 === n3 ? void 0 : n3.split(".")[0]) + 1;
|
|
4139
4607
|
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";
|
|
4140
4608
|
}
|
|
4141
|
-
h.insertBefore(
|
|
4609
|
+
h.insertBefore(r3, u3);
|
|
4142
4610
|
}
|
|
4143
4611
|
})), d2.addEventListener("click", (() => {
|
|
4144
|
-
var i4,
|
|
4145
|
-
const c2 =
|
|
4612
|
+
var i4, n3, s4;
|
|
4613
|
+
const c2 = r3.nextElementSibling;
|
|
4146
4614
|
if (c2) {
|
|
4147
4615
|
const u3 = Number(null === (i4 = o4.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) + 1;
|
|
4148
4616
|
o4.value = `${u3}. ${t5}`, a3.textContent = `${u3}. ${t5}`, l3.style.visibility = 1 === u3 ? "hidden" : "visible", d2.style.visibility = u3 === e5.length ? "hidden" : "visible";
|
|
4149
4617
|
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");
|
|
4150
4618
|
if (p3 && m2 && f2 && g2) {
|
|
4151
4619
|
const t6 = Number(p3.value.split(".")[0]) - 1;
|
|
4152
|
-
p3.value = `${t6}.${null === (
|
|
4620
|
+
p3.value = `${t6}.${null === (n3 = m2.textContent) || void 0 === n3 ? void 0 : n3.split(".")[1]}`, m2.textContent = `${t6}.${null === (s4 = m2.textContent) || void 0 === s4 ? void 0 : s4.split(".")[1]}`, f2.style.visibility = 1 === t6 ? "hidden" : "visible", g2.style.visibility = t6 === e5.length ? "hidden" : "visible";
|
|
4153
4621
|
}
|
|
4154
|
-
h.insertBefore(c2,
|
|
4622
|
+
h.insertBefore(c2, r3);
|
|
4155
4623
|
}
|
|
4156
|
-
})), s3.appendChild(l3), s3.appendChild(d2),
|
|
4624
|
+
})), s3.appendChild(l3), s3.appendChild(d2), r3.appendChild(s3), h.appendChild(r3);
|
|
4157
4625
|
}));
|
|
4158
4626
|
}, g = document.createElement("div");
|
|
4159
|
-
g.classList.add("magicfeedback-modal-backdrop"), g.setAttribute("dir", (0,
|
|
4627
|
+
g.classList.add("magicfeedback-modal-backdrop"), g.setAttribute("dir", (0, n.isRtlLanguage)(s2) ? "rtl" : "ltr"), g.style.position = "fixed", g.style.top = "0", g.style.left = "0", g.style.width = "100vw", g.style.height = "100vh", g.style.background = "rgba(0,0,0,0.4)", g.style.display = "none", g.style.alignItems = "center", g.style.justifyContent = "center", g.style.zIndex = "9999";
|
|
4160
4628
|
const y = document.createElement("div");
|
|
4161
4629
|
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";
|
|
4162
4630
|
const v = document.createElement("h5");
|
|
@@ -4165,17 +4633,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4165
4633
|
v.textContent = `${d("selectOptionNumber")}${b()}`;
|
|
4166
4634
|
};
|
|
4167
4635
|
E();
|
|
4168
|
-
const
|
|
4169
|
-
|
|
4170
|
-
const
|
|
4171
|
-
|
|
4172
|
-
const
|
|
4173
|
-
|
|
4636
|
+
const A = document.createElement("div");
|
|
4637
|
+
A.classList.add("magicfeedback-modal-list"), A.style.flex = "1 1 auto", A.style.overflowY = "auto", A.style.minHeight = "0", (r2 ? [...t4].sort((() => Math.random() - 0.5)) : [...t4]).forEach(((t5) => {
|
|
4638
|
+
const n2 = document.createElement("label");
|
|
4639
|
+
n2.classList.add("magicfeedback-modal-row");
|
|
4640
|
+
const r3 = document.createElement("input");
|
|
4641
|
+
r3.type = "checkbox", r3.classList.add("magicfeedback-input"), r3.name = `${i3}-selection`, r3.value = t5;
|
|
4174
4642
|
const o4 = document.createElement("span");
|
|
4175
|
-
o4.textContent = t5,
|
|
4176
|
-
if (
|
|
4177
|
-
if (e5.length >= a2) return
|
|
4178
|
-
|
|
4643
|
+
o4.textContent = t5, r3.addEventListener("change", (() => {
|
|
4644
|
+
if (r3.checked) {
|
|
4645
|
+
if (e5.length >= a2) return r3.checked = false, n2.classList.add("magicfeedback-warning"), void setTimeout((() => {
|
|
4646
|
+
n2.classList.remove("magicfeedback-warning");
|
|
4179
4647
|
}), 800);
|
|
4180
4648
|
e5.push(t5);
|
|
4181
4649
|
} else {
|
|
@@ -4183,10 +4651,10 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4183
4651
|
-1 !== i4 && e5.splice(i4, 1);
|
|
4184
4652
|
}
|
|
4185
4653
|
E(), C();
|
|
4186
|
-
})),
|
|
4654
|
+
})), n2.appendChild(r3), n2.appendChild(o4), A.appendChild(n2);
|
|
4187
4655
|
}));
|
|
4188
|
-
const
|
|
4189
|
-
|
|
4656
|
+
const k = document.createElement("div");
|
|
4657
|
+
k.classList.add("magicfeedback-modal-actions"), k.style.flexShrink = "0";
|
|
4190
4658
|
const T = document.createElement("div");
|
|
4191
4659
|
T.classList.add("magicfeedback-modal-counter");
|
|
4192
4660
|
const C = () => {
|
|
@@ -4194,206 +4662,202 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4194
4662
|
T.textContent = `${d("prioritized")} ${e5.length} ${t5} ${a2}`, u2.style.display = e5.length > 0 ? "block" : "none";
|
|
4195
4663
|
};
|
|
4196
4664
|
C();
|
|
4197
|
-
const
|
|
4198
|
-
|
|
4199
|
-
const
|
|
4665
|
+
const x = document.createElement("button");
|
|
4666
|
+
x.type = "button", x.classList.add("magicfeedback-modal-close"), x.setAttribute("aria-label", d("cancel")), x.title = d("cancel"), x.textContent = "\xD7", x.style.position = "absolute", x.style.top = "8px", x.style.setProperty("inset-inline-end", "8px"), x.style.border = "none", x.style.background = "transparent", x.style.fontSize = "24px", x.style.cursor = "pointer";
|
|
4667
|
+
const P = () => {
|
|
4200
4668
|
document.body.appendChild(g), g.style.display = "flex", E(), C();
|
|
4201
|
-
},
|
|
4669
|
+
}, L = () => {
|
|
4202
4670
|
g.style.display = "none", c.appendChild(g);
|
|
4203
4671
|
};
|
|
4204
|
-
|
|
4205
|
-
|
|
4672
|
+
x.addEventListener("click", (() => {
|
|
4673
|
+
L();
|
|
4206
4674
|
}));
|
|
4207
|
-
const
|
|
4208
|
-
return
|
|
4209
|
-
|
|
4210
|
-
})),
|
|
4211
|
-
|
|
4675
|
+
const S = document.createElement("button");
|
|
4676
|
+
return S.type = "button", S.textContent = d("confirm"), S.classList.add("magicfeedback-button"), S.classList.add("magicfeedback-button-primary"), S.addEventListener("click", (() => {
|
|
4677
|
+
L(), f();
|
|
4678
|
+
})), k.appendChild(T), k.appendChild(S), y.appendChild(x), y.appendChild(v), y.appendChild(A), y.appendChild(k), g.appendChild(y), p2.addEventListener("click", (() => {
|
|
4679
|
+
P();
|
|
4212
4680
|
})), g.addEventListener("click", ((e6) => {
|
|
4213
|
-
e6.target === g &&
|
|
4681
|
+
e6.target === g && L();
|
|
4214
4682
|
})), c.appendChild(o3), c.appendChild(m), c.appendChild(g), f(), c;
|
|
4215
4683
|
}
|
|
4216
4684
|
const u = document.createElement("ul");
|
|
4217
4685
|
u.classList.add("magicfeedback-priority-list-list");
|
|
4218
|
-
const p =
|
|
4686
|
+
const p = r2 ? [...t4].sort((() => Math.random() - 0.5)) : [...t4];
|
|
4219
4687
|
return p.forEach(((e5, t5) => {
|
|
4220
|
-
const
|
|
4221
|
-
|
|
4222
|
-
const
|
|
4223
|
-
|
|
4688
|
+
const n2 = document.createElement("li");
|
|
4689
|
+
n2.classList.add("magicfeedback-priority-list-item"), n2.style.display = "flex", n2.style.justifyContent = "space-between", n2.style.alignItems = "center", n2.style.margin = "5px";
|
|
4690
|
+
const r3 = document.createElement("input");
|
|
4691
|
+
r3.classList.add("magicfeedback-input-magicfeedback-priority-list"), r3.classList.add("magicfeedback-input"), r3.type = "hidden", r3.id = `priority-list-${i3}`, r3.name = i3, r3.value = `${t5 + 1}. ${e5}`, n2.appendChild(r3);
|
|
4224
4692
|
const o3 = document.createElement("label");
|
|
4225
|
-
o3.classList.add("magicfeedback-priority-list-item-label"), o3.textContent = `${t5 + 1}. ${e5}`,
|
|
4693
|
+
o3.classList.add("magicfeedback-priority-list-item-label"), o3.textContent = `${t5 + 1}. ${e5}`, n2.appendChild(o3);
|
|
4226
4694
|
const a3 = document.createElement("div");
|
|
4227
4695
|
a3.style.display = "flex", a3.style.alignItems = "center", a3.style.justifyContent = "space-between";
|
|
4228
4696
|
const s3 = document.createElement("img");
|
|
4229
4697
|
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", (() => {
|
|
4230
4698
|
var t6, i4, a4, d2;
|
|
4231
|
-
const c2 =
|
|
4699
|
+
const c2 = n2.previousElementSibling;
|
|
4232
4700
|
if (c2) {
|
|
4233
|
-
const m = Number(null === (t6 =
|
|
4234
|
-
|
|
4701
|
+
const m = Number(null === (t6 = r3.value) || void 0 === t6 ? void 0 : t6.split(".")[0]) - 1;
|
|
4702
|
+
r3.value = `${m}. ${e5}`, o3.textContent = `${m}. ${e5}`, s3.style.visibility = 1 === m ? "hidden" : "visible", l3.style.visibility = m === p.length ? "hidden" : "visible";
|
|
4235
4703
|
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");
|
|
4236
4704
|
if (h && f && g && y) {
|
|
4237
4705
|
const e6 = Number(null === (i4 = h.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) + 1;
|
|
4238
4706
|
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";
|
|
4239
4707
|
}
|
|
4240
|
-
u.insertBefore(
|
|
4708
|
+
u.insertBefore(n2, c2);
|
|
4241
4709
|
}
|
|
4242
4710
|
}));
|
|
4243
4711
|
const l3 = document.createElement("img");
|
|
4244
4712
|
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", (() => {
|
|
4245
4713
|
var t6, i4, a4;
|
|
4246
|
-
const d2 =
|
|
4714
|
+
const d2 = n2.nextElementSibling;
|
|
4247
4715
|
if (d2) {
|
|
4248
|
-
const c2 = Number(null === (t6 =
|
|
4249
|
-
|
|
4716
|
+
const c2 = Number(null === (t6 = r3.value) || void 0 === t6 ? void 0 : t6.split(".")[0]) + 1;
|
|
4717
|
+
r3.value = `${c2}. ${e5}`, o3.textContent = `${c2}. ${e5}`, s3.style.visibility = 1 === c2 ? "hidden" : "visible", l3.style.visibility = c2 === p.length ? "hidden" : "visible";
|
|
4250
4718
|
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");
|
|
4251
4719
|
if (m && h && f && g) {
|
|
4252
4720
|
const e6 = Number(m.value.split(".")[0]) - 1;
|
|
4253
4721
|
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";
|
|
4254
4722
|
}
|
|
4255
|
-
u.insertBefore(d2,
|
|
4723
|
+
u.insertBefore(d2, n2);
|
|
4256
4724
|
}
|
|
4257
|
-
})), a3.appendChild(s3), a3.appendChild(l3),
|
|
4725
|
+
})), a3.appendChild(s3), a3.appendChild(l3), n2.appendChild(a3), u.appendChild(n2);
|
|
4258
4726
|
})), c.appendChild(u), c;
|
|
4259
|
-
})({ value: e3.value, ref: e3.ref, randomPosition: t3, limitPriority: (null === (
|
|
4727
|
+
})({ value: e3.value, ref: e3.ref, randomPosition: t3, limitPriority: (null === (r = e3.assets) || void 0 === r ? void 0 : r.limitPriority) || false, maxPriority: (null === (o = e3.assets) || void 0 === o ? void 0 : o.maxPriority) || 0, placeholder: (null === (a = e3.assets) || void 0 === a ? void 0 : a.placeholder) || "", language: i2 || "en" });
|
|
4260
4728
|
return s.appendChild(l), { element: s, elementTypeClass: "magicfeedback-priority-list" };
|
|
4261
4729
|
};
|
|
4262
|
-
},
|
|
4730
|
+
}, 8822: (e2, t2, i) => {
|
|
4263
4731
|
"use strict";
|
|
4264
4732
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingEmoji = void 0;
|
|
4265
|
-
const r = i(
|
|
4266
|
-
t2.renderRatingEmoji = ({ question: e3, url: t3, send: i2, urlParamValue:
|
|
4267
|
-
const { ref:
|
|
4268
|
-
|
|
4269
|
-
const
|
|
4270
|
-
for (let e4 =
|
|
4271
|
-
const
|
|
4272
|
-
|
|
4273
|
-
const s2 = document.createElement("label");
|
|
4274
|
-
s2.htmlFor = `rating-${a}-${e4}`, s2.classList.add("magicfeedback-rating-option-label-container");
|
|
4733
|
+
const n = i(1433), r = i(2139), o = "https://survey-dev.magicfeedback.io/assets/emojis";
|
|
4734
|
+
t2.renderRatingEmoji = ({ question: e3, url: t3, send: i2, urlParamValue: a }) => {
|
|
4735
|
+
const { ref: s, assets: l } = e3, d = document.createElement("div"), c = "magicfeedback-rating", u = document.createElement("div");
|
|
4736
|
+
u.classList.add("magicfeedback-rating-container");
|
|
4737
|
+
const p = (null == l ? void 0 : l.max) ? Number(null == l ? void 0 : l.max) : 5, m = (null == l ? void 0 : l.min) ? Number(null == l ? void 0 : l.min) : 1, h = (0, n.createRatingPlaceholder)(null == l ? void 0 : l.minPlaceholder, null == l ? void 0 : l.maxPlaceholder);
|
|
4738
|
+
for (let e4 = m; e4 <= p; e4++) {
|
|
4739
|
+
const n2 = document.createElement("div");
|
|
4740
|
+
n2.classList.add("magicfeedback-rating-option");
|
|
4275
4741
|
const l2 = document.createElement("label");
|
|
4276
|
-
l2.htmlFor = `rating-${
|
|
4277
|
-
const
|
|
4278
|
-
|
|
4279
|
-
|
|
4742
|
+
l2.htmlFor = `rating-${s}-${e4}`, l2.classList.add("magicfeedback-rating-option-label-container");
|
|
4743
|
+
const d2 = document.createElement("label");
|
|
4744
|
+
d2.htmlFor = `rating-${s}-${e4}`, d2.textContent = e4.toString();
|
|
4745
|
+
const h2 = document.createElement("img");
|
|
4746
|
+
if (h2.alt = `face-${s}-${e4}`, h2.className = `rating-image${e4}`, 0 === m && 10 === p) h2.src = `${t3}/${e4}.svg`, h2.onerror = () => h2.src = `${o}/${e4}.svg`;
|
|
4747
|
+
else if (1 === m && 5 === p) switch (e4) {
|
|
4280
4748
|
case 1:
|
|
4281
|
-
|
|
4749
|
+
h2.src = `${t3}/1.svg`, h2.onerror = () => h2.src = `${o}/1.svg`;
|
|
4282
4750
|
break;
|
|
4283
4751
|
case 2:
|
|
4284
|
-
|
|
4752
|
+
h2.src = `${t3}/2.svg`, h2.onerror = () => h2.src = `${o}/2.svg`;
|
|
4285
4753
|
break;
|
|
4286
4754
|
case 3:
|
|
4287
|
-
|
|
4755
|
+
h2.src = `${t3}/6.svg`, h2.onerror = () => h2.src = `${o}/6.svg`;
|
|
4288
4756
|
break;
|
|
4289
4757
|
case 4:
|
|
4290
|
-
|
|
4758
|
+
h2.src = `${t3}/9.svg`, h2.onerror = () => h2.src = `${o}/9.svg`;
|
|
4291
4759
|
break;
|
|
4292
4760
|
case 5:
|
|
4293
|
-
|
|
4761
|
+
h2.src = `${t3}/10.svg`, h2.onerror = () => h2.src = `${o}/10.svg`;
|
|
4294
4762
|
}
|
|
4295
4763
|
else {
|
|
4296
|
-
const i3 = Math.round(10 / (
|
|
4297
|
-
|
|
4764
|
+
const i3 = Math.round(10 / (p - m) * (e4 - m));
|
|
4765
|
+
h2.src = `${t3}/${i3}.svg`, h2.onerror = () => h2.src = `${o}/${i3}.svg`;
|
|
4298
4766
|
}
|
|
4299
|
-
const
|
|
4300
|
-
|
|
4301
|
-
i2();
|
|
4302
|
-
})), o && o === h.value && (h.checked = true), s2.appendChild(h), s2.appendChild(m2), s2.appendChild(l2), r2.appendChild(s2), c.appendChild(r2);
|
|
4767
|
+
const f = document.createElement("input");
|
|
4768
|
+
f.id = `rating-${s}-${e4}`, f.type = "radio", f.name = s, f.value = e4.toString(), f.classList.add(c), f.classList.add("magicfeedback-input"), (0, r.autoAdvanceOn)(f, i2), a && a === f.value && (f.checked = true), l2.appendChild(f), l2.appendChild(h2), l2.appendChild(d2), n2.appendChild(l2), u.appendChild(n2);
|
|
4303
4769
|
}
|
|
4304
|
-
if ((null ==
|
|
4770
|
+
if ((null == l ? void 0 : l.extraOption) && (null == l ? void 0 : l.extraOptionText)) {
|
|
4305
4771
|
const e4 = document.createElement("div");
|
|
4306
4772
|
e4.classList.add("magicfeedback-rating-option");
|
|
4307
4773
|
const t4 = document.createElement("label");
|
|
4308
|
-
t4.htmlFor = `rating-${
|
|
4309
|
-
const
|
|
4310
|
-
|
|
4311
|
-
const
|
|
4312
|
-
|
|
4313
|
-
const
|
|
4314
|
-
|
|
4315
|
-
i2();
|
|
4316
|
-
})), t4.appendChild(o2), t4.appendChild(n2), t4.appendChild(r2), e4.appendChild(t4), c.appendChild(e4);
|
|
4774
|
+
t4.htmlFor = `rating-${s}-extra`, t4.classList.add("magicfeedback-rating-option-label-container");
|
|
4775
|
+
const n2 = document.createElement("label");
|
|
4776
|
+
n2.htmlFor = `rating-${s}-extra`, n2.textContent = null == l ? void 0 : l.extraOptionText;
|
|
4777
|
+
const o2 = document.createElement("img");
|
|
4778
|
+
o2.src = "https://magicfeedback-c6458-dev.web.app/assets/question.svg", o2.alt = `face-${s}-extra`, o2.className = "magicfeedback-rating-image-extra";
|
|
4779
|
+
const a2 = document.createElement("input");
|
|
4780
|
+
a2.id = `rating-${s}-extra`, a2.type = "radio", a2.name = s, a2.value = "-", a2.classList.add(c), a2.classList.add("magicfeedback-input"), (0, r.autoAdvanceOn)(a2, i2), t4.appendChild(a2), t4.appendChild(o2), t4.appendChild(n2), e4.appendChild(t4), u.appendChild(e4);
|
|
4317
4781
|
}
|
|
4318
|
-
return
|
|
4782
|
+
return h.childElementCount > 0 && u.appendChild(h), d.appendChild(u), { element: d, elementTypeClass: c };
|
|
4319
4783
|
};
|
|
4320
|
-
},
|
|
4784
|
+
}, 6083: (e2, t2, i) => {
|
|
4321
4785
|
"use strict";
|
|
4322
4786
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingNumber = void 0;
|
|
4323
|
-
const
|
|
4324
|
-
t2.renderRatingNumber = ({ question: e3, order: t3, direction: i2, send:
|
|
4325
|
-
const
|
|
4326
|
-
return { element: (0,
|
|
4787
|
+
const n = i(1433);
|
|
4788
|
+
t2.renderRatingNumber = ({ question: e3, order: t3, direction: i2, send: r, urlParamValue: o, language: a, isPhone: s, productId: l }) => {
|
|
4789
|
+
const d = "magicfeedback-rating-number";
|
|
4790
|
+
return { element: (0, n.createRatingNumberElement)(e3.ref, e3.assets, t3, i2, d, r, o, a, { legacy: (0, n.usesLegacyRatingNumber)(l), isPhone: s }), elementTypeClass: d };
|
|
4327
4791
|
};
|
|
4328
|
-
},
|
|
4792
|
+
}, 9102: (e2, t2, i) => {
|
|
4329
4793
|
"use strict";
|
|
4330
4794
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingStar = void 0;
|
|
4331
|
-
const
|
|
4795
|
+
const n = i(1433);
|
|
4332
4796
|
t2.renderRatingStar = ({ question: e3, send: t3, urlParamValue: i2 }) => {
|
|
4333
|
-
var
|
|
4334
|
-
const a = document.createElement("div"), s = (0,
|
|
4797
|
+
var r, o;
|
|
4798
|
+
const a = document.createElement("div"), s = (0, n.createStarRating)(e3.ref, null === (r = e3.assets) || void 0 === r ? void 0 : r.minPlaceholder, null === (o = e3.assets) || void 0 === o ? void 0 : o.maxPlaceholder, t3, i2);
|
|
4335
4799
|
return a.appendChild(s), { element: a, elementTypeClass: "magicfeedback-rating-star" };
|
|
4336
4800
|
};
|
|
4337
|
-
},
|
|
4801
|
+
}, 8707: (e2, t2, i) => {
|
|
4338
4802
|
"use strict";
|
|
4339
4803
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderSelect = void 0;
|
|
4340
|
-
const
|
|
4804
|
+
const n = i(6658), r = i(7031);
|
|
4341
4805
|
t2.renderSelect = ({ question: e3, format: t3, language: i2, urlParamValue: o }) => {
|
|
4342
4806
|
const { title: a, value: s, defaultValue: l } = e3, d = document.createElement("select"), c = document.createElement("option");
|
|
4343
|
-
return c.value = "", c.text = "slim" === t3 ? (0,
|
|
4807
|
+
return c.value = "", c.text = "slim" === t3 ? (0, n.parseTitle)(a, i2) : l || (0, r.t)(i2, "select.placeholder"), c.disabled = true, c.selected = true, d.appendChild(c), s.forEach(((e4) => {
|
|
4344
4808
|
const t4 = document.createElement("option");
|
|
4345
4809
|
t4.value = e4, t4.text = e4, d.appendChild(t4);
|
|
4346
4810
|
})), o && s.includes(o) && (d.value = o), { element: d, elementTypeClass: "magicfeedback-select" };
|
|
4347
4811
|
};
|
|
4348
|
-
},
|
|
4812
|
+
}, 8416: (e2, t2, i) => {
|
|
4349
4813
|
"use strict";
|
|
4350
4814
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderText = void 0;
|
|
4351
|
-
const
|
|
4352
|
-
t2.renderText = ({ language: e3, placeholderText: t3, urlParamValue: i2, send:
|
|
4815
|
+
const n = i(9930);
|
|
4816
|
+
t2.renderText = ({ language: e3, placeholderText: t3, urlParamValue: i2, send: r }) => {
|
|
4353
4817
|
const o = document.createElement("input");
|
|
4354
|
-
return o.type = "text", o.placeholder = t3 ||
|
|
4355
|
-
e4.preventDefault(), "Enter" === e4.key &&
|
|
4818
|
+
return o.type = "text", o.placeholder = t3 || n.placeholder.answer(e3 || "en"), i2 && (o.value = i2), o.addEventListener("keyup", ((e4) => {
|
|
4819
|
+
e4.preventDefault(), "Enter" === e4.key && r && r();
|
|
4356
4820
|
})), { element: o, elementTypeClass: "magicfeedback-text" };
|
|
4357
4821
|
};
|
|
4358
|
-
},
|
|
4822
|
+
}, 4336: (e2, t2, i) => {
|
|
4359
4823
|
"use strict";
|
|
4360
4824
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderUploadFile = void 0;
|
|
4361
|
-
const
|
|
4362
|
-
t2.renderUploadFile = ({ question: e3, language: t3 }) => (0,
|
|
4363
|
-
},
|
|
4825
|
+
const n = i(1853);
|
|
4826
|
+
t2.renderUploadFile = ({ question: e3, language: t3 }) => (0, n.createUploadControl)(e3, t3, "file");
|
|
4827
|
+
}, 5469: (e2, t2, i) => {
|
|
4364
4828
|
"use strict";
|
|
4365
4829
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderUploadImage = void 0;
|
|
4366
|
-
const
|
|
4367
|
-
t2.renderUploadImage = ({ question: e3, language: t3 }) => (0,
|
|
4368
|
-
},
|
|
4830
|
+
const n = i(1853);
|
|
4831
|
+
t2.renderUploadImage = ({ question: e3, language: t3 }) => (0, n.createUploadControl)(e3, t3, "image");
|
|
4832
|
+
}, 1853: function(e2, t2, i) {
|
|
4369
4833
|
"use strict";
|
|
4370
|
-
var
|
|
4371
|
-
return new (i2 || (i2 = Promise))((function(
|
|
4834
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
4835
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
4372
4836
|
function a2(e4) {
|
|
4373
4837
|
try {
|
|
4374
|
-
l2(
|
|
4838
|
+
l2(n2.next(e4));
|
|
4375
4839
|
} catch (e5) {
|
|
4376
4840
|
o2(e5);
|
|
4377
4841
|
}
|
|
4378
4842
|
}
|
|
4379
4843
|
function s2(e4) {
|
|
4380
4844
|
try {
|
|
4381
|
-
l2(
|
|
4845
|
+
l2(n2.throw(e4));
|
|
4382
4846
|
} catch (e5) {
|
|
4383
4847
|
o2(e5);
|
|
4384
4848
|
}
|
|
4385
4849
|
}
|
|
4386
4850
|
function l2(e4) {
|
|
4387
4851
|
var t4;
|
|
4388
|
-
e4.done ?
|
|
4852
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
4389
4853
|
e5(t4);
|
|
4390
4854
|
}))).then(a2, s2);
|
|
4391
4855
|
}
|
|
4392
|
-
l2((
|
|
4856
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
4393
4857
|
}));
|
|
4394
4858
|
};
|
|
4395
4859
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.createUploadControl = t2.awaitUploadReady = t2.getUploadValues = t2.formatFileSize = void 0;
|
|
4396
|
-
const
|
|
4860
|
+
const r = i(9930), o = i(6658), a = "__mfUploadValues", s = "__mfUploadReady";
|
|
4397
4861
|
function l(e3) {
|
|
4398
4862
|
if ("number" != typeof e3 || isNaN(e3)) return "";
|
|
4399
4863
|
if (e3 < 1024) return `${e3} B`;
|
|
@@ -4406,58 +4870,58 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4406
4870
|
const t3 = e3[a];
|
|
4407
4871
|
return Array.isArray(t3) ? t3 : [];
|
|
4408
4872
|
}, t2.awaitUploadReady = function(e3) {
|
|
4409
|
-
return
|
|
4873
|
+
return n(this, void 0, void 0, (function* () {
|
|
4410
4874
|
if (!e3) return;
|
|
4411
4875
|
const t3 = Array.from(e3.querySelectorAll(".magicfeedback-upload-native"));
|
|
4412
4876
|
yield Promise.all(t3.map(((e4) => e4[s])).filter(Boolean));
|
|
4413
4877
|
}));
|
|
4414
4878
|
}, t2.createUploadControl = function(e3, t3, i2) {
|
|
4415
|
-
const { ref:
|
|
4879
|
+
const { ref: n2, require: d, title: c, assets: u } = e3, p = "image" === i2 ? "magicfeedback-upload-image" : "magicfeedback-upload-file", m = (null == u ? void 0 : u.multiple) || false, h = m ? (null == u ? void 0 : u.maxFiles) || 0 : 1, f = Number(null == u ? void 0 : u.maxFileSize) > 0 ? Number(null == u ? void 0 : u.maxFileSize) : 0, g = 1024 * f * 1024, y = document.createElement("div");
|
|
4416
4880
|
y.classList.add("magicfeedback-upload");
|
|
4417
4881
|
const v = document.createElement("input");
|
|
4418
|
-
v.type = "file", "image" === i2 && (v.accept = "image/*"), v.multiple = m, v.required = d, v.name =
|
|
4882
|
+
v.type = "file", "image" === i2 && (v.accept = "image/*"), v.multiple = m, v.required = d, v.name = n2, v.id = `magicfeedback-upload-input-${n2}`, v.classList.add(p), v.classList.add("magicfeedback-input"), v.classList.add("magicfeedback-upload-native"), v[a] = [], v[s] = Promise.resolve();
|
|
4419
4883
|
const b = (0, o.parseTitle)(c, t3);
|
|
4420
4884
|
b && v.setAttribute("aria-label", b);
|
|
4421
4885
|
const E = document.createElement("div");
|
|
4422
4886
|
E.classList.add("magicfeedback-upload-dropzone");
|
|
4423
|
-
const k = document.createElement("span");
|
|
4424
|
-
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>';
|
|
4425
4887
|
const A = document.createElement("span");
|
|
4426
|
-
A.classList.add("magicfeedback-upload-
|
|
4888
|
+
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>';
|
|
4889
|
+
const k = document.createElement("span");
|
|
4890
|
+
k.classList.add("magicfeedback-upload-cta"), k.textContent = r.placeholder.upload.cta(t3);
|
|
4427
4891
|
const T = document.createElement("span");
|
|
4428
|
-
T.classList.add("magicfeedback-upload-hint"), T.textContent = (function(e4, t4, i3,
|
|
4429
|
-
const a2 = [
|
|
4430
|
-
return i3 &&
|
|
4431
|
-
})(t3, i2, m, h, f), E.appendChild(v), E.appendChild(
|
|
4892
|
+
T.classList.add("magicfeedback-upload-hint"), T.textContent = (function(e4, t4, i3, n3, o2) {
|
|
4893
|
+
const a2 = [r.placeholder.upload.formats(e4, t4)];
|
|
4894
|
+
return i3 && n3 > 0 && a2.push(r.placeholder.upload.maxFiles(e4, n3)), o2 > 0 && a2.push(r.placeholder.upload.maxSize(e4, o2)), a2.filter(Boolean).join(" \xB7 ");
|
|
4895
|
+
})(t3, i2, m, h, f), E.appendChild(v), E.appendChild(A), E.appendChild(k), E.appendChild(T);
|
|
4432
4896
|
const C = document.createElement("div");
|
|
4433
4897
|
C.classList.add("magicfeedback-upload-error");
|
|
4434
|
-
const
|
|
4435
|
-
|
|
4436
|
-
const
|
|
4437
|
-
const t4 =
|
|
4898
|
+
const x = document.createElement("ul");
|
|
4899
|
+
x.classList.add("magicfeedback-upload-list"), y.appendChild(E), y.appendChild(C), y.appendChild(x);
|
|
4900
|
+
const P = /* @__PURE__ */ new WeakMap(), L = (e4) => {
|
|
4901
|
+
const t4 = P.get(e4);
|
|
4438
4902
|
return t4 ? Promise.resolve(t4) : new Promise(((t5) => {
|
|
4439
|
-
const i3 = new FileReader(),
|
|
4440
|
-
const
|
|
4441
|
-
|
|
4903
|
+
const i3 = new FileReader(), n3 = (i4) => {
|
|
4904
|
+
const n4 = JSON.stringify({ name: e4.name, type: e4.type, size: e4.size, content: i4 });
|
|
4905
|
+
P.set(e4, n4), t5(n4);
|
|
4442
4906
|
};
|
|
4443
|
-
i3.onload = () =>
|
|
4907
|
+
i3.onload = () => n3("string" == typeof i3.result ? i3.result : ""), i3.onerror = () => n3(""), i3.readAsDataURL(e4);
|
|
4444
4908
|
}));
|
|
4445
|
-
},
|
|
4909
|
+
}, S = [], w = (e4) => {
|
|
4446
4910
|
try {
|
|
4447
4911
|
const t4 = h > 0 ? e4.slice(0, h) : e4, i3 = new DataTransfer();
|
|
4448
4912
|
t4.forEach(((e5) => i3.items.add(e5))), v.files = i3.files;
|
|
4449
4913
|
} catch (e5) {
|
|
4450
4914
|
}
|
|
4451
4915
|
!(function() {
|
|
4452
|
-
|
|
4916
|
+
S.forEach(((e6) => URL.revokeObjectURL(e6))), S.length = 0, x.innerHTML = "";
|
|
4453
4917
|
const e5 = Array.from(v.files || []);
|
|
4454
|
-
y.classList.toggle("magicfeedback-upload--has-files", e5.length > 0), e5.forEach(((e6,
|
|
4918
|
+
y.classList.toggle("magicfeedback-upload--has-files", e5.length > 0), e5.forEach(((e6, n3) => {
|
|
4455
4919
|
const o2 = document.createElement("li");
|
|
4456
4920
|
o2.classList.add("magicfeedback-upload-file-item");
|
|
4457
4921
|
const a2 = document.createElement("span");
|
|
4458
4922
|
if (a2.classList.add("magicfeedback-upload-thumb"), "image" === i2 && e6.type.startsWith("image/")) {
|
|
4459
4923
|
const t4 = URL.createObjectURL(e6);
|
|
4460
|
-
|
|
4924
|
+
S.push(t4);
|
|
4461
4925
|
const i3 = document.createElement("img");
|
|
4462
4926
|
i3.src = t4, i3.alt = e6.name, a2.appendChild(i3);
|
|
4463
4927
|
} 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>';
|
|
@@ -4468,20 +4932,20 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4468
4932
|
const c2 = document.createElement("span");
|
|
4469
4933
|
c2.classList.add("magicfeedback-upload-file-size"), c2.textContent = l(e6.size), s2.appendChild(d2), s2.appendChild(c2);
|
|
4470
4934
|
const u2 = document.createElement("button");
|
|
4471
|
-
u2.type = "button", u2.classList.add("magicfeedback-upload-remove"), u2.setAttribute("aria-label", `${
|
|
4472
|
-
e7.preventDefault(), e7.stopPropagation(),
|
|
4473
|
-
})), o2.appendChild(a2), o2.appendChild(s2), o2.appendChild(u2),
|
|
4935
|
+
u2.type = "button", u2.classList.add("magicfeedback-upload-remove"), u2.setAttribute("aria-label", `${r.placeholder.upload.remove(t3)}: ${e6.name}`), u2.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>', u2.addEventListener("click", ((e7) => {
|
|
4936
|
+
e7.preventDefault(), e7.stopPropagation(), w(Array.from(v.files || []).filter(((e8, t4) => t4 !== n3)));
|
|
4937
|
+
})), o2.appendChild(a2), o2.appendChild(s2), o2.appendChild(u2), x.appendChild(o2);
|
|
4474
4938
|
}));
|
|
4475
4939
|
})(), (() => {
|
|
4476
|
-
const e5 = Array.from(v.files || []), t4 = Promise.all(e5.map(
|
|
4940
|
+
const e5 = Array.from(v.files || []), t4 = Promise.all(e5.map(L)).then(((e6) => {
|
|
4477
4941
|
v[a] = e6;
|
|
4478
4942
|
}));
|
|
4479
4943
|
v[s] = t4;
|
|
4480
4944
|
})();
|
|
4481
|
-
},
|
|
4945
|
+
}, O = (e4) => {
|
|
4482
4946
|
if (!e4.length) return C.textContent = "", void C.classList.remove("is-visible");
|
|
4483
4947
|
const i3 = e4.map(((e5) => e5.name)).join(", ");
|
|
4484
|
-
C.textContent = `${
|
|
4948
|
+
C.textContent = `${r.placeholder.upload.tooLarge(t3, f)}: ${i3}`, C.classList.add("is-visible");
|
|
4485
4949
|
}, N = (e4) => {
|
|
4486
4950
|
if (!g) return { accepted: e4, rejected: [] };
|
|
4487
4951
|
const t4 = [], i3 = [];
|
|
@@ -4489,7 +4953,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4489
4953
|
};
|
|
4490
4954
|
v.addEventListener("change", (() => {
|
|
4491
4955
|
const { accepted: e4, rejected: t4 } = N(Array.from(v.files || []));
|
|
4492
|
-
|
|
4956
|
+
O(t4), w(e4);
|
|
4493
4957
|
}));
|
|
4494
4958
|
const I = (e4) => {
|
|
4495
4959
|
e4.preventDefault(), e4.stopPropagation();
|
|
@@ -4501,72 +4965,72 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4501
4965
|
})))), E.addEventListener("drop", ((e4) => {
|
|
4502
4966
|
I(e4), E.classList.remove("is-dragover");
|
|
4503
4967
|
const t4 = e4.dataTransfer;
|
|
4504
|
-
let
|
|
4505
|
-
if ("image" === i2 && (
|
|
4506
|
-
const { accepted:
|
|
4507
|
-
if (
|
|
4968
|
+
let n3 = t4 ? Array.from(t4.files) : [];
|
|
4969
|
+
if ("image" === i2 && (n3 = n3.filter(((e5) => e5.type.startsWith("image/")))), !n3.length) return;
|
|
4970
|
+
const { accepted: r2, rejected: o2 } = N(n3);
|
|
4971
|
+
if (O(o2), !r2.length) return;
|
|
4508
4972
|
const a2 = m ? Array.from(v.files || []) : [];
|
|
4509
|
-
|
|
4973
|
+
w(a2.concat(r2));
|
|
4510
4974
|
})), { element: y, elementTypeClass: p };
|
|
4511
4975
|
};
|
|
4512
|
-
},
|
|
4976
|
+
}, 8019: function(e2, t2, i) {
|
|
4513
4977
|
"use strict";
|
|
4514
|
-
var
|
|
4515
|
-
return new (i2 || (i2 = Promise))((function(
|
|
4978
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
4979
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
4516
4980
|
function a2(e4) {
|
|
4517
4981
|
try {
|
|
4518
|
-
l2(
|
|
4982
|
+
l2(n2.next(e4));
|
|
4519
4983
|
} catch (e5) {
|
|
4520
4984
|
o2(e5);
|
|
4521
4985
|
}
|
|
4522
4986
|
}
|
|
4523
4987
|
function s2(e4) {
|
|
4524
4988
|
try {
|
|
4525
|
-
l2(
|
|
4989
|
+
l2(n2.throw(e4));
|
|
4526
4990
|
} catch (e5) {
|
|
4527
4991
|
o2(e5);
|
|
4528
4992
|
}
|
|
4529
4993
|
}
|
|
4530
4994
|
function l2(e4) {
|
|
4531
4995
|
var t4;
|
|
4532
|
-
e4.done ?
|
|
4996
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
4533
4997
|
e5(t4);
|
|
4534
4998
|
}))).then(a2, s2);
|
|
4535
4999
|
}
|
|
4536
|
-
l2((
|
|
5000
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
4537
5001
|
}));
|
|
4538
|
-
},
|
|
5002
|
+
}, r = this && this.__importDefault || function(e3) {
|
|
4539
5003
|
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
4540
5004
|
};
|
|
4541
5005
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.nextAgentTurn = t2.startAgentSurvey = void 0;
|
|
4542
|
-
const o =
|
|
4543
|
-
function d(e3, t3, i2,
|
|
5006
|
+
const o = r(i(6911)), a = i(6891), s = i(1347), l = i(9);
|
|
5007
|
+
function d(e3, t3, i2, r2, s2) {
|
|
4544
5008
|
var d2;
|
|
4545
|
-
return
|
|
4546
|
-
let
|
|
5009
|
+
return n(this, void 0, void 0, (function* () {
|
|
5010
|
+
let n2;
|
|
4547
5011
|
try {
|
|
4548
|
-
|
|
5012
|
+
n2 = yield (0, o.default)(e3 + t3, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, a.header), body: JSON.stringify(i2) });
|
|
4549
5013
|
} catch (e4) {
|
|
4550
|
-
throw
|
|
5014
|
+
throw r2.err(`[agentSurvey/${s2}] network error`, e4), new l.AgentApiError("NETWORK", (null == e4 ? void 0 : e4.message) || "Network error");
|
|
4551
5015
|
}
|
|
4552
|
-
if (!
|
|
5016
|
+
if (!n2.ok) {
|
|
4553
5017
|
let e4 = null;
|
|
4554
5018
|
try {
|
|
4555
|
-
e4 = yield
|
|
5019
|
+
e4 = yield n2.json();
|
|
4556
5020
|
} catch (e5) {
|
|
4557
5021
|
}
|
|
4558
|
-
const t4 = (0, l.mapAgentStatus)(
|
|
4559
|
-
throw
|
|
5022
|
+
const t4 = (0, l.mapAgentStatus)(n2.status, s2);
|
|
5023
|
+
throw r2.err(`[agentSurvey/${s2}] ${n2.status}`, e4), new l.AgentApiError(t4, (null === (d2 = null == e4 ? void 0 : e4.error) || void 0 === d2 ? void 0 : d2.message) || (null == e4 ? void 0 : e4.message) || n2.statusText, n2.status, "RATE_LIMITED" === t4 ? (function(e5) {
|
|
4560
5024
|
var t5, i3;
|
|
4561
|
-
const
|
|
4562
|
-
return Number.isFinite(
|
|
4563
|
-
})(
|
|
5025
|
+
const n3 = null === (i3 = null === (t5 = null == e5 ? void 0 : e5.headers) || void 0 === t5 ? void 0 : t5.get) || void 0 === i3 ? void 0 : i3.call(t5, "Retry-After"), r3 = n3 ? Number(n3) : NaN;
|
|
5026
|
+
return Number.isFinite(r3) && r3 > 0 ? 1e3 * r3 : 6e4;
|
|
5027
|
+
})(n2) : void 0, e4);
|
|
4564
5028
|
}
|
|
4565
5029
|
try {
|
|
4566
|
-
const e4 = yield
|
|
4567
|
-
return
|
|
5030
|
+
const e4 = yield n2.json();
|
|
5031
|
+
return r2.log(`[agentSurvey/${s2}] ok`, e4), e4;
|
|
4568
5032
|
} catch (e4) {
|
|
4569
|
-
throw new l.AgentApiError("MALFORMED", "Unreadable response body",
|
|
5033
|
+
throw new l.AgentApiError("MALFORMED", "Unreadable response body", n2.status);
|
|
4570
5034
|
}
|
|
4571
5035
|
}));
|
|
4572
5036
|
}
|
|
@@ -4575,12 +5039,12 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4575
5039
|
}, t2.nextAgentTurn = function(e3, t3, i2) {
|
|
4576
5040
|
return d(e3, s.endpoints.sdk.agentSurveyNext, t3, i2, "next");
|
|
4577
5041
|
};
|
|
4578
|
-
},
|
|
5042
|
+
}, 9: (e2, t2) => {
|
|
4579
5043
|
"use strict";
|
|
4580
5044
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.mapAgentStatus = t2.AgentApiError = void 0;
|
|
4581
5045
|
class i extends Error {
|
|
4582
|
-
constructor(e3, t3,
|
|
4583
|
-
super(t3), this.kind = e3, this.status =
|
|
5046
|
+
constructor(e3, t3, n, r, o) {
|
|
5047
|
+
super(t3), this.kind = e3, this.status = n, this.retryAfterMs = r, this.body = o, this.name = "AgentApiError", Object.setPrototypeOf(this, i.prototype);
|
|
4584
5048
|
}
|
|
4585
5049
|
get retryable() {
|
|
4586
5050
|
return "RATE_LIMITED" === this.kind || "AI_UNAVAILABLE" === this.kind || "NETWORK" === this.kind;
|
|
@@ -4589,38 +5053,38 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4589
5053
|
t2.AgentApiError = i, t2.mapAgentStatus = function(e3, t3) {
|
|
4590
5054
|
return 429 === e3 ? "RATE_LIMITED" : 406 === e3 || 401 === e3 || 403 === e3 ? "AUTH" : 404 === e3 ? "NOT_FOUND" : 400 === e3 || 422 === e3 ? "BAD_CONFIG" : e3 >= 500 ? "start" === t3 ? "AI_UNAVAILABLE" : "NETWORK" : "MALFORMED";
|
|
4591
5055
|
};
|
|
4592
|
-
},
|
|
5056
|
+
}, 3963: (e2, t2, i) => {
|
|
4593
5057
|
"use strict";
|
|
4594
5058
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.encodeAnswer = t2.toAgentStep = t2.ratingBounds = t2.mapAgentType = t2.DEFAULT_ANSWER_DELIMITER = void 0;
|
|
4595
|
-
const
|
|
5059
|
+
const n = i(1140), r = i(6658);
|
|
4596
5060
|
t2.DEFAULT_ANSWER_DELIMITER = ", ";
|
|
4597
|
-
const o = [
|
|
5061
|
+
const o = [n.FEEDBACKAPPANSWERTYPE.RADIO, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, n.FEEDBACKAPPANSWERTYPE.SELECT, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE], a = Object.values(n.FEEDBACKAPPANSWERTYPE);
|
|
4598
5062
|
function s(e3, t3, i2) {
|
|
4599
5063
|
var s2, l2, d2;
|
|
4600
5064
|
const c2 = String(e3 || "").trim().toUpperCase();
|
|
4601
|
-
return "RATING" === c2 ?
|
|
5065
|
+
return "RATING" === c2 ? n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER : c2 === n.FEEDBACKAPPANSWERTYPE.CONTACT ? (null === (s2 = i2.log) || void 0 === s2 || s2.log("[agentSurvey] CONTACT has no renderer, falling back to TEXT"), n.FEEDBACKAPPANSWERTYPE.TEXT) : a.includes(c2) ? o.includes(c2) && 0 === t3.length ? (null === (d2 = i2.log) || void 0 === d2 || d2.err(`[agentSurvey] ${c2} arrived with no options, falling back to TEXT`), n.FEEDBACKAPPANSWERTYPE.TEXT) : c2 !== n.FEEDBACKAPPANSWERTYPE.BOOLEAN || 2 !== t3.length || (function(e4, t4) {
|
|
4602
5066
|
if (2 !== e4.length) return false;
|
|
4603
|
-
const i3 = e4.map(((e5) => String(e5).trim().toLowerCase())),
|
|
4604
|
-
return i3[0] === o2[0] && i3[1] === o2[1] || i3[0] ===
|
|
4605
|
-
})(t3, i2.language) ? c2 :
|
|
5067
|
+
const i3 = e4.map(((e5) => String(e5).trim().toLowerCase())), n2 = (0, r.getBooleanOptions)(t4).map(((e5) => e5.toLowerCase())), o2 = ["yes", "no"];
|
|
5068
|
+
return i3[0] === o2[0] && i3[1] === o2[1] || i3[0] === n2[0] && i3[1] === n2[1];
|
|
5069
|
+
})(t3, i2.language) ? c2 : n.FEEDBACKAPPANSWERTYPE.RADIO : (null === (l2 = i2.log) || void 0 === l2 || l2.err(`[agentSurvey] unknown question type "${e3}", falling back to TEXT`), n.FEEDBACKAPPANSWERTYPE.TEXT);
|
|
4606
5070
|
}
|
|
4607
5071
|
function l(e3) {
|
|
4608
5072
|
const t3 = e3.map(Number).filter(((e4) => Number.isFinite(e4)));
|
|
4609
5073
|
return t3.length >= 2 ? { min: Math.min(...t3), max: Math.max(...t3) } : { min: 1, max: 5 };
|
|
4610
5074
|
}
|
|
4611
5075
|
function d(e3, t3, i2) {
|
|
4612
|
-
const
|
|
4613
|
-
return e3 !==
|
|
5076
|
+
const r2 = { randomPosition: false, direction: "row", order: "ltr" };
|
|
5077
|
+
return e3 !== n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER && e3 !== n.FEEDBACKAPPANSWERTYPE.RATING_EMOJI || Object.assign(r2, l(t3)), e3 === n.FEEDBACKAPPANSWERTYPE.LONGTEXT && (r2.maxCharacters = 0), Object.assign(Object.assign({}, r2), (null == i2 ? void 0 : i2.assets) || {});
|
|
4614
5078
|
}
|
|
4615
5079
|
function c(e3, t3, i2) {
|
|
4616
|
-
var
|
|
4617
|
-
const { full: l2, title: c2 } = t3, u = [...null !== (
|
|
5080
|
+
var n2, r2, o2, a2;
|
|
5081
|
+
const { full: l2, title: c2 } = t3, u = [...null !== (r2 = null !== (n2 = e3.questionValues) && void 0 !== n2 ? n2 : null == l2 ? void 0 : l2.value) && void 0 !== r2 ? r2 : []], p = s(null !== (o2 = null == l2 ? void 0 : l2.type) && void 0 !== o2 ? o2 : e3.questionType, u, i2), m = e3.questionRef || (null == l2 ? void 0 : l2.ref) || `agent-q-${e3.currentTurn}`;
|
|
4618
5082
|
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" };
|
|
4619
5083
|
}
|
|
4620
5084
|
t2.mapAgentType = s, t2.ratingBounds = l, t2.toAgentStep = function(e3, t3) {
|
|
4621
|
-
var i2,
|
|
5085
|
+
var i2, r2, o2;
|
|
4622
5086
|
const a2 = e3, s2 = e3.currentTurn, l2 = e3.maxTurns, d2 = a2.coverageSummary, u = (e4) => ({ kind: "END", reason: e4, currentTurn: s2, maxTurns: l2, coverageSummary: d2 });
|
|
4623
|
-
if (a2.answerType ===
|
|
5087
|
+
if (a2.answerType === n.AGENT_ANSWER_TYPE_BLOCKED) return u("BLOCKED");
|
|
4624
5088
|
if (true === a2.shouldEnd) return u("SHOULD_END");
|
|
4625
5089
|
const p = (function(e4) {
|
|
4626
5090
|
const t4 = e4.question && "object" == typeof e4.question ? e4.question : e4.nextQuestion && "object" == typeof e4.nextQuestion ? e4.nextQuestion : null;
|
|
@@ -4630,17 +5094,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4630
5094
|
}
|
|
4631
5095
|
return { full: null, title: "string" == typeof e4.nextQuestion ? e4.nextQuestion : null };
|
|
4632
5096
|
})(e3);
|
|
4633
|
-
return "NONE" === String(null !== (o2 = null !== (
|
|
4634
|
-
}, t2.encodeAnswer = function(e3, i2,
|
|
4635
|
-
const
|
|
4636
|
-
return [a2.filter(((e4, t3) => a2.indexOf(e4) === t3)).join(
|
|
5097
|
+
return "NONE" === String(null !== (o2 = null !== (r2 = null === (i2 = p.full) || void 0 === i2 ? void 0 : i2.type) && void 0 !== r2 ? r2 : e3.questionType) && void 0 !== o2 ? o2 : "").trim().toUpperCase() ? u("TYPE_NONE") : p.title && p.title.trim() ? { kind: "QUESTION", question: c(e3, p, t3), isFromBase: true === e3.isFromBase, currentTurn: s2, maxTurns: l2, topic: a2.topic, coverageGaps: e3.coverageGaps, coverageSummary: d2 } : u("NO_QUESTION");
|
|
5098
|
+
}, t2.encodeAnswer = function(e3, i2, n2 = t2.DEFAULT_ANSWER_DELIMITER) {
|
|
5099
|
+
const r2 = i2.ref, o2 = (e4) => e4.flatMap(((e5) => Array.isArray(e5.value) ? e5.value : [e5.value])).map(((e5) => "string" == typeof e5 ? e5 : JSON.stringify(e5))).map(((e5) => (e5 || "").trim())).filter(((e5) => "" !== e5)), a2 = o2(e3.filter(((e4) => e4.key === r2))), s2 = o2(e3.filter(((e4) => e4.key === `extra-option-${r2}`)));
|
|
5100
|
+
return [a2.filter(((e4, t3) => a2.indexOf(e4) === t3)).join(n2), s2.join(n2)].filter(((e4) => "" !== e4)).join(n2);
|
|
4637
5101
|
};
|
|
4638
|
-
},
|
|
5102
|
+
}, 1817: (e2, t2, i) => {
|
|
4639
5103
|
"use strict";
|
|
4640
5104
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.scrapeInputs = void 0;
|
|
4641
|
-
const
|
|
5105
|
+
const n = i(1853);
|
|
4642
5106
|
t2.scrapeInputs = function(e3) {
|
|
4643
|
-
const t3 = e3.querySelectorAll(".magicfeedback-input"), i2 = [],
|
|
5107
|
+
const t3 = e3.querySelectorAll(".magicfeedback-input"), i2 = [], r = {};
|
|
4644
5108
|
return t3.forEach(((e4) => {
|
|
4645
5109
|
var t4;
|
|
4646
5110
|
const o = e4, a = o.name;
|
|
@@ -4648,236 +5112,394 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4648
5112
|
const s = o.type;
|
|
4649
5113
|
if (("radio" === s || "checkbox" === s) && !o.checked) return;
|
|
4650
5114
|
const l = o.value, d = o.classList[0];
|
|
4651
|
-
if ((null == d ? void 0 : d.includes("magicfeedback-priority-list")) || (null === (t4 = o.id) || void 0 === t4 ? void 0 : t4.startsWith("priority-list-"))) return
|
|
5115
|
+
if ((null == d ? void 0 : d.includes("magicfeedback-priority-list")) || (null === (t4 = o.id) || void 0 === t4 ? void 0 : t4.startsWith("priority-list-"))) return r[a] || (r[a] = []), void r[a].push(l);
|
|
4652
5116
|
if (null == d ? void 0 : d.includes("magicfeedback-upload")) {
|
|
4653
|
-
const e5 = (0,
|
|
5117
|
+
const e5 = (0, n.getUploadValues)(o);
|
|
4654
5118
|
return void (e5.length && i2.push({ key: a, value: e5 }));
|
|
4655
5119
|
}
|
|
4656
5120
|
const c = "magicfeedback-consent" === d ? o.checked.toString() : l;
|
|
4657
5121
|
null != c && i2.push({ key: a, value: [c] });
|
|
4658
|
-
})), Object.entries(
|
|
4659
|
-
const
|
|
4660
|
-
i2.push({ key: e4, value:
|
|
5122
|
+
})), Object.entries(r).forEach((([e4, t4]) => {
|
|
5123
|
+
const n2 = t4.slice().sort(((e5, t5) => Number(e5.split(".")[0]) - Number(t5.split(".")[0])));
|
|
5124
|
+
i2.push({ key: e4, value: n2 });
|
|
4661
5125
|
})), i2;
|
|
4662
5126
|
};
|
|
4663
|
-
},
|
|
5127
|
+
}, 7031: (e2, t2) => {
|
|
4664
5128
|
"use strict";
|
|
4665
5129
|
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;
|
|
4666
|
-
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.' } };
|
|
4667
|
-
t2.SUPPORTED_LANGUAGES = ["en", "da", "fi", "no", "es", "sv", "ar", "bn", "de", "pt", "fr"], t2.AVAILABLE_LANGUAGES = Object.keys(
|
|
4668
|
-
const
|
|
5130
|
+
const i = { "placeholder.answer": "Write your answer here...", "placeholder.number": "Write your number here...", "placeholder.email": "Write your email here...", "placeholder.date": "Write your date here...", "placeholder.password": "Write your password here...", "pointSystem.error": "The total points must be 100 %", "boolean.yes": "Yes", "boolean.no": "No", "upload.cta": "Drag & drop or click to upload", "upload.imagesOnly": "Images only", "upload.anyFileType": "Any file type", "upload.maxFiles": "Max {n} files", "upload.maxSize": "Max {mb} MB", "upload.tooLarge": "File is too large (max {mb} MB)", "upload.remove": "Remove", "select.placeholder": "Select an option", "rating.ariaLabel": "Rating", "maxDiff.best": "Most important", "maxDiff.worst": "Least important", "maxDiff.setProgress": "Block {k} of {n}", "priority.selectUpTo": "Select up to", "priority.options": "options", "priority.thenOrder": "and then order them", "priority.selectOptions": "Select options", "priority.cancel": "Cancel", "priority.confirm": "Confirm", "priority.selectOptionNumber": "Select option #", "priority.prioritized": "Prioritized", "priority.of": "of", "priority.instruction": "Your priority list can be seen below. If you wish, you can rearrange your choices using the arrows. Click 'Next' to confirm your selection and proceed.", "action.send": "Send", "action.back": "Back", "action.next": "Next", "action.start": "Go!", "message.success": "Thank you for your feedback!", "message.blocked": "Thanks for your time - we'll end the conversation here.", "message.required": "Please answer before continuing.", "message.rateLimit": "Too many requests. Retrying in {seconds}s..." }, n = { en: i, es: { "placeholder.answer": "Escribe tu respuesta aqu\xED...", "placeholder.number": "Escribe tu n\xFAmero aqu\xED...", "placeholder.email": "Escribe tu correo electr\xF3nico aqu\xED...", "placeholder.date": "Escribe tu fecha aqu\xED...", "placeholder.password": "Escribe tu contrase\xF1a aqu\xED...", "pointSystem.error": "El total de puntos debe ser 100 %", "boolean.yes": "S\xED", "boolean.no": "No", "upload.cta": "Arrastra y suelta o haz clic para subir", "upload.imagesOnly": "Solo im\xE1genes", "upload.anyFileType": "Cualquier tipo de archivo", "upload.maxFiles": "M\xE1x. {n} archivos", "upload.maxSize": "M\xE1x. {mb} MB", "upload.tooLarge": "Archivo demasiado grande (m\xE1x. {mb} MB)", "upload.remove": "Eliminar", "select.placeholder": "Selecciona una opci\xF3n", "rating.ariaLabel": "Valoraci\xF3n", "maxDiff.best": "M\xE1s importante", "maxDiff.worst": "Menos importante", "maxDiff.setProgress": "Bloque {k} de {n}", "priority.selectUpTo": "Selecciona hasta", "priority.options": "opciones", "priority.thenOrder": "y luego ord\xE9nalas", "priority.selectOptions": "Seleccionar opciones", "priority.cancel": "Cancelar", "priority.confirm": "Confirmar", "priority.selectOptionNumber": "Selecciona la opci\xF3n #", "priority.prioritized": "Priorizadas", "priority.of": "de", "priority.instruction": 'Tu lista priorizada se muestra abajo. Si deseas, puedes reordenar las opciones con las flechas. Haz clic en "Siguiente" para confirmar y continuar.', "action.send": "Enviar", "action.back": "Atr\xE1s", "action.next": "Siguiente", "action.start": "\xA1Empezar!", "message.success": "\xA1Gracias por tus comentarios!", "message.blocked": "Gracias por tu tiempo, terminamos aqu\xED la conversaci\xF3n.", "message.required": "Por favor, responde antes de continuar.", "message.rateLimit": "Demasiadas solicitudes. Reintentando en {seconds} s..." }, de: { "placeholder.answer": "Schreiben Sie hier Ihre Antwort...", "placeholder.number": "Geben Sie hier Ihre Zahl ein...", "placeholder.email": "Geben Sie hier Ihre E-Mail-Adresse ein...", "placeholder.date": "Geben Sie hier Ihr Datum ein...", "placeholder.password": "Geben Sie hier Ihr Passwort ein...", "pointSystem.error": "Die Gesamtpunktzahl muss 100 % betragen", "boolean.yes": "Ja", "boolean.no": "Nein", "upload.cta": "Ziehen Sie Dateien hierher oder klicken Sie zum Hochladen", "upload.imagesOnly": "Nur Bilder", "upload.anyFileType": "Beliebiger Dateityp", "upload.maxFiles": "Max. {n} Dateien", "upload.maxSize": "Max. {mb} MB", "upload.tooLarge": "Datei ist zu gro\xDF (max. {mb} MB)", "upload.remove": "Entfernen", "select.placeholder": "Option ausw\xE4hlen", "rating.ariaLabel": "Bewertung", "maxDiff.best": "Am wichtigsten", "maxDiff.worst": "Am wenigsten wichtig", "maxDiff.setProgress": "Block {k} von {n}", "priority.selectUpTo": "W\xE4hlen Sie bis zu", "priority.options": "Optionen", "priority.thenOrder": "und ordnen Sie sie dann", "priority.selectOptions": "Optionen ausw\xE4hlen", "priority.cancel": "Abbrechen", "priority.confirm": "Best\xE4tigen", "priority.selectOptionNumber": "W\xE4hlen Sie Option #", "priority.prioritized": "Priorisiert", "priority.of": "von", "priority.instruction": 'Ihre Priorit\xE4tenliste wird unten angezeigt. Wenn Sie m\xF6chten, k\xF6nnen Sie Ihre Auswahl mit den Pfeilen neu anordnen. Klicken Sie auf "Weiter", um Ihre Auswahl zu best\xE4tigen und fortzufahren.', "action.send": "Senden", "action.back": "Zur\xFCck", "action.next": "Weiter", "action.start": "Los!", "message.success": "Vielen Dank f\xFCr Ihr Feedback!", "message.blocked": "Danke f\xFCr Ihre Zeit - wir beenden das Gespr\xE4ch hier.", "message.required": "Bitte antworten Sie, bevor Sie fortfahren.", "message.rateLimit": "Zu viele Anfragen. Erneuter Versuch in {seconds} s..." }, fr: { "placeholder.answer": "\xC9crivez votre r\xE9ponse ici...", "placeholder.number": "\xC9crivez votre nombre ici...", "placeholder.email": "\xC9crivez votre e-mail ici...", "placeholder.date": "\xC9crivez votre date ici...", "placeholder.password": "\xC9crivez votre mot de passe ici...", "pointSystem.error": "Le total des points doit \xEAtre de 100 %", "boolean.yes": "Oui", "boolean.no": "Non", "upload.cta": "Glissez-d\xE9posez ou cliquez pour t\xE9l\xE9verser", "upload.imagesOnly": "Images uniquement", "upload.anyFileType": "Tout type de fichier", "upload.maxFiles": "Max. {n} fichiers", "upload.maxSize": "Max. {mb} Mo", "upload.tooLarge": "Fichier trop volumineux (max. {mb} Mo)", "upload.remove": "Supprimer", "select.placeholder": "S\xE9lectionnez une option", "rating.ariaLabel": "\xC9valuation", "maxDiff.best": "Le plus important", "maxDiff.worst": "Le moins important", "maxDiff.setProgress": "Bloc {k} sur {n}", "priority.selectUpTo": "S\xE9lectionnez jusqu'\xE0", "priority.options": "options", "priority.thenOrder": "puis classez-les", "priority.selectOptions": "S\xE9lectionner des options", "priority.cancel": "Annuler", "priority.confirm": "Confirmer", "priority.selectOptionNumber": "S\xE9lectionnez l'option #", "priority.prioritized": "Prioris\xE9es", "priority.of": "sur", "priority.instruction": `Votre liste de priorit\xE9s est affich\xE9e ci-dessous. Si vous le souhaitez, vous pouvez r\xE9organiser vos choix \xE0 l'aide des fl\xE8ches. Cliquez sur "Suivant" pour confirmer votre s\xE9lection et continuer.`, "action.send": "Envoyer", "action.back": "Retour", "action.next": "Suivant", "action.start": "C'est parti !", "message.success": "Merci pour votre retour !", "message.blocked": "Merci pour votre temps, nous terminons la conversation ici.", "message.required": "Veuillez r\xE9pondre avant de continuer.", "message.rateLimit": "Trop de requ\xEAtes. Nouvelle tentative dans {seconds} s..." }, pt: { "placeholder.answer": "Escreva sua resposta aqui...", "placeholder.number": "Escreva seu n\xFAmero aqui...", "placeholder.email": "Escreva seu e-mail aqui...", "placeholder.date": "Escreva sua data aqui...", "placeholder.password": "Escreva sua senha aqui...", "pointSystem.error": "O total de pontos deve ser 100 %", "boolean.yes": "Sim", "boolean.no": "N\xE3o", "upload.cta": "Arraste e solte ou clique para enviar", "upload.imagesOnly": "Somente imagens", "upload.anyFileType": "Qualquer tipo de arquivo", "upload.maxFiles": "M\xE1x. {n} arquivos", "upload.maxSize": "M\xE1x. {mb} MB", "upload.tooLarge": "Arquivo muito grande (m\xE1x. {mb} MB)", "upload.remove": "Remover", "select.placeholder": "Selecione uma op\xE7\xE3o", "rating.ariaLabel": "Avalia\xE7\xE3o", "maxDiff.best": "Mais importante", "maxDiff.worst": "Menos importante", "maxDiff.setProgress": "Bloco {k} de {n}", "priority.selectUpTo": "Selecione at\xE9", "priority.options": "op\xE7\xF5es", "priority.thenOrder": "e depois ordene-as", "priority.selectOptions": "Selecionar op\xE7\xF5es", "priority.cancel": "Cancelar", "priority.confirm": "Confirmar", "priority.selectOptionNumber": "Selecione a op\xE7\xE3o #", "priority.prioritized": "Priorizadas", "priority.of": "de", "priority.instruction": 'Sua lista de prioridades pode ser vista abaixo. Se quiser, voc\xEA pode reorganizar suas escolhas usando as setas. Clique em "Pr\xF3ximo" para confirmar sua sele\xE7\xE3o e continuar.', "action.send": "Enviar", "action.back": "Voltar", "action.next": "Pr\xF3ximo", "action.start": "Come\xE7ar!", "message.success": "Obrigado pelo seu feedback!", "message.blocked": "Obrigado pelo seu tempo, encerramos a conversa por aqui.", "message.required": "Responda antes de continuar.", "message.rateLimit": "Muitas solicita\xE7\xF5es. Tentando novamente em {seconds} s..." }, da: { "placeholder.answer": "Skriv dit svar her...", "placeholder.number": "Skriv dit nummer her...", "placeholder.email": "Skriv din e-mail her...", "placeholder.date": "Skriv din dato her...", "placeholder.password": "Skriv dit kodeord her...", "pointSystem.error": "Samlet antal point skal v\xE6re 100 %", "boolean.yes": "Ja", "boolean.no": "Nej", "upload.cta": "Tr\xE6k og slip eller klik for at uploade", "upload.imagesOnly": "Kun billeder", "upload.anyFileType": "Enhver filtype", "upload.maxFiles": "Maks. {n} filer", "upload.maxSize": "Maks. {mb} MB", "upload.tooLarge": "Filen er for stor (maks. {mb} MB)", "upload.remove": "Fjern", "select.placeholder": "V\xE6lg en mulighed", "rating.ariaLabel": "Bed\xF8mmelse", "maxDiff.best": "Vigtigst", "maxDiff.worst": "Mindst vigtigt", "maxDiff.setProgress": "Blok {k} af {n}", "priority.selectUpTo": "V\xE6lg op til", "priority.options": "muligheder", "priority.thenOrder": "og sorter dem derefter", "priority.selectOptions": "V\xE6lg muligheder", "priority.cancel": "Annuller", "priority.confirm": "Bekr\xE6ft", "priority.selectOptionNumber": "V\xE6lg mulighed #", "priority.prioritized": "Prioriteret", "priority.of": "af", "priority.instruction": 'Din prioritetsliste vises nedenfor. Hvis du \xF8nsker det, kan du omarrangere dine valg ved hj\xE6lp af pilene. Klik p\xE5 "N\xE6ste" for at bekr\xE6fte dit valg og forts\xE6tte.', "action.send": "Send", "action.back": "Tilbage", "action.next": "N\xE6ste", "action.start": "Start!", "message.success": "Tak for din feedback!", "message.blocked": "Tak for din tid - vi afslutter samtalen her.", "message.required": "Svar venligst, f\xF8r du forts\xE6tter.", "message.rateLimit": "For mange foresp\xF8rgsler. Pr\xF8ver igen om {seconds} s..." }, fi: { "placeholder.answer": "Kirjoita vastauksesi t\xE4h\xE4n...", "placeholder.number": "Kirjoita numerosi t\xE4h\xE4n...", "placeholder.email": "Kirjoita s\xE4hk\xF6postiosoitteesi t\xE4h\xE4n...", "placeholder.date": "Kirjoita p\xE4iv\xE4m\xE4\xE4r\xE4si t\xE4h\xE4n...", "placeholder.password": "Kirjoita salasanasi t\xE4h\xE4n...", "pointSystem.error": "Kokonaispisteiden on oltava 100 %", "boolean.yes": "Kyll\xE4", "boolean.no": "Ei", "upload.cta": "Ved\xE4 ja pudota tai napsauta ladataksesi", "upload.imagesOnly": "Vain kuvat", "upload.anyFileType": "Mik\xE4 tahansa tiedostotyyppi", "upload.maxFiles": "Enint\xE4\xE4n {n} tiedostoa", "upload.maxSize": "Enint\xE4\xE4n {mb} MB", "upload.tooLarge": "Tiedosto on liian suuri (enint\xE4\xE4n {mb} MB)", "upload.remove": "Poista", "select.placeholder": "Valitse vaihtoehto", "rating.ariaLabel": "Arvio", "maxDiff.best": "T\xE4rkein", "maxDiff.worst": "V\xE4hiten t\xE4rke\xE4", "maxDiff.setProgress": "Osa {k}/{n}", "priority.selectUpTo": "Valitse enint\xE4\xE4n", "priority.options": "vaihtoehtoa", "priority.thenOrder": "ja j\xE4rjest\xE4 ne sitten", "priority.selectOptions": "Valitse vaihtoehdot", "priority.cancel": "Peruuta", "priority.confirm": "Vahvista", "priority.selectOptionNumber": "Valitse vaihtoehto #", "priority.prioritized": "Priorisoitu", "priority.of": " / ", "priority.instruction": 'Prioriteettilistasi n\xE4kyy alla. Voit halutessasi j\xE4rjest\xE4\xE4 valinnat uudelleen nuolien avulla. Napsauta "Seuraava" vahvistaaksesi valinnan ja jatkaaksesi.', "action.send": "L\xE4het\xE4", "action.back": "Takaisin", "action.next": "Seuraava", "action.start": "Aloita!", "message.success": "Kiitos palautteestasi!", "message.blocked": "Kiitos ajastasi - lopetamme keskustelun t\xE4h\xE4n.", "message.required": "Vastaa ennen jatkamista.", "message.rateLimit": "Liikaa pyynt\xF6j\xE4. Yritet\xE4\xE4n uudelleen {seconds} s kuluttua..." }, no: { "placeholder.answer": "Skriv svaret ditt her...", "placeholder.number": "Skriv nummeret ditt her...", "placeholder.email": "Skriv e-posten din her...", "placeholder.date": "Skriv datoen din her...", "placeholder.password": "Skriv passordet ditt her...", "pointSystem.error": "Totalt antall poeng m\xE5 v\xE6re 100 %", "boolean.yes": "Ja", "boolean.no": "Nei", "upload.cta": "Dra og slipp eller klikk for \xE5 laste opp", "upload.imagesOnly": "Kun bilder", "upload.anyFileType": "Alle filtyper", "upload.maxFiles": "Maks {n} filer", "upload.maxSize": "Maks {mb} MB", "upload.tooLarge": "Filen er for stor (maks {mb} MB)", "upload.remove": "Fjern", "select.placeholder": "Velg et alternativ", "rating.ariaLabel": "Vurdering", "maxDiff.best": "Viktigst", "maxDiff.worst": "Minst viktig", "maxDiff.setProgress": "Blokk {k} av {n}", "priority.selectUpTo": "Velg opptil", "priority.options": "alternativer", "priority.thenOrder": "og ordne dem deretter", "priority.selectOptions": "Velg alternativer", "priority.cancel": "Avbryt", "priority.confirm": "Bekreft", "priority.selectOptionNumber": "Velg alternativ #", "priority.prioritized": "Prioritert", "priority.of": "av", "priority.instruction": 'Prioriteringslisten din vises nedenfor. Hvis du \xF8nsker det, kan du ordne valgene dine ved hjelp av pilene. Klikk p\xE5 "Neste" for \xE5 bekrefte valget ditt og fortsette.', "action.send": "Send", "action.back": "Tilbake", "action.next": "Neste", "action.start": "Start!", "message.success": "Takk for tilbakemeldingen!", "message.blocked": "Takk for tiden din - vi avslutter samtalen her.", "message.required": "Vennligst svar f\xF8r du fortsetter.", "message.rateLimit": "For mange foresp\xF8rsler. Pr\xF8ver igjen om {seconds} s..." }, sv: { "placeholder.answer": "Skriv ditt svar h\xE4r...", "placeholder.number": "Skriv ditt nummer h\xE4r...", "placeholder.email": "Skriv din e-post h\xE4r...", "placeholder.date": "Skriv ditt datum h\xE4r...", "placeholder.password": "Skriv ditt l\xF6senord h\xE4r...", "pointSystem.error": "Totala po\xE4ng m\xE5ste vara 100 %", "boolean.yes": "Ja", "boolean.no": "Nej", "upload.cta": "Dra och sl\xE4pp eller klicka f\xF6r att ladda upp", "upload.imagesOnly": "Endast bilder", "upload.anyFileType": "Alla filtyper", "upload.maxFiles": "Max {n} filer", "upload.maxSize": "Max {mb} MB", "upload.tooLarge": "Filen \xE4r f\xF6r stor (max {mb} MB)", "upload.remove": "Ta bort", "select.placeholder": "V\xE4lj ett alternativ", "rating.ariaLabel": "Betyg", "maxDiff.best": "Viktigast", "maxDiff.worst": "Minst viktig", "maxDiff.setProgress": "Block {k} av {n}", "priority.selectUpTo": "V\xE4lj upp till", "priority.options": "alternativ", "priority.thenOrder": "och ordna dem sedan", "priority.selectOptions": "V\xE4lj alternativ", "priority.cancel": "Avbryt", "priority.confirm": "Bekr\xE4fta", "priority.selectOptionNumber": "V\xE4lj alternativ #", "priority.prioritized": "Prioriterat", "priority.of": "av", "priority.instruction": 'Din prioriteringslista visas nedan. Om du vill kan du ordna om dina val med hj\xE4lp av pilarna. Klicka p\xE5 "N\xE4sta" f\xF6r att bekr\xE4fta ditt val och forts\xE4tta.', "action.send": "Skicka", "action.back": "Tillbaka", "action.next": "N\xE4sta", "action.start": "K\xF6r!", "message.success": "Tack f\xF6r din feedback!", "message.blocked": "Tack f\xF6r din tid - vi avslutar samtalet h\xE4r.", "message.required": "Svara innan du forts\xE4tter.", "message.rateLimit": "F\xF6r m\xE5nga f\xF6rfr\xE5gningar. F\xF6rs\xF6ker igen om {seconds} s..." }, ar: { "placeholder.answer": "\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0647\u0646\u0627...", "placeholder.number": "\u0627\u0643\u062A\u0628 \u0631\u0642\u0645\u0643 \u0647\u0646\u0627...", "placeholder.email": "\u0627\u0643\u062A\u0628 \u0628\u0631\u064A\u062F\u0643 \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A \u0647\u0646\u0627...", "placeholder.date": "\u0627\u0643\u062A\u0628 \u062A\u0627\u0631\u064A\u062E\u0643 \u0647\u0646\u0627...", "placeholder.password": "\u0627\u0643\u062A\u0628 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0647\u0646\u0627...", "pointSystem.error": "\u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u0646\u0642\u0627\u0637 \u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A\u0629 100 %", "boolean.yes": "\u0646\u0639\u0645", "boolean.no": "\u0644\u0627", "upload.cta": "\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u062D\u0645\u064A\u0644", "upload.imagesOnly": "\u0627\u0644\u0635\u0648\u0631 \u0641\u0642\u0637", "upload.anyFileType": "\u0623\u064A \u0646\u0648\u0639 \u0645\u0646 \u0627\u0644\u0645\u0644\u0641\u0627\u062A", "upload.maxFiles": "{n} \u0645\u0644\u0641\u0627\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649", "upload.maxSize": "{mb} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649", "upload.tooLarge": "\u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 {mb} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A)", "upload.remove": "\u0625\u0632\u0627\u0644\u0629", "select.placeholder": "\u0627\u062E\u062A\u0631 \u062E\u064A\u0627\u0631\u064B\u0627", "rating.ariaLabel": "\u0627\u0644\u062A\u0642\u064A\u064A\u0645", "maxDiff.best": "\u0627\u0644\u0623\u0643\u062B\u0631 \u0623\u0647\u0645\u064A\u0629", "maxDiff.worst": "\u0627\u0644\u0623\u0642\u0644 \u0623\u0647\u0645\u064A\u0629", "maxDiff.setProgress": "\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 {k} \u0645\u0646 {n}", "priority.selectUpTo": "\u0627\u062E\u062A\u0631 \u062D\u062A\u0649", "priority.options": "\u062E\u064A\u0627\u0631\u0627\u062A", "priority.thenOrder": "\u062B\u0645 \u0631\u062A\u0628\u0647\u0627", "priority.selectOptions": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A", "priority.cancel": "\u0625\u0644\u063A\u0627\u0621", "priority.confirm": "\u062A\u0623\u0643\u064A\u062F", "priority.selectOptionNumber": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631 #", "priority.prioritized": "\u062A\u0645 \u0627\u0644\u062A\u0631\u062A\u064A\u0628", "priority.of": "\u0645\u0646", "priority.instruction": '\u062A\u0638\u0647\u0631 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0623\u0648\u0644\u0648\u064A\u0627\u062A \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0623\u062F\u0646\u0627\u0647. \u0625\u0630\u0627 \u0631\u063A\u0628\u062A\u060C \u064A\u0645\u0643\u0646\u0643 \u0625\u0639\u0627\u062F\u0629 \u062A\u0631\u062A\u064A\u0628 \u0627\u062E\u062A\u064A\u0627\u0631\u0627\u062A\u0643 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0623\u0633\u0647\u0645. \u0627\u0646\u0642\u0631 \u0639\u0644\u0649 "\u0627\u0644\u062A\u0627\u0644\u064A" \u0644\u062A\u0623\u0643\u064A\u062F \u0627\u062E\u062A\u064A\u0627\u0631\u0643 \u0648\u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629.', "action.send": "\u0625\u0631\u0633\u0627\u0644", "action.back": "\u0631\u062C\u0648\u0639", "action.next": "\u0627\u0644\u062A\u0627\u0644\u064A", "action.start": "\u0627\u0628\u062F\u0623!", "message.success": "\u0634\u0643\u0631\u064B\u0627 \u0644\u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643!", "message.blocked": "\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0648\u0642\u062A\u0643\u060C \u0633\u0646\u0646\u0647\u064A \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0647\u0646\u0627.", "message.required": "\u064A\u0631\u062C\u0649 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0642\u0628\u0644 \u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629.", "message.rateLimit": "\u0637\u0644\u0628\u0627\u062A \u0643\u062B\u064A\u0631\u0629 \u062C\u062F\u064B\u0627. \u0633\u0646\u0639\u064A\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u062E\u0644\u0627\u0644 {seconds} \u062B\u0627\u0646\u064A\u0629..." }, bn: { "placeholder.answer": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u0989\u09A4\u09CD\u09A4\u09B0 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.number": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09B8\u0982\u0996\u09CD\u09AF\u09BE \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.email": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u0987\u09AE\u09C7\u0987\u09B2 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.date": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09A4\u09BE\u09B0\u09BF\u0996 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.password": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09AA\u09BE\u09B8\u0993\u09AF\u09BC\u09BE\u09B0\u09CD\u09A1 \u09B2\u09BF\u0996\u09C1\u09A8...", "pointSystem.error": "\u09AE\u09CB\u099F \u09AA\u09AF\u09BC\u09C7\u09A8\u09CD\u099F 100 % \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7", "boolean.yes": "\u09B9\u09CD\u09AF\u09BE\u0981", "boolean.no": "\u09A8\u09BE", "upload.cta": "\u099F\u09C7\u09A8\u09C7 \u0986\u09A8\u09C1\u09A8 \u09AC\u09BE \u0986\u09AA\u09B2\u09CB\u09A1 \u0995\u09B0\u09A4\u09C7 \u0995\u09CD\u09B2\u09BF\u0995 \u0995\u09B0\u09C1\u09A8", "upload.imagesOnly": "\u09B6\u09C1\u09A7\u09C1\u09AE\u09BE\u09A4\u09CD\u09B0 \u099B\u09AC\u09BF", "upload.anyFileType": "\u09AF\u09C7\u0995\u09CB\u09A8\u09CB \u09A7\u09B0\u09A8\u09C7\u09B0 \u09AB\u09BE\u0987\u09B2", "upload.maxFiles": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {n}\u099F\u09BF \u09AB\u09BE\u0987\u09B2", "upload.maxSize": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {mb} MB", "upload.tooLarge": "\u09AB\u09BE\u0987\u09B2\u099F\u09BF \u0996\u09C1\u09AC \u09AC\u09A1\u09BC (\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {mb} MB)", "upload.remove": "\u09B8\u09B0\u09BE\u09A8", "select.placeholder": "\u098F\u0995\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "rating.ariaLabel": "\u09B0\u09C7\u099F\u09BF\u0982", "maxDiff.best": "\u09B8\u09AC\u099A\u09C7\u09AF\u09BC\u09C7 \u0997\u09C1\u09B0\u09C1\u09A4\u09CD\u09AC\u09AA\u09C2\u09B0\u09CD\u09A3", "maxDiff.worst": "\u09B8\u09AC\u099A\u09C7\u09AF\u09BC\u09C7 \u0995\u09AE \u0997\u09C1\u09B0\u09C1\u09A4\u09CD\u09AC\u09AA\u09C2\u09B0\u09CD\u09A3", "maxDiff.setProgress": "\u09AC\u09CD\u09B2\u0995 {k}/{n}", "priority.selectUpTo": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.options": "\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA", "priority.thenOrder": "\u09A4\u09BE\u09B0\u09AA\u09B0 \u09B8\u09C7\u0997\u09C1\u09B2\u09CB \u09B8\u09BE\u099C\u09BE\u09A8", "priority.selectOptions": "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.cancel": "\u09AC\u09BE\u09A4\u09BF\u09B2", "priority.confirm": "\u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8", "priority.selectOptionNumber": "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA # \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.prioritized": "\u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0\u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4", "priority.of": "\u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7", "priority.instruction": '\u0986\u09AA\u09A8\u09BE\u09B0 \u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0 \u09A4\u09BE\u09B2\u09BF\u0995\u09BE \u09A8\u09BF\u099A\u09C7 \u09A6\u09C7\u0996\u09BE\u09A8\u09CB \u09B9\u09AF\u09BC\u09C7\u099B\u09C7\u0964 \u099A\u09BE\u0987\u09B2\u09C7 \u09A4\u09C0\u09B0 \u099A\u09BF\u09B9\u09CD\u09A8 \u09AC\u09CD\u09AF\u09AC\u09B9\u09BE\u09B0 \u0995\u09B0\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09AA\u099B\u09A8\u09CD\u09A6\u0997\u09C1\u09B2\u09CB \u09AA\u09C1\u09A8\u09B0\u09BE\u09AF\u09BC \u09B8\u09BE\u099C\u09BE\u09A4\u09C7 \u09AA\u09BE\u09B0\u09C7\u09A8\u0964 "\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0" \u0995\u09CD\u09B2\u09BF\u0995 \u0995\u09B0\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8 \u098F\u09AC\u0982 \u098F\u0997\u09BF\u09AF\u09BC\u09C7 \u09AF\u09BE\u09A8\u0964', "action.send": "\u09AA\u09BE\u09A0\u09BE\u09A8", "action.back": "\u09AA\u09BF\u099B\u09A8\u09C7", "action.next": "\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0", "action.start": "\u09B6\u09C1\u09B0\u09C1 \u0995\u09B0\u09C1\u09A8!", "message.success": "\u0986\u09AA\u09A8\u09BE\u09B0 \u09AE\u09A4\u09BE\u09AE\u09A4\u09C7\u09B0 \u099C\u09A8\u09CD\u09AF \u09A7\u09A8\u09CD\u09AF\u09AC\u09BE\u09A6!", "message.blocked": "\u0986\u09AA\u09A8\u09BE\u09B0 \u09B8\u09AE\u09AF\u09BC\u09C7\u09B0 \u099C\u09A8\u09CD\u09AF \u09A7\u09A8\u09CD\u09AF\u09AC\u09BE\u09A6, \u0986\u09AE\u09B0\u09BE \u098F\u0996\u09BE\u09A8\u09C7\u0987 \u0995\u09A5\u09CB\u09AA\u0995\u09A5\u09A8 \u09B6\u09C7\u09B7 \u0995\u09B0\u099B\u09BF\u0964", "message.required": "\u099A\u09BE\u09B2\u09BF\u09AF\u09BC\u09C7 \u09AF\u09BE\u0993\u09AF\u09BC\u09BE\u09B0 \u0986\u0997\u09C7 \u0985\u09A8\u09C1\u0997\u09CD\u09B0\u09B9 \u0995\u09B0\u09C7 \u0989\u09A4\u09CD\u09A4\u09B0 \u09A6\u09BF\u09A8\u0964", "message.rateLimit": "\u0985\u09A8\u09C7\u0995 \u09AC\u09C7\u09B6\u09BF \u0985\u09A8\u09C1\u09B0\u09CB\u09A7\u0964 {seconds} \u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1\u09C7 \u0986\u09AC\u09BE\u09B0 \u099A\u09C7\u09B7\u09CD\u099F\u09BE \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7..." }, it: { "boolean.yes": "S\xEC", "boolean.no": "No", "priority.selectUpTo": "Seleziona fino a", "priority.options": "opzioni", "priority.thenOrder": "e poi ordinali", "priority.selectOptions": "Seleziona opzioni", "priority.cancel": "Annulla", "priority.confirm": "Conferma", "priority.selectOptionNumber": "Seleziona opzione #", "priority.prioritized": "Prioritizzate", "priority.of": "di", "priority.instruction": 'La tua lista di priorit\xE0 \xE8 mostrata qui sotto. Se vuoi, puoi riordinare le tue scelte usando le frecce. Clicca su "Avanti" per confermare la selezione e continuare.' }, nl: { "boolean.yes": "Ja", "boolean.no": "Nee", "priority.selectUpTo": "Selecteer tot", "priority.options": "opties", "priority.thenOrder": "en rangschik ze vervolgens", "priority.selectOptions": "Selecteer opties", "priority.cancel": "Annuleren", "priority.confirm": "Bevestigen", "priority.selectOptionNumber": "Selecteer optie #", "priority.prioritized": "Geprioriteerd", "priority.of": "van", "priority.instruction": 'Je prioriteitenlijst wordt hieronder weergegeven. Als je wilt, kun je je keuzes herschikken met behulp van de pijlen. Klik op "Volgende" om je selectie te bevestigen en door te gaan.' }, pl: { "boolean.yes": "Tak", "boolean.no": "Nie", "priority.selectUpTo": "Wybierz do", "priority.options": "opcje", "priority.thenOrder": "a nast\u0119pnie je uporz\u0105dkuj", "priority.selectOptions": "Wybierz opcje", "priority.cancel": "Anuluj", "priority.confirm": "Potwierd\u017A", "priority.selectOptionNumber": "Wybierz opcj\u0119 #", "priority.prioritized": "Priorytetowe", "priority.of": "z", "priority.instruction": 'Twoja lista priorytet\xF3w jest pokazana poni\u017Cej. Je\u015Bli chcesz, mo\u017Cesz zmieni\u0107 kolejno\u015B\u0107 swoich wybor\xF3w za pomoc\u0105 strza\u0142ek. Kliknij "Dalej", aby potwierdzi\u0107 wyb\xF3r i kontynuowa\u0107.' }, ru: { "boolean.yes": "\u0414\u0430", "boolean.no": "\u041D\u0435\u0442", "priority.selectUpTo": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043E", "priority.options": "\u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432", "priority.thenOrder": "\u0430 \u0437\u0430\u0442\u0435\u043C \u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u044C\u0442\u0435 \u0438\u0445", "priority.selectOptions": "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B", "priority.cancel": "\u041E\u0442\u043C\u0435\u043D\u0430", "priority.confirm": "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C", "priority.selectOptionNumber": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 #", "priority.prioritized": "\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u044B", "priority.of": "\u0438\u0437", "priority.instruction": '\u0412\u0430\u0448 \u0441\u043F\u0438\u0441\u043E\u043A \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u043E\u0432 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043D\u0438\u0436\u0435. \u0415\u0441\u043B\u0438 \u0445\u043E\u0442\u0438\u0442\u0435, \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0440\u044F\u0434\u043E\u043A \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0441\u0442\u0440\u0435\u043B\u043E\u043A. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 "\u0414\u0430\u043B\u0435\u0435", \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u044B\u0431\u043E\u0440 \u0438 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C.' }, ja: { "boolean.yes": "\u306F\u3044", "boolean.no": "\u3044\u3044\u3048", "priority.selectUpTo": "\u6700\u5927", "priority.options": "\u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", "priority.thenOrder": "\u305D\u306E\u5F8C\u4E26\u3079\u66FF\u3048\u3066\u304F\u3060\u3055\u3044", "priority.selectOptions": "\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", "priority.cancel": "\u30AD\u30E3\u30F3\u30BB\u30EB", "priority.confirm": "\u78BA\u8A8D", "priority.selectOptionNumber": "\u30AA\u30D7\u30B7\u30E7\u30F3 # \u3092\u9078\u629E", "priority.prioritized": "\u512A\u5148\u9806\u4F4D", "priority.of": "\u306E\u3046\u3061", "priority.instruction": "\u512A\u5148\u9806\u4F4D\u30EA\u30B9\u30C8\u306F\u4EE5\u4E0B\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u3001\u77E2\u5370\u3092\u4F7F\u3063\u3066\u9078\u629E\u80A2\u3092\u4E26\u3079\u66FF\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u300C\u6B21\u3078\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u9078\u629E\u3092\u78BA\u5B9A\u3057\u3001\u7D9A\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002" }, zh: { "boolean.yes": "\u662F", "boolean.no": "\u4E0D", "priority.selectUpTo": "\u6700\u591A\u9009\u62E9", "priority.options": "\u4E2A\u9009\u9879", "priority.thenOrder": "\u7136\u540E\u6392\u5E8F\u5B83\u4EEC", "priority.selectOptions": "\u9009\u62E9\u9009\u9879", "priority.cancel": "\u53D6\u6D88", "priority.confirm": "\u786E\u8BA4", "priority.selectOptionNumber": "\u9009\u62E9\u9009\u9879 #", "priority.prioritized": "\u5DF2\u4F18\u5148", "priority.of": "\u5171", "priority.instruction": "\u4F60\u7684\u4F18\u5148\u5217\u8868\u5982\u4E0B\u6240\u793A\u3002\u5982\u6709\u9700\u8981\uFF0C\u53EF\u4EE5\u4F7F\u7528\u7BAD\u5934\u91CD\u65B0\u6392\u5E8F\u9009\u9879\u3002\u70B9\u51FB\u201C\u4E0B\u4E00\u6B65\u201D\u786E\u8BA4\u9009\u62E9\u5E76\u7EE7\u7EED\u3002" }, ko: { "boolean.yes": "\uC608", "boolean.no": "\uC544\uB2C8", "priority.selectUpTo": "\uCD5C\uB300", "priority.options": "\uAC1C\uC758 \uC635\uC158 \uC120\uD0DD", "priority.thenOrder": "\uADF8\uB7F0 \uB2E4\uC74C \uC815\uB82C\uD558\uC138\uC694", "priority.selectOptions": "\uC635\uC158 \uC120\uD0DD", "priority.cancel": "\uCDE8\uC18C", "priority.confirm": "\uD655\uC778", "priority.selectOptionNumber": "\uC635\uC158 # \uC120\uD0DD", "priority.prioritized": "\uC6B0\uC120\uC21C\uC704", "priority.of": "\uC911", "priority.instruction": '\uC6B0\uC120\uC21C\uC704 \uBAA9\uB85D\uC740 \uC544\uB798\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4. \uC6D0\uD55C\uB2E4\uBA74 \uD654\uC0B4\uD45C\uB97C \uC0AC\uC6A9\uD574 \uC120\uD0DD \uD56D\uBAA9\uC744 \uC7AC\uC815\uB82C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. "\uB2E4\uC74C"\uC744 \uD074\uB9AD\uD558\uC5EC \uC120\uD0DD\uC744 \uD655\uC778\uD558\uACE0 \uACC4\uC18D\uD558\uC138\uC694.' } };
|
|
5131
|
+
t2.SUPPORTED_LANGUAGES = ["en", "da", "fi", "no", "es", "sv", "ar", "bn", "de", "pt", "fr"], t2.AVAILABLE_LANGUAGES = Object.keys(n), t2.RTL_LANGUAGES = ["ar"];
|
|
5132
|
+
const r = { nb: "no", nn: "no", nob: "no", nno: "no", iw: "he", in: "id", cmn: "zh" };
|
|
4669
5133
|
function o(e3) {
|
|
4670
5134
|
if (!e3) return null;
|
|
4671
5135
|
const t3 = e3.trim().toLowerCase().replace(/_/g, "-");
|
|
4672
5136
|
if (!t3) return null;
|
|
4673
|
-
if (
|
|
4674
|
-
const i2 = t3.split("-")[0], o2 =
|
|
4675
|
-
return
|
|
5137
|
+
if (n[t3]) return t3;
|
|
5138
|
+
const i2 = t3.split("-")[0], o2 = r[i2] || i2;
|
|
5139
|
+
return n[o2] ? o2 : null;
|
|
4676
5140
|
}
|
|
4677
5141
|
function a(e3) {
|
|
4678
5142
|
return o(e3) || "en";
|
|
4679
5143
|
}
|
|
4680
5144
|
t2.normalizeLanguage = a, t2.TRANSLATION_KEYS = Object.keys(i), t2.hasOwnTranslation = function(e3, t3) {
|
|
4681
5145
|
const i2 = o(e3);
|
|
4682
|
-
return !!i2 && void 0 !==
|
|
5146
|
+
return !!i2 && void 0 !== n[i2][t3];
|
|
4683
5147
|
}, t2.isRtlLanguage = function(e3) {
|
|
4684
5148
|
return -1 !== t2.RTL_LANGUAGES.indexOf(a(e3));
|
|
4685
5149
|
}, t2.isLanguageSupported = function(e3) {
|
|
4686
5150
|
const i2 = o(e3);
|
|
4687
5151
|
return !!i2 && -1 !== t2.SUPPORTED_LANGUAGES.indexOf(i2);
|
|
4688
|
-
}, t2.t = function(e3, t3,
|
|
4689
|
-
const o2 =
|
|
4690
|
-
return
|
|
5152
|
+
}, t2.t = function(e3, t3, r2) {
|
|
5153
|
+
const o2 = n[a(e3)] || i, s = void 0 !== o2[t3] ? o2[t3] : i[t3];
|
|
5154
|
+
return r2 ? (function(e4, t4) {
|
|
4691
5155
|
return Object.keys(t4).reduce(((e5, i2) => e5.replace(new RegExp("\\{" + i2 + "\\}", "g"), String(t4[i2]))), e4);
|
|
4692
|
-
})(s,
|
|
5156
|
+
})(s, r2) : s;
|
|
4693
5157
|
};
|
|
4694
|
-
},
|
|
5158
|
+
}, 1347: (e2, t2) => {
|
|
4695
5159
|
"use strict";
|
|
4696
5160
|
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" } };
|
|
4697
|
-
},
|
|
5161
|
+
}, 9930: (e2, t2, i) => {
|
|
4698
5162
|
"use strict";
|
|
4699
5163
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.placeholder = void 0;
|
|
4700
|
-
const
|
|
4701
|
-
t2.placeholder = { answer: (e3) => (0,
|
|
4702
|
-
},
|
|
5164
|
+
const n = i(7031);
|
|
5165
|
+
t2.placeholder = { answer: (e3) => (0, n.t)(e3, "placeholder.answer"), number: (e3) => (0, n.t)(e3, "placeholder.number"), email: (e3) => (0, n.t)(e3, "placeholder.email"), date: (e3) => (0, n.t)(e3, "placeholder.date"), password: (e3) => (0, n.t)(e3, "placeholder.password"), pointsystemerror: (e3) => (0, n.t)(e3, "pointSystem.error"), upload: { cta: (e3) => (0, n.t)(e3, "upload.cta"), formats: (e3, t3) => (0, n.t)(e3, "image" === t3 ? "upload.imagesOnly" : "upload.anyFileType"), maxFiles: (e3, t3) => (0, n.t)(e3, "upload.maxFiles", { n: t3 }), maxSize: (e3, t3) => (0, n.t)(e3, "upload.maxSize", { mb: t3 }), tooLarge: (e3, t3) => (0, n.t)(e3, "upload.tooLarge", { mb: t3 }), remove: (e3) => (0, n.t)(e3, "upload.remove") } };
|
|
5166
|
+
}, 3903: (e2, t2, i) => {
|
|
4703
5167
|
"use strict";
|
|
4704
5168
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderStartMessage = t2.renderSuccess = t2.renderError = t2.renderActions = t2.renderQuestions = void 0;
|
|
4705
|
-
const
|
|
4706
|
-
t2.renderQuestions = function e3(t3, i2 = "standard",
|
|
5169
|
+
const n = i(1140), r = i(7156), o = i(6658), a = i(6029), s = i(2139), l = { small: "1rem", medium: "1.2rem", large: "1.5rem" };
|
|
5170
|
+
t2.renderQuestions = function e3(t3, i2 = "standard", d = "en", c = { customIcons: false }, u) {
|
|
4707
5171
|
if (!t3) throw new Error("[MagicFeedback] No questions provided");
|
|
4708
|
-
const
|
|
4709
|
-
return t3.forEach(((
|
|
4710
|
-
var
|
|
4711
|
-
if ((null === (
|
|
5172
|
+
const p = [], { customIcons: m, id: h } = c;
|
|
5173
|
+
return t3.forEach(((f) => {
|
|
5174
|
+
var g, y;
|
|
5175
|
+
if ((null === (y = null === (g = null == f ? void 0 : f.questionType) || void 0 === g ? void 0 : g.conf) || void 0 === y ? void 0 : y.length) > 0) {
|
|
4712
5176
|
let t4 = document.createElement("div");
|
|
4713
5177
|
t4.classList.add("magicfeedback-div");
|
|
4714
|
-
const
|
|
4715
|
-
|
|
4716
|
-
e4.ref =
|
|
4717
|
-
})), e3(
|
|
5178
|
+
const n2 = document.createElement("label");
|
|
5179
|
+
n2.setAttribute("for", `magicfeedback-${f.id}`), n2.textContent = (0, o.parseTitle)(f.title, d), n2.classList.add("magicfeedback-label"), t4.appendChild(n2), f.questionType.conf.forEach(((e4) => {
|
|
5180
|
+
e4.ref = f.ref, f.assets[e4.id] && (e4.assets = { placeholder: f.assets[e4.id] });
|
|
5181
|
+
})), e3(f.questionType.conf, i2, d, c, u).forEach(((e4) => {
|
|
4718
5182
|
t4.appendChild(e4);
|
|
4719
|
-
})),
|
|
5183
|
+
})), p.push(t4);
|
|
4720
5184
|
} else {
|
|
4721
|
-
const e4 = (function(e5, t4, i3,
|
|
4722
|
-
var
|
|
4723
|
-
let
|
|
4724
|
-
|
|
4725
|
-
const
|
|
4726
|
-
if (!
|
|
5185
|
+
const e4 = (function(e5, t4, i3, d2, c2, u2) {
|
|
5186
|
+
var p2, m2, h2;
|
|
5187
|
+
let f2, g2, { id: y2, title: v, type: b, ref: E, require: A, defaultValue: k, assets: T } = e5, C = document.createElement("div");
|
|
5188
|
+
C.classList.add("magicfeedback-div");
|
|
5189
|
+
const x = window.innerWidth < 600, P = "slim" === t4 ? (0, o.parseTitle)(v, i3) : null == T ? void 0 : T.placeholder, L = (0, a.shownValueFor)(e5, (0, o.getUrlParam)(E)), S = (null == T ? void 0 : T.maxCharacters) || 0, w = false === (null == T ? void 0 : T.autoAdvance) ? void 0 : c2, O = void 0 !== (null == T ? void 0 : T.randomPosition) && (null == T ? void 0 : T.randomPosition), N = (null == T ? void 0 : T.direction) || "row", I = (null == T ? void 0 : T.order) || "ltr", D = (0, r.getQuestionRenderer)(b);
|
|
5190
|
+
if (!D) return C;
|
|
4727
5191
|
{
|
|
4728
|
-
const r2 =
|
|
4729
|
-
|
|
5192
|
+
const r2 = D({ question: e5, format: t4, language: i3, url: d2, send: b === n.FEEDBACKAPPANSWERTYPE.TEXT ? c2 : w, isPhone: x, urlParamValue: L, placeholderText: P, maxCharacters: S, randomPosition: O, direction: N, order: I, productId: u2 });
|
|
5193
|
+
f2 = r2.element, g2 = r2.elementTypeClass;
|
|
4730
5194
|
}
|
|
4731
|
-
|
|
4732
|
-
const
|
|
4733
|
-
|
|
5195
|
+
f2.id = `magicfeedback-${y2}`, f2.setAttribute("name", E), f2.classList.add(g2), (void 0 !== k || null !== L) && (f2.value = L || k), ["RADIO", "MULTIPLECHOICE", "UPLOAD_IMAGE", "UPLOAD_FILE"].includes(b) || (f2.classList.add("magicfeedback-input"), f2.required = A);
|
|
5196
|
+
const R = document.createElement("label");
|
|
5197
|
+
R.setAttribute("for", `magicfeedback-${y2}`), R.textContent = (0, o.parseTitle)(v, i3), R.classList.add("magicfeedback-label"), (function(e6, t5) {
|
|
4734
5198
|
if ("INFO_PAGE" !== t5.type) return;
|
|
4735
|
-
const { assets: i4 } = t5,
|
|
4736
|
-
if (e7) return
|
|
4737
|
-
})(null == i4 ? void 0 : i4.titleSize),
|
|
4738
|
-
var
|
|
4739
|
-
|
|
4740
|
-
})(
|
|
4741
|
-
const
|
|
4742
|
-
if (
|
|
5199
|
+
const { assets: i4 } = t5, n2 = (function(e7) {
|
|
5200
|
+
if (e7) return l[e7] || e7;
|
|
5201
|
+
})(null == i4 ? void 0 : i4.titleSize), r2 = (o2 = null == i4 ? void 0 : i4.titleStyle, Array.isArray(o2) ? o2 : o2 ? [o2] : []);
|
|
5202
|
+
var o2;
|
|
5203
|
+
n2 && e6.style.setProperty("font-size", n2, "important"), (null == i4 ? void 0 : i4.titleAlign) && (e6.style.setProperty("width", "100%", "important"), e6.style.setProperty("align-self", "stretch", "important"), e6.style.setProperty("text-align", i4.titleAlign, "important")), r2.includes("italic") && e6.style.setProperty("font-style", "italic", "important"), r2.includes("bold") && e6.style.setProperty("font-weight", "bold", "important"), r2.includes("underline") && e6.style.setProperty("text-decoration", "underline", "important");
|
|
5204
|
+
})(R, e5);
|
|
5205
|
+
const M = document.createElement("label");
|
|
5206
|
+
if (M.textContent = (0, o.parseTitle)(null == T ? void 0 : T.subtitle, i3), M.classList.add("magicfeedback-sublabel"), (null === (p2 = null == T ? void 0 : T.subtitleStyle) || void 0 === p2 ? void 0 : p2.includes("italic")) && (M.style.fontStyle = "italic"), (null === (m2 = null == T ? void 0 : T.subtitleStyle) || void 0 === m2 ? void 0 : m2.includes("bold")) && (M.style.fontWeight = "bold"), (null === (h2 = null == T ? void 0 : T.subtitleStyle) || void 0 === h2 ? void 0 : h2.includes("underline")) && (M.style.textDecoration = "underline"), ["CONSENT"].includes(b)) C.classList.add("magicfeedback-consent-container"), C.appendChild(f2), C.appendChild(R), (null == T ? void 0 : T.subtitle) && C.appendChild(M);
|
|
4743
5207
|
else {
|
|
4744
|
-
if ("slim" !== t4 && (
|
|
5208
|
+
if ("slim" !== t4 && (C.appendChild(R), (null == T ? void 0 : T.subtitle) && C.appendChild(M), void 0 !== (null == T ? void 0 : T.general) && "" !== (null == T ? void 0 : T.general))) {
|
|
4745
5209
|
const e6 = document.createElement("img");
|
|
4746
|
-
e6.src = null ==
|
|
5210
|
+
e6.src = null == T ? void 0 : T.general, e6.classList.add("magicfeedback-image"), e6.style.maxWidth = "auto", e6.style.height = "400px", e6.style.margin = "10px 0", C.appendChild(e6);
|
|
4747
5211
|
}
|
|
4748
|
-
if ("LONGTEXT" ===
|
|
5212
|
+
if ("LONGTEXT" === b && S > 0) {
|
|
4749
5213
|
const e6 = document.createElement("div");
|
|
4750
|
-
if (e6.classList.add("magicfeedback-counter"), e6.textContent = `${
|
|
4751
|
-
e6.textContent = `${
|
|
4752
|
-
})),
|
|
5214
|
+
if (e6.classList.add("magicfeedback-counter"), e6.textContent = `${f2.value.length}/${S}`, e6.style.textAlign = "end", e6.style.fontSize = "15px", e6.style.marginTop = "5px", f2.addEventListener("input", (() => {
|
|
5215
|
+
e6.textContent = `${f2.value.length}/${S}`;
|
|
5216
|
+
})), C.appendChild(f2), C.appendChild(e6), (null == T ? void 0 : T.extraOption) && (null == T ? void 0 : T.extraOptionText)) {
|
|
4753
5217
|
const e7 = document.createElement("div");
|
|
4754
5218
|
e7.classList.add("magicfeedback-skip-container"), e7.classList.add("magicfeedback-checkbox-container"), e7.style.display = "flex", e7.style.justifyContent = "flex-start";
|
|
4755
5219
|
const t5 = document.createElement("input");
|
|
4756
|
-
t5.classList.add("magicfeedback-skip"), t5.type = "checkbox", t5.id = `skip-${
|
|
5220
|
+
t5.classList.add("magicfeedback-skip"), t5.type = "checkbox", t5.id = `skip-${E}`, t5.name = E, t5.value = "-", t5.style.cursor = "pointer";
|
|
4757
5221
|
const i4 = document.createElement("label");
|
|
4758
|
-
i4.htmlFor = `skip-${
|
|
4759
|
-
|
|
4760
|
-
})), e7.appendChild(t5), e7.appendChild(i4),
|
|
5222
|
+
i4.htmlFor = `skip-${E}`, i4.textContent = null == T ? void 0 : T.extraOptionText, i4.style.fontSize = "15px", i4.style.cursor = "pointer", i4.style.margin = "0 5px", t5.addEventListener("click", (() => {
|
|
5223
|
+
f2.value = "-";
|
|
5224
|
+
})), (0, s.autoAdvanceOn)(t5, w, "click"), e7.appendChild(t5), e7.appendChild(i4), C.appendChild(e7);
|
|
4761
5225
|
}
|
|
4762
|
-
} else
|
|
5226
|
+
} else C.appendChild(f2);
|
|
4763
5227
|
}
|
|
4764
|
-
return
|
|
4765
|
-
})(
|
|
4766
|
-
|
|
5228
|
+
return C;
|
|
5229
|
+
})(f, i2, d, "https://survey-dev.magicfeedback.io/assets/emojis" + (m ? `/${h}` : ""), 1 === t3.length ? u : void 0, h);
|
|
5230
|
+
p.push(e4);
|
|
4767
5231
|
}
|
|
4768
|
-
})),
|
|
4769
|
-
}, t2.renderActions = function(e3 = "", t3, i2 = "Submit",
|
|
5232
|
+
})), p;
|
|
5233
|
+
}, t2.renderActions = function(e3 = "", t3, i2 = "Submit", n2 = "Back", r2 = "Next") {
|
|
4770
5234
|
const o2 = document.createElement("div");
|
|
4771
5235
|
o2.classList.add("magicfeedback-action-container");
|
|
4772
|
-
const
|
|
4773
|
-
|
|
4774
|
-
const
|
|
4775
|
-
return
|
|
4776
|
-
|
|
4777
|
-
})), "MAGICSURVEY" === e3 && o2.appendChild(
|
|
5236
|
+
const a2 = document.createElement("button");
|
|
5237
|
+
a2.id = "magicfeedback-submit", a2.type = "submit", a2.classList.add("magicfeedback-submit"), a2.textContent = "MAGICSURVEY" === e3 ? r2 || "Next" : i2 || "Submit";
|
|
5238
|
+
const s2 = document.createElement("button");
|
|
5239
|
+
return s2.id = "magicfeedback-back", s2.type = "button", s2.classList.add("magicfeedback-back"), s2.textContent = n2 || "Back", s2.addEventListener("click", t3), s2.addEventListener("click", (() => {
|
|
5240
|
+
a2.removeAttribute("disabled");
|
|
5241
|
+
})), "MAGICSURVEY" === e3 && o2.appendChild(s2), o2.appendChild(a2), o2;
|
|
4778
5242
|
}, t2.renderError = function(e3) {
|
|
4779
5243
|
const t3 = document.createElement("div");
|
|
4780
5244
|
return t3.classList.add("magicfeedback-error"), t3.textContent = e3, t3;
|
|
4781
5245
|
}, t2.renderSuccess = function(e3) {
|
|
4782
5246
|
const t3 = document.createElement("div");
|
|
4783
5247
|
return t3.classList.add("magicfeedback-success"), t3.textContent = e3, t3;
|
|
4784
|
-
}, t2.renderStartMessage = function(e3, t3 = false, i2 = "Go!",
|
|
5248
|
+
}, t2.renderStartMessage = function(e3, t3 = false, i2 = "Go!", n2 = () => {
|
|
4785
5249
|
}) {
|
|
4786
|
-
const
|
|
4787
|
-
|
|
5250
|
+
const r2 = document.createElement("div");
|
|
5251
|
+
r2.classList.add("magicfeedback-start-message-container");
|
|
4788
5252
|
const o2 = document.createElement("div");
|
|
4789
|
-
if (o2.classList.add("magicfeedback-start-message"), o2.innerHTML = e3,
|
|
5253
|
+
if (o2.classList.add("magicfeedback-start-message"), o2.innerHTML = e3, r2.appendChild(o2), t3) {
|
|
4790
5254
|
const e4 = document.createElement("button");
|
|
4791
|
-
e4.id = "magicfeedback-start-message-button", e4.classList.add("magicfeedback-start-message-button"), e4.textContent = i2, e4.addEventListener("click", (() =>
|
|
5255
|
+
e4.id = "magicfeedback-start-message-button", e4.classList.add("magicfeedback-start-message-button"), e4.textContent = i2, e4.addEventListener("click", (() => n2())), r2.appendChild(e4);
|
|
4792
5256
|
}
|
|
4793
|
-
return
|
|
5257
|
+
return r2;
|
|
4794
5258
|
};
|
|
4795
|
-
},
|
|
5259
|
+
}, 6891: function(e2, t2, i) {
|
|
4796
5260
|
"use strict";
|
|
4797
|
-
var
|
|
4798
|
-
return new (i2 || (i2 = Promise))((function(
|
|
5261
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
5262
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
4799
5263
|
function a2(e4) {
|
|
4800
5264
|
try {
|
|
4801
|
-
|
|
5265
|
+
l2(n2.next(e4));
|
|
4802
5266
|
} catch (e5) {
|
|
4803
5267
|
o2(e5);
|
|
4804
5268
|
}
|
|
4805
5269
|
}
|
|
4806
5270
|
function s2(e4) {
|
|
4807
5271
|
try {
|
|
4808
|
-
|
|
5272
|
+
l2(n2.throw(e4));
|
|
4809
5273
|
} catch (e5) {
|
|
4810
5274
|
o2(e5);
|
|
4811
5275
|
}
|
|
4812
5276
|
}
|
|
4813
|
-
function
|
|
5277
|
+
function l2(e4) {
|
|
4814
5278
|
var t4;
|
|
4815
|
-
e4.done ?
|
|
5279
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
4816
5280
|
e5(t4);
|
|
4817
5281
|
}))).then(a2, s2);
|
|
4818
5282
|
}
|
|
4819
|
-
|
|
5283
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
4820
5284
|
}));
|
|
4821
|
-
},
|
|
5285
|
+
}, r = this && this.__importDefault || function(e3) {
|
|
4822
5286
|
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
4823
5287
|
};
|
|
4824
5288
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.getFollowUpQuestion = t2.sendFeedback = t2.getQuestions = t2.getSessionForm = t2.getForm = t2.validateEmail = t2.header = void 0;
|
|
4825
|
-
const o =
|
|
5289
|
+
const o = r(i(6911)), a = r(i(8330)), s = i(1347), l = i(6029);
|
|
4826
5290
|
t2.header = { Accept: "application/json", "Magicfeedback-Sdk-Version": a.default.version, "x-magicfeedback-parameters": window.location.search || "" }, t2.validateEmail = function(e3) {
|
|
4827
5291
|
return /\S+@\S+\.\S+/.test(e3);
|
|
4828
|
-
}, t2.getForm = function(e3, i2,
|
|
4829
|
-
return
|
|
5292
|
+
}, t2.getForm = function(e3, i2, r2, a2, d) {
|
|
5293
|
+
return n(this, void 0, void 0, (function* () {
|
|
4830
5294
|
try {
|
|
4831
|
-
const
|
|
4832
|
-
return yield
|
|
5295
|
+
const n2 = yield (0, o.default)((0, l.withLangParam)(e3 + s.endpoints.sdk.app_info(i2, r2), d), { method: "GET", headers: t2.header });
|
|
5296
|
+
return yield n2.json();
|
|
4833
5297
|
} catch (e4) {
|
|
4834
5298
|
a2.err(e4);
|
|
4835
5299
|
}
|
|
4836
5300
|
}));
|
|
4837
|
-
}, t2.getSessionForm = function(e3, i2,
|
|
4838
|
-
return
|
|
5301
|
+
}, t2.getSessionForm = function(e3, i2, r2, a2) {
|
|
5302
|
+
return n(this, void 0, void 0, (function* () {
|
|
4839
5303
|
try {
|
|
4840
|
-
const
|
|
4841
|
-
return yield
|
|
5304
|
+
const n2 = yield (0, o.default)((0, l.withLangParam)(e3 + s.endpoints.sdk.session(i2), a2), { method: "GET", headers: t2.header });
|
|
5305
|
+
return yield n2.json();
|
|
4842
5306
|
} catch (e4) {
|
|
4843
|
-
|
|
5307
|
+
r2.err(e4);
|
|
4844
5308
|
}
|
|
4845
5309
|
}));
|
|
4846
|
-
}, t2.getQuestions = function(e3, i2,
|
|
4847
|
-
return
|
|
5310
|
+
}, t2.getQuestions = function(e3, i2, r2, a2, d) {
|
|
5311
|
+
return n(this, void 0, void 0, (function* () {
|
|
4848
5312
|
try {
|
|
4849
|
-
const
|
|
4850
|
-
if (
|
|
4851
|
-
const e4 = yield
|
|
5313
|
+
const n2 = yield (0, o.default)((0, l.withLangParam)(e3 + s.endpoints.sdk.app(i2, r2), d), { method: "GET", headers: t2.header });
|
|
5314
|
+
if (n2.ok) {
|
|
5315
|
+
const e4 = yield n2.json();
|
|
4852
5316
|
return a2.log(`Received questions for app ${i2}`, e4), e4;
|
|
4853
5317
|
}
|
|
4854
|
-
throw a2.err(`Failed to get questions for app ${i2}:`,
|
|
5318
|
+
throw a2.err(`Failed to get questions for app ${i2}:`, n2.status, n2.statusText), new Error("[MagicFeedback] Bad response from server");
|
|
4855
5319
|
} catch (e4) {
|
|
4856
5320
|
return a2.err(e4), [];
|
|
4857
5321
|
}
|
|
4858
5322
|
}));
|
|
4859
|
-
}, t2.sendFeedback = function(e3, i2,
|
|
4860
|
-
return
|
|
5323
|
+
}, t2.sendFeedback = function(e3, i2, r2) {
|
|
5324
|
+
return n(this, void 0, void 0, (function* () {
|
|
4861
5325
|
try {
|
|
4862
|
-
const
|
|
4863
|
-
if (
|
|
4864
|
-
throw
|
|
5326
|
+
const n2 = yield (0, o.default)(e3 + s.endpoints.sdk.feedback, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, t2.header), body: JSON.stringify(i2) });
|
|
5327
|
+
if (n2.ok) return r2.log(`Form ${i2.integration} submitted successfully!`), (yield n2.json()).sessionId;
|
|
5328
|
+
throw r2.err(`Failed to submit form ${i2.integration}:`, n2.status, n2.statusText), new Error(n2.statusText);
|
|
4865
5329
|
} catch (e4) {
|
|
4866
|
-
return
|
|
5330
|
+
return r2.err(e4), "";
|
|
4867
5331
|
}
|
|
4868
5332
|
}));
|
|
4869
|
-
}, t2.getFollowUpQuestion = function(e3, i2,
|
|
4870
|
-
return
|
|
5333
|
+
}, t2.getFollowUpQuestion = function(e3, i2, r2) {
|
|
5334
|
+
return n(this, void 0, void 0, (function* () {
|
|
4871
5335
|
try {
|
|
4872
|
-
const
|
|
4873
|
-
if (
|
|
4874
|
-
throw
|
|
5336
|
+
const n2 = yield (0, o.default)(e3 + s.endpoints.sdk.followUpQuestion, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, t2.header), body: JSON.stringify(i2) });
|
|
5337
|
+
if (n2.ok) return r2.log(`Received follow up question for form ${i2.integration}`), (yield n2.json()) || "";
|
|
5338
|
+
throw r2.err(`Failed to get follow up question for form ${i2.integration}:`, n2.status, n2.statusText), new Error(n2.statusText);
|
|
4875
5339
|
} catch (e4) {
|
|
4876
|
-
return
|
|
5340
|
+
return r2.err(e4), "";
|
|
5341
|
+
}
|
|
5342
|
+
}));
|
|
5343
|
+
};
|
|
5344
|
+
}, 6029: (e2, t2, i) => {
|
|
5345
|
+
"use strict";
|
|
5346
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.toBaseAnswers = t2.shownValueFor = t2.baseValueMap = t2.withLangParam = t2.detectSurveyLang = t2.normalizeSurveyLang = void 0;
|
|
5347
|
+
const n = i(1140), r = { nb: "no", nn: "no", nob: "no", nno: "no" };
|
|
5348
|
+
function o(e3) {
|
|
5349
|
+
if (!e3 || "string" != typeof e3) return null;
|
|
5350
|
+
const t3 = e3.trim().toLowerCase().replace(/_/g, "-").split("-")[0];
|
|
5351
|
+
return /^[a-z]{2,3}$/.test(t3) ? r[t3] || t3 : null;
|
|
5352
|
+
}
|
|
5353
|
+
function a(e3) {
|
|
5354
|
+
if (null == e3) return null;
|
|
5355
|
+
if ("string" == typeof e3 && e3.trim().startsWith("{")) try {
|
|
5356
|
+
e3 = JSON.parse(e3);
|
|
5357
|
+
} catch (t3) {
|
|
5358
|
+
return e3;
|
|
5359
|
+
}
|
|
5360
|
+
return "object" == typeof e3 ? void 0 !== e3.value ? String(e3.value) : null : String(e3);
|
|
5361
|
+
}
|
|
5362
|
+
function s(e3) {
|
|
5363
|
+
const t3 = /* @__PURE__ */ new Map(), i2 = null == e3 ? void 0 : e3.value, n2 = null == e3 ? void 0 : e3.baseValue;
|
|
5364
|
+
return Array.isArray(i2) && Array.isArray(n2) ? (i2.forEach(((e4, i3) => {
|
|
5365
|
+
const r2 = a(e4), o2 = a(n2[i3]);
|
|
5366
|
+
null === r2 || null === o2 || t3.has(r2) || t3.set(r2, o2);
|
|
5367
|
+
})), t3) : t3;
|
|
5368
|
+
}
|
|
5369
|
+
t2.normalizeSurveyLang = o, t2.detectSurveyLang = function(e3) {
|
|
5370
|
+
return o(e3) || (function() {
|
|
5371
|
+
if ("undefined" == typeof navigator) return null;
|
|
5372
|
+
const e4 = [...Array.isArray(navigator.languages) ? navigator.languages : [], navigator.language];
|
|
5373
|
+
for (const t3 of e4) {
|
|
5374
|
+
const e5 = o(t3);
|
|
5375
|
+
if (e5) return e5;
|
|
5376
|
+
}
|
|
5377
|
+
return null;
|
|
5378
|
+
})();
|
|
5379
|
+
}, t2.withLangParam = function(e3, t3) {
|
|
5380
|
+
return t3 ? `${e3}${e3.includes("?") ? "&" : "?"}lang=${encodeURIComponent(t3)}` : e3;
|
|
5381
|
+
}, t2.baseValueMap = s, t2.shownValueFor = function(e3, t3) {
|
|
5382
|
+
var i2, n2;
|
|
5383
|
+
if (null === t3 || !Array.isArray(null == e3 ? void 0 : e3.baseValue)) return t3;
|
|
5384
|
+
const r2 = e3.baseValue.findIndex(((e4) => a(e4) === t3));
|
|
5385
|
+
return -1 === r2 ? t3 : null !== (n2 = a(null === (i2 = e3.value) || void 0 === i2 ? void 0 : i2[r2])) && void 0 !== n2 ? n2 : t3;
|
|
5386
|
+
};
|
|
5387
|
+
const l = [n.FEEDBACKAPPANSWERTYPE.RADIO, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE, n.FEEDBACKAPPANSWERTYPE.SELECT];
|
|
5388
|
+
t2.toBaseAnswers = function(e3, t3) {
|
|
5389
|
+
return e3.map(((e4) => {
|
|
5390
|
+
if (e4.key.startsWith("extra-option-")) return e4;
|
|
5391
|
+
const i2 = t3.find(((t4) => t4.ref === e4.key)) || t3.find(((t4) => e4.key.includes(t4.ref)));
|
|
5392
|
+
if (!i2) return e4;
|
|
5393
|
+
const r2 = s(i2);
|
|
5394
|
+
if (0 === r2.size) return e4;
|
|
5395
|
+
let o2;
|
|
5396
|
+
if (l.includes(i2.type)) o2 = (e5) => {
|
|
5397
|
+
var t4;
|
|
5398
|
+
return "string" == typeof e5 && null !== (t4 = r2.get(e5)) && void 0 !== t4 ? t4 : e5;
|
|
5399
|
+
};
|
|
5400
|
+
else if (i2.type === n.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST) o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
|
|
5401
|
+
var i3, n2;
|
|
5402
|
+
const r3 = /^(\d+)\.\s?(.*)$/.exec(e6);
|
|
5403
|
+
if (!r3) return null !== (i3 = t4.get(e6)) && void 0 !== i3 ? i3 : e6;
|
|
5404
|
+
const o3 = r3[2];
|
|
5405
|
+
return `${r3[1]}. ${null !== (n2 = t4.get(o3)) && void 0 !== n2 ? n2 : o3}`;
|
|
5406
|
+
})(e5, r2) : e5;
|
|
5407
|
+
else if (i2.type === n.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM) o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
|
|
5408
|
+
var i3;
|
|
5409
|
+
const n2 = e6.lastIndexOf(":");
|
|
5410
|
+
if (-1 === n2) return e6;
|
|
5411
|
+
const r3 = e6.substring(0, n2);
|
|
5412
|
+
return `${null !== (i3 = t4.get(r3)) && void 0 !== i3 ? i3 : r3}${e6.substring(n2)}`;
|
|
5413
|
+
})(e5, r2) : e5;
|
|
5414
|
+
else if (i2.type === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
|
|
5415
|
+
try {
|
|
5416
|
+
const i3 = JSON.parse(e6);
|
|
5417
|
+
return Array.isArray(i3) ? JSON.stringify(i3.map(((e7) => Object.assign(Object.assign({}, e7), { value: Array.isArray(null == e7 ? void 0 : e7.value) ? e7.value.map(((e8) => {
|
|
5418
|
+
var i4;
|
|
5419
|
+
return null !== (i4 = t4.get(e8)) && void 0 !== i4 ? i4 : e8;
|
|
5420
|
+
})) : null == e7 ? void 0 : e7.value })))) : e6;
|
|
5421
|
+
} catch (t5) {
|
|
5422
|
+
return e6;
|
|
5423
|
+
}
|
|
5424
|
+
})(e5, r2) : e5;
|
|
5425
|
+
else {
|
|
5426
|
+
if (i2.type !== n.FEEDBACKAPPANSWERTYPE.MAX_DIFF) return e4;
|
|
5427
|
+
o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
|
|
5428
|
+
try {
|
|
5429
|
+
const i3 = JSON.parse(e6);
|
|
5430
|
+
if (!Array.isArray(i3)) return e6;
|
|
5431
|
+
const n2 = (e7) => {
|
|
5432
|
+
var i4;
|
|
5433
|
+
return "string" == typeof e7 && null !== (i4 = t4.get(e7)) && void 0 !== i4 ? i4 : e7;
|
|
5434
|
+
};
|
|
5435
|
+
return JSON.stringify(i3.map(((e7) => Object.assign(Object.assign({}, e7), { shown: Array.isArray(null == e7 ? void 0 : e7.shown) ? e7.shown.map(n2) : null == e7 ? void 0 : e7.shown, best: n2(null == e7 ? void 0 : e7.best), worst: n2(null == e7 ? void 0 : e7.worst) }))));
|
|
5436
|
+
} catch (t5) {
|
|
5437
|
+
return e6;
|
|
5438
|
+
}
|
|
5439
|
+
})(e5, r2) : e5;
|
|
4877
5440
|
}
|
|
5441
|
+
return Object.assign(Object.assign({}, e4), { value: e4.value.map(o2) });
|
|
4878
5442
|
}));
|
|
4879
5443
|
};
|
|
4880
|
-
},
|
|
5444
|
+
}, 2139: (e2, t2) => {
|
|
5445
|
+
"use strict";
|
|
5446
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.cancelAutoAdvance = t2.autoAdvanceOn = t2.scheduleAutoAdvance = t2.AUTO_ADVANCE_DELAY_MS = void 0, t2.AUTO_ADVANCE_DELAY_MS = 300;
|
|
5447
|
+
const i = /* @__PURE__ */ new Map();
|
|
5448
|
+
function n(e3, n2) {
|
|
5449
|
+
const r = i.get(n2);
|
|
5450
|
+
r && clearTimeout(r.timer);
|
|
5451
|
+
const o = setTimeout((() => {
|
|
5452
|
+
i.delete(n2), e3.isConnected && n2();
|
|
5453
|
+
}), t2.AUTO_ADVANCE_DELAY_MS);
|
|
5454
|
+
i.set(n2, { timer: o, source: e3 });
|
|
5455
|
+
}
|
|
5456
|
+
t2.scheduleAutoAdvance = n, t2.autoAdvanceOn = function(e3, t3, i2 = "change") {
|
|
5457
|
+
t3 && e3.addEventListener(i2, (() => n(e3, t3)));
|
|
5458
|
+
}, t2.cancelAutoAdvance = function(e3) {
|
|
5459
|
+
e3 && i.forEach((({ timer: t3, source: n2 }, r) => {
|
|
5460
|
+
e3.contains(n2) && (clearTimeout(t3), i.delete(r));
|
|
5461
|
+
}));
|
|
5462
|
+
};
|
|
5463
|
+
}, 9033: (e2, t2) => {
|
|
5464
|
+
"use strict";
|
|
5465
|
+
function i(e3) {
|
|
5466
|
+
if (!e3) return null;
|
|
5467
|
+
const i2 = e3.querySelector(".magicfeedback-div");
|
|
5468
|
+
if (!i2) return null;
|
|
5469
|
+
const n = i2.querySelector('input:not([type="hidden"]), textarea, select, button');
|
|
5470
|
+
if (!n) return null;
|
|
5471
|
+
const r = n;
|
|
5472
|
+
return r.disabled || r.readOnly ? null : "TEXTAREA" === n.tagName || "INPUT" === n.tagName && t2.AUTOFOCUS_INPUT_TYPES.includes(n.type) ? r : null;
|
|
5473
|
+
}
|
|
5474
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.focusFirstTextQuestion = t2.findAutofocusTarget = t2.AUTOFOCUS_INPUT_TYPES = void 0, t2.AUTOFOCUS_INPUT_TYPES = ["text", "email", "number", "tel", "url", "search"], t2.findAutofocusTarget = i, t2.focusFirstTextQuestion = function(e3) {
|
|
5475
|
+
var t3, n;
|
|
5476
|
+
if (!e3) return false;
|
|
5477
|
+
const r = i(e3);
|
|
5478
|
+
if (!r) return false;
|
|
5479
|
+
const o = null === (t3 = e3.ownerDocument) || void 0 === t3 ? void 0 : t3.activeElement;
|
|
5480
|
+
if (o && !e3.contains(o) && (function(e4) {
|
|
5481
|
+
const t4 = e4.tagName;
|
|
5482
|
+
return "INPUT" === t4 || "TEXTAREA" === t4 || "SELECT" === t4 || true === e4.isContentEditable;
|
|
5483
|
+
})(o)) return false;
|
|
5484
|
+
try {
|
|
5485
|
+
r.focus({ preventScroll: true });
|
|
5486
|
+
} catch (e4) {
|
|
5487
|
+
r.focus();
|
|
5488
|
+
}
|
|
5489
|
+
return (null === (n = e3.ownerDocument) || void 0 === n ? void 0 : n.activeElement) === r;
|
|
5490
|
+
};
|
|
5491
|
+
}, 93: (e2, t2) => {
|
|
5492
|
+
"use strict";
|
|
5493
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.armGhostTapGuard = t2.GHOST_TAP_GUARD_MS = void 0, t2.GHOST_TAP_GUARD_MS = 400;
|
|
5494
|
+
const i = /* @__PURE__ */ new WeakMap();
|
|
5495
|
+
t2.armGhostTapGuard = function(e3) {
|
|
5496
|
+
e3 && (i.has(e3) || e3.addEventListener("click", ((r) => {
|
|
5497
|
+
var o;
|
|
5498
|
+
0 !== r.detail && (n() - (null !== (o = i.get(e3)) && void 0 !== o ? o : -1 / 0) >= t2.GHOST_TAP_GUARD_MS || (r.preventDefault(), r.stopPropagation()));
|
|
5499
|
+
}), true), i.set(e3, n()));
|
|
5500
|
+
};
|
|
5501
|
+
const n = () => "undefined" != typeof performance ? performance.now() : Date.now();
|
|
5502
|
+
}, 1874: (e2, t2) => {
|
|
4881
5503
|
"use strict";
|
|
4882
5504
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Log = void 0, t2.Log = class {
|
|
4883
5505
|
constructor(e3) {
|
|
@@ -4890,15 +5512,15 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4890
5512
|
console.error("[MagicFeedback]:", ...e3);
|
|
4891
5513
|
}
|
|
4892
5514
|
};
|
|
4893
|
-
},
|
|
5515
|
+
}, 8330: (e2) => {
|
|
4894
5516
|
"use strict";
|
|
4895
|
-
e2.exports = JSON.parse('{"name":"@magicfeedback/native","version":"2.2.
|
|
4896
|
-
} }, t = {}, (function i(
|
|
4897
|
-
var
|
|
4898
|
-
if (void 0 !==
|
|
4899
|
-
var o = t[
|
|
4900
|
-
return e[
|
|
4901
|
-
})(
|
|
5517
|
+
e2.exports = JSON.parse('{"name":"@magicfeedback/native","version":"2.2.31","main":"./dist/magicfeedback-sdk.node.js","browser":"./dist/magicfeedback-sdk.browser.js","types":"./dist/types/src/index.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/MagicFeedback/magicfeedback-sdk.git"},"author":"farias@magicfeedback.io","license":"MIT","private":false,"scripts":{"dev":"vite","build":"webpack","build:watch":"webpack --watch --mode development","release":"npm publish --access public","release:beta":"npm publish --access public --tag beta","release:alpha":"npm publish --access public --tag alpha","test":"jest","test:watch":"jest --watchAll","coverage":"jest --coverage","publish:sdk":"bash publish.sh","publish:sdk:dry-run":"NPM_DRY_RUN=1 bash publish.sh"},"files":["dist"],"devDependencies":{"@babel/preset-typescript":"^7.22.5","@types/node":"^17.0.21","@types/webpack":"^5.28.0","@types/webpack-node-externals":"^2.5.3","c8":"^7.11.0","copy-webpack-plugin":"^11.0.0","jest":"^29.5.0","jest-environment-jsdom":"^29.5.0","jest-fetch-mock":"^3.0.3","nock":"^13.2.4","ts-jest":"^29.1.0","ts-loader":"^9.2.7","ts-node":"^10.7.0","typescript":"^4.6.2","vite":"^2.8.0","vite-plugin-dts":"^0.9.9","webpack":"^5.70.0","webpack-cli":"^4.9.2","webpack-node-externals":"^3.0.0"},"dependencies":{"cross-fetch":"^3.1.5","is-bundling-for-browser-or-node":"^1.1.1"},"description":"MagicFeedbackAI JavaScript Library for [MagicFeedback.io](https://magicfeedback.io/)","bugs":{"url":"https://github.com/MagicFeedback/magicfeedback-sdk/issues"},"homepage":"https://github.com/MagicFeedback/magicfeedback-sdk#readme","directories":{"example":"examples","test":"test"},"style":"./dist/styles/magicfeedback-default.css"}');
|
|
5518
|
+
} }, t = {}, (function i(n) {
|
|
5519
|
+
var r = t[n];
|
|
5520
|
+
if (void 0 !== r) return r.exports;
|
|
5521
|
+
var o = t[n] = { exports: {} };
|
|
5522
|
+
return e[n].call(o.exports, o, o.exports, i), o.exports;
|
|
5523
|
+
})(2474).default;
|
|
4902
5524
|
var e, t;
|
|
4903
5525
|
}));
|
|
4904
5526
|
}
|
|
@@ -5009,6 +5631,9 @@ function ensureFontFace(family, url) {
|
|
|
5009
5631
|
}
|
|
5010
5632
|
if (el.textContent !== css) el.textContent = css;
|
|
5011
5633
|
}
|
|
5634
|
+
function hasFinePointer() {
|
|
5635
|
+
return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(pointer: fine)").matches;
|
|
5636
|
+
}
|
|
5012
5637
|
async function renderPopup(container, surveyId, productId, actions, emit, onClose, env = "production", userId, style, sessionId, miniService, analyticsFeedbackSessionId, options) {
|
|
5013
5638
|
let surveyCompletedEmitted = false;
|
|
5014
5639
|
let stylesInjected = false;
|
|
@@ -5439,6 +6064,13 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5439
6064
|
if (pos.padding) container.style.padding = pos.padding;
|
|
5440
6065
|
let revealed = false;
|
|
5441
6066
|
let revealTimer = null;
|
|
6067
|
+
let surveyLoaded = false;
|
|
6068
|
+
let openFocusDone = false;
|
|
6069
|
+
function autofocusOnOpen() {
|
|
6070
|
+
if (openFocusDone || !revealed || !surveyLoaded) return;
|
|
6071
|
+
openFocusDone = true;
|
|
6072
|
+
if (hasFinePointer()) formInstance?.focusFirstQuestion?.();
|
|
6073
|
+
}
|
|
5442
6074
|
function reveal() {
|
|
5443
6075
|
if (revealed) return;
|
|
5444
6076
|
revealed = true;
|
|
@@ -5449,6 +6081,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5449
6081
|
if (!container.contains(popup)) return;
|
|
5450
6082
|
container.style.visibility = "visible";
|
|
5451
6083
|
container.style.pointerEvents = "";
|
|
6084
|
+
autofocusOnOpen();
|
|
5452
6085
|
}
|
|
5453
6086
|
function revealWhenPainted2() {
|
|
5454
6087
|
if (revealed) return;
|
|
@@ -5498,10 +6131,18 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5498
6131
|
// La pantalla final la pinta el popup: `renderSuccess` de @magicfeedback/native usa
|
|
5499
6132
|
// textContent, así que el mensaje de la plataforma (HTML con imagen) no se vería, y
|
|
5500
6133
|
// su fallback es un literal genérico que ignora `style.successMessage`.
|
|
5501
|
-
addSuccessScreen: false
|
|
6134
|
+
addSuccessScreen: false,
|
|
6135
|
+
// Surveys multi-idioma: native pide a la API este idioma (el del init o el del
|
|
6136
|
+
// dispositivo) y, si el survey no lo tiene, la API sirve el idioma por defecto.
|
|
6137
|
+
lang: options?.language,
|
|
6138
|
+
// Foco en la primera pregunta de escribir tras Start, Siguiente o Atrás. Native lo
|
|
6139
|
+
// aplica después de afterSubmitEvent/onBackEvent, cuando `setLoading(false)` ya ha
|
|
6140
|
+
// quitado el `inert`. La apertura va aparte (ver autofocusOnOpen).
|
|
6141
|
+
autofocus: "navigation"
|
|
5502
6142
|
};
|
|
5503
|
-
generateOptions.onLoadedEvent = ({ formData }) => {
|
|
5504
|
-
const
|
|
6143
|
+
generateOptions.onLoadedEvent = ({ formData, lang }) => {
|
|
6144
|
+
const shownLang = typeof lang === "string" && lang.trim().length > 0 ? lang : void 0;
|
|
6145
|
+
const surveyLang = shownLang ?? (Array.isArray(formData?.lang) ? formData.lang.find((l) => typeof l === "string" && l.trim().length > 0) : void 0);
|
|
5505
6146
|
if (surveyLang) applyLabels(surveyLang);
|
|
5506
6147
|
try {
|
|
5507
6148
|
} catch {
|
|
@@ -5552,12 +6193,14 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5552
6193
|
updateButtons("in_progress_first");
|
|
5553
6194
|
}
|
|
5554
6195
|
updateProgress({ progress: formInstance.progress, total: formInstance.total });
|
|
5555
|
-
emit("popup_clicked", surveyId, { action: "loaded" });
|
|
5556
6196
|
setLoading(false);
|
|
6197
|
+
if (!surveyLoaded) {
|
|
6198
|
+
surveyLoaded = true;
|
|
6199
|
+
autofocusOnOpen();
|
|
6200
|
+
}
|
|
5557
6201
|
};
|
|
5558
6202
|
generateOptions.beforeSubmitEvent = () => {
|
|
5559
6203
|
setLoading(true);
|
|
5560
|
-
emit("popup_clicked", surveyId, { action: "before_submit" });
|
|
5561
6204
|
};
|
|
5562
6205
|
generateOptions.afterSubmitEvent = ({ error, completed, total, progress, followup }) => {
|
|
5563
6206
|
const errText = error ? typeof error === "string" ? error : error.message ?? String(error) : "";
|
|
@@ -5566,13 +6209,12 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5566
6209
|
if (errText.toLowerCase().includes("no response")) {
|
|
5567
6210
|
errorHint.textContent = labels.errorRequired;
|
|
5568
6211
|
errorHint.style.display = "block";
|
|
5569
|
-
emit("popup_clicked", surveyId, { action: "validation_error_required" });
|
|
5570
6212
|
updateNavButtons();
|
|
5571
6213
|
return;
|
|
5572
6214
|
}
|
|
5573
6215
|
errorHint.textContent = labels.errorSubmit;
|
|
5574
6216
|
errorHint.style.display = "block";
|
|
5575
|
-
|
|
6217
|
+
sdkWarn("[Deepdots] survey submit error:", errText);
|
|
5576
6218
|
return;
|
|
5577
6219
|
}
|
|
5578
6220
|
errorHint.style.display = "none";
|
|
@@ -5591,7 +6233,6 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5591
6233
|
updateProgress({ progress, total, followup });
|
|
5592
6234
|
};
|
|
5593
6235
|
generateOptions.onBackEvent = ({ progress, error, followup }) => {
|
|
5594
|
-
emit("popup_clicked", surveyId, { action: "back" });
|
|
5595
6236
|
if (!error) pageDepth = Math.max(0, pageDepth - 1);
|
|
5596
6237
|
updateNavButtons();
|
|
5597
6238
|
updateProgress({ progress, total: formInstance.total, followup });
|
|
@@ -5900,7 +6541,7 @@ function trimmedOrNull(value) {
|
|
|
5900
6541
|
}
|
|
5901
6542
|
function buildSurveyHtml(opts) {
|
|
5902
6543
|
const env = opts.env === "development" ? "dev" : "prod";
|
|
5903
|
-
const version = opts.version ?? "2.2.
|
|
6544
|
+
const version = opts.version ?? "2.2.31";
|
|
5904
6545
|
const cdn = `https://cdn.jsdelivr.net/npm/@magicfeedback/native@${version}/dist/magicfeedback-sdk.browser.js`;
|
|
5905
6546
|
const sid = jsonForScript(opts.surveyId);
|
|
5906
6547
|
const pid = jsonForScript(opts.productId);
|
|
@@ -6238,11 +6879,25 @@ ${customCss}
|
|
|
6238
6879
|
${PRIMARY_COLOR_JS}
|
|
6239
6880
|
${BUSY_JS}
|
|
6240
6881
|
${REVEAL_JS}
|
|
6882
|
+
// Foco en la primera pregunta si es de escribir. Al navegar lo pone @magicfeedback/native
|
|
6883
|
+
// (autofocus:'navigation'); la apertura la decide el popup, que es quien sabe cu\xE1ndo se revela.
|
|
6884
|
+
// Necesita el popup revelado y el survey cargado, que llegan en cualquier orden, y solo con
|
|
6885
|
+
// rat\xF3n o trackpad: en t\xE1ctil sacar\xEDa el teclado sin que el usuario haya tocado nada.
|
|
6886
|
+
var ddRevealed=false, ddSurveyLoaded=false, ddOpenFocusDone=false;
|
|
6887
|
+
function ddAutofocusOnOpen(){
|
|
6888
|
+
if(ddOpenFocusDone || !ddRevealed || !ddSurveyLoaded){ return; }
|
|
6889
|
+
ddOpenFocusDone=true;
|
|
6890
|
+
var fine=typeof window.matchMedia==='function' && window.matchMedia('(pointer: fine)').matches;
|
|
6891
|
+
var f=window.DeepdotsForm;
|
|
6892
|
+
if(fine && f && typeof f.focusFirstQuestion==='function'){ f.focusFirstQuestion(); }
|
|
6893
|
+
}
|
|
6241
6894
|
// El popup se ense\xF1a cuando el survey est\xE1 pintado; \`ready\` deja al host abrir su propio
|
|
6242
6895
|
// Modal en ese momento en vez de montar un WebView en blanco.
|
|
6243
6896
|
var ddReveal=ddCreateReveal(popup, function(){
|
|
6244
6897
|
document.body.classList.add('dd-ready');
|
|
6245
6898
|
emitJSON('ready');
|
|
6899
|
+
ddRevealed=true;
|
|
6900
|
+
ddAutofocusOnOpen();
|
|
6246
6901
|
}, ${REVEAL_TIMEOUT_MS});
|
|
6247
6902
|
|
|
6248
6903
|
function setLoading(isLoading){
|
|
@@ -6280,10 +6935,18 @@ ${REVEAL_JS}
|
|
|
6280
6935
|
// textContent, as\xED que el mensaje de la plataforma (HTML con imagen) no se ver\xEDa, y su
|
|
6281
6936
|
// fallback es un literal gen\xE9rico que ignora style.successMessage.
|
|
6282
6937
|
addSuccessScreen:false,
|
|
6938
|
+
// Surveys multi-idioma: native pide a la API este idioma (el del init o el del
|
|
6939
|
+
// dispositivo); si el survey no lo tiene, la API sirve el idioma por defecto.
|
|
6940
|
+
lang:${initLangJson}||undefined,
|
|
6941
|
+
// Foco en la primera pregunta de escribir tras Start, Siguiente o Atr\xE1s. Las versiones
|
|
6942
|
+
// de native sin esta opci\xF3n la ignoran.
|
|
6943
|
+
autofocus:'navigation',
|
|
6283
6944
|
onLoadedEvent:function(args){
|
|
6284
|
-
// Idioma
|
|
6285
|
-
// ingl\xE9s delante de un survey traducido.
|
|
6286
|
-
|
|
6945
|
+
// Idioma en el que native muestra el survey: manda sobre el del init para que el
|
|
6946
|
+
// chrome no se quede en ingl\xE9s delante de un survey traducido. Native < 2.3 no lo
|
|
6947
|
+
// env\xEDa: entonces el primero de formData.lang (el idioma por defecto).
|
|
6948
|
+
var shown=args && typeof args.lang==='string' && args.lang.trim() ? args.lang : null;
|
|
6949
|
+
var langs=shown ? [shown] : (args && args.formData ? args.formData.lang : null);
|
|
6287
6950
|
if(langs && langs.length){
|
|
6288
6951
|
for(var li=0;li<langs.length;li++){
|
|
6289
6952
|
if(typeof langs[li]==='string' && langs[li].trim()){ ddApplyLabels(langs[li]); break; }
|
|
@@ -6337,6 +7000,8 @@ ${REVEAL_JS}
|
|
|
6337
7000
|
updateProgress({ progress:form.progress, total:form.total, completed:false, followup:false });
|
|
6338
7001
|
emitJSON('loaded');
|
|
6339
7002
|
setLoading(false);
|
|
7003
|
+
// La primera carga es la apertura; las siguientes (tras Start) las enfoca native.
|
|
7004
|
+
if(!ddSurveyLoaded){ ddSurveyLoaded=true; ddAutofocusOnOpen(); }
|
|
6340
7005
|
},
|
|
6341
7006
|
beforeSubmitEvent:function(){
|
|
6342
7007
|
setLoading(true);
|
|
@@ -6489,6 +7154,7 @@ var ReactNativePopupRenderer = class {
|
|
|
6489
7154
|
this.emitReady(surveyId);
|
|
6490
7155
|
break;
|
|
6491
7156
|
case "loaded":
|
|
7157
|
+
break;
|
|
6492
7158
|
case "before_submit":
|
|
6493
7159
|
case "after_submit":
|
|
6494
7160
|
case "back":
|
|
@@ -6867,7 +7533,7 @@ async function safeBodyText(res) {
|
|
|
6867
7533
|
}
|
|
6868
7534
|
}
|
|
6869
7535
|
function createFeedbackSink(options) {
|
|
6870
|
-
let feedbackSessionId;
|
|
7536
|
+
let feedbackSessionId = options.initialSessionId || void 0;
|
|
6871
7537
|
let firstPostInFlight = null;
|
|
6872
7538
|
let generation = 0;
|
|
6873
7539
|
const url = `${options.baseUrl}/sdk/feedback`;
|
|
@@ -6960,6 +7626,50 @@ function createFeedbackSink(options) {
|
|
|
6960
7626
|
};
|
|
6961
7627
|
}
|
|
6962
7628
|
|
|
7629
|
+
// src/analytics/suspended-session.ts
|
|
7630
|
+
var SUSPENDED_SESSION_KEY = "deepdots.analytics.suspended";
|
|
7631
|
+
function getSessionStorage() {
|
|
7632
|
+
try {
|
|
7633
|
+
return typeof window !== "undefined" && window.sessionStorage ? window.sessionStorage : null;
|
|
7634
|
+
} catch {
|
|
7635
|
+
return null;
|
|
7636
|
+
}
|
|
7637
|
+
}
|
|
7638
|
+
function writeSuspendedSession(storage, session) {
|
|
7639
|
+
try {
|
|
7640
|
+
storage.setItem(SUSPENDED_SESSION_KEY, JSON.stringify(session));
|
|
7641
|
+
return true;
|
|
7642
|
+
} catch {
|
|
7643
|
+
return false;
|
|
7644
|
+
}
|
|
7645
|
+
}
|
|
7646
|
+
function clearSuspendedSession(storage) {
|
|
7647
|
+
try {
|
|
7648
|
+
storage.removeItem(SUSPENDED_SESSION_KEY);
|
|
7649
|
+
} catch {
|
|
7650
|
+
}
|
|
7651
|
+
}
|
|
7652
|
+
function takeSuspendedSession(storage, match, now, windowMs) {
|
|
7653
|
+
let raw = null;
|
|
7654
|
+
try {
|
|
7655
|
+
raw = storage.getItem(SUSPENDED_SESSION_KEY);
|
|
7656
|
+
} catch {
|
|
7657
|
+
return null;
|
|
7658
|
+
}
|
|
7659
|
+
if (!raw) return null;
|
|
7660
|
+
clearSuspendedSession(storage);
|
|
7661
|
+
try {
|
|
7662
|
+
const s = JSON.parse(raw);
|
|
7663
|
+
if (typeof s.sessionId !== "string" || !s.sessionId) return null;
|
|
7664
|
+
if (typeof s.at !== "number" || now - s.at < 0 || now - s.at > windowMs) return null;
|
|
7665
|
+
if (s.integration !== match.integration) return null;
|
|
7666
|
+
if ((s.userId ?? null) !== match.userId) return null;
|
|
7667
|
+
return { sessionId: s.sessionId, integration: s.integration, userId: s.userId ?? null, at: s.at };
|
|
7668
|
+
} catch {
|
|
7669
|
+
return null;
|
|
7670
|
+
}
|
|
7671
|
+
}
|
|
7672
|
+
|
|
6963
7673
|
// src/tracking/navigation-observer.ts
|
|
6964
7674
|
var UUID_PREFIX = /^[0-9a-f]{8}-[0-9a-f]{4}-/i;
|
|
6965
7675
|
function screenPath(href) {
|
|
@@ -7558,8 +8268,10 @@ var ANALYTICS_HEARTBEAT_MS = 5 * 6e4;
|
|
|
7558
8268
|
var ANALYTICS_SESSION_TIMEOUT_MS = 30 * 6e4;
|
|
7559
8269
|
var ANALYTICS_SERVER_IDLE_MS = 60 * 6e4;
|
|
7560
8270
|
var ANALYTICS_SESSION_DISCARD_MS = ANALYTICS_SERVER_IDLE_MS - 10 * 6e4;
|
|
8271
|
+
var ANALYTICS_RESUME_WINDOW_MS = 6e4;
|
|
7561
8272
|
var RESERVED_EVENT_PREFIX = "deepdots_";
|
|
7562
8273
|
var CUSTOM_EVENT_PREFIX = "deepdots_event_";
|
|
8274
|
+
var MAX_PENDING_TRIGGERS = 20;
|
|
7563
8275
|
var DeepdotsPopups = class {
|
|
7564
8276
|
constructor() {
|
|
7565
8277
|
this.config = null;
|
|
@@ -7573,6 +8285,14 @@ var DeepdotsPopups = class {
|
|
|
7573
8285
|
// deprecated: mantenido para compatibilidad interna
|
|
7574
8286
|
this.popupDefinitions = [];
|
|
7575
8287
|
this.popupsLoaded = false;
|
|
8288
|
+
/**
|
|
8289
|
+
* `true` mientras el `GET /sdk/{apiKey}/popups` de `init()` está en vuelo. En esa ventana los
|
|
8290
|
+
* disparos del host (`triggerEvent`, `triggerSurvey`) no tienen contra qué evaluarse, así que
|
|
8291
|
+
* se guardan en `pendingTriggers` y se reproducen al cargar. Click, scroll, time y exit no
|
|
8292
|
+
* hacen falta: son listeners que `autoLaunch` instala ya con las definiciones cargadas.
|
|
8293
|
+
*/
|
|
8294
|
+
this.awaitingPopups = false;
|
|
8295
|
+
this.pendingTriggers = [];
|
|
7576
8296
|
this.pendingAutoLaunch = false;
|
|
7577
8297
|
// Estado que alimenta las reglas de redisplay. Copia de trabajo en memoria; la fuente
|
|
7578
8298
|
// duradera es el storage (`popup-state-store`), rehidratada en `init()` — sin eso, una
|
|
@@ -7627,6 +8347,13 @@ var DeepdotsPopups = class {
|
|
|
7627
8347
|
this.lastEngagementAt = 0;
|
|
7628
8348
|
/** Cuándo se ocultó la pestaña por última vez (ms epoch); null si está visible. */
|
|
7629
8349
|
this.hiddenAt = null;
|
|
8350
|
+
/**
|
|
8351
|
+
* Sesión suspendida por un `pagehide` (ms epoch y `deepdots_user_id`); null si no hay.
|
|
8352
|
+
* `openSession` la reanuda si sigue a tiempo (ver ANALYTICS_RESUME_WINDOW_MS).
|
|
8353
|
+
*/
|
|
8354
|
+
this.suspended = null;
|
|
8355
|
+
/** Integración de analytics del init: la sesión suspendida solo la hereda la misma. */
|
|
8356
|
+
this.analyticsIntegration = void 0;
|
|
7630
8357
|
/**
|
|
7631
8358
|
* Idioma resuelto en init() (explícito > navigator.language > Intl). Única fuente de
|
|
7632
8359
|
* verdad para el context de analytics Y para la segmentación por idioma de los popups.
|
|
@@ -7686,10 +8413,17 @@ var DeepdotsPopups = class {
|
|
|
7686
8413
|
}
|
|
7687
8414
|
}
|
|
7688
8415
|
this.log("tracking \xB7 user_id:", this.tracking.getUserId(), "\xB7 new_user:", this.tracking.isNewUser(), "\xB7 enabled:", this.tracking.isTrackingEnabled());
|
|
8416
|
+
this.analyticsIntegration = config.analytics?.integration;
|
|
8417
|
+
const resumable = this.readResumableSession();
|
|
8418
|
+
if (resumable) {
|
|
8419
|
+
this.analyticsFeedbackSessionId = resumable.sessionId;
|
|
8420
|
+
this.suspended = { at: resumable.at, userId: resumable.userId };
|
|
8421
|
+
}
|
|
7689
8422
|
const analyticsSink = config.analytics ? createFeedbackSink({
|
|
7690
8423
|
baseUrl: this.baseUrl,
|
|
7691
8424
|
keys: config.analytics,
|
|
7692
8425
|
log: (...a) => this.log(...a),
|
|
8426
|
+
initialSessionId: resumable?.sessionId,
|
|
7693
8427
|
onSessionId: (id) => {
|
|
7694
8428
|
this.analyticsFeedbackSessionId = id;
|
|
7695
8429
|
this.notifyFeedbackSession(id, "open");
|
|
@@ -7739,6 +8473,9 @@ var DeepdotsPopups = class {
|
|
|
7739
8473
|
this.engagement = new EngagementTracker();
|
|
7740
8474
|
this.setupAnalyticsFlush();
|
|
7741
8475
|
this.openSession();
|
|
8476
|
+
if (resumable && this.analyticsFeedbackSessionId === resumable.sessionId) {
|
|
8477
|
+
this.notifyFeedbackSession(resumable.sessionId, "open");
|
|
8478
|
+
}
|
|
7742
8479
|
const pendingCrashes = this.crashReporter.drainPendingCrashes();
|
|
7743
8480
|
if (this.tracking?.isTrackingEnabled()) {
|
|
7744
8481
|
for (const rec of pendingCrashes) {
|
|
@@ -7749,8 +8486,10 @@ var DeepdotsPopups = class {
|
|
|
7749
8486
|
this.log("SDK initialized", this.config);
|
|
7750
8487
|
if (this.renderer.init) this.renderer.init();
|
|
7751
8488
|
this.setupPopupContainer();
|
|
8489
|
+
this.awaitingPopups = Boolean(this.config.apiKey && this.baseUrl);
|
|
7752
8490
|
this.fetchPopupsFromServer().then((defs) => {
|
|
7753
|
-
|
|
8491
|
+
if (!defs) this.dropPendingTriggers();
|
|
8492
|
+
this.popupDefinitions = this.validatePopupDefinitions(defs ?? []);
|
|
7754
8493
|
this.popupsLoaded = true;
|
|
7755
8494
|
this.log("Popups loaded from API", this.popupDefinitions);
|
|
7756
8495
|
if (this.popupDefinitions.length) this.renderer.preload?.();
|
|
@@ -7759,6 +8498,7 @@ var DeepdotsPopups = class {
|
|
|
7759
8498
|
if (this.pendingAutoLaunch) {
|
|
7760
8499
|
this.startTriggers();
|
|
7761
8500
|
}
|
|
8501
|
+
this.replayPendingTriggers();
|
|
7762
8502
|
});
|
|
7763
8503
|
}
|
|
7764
8504
|
/** User id actual (generado por el SDK o provisto por el cliente). Null si tracking off. */
|
|
@@ -7987,9 +8727,15 @@ var DeepdotsPopups = class {
|
|
|
7987
8727
|
openSession() {
|
|
7988
8728
|
if (this.sessionOpen) return;
|
|
7989
8729
|
if (!this.tracking?.isTrackingEnabled()) return;
|
|
8730
|
+
const suspendedMs = this.takeSuspendedSession();
|
|
7990
8731
|
this.sessionOpen = true;
|
|
7991
8732
|
this.lastEngagementAt = Date.now();
|
|
7992
|
-
|
|
8733
|
+
if (suspendedMs === null) {
|
|
8734
|
+
this.track("deepdots_session_start", {});
|
|
8735
|
+
} else {
|
|
8736
|
+
this.track("deepdots_session_resume", { suspended_ms: suspendedMs });
|
|
8737
|
+
this.log("tracking \xB7 session resumed after", suspendedMs, "ms:", this.analyticsFeedbackSessionId);
|
|
8738
|
+
}
|
|
7993
8739
|
this.navObserver?.restart();
|
|
7994
8740
|
if (this.isDocumentVisible()) this.engagement?.resume();
|
|
7995
8741
|
}
|
|
@@ -8054,6 +8800,75 @@ var DeepdotsPopups = class {
|
|
|
8054
8800
|
}
|
|
8055
8801
|
this.openSession();
|
|
8056
8802
|
}
|
|
8803
|
+
/**
|
|
8804
|
+
* `pagehide` en web: SUSPENDE la sesión en vez de cerrarla, porque el navegador lo lanza
|
|
8805
|
+
* igual al recargar que al cerrar la pestaña. Vuelca lo pendiente (page_view de la
|
|
8806
|
+
* pantalla, mini-services, engagement) con un `deepdots_session_suspend` y SIN
|
|
8807
|
+
* `completed`, y deja el registro en `sessionStorage` (ver `suspended-session.ts`):
|
|
8808
|
+
* - si la página vuelve a cargar en esta pestaña, `init()` sigue en el mismo registro;
|
|
8809
|
+
* - si la pestaña se cerró, el backend lo cierra a los pocos minutos sin otro lote.
|
|
8810
|
+
*
|
|
8811
|
+
* Devuelve false cuando no se puede suspender — aún no se conoce el registro (el primer
|
|
8812
|
+
* POST sigue en vuelo) o no hay `sessionStorage` — y entonces el caller cierra como antes.
|
|
8813
|
+
*/
|
|
8814
|
+
suspendSession() {
|
|
8815
|
+
if (!this.sessionOpen || !this.tracking?.isTrackingEnabled()) return false;
|
|
8816
|
+
const sessionId = this.analyticsFeedbackSessionId;
|
|
8817
|
+
const integration = this.analyticsIntegration;
|
|
8818
|
+
const storage = getSessionStorage();
|
|
8819
|
+
if (!sessionId || !integration || !storage) return false;
|
|
8820
|
+
const at = Date.now();
|
|
8821
|
+
const userId = this.tracking.getUserId();
|
|
8822
|
+
if (!writeSuspendedSession(storage, { sessionId, integration, userId, at })) return false;
|
|
8823
|
+
this.sessionOpen = false;
|
|
8824
|
+
this.suspended = { at, userId };
|
|
8825
|
+
this.navObserver?.stop();
|
|
8826
|
+
this.navStarted = false;
|
|
8827
|
+
this.analytics?.exitAllMiniServices();
|
|
8828
|
+
this.flushEngagement();
|
|
8829
|
+
this.engagement?.pause();
|
|
8830
|
+
this.track("deepdots_session_suspend", { reason: "page_hide" });
|
|
8831
|
+
this.flushAnalytics({ final: true });
|
|
8832
|
+
this.log("tracking \xB7 session suspended:", sessionId);
|
|
8833
|
+
return true;
|
|
8834
|
+
}
|
|
8835
|
+
/**
|
|
8836
|
+
* Recoge la sesión que dejó suspendida la carga anterior de esta pestaña (ver
|
|
8837
|
+
* `suspendSession`). Solo con analytics configurado y el tracking activo: sin ellos no hay
|
|
8838
|
+
* registro en el que seguir.
|
|
8839
|
+
*/
|
|
8840
|
+
readResumableSession() {
|
|
8841
|
+
const integration = this.analyticsIntegration;
|
|
8842
|
+
const storage = getSessionStorage();
|
|
8843
|
+
if (!integration || !storage || !this.tracking?.isTrackingEnabled()) return null;
|
|
8844
|
+
return takeSuspendedSession(
|
|
8845
|
+
storage,
|
|
8846
|
+
{ integration, userId: this.tracking.getUserId() },
|
|
8847
|
+
Date.now(),
|
|
8848
|
+
ANALYTICS_RESUME_WINDOW_MS
|
|
8849
|
+
);
|
|
8850
|
+
}
|
|
8851
|
+
/**
|
|
8852
|
+
* Consume la sesión suspendida al abrir: los ms que estuvo suspendida si se puede seguir en
|
|
8853
|
+
* ella (mismo usuario, dentro de ANALYTICS_RESUME_WINDOW_MS); null si no había o ya no toca.
|
|
8854
|
+
* En ese caso se olvida su registro sin enviar nada: lo cierra el backend, y la sesión que
|
|
8855
|
+
* se abre ahora va a uno nuevo.
|
|
8856
|
+
*/
|
|
8857
|
+
takeSuspendedSession() {
|
|
8858
|
+
const suspended = this.suspended;
|
|
8859
|
+
if (!suspended) return null;
|
|
8860
|
+
this.suspended = null;
|
|
8861
|
+
const storage = getSessionStorage();
|
|
8862
|
+
if (storage) clearSuspendedSession(storage);
|
|
8863
|
+
const suspendedMs = Math.max(0, Date.now() - suspended.at);
|
|
8864
|
+
if (this.analyticsFeedbackSessionId && suspendedMs <= ANALYTICS_RESUME_WINDOW_MS && suspended.userId === (this.tracking?.getUserId() ?? null)) {
|
|
8865
|
+
return suspendedMs;
|
|
8866
|
+
}
|
|
8867
|
+
this.analytics?.discardSession(this.analyticsIdentity());
|
|
8868
|
+
this.analyticsFeedbackSessionId = void 0;
|
|
8869
|
+
this.tracking?.setSessionId(null);
|
|
8870
|
+
return null;
|
|
8871
|
+
}
|
|
8057
8872
|
/** Olvida la sesión abierta sin enviar nada (ver onDocumentVisible). */
|
|
8058
8873
|
discardSession() {
|
|
8059
8874
|
this.sessionOpen = false;
|
|
@@ -8102,7 +8917,7 @@ var DeepdotsPopups = class {
|
|
|
8102
8917
|
if (typeof document === "undefined" || typeof window === "undefined") return;
|
|
8103
8918
|
window.addEventListener("pagehide", () => {
|
|
8104
8919
|
clearInterval(this.analyticsFlushTimer);
|
|
8105
|
-
this.closeSession("page_hide");
|
|
8920
|
+
if (!this.suspendSession()) this.closeSession("page_hide");
|
|
8106
8921
|
});
|
|
8107
8922
|
window.addEventListener("pageshow", (event) => {
|
|
8108
8923
|
if (!event.persisted) return;
|
|
@@ -8170,6 +8985,7 @@ var DeepdotsPopups = class {
|
|
|
8170
8985
|
}
|
|
8171
8986
|
/** Lógica para evaluar condiciones antes de mostrar una encuesta */
|
|
8172
8987
|
triggerSurvey(surveyId, popupId) {
|
|
8988
|
+
if (this.bufferIfAwaitingPopups({ kind: "survey", surveyId, popupId })) return;
|
|
8173
8989
|
const def = this.findPopupDefinition(surveyId, popupId);
|
|
8174
8990
|
if (!def) {
|
|
8175
8991
|
this.debug("No popup definition for trigger", { surveyId, popupId });
|
|
@@ -8191,6 +9007,10 @@ var DeepdotsPopups = class {
|
|
|
8191
9007
|
this.debug("Ignoring empty event trigger name");
|
|
8192
9008
|
return;
|
|
8193
9009
|
}
|
|
9010
|
+
if (this.bufferIfAwaitingPopups({ kind: "event", name: normalized })) return;
|
|
9011
|
+
this.evaluateEvent(normalized);
|
|
9012
|
+
}
|
|
9013
|
+
evaluateEvent(normalized) {
|
|
8194
9014
|
const candidates = this.popupDefinitions.filter((def) => {
|
|
8195
9015
|
return def.triggers.some((trigger) => {
|
|
8196
9016
|
const triggerValue = String(trigger.value ?? "").trim();
|
|
@@ -8208,6 +9028,40 @@ var DeepdotsPopups = class {
|
|
|
8208
9028
|
}
|
|
8209
9029
|
this.showDefinition(matched);
|
|
8210
9030
|
}
|
|
9031
|
+
/**
|
|
9032
|
+
* Guarda `trigger` si las definiciones aún no han llegado. Devuelve `true` si lo guardó (el
|
|
9033
|
+
* llamador no debe evaluarlo ahora) y `false` si no hay carga en vuelo (se evalúa ya, como
|
|
9034
|
+
* siempre: tras cargar, tras un fallo o sin apiKey).
|
|
9035
|
+
*/
|
|
9036
|
+
bufferIfAwaitingPopups(trigger) {
|
|
9037
|
+
if (!this.awaitingPopups) return false;
|
|
9038
|
+
if (this.pendingTriggers.length >= MAX_PENDING_TRIGGERS) {
|
|
9039
|
+
const dropped = this.pendingTriggers.shift();
|
|
9040
|
+
this.debug("Pending trigger buffer full; dropped oldest", dropped);
|
|
9041
|
+
}
|
|
9042
|
+
this.pendingTriggers.push(trigger);
|
|
9043
|
+
this.debug("Popups not loaded yet; trigger buffered", trigger);
|
|
9044
|
+
return true;
|
|
9045
|
+
}
|
|
9046
|
+
/** La carga falló: sin definiciones no hay nada que reproducir, se descarta todo. */
|
|
9047
|
+
dropPendingTriggers() {
|
|
9048
|
+
const dropped = this.pendingTriggers.length;
|
|
9049
|
+
this.awaitingPopups = false;
|
|
9050
|
+
this.pendingTriggers = [];
|
|
9051
|
+
if (dropped > 0) this.debug("Popups failed to load; dropped pending triggers", dropped);
|
|
9052
|
+
}
|
|
9053
|
+
/** Reproduce en orden por la evaluación normal (segmentos, cooldowns y condiciones de AHORA). */
|
|
9054
|
+
replayPendingTriggers() {
|
|
9055
|
+
this.awaitingPopups = false;
|
|
9056
|
+
const replay = this.pendingTriggers;
|
|
9057
|
+
this.pendingTriggers = [];
|
|
9058
|
+
if (!replay.length) return;
|
|
9059
|
+
this.debug("Replaying triggers received before popups loaded", replay.length);
|
|
9060
|
+
replay.forEach((trigger) => {
|
|
9061
|
+
if (trigger.kind === "event") this.evaluateEvent(trigger.name);
|
|
9062
|
+
else this.triggerSurvey(trigger.surveyId, trigger.popupId);
|
|
9063
|
+
});
|
|
9064
|
+
}
|
|
8211
9065
|
showDefinition(def) {
|
|
8212
9066
|
this.log("Showing popup (definition)", def);
|
|
8213
9067
|
this.surveyToPopupId.set(def.surveyId, def.id);
|
|
@@ -8478,7 +9332,7 @@ var DeepdotsPopups = class {
|
|
|
8478
9332
|
} catch {
|
|
8479
9333
|
}
|
|
8480
9334
|
}
|
|
8481
|
-
/** Fetch al servidor para obtener popups */
|
|
9335
|
+
/** Fetch al servidor para obtener popups. `null` si la carga falló (red, no-2xx, payload inválido). */
|
|
8482
9336
|
async fetchPopupsFromServer() {
|
|
8483
9337
|
const apiKey = this.config?.apiKey;
|
|
8484
9338
|
const baseUrl = this.baseUrl;
|
|
@@ -8494,19 +9348,19 @@ var DeepdotsPopups = class {
|
|
|
8494
9348
|
const response = await fetch(endpoint);
|
|
8495
9349
|
if (!response.ok) {
|
|
8496
9350
|
this.log("Failed to fetch popups", response.status, response.statusText);
|
|
8497
|
-
return
|
|
9351
|
+
return null;
|
|
8498
9352
|
}
|
|
8499
9353
|
const raw = await response.text();
|
|
8500
9354
|
const parsed = JSON.parse(raw);
|
|
8501
9355
|
if (!Array.isArray(parsed)) {
|
|
8502
9356
|
this.log("Unexpected popups payload", parsed);
|
|
8503
|
-
return
|
|
9357
|
+
return null;
|
|
8504
9358
|
}
|
|
8505
9359
|
this.debug("Fetched popups payload", parsed);
|
|
8506
9360
|
return parsed;
|
|
8507
9361
|
} catch (error) {
|
|
8508
9362
|
this.log("Error fetching popups", error);
|
|
8509
|
-
return
|
|
9363
|
+
return null;
|
|
8510
9364
|
}
|
|
8511
9365
|
}
|
|
8512
9366
|
/** Envía los atributos de contact a la API (`POST /sdk/popups/contact`). */
|