survey-analytics 2.2.6 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/fesm/shared.mjs +84 -1
  2. package/fesm/shared.mjs.map +1 -1
  3. package/fesm/shared2.mjs +46 -20
  4. package/fesm/shared2.mjs.map +1 -1
  5. package/fesm/survey.analytics.core.mjs +1 -1
  6. package/fesm/survey.analytics.mjs +80 -19
  7. package/fesm/survey.analytics.mjs.map +1 -1
  8. package/fesm/survey.analytics.tabulator.mjs +47 -4
  9. package/fesm/survey.analytics.tabulator.mjs.map +1 -1
  10. package/package.json +3 -3
  11. package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +1 -0
  12. package/survey-analytics-tabulator.types/analytics-localization/swedish.d.ts +79 -0
  13. package/survey-analytics-tabulator.types/entries/tabulator.d.ts +1 -0
  14. package/survey-analytics-tabulator.types/localizationManager.d.ts +1 -0
  15. package/survey-analytics-tabulator.types/tables/columnbuilder.d.ts +7 -1
  16. package/survey-analytics-tabulator.types/tables/columns.d.ts +10 -1
  17. package/survey-analytics.types/analytics-localization/english.d.ts +1 -0
  18. package/survey-analytics.types/analytics-localization/swedish.d.ts +79 -0
  19. package/survey-analytics.types/config.d.ts +1 -0
  20. package/survey-analytics.types/entries/summary.core.d.ts +1 -0
  21. package/survey-analytics.types/localizationManager.d.ts +1 -0
  22. package/survey-analytics.types/plotly/chart-adapter.d.ts +1 -0
  23. package/survey-analytics.types/plotly/setup.d.ts +1 -0
  24. package/survey-analytics.types/ranking.d.ts +4 -0
  25. package/survey-analytics.types/visualizationPanel.d.ts +4 -2
  26. package/survey-analytics.types/visualizerBase.d.ts +11 -4
  27. package/survey.analytics.core.css +1 -1
  28. package/survey.analytics.core.js +201 -75
  29. package/survey.analytics.core.js.map +1 -1
  30. package/survey.analytics.core.min.css +1 -1
  31. package/survey.analytics.core.min.js +1 -1
  32. package/survey.analytics.core.min.js.LICENSE.txt +1 -1
  33. package/survey.analytics.css +1 -1
  34. package/survey.analytics.js +295 -106
  35. package/survey.analytics.js.map +1 -1
  36. package/survey.analytics.min.css +1 -1
  37. package/survey.analytics.min.js +1 -1
  38. package/survey.analytics.min.js.LICENSE.txt +1 -1
  39. package/survey.analytics.tabulator.css +1 -1
  40. package/survey.analytics.tabulator.js +214 -23
  41. package/survey.analytics.tabulator.js.map +1 -1
  42. package/survey.analytics.tabulator.min.css +1 -1
  43. package/survey.analytics.tabulator.min.js +1 -1
  44. package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see survey.analytics.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("plotly.js-dist-min"),require("survey-core")):"function"==typeof define&&define.amd?define("SurveyAnalytics",["plotly.js-dist-min","survey-core"],t):"object"==typeof exports?exports.SurveyAnalytics=t(require("plotly.js-dist-min"),require("survey-core")):e.SurveyAnalytics=t(e.Plotly,e.Survey)}(this,((e,t)=>(()=>{var i={24:e=>{e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><g><circle cx="8" cy="4" r="3"></circle><path d="M8,8c-3.31,0-6,2.73-6,4.67S5.27,15,8,15s6-0.4,6-2.33S11.31,8,8,8z"></path></g></svg>'},41:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><path d="M12.79,4.2L16,1l-1-1l-3.32,3.32C10.57,2.55,9.32,2,8,2C3.63,2,0,7.97,0,7.97s1.27,2.1,3.21,3.82l-3.23,3.23 L0.96,16l3.35-3.34C5.41,13.44,6.67,14,8,14c4.37,0,8-6,8-6S14.73,5.91,12.79,4.2z M2,7.97c1.07-1.47,3.61-4,6-4 c0.8,0,1.6,0.27,2.35,0.68L9.57,5.43C9.11,5.14,8.58,4.97,8,4.97c-1.66,0-3,1.34-3,3c0,0.58,0.17,1.11,0.46,1.57l-0.97,0.97 C3.36,9.64,2.45,8.59,2,7.97z M8,11.97c-0.8,0-1.59-0.27-2.33-0.67l0.78-0.77C6.9,10.8,7.43,10.97,8,10.97c1.66,0,3-1.34,3-3 c0-0.57-0.17-1.09-0.44-1.55l0.98-0.98c1.11,0.87,2.01,1.91,2.46,2.52C12.93,9.44,10.39,11.97,8,11.97z"></path></g></svg>'},61:t=>{"use strict";t.exports=e},70:(e,t,i)=>{"use strict";i.d(t,{NW:()=>o,QV:()=>s,QX:()=>a,Qk:()=>n,gf:()=>r});var r=function(){function e(){}return e.createSelector=function(t,i,r,n){var s=document.createElement("div");if(s.className="sa-question__select-wrapper",n){var o=e.createElement("span","sa-question__select-title",{innerText:n});s.appendChild(o)}var a=document.createElement("select");return a.className="sa-question__select",t.forEach((function(t){var r=e.createElement("option","",{value:t.value,text:t.text,selected:i(t)});a.appendChild(r)})),a.onchange=r,s.appendChild(a),s},e.createButton=function(t,i,r){return void 0===i&&(i=""),void 0===r&&(r="sa-toolbar__button"),e.createElement("span",r,{innerText:i,onclick:t})},e.createElement=function(e,t,i){void 0===t&&(t="");var r=document.createElement(e);return r.className=t,i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r},e.createSvgElement=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=document.createElementNS("http://www.w3.org/2000/svg","use");return i.setAttributeNS("http://www.w3.org/1999/xlink","href","#sa-svg-"+e),t.appendChild(i),t},e.createSvgButton=function(t){var i=e.createElement("button","sa-table__svg-button");return i.appendChild(e.createSvgElement(t)),i},e.createSvgToggleButton=function(t,i,r,n,s,o,a,l){void 0===a&&(a="first"),void 0===l&&(l="sa-toolbar__button sa-toolbar__svg-button");var u=e.createSvgElement(t),h=e.createSvgElement(i),c=e.createElement("button",l);return"first"===a?(c.title=r,c.appendChild(u)):(a="second")&&(c.title=n,c.appendChild(h)),c.onclick=function(e){"first"===a?(a="second",c.title=n,c.removeChild(u),c.appendChild(h),o(e)):"second"===a&&(a="first",c.title=r,c.removeChild(h),c.appendChild(u),s(e))},c},e.createInput=function(t,i,r){return void 0===i&&(i=""),void 0===r&&(r=""),e.createElement("input",t,{placeholder:i,defaultValue:r})},e}();function n(){var e=r.createElement("div","sa-commercial"),t=r.createElement("a","sa-commercial__text",{href:"https://www.surveyjs.io/Buy",target:"_blank"}),i=r.createElement("span",""),n=r.createSvgElement("noncommercial"),s=r.createElement("span","sa-commercial__product",{innerText:"Please purchase a SurveyJS Analytics developer license to use it in your app."});return e.appendChild(t).appendChild(i),i.appendChild(n),i.appendChild(s),e}function s(){var e=r.createElement("div","sa-data-loading-indicator-panel"),t=r.createElement("div","sa-data-loading-indicator");return t.innerHTML='\n <svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_17928_11482)">\n <path d="M32 64C14.36 64 0 49.65 0 32C0 14.35 14.36 0 32 0C49.64 0 64 14.35 64 32C64 49.65 49.64 64 32 64ZM32 4C16.56 4 4 16.56 4 32C4 47.44 16.56 60 32 60C47.44 60 60 47.44 60 32C60 16.56 47.44 4 32 4Z" fill="#E5E5E5"></path>\n <path d="M53.2101 55.2104C52.7001 55.2104 52.1901 55.0104 51.8001 54.6204C51.0201 53.8404 51.0201 52.5704 51.8001 51.7904C57.0901 46.5004 60.0001 39.4704 60.0001 31.9904C60.0001 24.5104 57.0901 17.4804 51.8001 12.1904C51.0201 11.4104 51.0201 10.1404 51.8001 9.36039C52.5801 8.58039 53.8501 8.58039 54.6301 9.36039C60.6701 15.4004 64.0001 23.4404 64.0001 31.9904C64.0001 40.5404 60.6701 48.5704 54.6301 54.6204C54.2401 55.0104 53.7301 55.2104 53.2201 55.2104H53.2101Z" fill="#19B394"></path>\n </g>\n <defs>\n <clipPath id="clip0_17928_11482">\n <rect width="64" height="64" fill="white"></rect>\n </clipPath>\n </defs>\n </svg>\n ',e.appendChild(t),e}window.URL.createObjectURL;var o=function(){function e(){}return e.zipArrays=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=[],r=function(t){i[t]=[],e.forEach((function(e){i[t].push(e[t])}))},n=0;n<e[0].length;n++)r(n);return i},e.unzipArrays=function(e){var t=[];return e.forEach((function(e,i){e.forEach((function(e,r){t[r]||(t[r]=[]),t[r][i]=e}))})),t},e.sortDictionary=function(e,t,i){var r=this.zipArrays(e,t),n=function(e,t,i){void 0===i&&(i=!0);var r=e[1]<t[1]?1:e[1]==t[1]?0:-1;return i?r:-1*r};r.sort((function(e,t){return i?n(e,t,!1):n(e,t)}));var s=this.unzipArrays(r);return{keys:s[0],values:s[1]}},e.toPercentage=function(e,t){return e/t*100},e}();function a(e,t){void 0===t&&(t=2);var i=Math.pow(10,t);return Math.round(i*e)/i}},87:(e,t,i)=>{"use strict";i.d(t,{C6:()=>n,Cl:()=>r,YH:()=>o,sH:()=>s});var r=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e};function n(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function s(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))}function o(e,t){var i,r,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(6===s[0]&&o.label<n[1]){o.label=n[1],n=s;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(s);break}n[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{i=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}},143:(e,t,i)=>{"use strict";i.d(t,{u:()=>a});var r=i(87),n=i(156),s=i(183),o=i(557),a=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"matrix")||this;return s._transposeData=!0,s}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"matrixQuestion",{get:function(){return this.question},enumerable:!1,configurable:!0}),t.prototype.isSupportMissingAnswers=function(){return!1},t.prototype.getSeriesValues=function(){return this.matrixQuestion.rows.map((function(e){return""+e.value}))},t.prototype.getSeriesLabels=function(){var e=this;return this.matrixQuestion.rows.map((function(t){return n.ItemValue.getTextOrHtmlByValue(e.matrixQuestion.rows,t.value)}))},t.prototype.getSelectedItemByText=function(e){return this.matrixQuestion.columns.filter((function(t){return t.text===e}))[0]},t.prototype.valuesSource=function(){return this.matrixQuestion.columns},t.prototype.getHasAnswersInAllSeriesArray=function(e){for(var t=Array(),i=0;i<e[0].length;i++)for(var r=0;r<e.length;r++)0!=e[r][i]&&(t[i]=!0);return t},t.prototype.getHasAnswersInSeries=function(e){for(var t=0;t<e.length;t++)if(0!=e[t])return!0;return!1},t.prototype.hideEmptyAnswersInData=function(e){for(var t={datasets:[],labels:[],colors:[],texts:[],seriesLabels:[]},i=this.getHasAnswersInAllSeriesArray(e.datasets),r=0;r<e.datasets.length;r++)if(this.getHasAnswersInSeries(e.datasets[r])){t.labels.push(e.labels[r]),t.colors.push(e.colors[r]);for(var n=[],s=[],o=0;o<e.datasets[0].length;o++)i[o]&&(n.push(e.datasets[r][o]),s.push(e.texts[r][o]));t.datasets.push(n),t.texts.push(s)}for(r=0;r<e.datasets[0].length;r++)i[r]&&t.seriesLabels.push(e.seriesLabels[r]);return t},t}(s.o);o.g.registerVisualizer("matrix",a)},156:e=>{"use strict";e.exports=t},183:(e,t,i)=>{"use strict";i.d(t,{M:()=>u,o:()=>h});var r=i(87),n=i(156),s=i(267),o=i(240),a=i(70),l=i(557);function u(e){var t={datasets:[],labels:[],colors:[],texts:[],seriesLabels:[]};if(0===e.seriesLabels.length){t.datasets.push([]),t.texts.push([]);for(var i=0;i<e.datasets[0].length;i++)0!=e.datasets[0][i]&&(t.datasets[0].push(e.datasets[0][i]),t.labels.push(e.labels[i]),t.colors.push(e.colors[i]),t.texts[0].push(e.texts[0][i]));return t}var r=[];r.length=e.seriesLabels.length;var n=[];n.length=e.labels.length;for(var s=0;s<e.seriesLabels.length;s++)for(var o=0;o<e.labels.length;o++)0!=e.datasets[s][o]&&(r[s]=!0,n[o]=!0);for(o=0;o<n.length;o++)n[o]&&(t.labels.push(e.labels[o]),t.colors.push(e.colors[o]));for(s=0;s<e.seriesLabels.length;s++)r[s]&&t.seriesLabels.push(e.seriesLabels[s]);for(s=0;s<e.datasets.length;s++)if(r[s]){var a=[],l=[];for(o=0;o<e.labels.length;o++)n[o]&&(a.push(e.datasets[s][o]),l.push(e.texts[s][o]));t.datasets.push(a),t.texts.push(l)}return t}var h=function(e){function t(i,r,l,u){var h=e.call(this,i,r,l,u||"selectBase")||this;return h.selectedItem=void 0,h.choicesOrderSelector=void 0,h.showPercentageBtn=void 0,h.emptyAnswersBtn=void 0,h.transposeDataBtn=void 0,h.topNSelector=void 0,h._showPercentages=!1,h._showOnlyPercentages=!1,h._percentagePrecision=0,h._answersOrder="default",h._supportSelection=!0,h._hideEmptyAnswers=!1,h._topN=-1,h.topNValues=[].concat(t.topNValuesDefaults),h._transposeData=!1,h._showMissingAnswers=!1,h.missingAnswersBtn=void 0,h.chartTypes=[],h._chartType="bar",h.onAnswersDataReady=new n.Event,i&&(i.visibleChoicesChangedCallback=function(){h.dataProvider.raiseDataChanged()}),h._showPercentages=!0===h.options.showPercentages,h._showOnlyPercentages=!0===h.options.showOnlyPercentages,h.options.percentagePrecision&&(h._percentagePrecision=h.options.percentagePrecision),void 0!==h.options.transposeData&&(h._transposeData=h.options.transposeData),h._hideEmptyAnswers=!0===h.options.hideEmptyAnswers,h._answersOrder=h.options.answersOrder||"default",h._showMissingAnswers=h.isSupportMissingAnswers()&&!0===h.options.showMissingAnswers,h.options.allowExperimentalFeatures,s.w.chartAdapterType&&(h._chartAdapter=new s.w.chartAdapterType(h),h.chartTypes=h._chartAdapter.getChartTypes(),h.getSeriesValues().length>0&&-1===h.chartTypes.indexOf("stackedbar")&&h.chartTypes.push("stackedbar"),h._chartType=h.chartTypes[0],-1!==h.chartTypes.indexOf(h.options.defaultChartType)&&(h._chartType=h.options.defaultChartType)),h.registerToolbarItem("changeChartType",(function(){return h.chartTypes.length>1?a.gf.createSelector(h.chartTypes.map((function(e){return{value:e,text:o.q.getString("chartType_"+e)}})),(function(e){return h.chartType===e.value}),(function(e){h.setChartType(e.target.value)})):null})),h.registerToolbarItem("changeAnswersOrder",(function(){return h.isSupportAnswersOrder()&&(h.choicesOrderSelector=a.gf.createSelector([{text:o.q.getString("defaultOrder"),value:"default"},{text:o.q.getString("ascOrder"),value:"asc"},{text:o.q.getString("descOrder"),value:"desc"}],(function(e){return!1}),(function(e){h.answersOrder=e.target.value})),h.updateOrderSelector()),h.choicesOrderSelector})),h.registerToolbarItem("showPercentages",(function(){if(h.options.allowShowPercentages&&(-1!==h.chartTypes.indexOf("bar")||-1!==h.chartTypes.indexOf("stackedbar")))return h.showPercentageBtn=a.gf.createButton((function(){h.showPercentages=!h.showPercentages})),h.updateShowPercentageBtn(),h.showPercentageBtn})),h.registerToolbarItem("hideEmptyAnswers",(function(){return h.options.allowHideEmptyAnswers&&(h.emptyAnswersBtn=a.gf.createButton((function(){h.hideEmptyAnswers=!h._hideEmptyAnswers})),h.updateEmptyAnswersBtn()),h.emptyAnswersBtn})),h.registerToolbarItem("topNAnswers",(function(){return h.options.allowTopNAnswers&&0===h.getSeriesValues().length&&(h.topNSelector=a.gf.createSelector(h.topNValues.map((function(e){return{text:o.q.getString("topNValueText"+e),value:e}})),(function(e){return!1}),(function(e){h.topN=parseInt(e.target.value)})),h.updateTopNSelector()),h.topNSelector})),h.registerToolbarItem("transposeData",(function(){return h.options.allowTransposeData&&(h.transposeDataBtn=a.gf.createButton((function(){h.transposeData=!h.transposeData})),h.updateTransposeDataBtn()),h.transposeDataBtn})),h.registerToolbarItem("showMissingAnswers",(function(){return h.isSupportMissingAnswers()&&h.options.allowShowMissingAnswers&&(h.missingAnswersBtn=a.gf.createButton((function(){h.showMissingAnswers=!h._showMissingAnswers})),h.updateMissingAnswersBtn()),h.missingAnswersBtn})),h}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"chartType",{get:function(){return this._chartType},set:function(e){this.setChartType(e)},enumerable:!1,configurable:!0}),t.prototype.updateEmptyAnswersBtn=function(){this.emptyAnswersBtn&&(this.emptyAnswersBtn.innerText=this._hideEmptyAnswers?o.q.getString("showEmptyAnswers"):o.q.getString("hideEmptyAnswers"),"bar"==this.chartType||"vbar"==this.chartType||"line"==this.chartType||"scatter"==this.chartType?this.emptyAnswersBtn.style.display="inline":this.emptyAnswersBtn.style.display="none")},t.prototype.updateTransposeDataBtn=function(){this.transposeDataBtn&&(this.transposeDataBtn.innerText=this.transposeData?o.q.getString("showPerColumns"):o.q.getString("showPerValues"),this.getSeriesValues().length>0?this.transposeDataBtn.style.display="inline":this.transposeDataBtn.style.display="none")},t.prototype.updateOrderSelector=function(){this.choicesOrderSelector&&("bar"==this.chartType||"vbar"==this.chartType||"line"==this.chartType||"scatter"==this.chartType||("pie"==this.chartType||"doughnut"==this.chartType)&&this.topN>0?this.choicesOrderSelector.style.display="inline-flex":this.choicesOrderSelector.style.display="none",this.choicesOrderSelector.getElementsByTagName("select")[0].value=this.answersOrder)},t.prototype.updateShowPercentageBtn=function(){this.showPercentageBtn&&(this.showPercentageBtn.innerText=this._showPercentages?o.q.getString("hidePercentages"):o.q.getString("showPercentages"),"bar"==this.chartType||"vbar"==this.chartType||"stackedbar"==this.chartType?this.showPercentageBtn.style.display="inline":this.showPercentageBtn.style.display="none")},t.prototype.updateTopNSelector=function(){this.topNSelector&&(this.topNSelector.getElementsByTagName("select")[0].value=this._topN)},t.prototype.updateMissingAnswersBtn=function(){this.missingAnswersBtn&&(this.missingAnswersBtn.innerText=this._showMissingAnswers?o.q.getString("hideMissingAnswers"):o.q.getString("showMissingAnswers"))},t.prototype.onChartTypeChanged=function(){this.updateOrderSelector(),this.updateShowPercentageBtn(),this.updateEmptyAnswersBtn(),this.updateTopNSelector(),this.stateChanged("chartType",this._chartType)},t.prototype.setChartType=function(e){-1!==this.chartTypes.indexOf(e)&&this._chartType!==e&&(this._chartType=e,this.onChartTypeChanged(),this.refreshContent())},t.prototype.getCorrectAnswerText=function(){var t=e.prototype.getCorrectAnswerText.call(this),i=Array.isArray(t)?t:[t],r=this.question;return i.map((function(e){return n.ItemValue.getTextOrHtmlByValue(r.choices,e)})).join(", ")},t.prototype.isSupportSoftUpdateContent=function(){return!0},t.prototype.softUpdateContent=function(){var e,t=null===(e=this.contentContainer)||void 0===e?void 0:e.children[0];t&&this._chartAdapter.update(t)},t.prototype.getSelectedItemByText=function(e){var t=this.question;return this.question.hasOther&&e==t.otherText?t.otherItem:t.choices.filter((function(t){return t.text===e}))[0]},t.prototype.setSelection=function(e){var t;this.selectedItem!==e&&(this.selectedItem=e,void 0!==this.onDataItemSelected&&this.onDataItemSelected(void 0!==e?e.value:void 0,void 0!==e?e.text:""),this.stateChanged("filter",null===(t=this.selectedItem)||void 0===t?void 0:t.value))},Object.defineProperty(t.prototype,"selection",{get:function(){return this.selectedItem},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showOnlyPercentages",{get:function(){return this._showOnlyPercentages},set:function(e){this._showOnlyPercentages=e,this.refreshContent(),this.stateChanged("showOnlyPercentages",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showPercentages",{get:function(){return this._showPercentages},set:function(e){this._showPercentages=e,this.updateShowPercentageBtn(),this.refreshContent(),this.stateChanged("showPercentages",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"answersOrder",{get:function(){return this._answersOrder},set:function(e){this._answersOrder=e,this.updateOrderSelector(),this.refreshContent(),this.stateChanged("answersOrder",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideEmptyAnswers",{get:function(){return this._hideEmptyAnswers},set:function(e){this._hideEmptyAnswers=e,this.updateEmptyAnswersBtn(),this.refreshContent(),this.stateChanged("hideEmptyAnswers",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transposeData",{get:function(){return this._transposeData},set:function(e){this._transposeData=e,this.updateTransposeDataBtn(),this.refreshContent(),this.stateChanged("transposeData",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topN",{get:function(){return this._topN},set:function(e){this._topN=e,this.updateTopNSelector(),this.updateOrderSelector(),this.refreshContent(),this.stateChanged("topN",e)},enumerable:!1,configurable:!0}),t.prototype.isSupportAnswersOrder=function(){return!1!==this.options.allowSortAnswers&&!1!==this.options.allowChangeAnswersOrder&&0===this.getSeriesValues().length},t.prototype.isSupportMissingAnswers=function(){return!0},Object.defineProperty(t.prototype,"showMissingAnswers",{get:function(){return this._showMissingAnswers},set:function(e){this._showMissingAnswers=this.isSupportMissingAnswers()&&e,this.updateMissingAnswersBtn(),this.dataProvider.raiseDataChanged(this.name),this.refreshContent(),this.stateChanged("showMissingAnsewrs",e)},enumerable:!1,configurable:!0}),t.prototype.refreshContent=function(){this.contentContainer&&(this.destroyContent(this.contentContainer),this.renderContent(this.contentContainer)),this.invokeOnUpdate()},Object.defineProperty(t.prototype,"showValuesInOriginalOrder",{get:function(){return!1!==this.options.showValuesInOriginalOrder},enumerable:!1,configurable:!0}),t.prototype.valuesSource=function(){var e=this.question;return e.choicesFromQuestion&&e.survey&&(e=e.survey.getQuestionByName(e.choicesFromQuestion)),e.activeChoices||e.visibleChoices||e.choices||[]},t.prototype.getValues=function(){var e=this.valuesSource().map((function(e){return e.value}));return this.question.hasNone&&e.push(this.question.noneItem.value),this.question.hasOther&&e.push("other"),this.showMissingAnswers&&e.unshift(void 0),this.showValuesInOriginalOrder?e.reverse():e},t.prototype.getLabels=function(){var e=this;if(this.options.useValuesAsLabels)return this.getValues();var t=this.valuesSource().map((function(t){return n.ItemValue.getTextOrHtmlByValue(e.valuesSource(),t.value)})),i=this.question;return i.hasNone&&t.push(i.noneText),i.hasOther&&t.push(i.otherText),this.showMissingAnswers&&t.unshift(o.q.getString("missingAnswersLabel")),this.showValuesInOriginalOrder?t.reverse():t},t.prototype.getPercentages=function(e){var t=[],i=this._percentagePrecision;if(e.length<2)e.forEach((function(e,r){var n=e.reduce((function(e,t){return e+t}),0);t[r]=e.map((function(e){var t=i?+(e/n).toFixed(i):Math.round(e/n*1e4);return n&&t/100}))}));else for(var r=0;r<e[0].length;r++){for(var n=0,s=0;s<e.length;s++)n+=e[s][r];for(s=0;s<e.length;s++){Array.isArray(t[s])||(t[s]=[]);var o=i?+(e[s][r]/n*100).toFixed(i):Math.round(e[s][r]/n*100);t[s][r]=n&&o}}return t},t.prototype.answersDataReady=function(e){var t={};return t=this.hideEmptyAnswers?u(e):e,this.topN>0&&(t.datasets[0]=t.datasets[0].slice(-this.topN),t.labels=t.labels.slice(-this.topN),t.colors=t.colors.slice(-this.topN),t.texts[0]=t.texts[0].slice(-this.topN)),t},t.prototype.getAnswersData=function(){return(0,r.sH)(this,void 0,void 0,(function(){var e,t,i,n,s,o,l,u,h,c;return(0,r.YH)(this,(function(r){switch(r.label){case 0:return e=this.getSeriesLabels(),[4,this.getCalculatedValues()];case 1:return t=r.sent(),i=this.getLabels(),n=this.getColors(),s=this.showPercentages?this.getPercentages(t):t,this.transposeData&&(t=this.transpose(t),s=this.transpose(s),o=e,e=i,i=o),"asc"!=this.answersOrder&&"desc"!=this.answersOrder||(l=this.showPercentages?a.NW.zipArrays(i,n,s[0]):a.NW.zipArrays(i,n),u=a.NW.sortDictionary(l,t[0],"desc"==this.answersOrder),h=a.NW.unzipArrays(u.keys),i=h[0],n=h[1],this.showPercentages&&(s[0]=h[2]),t[0]=u.values),c={datasets:t,labels:i,colors:n,texts:s,seriesLabels:e},c=this.answersDataReady(c),this.onAnswersDataReady.fire(this,c),[2,c]}}))}))},t.prototype.convertFromExternalData=function(e){var t=this.getValues(),i=this.getSeriesValues(),r=[];if(i.length>0)for(var n=0;n<i.length;n++){for(var s=[],o=0;o<t.length;o++)e[i[n]]?s.push(e[i[n]][t[o]]||0):s.push(0);r.push(s)}else{for(s=[],o=0;o<t.length;o++)s.push(e[t[o]]||0);r.push(s)}return r},t.prototype.transpose=function(e){for(var t=e[0].length,i=new Array(t),r=0;r<t;++r)i[r]=new Array(e.length);for(r=0;r<e.length;++r)for(var n=0;n<t;++n)i[n][r]=e[r][n];return i},t.prototype.getState=function(){var e=this,i={};return t._stateProperties.forEach((function(t){i[t]=e[t]})),this.selectedItem&&(i.filter=this.selectedItem.value),i},t.prototype.setState=function(e){var i=this;t._stateProperties.forEach((function(t){void 0!==e[t]&&(i[t]=e[t])}));var r=n.ItemValue.getItemByValue(this.question.visibleChoices,e.filter);this.setSelection(null!=r?r:void 0)},t.topNValuesDefaults=[-1,5,10,20],t._stateProperties=["chartType","answersOrder","hideEmptyAnswers","topN"],t}(s.w);l.g.registerVisualizer("checkbox",h),l.g.registerVisualizer("radiogroup",h),l.g.registerVisualizer("dropdown",h),l.g.registerVisualizer("imagepicker",h),l.g.registerVisualizer("tagbox",h)},226:(e,t,i)=>{"use strict";i.d(t,{Y:()=>u});var r=i(87),n=i(156),s=i(555),o=i(183),a=i(557),l=i(873),u=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"histogram")||this;return s.valueType="number",s._cachedValues=void 0,s._continiousData=void 0,s._cachedIntervals=void 0,s._intervalPrecision=2,s._transposeData=!1,void 0!==s.options.intervalPrecision&&(s._intervalPrecision=s.options.intervalPrecision),"text"!==t.getType()||"date"!==t.inputType&&"datetime"!==t.inputType?s.valueType="number":s.valueType="date",s}return(0,r.C6)(t,e),t.prototype.reset=function(){this._continiousData=void 0,this._cachedValues=void 0,this._cachedIntervals=void 0},t.prototype.getContiniousValue=function(e){return"date"===this.valueType?Date.parse(e):parseFloat(e)},t.prototype.getString=function(e){return"date"===this.valueType?new Date(e).toLocaleDateString():""+e},t.prototype.toPrecision=function(e){var t=Math.pow(10,this._intervalPrecision);return Math.round(t*e)/t},t.prototype.getSelectedItemByText=function(e){if(this.hasCustomIntervals||this.getContiniousValues().length>t.UseIntervalsFrom){var i=this.intervals.filter((function(t){return t.label===e}))[0];return new n.ItemValue(i,void 0!==i?i.label:"")}var r=this.getLabels(),s=r.indexOf(e);return new n.ItemValue(this.getValues()[s],r[s])},t.prototype.updateData=function(t){this.reset(),e.prototype.updateData.call(this,t)},t.prototype.onDataChanged=function(){this.reset(),e.prototype.onDataChanged.call(this)},t.prototype.getContiniousValues=function(){var e=this;if(void 0===this._cachedValues){var t=this.getSeriesValues();0===t.length&&t.push(""),this._continiousData={},t.forEach((function(t){return e._continiousData[t]=[]}));var i={};this.data.forEach((function(t){var r=t[e.name];if(void 0!==r){var n=t[s.M.seriesMarkerKey]||"";e._continiousData[n].push(e.getContiniousValue(r)),i[r]=r}})),this._cachedValues=Object.keys(i).map((function(t){return{original:i[t],continious:e.getContiniousValue(t)}})),this._cachedValues.sort((function(e,t){return e.continious-t.continious}))}return this._cachedValues},t.prototype.isSupportMissingAnswers=function(){return!1},Object.defineProperty(t.prototype,"needUseRateValues",{get:function(){return"rating"==this.question.getType()&&Array.isArray(this.question.rateValues)&&this.question.rateValues.length>0},enumerable:!1,configurable:!0}),t.prototype.getValues=function(){return this.intervals.map((function(e){return e.start}))},t.prototype.getLabels=function(){return this.intervals.map((function(e){return e.label}))},Object.defineProperty(t.prototype,"hasCustomIntervals",{get:function(){return!!this.questionOptions&&Array.isArray(this.questionOptions.intervals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"intervals",{get:function(){if(this.hasCustomIntervals)return this.questionOptions.intervals;if("rating"==this.question.getType()){if(this.needUseRateValues){var e=this.question.rateValues;return e.sort((function(e,t){return e.value-t.value})),e.map((function(t,i){return{start:t.value,end:i<e.length-1?e[i+1].value:t.value+1,label:t.text}}))}for(var i=[],r=this.question.rateMin||0;r<=(this.question.rateMax||t.IntervalsCount-1);r+=this.question.rateStep||1)i.push({start:r,end:r+1,label:""+(this.question.rateMin&&this.question.rateMax?r:r+"-"+(r+1))});return i}if(void 0===this._cachedIntervals){var n=this.getContiniousValues();if(this._cachedIntervals=[],n.length){var s=n[0].continious,o=n[n.length-1].continious,a=t.IntervalsCount,l=(o-s)/a;for(r=0;r<a;++r){var u=s+l,h=this.toPrecision(s),c=this.toPrecision(u);this._cachedIntervals.push({start:h,end:r<a-1?c:c+l/100,label:this.getString(h)+"-"+this.getString(c)}),s=u}}}return this._cachedIntervals},enumerable:!1,configurable:!0}),t.prototype.convertFromExternalData=function(e){return[e]},t.prototype.getCalculatedValuesCore=function(){return this.getContiniousValues(),(0,l.er)(this._continiousData,this.intervals,this.getSeriesValues())},t.prototype.getValueType=function(){return this.valueType},t.IntervalsCount=10,t.UseIntervalsFrom=10,t}(o.o);a.g.registerVisualizer("date",u),a.g.registerVisualizer("number",u,100),a.g.registerVisualizer("rating",u,100)},240:(e,t,i)=>{"use strict";i.d(t,{D:()=>s,q:()=>n});var r=i(391),n={currentLocaleValue:"",defaultLocaleValue:"en",locales:{},localeNames:{},supportedLocales:[],get currentLocale(){return this.currentLocaleValue===this.defaultLocaleValue?"":this.currentLocaleValue},set currentLocale(e){this.currentLocaleValue=e},get defaultLocale(){return this.defaultLocaleValue},set defaultLocale(e){this.defaultLocaleValue=e},getString:function(e){var t=this.currentLocale?this.locales[this.currentLocale]:this.locales[this.defaultLocale];t&&t[e]||(t=this.locales[this.defaultLocale]);var i=t[e];return void 0===i&&(i=this.locales.en[e]||e),i},getLocales:function(){var e=[];if(e.push(""),this.supportedLocales&&this.supportedLocales.length>0)for(var t=0;t<this.supportedLocales.length;t++)e.push(this.supportedLocales[t]);else for(var i in this.locales)e.push(i);return e.sort(),e}},s=r.z;n.locales.en=r.z,n.localeNames.en="English"},267:(e,t,i)=>{"use strict";i.d(t,{b:()=>c,w:()=>d});var r=i(87),n=i(156),s=i(555),o=i(818),a=i(557),l=i(70),u=i(240),h=i(873),c=function(){function e(){}return e.postpone=function(t,i){return e.postponeFunction?e.postponeFunction(t,i):setTimeout(t,i)},e}(),d=function(){function e(e,t,i,r){void 0===i&&(i={});var o,a=this;this.question=e,this.options=i,this._type=r,this._showToolbar=!0,this._footerVisualizer=void 0,this._dataProvider=void 0,this._getDataCore=void 0,this.labelTruncateLength=27,this.renderResult=void 0,this.toolbarContainer=void 0,this.headerContainer=void 0,this.contentContainer=void 0,this.footerContainer=void 0,this._supportSelection=!1,this._chartAdapter=void 0,this.onAfterRender=new n.Event,this.onLocaleChanged=new n.Event,this.onStateChanged=new n.Event,this.toolbarItemCreators={},this._backgroundColor="#f7f7f7",this._calculationsCache=void 0,this.loadingData=!1,this._settingState=!1,this._getDataCore=null===(o=this.questionOptions)||void 0===o?void 0:o.getDataCore,this._dataProvider=i.dataProvider||new s.M(t),this._dataProvider.onDataChanged.add((function(){return a.onDataChanged()})),this.loadingData=!!this._dataProvider.dataFn,void 0!==i.labelTruncateLength&&(this.labelTruncateLength=i.labelTruncateLength)}return e.prototype.afterRender=function(e){this.onAfterRender.fire(this,{htmlElement:e})},e.prototype.stateChanged=function(e,t){this._settingState||this.onStateChanged.fire(this,this.getState())},Object.defineProperty(e.prototype,"questionOptions",{get:function(){var e;return this.options[null===(e=this.question)||void 0===e?void 0:e.name]},enumerable:!1,configurable:!0}),e.prototype.onDataChanged=function(){this._calculationsCache=void 0,this.loadingData=!!this._dataProvider.dataFn,this.refresh()},Object.defineProperty(e.prototype,"name",{get:function(){return this.question.valueName||this.question.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataNames",{get:function(){return[this.name]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasHeader",{get:function(){return!!(this.options&&this.options.showCorrectAnswers&&this.question&&this.question.correctAnswer)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasFooter",{get:function(){return!!this.question&&(this.question.hasComment||this.question.hasOther)},enumerable:!1,configurable:!0}),e.prototype.createVisualizer=function(e,t,i){var r=Object.assign({},t||this.options);return void 0===r.dataProvider&&(r.dataProvider=this.dataProvider),o.D.createVisualizer(e,i||this.data,r)},Object.defineProperty(e.prototype,"footerVisualizer",{get:function(){var e=this;if(this.hasFooter){if(!this._footerVisualizer){var t=new n.QuestionCommentModel(this.question.name+(n.settings||{}).commentPrefix);t.title=this.processText(this.question.title);var i=Object.assign({},this.options);i.renderContent=void 0,this._footerVisualizer=this.createVisualizer(t,i),this._footerVisualizer&&(this._footerVisualizer.onUpdate=function(){return e.invokeOnUpdate()})}return this._footerVisualizer}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportSelection",{get:function(){return(void 0===this.options.allowSelection||this.options.allowSelection)&&this._supportSelection},enumerable:!1,configurable:!0}),e.prototype.getSeriesValues=function(){return this.options.seriesValues||[]},e.prototype.getSeriesLabels=function(){return this.options.seriesLabels||this.getSeriesValues()},e.prototype.getValues=function(){throw new Error("Method not implemented.")},e.prototype.getLabels=function(){return this.getValues()},e.prototype.registerToolbarItem=function(e,t){this.toolbarItemCreators[e]=t},e.prototype.unregisterToolbarItem=function(e){if(void 0!==this.toolbarItemCreators[e]){var t=this.toolbarItemCreators[e];return delete this.toolbarItemCreators[e],t}},Object.defineProperty(e.prototype,"type",{get:function(){return this._type||"visualizer"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.dataProvider.filteredData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"surveyData",{get:function(){return this.dataProvider.filteredData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataProvider",{get:function(){return this._dataProvider},enumerable:!1,configurable:!0}),e.prototype.updateData=function(e){this.options.dataProvider||(this.dataProvider.data=e),this.hasFooter&&this.footerVisualizer.updateData(e)},e.prototype.invokeOnUpdate=function(){this.onUpdate&&this.onUpdate()},e.prototype.destroy=function(){this.renderResult&&(this.clear(),this.toolbarContainer=void 0,this.headerContainer=void 0,this.contentContainer=void 0,this.footerContainer=void 0,this.renderResult.innerHTML="",this.renderResult=void 0),this._footerVisualizer&&(this._footerVisualizer.destroy(),this._footerVisualizer.onUpdate=void 0,this._footerVisualizer=void 0)},e.prototype.clear=function(){this.toolbarContainer&&this.destroyToolbar(this.toolbarContainer),this.headerContainer&&this.destroyHeader(this.headerContainer),this.contentContainer&&this.destroyContent(this.contentContainer),this.footerContainer&&this.destroyFooter(this.footerContainer)},e.prototype.createToolbarItems=function(e){var t=this;Object.keys(this.toolbarItemCreators||{}).forEach((function(i){var r=t.toolbarItemCreators[i](e);r&&e.appendChild(r)}))},e.prototype.getCorrectAnswerText=function(){return this.question?this.question.correctAnswer:""},e.prototype.destroyToolbar=function(e){e.innerHTML=""},e.prototype.renderToolbar=function(e){if(this.showToolbar){var t=l.gf.createElement("div","sa-toolbar");this.createToolbarItems(t),e.appendChild(t)}},e.prototype.destroyHeader=function(e){this.options&&"function"==typeof this.options.destroyHeader?this.options.destroyHeader(e,this):e.innerHTML=""},e.prototype.destroyContent=function(e){this.options&&"function"==typeof this.options.destroyContent?this.options.destroyContent(e,this):this._chartAdapter&&this._chartAdapter.destroy(e.children[0]),e.innerHTML=""},e.prototype.renderHeader=function(e){if(this.options&&"function"==typeof this.options.renderHeader)this.options.renderHeader(e,this);else{var t=l.gf.createElement("div","sa-visualizer__correct-answer");t.innerText=u.q.getString("correctAnswer")+this.getCorrectAnswerText(),e.appendChild(t)}},e.prototype.renderContentAsync=function(e){return(0,r.sH)(this,void 0,void 0,(function(){var t;return(0,r.YH)(this,(function(i){switch(i.label){case 0:return this._chartAdapter?(t=l.gf.createElement("div"),e.innerHTML="",e.appendChild(t),[4,this._chartAdapter.create(t)]):[3,2];case 1:return i.sent(),[3,3];case 2:e.innerText=u.q.getString("noVisualizerForQuestion"),i.label=3;case 3:return[2,e]}}))}))},e.prototype.ensureQuestionIsReady=function(){var e=this;return new Promise((function(t){e.question?e.question.waitForQuestionIsReady().then((function(){return t()})):t()}))},e.prototype.renderContent=function(e){var t=this;this.options&&"function"==typeof this.options.renderContent?!1!==this.options.renderContent(e,this)&&this.afterRender(e):(this.loadingData&&this.renderLoadingIndicator(this.contentContainer),this.ensureQuestionIsReady().then((function(){return t.renderContentAsync(e).then((function(e){return t.afterRender(e)}))})))},e.prototype.destroyFooter=function(e){e.innerHTML=""},e.prototype.renderFooter=function(t){var i=this;if(t.innerHTML="",this.hasFooter){var r=l.gf.createElement("h4","sa-visualizer__footer-title",{innerText:u.q.getString("otherCommentTitle")});t.appendChild(r);var n=l.gf.createElement("div","sa-visualizer__footer-content");n.style.display=e.otherCommentCollapsed?"none":"block";var s=l.gf.createButton((function(){"none"===n.style.display?(n.style.display="block",s.innerText=u.q.getString("hideButton")):(n.style.display="none",s.innerText=u.q.getString(e.otherCommentCollapsed?"showButton":"hideButton")),i.footerVisualizer.invokeOnUpdate()}),u.q.getString("showButton"));t.appendChild(s),t.appendChild(n),this.footerVisualizer.render(n)}},e.prototype.render=function(e){"string"==typeof e&&(e=document.getElementById(e)),this.renderResult=e,this.toolbarContainer=l.gf.createElement("div","sa-visualizer__toolbar"),e.appendChild(this.toolbarContainer),this.renderToolbar(this.toolbarContainer),this.hasHeader&&(this.headerContainer=l.gf.createElement("div","sa-visualizer__header"),e.appendChild(this.headerContainer),this.renderHeader(this.headerContainer)),this.contentContainer=l.gf.createElement("div","sa-visualizer__content"),e.appendChild(this.contentContainer),this.renderContent(this.contentContainer),this.footerContainer=l.gf.createElement("div","sa-visualizer__footer"),e.appendChild(this.footerContainer),this.renderFooter(this.footerContainer)},e.prototype.updateToolbar=function(){var e=this;this.toolbarContainer&&c.postpone((function(){e.destroyToolbar(e.toolbarContainer),e.renderToolbar(e.toolbarContainer)}))},e.prototype.isSupportSoftUpdateContent=function(){return!1},e.prototype.softUpdateContent=function(){},e.prototype.hardUpdateContent=function(){this.destroyContent(this.contentContainer),this.renderContent(this.contentContainer)},e.prototype.updateContent=function(){this.isSupportSoftUpdateContent()?this.softUpdateContent():this.hardUpdateContent()},e.prototype.refresh=function(){var e=this;this.headerContainer&&c.postpone((function(){e.destroyHeader(e.headerContainer),e.renderHeader(e.headerContainer),e.invokeOnUpdate()})),this.contentContainer&&c.postpone((function(){e.updateContent(),e.invokeOnUpdate()})),this.footerContainer&&c.postpone((function(){e.destroyFooter(e.footerContainer),e.renderFooter(e.footerContainer),e.invokeOnUpdate()}))},e.prototype.processText=function(e){return!1!==this.options.stripHtmlFromTitles?(e||"").replace(/(<([^>]+)>)/gi,""):e},e.prototype.getRandomColor=function(){var e=this.getColors();return e[Math.floor(Math.random()*e.length)]},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this.getBackgroundColorCore()},set:function(e){this.setBackgroundColorCore(e)},enumerable:!1,configurable:!0}),e.prototype.getBackgroundColorCore=function(){return this._backgroundColor},e.prototype.setBackgroundColorCore=function(e){this._backgroundColor=e,this.footerVisualizer&&(this.footerVisualizer.backgroundColor=e)},e.prototype.getColors=function(t){void 0===t&&(t=10);for(var i=Array.isArray(e.customColors)&&e.customColors.length>0?e.customColors:e.colors,r=[],n=0;n<t;n++)r=r.concat(i);return r},Object.defineProperty(e.prototype,"showToolbar",{get:function(){return this._showToolbar},set:function(e){e!=this._showToolbar&&(this._showToolbar=e,this.toolbarContainer&&(this.destroyToolbar(this.toolbarContainer),this.renderToolbar(this.toolbarContainer)))},enumerable:!1,configurable:!0}),e.prototype.getData=function(){return this.getCalculatedValuesCore()},e.prototype.getCalculatedValuesCore=function(){return this._getDataCore?this._getDataCore(this):(0,h.X3)(this.surveyData,this)},e.prototype.renderLoadingIndicator=function(e){e.appendChild((0,l.QV)())},e.prototype.convertFromExternalData=function(e){return e},e.prototype.getCalculatedValues=function(){var e=this;return new Promise((function(t,i){if(void 0!==e._calculationsCache&&t(e._calculationsCache),e.dataProvider.dataFn){e.loadingData=!0;var r=e.dataProvider.dataFn({visualizer:e,filter:e.dataProvider.getFilters(),callback:function(r){e.loadingData=!1,!r.error&&Array.isArray(r.data)?(e._calculationsCache=e.convertFromExternalData(r.data),t(e._calculationsCache)):i()}});r&&r.then((function(i){e.loadingData=!1,e._calculationsCache=e.convertFromExternalData(i),t(e._calculationsCache)})).catch((function(){e.loadingData=!1,i()}))}else e._calculationsCache=e.getCalculatedValuesCore(),t(e._calculationsCache)}))},e.prototype.getState=function(){return{}},e.prototype.setState=function(e){},Object.defineProperty(e.prototype,"locale",{get:function(){var e=this.options.survey;return e?e.locale:u.q.currentLocale},set:function(e){this.setLocale(e),this.onLocaleChanged.fire(this,{locale:e}),this.refresh()},enumerable:!1,configurable:!0}),e.prototype.setLocale=function(e){u.q.currentLocale=e;var t=this.options.survey;t&&t.locale!==e&&(t.locale=e)},e.suppressVisualizerStubRendering=!1,e.chartAdapterType=void 0,e.otherCommentCollapsed=!0,e.customColors=[],e.colors=["#86e1fb","#3999fb","#ff6771","#1eb496","#ffc152","#aba1ff","#7d8da5","#4ec46c","#cf37a6","#4e6198"],e}();a.g.defaultVisualizer=d},288:(e,t,i)=>{var r={"./detail.svg":782,"./drag.svg":307,"./hide.svg":41,"./makeprivate.svg":24,"./makepublic.svg":452,"./moveToDetails.svg":637,"./nonCommercial.svg":388,"./sorting.svg":999};function n(e){var t=s(e);return i(t)}function s(e){if(!i.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}n.keys=function(){return Object.keys(r)},n.resolve=s,e.exports=n,n.id=288},307:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><polygon points="13,5 12,6 13,7 9,7 9,3 10,4 11,3 8,0 5,3 6,4 7,3 7,7 3,7 4,6 3,5 0,8 3,11 4,10 3,9 7,9 7,13 6,12 5,13 8,16 11,13 10,12 9,13 9,9 13,9 12,10 13,11 16,8 "></polygon></g></svg>'},388:e=>{e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><path d="M8,0L0,15h16L8,0z M9,13H7v-2h2V13z M7,10V5h2v5H7z"></path></svg>'},391:(e,t,i)=>{"use strict";i.d(t,{z:()=>r});var r={groupButton:"Group By Me",ungroupButton:"Ungroup By Me",selectButton:"Select Me",hideColumn:"Hide column",showColumn:"Show column",makePrivateColumn:"Make column private",makePublicColumn:"Make column public",moveToDetail:"Move to Detail",showAsColumn:"Show as Column",filterPlaceholder:"Search...",removeRows:"Remove rows",showLabel:"Show",entriesLabel:"entries",visualizer_text:"Texts in table",visualizer_wordcloud:"Wordcloud",visualizer_histogram:"Histogram",visualizer_number:"Average",visualizer_choices:"Table",visualizer_selectBase:"Chart",visualizer_matrix:"Chart",chartType_bar:"Bar",chartType_vbar:"Vertical Bar",chartType_stackedbar:"Stacked Bar",chartType_doughnut:"Doughnut",chartType_pie:"Pie",chartType_scatter:"Scatter",chartType_gauge:"Gauge",chartType_bullet:"Bullet",chartType_line:"Line",hideButton:"Hide",makePrivateButton:"Make private",makePublicButton:"Make public",showButton:"Show",filter:"Filter",resetFilter:"Reset Filter",changeLocale:"Change Locale",clearButton:"Clear",addElement:"Choose question to show...",defaultOrder:"Default Order",ascOrder:"Ascending",descOrder:"Descending",showMinorColumns:"Show minor columns",actionsColumn:"Actions",otherCommentTitle:"Other items and comments",showPercentages:"Show percentages",hidePercentages:"Hide percentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Download plot as a PNG file",hideEmptyAnswers:"Hide empty answers",showEmptyAnswers:"Show empty answers","topNValueText-1":"All answers",topNValueText5:"Top 5 answers",topNValueText10:"Top 10 answers",topNValueText20:"Top 20 answers",hideMissingAnswers:"Hide missing answers",showMissingAnswers:"Show missing answers",missingAnswersLabel:"Missing answers",noVisualizerForQuestion:"This question type is not visualized yet",noResults:"There are no results yet",showPerValues:"Per Values",showPerColumns:"Per Columns",answer:"Answer",correctAnswer:"Correct answer: ",percent:"Percent",percentage:"Percentage",statistics_chart:"Chart",responses:"Responses",visualizer_nps:"NPS",npsScore:"NPS",npsPromoters:"Promoters",npsPassives:"Passives",npsDetractors:"Detractors",axisXSelectorTitle:"X axis:",axisYSelectorTitle:"Y axis:"}},452:e=>{e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><g><circle cx="6" cy="5" r="3"></circle><path d="M10,5c0,0.34-0.06,0.67-0.14,0.99C9.91,5.99,9.95,6,10,6c1.66,0,3-1.34,3-3s-1.34-3-3-3 C8.97,0,8.07,0.52,7.53,1.3C8.98,1.91,10,3.33,10,5z"></path><path d="M6,9c-3.31,0-6,2.73-6,4.67S3.27,16,6,16s6-0.4,6-2.33S9.31,9,6,9z"></path><path d="M10,7C9.81,7,9.62,7.01,9.43,7.03C9.09,7.6,8.62,8.07,8.06,8.42c3,0.83,5.23,3.31,5.42,5.28 c1.44-0.31,2.52-0.92,2.52-2.03C16,9.74,13.31,7,10,7z"></path></g></svg>'},472:(e,t,i)=>{"use strict";i.d(t,{y:()=>h});var r=i(87),n=i(156),s=i(183),o=i(70),a=i(267),l=i(240),u=i(557),h=function(e){function t(t,i,r,n){var s=e.call(this,null,i,r,n||"pivot")||this;return s.questions=t,s.valueType="enum",s._cachedValues=void 0,s._continiousData=void 0,s._cachedIntervals=void 0,s._intervalPrecision=2,s.axisYSelectors=[],s.axisYQuestionNames=[],s.questionsY=[],s.questions=s.questions.filter((function(e){return-1===["matrixdropdown","matrixdynamic","matrix","file","signature","multipletext","comment","html","image"].indexOf(e.getType())})),void 0!==s.options.intervalPrecision&&(s._intervalPrecision=s.options.intervalPrecision),s.axisXQuestionName=s.questions.length>0?s.questions[0].name:void 0,s.registerToolbarItem("axisXSelector",(function(){return s.axisXSelector=o.gf.createSelector(s.questions.map((function(e){return{value:e.name,text:e.title||e.name}})),(function(e){return s.axisXQuestionName===e.value}),(function(e){s.axisXQuestionName=e.target.value,s.setupPivot()}),l.q.getString("axisXSelectorTitle"))})),s.registerToolbarItem("axisYSelector0",s.createYSelecterGenerator()),s.setupPivot(),s}return(0,r.C6)(t,e),t.prototype.createYSelecterGenerator=function(){var e=this,t=this.axisYSelectors.length;return function(){var i=e.axisYSelectors[t];return i||(i=e.createAxisYSelector(t),e.axisYSelectors.push(i)),i}},t.prototype.setAxisQuestions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];e.length<1||(this.axisXQuestionName=e[0],this.axisYQuestionNames=e.splice(1),this.setupPivot())},t.prototype.onAxisYSelectorChanged=function(e,t){if(this.axisYQuestionNames[e]=t,e<this.axisYSelectors.length-1){if(!t){for(var i=e+1;i<this.axisYSelectors.length;++i)this.unregisterToolbarItem("axisYSelector"+i);this.axisYSelectors=this.axisYSelectors.slice(0,e+1),this.axisYQuestionNames=this.axisYQuestionNames.slice(0,e+1),this.updateToolbar()}}else t&&(this.registerToolbarItem("axisYSelector"+this.axisYSelectors.length,this.createYSelecterGenerator()),this.updateToolbar());this.setupPivot()},t.prototype.createAxisYSelector=function(e){var t=this;return o.gf.createSelector([{value:"",text:"Not selected"}].concat(this.questions.map((function(e){return{value:e.name,text:e.title||e.name}}))),(function(i){return t.axisYQuestionNames[e]===i.value}),(function(i){t.onAxisYSelectorChanged(e,i.target.value)}),e?void 0:l.q.getString("axisYSelectorTitle"))},t.prototype.getQuestionValueType=function(e){var t=e.getType();return"text"!==t||"date"!==e.inputType&&"datetime"!==e.inputType?"text"===t||"rating"===t||"expression"===t||"range"===t?"number":"enum":"date"},t.prototype.setupPivot=function(){var e=this,t=this.questions.filter((function(t){return t.name===e.axisXQuestionName}))[0];t&&(this.question=t,this.valueType=this.getQuestionValueType(t),this.questionsY=this.axisYQuestionNames.map((function(t){var i=e.questions.filter((function(e){return e.name===t}))[0];if(i)return"enum"===e.getQuestionValueType(i)?new s.o(i,[]):new a.w(i,[])})).filter((function(e){return!!e})),this.onDataChanged())},t.prototype.reset=function(){this._continiousData=void 0,this._cachedValues=void 0,this._cachedIntervals=void 0},t.prototype.getContiniousValue=function(e){return"date"===this.valueType?Date.parse(e):parseFloat(e)},t.prototype.getString=function(e){return"date"===this.valueType?new Date(e).toLocaleDateString():""+e},t.prototype.toPrecision=function(e){var t=Math.pow(10,this._intervalPrecision);return Math.round(t*e)/t},t.prototype.getSelectedItemByText=function(e){if(this.hasCustomIntervals||this.getContiniousValues().length>t.UseIntervalsFrom){var i=this.intervals.filter((function(t){return t.label===e}))[0];return new n.ItemValue(i,void 0!==i?i.label:"")}var r=this.getLabels(),s=r.indexOf(e);return new n.ItemValue(this.getValues()[s],r[s])},t.prototype.updateData=function(t){this.reset(),e.prototype.updateData.call(this,t)},t.prototype.onDataChanged=function(){this.reset(),e.prototype.onDataChanged.call(this)},t.prototype.getContiniousValues=function(){var e=this;if(void 0===this._cachedValues){if(this._continiousData=[],"enum"===this.valueType)return this._cachedValues=[],this._cachedValues;var t={};this.data.forEach((function(i){var r=i[e.name];void 0!==r&&(e._continiousData.push({continious:e.getContiniousValue(r),row:i}),t[r]={value:r,row:i})})),this._cachedValues=Object.keys(t).map((function(i){return{original:t[i].value,continious:e.getContiniousValue(i),row:t[i].row}})),this._cachedValues.sort((function(e,t){return e.continious-t.continious}))}return this._cachedValues},t.prototype.isSupportAnswersOrder=function(){return!1},t.prototype.isSupportMissingAnswers=function(){return!1},Object.defineProperty(t.prototype,"needUseRateValues",{get:function(){return"rating"==this.question.getType()&&Array.isArray(this.question.rateValues)&&this.question.rateValues.length>0},enumerable:!1,configurable:!0}),t.prototype.getSeriesValues=function(){var e=this;if(!this.questionsY||0===this.questionsY.length)return this.options.seriesValues||[];var t=[];return this.questionsY.forEach((function(i){"enum"===e.getQuestionValueType(i.question)?t.push.apply(t,i.getValues().reverse()):t.push(i.question.name)})),t},t.prototype.getSeriesLabels=function(){var e=this;if(0===this.questionsY.length)return this.getSeriesValues();var t=[];return this.questionsY.forEach((function(i){"enum"===e.getQuestionValueType(i.question)?t.push.apply(t,i.getLabels().reverse()):t.push(i.question.title||i.question.name)})),t},t.prototype.getValues=function(){return"enum"===this.valueType?e.prototype.getValues.call(this).reverse():this.intervals.map((function(e){return e.start}))},t.prototype.getLabels=function(){return"enum"===this.valueType?e.prototype.getLabels.call(this).reverse():this.intervals.map((function(e){return e.label}))},Object.defineProperty(t.prototype,"hasCustomIntervals",{get:function(){return!!this.questionOptions&&Array.isArray(this.questionOptions.intervals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"intervals",{get:function(){if(this.hasCustomIntervals)return this.questionOptions.intervals;if("rating"==this.question.getType()){if(this.needUseRateValues){var e=this.question.rateValues;return e.sort((function(e,t){return e.value-t.value})),e.map((function(t,i){return{start:t.value,end:i<e.length-1?e[i+1].value:t.value+1,label:t.text}}))}for(var i=[],r=this.question.rateMin||0;r<=(this.question.rateMax||t.IntervalsCount-1);r+=this.question.rateStep||1)i.push({start:r,end:r+1,label:""+(this.question.rateMin&&this.question.rateMax?r:r+"-"+(r+1))});return i}if(void 0===this._cachedIntervals){var n=this.getContiniousValues();if(this._cachedIntervals=[],n.length){var s=n[0].continious,o=n[n.length-1].continious,a=t.IntervalsCount,l=(o-s)/a;for(r=0;r<a;++r){var u=s+l,h=this.toPrecision(s),c=this.toPrecision(u);this._cachedIntervals.push({start:h,end:r<a-1?c:c+l/100,label:this.getString(h)+"-"+this.getString(c)}),s=u}}}return this._cachedIntervals},enumerable:!1,configurable:!0}),t.prototype.convertFromExternalData=function(e){return[e]},t.prototype.getSeriesValueIndexes=function(){for(var e=this,t={},i=0,r=0;r<this.questionsY.length;++r)"enum"===this.getQuestionValueType(this.questionsY[r].question)?this.questionsY[r].getValues().reverse().forEach((function(n){t[e.questionsY[r].name+"_"+n]=i++})):t[this.questionsY[r].name]=i++;return t},t.prototype.updateStatisticsSeriesValue=function(e,t,i,r){for(var n=0;n<this.questionsY.length;++n)if(void 0!==t[this.questionsY[n].name]){var s=this.getQuestionValueType(this.questionsY[n].question);"enum"===s||"date"===s?e[r[this.questionsY[n].name+"_"+t[this.questionsY[n].name]]][i]++:e[r[this.questionsY[n].name]][i]+=parseFloat(t[this.questionsY[n].name])}},t.prototype.getCalculatedValuesCore=function(){var e=this,t=[],i=this.getSeriesValues();0===i.length&&i.push("");var r=this.getSeriesValueIndexes();if("enum"===this.valueType){var n=this.getValues(),s={};n.forEach((function(e,t){s[e]=t}));for(var o=0;o<i.length;++o)t.push(n.map((function(e){return 0})));this.data.forEach((function(i){var n=i[e.name];if(void 0!==n&&void 0!==s[n]){var o=s[n];0===e.questionsY.length?t[0][o]++:e.updateStatisticsSeriesValue(t,i,o,r)}}))}else{this.getContiniousValues();var a=this.intervals;for(o=0;o<i.length;++o)t.push(a.map((function(e){return 0})));this._continiousData.forEach((function(i){for(var n=0;n<a.length;++n)if(a[n].start<=i.continious&&(i.continious<a[n].end||n==a.length-1)){0===e.questionsY.length?t[0][n]++:e.updateStatisticsSeriesValue(t,i.row,n,r);break}}))}return t},t.prototype.getValueType=function(){return this.valueType},t.prototype.isSupportSoftUpdateContent=function(){return!1},t.IntervalsCount=10,t.UseIntervalsFrom=10,t}(s.o);u.g.registerPivotVisualizer(h)},555:(e,t,i)=>{"use strict";i.d(t,{M:()=>n});var r=i(156),n=function(){function e(e){void 0===e&&(e=[]),this._data=e,this.filterValues={},this.onDataChanged=new r.Event}return Object.defineProperty(e.prototype,"data",{get:function(){if(Array.isArray(this._data))return this._data},set:function(e){Array.isArray(e)?this._data=[].concat(e):this._data=e,this.raiseDataChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataFn",{get:function(){if("function"==typeof this._data)return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"filteredData",{get:function(){var t=this;return void 0===this._filteredData&&(Object.keys(this.filterValues).length>0?this._filteredData=this.data.filter((function(i){return!Object.keys(t.filterValues).some((function(r){var n=t.filterValues[r],s=typeof n,o=i[r];if(Array.isArray(o)&&"object"!==s)return-1==o.indexOf(n);if("object"==typeof o)return"object"!==s||!function(e,t){var i=Object.keys(e),r=Object.keys(t);if(r.length>i.length)return!1;for(var n=0,s=r;n<s.length;n++){var o=s[n];if(t[o]!=e[o])return!1}return!0}(o,n);var a=i[e.seriesMarkerKey];if(a&&"object"===s)return o!==n[a];if("object"===s&&void 0!==n.start&&void 0!==n.end){var l="number"==typeof o?o:Date.parse(o);return!(!isNaN(l)||(l=parseFloat(o),!isNaN(l)))||l<n.start||l>=n.end}return i[r]!==t.filterValues[r]}))})):this._filteredData=this.data),this._filteredData},enumerable:!1,configurable:!0}),e.prototype.setFilter=function(e,t){var i=!0;void 0!==t?(i=this.filterValues[e]!==t,this.filterValues[e]=t):(i=void 0!==this.filterValues[e],delete this.filterValues[e]),i&&this.raiseDataChanged()},e.prototype.raiseDataChanged=function(e){this._filteredData=void 0,this.onDataChanged.isEmpty||this.onDataChanged.fire(this,{questionName:e})},e.prototype.getFilters=function(){var e=this;return Object.keys(this.filterValues).map((function(t){return{field:t,type:"=",value:e.filterValues[t]}}))},e.seriesMarkerKey="__sa_series_name",e}()},557:(e,t,i)=>{"use strict";i.d(t,{g:()=>r});var r=function(){function e(){}return e.registerVisualizer=function(t,i,r){void 0===r&&(r=Number.MAX_VALUE);var n=e.vizualizers[t];n||(n=[],e.vizualizers[t]=n),n.push({ctor:i,index:r})},e.unregisterVisualizer=function(t,i){var r=[t];t||(r=Object.keys(e.vizualizers)),r.forEach((function(t){if(i){var r=e.vizualizers[t];if(r){var n=r.filter((function(e){return e.ctor===i}))[0];if(n){var s=r.indexOf(n);-1!==s&&r.splice(s,1)}}}else e.vizualizers[t]=[]}))},e.unregisterVisualizerForAll=function(t){e.unregisterVisualizer(void 0,t)},e.getVisualizersByType=function(t){var i=e.vizualizers[t];return i?((i=[].concat(i)).sort((function(e,t){return e.index-t.index})),i.map((function(e){return e.ctor}))):e.defaultVisualizer.suppressVisualizerStubRendering?[]:[e.defaultVisualizer]},e.getAltVisualizerSelector=function(){return e.alternativesVisualizer||e.defaultVisualizer},e.registerAltVisualizerSelector=function(t){e.alternativesVisualizer=t},e.getPivotVisualizerConstructor=function(){return e.pivotVisualizer||e.defaultVisualizer},e.registerPivotVisualizer=function(t){e.pivotVisualizer=t},e.defaultVisualizer=void 0,e.alternativesVisualizer=void 0,e.pivotVisualizer=void 0,e.vizualizers={},e}()},582:(e,t,i)=>{"use strict";i.d(t,{O:()=>s});var r=i(87),n=i(557),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),t.prototype.getQuestionResults=function(){var e=this.question.name;return this.data.map((function(t){return t[e]}))},t.prototype.getEmptyData=function(){var e=this.getValues(),t=[];return t.length=e.length,t.fill(0),t},t.prototype.getCalculatedValuesCore=function(){var e=this,t=this.getQuestionResults(),i=this.getValues(),r=this.getEmptyData();return t.forEach((function(t){e.applyResultToPlotlyData(t,r,i)})),[r]},t.prototype.applyResultToPlotlyData=function(e,t,i){e&&t&&i&&e.forEach((function(e,r,n){var s=i.indexOf(e);t[s]=+t[s]+(n.length-r)}))},t}(i(183).o);n.g.registerVisualizer("ranking",s)},637:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><circle cx="1.5" cy="14.5" r="1.5"></circle><circle cx="7.5" cy="14.5" r="1.5"></circle><circle cx="13.5" cy="14.5" r="1.5"></circle><rect x="12" y="1" width="3" height="9"></rect><path d="M2.02,7.02L1,6L0,7l3,3l3-3L5,6L4.06,6.94C4.33,4.73,6.21,3,8.5,3C8.67,3,8.83,3.03,9,3.05V1.03 C8.83,1.01,8.67,1,8.5,1C5.08,1,2.27,3.66,2.02,7.02z"></path></g></svg>'},782:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><circle cx="1.5" cy="8.5" r="1.5"></circle><circle cx="7.5" cy="8.5" r="1.5"></circle><circle cx="13.5" cy="8.5" r="1.5"></circle></g></svg>'},818:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});var r=i(557),n=function(){function e(){}return e.createVisualizer=function(e,t,i){var n;n="text"===e.getType()&&e.inputType?e.inputType:e.getType();var s=r.g.getVisualizersByType(n).map((function(r){return new r(e,t,i)}));return s.length>1?new(r.g.getAltVisualizerSelector())(s,e,t,i):s[0]},e}()},820:function(e){e.exports=function(){"use strict";var e={},t="swap",i="move",r="layoutStart",n="layoutEnd",s="remove",o="filter",a="sort",l="move",u="send",h="beforeSend",c="receive",d="beforeReceive",p="dragReleaseEnd";function f(){this._events={},this._queue=[],this._counter=0,this._isDestroyed=!1}f.prototype.on=function(e,t){if(this._isDestroyed)return this;var i=this._events[e];return i||(i=this._events[e]=[]),i.push(t),this},f.prototype.off=function(e,t){if(this._isDestroyed)return this;var i=this._events[e];if(!i||!i.length)return this;if(!t)return i.length=0,this;for(var r=i.length;r--;)t===i[r]&&i.splice(r,1);return this},f.prototype.emit=function(e,t,i,r){if(this._isDestroyed)return this;var n=this._events[e];if(!n||!n.length)return this;var s,o=this._queue,a=o.length,l=arguments.length-1;for(s=0;s<n.length;s++)o.push(n[s]);for(++this._counter,s=a,a=o.length;s<a;s++)if(0===l?o[s]():1===l?o[s](t):2===l?o[s](t,i):o[s](t,i,r),this._isDestroyed)return this;return--this._counter,this._counter||(o.length=0),this},f.prototype.destroy=function(){if(this._isDestroyed)return this;var e,t=this._events;for(e in this._isDestroyed=!0,this._queue.length=this._counter=0,t)t[e]&&(t[e].length=0,t[e]=void 0);return this};var g="transform",m="transform",_=window.document.documentElement.style,v="transform",y=!1;["","Webkit","Moz","O","ms"].forEach((function(e){if(!y){var t=e?e+"Transform":v;void 0!==_[t]&&(e=e.toLowerCase(),g=e?"-"+e+"-"+v:v,m=t,y=!0)}}));var b="function"==typeof WeakMap?new WeakMap:null;function w(e,t){var i=b&&b.get(e);return i||(i=window.getComputedStyle(e,null),b&&b.set(e,i)),i.getPropertyValue("transform"===t?g:t)}var C=/([A-Z])/g;function T(e){return e.replace(C,"-$1").toLowerCase()}function x(e){return"function"==typeof e}function P(e,t){for(var i in t)e.style["transform"===i?m:i]=t[i]}function S(e){this._element=e,this._animation=null,this._callback=null,this._props=[],this._values=[],this._keyframes=[],this._options={},this._isDestroyed=!1,this._onFinish=this._onFinish.bind(this)}S.prototype.start=function(e,t,i){if(!this._isDestroyed){var r=this._animation,n=this._props,s=this._values,o=i||0,a=!1;if(r){var l,u=0;for(var h in t)if(++u,-1===(l=n.indexOf(h))||t[h]!==s[l]){a=!0;break}a||u===n.length||(a=!0)}if(a&&r.cancel(),this._callback=x(o.onFinish)?o.onFinish:null,!r||a){for(h in n.length=s.length=0,t)n.push(h),s.push(t[h]);var c=this._keyframes;c[0]=e,c[1]=t;var d=this._options;d.duration=o.duration||300,d.easing=o.easing||"ease";var p=this._element;(r=p.animate(c,d)).onfinish=this._onFinish,this._animation=r,P(p,t)}}},S.prototype.stop=function(e){if(!this._isDestroyed&&this._animation){var t,i,r,n=this._element,s=this._props,o=this._values;if(e)P(n,e);else for(r=0;r<s.length;r++)i=w(n,T(t=s[r])),n.style["transform"===t?m:t]=i;this._animation.cancel(),this._animation=this._callback=null,s.length=o.length=0}},S.prototype.isAnimating=function(){return!!this._animation},S.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=this._options=this._keyframes=null,this._isDestroyed=!0)},S.prototype._onFinish=function(){var e=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,e&&e()};var A=["","webkit","moz","ms","o","Webkit","Moz","MS","O"];function k(e,t){for(var i,r,n=t[0].toUpperCase()+t.slice(1),s=0;s<A.length;){if((r=(i=A[s])?i+n:t)in e)return r;++s}return null}var D=1e3/60,E=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return this.setTimeout((function(){e(D)}),D)}).bind(window),V=!1;try{var z=Object.defineProperty({},"passive",{get:function(){V=!0}});window.addEventListener("testPassive",null,z),window.removeEventListener("testPassive",null,z)}catch(e){}var M="start",O="move",L="end",B="cancel",q=!(!("ontouchstart"in window)&&!window.TouchEvent),N=!!window.PointerEvent,R=!!window.navigator.msPointerEnabled,I=/(android)/i.test(window.navigator.userAgent),j=!!V&&{passive:!0},H="touchAction",F=k(window.document.documentElement.style,H);function Y(e,t){this._element=e,this._emitter=new f,this._isDestroyed=!1,this._cssProps={},this._touchAction="",this._startEvent=null,this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._preStartCheck=this._preStartCheck.bind(this),this._abortNonCancelable=this._abortNonCancelable.bind(this),this._onStart=this._onStart.bind(this),this._onMove=this._onMove.bind(this),this._onCancel=this._onCancel.bind(this),this._onEnd=this._onEnd.bind(this),this.setCssProps(t),this._touchAction||this.setTouchAction("auto"),e.addEventListener("dragstart",Y._preventDefault,!1),e.addEventListener(Y._events.start,this._preStartCheck,j),!q||N||R||e.addEventListener(Y._mouseEvents.start,this._preStartCheck,j)}function G(){this._nextStep=null,this._queue=[],this._reads={},this._writes={},this._batch=[],this._batchReads={},this._batchWrites={},this._step=this._step.bind(this)}Y._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},Y._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},Y._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},Y._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},Y._events=N?Y._pointerEvents:R?Y._msPointerEvents:q?Y._touchEvents:Y._mouseEvents,Y._emitter=new f,Y._activeInstances=[],Y._preventDefault=function(e){e.preventDefault&&!1!==e.cancelable&&e.preventDefault()},Y._activateInstance=function(e){Y._activeInstances.indexOf(e)>-1||(Y._activeInstances.push(e),Y._emitter.on(O,e._onMove),Y._emitter.on(B,e._onCancel),Y._emitter.on(L,e._onEnd),1===Y._activeInstances.length&&Y._bindListeners())},Y._deactivateInstance=function(e){var t=Y._activeInstances.indexOf(e);-1!==t&&(Y._activeInstances.splice(t,1),Y._emitter.off(O,e._onMove),Y._emitter.off(B,e._onCancel),Y._emitter.off(L,e._onEnd),Y._activeInstances.length||Y._unbindListeners())},Y._bindListeners=function(){var e=Y._events;window.addEventListener(e.move,Y._onMove,j),window.addEventListener(e.end,Y._onEnd,j),e.cancel&&window.addEventListener(e.cancel,Y._onCancel,j)},Y._unbindListeners=function(){var e=Y._events;window.removeEventListener(e.move,Y._onMove,j),window.removeEventListener(e.end,Y._onEnd,j),e.cancel&&window.removeEventListener(e.cancel,Y._onCancel,j)},Y._getEventPointerId=function(e){return"number"==typeof e.pointerId?e.pointerId:e.changedTouches?e.changedTouches[0]?e.changedTouches[0].identifier:null:1},Y._getTouchById=function(e,t){if("number"==typeof e.pointerId)return e.pointerId===t?e:null;if(e.changedTouches){for(var i=0;i<e.changedTouches.length;i++)if(e.changedTouches[i].identifier===t)return e.changedTouches[i];return null}return e},Y._onMove=function(e){Y._emitter.emit(O,e)},Y._onCancel=function(e){Y._emitter.emit(B,e)},Y._onEnd=function(e){Y._emitter.emit(L,e)},Y.prototype._reset=function(){this._isDestroyed||(this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._startEvent=null,this._element.removeEventListener(Y._touchEvents.start,this._abortNonCancelable,j),Y._deactivateInstance(this))},Y.prototype._createEvent=function(e,t){var i=this._getTrackedTouch(t);return{type:e,srcEvent:t,distance:this.getDistance(),deltaX:this.getDeltaX(),deltaY:this.getDeltaY(),deltaTime:e===M?0:this.getDeltaTime(),isFirst:e===M,isFinal:e===L||e===B,identifier:this._pointerId,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY,pageX:i.pageX,pageY:i.pageY,target:i.target}},Y.prototype._emit=function(e,t){this._emitter.emit(e,this._createEvent(e,t))},Y.prototype._getTrackedTouch=function(e){return null===this._pointerId?null:Y._getTouchById(e,this._pointerId)},Y.prototype._preStartCheck=function(e){this._isDestroyed||this.isDragging()||I&&!1===e.cancelable||e.button||(this._pointerId=Y._getEventPointerId(e),null!==this._pointerId&&(this._startEvent=e,q&&(N||R)?(I&&this._element.addEventListener(Y._touchEvents.start,this._abortNonCancelable,j),E(this._onStart)):this._onStart()))},Y.prototype._abortNonCancelable=function(e){this._element.removeEventListener(Y._touchEvents.start,this._abortNonCancelable,j),this._startEvent&&!1===e.cancelable&&(this._pointerId=null,this._startEvent=null)},Y.prototype._onStart=function(){var e=this._startEvent;if(e){this._startEvent=null;var t=this._getTrackedTouch(e);t&&(this._startX=this._currentX=t.clientX,this._startY=this._currentY=t.clientY,this._startTime=Date.now(),this._emit(M,e),Y._activateInstance(this))}},Y.prototype._onMove=function(e){var t=this._getTrackedTouch(e);t&&(this._currentX=t.clientX,this._currentY=t.clientY,this._emit(O,e))},Y.prototype._onCancel=function(e){this._getTrackedTouch(e)&&(this._emit(B,e),this._reset())},Y.prototype._onEnd=function(e){this._getTrackedTouch(e)&&(this._emit(L,e),this._reset())},Y.prototype.isDragging=function(){return null!==this._pointerId},Y.prototype.setTouchAction=function(e){this._touchAction=e,F&&(this._cssProps[F]="",this._element.style[F]=e),q&&(this._element.removeEventListener(Y._touchEvents.start,Y._preventDefault,!1),this._element.style[F]!==e&&this._element.addEventListener(Y._touchEvents.start,Y._preventDefault,!1))},Y.prototype.setCssProps=function(e){if(e){var t,i,r=this._cssProps,n=this._element;for(t in r)n.style[t]=r[t],delete r[t];for(t in e)e[t]&&(t!==H?(i=k(n.style,t))&&(r[i]="",n.style[i]=e[t]):this.setTouchAction(e[t]))}},Y.prototype.getDeltaX=function(){return this._currentX-this._startX},Y.prototype.getDeltaY=function(){return this._currentY-this._startY},Y.prototype.getDistance=function(){var e=this.getDeltaX(),t=this.getDeltaY();return Math.sqrt(e*e+t*t)},Y.prototype.getDeltaTime=function(){return this._startTime?Date.now()-this._startTime:0},Y.prototype.on=function(e,t){this._emitter.on(e,t)},Y.prototype.off=function(e,t){this._emitter.off(eventName,t)},Y.prototype.destroy=function(){if(!this._isDestroyed){var e=this._element,t=Y._events;for(var i in this._reset(),this._emitter.destroy(),e.removeEventListener(t.start,this._preStartCheck,j),e.removeEventListener(Y._mouseEvents.start,this._preStartCheck,j),e.removeEventListener("dragstart",Y._preventDefault,!1),e.removeEventListener(Y._touchEvents.start,Y._preventDefault,!1),this._cssProps)e.style[i]=this._cssProps[i],delete this._cssProps[i];this._element=null,this._isDestroyed=!0}},G.prototype.add=function(e,t,i,r){var n=this._queue.indexOf(e);n>-1&&(this._queue[n]=void 0),r?this._queue.unshift(e):this._queue.push(e),this._reads[e]=t,this._writes[e]=i,this._nextStep||(this._nextStep=E(this._step))},G.prototype.cancel=function(e){var t=this._queue.indexOf(e);t>-1&&(this._queue[t]=void 0,delete this._reads[e],delete this._writes[e])},G.prototype._step=function(){var e,t,i=this._queue,r=this._reads,n=this._writes,s=this._batch,o=this._batchReads,a=this._batchWrites,l=i.length;for(this._nextStep=null,t=0;t<l;t++)(e=i[t])&&(s.push(e),o[e]=r[e],delete r[e],a[e]=n[e],delete n[e]);for(i.length=0,t=0;t<l;t++)o[e=s[t]]&&(o[e](),delete o[e]);for(t=0;t<l;t++)a[e=s[t]]&&(a[e](),delete a[e]);s.length=0,!this._nextStep&&i.length&&(this._nextStep=E(this._step))};var Q=new G,X="layout",W="visibility",U="move",K="scroll",Z="placeholder";function J(e){return Q.cancel(e+W)}function $(e){return Q.cancel(e+U)}function ee(e){return Q.cancel(e+K)}function te(e){return Q.cancel(e+Z)}var ie=window.Element.prototype,re=ie.matches||ie.matchesSelector||ie.webkitMatchesSelector||ie.mozMatchesSelector||ie.msMatchesSelector||ie.oMatchesSelector||function(){return!1};function ne(e,t){return re.call(e,t)}function se(e,t){e.classList?e.classList.add(t):ne(e,"."+t)||(e.className+=" "+t)}var oe=[];function ae(e,t,i){var r="number"==typeof i?i:-1;r<0&&(r=e.length-r+1),e.splice.apply(e,oe.concat(r,0,t)),oe.length=0}function le(e,t,i){var r=e.length,n=Math.max(0,i?r:r-1);return t>n?n:t<0?Math.max(n+t+1,0):t}function ue(e,t,i){if(!(e.length<2)){var r=le(e,t),n=le(e,i);r!==n&&e.splice(n,0,e.splice(r,1)[0])}}function he(e,t,i){if(!(e.length<2)){var r,n=le(e,t),s=le(e,i);n!==s&&(r=e[n],e[n]=e[s],e[s]=r)}}var ce="cancel",de="finish",pe=0;function fe(e,t){var i,r=++pe+"debounce";return t>0?function(n){void 0!==i&&(i=window.clearTimeout(i),Q.cancel(r),n===de&&e()),n!==ce&&n!==de&&(i=window.setTimeout((function(){i=void 0,Q.add(r,e,null,!0)}),t))}:function(t){t!==ce&&e()}}function ge(e){var t=w(e,"transform");if(!t||"none"===t)return!1;var i=w(e,"display");return"inline"!==i&&"none"!==i}function me(e,t){for(var i=window.document,r=(t?e:e.parentElement)||i;r&&r!==i&&"static"===w(r,"position")&&!ge(r);)r=r.parentElement||i;return r}function _e(e,t){return parseFloat(w(e,t))||0}var ve={},ye={},be={};function we(e,t){var i,r=t||{};return r.left=0,r.top=0,e===document||(r.left=window.pageXOffset||0,r.top=window.pageYOffset||0,e.self===window.self||(i=e.getBoundingClientRect(),r.left+=i.left,r.top+=i.top,r.left+=_e(e,"border-left-width"),r.top+=_e(e,"border-top-width"))),r}function Ce(e,t,i){return be.left=0,be.top=0,e===t||i&&(e=me(e,!0))===(t=me(t,!0))||(we(e,ve),we(t,ye),be.left=ye.left-ve.left,be.top=ye.top-ve.top),be}var Te="auto",xe="scroll";function Pe(e){var t=w(e,"overflow");return t===Te||t===xe||(t=w(e,"overflow-x"))===Te||t===xe||(t=w(e,"overflow-y"))===Te||t===xe}function Se(e,t,i){for(var r=i||[],n=t?e:e.parentNode;n&&n!==document;)n.getRootNode&&n instanceof DocumentFragment?n=n.getRootNode().host:(Pe(n)&&r.push(n),n=n.parentNode);return r.push(window),r}var Ae={},ke=/^matrix3d/,De=/([^,]*,){4}/,Ee=/([^,]*,){12}/,Ve=/[^,]*,/;function ze(e){Ae.x=0,Ae.y=0;var t=w(e,"transform");if(!t||"none"===t)return Ae;var i=ke.test(t),r=t.replace(i?Ee:De,""),n=r.replace(Ve,"");return Ae.x=parseFloat(r)||0,Ae.y=parseFloat(n)||0,Ae}function Me(e,t){return"translateX("+e+"px) translateY("+t+"px)"}function Oe(e,t){e.classList?e.classList.remove(t):ne(e,"."+t)&&(e.className=(" "+e.className+" ").replace(" "+t+" "," ").trim())}var Le,Be,qe,Ne;function Re(e){var t=e._element,i=e.getGrid(),r=i._settings;this._item=e,this._gridId=i._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=x(r.dragStartPredicate)?r.dragStartPredicate:Re.defaultStartPredicate,this._startPredicateState=0,this._startPredicateResult=void 0,this._hBlockedIndex=null,this._hX1=0,this._hX2=0,this._hY1=0,this._hY2=0,this._reset(),this._preStartCheck=this._preStartCheck.bind(this),this._preEndCheck=this._preEndCheck.bind(this),this._onScroll=this._onScroll.bind(this),this._prepareMove=this._prepareMove.bind(this),this._applyMove=this._applyMove.bind(this),this._prepareScroll=this._prepareScroll.bind(this),this._applyScroll=this._applyScroll.bind(this),this._checkOverlap=this._checkOverlap.bind(this);var n=r.dragSortHeuristics.sortInterval;this._checkOverlapDebounce=fe(this._checkOverlap,n),this._dragger=new Y(t,r.dragCssProps),this._dragger.on("start",this._preStartCheck),this._dragger.on("move",this._preStartCheck),this._dragger.on("cancel",this._preEndCheck),this._dragger.on("end",this._preEndCheck)}function Ie(e,t){return e.left+e.width<=t.left||t.left+t.width<=e.left||e.top+e.height<=t.top||t.top+t.height<=e.top?0:(Math.min(e.left+e.width,t.left+t.width)-Math.max(e.left,t.left))*(Math.min(e.top+e.height,t.top+t.height)-Math.max(e.top,t.top))/(Math.min(e.width,t.width)*Math.min(e.height,t.height))*100}function je(e){this._item=e,this._animate=new S,this._element=null,this._className="",this._didMigrate=!1,this._resetAfterLayout=!1,this._currentLeft=0,this._currentTop=0,this._nextLeft=0,this._nextTop=0,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this),this._onLayoutStart=this._onLayoutStart.bind(this),this._onLayoutEnd=this._onLayoutEnd.bind(this),this._onReleaseEnd=this._onReleaseEnd.bind(this),this._onMigrate=this._onMigrate.bind(this)}function He(){this._queue=[],this._isDestroyed=!1}function Fe(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isInterrupted=!1,this._currentStyles={},this._targetStyles={},this._currentLeft=0,this._currentTop=0,this._offsetLeft=0,this._offsetTop=0,this._skipNextAnimation=!1,this._animateOptions={onFinish:this._finish.bind(this)},this._queue=new He,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}Re.defaultStartPredicate=function(e,t,i){var r=e._drag,n=r._startPredicateData||r._setupStartPredicate(i);if(!t.isFinal)return!(!n.handleElement&&(n.handleElement=r._getStartPredicateHandle(t),!n.handleElement))&&(n.delay&&(n.event=t,n.delayTimer||(n.delayTimer=window.setTimeout((function(){n.delay=0,r._resolveStartPredicate(n.event)&&(r._forceResolveStartPredicate(n.event),r._resetStartPredicate())}),n.delay))),r._resolveStartPredicate(t));r._finishStartPredicate(t)},Re.defaultSortPredicate=(Le={},Be={},qe={},Ne=[],function(e,r){var n=e._drag,s=n._getGrid(),o=r&&"number"==typeof r.threshold?r.threshold:50,a=r&&r.action===t?t:i;Le.width=e._width,Le.height=e._height,Le.left=n._elementClientX,Le.top=n._elementClientY;var l=function(e,t,i){var r,n,s,o,a=null,l=t._settings.dragSort,u=-1;if(!0===l?(Ne[0]=t,n=Ne):n=l.call(t,e),!Array.isArray(n))return a;for(o=0;o<n.length;o++)(s=n[o])._isDestroyed||(s._updateBoundingRect(),Be.width=s._width,Be.height=s._height,Be.left=s._left,Be.top=s._top,(r=Ie(Le,Be))>i&&r>u&&(u=r,a=s));return Ne.length=0,a}(e,s,o);if(!l)return!1;var u,h,c,d,p,f=0,g=0,m=-1;for(l===s?(Le.left=n._gridX+e._marginLeft,Le.top=n._gridY+e._marginTop):(l._updateBorders(1,0,1,0),f=l._left+l._borderLeft,g=l._top+l._borderTop),p=0;p<l._items.length;p++)(c=l._items[p])._isActive&&c!==e&&(h=!0,Be.width=c._width,Be.height=c._height,Be.left=c._left+c._marginLeft+f,Be.top=c._top+c._marginTop+g,(d=Ie(Le,Be))>m&&(u=p,m=d));return m<o&&e.getGrid()!==l&&(u=h?-1:0,m=1/0),m>=o&&(qe.grid=l,qe.index=u,qe.action=a,qe)}),Re.prototype.stop=function(){var e=this._item,t=e._element,i=this._getGrid();return this._isActive?this._isMigrating?(this._finishMigration(),this):($(e._id),ee(e._id),this._unbindScrollListeners(),this._checkOverlapDebounce("cancel"),t.parentNode!==i._element&&(i._element.appendChild(t),t.style[m]=Me(this._gridX,this._gridY)),Oe(t,i._settings.itemDraggingClass),this._reset(),this):this},Re.prototype.destroy=function(){return this._isDestroyed||(this.stop(),this._dragger.destroy(),this._isDestroyed=!0),this},Re.prototype._getGrid=function(){return e[this._gridId]||null},Re.prototype._reset=function(){this._isActive=!1,this._container=null,this._containingBlock=null,this._dragEvent=null,this._scrollEvent=null,this._scrollers=[],this._left=0,this._top=0,this._gridX=0,this._gridY=0,this._elementClientX=0,this._elementClientY=0,this._containerDiffX=0,this._containerDiffY=0},Re.prototype._bindScrollListeners=function(){var e,t,i=this._getGrid()._element,r=this._container,n=this._scrollers;if(n.length=0,Se(this._item._element,!1,n),r!==i)for(Se(i,!0,e=[]),t=0;t<e.length;t++)n.indexOf(e[t])<0&&n.push(e[t]);for(t=0;t<n.length;t++)n[t].addEventListener("scroll",this._onScroll)},Re.prototype._unbindScrollListeners=function(){var e,t=this._scrollers;for(e=0;e<t.length;e++)t[e].removeEventListener("scroll",this._onScroll);t.length=0},Re.prototype._setupStartPredicate=function(e){var t=e||this._getGrid()._settings.dragStartPredicate||0;return this._startPredicateData={distance:Math.abs(t.distance)||0,delay:Math.max(t.delay,0)||0,handle:"string"==typeof t.handle&&t.handle}},Re.prototype._getStartPredicateHandle=function(e){var t=this._startPredicateData,i=this._item._element,r=i;if(!t.handle)return r;for(r=e.target;r&&!ne(r,t.handle);)r=r!==i?r.parentElement:null;return r||null},Re.prototype._resolveStartPredicate=function(e){var t=this._startPredicateData;if(!(e.distance<t.distance||t.delay)){var i=t.handleElement.getBoundingClientRect(),r=i.left+(window.pageXOffset||0),n=i.top+(window.pageYOffset||0),s=i.width,o=i.height;return this._resetStartPredicate(),s&&o&&e.pageX>=r&&e.pageX<r+s&&e.pageY>=n&&e.pageY<n+o}},Re.prototype._forceResolveStartPredicate=function(e){this._isDestroyed||1!==this._startPredicateState||(this._startPredicateState=2,this._onStart(e))},Re.prototype._finishStartPredicate=function(e){var t=this._item._element,i=Math.abs(e.deltaX)<2&&Math.abs(e.deltaY)<2&&e.deltaTime<200;this._resetStartPredicate(),i&&function(e){if("a"===e.tagName.toLowerCase()){var t=e.getAttribute("href");if(t){var i=e.getAttribute("target");i&&"_self"!==i?window.open(t,i):window.location.href=t}}}(t)},Re.prototype._resetHeuristics=function(e){this._hBlockedIndex=null,this._hX1=this._hX2=e.clientX,this._hY1=this._hY2=e.clientY},Re.prototype._checkHeuristics=function(e){var t=this._getGrid()._settings.dragSortHeuristics,i=t.minDragDistance;if(i<=0)return this._hBlockedIndex=null,!0;var r=e.clientX,n=e.clientY,s=r-this._hX2,o=n-this._hY2,a=i>3&&t.minBounceBackAngle>0;if(a||(this._hBlockedIndex=null),Math.abs(s)>i||Math.abs(o)>i){if(a){var l=Math.atan2(s,o),u=Math.atan2(this._hX2-this._hX1,this._hY2-this._hY1),h=Math.atan2(Math.sin(l-u),Math.cos(l-u));Math.abs(h)>t.minBounceBackAngle&&(this._hBlockedIndex=null)}return this._hX1=this._hX2,this._hY1=this._hY2,this._hX2=r,this._hY2=n,!0}return!1},Re.prototype._resetStartPredicate=function(){var e=this._startPredicateData;e&&(e.delayTimer&&(e.delayTimer=window.clearTimeout(e.delayTimer)),this._startPredicateData=null)},Re.prototype._checkOverlap=function(){if(this._isActive){var e,r,n,s,o,a,p,f=this._item,g=this._getGrid()._settings;(e=x(g.dragSortPredicate)?g.dragSortPredicate(f,this._dragEvent):Re.defaultSortPredicate(f,g.dragSortPredicate))&&"number"==typeof e.index&&(p=(r=f.getGrid())!==(s=e.grid||r),n=r._items.indexOf(f),o=le(s._items,e.index,p),a=e.action===t?t:i,(p||o!==this._hBlockedIndex)&&(p?(this._hBlockedIndex=null,r._hasListeners(h)&&r._emit(h,{item:f,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),s._hasListeners(d)&&s._emit(d,{item:f,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),f._gridId=s._id,this._isMigrating=f._gridId!==this._gridId,r._items.splice(n,1),ae(s._items,f,o),f._sortData=null,r._hasListeners(u)&&r._emit(u,{item:f,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),s._hasListeners(c)&&s._emit(c,{item:f,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),r.layout(),s.layout()):n!==o&&(this._hBlockedIndex=n,(a===t?he:ue)(r._items,n,o),r._hasListeners(l)&&r._emit(l,{item:f,fromIndex:n,toIndex:o,action:a}),r.layout())))}},Re.prototype._finishMigration=function(){var e,t,i=this._item,r=i._release,n=i._element,s=i._isActive,o=i.getGrid(),a=o._element,l=o._settings,u=l.dragContainer||a,h=this._getGrid()._settings,c=n.parentNode;this._isMigrating=!1,this.destroy(),Oe(n,h.itemClass),Oe(n,h.itemVisibleClass),Oe(n,h.itemHiddenClass),se(n,l.itemClass),se(n,s?l.itemVisibleClass:l.itemHiddenClass),u!==c&&(u.appendChild(n),t=Ce(c,u,!0),(e=ze(n)).x-=t.left,e.y-=t.top),i._refreshDimensions(),i._refreshSortData(),t=Ce(u,a,!0),r._containerDiffX=t.left,r._containerDiffY=t.top,i._drag=l.dragEnabled?new Re(i):null,u!==c&&(n.style[m]=Me(e.x,e.y)),i._child.removeAttribute("style"),P(i._child,s?l.visibleStyles:l.hiddenStyles),r.start()},Re.prototype._preStartCheck=function(e){0===this._startPredicateState&&(this._startPredicateState=1),1===this._startPredicateState?(this._startPredicateResult=this._startPredicate(this._item,e),!0===this._startPredicateResult?(this._startPredicateState=2,this._onStart(e)):!1===this._startPredicateResult&&(this._startPredicateState=3)):2===this._startPredicateState&&this._isActive&&this._onMove(e)},Re.prototype._preEndCheck=function(e){var t=2===this._startPredicateState;this._startPredicate(this._item,e),this._startPredicateState=0,t&&this._isActive&&this._onEnd(e)},Re.prototype._onStart=function(e){var t=this._item;if(t._isActive){var i,r=t._element,n=this._getGrid(),s=n._settings,o=t._release,a=t._migrate,l=n._element,u=s.dragContainer||l,h=me(u,!0),c=ze(r),d=c.x,p=c.y,f=r.getBoundingClientRect(),g=u!==l;this._resetHeuristics(e),g&&(i=Ce(h,l)),t.isPositioning()&&t._layout.stop(!0,{transform:Me(d,p)}),a._isActive&&(d-=a._containerDiffX,p-=a._containerDiffY,a.stop(!0,{transform:Me(d,p)})),t.isReleasing()&&o._reset(),this._isActive=!0,this._dragEvent=e,this._container=u,this._containingBlock=h,this._elementClientX=f.left,this._elementClientY=f.top,this._left=this._gridX=d,this._top=this._gridY=p,s.dragPlaceholder.enabled&&t._dragPlaceholder.create(),n._emit("dragInit",t,e),g&&(this._containerDiffX=i.left,this._containerDiffY=i.top,r.parentNode===u?(this._gridX=d-this._containerDiffX,this._gridY=p-this._containerDiffY):(this._left=d+this._containerDiffX,this._top=p+this._containerDiffY,u.appendChild(r),r.style[m]=Me(this._left,this._top))),se(r,s.itemDraggingClass),this._bindScrollListeners(),n._emit("dragStart",t,e)}},Re.prototype._onMove=function(e){var t,i,r,n=this._item;if(n._isActive){var s=this._getGrid()._settings.dragAxis;if("y"!==s){var o=e.clientX-this._dragEvent.clientX;this._left+=o,this._gridX+=o,this._elementClientX+=o}if("x"!==s){var a=e.clientY-this._dragEvent.clientY;this._top+=a,this._gridY+=a,this._elementClientY+=a}this._dragEvent=e,t=n._id,i=this._prepareMove,r=this._applyMove,Q.add(t+U,i,r,!0)}else this.stop()},Re.prototype._prepareMove=function(){this._item._isActive&&this._getGrid()._settings.dragSort&&this._checkHeuristics(this._dragEvent)&&this._checkOverlapDebounce()},Re.prototype._applyMove=function(){var e=this._item;e._isActive&&(e._element.style[m]=Me(this._left,this._top),this._getGrid()._emit("dragMove",e,this._dragEvent))},Re.prototype._onScroll=function(e){var t,i,r,n=this._item;n._isActive?(this._scrollEvent=e,t=n._id,i=this._prepareScroll,r=this._applyScroll,Q.add(t+K,i,r,!0)):this.stop()},Re.prototype._prepareScroll=function(){var e=this._item;if(e._isActive){var t,i=e._element,r=this._getGrid(),n=r._settings,s=n.dragAxis,o=r._element,a=i.getBoundingClientRect(),l=this._elementClientX-a.left,u=this._elementClientY-a.top;this._container!==o&&(t=Ce(this._containingBlock,o),this._containerDiffX=t.left,this._containerDiffY=t.top),"y"!==s&&(this._left+=l,this._gridX=this._left-this._containerDiffX),"x"!==s&&(this._top+=u,this._gridY=this._top-this._containerDiffY),n.dragSort&&this._checkOverlapDebounce()}},Re.prototype._applyScroll=function(){var e=this._item;e._isActive&&(e._element.style[m]=Me(this._left,this._top),this._getGrid()._emit("dragScroll",e,this._scrollEvent))},Re.prototype._onEnd=function(e){var t=this._item,i=t._element,r=this._getGrid(),n=r._settings,s=t._release;t._isActive?($(t._id),ee(t._id),n.dragSort&&this._checkOverlapDebounce("finish"),this._unbindScrollListeners(),s._containerDiffX=this._containerDiffX,s._containerDiffY=this._containerDiffY,this._reset(),Oe(i,n.itemDraggingClass),r._emit("dragEnd",t,e),this._isMigrating?this._finishMigration():s.start()):this.stop()},je.prototype._onLayoutStart=function(){var e,t,i,r=this._item,n=r.getGrid(),s=n._items.indexOf(r),o=n._layout.slots[2*s],a=n._layout.slots[2*s+1];if(this._didMigrate||r._left!==o||r._top!==a){if(o+=r._marginLeft,a+=r._marginTop,!(n._settings.dragPlaceholder.duration>0)||this._didMigrate){te(r._id);var l={transform:Me(o,a)};return this._animate.isAnimating()?this._animate.stop(l):P(this._element,l),void(this._didMigrate&&(n.getElement().appendChild(this._element),this._didMigrate=!1))}this._nextLeft=o,this._nextTop=a,e=r._id,t=this._setupAnimation,i=this._startAnimation,Q.add(e+Z,t,i)}},je.prototype._setupAnimation=function(){if(this.isActive()){var e=ze(this._element);this._currentLeft=e.x,this._currentTop=e.y}},je.prototype._startAnimation=function(){if(this.isActive()){var e=this._animate,t=this._currentLeft,i=this._currentTop,r=this._nextLeft,n=this._nextTop,s={transform:Me(r,n)};if(t!==r||i!==n){var o=this._item.getGrid()._settings.dragPlaceholder,a={transform:Me(t,i)};e.start(a,s,{duration:o.duration,easing:o.easing,onFinish:this._onLayoutEnd})}else e.isAnimating()&&e.stop(s)}},je.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},je.prototype._onReleaseEnd=function(e){if(e._id===this._item._id){if(!this._animate.isAnimating())return void this.reset();this._resetAfterLayout=!0}},je.prototype._onMigrate=function(e){if(e.item===this._item){var t=this._item.getGrid(),i=e.toGrid;t.off(p,this._onReleaseEnd),t.off(r,this._onLayoutStart),t.off(h,this._onMigrate),i.on(p,this._onReleaseEnd),i.on(r,this._onLayoutStart),i.on(h,this._onMigrate),this._didMigrate=!0}},je.prototype.create=function(){if(this.isActive())this._resetAfterLayout=!1;else{var e,t=this._item,i=t.getGrid(),n=i._settings,s=this._animate;e=x(n.dragPlaceholder.createElement)?n.dragPlaceholder.createElement(t):window.document.createElement("div"),this._element=e,s._element=e,this._className=n.itemPlaceholderClass||"",this._className&&se(e,this._className);var o=t._left+t._marginLeft,a=t._top+t._marginTop;P(e,{display:"block",position:"absolute",left:"0",top:"0",width:t._width+"px",height:t._height+"px",transform:Me(o,a)}),i.on(r,this._onLayoutStart),i.on(p,this._onReleaseEnd),i.on(h,this._onMigrate),x(n.dragPlaceholder.onCreate)&&n.dragPlaceholder.onCreate(t,e),i.getElement().appendChild(e)}},je.prototype.reset=function(){if(this.isActive()){var e=this._element,t=this._item,i=t.getGrid(),n=i._settings,s=this._animate;this._resetAfterLayout=!1,te(t._id),s.stop(),s._element=null,i.off(p,this._onReleaseEnd),i.off(r,this._onLayoutStart),i.off(h,this._onMigrate),this._className&&(Oe(e,this._className),this._className=""),e.parentNode.removeChild(e),this._element=null,x(n.dragPlaceholder.onRemove)&&n.dragPlaceholder.onRemove(t,e)}},je.prototype.updateDimensions=function(e,t){this.isActive()&&P(this._element,{width:e+"px",height:t+"px"})},je.prototype.isActive=function(){return!!this._element},je.prototype.destroy=function(){this.reset(),this._animate.destroy(),this._item=this._animate=null},He.prototype.add=function(e){return this._isDestroyed||this._queue.push(e),this},He.prototype.flush=function(e,t){if(this._isDestroyed)return this;var i,r=this._queue,n=r.length;if(!n)return this;var s=1===n,o=s?r[0]:r.slice(0);if(r.length=0,s)return o(e,t),this;for(i=0;i<n&&(o[i](e,t),!this._isDestroyed);i++);return this},He.prototype.destroy=function(){return this._isDestroyed||(this._isDestroyed=!0,this._queue.length=0),this},Fe.prototype.start=function(e,t){if(!this._isDestroyed){var i,r=this._item,n=r._element,s=r._release,o=r.getGrid()._settings,a=this._isActive,l=s._isActive&&!1===s._isPositioningStarted,u=l?o.dragReleaseDuration:o.layoutDuration,h=l?o.dragReleaseEasing:o.layoutEasing,c=!e&&!this._skipNextAnimation&&u>0;return a&&this._queue.flush(!0,r),l&&(s._isPositioningStarted=!0),x(t)&&this._queue.add(t),c?(this._isActive=!0,this._animateOptions.easing=h,this._animateOptions.duration=u,this._isInterrupted=a,d=r._id,p=this._setupAnimation,f=this._startAnimation,Q.add(d+X,p,f),this):(this._updateOffsets(),this._updateTargetStyles(),i=r._animate.isAnimating(),this.stop(!1,this._targetStyles),!i&&P(n,this._targetStyles),this._skipNextAnimation=!1,this._finish())}var d,p,f},Fe.prototype.stop=function(e,t){if(this._isDestroyed||!this._isActive)return this;var i,r=this._item;return i=r._id,Q.cancel(i+X),r._animate.stop(t),Oe(r._element,r.getGrid()._settings.itemPositioningClass),this._isActive=!1,e&&this._queue.flush(!0,r),this},Fe.prototype.destroy=function(){return this._isDestroyed||(this.stop(!0,{}),this._queue.destroy(),this._item=this._currentStyles=this._targetStyles=this._animateOptions=null,this._isDestroyed=!0),this},Fe.prototype._updateOffsets=function(){if(!this._isDestroyed){var e=this._item,t=e._migrate,i=e._release;this._offsetLeft=i._isActive?i._containerDiffX:t._isActive?t._containerDiffX:0,this._offsetTop=i._isActive?i._containerDiffY:t._isActive?t._containerDiffY:0}},Fe.prototype._updateTargetStyles=function(){this._isDestroyed||(this._targetStyles.transform=Me(this._item._left+this._offsetLeft,this._item._top+this._offsetTop))},Fe.prototype._finish=function(){if(!this._isDestroyed){var e=this._item,t=e._migrate,i=e._release;this._isActive&&(this._isActive=!1,Oe(e._element,e.getGrid()._settings.itemPositioningClass)),i._isActive&&i.stop(),t._isActive&&t.stop(),this._queue.flush(!1,e)}},Fe.prototype._setupAnimation=function(){var e=ze(this._item._element);this._currentLeft=e.x,this._currentTop=e.y},Fe.prototype._startAnimation=function(){var e=this._item,t=e.getGrid()._settings;if(this._updateOffsets(),this._updateTargetStyles(),e._left===this._currentLeft-this._offsetLeft&&e._top===this._currentTop-this._offsetTop)return this._isInterrupted&&this.stop(!1,this._targetStyles),this._isActive=!1,void this._finish();this._isInterrupted||se(e._element,t.itemPositioningClass),this._currentStyles.transform=Me(this._currentLeft,this._currentTop),e._animate.start(this._currentStyles,this._targetStyles,this._animateOptions)};var Ye={};function Ge(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}Ge.prototype.start=function(e,t,i){if(this._isDestroyed)return this;var r,n,s,o,a,l,p,f,g=this._item,_=g._element,v=g.isVisible(),y=g.getGrid(),b=y._settings,w=e._settings,C=e._element,T=e._items,x=y._items.indexOf(g),S=i||window.document.body;if("number"==typeof t)r=le(T,t,!0);else{if(!(n=e._getItem(t)))return this;r=T.indexOf(n)}return(g.isPositioning()||this._isActive||g.isReleasing())&&(p=(l=ze(_)).x,f=l.y),g.isPositioning()&&g._layout.stop(!0,{transform:Me(p,f)}),this._isActive&&(p-=this._containerDiffX,f-=this._containerDiffY,this.stop(!0,{transform:Me(p,f)})),g.isReleasing()&&(p-=g._release._containerDiffX,f-=g._release._containerDiffY,g._release.stop(!0,{transform:Me(p,f)})),g._visibility._stopAnimation(),g._drag&&g._drag.destroy(),g._visibility._queue.flush(!0,g),y._hasListeners(h)&&y._emit(h,{item:g,fromGrid:y,fromIndex:x,toGrid:e,toIndex:r}),e._hasListeners(d)&&e._emit(d,{item:g,fromGrid:y,fromIndex:x,toGrid:e,toIndex:r}),Oe(_,b.itemClass),Oe(_,b.itemVisibleClass),Oe(_,b.itemHiddenClass),se(_,w.itemClass),se(_,v?w.itemVisibleClass:w.itemHiddenClass),y._items.splice(x,1),ae(T,g,r),g._gridId=e._id,S!==(s=_.parentNode)&&(S.appendChild(_),o=Ce(S,s,!0),l||(p=(l=ze(_)).x,f=l.y),_.style[m]=Me(p+o.left,f+o.top)),g._child.removeAttribute("style"),P(g._child,v?w.visibleStyles:w.hiddenStyles),_.style.display=v?"block":"hidden",a=Ce(S,C,!0),g._refreshDimensions(),g._refreshSortData(),g._drag=w.dragEnabled?new Re(g):null,this._isActive=!0,this._container=S,this._containerDiffX=a.left,this._containerDiffY=a.top,y._hasListeners(u)&&y._emit(u,{item:g,fromGrid:y,fromIndex:x,toGrid:e,toIndex:r}),e._hasListeners(c)&&e._emit(c,{item:g,fromGrid:y,fromIndex:x,toGrid:e,toIndex:r}),this},Ge.prototype.stop=function(e,t){if(this._isDestroyed||!this._isActive)return this;var i,r=this._item,n=r._element,s=r.getGrid()._element;return this._container!==s&&(t||(e?(i=ze(n),Ye.transform=Me(i.x-this._containerDiffX,i.y-this._containerDiffY)):Ye.transform=Me(r._left,r._top),t=Ye),s.appendChild(n),P(n,t)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0,this},Ge.prototype.destroy=function(){return this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0),this};var Qe={};function Xe(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}function We(e){var t=e._isActive,i=e._element,r=e.getGrid()._settings;this._item=e,this._isDestroyed=!1,this._isHidden=!t,this._isHiding=!1,this._isShowing=!1,this._queue=new He,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),i.style.display=t?"block":"none",se(i,t?r.itemVisibleClass:r.itemHiddenClass),P(e._child,t?r.visibleStyles:r.hiddenStyles)}Xe.prototype.start=function(){if(this._isDestroyed||this._isActive)return this;var e=this._item,t=e.getGrid();return this._isActive=!0,se(e._element,t._settings.itemReleasingClass),t._emit("dragReleaseStart",e),e._layout.start(!1),this},Xe.prototype.stop=function(e,t){if(this._isDestroyed||!this._isActive)return this;var i,r=this._item,n=r._element,s=r.getGrid(),o=s._element;return this._reset(),n.parentNode!==o&&(t||(e?(i=ze(n),Qe.transform=Me(i.x-this._containerDiffX,i.y-this._containerDiffY)):Qe.transform=Me(r._left,r._top),t=Qe),o.appendChild(n),P(n,t)),e||s._emit(p,r),this},Xe.prototype.destroy=function(){return this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0),this},Xe.prototype._reset=function(){if(!this._isDestroyed){var e=this._item;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,Oe(e._element,e.getGrid()._settings.itemReleasingClass)}},We.prototype.show=function(e,t){if(this._isDestroyed)return this;var i=this._item,r=i._element,n=this._queue,s=x(t)?t:null,o=i.getGrid()._settings;return this._isShowing||this._isHidden?this._isShowing&&!e?(s&&n.add(s),this):(this._isShowing||(n.flush(!0,i),Oe(r,o.itemHiddenClass),se(r,o.itemVisibleClass),this._isHiding||(r.style.display="block")),s&&n.add(s),i._isActive=this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,e,this._finishShow),this):(s&&s(!1,i),this)},We.prototype.hide=function(e,t){if(this._isDestroyed)return this;var i=this._item,r=i._element,n=this._queue,s=x(t)?t:null,o=i.getGrid()._settings;return!this._isHiding&&this._isHidden?(s&&s(!1,i),this):this._isHiding&&!e?(s&&n.add(s),this):(this._isHiding||(n.flush(!0,i),se(r,o.itemHiddenClass),Oe(r,o.itemVisibleClass)),s&&n.add(s),this._isHidden=this._isHiding=!0,i._isActive=this._isShowing=!1,this._startAnimation(!1,e,this._finishHide),this)},We.prototype.destroy=function(){if(this._isDestroyed)return this;var e=this._item,t=e._element,i=e.getGrid(),r=this._queue,n=i._settings;return this._stopAnimation({}),r.flush(!0,e).destroy(),Oe(t,n.itemVisibleClass),Oe(t,n.itemHiddenClass),this._item=null,this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0,this},We.prototype._startAnimation=function(e,t,i){if(!this._isDestroyed){var r,n=this._item,s=n.getGrid()._settings,o=e?s.visibleStyles:s.hiddenStyles,a=parseInt(e?s.showDuration:s.hideDuration)||0,l=(e?s.showEasing:s.hideEasing)||"ease",u=t||a<=0;if(o){if(J(n._id),u)return n._animateChild.isAnimating()?n._animateChild.stop(o):P(n._child,o),void(i&&i());h=n._id,c=function(){r=function(e,t){var i={};for(var r in t)i[r]=w(e,T(r));return i}(n._child,o)},d=function(){n._animateChild.start(r,o,{duration:a,easing:l,onFinish:i})},Q.add(h+W,c,d)}else i&&i()}var h,c,d},We.prototype._stopAnimation=function(e){if(!this._isDestroyed){var t=this._item;J(t._id),t._animateChild.stop(e)}},We.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._queue.flush(!1,this._item))};var Ue={};We.prototype._finishHide=function(){if(this._isHidden){var e=this._item;this._isHiding=!1,Ue.transform=Me(0,0),e._layout.stop(!0,Ue),e._element.style.display="none",this._queue.flush(!1,e)}};var Ke,Ze,Je,$e,et=0;function tt(){return++et}function it(e,t,i){var r=e._settings;this._id=tt(),this._gridId=e._id,this._isDestroyed=!1,this._left=0,this._top=0,this._element=t,this._child=t.children[0],t.parentNode!==e._element&&e._element.appendChild(t),se(t,r.itemClass),"boolean"!=typeof i&&(i="none"!==w(t,"display")),this._isActive=i,t.style.left="0",t.style.top="0",t.style[m]=Me(0,0),this._animate=new S(t),this._animateChild=new S(this._child),this._visibility=new We(this),this._layout=new Fe(this),this._migrate=new Ge(this),this._release=new Xe(this),this._dragPlaceholder=new je(this),this._drag=r.dragEnabled?new Re(this):null,this._refreshDimensions(),this._refreshSortData()}function rt(){this._slots=[],this._slotSizes=[],this._freeSlots=[],this._newSlots=[],this._rectItem={},this._rectStore=[],this._rectId=0,this._layout={slots:null,setWidth:!1,setHeight:!1,width:!1,height:!1},this._sortRectsLeftTop=this._sortRectsLeftTop.bind(this),this._sortRectsTopLeft=this._sortRectsTopLeft.bind(this)}it.prototype.getGrid=function(){return e[this._gridId]},it.prototype.getElement=function(){return this._element},it.prototype.getWidth=function(){return this._width},it.prototype.getHeight=function(){return this._height},it.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},it.prototype.getPosition=function(){return{left:this._left,top:this._top}},it.prototype.isActive=function(){return this._isActive},it.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},it.prototype.isShowing=function(){return!(!this._visibility||!this._visibility._isShowing)},it.prototype.isHiding=function(){return!(!this._visibility||!this._visibility._isHiding)},it.prototype.isPositioning=function(){return!(!this._layout||!this._layout._isActive)},it.prototype.isDragging=function(){return!(!this._drag||!this._drag._isActive)},it.prototype.isReleasing=function(){return!(!this._release||!this._release._isActive)},it.prototype.isDestroyed=function(){return this._isDestroyed},it.prototype._refreshDimensions=function(){if(!this._isDestroyed&&!this._visibility._isHidden){var e=this._element,t=this._dragPlaceholder,i=e.getBoundingClientRect();this._width=i.width,this._height=i.height,this._marginLeft=Math.max(0,_e(e,"margin-left")),this._marginRight=Math.max(0,_e(e,"margin-right")),this._marginTop=Math.max(0,_e(e,"margin-top")),this._marginBottom=Math.max(0,_e(e,"margin-bottom")),t&&t.updateDimensions(this._width,this._height)}},it.prototype._refreshSortData=function(){if(!this._isDestroyed){var e,t=this._sortData={},i=this.getGrid()._settings.sortData;for(e in i)t[e]=i[e](this,this._element)}},it.prototype._destroy=function(e){if(!this._isDestroyed){var t=this._element,i=this.getGrid(),r=i._settings,n=i._items.indexOf(this);this._release.destroy(),this._migrate.destroy(),this._layout.destroy(),this._visibility.destroy(),this._animate.destroy(),this._animateChild.destroy(),this._dragPlaceholder.destroy(),this._drag&&this._drag.destroy(),t.removeAttribute("style"),this._child.removeAttribute("style"),Oe(t,r.itemClass),n>-1&&i._items.splice(n,1),e&&t.parentNode.removeChild(t),this._isActive=!1,this._isDestroyed=!0}},rt.prototype.getLayout=function(e,t,i,r,n){var s,o=this._layout,a=!(!n||!n.fillGaps),l=!(!n||!n.horizontal),u=!(!n||!n.alignRight),h=!(!n||!n.alignBottom),c=!(!n||!n.rounding),d=this._slotSizes;if(o.slots=r||this._slots,o.width=l?0:c?Math.round(t):t,o.height=l?c?Math.round(i):i:0,o.setWidth=l,o.setHeight=!l,o.slots.length=0,d.length=0,!e.length)return o;for(s=0;s<e.length;s++)this._addSlot(e[s],l,a,c,u||h);if(u)for(s=0;s<o.slots.length;s+=2)o.slots[s]=o.width-(o.slots[s]+d[s]);if(h)for(s=1;s<o.slots.length;s+=2)o.slots[s]=o.height-(o.slots[s]+d[s]);return d.length=0,this._freeSlots.length=0,this._newSlots.length=0,this._rectId=0,o},rt.prototype._addSlot=($e={},function(e,t,i,r,n){var s,o,a,l,u,h,c=this._layout,d=this._freeSlots,p=this._newSlots;for(p.length=0,$e.left=null,$e.top=null,$e.width=e._width+e._marginLeft+e._marginRight,$e.height=e._height+e._marginTop+e._marginBottom,r&&($e.width=Math.round($e.width),$e.height=Math.round($e.height)),u=0;u<d.length;u++)if((o=d[u])&&(s=this._getRect(o),$e.width<=s.width+.001&&$e.height<=s.height+.001)){$e.left=s.left,$e.top=s.top;break}for(null===$e.left&&($e.left=t?c.width:0,$e.top=t?0:c.height,i||(l=!0)),!t&&$e.top+$e.height>c.height&&($e.left>0&&p.push(this._addRect(0,c.height,$e.left,1/0)),$e.left+$e.width<c.width&&p.push(this._addRect($e.left+$e.width,c.height,c.width-$e.left-$e.width,1/0)),c.height=$e.top+$e.height),t&&$e.left+$e.width>c.width&&($e.top>0&&p.push(this._addRect(c.width,0,1/0,$e.top)),$e.top+$e.height<c.height&&p.push(this._addRect(c.width,$e.top+$e.height,1/0,c.height-$e.top-$e.height)),c.width=$e.left+$e.width),u=i?0:l?d.length:u;u<d.length;u++)if(o=d[u])for(s=this._getRect(o),a=this._splitRect(s,$e),h=0;h<a.length;h++)o=a[h],(s=this._getRect(o)).width>.49&&s.height>.49&&(!t&&s.top<c.height||t&&s.left<c.width)&&p.push(o);p.length&&this._purgeRects(p).sort(t?this._sortRectsLeftTop:this._sortRectsTopLeft),t?c.width=Math.max(c.width,$e.left+$e.width):c.height=Math.max(c.height,$e.top+$e.height),c.slots.push($e.left,$e.top),n&&this._slotSizes.push($e.width,$e.height),this._freeSlots=p,this._newSlots=d}),rt.prototype._addRect=function(e,t,i,r){var n=++this._rectId,s=this._rectStore;return s[n]=e||0,s[++this._rectId]=t||0,s[++this._rectId]=i||0,s[++this._rectId]=r||0,n},rt.prototype._getRect=function(e,t){var i=t||this._rectItem,r=this._rectStore;return i.left=r[e]||0,i.top=r[++e]||0,i.width=r[++e]||0,i.height=r[++e]||0,i},rt.prototype._splitRect=(Je=[],function(e,t){return Je.length=0,this._doRectsOverlap(e,t)?(e.left<t.left&&Je.push(this._addRect(e.left,e.top,t.left-e.left,e.height)),e.left+e.width>t.left+t.width&&Je.push(this._addRect(t.left+t.width,e.top,e.left+e.width-(t.left+t.width),e.height)),e.top<t.top&&Je.push(this._addRect(e.left,e.top,e.width,t.top-e.top)),e.top+e.height>t.top+t.height&&Je.push(this._addRect(e.left,t.top+t.height,e.width,e.top+e.height-(t.top+t.height))),Je):(Je.push(this._addRect(e.left,e.top,e.width,e.height)),Je)}),rt.prototype._doRectsOverlap=function(e,t){return!(e.left+e.width<=t.left||t.left+t.width<=e.left||e.top+e.height<=t.top||t.top+t.height<=e.top)},rt.prototype._isRectWithinRect=function(e,t){return e.left>=t.left&&e.top>=t.top&&e.left+e.width<=t.left+t.width&&e.top+e.height<=t.top+t.height},rt.prototype._purgeRects=(Ke={},Ze={},function(e){for(var t,i=e.length;i--;)if(t=e.length,e[i])for(this._getRect(e[i],Ke);t--;)if(e[t]&&i!==t&&this._isRectWithinRect(Ke,this._getRect(e[t],Ze))){e[i]=0;break}return e}),rt.prototype._sortRectsTopLeft=function(){var e={},t={};return function(i,r){return this._getRect(i,e),this._getRect(r,t),e.top<t.top?-1:e.top>t.top?1:e.left<t.left?-1:e.left>t.left?1:0}}(),rt.prototype._sortRectsLeftTop=function(){var e={},t={};return function(i,r){return this._getRect(i,e),this._getRect(r,t),e.left<t.left?-1:e.left>t.left?1:e.top<t.top?-1:e.top>t.top?1:0}}();function nt(e){var t=Object.prototype.toString.call(e);return"[object HTMLCollection]"===t||"[object NodeList]"===t}var st=Object.prototype.toString;function ot(e){return"object"==typeof e&&"[object Object]"===st.call(e)}function at(e){return nt(e)?Array.prototype.slice.call(e):Array.prototype.concat(e)}var lt=new rt,ut=function(){},ht="number",ct="string",dt="instant";function pt(t,i){var r,n,s,o,a,l,u=this;if(!((t=this._element=typeof t===ct?window.document.querySelector(t):t).getRootNode?t.getRootNode({composed:!0})===document:window.document.body.contains(t))||t===window.document.documentElement)throw new Error("Container element must be an existing DOM element");x((r=this._settings=(o=pt.defaultOptions,a=i,l=ft({},o),a&&(l=ft(l,a)),l.visibleStyles=(a||0).visibleStyles||(o||0).visibleStyles,l.hiddenStyles=(a||0).hiddenStyles||(o||0).hiddenStyles,l)).dragSort)||(r.dragSort=!!r.dragSort),this._id=tt(),e[this._id]=u,this._isDestroyed=!1,this._layout={id:0,items:[],slots:[],setWidth:!1,setHeight:!1,width:0,height:0},this._emitter=new f,se(t,r.containerClass),this._items=[],typeof(n=r.items)===ct?at(t.children).forEach((function(e){("*"===n||ne(e,n))&&u._items.push(new it(u,e))})):(Array.isArray(n)||nt(n))&&(this._items=at(n).map((function(e){return new it(u,e)}))),typeof(s=r.layoutOnResize)!==ht&&(s=!0===s?0:-1),s>=0&&window.addEventListener("resize",u._resizeHandler=fe((function(){u.refreshItems().layout()}),s)),r.layoutOnInit&&this.layout(!0)}function ft(e,t){var i,r,n,s=Object.keys(t),o=s.length;for(n=0;n<o;n++)i=ot(t[r=s[n]]),ot(e[r])&&i?e[r]=ft(ft({},e[r]),t[r]):i?e[r]=ft({},t[r]):Array.isArray(t[r])?e[r]=t[r].slice(0):e[r]=t[r];return e}return pt.Item=it,pt.ItemLayout=Fe,pt.ItemVisibility=We,pt.ItemMigrate=Ge,pt.ItemAnimate=S,pt.ItemDrag=Re,pt.ItemRelease=Xe,pt.ItemDragPlaceholder=je,pt.Emitter=f,pt.Dragger=Y,pt.Packer=rt,pt.defaultOptions={items:"*",showDuration:300,showEasing:"ease",hideDuration:300,hideEasing:"ease",visibleStyles:{opacity:"1",transform:"scale(1)"},hiddenStyles:{opacity:"0",transform:"scale(0.5)"},layout:{fillGaps:!1,horizontal:!1,alignRight:!1,alignBottom:!1,rounding:!0},layoutOnResize:100,layoutOnInit:!0,layoutDuration:300,layoutEasing:"ease",sortData:null,dragEnabled:!1,dragContainer:null,dragStartPredicate:{distance:0,delay:0,handle:!1},dragAxis:null,dragSort:!0,dragSortHeuristics:{sortInterval:100,minDragDistance:10,minBounceBackAngle:1},dragSortPredicate:{threshold:50,action:i},dragReleaseDuration:300,dragReleaseEasing:"ease",dragCssProps:{touchAction:"none",userSelect:"none",userDrag:"none",tapHighlightColor:"rgba(0, 0, 0, 0)",touchCallout:"none",contentZooming:"none"},dragPlaceholder:{enabled:!1,duration:300,easing:"ease",createElement:null,onCreate:null,onRemove:null},containerClass:"muuri",itemClass:"muuri-item",itemVisibleClass:"muuri-item-shown",itemHiddenClass:"muuri-item-hidden",itemPositioningClass:"muuri-item-positioning",itemDraggingClass:"muuri-item-dragging",itemReleasingClass:"muuri-item-releasing",itemPlaceholderClass:"muuri-item-placeholder"},pt.prototype.on=function(e,t){return this._emitter.on(e,t),this},pt.prototype.off=function(e,t){return this._emitter.off(e,t),this},pt.prototype.getElement=function(){return this._element},pt.prototype.getItems=function(e){if(this._isDestroyed||!e&&0!==e)return this._items.slice(0);var t,i,r=[],n=at(e);for(i=0;i<n.length;i++)(t=this._getItem(n[i]))&&r.push(t);return r},pt.prototype.refreshItems=function(e){if(this._isDestroyed)return this;var t,i=this.getItems(e);for(t=0;t<i.length;t++)i[t]._refreshDimensions();return this},pt.prototype.refreshSortData=function(e){if(this._isDestroyed)return this;var t,i=this.getItems(e);for(t=0;t<i.length;t++)i[t]._refreshSortData();return this},pt.prototype.synchronize=function(){if(this._isDestroyed)return this;var e,t,i,r=this._element,n=this._items;if(n.length){for(i=0;i<n.length;i++)(t=n[i]._element).parentNode===r&&(e=e||window.document.createDocumentFragment()).appendChild(t);e&&r.appendChild(e)}return this._emit("synchronize"),this},pt.prototype.layout=function(e,t){if(this._isDestroyed)return this;var i,s,o,a=this,l=this._element,u=this._updateLayout(),h=u.id,c=u.items.length,d=c;function p(){if(!(--d>0)){var i=a._layout.id!==h,r=x(e)?e:t;x(r)&&r(i,u.items.slice(0)),!i&&a._hasListeners(n)&&a._emit(n,u.items.slice(0))}}if((u.setHeight&&typeof u.height===ht||u.setWidth&&typeof u.width===ht)&&(i="border-box"===w(l,"box-sizing")),u.setHeight&&(typeof u.height===ht?l.style.height=(i?u.height+this._borderTop+this._borderBottom:u.height)+"px":l.style.height=u.height),u.setWidth&&(typeof u.width===ht?l.style.width=(i?u.width+this._borderLeft+this._borderRight:u.width)+"px":l.style.width=u.width),this._hasListeners(r)&&this._emit(r,u.items.slice(0)),!c)return p(),this;for(o=0;o<c;o++)(s=u.items[o])&&(s._left=u.slots[2*o],s._top=u.slots[2*o+1],s.isDragging()?p():s._layout.start(!0===e,p));return this},pt.prototype.add=function(e,t){if(this._isDestroyed||!e)return[];var i=at(e);if(!i.length)return i;var r,n,s=t||0,o=s.layout?s.layout:void 0===s.layout,a=this._items,l=!1;for(n=0;n<i.length;n++)r=new it(this,i[n],s.isActive),i[n]=r,r._isActive&&(l=!0,r._layout._skipNextAnimation=!0);return ae(a,i,s.index),this._hasListeners("add")&&this._emit("add",i.slice(0)),l&&o&&this.layout(o===dt,x(o)?o:void 0),i},pt.prototype.remove=function(e,t){if(this._isDestroyed)return this;var i,r,n=t||0,o=n.layout?n.layout:void 0===n.layout,a=!1,l=this.getItems(),u=this.getItems(e),h=[];for(r=0;r<u.length;r++)i=u[r],h.push(l.indexOf(i)),i._isActive&&(a=!0),i._destroy(n.removeElements);return this._hasListeners(s)&&this._emit(s,u.slice(0),h),a&&o&&this.layout(o===dt,x(o)?o:void 0),u},pt.prototype.show=function(e,t){return this._isDestroyed||this._setItemsVisibility(e,!0,t),this},pt.prototype.hide=function(e,t){return this._isDestroyed||this._setItemsVisibility(e,!1,t),this},pt.prototype.filter=function(e,t){if(this._isDestroyed||!this._items.length)return this;var i,r,n=[],s=[],a=typeof e===ct,l=x(e),u=t||0,h=!0===u.instant,c=u.layout?u.layout:void 0===u.layout,d=x(u.onFinish)?u.onFinish:null,p=-1,f=ut;if(d&&(f=function(){++p&&d(n.slice(0),s.slice(0))}),l||a)for(r=0;r<this._items.length;r++)i=this._items[r],(l?e(i):ne(i._element,e))?n.push(i):s.push(i);return n.length?this.show(n,{instant:h,onFinish:f,layout:!1}):f(),s.length?this.hide(s,{instant:h,onFinish:f,layout:!1}):f(),(n.length||s.length)&&(this._hasListeners(o)&&this._emit(o,n.slice(0),s.slice(0)),c&&this.layout(c===dt,x(c)?c:void 0)),this},pt.prototype.sort=function(){var e,t,i,r;function n(e){for(var t={},i=0;i<e.length;i++)t[e[i]._id]=i;return t}function s(e,i){var n=r[e._id],s=r[i._id];return t?s-n:n-s}function o(o,a){for(var l,u,h,c,d=0,p=0;p<e.length;p++)if(l=e[p][0],u=e[p][1],h=(o._sortData?o:o._refreshSortData())._sortData[l],c=(a._sortData?a:a._refreshSortData())._sortData[l],d="desc"===u||!u&&t?c<h?-1:c>h?1:0:h<c?-1:h>c?1:0)return d;return d||(r||(r=n(i)),d=s(o,a)),d}function l(o,a){var l=e(o,a);return t&&l&&(l=-l),l||(r||(r=n(i)),s(o,a))}return function(n,s){if(this._isDestroyed||this._items.length<2)return this;var u,h=this._items,c=s||0,d=c.layout?c.layout:void 0===c.layout;if(e=n,t=!!c.descending,i=h.slice(0),r=null,x(e))h.sort(l);else if(typeof e===ct)e=n.trim().split(" ").map((function(e){return e.split(":")})),h.sort(o);else{if(!Array.isArray(e))return this;if(e.length!==h.length)throw new Error("[Muuri] sort reference items do not match with grid items.");for(u=0;u<h.length;u++){if(e.indexOf(h[u])<0)throw new Error("[Muuri] sort reference items do not match with grid items.");h[u]=e[u]}t&&h.reverse()}return this._hasListeners(a)&&this._emit(a,h.slice(0),i),d&&this.layout(d===dt,x(d)?d:void 0),this}}(),pt.prototype.move=function(e,r,n){if(this._isDestroyed||this._items.length<2)return this;var s,o,a=this._items,u=n||0,h=u.layout?u.layout:void 0===u.layout,c=u.action===t,d=c?t:i,p=this._getItem(e),f=this._getItem(r);return p&&f&&p!==f&&(s=a.indexOf(p),o=a.indexOf(f),c?he(a,s,o):ue(a,s,o),this._hasListeners(l)&&this._emit(l,{item:p,fromIndex:s,toIndex:o,action:d}),h&&this.layout(h===dt,x(h)?h:void 0)),this},pt.prototype.send=function(e,t,i,r){if(this._isDestroyed||t._isDestroyed||this===t)return this;if(!(e=this._getItem(e)))return this;var n=r||0,s=n.appendTo||window.document.body,o=n.layoutSender?n.layoutSender:void 0===n.layoutSender,a=n.layoutReceiver?n.layoutReceiver:void 0===n.layoutReceiver;return e._migrate.start(t,i,s),e._migrate._isActive&&e._isActive&&(o&&this.layout(o===dt,x(o)?o:void 0),a&&t.layout(a===dt,x(a)?a:void 0)),this},pt.prototype.destroy=function(t){if(this._isDestroyed)return this;var i,r=this._element,n=this._items.slice(0);for(this._resizeHandler&&window.removeEventListener("resize",this._resizeHandler),i=0;i<n.length;i++)n[i]._destroy(t);return Oe(r,this._settings.containerClass),r.style.height="",r.style.width="",this._emit("destroy"),this._emitter.destroy(),e[this._id]=void 0,this._isDestroyed=!0,this},pt.prototype._getItem=function(e){if(this._isDestroyed||!e&&0!==e)return null;if(typeof e===ht)return this._items[e>-1?e:this._items.length+e]||null;if(e instanceof it)return e._gridId===this._id?e:null;for(var t=0;t<this._items.length;t++)if(this._items[t]._element===e)return this._items[t];return null},pt.prototype._updateLayout=function(){var e,t,i,r,n=this._layout,s=this._settings.layout;for(++n.id,n.items.length=0,r=0;r<this._items.length;r++)this._items[r]._isActive&&n.items.push(this._items[r]);return this._refreshDimensions(),e=this._width-this._borderLeft-this._borderRight,t=this._height-this._borderTop-this._borderBottom,i=x(s)?s(n.items,e,t):lt.getLayout(n.items,e,t,n.slots,s),n.slots=i.slots,n.setWidth=Boolean(i.setWidth),n.setHeight=Boolean(i.setHeight),n.width=i.width,n.height=i.height,n},pt.prototype._emit=function(){this._isDestroyed||this._emitter.emit.apply(this._emitter,arguments)},pt.prototype._hasListeners=function(e){var t=this._emitter._events[e];return!(!t||!t.length)},pt.prototype._updateBoundingRect=function(){var e=this._element.getBoundingClientRect();this._width=e.width,this._height=e.height,this._left=e.left,this._top=e.top},pt.prototype._updateBorders=function(e,t,i,r){var n=this._element;e&&(this._borderLeft=_e(n,"border-left-width")),t&&(this._borderRight=_e(n,"border-right-width")),i&&(this._borderTop=_e(n,"border-top-width")),r&&(this._borderBottom=_e(n,"border-bottom-width"))},pt.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1)},pt.prototype._setItemsVisibility=function(e,t,i){var r,n,s=this,o=this.getItems(e),a=i||0,l=!0===a.instant,u=a.onFinish,h=a.layout?a.layout:void 0===a.layout,c=o.length,d=t?"showStart":"hideStart",p=t?"showEnd":"hideEnd",f=t?"show":"hide",g=!1,m=[],_=[];if(c){for(this._hasListeners(d)&&this._emit(d,o.slice(0)),n=0;n<o.length;n++)r=o[n],(t&&!r._isActive||!t&&r._isActive)&&(g=!0),t&&!r._isActive&&(r._layout._skipNextAnimation=!0),t&&r._visibility._isHidden&&_.push(r),r._visibility[f](l,(function(e,t){e||m.push(t),--c<1&&(x(u)&&u(m.slice(0)),s._hasListeners(p)&&s._emit(p,m.slice(0)))}));_.length&&this.refreshItems(_),g&&h&&this.layout(h===dt,x(h)?h:void 0)}else x(u)&&u(o)},pt}()},873:(e,t,i)=>{"use strict";i.d(t,{MH:()=>o,X3:()=>n,er:()=>s});var r=i(555);function n(e,t){var i=t.dataNames,n=[],s=t.getValues(),o={};s.forEach((function(e,t){o[e]=t}));var a=-1!==s.indexOf(void 0),l=t.getSeriesValues(),u={};l.forEach((function(e,t){u[e]=t}));for(var h=l.length||1,c=0;c<i.length;++c){for(var d=new Array,p=0;p<h;++p)d.push(new Array(s.length).fill(0));n.push(d)}return e.forEach((function(e){i.forEach((function(t,i){var s=e[t];if(void 0!==s||a){var h=Array.isArray(s)?s:[s];if(l.length>0)if(void 0!==e[r.M.seriesMarkerKey]){var c=u[e[r.M.seriesMarkerKey]]||0;h.forEach((function(e){n[i][c][o[e]]++}))}else h.forEach((function(e){l.forEach((function(t){if(void 0!==e[t]){var r=u[t]||0;n[i][r][o[e[t]]]++}}))}));else h.forEach((function(e){return n[0][0][o[e]]++}))}}))})),t.dataNames.length>1?n:n[0]}function s(e,t,i){var r=[];0===i.length&&i.push("");for(var n=0;n<i.length;++n)r.push(t.map((function(e){return 0}))),e[i[n]].forEach((function(e){for(var i=0;i<t.length;++i)if(t[i].start<=e&&(e<t[i].end||i==t.length-1)){r[n][i]++;break}}));return r}function o(e,t){var i=Number.MAX_VALUE,r=-Number.MAX_VALUE,n=0,s=0;return e.forEach((function(e){if(void 0!==e[t]){var o=+e[t];s++,n+=o,i>o&&(i=o),r<o&&(r=o)}})),s>0&&(n/=s),[n=Math.ceil(100*n)/100,i,r]}},918:(e,t,i)=>{"use strict";i.d(t,{AlternativeVisualizersWrapper:()=>m,BooleanModel:()=>l.o,DataProvider:()=>n.M,DocumentHelper:()=>g.gf,HistogramModel:()=>u.Y,Matrix:()=>a.u,NpsAdapter:()=>H,NpsVisualizer:()=>F,NpsVisualizerWidget:()=>j,NumberModel:()=>h.R,PivotModel:()=>G.y,PostponeHelper:()=>c.b,RankingModel:()=>Y.O,SelectBase:()=>o.o,StatisticsTable:()=>I,StatisticsTableAdapter:()=>R,Text:()=>N,TextTableAdapter:()=>q,VisualizationManager:()=>d.g,VisualizationMatrixDropdown:()=>E,VisualizationMatrixDynamic:()=>D,VisualizationPanel:()=>A,VisualizationPanelDynamic:()=>k,VisualizerBase:()=>c.w,VisualizerFactory:()=>s.D,WordCloud:()=>B,WordCloudAdapter:()=>L,hideEmptyAnswersInData:()=>o.M,localization:()=>r.q,surveyStrings:()=>r.D,textHelper:()=>z});var r=i(240);r.q.locales.fa={groupButton:"گروه بندی با",ungroupButton:"حذف گروه",selectButton:"انتخاب",hideColumn:"مخفی کردن ستون",showColumn:"نمایش ستون",makePrivateColumn:"خصوصی کردن ستون",makePublicColumn:"عمومی کردن ستون",moveToDetail:"انتقال به جزئیات",showAsColumn:"نمایش به عنوان ستون",filterPlaceholder:"جستجو...",removeRows:"حذف سطرها",showLabel:"نمایش",entriesLabel:"ورودی",visualizer_text:"متون در جدول",visualizer_wordcloud:"ابر کلمات",visualizer_histogram:"هیستوگرام",visualizer_number:"متوسط",visualizer_choices:"جدول",visualizer_selectBase:"نمودار",chartType_bar:"میله ای",chartType_vbar:"نوار عمودی",chartType_stackedbar:"نوار پشته",chartType_doughnut:"دونات",chartType_pie:"دابره ای(pie)",chartType_scatter:"پراکندگی(Scatter)",chartType_gauge:"عقربه ای",chartType_bullet:"Bullet",hideButton:"مخفی",makePrivateButton:"خصوصی کردن",makePublicButton:"عمومی کردن",showButton:"نمایش",filter:"فیلتر",resetFilter:"بازنشانی فیلترها",changeLocale:"تغییر محلی",clearButton:"پاک کردن",addElement:"انتخاب سوال برای نمایش...",defaultOrder:"ترتیب پیشفرض",ascOrder:"صعودی",descOrder:"نزولی",showMinorColumns:"نمایش ستونهای فرعی",otherCommentTitle:"سایر موارد و نظرات",showPercentages:"نمایش درصد",hidePercentages:"درصدهای مخفی",pdfDownloadCaption:"پی دی اف",xlsxDownloadCaption:"اکسل",csvDownloadCaption:"Csv",saveDiagramAsPNG:"دانلود طرح به عنوان یک فایل PNG",hideEmptyAnswers:"مخفی کردن پاسخهای خالی",showEmptyAnswers:"نمایش پاسخهای خالی","topNValueText-1":"همه پاسخ ها",topNValueText5:"5 پاسخ برتر",topNValueText10:"10 پاسخ برتر",topNValueText20:"20 پاسخ برتر",hideMissingAnswers:"مخفی کردن پاسخهای گمشده",showMissingAnswers:"نمایش پاسخهای گمشده",missingAnswersLabel:"پاسخ های گمشده",noVisualizerForQuestion:"این نوع سوال هنوز تجسم نشده است",noResults:"هنوز نتیجه ای حاصل نشده است",showPerValues:"به ازای هر ارزش",showPerColumns:"در هر ستون",answer:"پاسخ",correctAnswer:"پاسخ صحیح: ",percent:"درصد",responses:"پاسخ"},r.q.localeNames.fa="فارسی",r.q.locales.fr={groupButton:"Grouper",ungroupButton:"Dissocier",selectButton:"Sélectionner",hideColumn:"Masquer colonne",showColumn:"Afficher colonne",makePrivateColumn:"Rendre la colonne privé",makePublicColumn:"Rendre la colonne public",moveToDetail:"Déplacer vers détails",showAsColumn:"Afficher en colonne",filterPlaceholder:"Rechercher...",removeRows:"Supprimer colonne",showLabel:"Afficher",entriesLabel:"entrées",visualizer_text:"Textes en table",visualizer_wordcloud:"Nuages de mots",visualizer_histogram:"Histogramme",visualizer_number:"Moyenne",visualizer_choices:"Table",visualizer_selectBase:"Graphique",chartType_bar:"Barres",chartType_vbar:"Barre verticale",chartType_stackedbar:"Barres empilées",chartType_doughnut:"Anneau",chartType_pie:"Secteurs",chartType_scatter:"Nuages de points",chartType_gauge:"Gauge",chartType_bullet:"Bulles",hideButton:"Masquer",makePrivateButton:"Rendre privé",makePublicButton:"Rendre publique",showButton:"Afficher",filter:"Filtre",resetFilter:"Rafraichir Filtres",changeLocale:"Changer les paramètres régionaux",clearButton:"Rafraichir",addElement:"Choisir la question à afficher...",defaultOrder:"Defaut",ascOrder:"Ascendant",descOrder:"Descendant",showMinorColumns:"Afficher les colonnes mineures",otherCommentTitle:"Autre élément et commentaires",showPercentages:"Afficher les pourcentages",hidePercentages:"Masquer les pourcentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Exceller",csvDownloadCaption:"Fichier CSV",saveDiagramAsPNG:"Sauver en png",hideEmptyAnswers:"Masquer les réponses vides",showEmptyAnswers:"Afficher les réponses vides","topNValueText-1":"Toutes les réponses",topNValueText5:"Top 5 des réponses",topNValueText10:"Top 10 des réponses",topNValueText20:"Top 20 des réponses",hideMissingAnswers:"Masquer les réponses manquantes",showMissingAnswers:"Afficher les réponses manquantes",missingAnswersLabel:"Réponses manquantes",noVisualizerForQuestion:"Ce type de question n'est pas encore visualisé",noResults:"Il n'y a pas encore de résultats",showPerValues:"Par valeur",showPerColumns:"Par colonne",answer:"Réponse",correctAnswer:"Réponse correcte: ",percent:"Pourcentage",responses:"Réponses"},r.q.localeNames.fr="Français",r.q.locales.de={groupButton:"Gruppieren",ungroupButton:"Gruppierung aufheben",selectButton:"Mich auswählen",hideColumn:"Spalte ausblenden",showColumn:"Spalte einblenden",makePrivateColumn:"Spalte privat machen",makePublicColumn:"Spalte veröffentlichen",moveToDetail:"in Details verschieben",showAsColumn:"Als Spalte anzeigen",filterPlaceholder:"Suche...",removeRows:"Zeilen entfernen",showLabel:"anzeigen",entriesLabel:"Einträge",visualizer_text:"Texte in Tabellenform",visualizer_wordcloud:"Wordcloud",visualizer_histogram:"Histogramm",visualizer_number:"Durchschnitt",visualizer_choices:"Liste",visualizer_selectBase:"Diagrammtyp",chartType_bar:"Balkendiagramm",chartType_vbar:"Balkendiagramm vertikal",chartType_stackedbar:"Gestapeltes Balkendiagramm",chartType_doughnut:"Donut-Diagramm",chartType_pie:"Kreisdiagramm",chartType_scatter:"Punktediagramm",chartType_gauge:"Pegeldiagramm",chartType_bullet:"Aufzählungsdiagramm",hideButton:"Ausblenden",makePrivateButton:"Privat machen",makePublicButton:"Öffentlich machen",showButton:"Anzeigen",filter:"Filter",resetFilter:"Filter zurücksetzen",changeLocale:"Lokalisierung ändern",clearButton:"Einstellungen löschen",addElement:"Wählen Sie eine Frage, um zu zeigen...",defaultOrder:"Standardreihenfolge",ascOrder:"Aufsteigend",descOrder:"Absteigend",showMinorColumns:"Kleinere Spalten anzeigen",otherCommentTitle:"Andere Punkte und Kommentare",showPercentages:"Prozentsätze anzeigen",hidePercentages:"Prozentsätze ausblenden",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Diagramm als png herunterladen",hideEmptyAnswers:"Leere Antworten ausblenden",showEmptyAnswers:"Leere Antworten anzeigen","topNValueText-1":"Alle Antworten",topNValueText5:"Top 5 Antworten",topNValueText10:"Top 10 Antworten",topNValueText20:"Top 20 Antworten",hideMissingAnswers:"Fehlende Antworten ausblenden",showMissingAnswers:"Fehlende Antworten anzeigen",missingAnswersLabel:"Fehlede Antworten",noVisualizerForQuestion:"Für diesen Fragetyp gibt es noch keine Visualisierung.",noResults:"Es liegen noch keine Ergebnisse vor",showPerValues:"Pro Wert",showPerColumns:"Pro Spalte",answer:"Antwort",correctAnswer:"Korrekte Antwort: ",percent:"Prozent",responses:"Antworten"},r.q.localeNames.de="Deutsch",r.q.locales.no={groupButton:"Grupper",ungroupButton:"Opphev gruppering",selectButton:"Velg",hideColumn:"Skjul kolonne",showColumn:"Vis kolonne",makePrivateColumn:"Gjør kolonne privat",makePublicColumn:"Gjør kolonne offentlig",moveToDetail:"Flytt til detaljert visning",showAsColumn:"Vis som kolonne",filterPlaceholder:"Søk...",removeRows:"Fjern rader",showLabel:"Vis",entriesLabel:"oppføringer",visualizer_text:"Tabellvisning",visualizer_wordcloud:"Ordsky",visualizer_histogram:"Histogram",visualizer_number:"Gjennomsnitt",visualizer_choices:"Bord",visualizer_selectBase:"Sjøkart",chartType_bar:"Stolpediagram",chartType_vbar:"Vertikal stolpe",chartType_stackedbar:"Stablet stolpediagram",chartType_doughnut:"Hjuldiagram",chartType_pie:"Sektordiagram",chartType_scatter:"Punktdiagram",chartType_gauge:"Målediagram",chartType_bullet:"Kulediagram",hideButton:"Skjul",makePrivateButton:"Gjør privat",makePublicButton:"Gjør offentlig",showButton:"Vis",filter:"Filter",resetFilter:"Nullstill filter",changeLocale:"Bytt språk",clearButton:"Tøm",addElement:"Velg spørsmål...",defaultOrder:"Standard",ascOrder:"Stigende",descOrder:"Synkende",showMinorColumns:"Vis mindre kolonner",otherCommentTitle:"Annet og kommentarer",showPercentages:"Vis prosenter",hidePercentages:"Skjul prosenter",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Overgå",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Last ned plott som en PNG-fil",hideEmptyAnswers:"Skjul tomme svar",showEmptyAnswers:"Vis tomme svar","topNValueText-1":"Alle svar",topNValueText5:"Topp 5 svar",topNValueText10:"Topp 10 svar",topNValueText20:"Topp 20 svar",hideMissingAnswers:"Skjul manglende svar",showMissingAnswers:"Vis manglende svar",missingAnswersLabel:"Mangler svar",noVisualizerForQuestion:"Denne spørsmålstypen er ikke visualisert ennå",noResults:"Det er ingen resultater ennå",showPerValues:"Per verdier",showPerColumns:"Per kolonner",answer:"Svare",correctAnswer:"Riktig svar: ",percent:"Prosent",responses:"Svar"},r.q.localeNames.no="Norsk",r.q.locales.pt={groupButton:"Agrupar Por Mim",ungroupButton:"Desagrupar Por Mim",selectButton:"Selecionar",hideColumn:"Esconder coluna",showColumn:"Mostrar coluna",makePrivateColumn:"Tornar coluna privada",makePublicColumn:"Tornar coluna pública",moveToDetail:"Mover para Detalhes",showAsColumn:"Mostrar como Coluna",filterPlaceholder:"Pesquisar...",removeRows:"Remover linhas",showLabel:"Mostrar",entriesLabel:"entradas",visualizer_text:"Textos em tabela",visualizer_wordcloud:"Nuvem de palavras",visualizer_histogram:"Histograma",visualizer_number:"Média",visualizer_choices:"Tabela",visualizer_selectBase:"Gráfico",chartType_bar:"Barra",chartType_vbar:"Barra vertical",chartType_stackedbar:"Barra Empilhada",chartType_doughnut:"Rosca",chartType_pie:"Tarte",chartType_scatter:"Lastro",chartType_gauge:"Escala",chartType_bullet:"Bala",hideButton:"Esconder",makePrivateButton:"Tornar privado",makePublicButton:"Tornar público",showButton:"Mostrar",filter:"Filtrar",resetFilter:"Restaurar Filtro",changeLocale:"Mudar Localização",clearButton:"Limpar",addElement:"Escolher questão para mostrar...",defaultOrder:"Ordenação Padrão",ascOrder:"Ascendente",descOrder:"Descendente",showMinorColumns:"Mostrar colunas menores",otherCommentTitle:"Outros itens e comentários",showPercentages:"Mostrar percentuais",hidePercentages:"Esconder percentuais",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Baixar diagrama como PNG",hideEmptyAnswers:"Esconder perguntas vazias",showEmptyAnswers:"Mostrar perguntas vazias","topNValueText-1":"Todas as respostas",topNValueText5:"Primeiras 5 respostas",topNValueText10:"Primeiras 10 respostas",topNValueText20:"Primeiras 20 respostas",hideMissingAnswers:"Ocultar perguntas não respondidas",showMissingAnswers:"Mostrar perguntas não respondidas",missingAnswersLabel:"Perguntas não respondidas",noVisualizerForQuestion:"Este tipo de pergunta ainda não foi visualizada",noResults:"Ainda não possui resultados",showPerValues:"Por valores",showPerColumns:"Por colunas",answer:"Resposta",correctAnswer:"Resposta correta: ",percent:"Percentagem",responses:"Respostas"},r.q.localeNames.pt="Português",r.q.locales.ru={groupButton:"Сгруппировать",ungroupButton:"Разгруппировать",selectButton:"Выбрать",hideColumn:"Скрыть столбец",showColumn:"Показать столбец",makePrivateColumn:"Сделать столбец приватным",makePublicColumn:"Сделать столбец публичным",moveToDetail:"Спрятать в раскрывающуюся секцию",showAsColumn:"Показать как столбец",filterPlaceholder:"Поиск...",removeRows:"Удалить строки",showLabel:"Показать",entriesLabel:"записей",visualizer_text:"Таблица",visualizer_wordcloud:"Облако тэгов",visualizer_histogram:"Гистограмма",visualizer_number:"Среднее значение",visualizer_choices:"Таблица",visualizer_selectBase:"Диаграмма",visualizer_matrix:"Диаграмма",chartType_bar:"Столбчатая диаграмма",chartType_vbar:"Вертикальная столбчатая диаграмма",chartType_stackedbar:"Столбчатая диаграмма с накоплением",chartType_doughnut:"Кольцевая диаграмма",chartType_pie:"Круговая диаграмма",chartType_scatter:"Точечная диаграмма",chartType_gauge:"Измерительная диаграмма",chartType_bullet:"Маркированная диаграмма",hideButton:"Скрыть",makePrivateButton:"Сделать приватным",makePublicButton:"Сделать публичным",showButton:"Показать",filter:"Фильтр",resetFilter:"Очистить фильтр",changeLocale:"Сменить язык",clearButton:"Очистить",addElement:"Выберите вопрос...",defaultOrder:"Порядок по умолчанию",ascOrder:"Сортировать по возрастанию",descOrder:"Сортировать по убыванию",showMinorColumns:"Показать второстепенные столбцы",otherCommentTitle:"Другое и комментарии",showPercentages:"Показать проценты",hidePercentages:"Скрыть проценты",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Скачать диаграмму в формате PNG",hideEmptyAnswers:"Скрыть пустые ответы",showEmptyAnswers:"Показать пустые ответы","topNValueText-1":"Все ответы",topNValueText5:"Первые 5 ответов",topNValueText10:"Первые 10 ответов",topNValueText20:"Первые 20 ответов",hideMissingAnswers:"Скрыть отсутствующие ответы",showMissingAnswers:"Показать отсутствующие ответы",missingAnswersLabel:"Отсутствующие ответы",noVisualizerForQuestion:"Этот тип вопроса не поддерживается",noResults:"Результаты отсутствуют",showPerValues:"По значениям",showPerColumns:"По столбцам",answer:"Ответ",correctAnswer:"Правильный ответ: ",percent:"процентов",responses:"ответов"},r.q.localeNames.ru="Русский",r.q.locales.nl={groupButton:"Groeperen op",ungroupButton:"Groepering verwijderen",selectButton:"Selecteer mij",hideColumn:"Kolom verbergen",showColumn:"Toon kolom",makePrivateColumn:"Kolom privé maken",makePublicColumn:"Maak kolom openbaar",moveToDetail:"Ga naar detail",showAsColumn:"Weergeven als kolom",filterPlaceholder:"Zoeken...",removeRows:"Verwijder rijen",showLabel:"Tonen",entriesLabel:"inzendingen",visualizer_text:"Teksten in tabel",visualizer_wordcloud:"Wordcloud",visualizer_histogram:"Histogram",visualizer_number:"Gemiddeld",visualizer_choices:"Tabel",visualizer_selectBase:"Grafiek",chartType_bar:"Staafdiagram (liggend)",chartType_vbar:"Staafdiagram",chartType_stackedbar:"Staafdiagram (gestapeld)",chartType_doughnut:"Donut",chartType_pie:"Cirkeldiagram",chartType_scatter:"Spreidingsdiagram",chartType_gauge:"Meterdiagram",chartType_bullet:"Kogelgrafiek",hideButton:"Verbergen",makePrivateButton:"Maak prive",makePublicButton:"Openbaar maken",showButton:"Tonen",filter:"Filter",resetFilter:"Filter resetten",changeLocale:"Wijzig de landinstelling",clearButton:"Wissen",addElement:"Kies een vraag om weer te geven ...",defaultOrder:"Standaardvolgorde",ascOrder:"Oplopend",descOrder:"Aflopend",showMinorColumns:"Toon kleine kolommen",otherCommentTitle:"Andere items en opmerkingen",showPercentages:"Percentages weergeven",hidePercentages:"Verberg percentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Download plot als PNG",hideEmptyAnswers:"Verberg lege antwoorden",showEmptyAnswers:"Toon lege antwoorden","topNValueText-1":"Alle antwoorden",topNValueText5:"Top 5 antwoorden",topNValueText10:"Top 10 antwoorden",topNValueText20:"Top 20 antwoorden",hideMissingAnswers:"Ontbrekende antwoorden verbergen",showMissingAnswers:"Ontbrekende antwoorden weergeven",missingAnswersLabel:"Ontbrekende antwoorden",noVisualizerForQuestion:"Dit vraagtype is nog niet gevisualiseerd",noResults:"Er zijn nog geen resultaten",showPerValues:"Per waarden",showPerColumns:"Per Kolommen",answer:"Antwoorden",correctAnswer:"Goed antwoord: ",percent:"Procent",responses:"Reacties"},r.q.localeNames.nl="Nederlands",r.q.locales.es={groupButton:"Grupo Por Mí",ungroupButton:"Desagrupar por mí",selectButton:"Seleccionarme",hideColumn:"Ocultar columna",showColumn:"Mostrar columna",makePrivateColumn:"Hacer que la columna sea privada",makePublicColumn:"Hacer pública la columna",moveToDetail:"Mover al detalle",showAsColumn:"Mostrar como columna",filterPlaceholder:"Buscar ...",removeRows:"Eliminar filas",showLabel:"Mostrar",entriesLabel:"Entradas",visualizer_text:"Textos en tabla",visualizer_wordcloud:"Wordcloud",visualizer_histogram:"Histograma",visualizer_number:"Promedio",visualizer_choices:"Mesa",visualizer_selectBase:"Gráfico",chartType_bar:"Bar",chartType_vbar:"Barra vertical",chartType_stackedbar:"Barra apilada",chartType_doughnut:"Donut",chartType_pie:"Pie",chartType_scatter:"Dispersión",chartType_gauge:"Gauge",chartType_bullet:"Bullet",hideButton:"Ocultar",makePrivateButton:"Hacer privado",makePublicButton:"Hacer público",showButton:"Mostrar",filter:"Filtro",resetFilter:"Restablecer filtro",changeLocale:"Cambiar configuración regional",clearButton:"Borrar",addElement:"Elija la pregunta para mostrar ...",defaultOrder:"Orden predeterminado",ascOrder:"Ascendente",descOrder:"Descendente",showMinorColumns:"Mostrar columnas secundarias",otherCommentTitle:"Otros elementos y comentarios",showPercentages:"Mostrar porcentajes",hidePercentages:"Ocultar porcentajes",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Descargar el gráfico como png",hideEmptyAnswers:"Ocultar respuestas vacías",showEmptyAnswers:"Mostrar respuestas vacías","topNValueText-1":"Todas las respuestas",topNValueText5:"Las 5 respuestas principales",topNValueText10:"Las 10 respuestas principales",topNValueText20:"20 respuestas principales",hideMissingAnswers:"Ocultar las respuestas que faltan",showMissingAnswers:"Mostrar las respuestas que faltan",missingAnswersLabel:"Respuestas faltantes",noVisualizerForQuestion:"Este tipo de pregunta aún no se visualiza",noResults:"Aún no hay resultados",showPerValues:"Por valores",showPerColumns:"Por columnas",answer:"Respuesta",correctAnswer:"Respuesta correcta: ",percent:"Por ciento",responses:"Respuestas"},r.q.localeNames.es="Español",r.q.locales.it={groupButton:"Raggruppa",ungroupButton:"Dividi",selectButton:"Selezionami",hideColumn:"Nascondi colonna",showColumn:"Mostra colonna",makePrivateColumn:"Rendi la colonna privata",makePublicColumn:"Rendi la colonna pubblica",moveToDetail:"Sposta in Dettaglio",showAsColumn:"Mostra come Colonna",filterPlaceholder:"Cerca...",removeRows:"Rimuovi righe",showLabel:"Mostra",entriesLabel:"voci",visualizer_text:"Parole in tabella",visualizer_wordcloud:"Nuvola di parole",visualizer_histogram:"Istogramma",visualizer_number:"Media",visualizer_choices:"Tabella",visualizer_selectBase:"Grafico",chartType_bar:"Grafico a barre",chartType_vbar:"Grafico a barre verticali",chartType_stackedbar:"Grafico a barre sovrapposte",chartType_doughnut:"Grafico a ciambella",chartType_pie:"Grafico a torta",chartType_scatter:"Grafico a dispersione",chartType_gauge:"Grafico Gauge",chartType_bullet:"Punto",hideButton:"Nascondi",makePrivateButton:"Rendi privato",makePublicButton:"Rendi pubblico",showButton:"Mostra",filter:"Filtro",resetFilter:"Cancella filtro",changeLocale:"Cambia lingua",clearButton:"Cancella",addElement:"Scegli la domanda da mostrare...",defaultOrder:"Ordine di Default",ascOrder:"Ascendente",descOrder:"Discendente",showMinorColumns:"Mostra colonne secondarie",otherCommentTitle:"Altri punti e commenti",showPercentages:"Mostra percentuali",hidePercentages:"Nascondi percentuali",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Scarica il grafico in formato png",hideEmptyAnswers:"Nascondi risposte vuote",showEmptyAnswers:"Mostra risposte vuote","topNValueText-1":"Tutte le risposte",topNValueText5:"Top 5 risposte",topNValueText10:"Top 10 risposte",topNValueText20:"Top 20 risposte",hideMissingAnswers:"Nascondi le risposte mancanti",showMissingAnswers:"Mostra le risposte mancanti",missingAnswersLabel:"Risposte mancanti",noVisualizerForQuestion:"Questo tipo di domanda non è ancora stato visualizzato",noResults:"Non ci sono ancora risultati",showPerValues:"Per Valori",showPerColumns:"Per Colonne",answer:"Risposta",correctAnswer:"Risposta esatta: ",percent:"Percentuale",responses:"Risposte"},r.q.localeNames.it="Italiano",r.q.locales.ar={groupButton:"زرار المجموعة",ungroupButton:"تم التحديث من خلالى",selectButton:"اختر",hideColumn:"اخفاء العمود",showColumn:"اظهار",makePrivateColumn:"أجعل العمود خاص",makePublicColumn:"أجعل العمود عام",moveToDetail:"انتقل إلى التفاصيل",showAsColumn:"إظهار كعمود",filterPlaceholder:"بحث...",removeRows:"حذف",showLabel:"اظهار",entriesLabel:"مدخلات",visualizer_text:"جداول",visualizer_wordcloud:"كلمات",visualizer_histogram:"الرسم البياني",visualizer_number:"متوسط",visualizer_choices:"جدول",visualizer_selectBase:"رسم بياني",chartType_bar:"شريط",chartType_vbar:"شريط عمودي",chartType_stackedbar:"شريط مكدس",chartType_doughnut:"مخطط حلقي",chartType_pie:"مخطط دائري",chartType_scatter:"مخطط التشتت",chartType_gauge:"مخطط القياس",chartType_bullet:"مخطط نقطي",hideButton:"اخفاء",makePrivateButton:"أجعل خاص",makePublicButton:"أجعل عام",showButton:"اظهار",filter:"ترشح",resetFilter:"إعادة تعيين",changeLocale:"تغيير اللغة",clearButton:"مسح",addElement:"اختر سؤالاً للعرض ...",defaultOrder:"الترتيب الافتراضي",ascOrder:"تصاعدى",descOrder:"تنازلى",showMinorColumns:"إظهار الأعمدة الثانوية",otherCommentTitle:"بنود وتعليقات أخرى",showPercentages:"عرض النسب المئوية",hidePercentages:"إخفاء النسب",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"تنزيل بصيغة png",hideEmptyAnswers:"إخفاء الإجابات الفارغة",showEmptyAnswers:"إظهار الإجابات الفارغة","topNValueText-1":"جميع الإجابات",topNValueText5:"أهم 5 إجابات",topNValueText10:"أفضل 10 إجابات",topNValueText20:"أفضل 20 إجابة",hideMissingAnswers:"إخفاء الإجابات المفقودة",showMissingAnswers:"عرض الإجابات المفقودة",missingAnswersLabel:"أجوبة مفقودة",noVisualizerForQuestion:"لم يتم العرض بعد",noResults:"لا يوجد نتائج للعرض",showPerValues:"لكل القيم",showPerColumns:"لكل الأعمدة",answer:"إجب",correctAnswer:"الاجابة الصحيحة: ",percent:"النسبه المئويه",responses:"الاستجابات"},r.q.localeNames.ar="العربية",r.q.locales.ja={groupButton:"グループ化",ungroupButton:"グループ解除",selectButton:"選択",hideColumn:"列を非表示",showColumn:"列を表示",makePrivateColumn:"列を非公開にする",makePublicColumn:"列を公開する",moveToDetail:"詳細に移動",showAsColumn:"列として表示",filterPlaceholder:"検索...",removeRows:"行を削除",showLabel:"表示",entriesLabel:"件",visualizer_text:"テキスト",visualizer_wordcloud:"ワードクラウド",visualizer_histogram:"ヒストグラム",visualizer_number:"平均",visualizer_choices:"テーブル",visualizer_selectBase:"チャート",chartType_bar:"棒グラフ",chartType_vbar:"縦棒グラフ",chartType_stackedbar:"積み上げ棒グラフ",chartType_doughnut:"ドーナツチャート",chartType_pie:"円グラフ",chartType_scatter:"散布図",chartType_gauge:"ゲージ",chartType_bullet:"バレット",hideButton:"非表示",makePrivateButton:"非公開にする",makePublicButton:"公開する",showButton:"表示",filter:"フィルター",resetFilter:"フィルターをリセット",changeLocale:"言語を変更",clearButton:"クリア",addElement:"表示する質問を選択...",defaultOrder:"デフォルト順",ascOrder:"昇順",descOrder:"降順",showMinorColumns:"マイナー列を表示",otherCommentTitle:"その他のアイテムとコメント",showPercentages:"パーセンテージを表示",hidePercentages:"パーセンテージを非表示",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"プロットをPNGファイルとして保存",hideEmptyAnswers:"空の回答を非表示",showEmptyAnswers:"空の回答を表示","topNValueText-1":"すべての回答",topNValueText5:"上位5つの回答",topNValueText10:"上位10の回答",topNValueText20:"上位20の回答",hideMissingAnswers:"欠損値を非表示",showMissingAnswers:"欠損値を表示",missingAnswersLabel:"欠損値",noVisualizerForQuestion:"この質問タイプはまだ視覚化されていません",noResults:"まだ結果がありません",showPerValues:"値ごとに表示",showPerColumns:"列ごとに表示",answer:"回答",correctAnswer:"正解: ",percent:"パーセント",responses:"回答数"},r.q.localeNames.ja="Japanese",r.q.locales.pl={groupButton:"Grupuj według mnie",ungroupButton:"Rozgrupuj według mnie",selectButton:"Wybierz",hideColumn:"Ukryj kolumnę",showColumn:"Pokaż kolumnę",makePrivateColumn:"Uczyń kolumnę prywatną",makePublicColumn:"Uczyń kolumnę publiczną",moveToDetail:"Przenieś do szczegółów",showAsColumn:"Pokaż jako kolumnę",filterPlaceholder:"Szukaj...",removeRows:"Usuń wiersze",showLabel:"Pokaż",entriesLabel:"wejścia",visualizer_text:"Teksty w tabeli",visualizer_wordcloud:"Chmura słów",visualizer_histogram:"Histogram",visualizer_number:"Średnia",visualizer_choices:"Tabela",visualizer_selectBase:"Wykres",visualizer_matrix:"Wykres",chartType_bar:"Słupkowy",chartType_vbar:"Słupkowy pionowy",chartType_stackedbar:"Słupkowy skumulowany",chartType_doughnut:"Oponka",chartType_pie:"Tarta",chartType_scatter:"Rozrzut",chartType_gauge:"Skala",chartType_bullet:"Pocisk",hideButton:"Ukryj",makePrivateButton:"Uczyń prywatnym",makePublicButton:"Uczyń publicznym",showButton:"Pokaż",filter:"Filtruj",resetFilter:"Resetuj filtr",changeLocale:"Zmień lokalizację",clearButton:"Wyczyść",addElement:"Wybierz pytanie do pokazania...",defaultOrder:"Domyślne sortowanie",ascOrder:"Rosnąco",descOrder:"Malejąco",showMinorColumns:"Pokaż mniejsze kolumny",otherCommentTitle:"Inne elementy i komentarze",showPercentages:"Pokaż procenty",hidePercentages:"Ukryj procenty",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Pobierz diagram jako PNG",hideEmptyAnswers:"Ukryj puste odpowiedzi",showEmptyAnswers:"Pokaż puste odpowiedzi","topNValueText-1":"Wszystkie odpowiedzi",topNValueText5:"Pierwsze 5 odpowiedzi",topNValueText10:"Pierwsze 10 odpowiedzi",topNValueText20:"Pierwsze 20 odpowiedzi",hideMissingAnswers:"Ukryj nieodpowiedziane pytania",showMissingAnswers:"Pokaż nieodpowiedziane pytania",missingAnswersLabel:"Nieodpowiedziane pytania",noVisualizerForQuestion:"Ten typ pytania nie został jeszcze zwizualizowany",noResults:"Nie ma jeszcze wyników",showPerValues:"Według wartości",showPerColumns:"Według kolumn",answer:"Odpowiedź",correctAnswer:"Odpowiedź poprawna: ",percent:"Procent",responses:"Odpowiedzi"},r.q.localeNames.pl="Polish",r.q.locales.fi={groupButton:"Erottele minulla",ungroupButton:"Poista erottele minulla",selectButton:"Valitse minut",hideColumn:"Piilota sarake",showColumn:"Näytä sarake",makePrivateColumn:"Merkitse sarake yksityiseksi",makePublicColumn:"Merkitse sarake julkiseksi",moveToDetail:"Siirrä yksityiskohtiin",showAsColumn:"Näytä sarakkeena",filterPlaceholder:"Etsi...",removeRows:"Poista rivejä",showLabel:"Näytä",entriesLabel:"vastauksia",visualizer_text:"Tekstitaulukko",visualizer_wordcloud:"Sanapilvi",visualizer_histogram:"Histogrammi",visualizer_number:"Keskiarvo",visualizer_choices:"Taulukko",visualizer_selectBase:"Kuvaaja",visualizer_matrix:"Kuvaaja",chartType_bar:"Pylväs",chartType_vbar:"Vaakapyöväs",chartType_stackedbar:"Pinottu pylväs",chartType_doughnut:"Donitsi",chartType_pie:"Piirakka",chartType_scatter:"Hajonta",chartType_gauge:"Mittari",chartType_bullet:"Luoti",chartType_line:"Viiva",hideButton:"Piilota",makePrivateButton:"Merkise yksityiseksi",makePublicButton:"Merkitse julkiseksi",showButton:"Näytä",filter:"Rajaa",resetFilter:"Nollaa Rajaus",changeLocale:"Vaihda kieli",clearButton:"Nollaa",addElement:"Valitse näytettävä kysymys...",defaultOrder:"Oletusjärjestys",ascOrder:"Nouseva",descOrder:"Laskeva",showMinorColumns:"Näytä alasarakkeet",otherCommentTitle:"Muut asiat ja kommentit",showPercentages:"Näytä prosentit",hidePercentages:"Piilota prosentit",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Lataa kuvaaja PNG kuvana",hideEmptyAnswers:"Piilota tyhjät vastaukset",showEmptyAnswers:"Näytä tyhjät vastaukset","topNValueText-1":"Kaikki vastaukset",topNValueText5:"Top 5 vastaukset",topNValueText10:"Top 10 vastaukset",topNValueText20:"Top 20 vastaukset",hideMissingAnswers:"Piilota puuttuvat vastaukset",showMissingAnswers:"Näytä puuttuvat vastaukset",missingAnswersLabel:"Puuttuvat vastaukset",noVisualizerForQuestion:"Tätä kysymystyyppiä ei voida visualisoida.",noResults:"Ei vielä tuloksia",showPerValues:"Näytä arvottain",showPerColumns:"Näytä sarakkeittain",answer:"Vastaus",correctAnswer:"Oikea vastaus: ",percent:"Prosentti",percentage:"Prosenttiyksikkö",statistics_chart:"Kuvaaja",responses:"Vastaukset",visualizer_nps:"NPS",npsScore:"NPS",npsPromoters:"Suosittelija",npsPassives:"Passiivinen",npsDetractors:"Arvostelija"},r.q.localeNames.fi="Suomi";var n=i(555),s=i(818),o=i(183),a=i(143),l=i(928),u=i(226),h=i(931),c=i(267),d=i(557),p=i(87),f=i(156),g=i(70),m=function(e){function t(t,i,n,s){var o=e.call(this,i,n,s)||this;if(o.visualizers=t,o.visualizersWithSelection=[],o.onAfterVisualizerRenderCallback=function(){o.afterRender(o.contentContainer)},o.onVisualizerStateChangedCallback=function(e,t){o.stateChanged("visualizer",t)},o.onVisualizerChanged=new f.Event,o.loadingData=!1,!t||t.length<2)throw new Error("VisualizerArrayWrapper works with visualizers collection only.");return o.visualizers.forEach((function(e){e.onUpdate=function(){return o.invokeOnUpdate()},e.supportSelection&&(o._supportSelection=!0,o.visualizersWithSelection.push(e))})),o.registerToolbarItem("changeVisualizer",(function(){return o.visualizerSelector=g.gf.createSelector(o.visualizers.map((function(e){return{value:e.type,text:r.q.getString("visualizer_"+e.type)}})),(function(e){return o.visualizer.type===e.value}),(function(e){return o.setVisualizer(e.target.value)}))})),o.visualizer=t[0],o.visualizer.onAfterRender.add(o.onAfterVisualizerRenderCallback),o.visualizer.onStateChanged.add(o.onVisualizerStateChangedCallback),o}return(0,p.C6)(t,e),t.prototype.updateVisualizerSelector=function(){this.visualizerSelector&&(this.visualizerSelector.getElementsByTagName("select")[0].value=this.visualizer.type)},Object.defineProperty(t.prototype,"hasFooter",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.getVisualizers=function(){return this.visualizers},t.prototype.setVisualizer=function(e,t){void 0===t&&(t=!1);var i=this.visualizers.filter((function(t){return t.type===e}))[0];i&&i!==this.visualizer&&(this.visualizer&&(this.visualizer.onStateChanged.remove(this.onVisualizerStateChangedCallback),this.visualizer.onAfterRender.remove(this.onAfterVisualizerRenderCallback),this.visualizer.destroy()),this.visualizer=i,this.refresh(),this.visualizer.onAfterRender.add(this.onAfterVisualizerRenderCallback),this.visualizer.onStateChanged.add(this.onVisualizerStateChangedCallback),t||(this.onVisualizerChanged.fire(this,{visualizer:this.visualizer}),this.stateChanged("visualizer",e)),this.updateVisualizerSelector())},t.prototype.getVisualizer=function(){return this.visualizer},t.prototype.updateData=function(t){e.prototype.updateData.call(this,t),this.visualizers.forEach((function(e){e.updateData(t)}))},Object.defineProperty(t.prototype,"onDataItemSelected",{set:function(e){this.visualizersWithSelection.forEach((function(t){t.onDataItemSelected=e}))},enumerable:!1,configurable:!0}),t.prototype.setSelection=function(e){this.visualizersWithSelection.forEach((function(t){t.setSelection(e)}))},Object.defineProperty(t.prototype,"selection",{get:function(){return this.visualizer.selection||this.selectedItem},enumerable:!1,configurable:!0}),t.prototype.renderContent=function(e){this.visualizerContainer=e,this.visualizer.render(this.visualizerContainer)},t.prototype.setBackgroundColorCore=function(t){e.prototype.setBackgroundColorCore.call(this,t),this.visualizers.forEach((function(e){return e.backgroundColor=t}))},t.prototype.getState=function(){var e=this.visualizer.getState(),t={visualizer:this.visualizer.type};return Object.keys(e).length>0&&(t.state=e),t},t.prototype.setState=function(e){e.visualizer&&this.setVisualizer(e.visualizer,!0),e.state&&this.visualizer.setState(e.state)},t.prototype.getValues=function(){return this.visualizer.getValues()},t.prototype.getLabels=function(){return this.visualizer.getLabels()},t.prototype.getCalculatedValues=function(){return this.visualizer.getCalculatedValues()},t.prototype.destroy=function(){var t=this;this.visualizers.forEach((function(e){e.onAfterRender.remove(t.onAfterVisualizerRenderCallback),e.onStateChanged.remove(t.onVisualizerStateChangedCallback),e.onUpdate=void 0})),this.visualizer.destroy(),e.prototype.destroy.call(this)},t}(c.w);d.g.registerAltVisualizerSelector(m);var _=function(){function e(e){this._htmlElement=void 0,this.text=void 0,this._htmlElement=g.gf.createElement("div","sa-question__filter"),this.text=g.gf.createElement("span","sa-question__filter-text"),this._htmlElement.appendChild(this.text);var t=g.gf.createButton((function(){e.setSelection(void 0)}),r.q.getString("clearButton"));this._htmlElement.appendChild(t)}return Object.defineProperty(e.prototype,"htmlElement",{get:function(){return this._htmlElement},enumerable:!1,configurable:!0}),e.prototype.update=function(e){void 0!==e&&void 0!==e.value?(this._htmlElement.style.display="inline-flex",this.text.innerText=r.q.getString("filter")+": ["+e.text+"]"):(this._htmlElement.style.display="none",this.text.innerText="")},e}(),v=i(820),y=i.n(v),b=function(e){function t(t,i,r){void 0===r&&(r=!0);var n=e.call(this,t)||this;return n._selector=i,n.dragEnabled=r,n._muuri=void 0,n._layoutingTimer=void 0,n}return(0,p.C6)(t,e),t.prototype.startCore=function(e){var t=this;this._muuri=new(y())(e,{dragStartPredicate:{handle:".sa-question__title--draggable"},items:this._selector,dragEnabled:this.dragEnabled}),this._muuri.on("dragReleaseEnd",(function(e){var i=e.getGrid().getItems().map((function(e){return e.getElement().dataset.question}));t.onMoveCallback&&t.onMoveCallback(i)}))},t.prototype.stopCore=function(){this._muuri.off("dragReleaseEnd"),this._muuri.destroy(),this._muuri=void 0},t.prototype.updateCore=function(){var e=this;this._muuri&&(void 0!==this._layoutingTimer&&clearTimeout(this._layoutingTimer),this._layoutingTimer=setTimeout((function(){e._layoutingTimer=void 0,e._muuri&&(e._muuri.refreshItems(),e._muuri.layout())}),10))},t.prototype.add=function(e,t){this._allowed&&this._muuri.add(e,t)},t.prototype.remove=function(e,t){this._allowed&&this._muuri.remove(e,t)},t}(function(){function e(e){this._allowed=e}return e.prototype.startCore=function(e){},e.prototype.stopCore=function(){},e.prototype.updateCore=function(){},Object.defineProperty(e.prototype,"allowed",{get:function(){return this._allowed},enumerable:!1,configurable:!0}),e.prototype.start=function(e){this._allowed&&this.startCore(e)},e.prototype.stop=function(){this._allowed&&this.stopCore()},e.prototype.update=function(){this._allowed&&this.updateCore()},e.prototype.add=function(e,t){},e.prototype.remove=function(e,t){},e.prototype.destroy=function(){this.stop()},e}());const w=function(e){var t={};return e.keys().forEach((function(i){t[i.substring(2,i.length-4).toLowerCase()]=e(i)})),t}(i(288));var C=Object.keys(w).map((function(e){return function(e,t){var i=(t=t.trim()).toLowerCase();if("<svg "===i.substring(0,5)&&"</svg>"===i.substring(i.length-6,i.length))return'<symbol id="sa-svg-'+e+'" '+t.substring(5,i.length-6)+"</symbol>"}(e,w[e])})),T='<svg style="display:none;">'.concat(C,"<svg>"),x="sa-question",P="sa-question-layouted";if(document){var S=document.createElement("div");S.style.display="none",S.innerHTML=T,document.head.appendChild(S)}var A=function(e){function t(i,n,s,a){void 0===s&&(s={}),void 0===a&&(a=void 0);var l=e.call(this,null,n,s,"panel")||this;l.questions=i,l._elements=a,l.visualizers=[],l.haveCommercialLicense=!1,l.renderedQuestionsCount=0,l.onAfterRenderQuestionCallback=function(e,t){l.renderedQuestionsCount++,l.renderedQuestionsCount==l.questions.length&&(l.renderedQuestionsCount=0,l.layoutEngine.update(),l.afterRender(l.contentContainer))},l.onStateChangedCallback=function(e,t){var i;l.stateChanged(null===(i=e.question)||void 0===i?void 0:i.name,t)},l.onAlternativeVisualizerChanged=new f.Event,l.onAlternativeVisualizerChangedCallback=function(e,t){l.onAlternativeVisualizerChanged.fire(e,t)},l.onVisibleElementsChanged=new f.Event,l.onElementShown=new f.Event,l.onElementHidden=new f.Event,l.onElementMoved=new f.Event,l.loadingData=!1;var u=f.hasLicense;if(l.haveCommercialLicense=!!u&&u(4)||t.haveCommercialLicense||void 0!==s.haveCommercialLicense&&s.haveCommercialLicense,l._layoutEngine=s.layoutEngine||new b(l.allowDynamicLayout,"."+P,l.allowDragDrop),l._layoutEngine.onMoveCallback=function(e){return l.reorderVisibleElements(e)},l.showToolbar=!0,l.options.survey&&(r.q.currentLocale=l.options.survey.locale),void 0===a&&(l._elements=l.buildElements(i)),l.buildVisualizers(i),l.haveCommercialLicense||l.registerToolbarItem("commercialLicense",(function(){return(0,g.Qk)()})),l.registerToolbarItem("resetFilter",(function(){return g.gf.createButton((function(){l.visualizers.forEach((function(e){(e instanceof o.o||e instanceof m)&&e.setSelection(void 0)}))}),r.q.getString("resetFilter"))})),l.registerToolbarItem("addElement",(function(e){if(l.allowHideQuestions){var t=void 0,i=function(i,n){var s=l.hiddenElements;if(s.length>0){var o=g.gf.createSelector([{name:void 0,displayName:r.q.getString("addElement")}].concat(s).map((function(e){return{value:e.name,text:e.displayName}})),(function(e){return!1}),(function(e){l.showElement(e.target.value)}));t&&e.replaceChild(o,t)||e.appendChild(o),t=o}else t&&e.removeChild(t),t=void 0};i(),l.onVisibleElementsChanged.add(i)}})),!l.options.disableLocaleSwitch&&l.locales.length>1){var h=l.locales.map((function(e){return{value:e,text:r.q.localeNames[e]||r.q.getString(e)||e}}));l.registerToolbarItem("changeLocale",(function(){return g.gf.createSelector(h,(function(e){return!!e.value&&(l.locale||f.surveyLocalization.defaultLocale)===e.value}),(function(e){var t=e.target.value;l.locale=t}))}))}return l}return(0,p.C6)(t,e),t.prototype.reorderVisibleElements=function(e){var t=this,i=[];e.forEach((function(e){i.push(t._elements.filter((function(t){return t.name===e}))[0])})),this._elements.forEach((function(t){-1==e.indexOf(t.name)&&i.push(t)})),this._elements=i,this.visibleElementsChanged(void 0,"REORDERED")},t.prototype.onDataChanged=function(){},t.prototype.showElementCore=function(e,t){void 0===t&&(t=-1),e.isVisible=!0;var i=this.renderPanelElement(e,this.contentContainer),r=void 0;t>=0&&(r={index:t}),this.layoutEngine.add([i],r)},t.prototype.showElement=function(e){var t=this.getElement(e),i=this._elements.indexOf(t);this.showElementCore(t,i),this.visibleElementsChanged(t,"ADDED")},t.prototype.hideElementCore=function(e){e.isVisible=!1,e.renderedElement&&(this.layoutEngine.remove([e.renderedElement]),this.contentContainer.removeChild(e.renderedElement),e.renderedElement=void 0)},t.prototype.hideElement=function(e){var t=this.getElement(e);this.hideElementCore(t),this.visibleElementsChanged(t,"REMOVED")},t.prototype.hideAllElements=function(){var e=this,t=[];this._elements.forEach((function(i){i.isVisible&&(e.hideElementCore(i),t.push(i))})),this.visibleElementsChanged(void 0,"REMOVEDALL")},t.prototype.showAllElements=function(){var e=this,t=[];this._elements.forEach((function(i){i.isVisible||(e.showElementCore(i),t.push(i))})),this.visibleElementsChanged(void 0,"ADDEDDALL")},t.prototype.makeElementPrivate=function(e){e.isPublic=!1,this.stateChanged("isPublic",!1),this.onPermissionsChangedCallback&&this.onPermissionsChangedCallback(this)},t.prototype.makeElementPublic=function(e){e.isPublic=!0,this.stateChanged("isPublic",!0),this.onPermissionsChangedCallback&&this.onPermissionsChangedCallback(this)},t.prototype.moveVisibleElement=function(e,t){var i,r,n=this.visibleElements[e],s=this.visibleElements[t];i=this._elements.indexOf(n),r=this._elements.indexOf(s),this.moveElement(i,r)},t.prototype.moveElement=function(e,t){var i=this._elements.splice(e,1);this._elements.splice(t,0,i[0]),this.visibleElementsChanged(i[0],"MOVED")},t.prototype.setBackgroundColorCore=function(t){e.prototype.setBackgroundColorCore.call(this,t),this.visualizers.forEach((function(e){return e.backgroundColor=t}))},t.prototype.buildVisualizers=function(e){var t=this;e.forEach((function(e){var i,n=Object.assign({},t.options),s=t.surveyData;if(i=Array.isArray(e)?new(d.g.getPivotVisualizerConstructor())(e,s,n):t.createVisualizer(e,n,s)){if(t.allowHideQuestions&&i.registerToolbarItem("removeQuestion",(function(){return g.gf.createButton((function(){setTimeout((function(){return t.hideElement(e.name)}),0)}),r.q.getString("hideButton"))})),t.allowMakeQuestionsPrivate&&i.registerToolbarItem("makePrivatePublic",(function(){var i=t.getElement(e.name),n=i.isPublic?"first":"second",s=r.q.getString("makePrivateButton"),o=r.q.getString("makePublicButton");return g.gf.createSvgToggleButton("makepublic","makeprivate",s,o,(function(e){setTimeout((function(){return t.makeElementPublic(i)}),0)}),(function(e){setTimeout((function(){return t.makeElementPrivate(i)}),0)}),n)})),i.supportSelection){var o=i,a=new _(o);i.registerToolbarItem("questionFilterInfo",(function(){return a.update(o.selection),a.htmlElement})),o.onDataItemSelected=function(i,r){a.update({value:i,text:r}),t.setFilter(e.name,i)}}i.onUpdate=function(){return t.layout()},i.onAfterRender.add(t.onAfterRenderQuestionCallback),i.onStateChanged.add(t.onStateChangedCallback),i instanceof m&&i.onVisualizerChanged.add(t.onAlternativeVisualizerChangedCallback),t.visualizers.push(i)}}))},t.prototype.destroyVisualizers=function(){var e=this;this.visualizers.forEach((function(t){t.onUpdate=void 0,t instanceof o.o&&(t.onDataItemSelected=void 0),t instanceof m&&t.onVisualizerChanged.remove(e.onAlternativeVisualizerChangedCallback),t.onStateChanged.remove(e.onStateChangedCallback),t.onAfterRender.remove(e.onAfterRenderQuestionCallback),t.destroy()})),this.visualizers=[]},t.prototype.setLocale=function(t){var i=this;e.prototype.setLocale.call(this,t),(this.questions||[]).forEach((function(e){e=Array.isArray(e)?e[0]:e;var t=i.getElement(e.name);t&&(t.displayName=i.processText(e.title))})),this.visualizers.forEach((function(e){e.options.seriesLabels=i.options.seriesLabels,e.locale=t})),this.stateChanged("locale",t)},Object.defineProperty(t.prototype,"allowDynamicLayout",{get:function(){return void 0===this.options.allowDynamicLayout||!0===this.options.allowDynamicLayout},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowDragDrop",{get:function(){return!f.IsTouch&&(void 0===this.options.allowDragDrop||!0===this.options.allowDragDrop)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowHideQuestions",{get:function(){return void 0===this.options.allowHideQuestions||!0===this.options.allowHideQuestions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowMakeQuestionsPrivate",{get:function(){return!0===this.options.allowMakeQuestionsPrivate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layoutEngine",{get:function(){return this._layoutEngine},enumerable:!1,configurable:!0}),t.prototype.buildElements=function(e){var t=this;return(e||[]).map((function(e){return{name:(e=Array.isArray(e)?e[0]:e).name,displayName:t.processText(e.title),isVisible:!0,isPublic:!0}}))},t.prototype.getElements=function(e){var t=[];return(this._elements||[]).forEach((function(i){e&&-1===e.indexOf(i.name)||t.push({name:i.name,displayName:i.displayName,isVisible:i.isVisible,isPublic:i.isPublic})})),t},Object.defineProperty(t.prototype,"visibleElements",{get:function(){return this._elements.filter((function(e){return e.isVisible}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hiddenElements",{get:function(){return this._elements.filter((function(e){return!e.isVisible}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"publicElements",{get:function(){return this._elements.filter((function(e){return e.isPublic}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"privateElements",{get:function(){return this._elements.filter((function(e){return!e.isPublic}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locales",{get:function(){return this.options.survey?this.options.survey.getUsedLocales():[]},enumerable:!1,configurable:!0}),t.prototype.getElement=function(e){return this._elements.filter((function(t){return t.name===e}))[0]},t.prototype.getVisualizer=function(e){return this.visualizers.filter((function(t){return t.question.name===e}))[0]},t.prototype.visibleElementsChanged=function(e,t){"SHOWN"!==t||this.onElementShown.isEmpty||this.onElementShown.fire(this,{elements:this._elements,element:e}),"REMOVED"!==t||this.onElementHidden.isEmpty||this.onElementHidden.fire(this,{elements:this._elements,element:e}),"MOVED"!==t||this.onElementMoved.isEmpty||this.onElementMoved.fire(this,{elements:this._elements,element:e}),this.onVisibleElementsChanged.isEmpty||this.onVisibleElementsChanged.fire(this,{elements:this._elements,changed:e,reason:t}),this.stateChanged("visibleElements",t),this.layout()},t.prototype.renderPanelElement=function(e,t){var i=this.getVisualizer(e.name);if(i){var r=g.gf.createElement("div");r.dataset.question=e.name,t&&t.appendChild(r);var n=g.gf.createElement("div"),s=g.gf.createElement("h3"),o=g.gf.createElement("div");return s.innerText=e.displayName,r.className=this.allowDynamicLayout?x+" "+P:x,s.className=x+"__title",this.allowDynamicLayout&&this.allowDragDrop&&(s.className=s.className+" "+x+"__title--draggable"),n.className=x+"__content",n.style.backgroundColor=this.backgroundColor,n.appendChild(s),n.appendChild(o),r.appendChild(n),i.render(o),e.renderedElement=r,r}},t.prototype.renderToolbar=function(t){t.className+=" sa-panel__header",e.prototype.renderToolbar.call(this,t)},t.prototype.renderContent=function(e){var t=this;e.className+=" sa-panel__content sa-grid",this.visibleElements.forEach((function(i){t.renderPanelElement(i,e)})),this.layoutEngine.start(e)},t.prototype.destroyContent=function(t){this.layoutEngine.stop(),e.prototype.destroyContent.call(this,t)},t.prototype.refresh=function(){this.toolbarContainer&&(this.destroyToolbar(this.toolbarContainer),this.renderToolbar(this.toolbarContainer)),e.prototype.refresh.call(this)},t.prototype.layout=function(){this.layoutEngine.update()},t.prototype.setFilter=function(e,t){this.dataProvider.setFilter(e,t)},t.prototype.getState=function(){var e=this;return{locale:this.locale,elements:[].concat(this._elements.map((function(t){var i=e.getVisualizer(t.name),r=(0,p.Cl)((0,p.Cl)({},t),null==i?void 0:i.getState());return void 0!==r.renderedElement&&delete r.renderedElement,r})))}},Object.defineProperty(t.prototype,"state",{get:function(){return this.getState()},set:function(e){var t=this;if(e){this._settingState=!0;try{if(Array.isArray(e.elements)){var i=this.questions.map((function(e){return Array.isArray(e)?e[0].name:e.name}));this._elements=[].concat(e.elements.filter((function(e){return-1!==i.indexOf(e.name)})))}void 0!==e.locale&&this.setLocale(e.locale),this._elements.forEach((function(e){var i=t.getVisualizer(e.name);void 0!==i&&i.setState(e)}))}finally{this._settingState=!1}this.refresh()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"permissions",{get:function(){return this._elements.map((function(e){return{name:e.name,isPublic:e.isPublic}}))},set:function(e){var t=this._elements.map((function(t){return e.forEach((function(e){e.name===t.name&&(t.isPublic=e.isPublic)})),(0,p.Cl)({},t)}));this._elements=[].concat(t),this.refresh(),this.onPermissionsChangedCallback&&this.onPermissionsChangedCallback(this)},enumerable:!1,configurable:!0}),t.prototype.getCalculatedValuesCore=function(){return[]},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.destroyVisualizers()},t.haveCommercialLicense=!1,t}(c.w),k=function(e){function t(t,i,r,n){void 0===r&&(r={});var s=e.call(this,t,i,r,n||"panelDynamic")||this;return s._panelVisualizer=void 0,s.onAfterRenderPanelCallback=function(){s.afterRender(s.contentContainer)},s.loadingData=!1,(r=Object.assign({},r)).allowDynamicLayout=!1,r.dataProvider=void 0,s._panelVisualizer=new A(s.getQuestions(),[],r),s._panelVisualizer.onAfterRender.add(s.onAfterRenderPanelCallback),s.updateData(i),s}return(0,p.C6)(t,e),t.prototype.setLocale=function(t){e.prototype.setLocale.call(this,t),this._panelVisualizer.locale=t},Object.defineProperty(t.prototype,"type",{get:function(){return"panelDynamic"},enumerable:!1,configurable:!0}),t.prototype.updatePanelVisualizerData=function(){var e=this,t=[];this.data.forEach((function(i){void 0!==i[e.question.name]&&(t=t.concat(i[e.question.name]))})),this._panelVisualizer.updateData(t)},t.prototype.updateData=function(t){e.prototype.updateData.call(this,t),this.updatePanelVisualizerData()},t.prototype.onDataChanged=function(){this.updatePanelVisualizerData(),e.prototype.onDataChanged.call(this)},t.prototype.getQuestions=function(){return this.question.template.questions},t.prototype.destroyContent=function(t){this._panelVisualizer.clear(),e.prototype.destroyContent.call(this,this.contentContainer)},t.prototype.renderContent=function(e){this._panelVisualizer.render(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._panelVisualizer.onAfterRender.remove(this.onAfterRenderPanelCallback)},t}(c.w);d.g.registerVisualizer("paneldynamic",k);var D=function(e){function t(t,i,r){return e.call(this,t,i,r)||this}return(0,p.C6)(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return"matrixDynamic"},enumerable:!1,configurable:!0}),t.prototype.getQuestions=function(){var e=this.question.visibleRows;return 0===e.length?[]:e[0].cells.map((function(e){return e.question}))},t}(k);d.g.registerVisualizer("matrixdynamic",D);var E=function(e){function t(t,i,r,n){void 0===r&&(r={});var s=e.call(this,t,i,r,n||"matrixDropdown")||this;s._matrixDropdownVisualizer=void 0,s.onPanelAfterRenderCallback=function(){s.afterRender(s.contentContainer)},s.loadingData=!1,s._childOptions=Object.assign({},r),s._childOptions.disableLocaleSwitch=!0,s._childOptions.dataProvider=void 0,s._childOptions.allowDynamicLayout=!1,s._childOptions.transposeData=!0,s._childOptions.seriesValues=t.rows.map((function(e){return e.value})),s._childOptions.seriesLabels=t.rows.map((function(e){return e.text}));var o=s.getQuestions();if(s.canGroupColumns){var a=d.g.getVisualizersByType("matrixdropdown-grouped");s._matrixDropdownVisualizer=new a[0](s.question,[],s._childOptions)}else s._matrixDropdownVisualizer=new A(o,[],s._childOptions);return s._matrixDropdownVisualizer.onAfterRender.add(s.onPanelAfterRenderCallback),s.updateData(i),s}return(0,p.C6)(t,e),Object.defineProperty(t.prototype,"canGroupColumns",{get:function(){var e=this,t=this.getQuestions();return 1==this._childOptions.seriesValues.length&&t.every((function(t){return function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(e[i].value!==t[i].value||e[i].text!==t[i].text)return!1;return!0}(t.choices,e.question.choices)}))},enumerable:!1,configurable:!0}),t.prototype.setLocale=function(t){e.prototype.setLocale.call(this,t),this._childOptions.seriesLabels=this.question.rows.map((function(e){return e.text})),this._matrixDropdownVisualizer.locale=t},Object.defineProperty(t.prototype,"matrixDropdownVisualizer",{get:function(){return this._matrixDropdownVisualizer},enumerable:!1,configurable:!0}),t.prototype.updateDropdownVisualizerData=function(){var e=this,t=[];this.data.forEach((function(i){var r=i[e.question.name];r&&Object.keys(r).forEach((function(e){var i=Object.assign({},r[e]);i[n.M.seriesMarkerKey]=e,t.push(i)}))})),this._matrixDropdownVisualizer.updateData(t)},t.prototype.updateData=function(t){e.prototype.updateData.call(this,t),this.updateDropdownVisualizerData()},t.prototype.onDataChanged=function(){this.updateDropdownVisualizerData(),e.prototype.onDataChanged.call(this)},t.prototype.getQuestions=function(){var e=this.question;return e.columns.map((function(t){var i=t.templateQuestion;return Array.isArray(i.choices)&&0===i.choices.length&&(i.choices=e.choices),i}))},t.prototype.destroyContent=function(t){this._matrixDropdownVisualizer.clear(),e.prototype.destroyContent.call(this,this.contentContainer)},t.prototype.renderContent=function(e){this._matrixDropdownVisualizer.render(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._matrixDropdownVisualizer.onAfterRender.remove(this.onPanelAfterRenderCallback)},t}(c.w);d.g.registerVisualizer("matrixdropdown",E);var V={en:["...","a","about","above","across","after","again","against","all","almost","alone","along","already","also","although","always","among","an","and","another","any","anybody","anyone","anything","anywhere","are","area","areas","around","as","ask","asked","asking","asks","at","away","b","back","backed","backing","backs","be","became","because","become","becomes","been","before","began","behind","being","beings","best","better","between","big","both","but","by","c","came","can","cannot","case","cases","certain","certainly","clear","clearly","come","could","d","did","differ","different","differently","do","does","done","down","down","downed","downing","downs","during","e","each","early","either","end","ended","ending","ends","enough","even","evenly","ever","every","everybody","everyone","everything","everywhere","f","face","faces","fact","facts","far","felt","few","find","finds","first","for","four","from","full","fully","further","furthered","furthering","furthers","g","gave","general","generally","get","gets","give","given","gives","go","going","good","goods","got","great","greater","greatest","group","grouped","grouping","groups","h","had","has","have","having","he","her","here","herself","high","high","high","higher","highest","him","himself","his","how","however","i","if","important","in","interest","interested","interesting","interests","into","is","it","its","itself","j","just","k","keep","keeps","kind","knew","know","known","knows","l","large","largely","last","later","latest","least","less","let","lets","like","likely","long","longer","longest","m","made","make","making","man","many","may","me","member","members","men","might","more","most","mostly","mr","mrs","much","must","my","myself","n","necessary","need","needed","needing","needs","never","new","new","newer","newest","next","no","nobody","non","noone","not","nothing","now","nowhere","number","numbers","o","of","off","often","old","older","oldest","on","once","one","only","open","opened","opening","opens","or","order","ordered","ordering","orders","other","others","our","out","over","p","part","parted","parting","parts","per","perhaps","place","places","point","pointed","pointing","points","possible","present","presented","presenting","presents","problem","problems","put","puts","q","quite","r","rather","really","right","right","room","rooms","s","said","same","saw","say","says","second","seconds","see","seem","seemed","seeming","seems","sees","several","shall","she","should","show","showed","showing","shows","side","sides","since","small","smaller","smallest","so","some","somebody","someone","something","somewhere","state","states","still","still","such","sure","t","take","taken","than","that","the","their","them","then","there","therefore","these","they","thing","things","think","thinks","this","those","though","thought","thoughts","three","through","thus","to","today","together","too","took","toward","turn","turned","turning","turns","two","u","under","until","up","upon","us","use","used","uses","v","very","w","want","wanted","wanting","wants","was","way","ways","we","well","wells","went","were","what","when","where","whether","which","while","who","whole","whose","why","will","with","within","without","work","worked","working","works","would","x","y","year","years","yet","you","young","younger","youngest","your","yours","z"],no:["...","alle","andre","arbeid","at","av","bare","begge","ble","blei","bli","blir","blitt","bort","bruke","både","båe","da","de","deg","dei","deim","deira","deires","dem","den","denne","der","dere","deres","det","dette","di","din","disse","ditt","du","dykk","dykkar","då","eg","ein","eit","eitt","eller","elles","en","ene","eneste","enhver","enn","er","et","ett","etter","folk","for","fordi","forsøke","fra","få","før","før","først","gjorde","gjøre","god","gå","ha","hadde","han","hans","har","hennar","henne","hennes","her","hjå","ho","hoe","honom","hoss","hossen","hun","hva","hvem","hver","hvilke","hvilken","hvis","hvor","hvordan","hvorfor","i","ikke","ikkje","ingen","ingi","inkje","inn","innen","inni","ja","jeg","kan","kom","korleis","korso","kun","kunne","kva","kvar","kvarhelst","kven","kvi","kvifor","lage","lang","lik","like","makt","man","mange","me","med","medan","meg","meget","mellom","men","mens","mer","mest","mi","min","mine","mitt","mot","mye","mykje","må","måte","navn","ned","nei","no","noe","noen","noka","noko","nokon","nokor","nokre","ny","nå","når","og","også","om","opp","oss","over","part","punkt","på","samme","seg","selv","si","sia","sidan","siden","sin","sine","sist","sitt","sjøl","skal","skulle","slik","slutt","so","som","somme","somt","start","stille","så","sånn","tid","til","tilbake","tilstand","um","under","upp","ut","uten","var","vart","varte","ved","verdi","vere","verte","vi","vil","ville","vite","vore","vors","vort","vår","være","vært","vøre","vørt","æ","å"],nl:["de","en","van","ik","te","dat","die","in","een","hij","het","niet","zijn","is","was","op","aan","met","als","voor","had","er","maar","om","hem","dan","zou","of","wat","mijn","men","dit","zo","door","over","ze","zich","bij","ook","tot","je","mij","uit","der","daar","haar","naar","heb","hoe","heeft","hebben","deze","u","want","nog","zal","me","zij","nu","ge","geen","omdat","iets","worden","toch","al","waren","veel","meer","doen","toen","moet","ben","zonder","kan","hun","dus","alles","onder","ja","eens","hier","wie","werd","altijd","doch","wordt","wezen","kunnen","ons","zelf","tegen","na","reeds","wil","kon","niets","uw","iemand","geweest","andere"],es:["...","a","actualmente","adelante","además","afirmó","agregó","ahora","ahí","al","algo","alguna","algunas","alguno","algunos","algún","alrededor","ambos","ampleamos","ante","anterior","antes","apenas","aproximadamente","aquel","aquellas","aquellos","aqui","aquí","arriba","aseguró","así","atras","aunque","ayer","añadió","aún","bajo","bastante","bien","buen","buena","buenas","bueno","buenos","cada","casi","cerca","cierta","ciertas","cierto","ciertos","cinco","comentó","como","con","conocer","conseguimos","conseguir","considera","consideró","consigo","consigue","consiguen","consigues","contra","cosas","creo","cual","cuales","cualquier","cuando","cuanto","cuatro","cuenta","cómo","da","dado","dan","dar","de","debe","deben","debido","decir","dejó","del","demás","dentro","desde","después","dice","dicen","dicho","dieron","diferente","diferentes","dijeron","dijo","dio","donde","dos","durante","e","ejemplo","el","ella","ellas","ello","ellos","embargo","empleais","emplean","emplear","empleas","empleo","en","encima","encuentra","entonces","entre","era","erais","eramos","eran","eras","eres","es","esa","esas","ese","eso","esos","esta","estaba","estabais","estaban","estabas","estad","estada","estadas","estado","estados","estais","estamos","estan","estando","estar","estaremos","estará","estarán","estarás","estaré","estaréis","estaría","estaríais","estaríamos","estarían","estarías","estas","este","estemos","esto","estos","estoy","estuve","estuviera","estuvierais","estuvieran","estuvieras","estuvieron","estuviese","estuvieseis","estuviesen","estuvieses","estuvimos","estuviste","estuvisteis","estuviéramos","estuviésemos","estuvo","está","estábamos","estáis","están","estás","esté","estéis","estén","estés","ex","existe","existen","explicó","expresó","fin","fue","fuera","fuerais","fueran","fueras","fueron","fuese","fueseis","fuesen","fueses","fui","fuimos","fuiste","fuisteis","fuéramos","fuésemos","gran","grandes","gueno","ha","haber","habida","habidas","habido","habidos","habiendo","habremos","habrá","habrán","habrás","habré","habréis","habría","habríais","habríamos","habrían","habrías","habéis","había","habíais","habíamos","habían","habías","hace","haceis","hacemos","hacen","hacer","hacerlo","haces","hacia","haciendo","hago","han","has","hasta","hay","haya","hayamos","hayan","hayas","hayáis","he","hecho","hemos","hicieron","hizo","hoy","hube","hubiera","hubierais","hubieran","hubieras","hubieron","hubiese","hubieseis","hubiesen","hubieses","hubimos","hubiste","hubisteis","hubiéramos","hubiésemos","hubo","igual","incluso","indicó","informó","intenta","intentais","intentamos","intentan","intentar","intentas","intento","ir","junto","la","lado","largo","las","le","les","llegó","lleva","llevar","lo","los","luego","lugar","manera","manifestó","mayor","me","mediante","mejor","mencionó","menos","mi","mientras","mio","mis","misma","mismas","mismo","mismos","modo","momento","mucha","muchas","mucho","muchos","muy","más","mí","mía","mías","mío","míos","nada","nadie","ni","ninguna","ningunas","ninguno","ningunos","ningún","no","nos","nosotras","nosotros","nuestra","nuestras","nuestro","nuestros","nueva","nuevas","nuevo","nuevos","nunca","o","ocho","os","otra","otras","otro","otros","para","parece","parte","partir","pasada","pasado","pero","pesar","poca","pocas","poco","pocos","podeis","podemos","poder","podria","podriais","podriamos","podrian","podrias","podrá","podrán","podría","podrían","poner","por","por qué","porque","posible","primer","primera","primero","primeros","principalmente","propia","propias","propio","propios","próximo","próximos","pudo","pueda","puede","pueden","puedo","pues","que","quedó","queremos","quien","quienes","quiere","quién","qué","realizado","realizar","realizó","respecto","sabe","sabeis","sabemos","saben","saber","sabes","se","sea","seamos","sean","seas","segunda","segundo","según","seis","ser","seremos","será","serán","serás","seré","seréis","sería","seríais","seríamos","serían","serías","seáis","señaló","si","sido","siempre","siendo","siete","sigue","siguiente","sin","sino","sobre","sois","sola","solamente","solas","solo","solos","somos","son","soy","su","sus","suya","suyas","suyo","suyos","sí","sólo","tal","también","tampoco","tan","tanto","te","tendremos","tendrá","tendrán","tendrás","tendré","tendréis","tendría","tendríais","tendríamos","tendrían","tendrías","tened","teneis","tenemos","tener","tenga","tengamos","tengan","tengas","tengo","tengáis","tenida","tenidas","tenido","tenidos","teniendo","tenéis","tenía","teníais","teníamos","tenían","tenías","tercera","ti","tiempo","tiene","tienen","tienes","toda","todas","todavía","todo","todos","total","trabaja","trabajais","trabajamos","trabajan","trabajar","trabajas","trabajo","tras","trata","través","tres","tu","tus","tuve","tuviera","tuvierais","tuvieran","tuvieras","tuvieron","tuviese","tuvieseis","tuviesen","tuvieses","tuvimos","tuviste","tuvisteis","tuviéramos","tuviésemos","tuvo","tuya","tuyas","tuyo","tuyos","tú","ultimo","un","una","unas","uno","unos","usa","usais","usamos","usan","usar","usas","uso","usted","va","vais","valor","vamos","van","varias","varios","vaya","veces","ver","verdad","verdadera","verdadero","vez","vosotras","vosotros","voy","vuestra","vuestras","vuestro","vuestros","y","ya","yo","él","éramos","ésta","éstas","éste","éstos","última","últimas","último","últimos"]},z={getStopWords:function(e){return void 0===e&&(e=""),V[e||"en"]||[]}},M={spiralResolution:1,spiralLimit:1800,lineHeight:.8,xWordPadding:0,yWordPadding:3,weightFactor:40,topN:40,maxHeight:0,padding:10},O=function(){function e(e){void 0===e&&(e=M),this._options=e,this._words=[],this._placedWords=[],this._minWeight=1,this._weightFactor=1,this._renderedTarget=void 0,this.colors=["black"]}return Object.defineProperty(e.prototype,"words",{get:function(){return this._words},set:function(e){this._words=[].concat(e||[]),this._minWeight=1,this._weightFactor=1,this._words.length>0&&(this._words.sort((function(e,t){return-1*(e[1]-t[1])})),this._minWeight=this._words[this._words.length-1][1],this._weightFactor=(this._words[0][1]-this._minWeight+1)/this._options.weightFactor)},enumerable:!1,configurable:!0}),e.prototype.createWordElement=function(e,t,i){var r=document.createElement("div");return r.style.position="absolute",r.style.fontSize=(t-this._minWeight+1)/this._weightFactor+"px",r.style.lineHeight=this._options.lineHeight+"em",this.colors.length>0&&(r.style.color=this.colors[i%this.colors.length]),r.title=e+" ("+t+")",r.appendChild(document.createTextNode(e)),r},e.prototype.isIntersectWithPlaced=function(e){for(var t=0;t<this._placedWords.length;t+=1){var i=this._placedWords[t].rect;if(!(e.right+this._options.xWordPadding<i.left-this._options.xWordPadding||e.left-this._options.xWordPadding>i.right+this._options.xWordPadding||e.bottom+this._options.yWordPadding<i.top-this._options.yWordPadding||e.top-this._options.yWordPadding>i.bottom+this._options.yWordPadding))return!0}return!1},e.prototype.arrangeWords=function(e,t){for(var i={x:0,y:0},r=i.y,n=i.y,s=Math.min(this._options.topN,this.words.length),o=0;o<s;o+=1){var a=this.createWordElement(this.words[o][0],this.words[o][1],o);e.appendChild(a);for(var l=0;l<this._options.spiralLimit;l++){var u=this._options.spiralResolution*l;i.x=(1+u)*Math.cos(u),i.y=(1+u)*Math.sin(u);var h=t.x+i.x-a.offsetWidth/2,c=t.y+i.y-a.offsetHeight/2;a.style.left=h+"px",a.style.top=c+"px";var d=a.getBoundingClientRect();if(!this.isIntersectWithPlaced(d)){this._placedWords.push({element:a,rect:d,left:h,top:c});break}}var p=i.y-a.offsetHeight/2;r>p&&(r=p);var f=i.y+a.offsetHeight/2;n<f&&(n=f)}return[r,n]},e.prototype.render=function(e){var t=this;this._renderedTarget=e;var i=document.createElement("div");document.body.appendChild(i),i.style.position="fixed",i.style.top="-1000px",i.style.width="0",i.style.height="0";var r={x:i.offsetWidth/2,y:i.offsetHeight/2},n=this.arrangeWords(i,r),s=n[0],o=n[1];this._placedWords.forEach((function(e){e.element.style.top=e.top-s+t._options.padding+"px"})),i.remove(),i.style.top="auto",i.style.left="50%",i.className="sa-visualizer-wordcloud",i.style.position="relative",this._options.maxHeight>0&&(i.style.height=this._options.maxHeight+"px",i.style.overflow="auto"),0==this._options.maxHeight&&(i.style.height=o-s+2*this._options.padding+"px"),e.appendChild(i)},e.prototype.dispose=function(){this._renderedTarget&&(this._renderedTarget.innerHTML="",this._renderedTarget=void 0)},e}(),L=function(){function e(e){this.model=e}return Object.defineProperty(e.prototype,"wordcloud",{get:function(){return this._wordcloud},enumerable:!1,configurable:!0}),e.prototype.create=function(t){return(0,p.sH)(this,void 0,void 0,(function(){var i,n,s,o;return(0,p.YH)(this,(function(a){switch(a.label){case 0:return[4,this.model.getCalculatedValues()];case 1:return i=a.sent(),this.model.getColors(),0===i.length?(n=g.gf.createElement("p","",{innerText:r.q.getString("noResults")}),t.appendChild(n),[2]):(s=JSON.parse(JSON.stringify(M)),o={config:s},e.onWordcloudCreating.fire(this.model,o),this._wordcloud=new O(s),this._wordcloud.colors=this.model.getColors(),this._wordcloud.words=i,this._wordcloud.render(t),[2,this._wordcloud])}}))}))},e.prototype.destroy=function(e){this._wordcloud&&"function"==typeof this._wordcloud.dispose&&this._wordcloud.dispose(),this._wordcloud=void 0},e.drawOutOfBound=!1,e.shrinkToFit=!0,e.abortThreshold=void 0,e.weightFactor=20,e.onWordcloudCreating=new f.Event,e}(),B=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"wordcloud")||this;return s._wordcloudAdapter=new L(s),s}return(0,p.C6)(t,e),t.prototype.convertFromExternalData=function(e){var t=[];return Object.keys(e||[]).forEach((function(i){t.push([i,e[i]])})),t},t.prototype.getCalculatedValuesCore=function(){var e=this,t={},i=[],n=r.q.currentLocale;i=n?z.getStopWords(n):z.getStopWords();var s=new RegExp("[.,/#!$%^*;:{}=-_`~()]","g"),o=function(e){(e=""+e)&&e.split(" ").forEach((function(e){var r=(e||"").toLowerCase().replace(s,"");r=function(e){return-1!==i.indexOf(e)?"":e}(r),r&&(t[r]?t[r]++:t[r]=1)}))};return this.surveyData.forEach((function(t){var i=t[e.question.name];i&&(Array.isArray(i)?i.forEach(o):"object"==typeof i?Object.keys(i).forEach((function(e){return o(i[e])})):o(i))})),Object.keys(t).map((function(e){return[e,t[e]]}))},t.prototype.destroyContent=function(t){this._wordcloudAdapter.destroy(t),e.prototype.destroyContent.call(this,t)},t.prototype.renderContentAsync=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t;return(0,p.YH)(this,(function(i){switch(i.label){case 0:return t=g.gf.createElement("div"),e.appendChild(t),[4,this._wordcloudAdapter.create(t)];case 1:return i.sent(),e.innerHTML="",e.appendChild(t),[2,e]}}))}))},t.prototype.destroy=function(){this._wordcloudAdapter.destroy(this.contentContainer),e.prototype.destroy.call(this)},t}(c.w);d.g.registerVisualizer("text",B),d.g.registerVisualizer("comment",B),d.g.registerVisualizer("multipletext",B);var q=function(){function e(e){this.model=e}return e.prototype.create=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t,i,n,s,o,a,l=this;return(0,p.YH)(this,(function(u){switch(u.label){case 0:return[4,this.model.getCalculatedValues()];case 1:return t=u.sent(),i=t.columnCount,n=t.data,s=g.gf.createElement("p","",{innerText:r.q.getString("noResults")}),0===n.length?(e.appendChild(s),[2]):((o=g.gf.createElement("table","sa-text-table")).style.backgroundColor=this.model.backgroundColor,e.appendChild(o),this.model.columns&&(a=g.gf.createElement("tr"),this.model.columns.forEach((function(e){var t=g.gf.createElement("th","sa-text-table__cell",{textContent:e.title});a.appendChild(t)})),o.appendChild(a)),n.forEach((function(e){for(var t=g.gf.createElement("tr"),r=0;r<i;r++){var n=l.model.columns[r],s=g.gf.createElement("td","sa-text-table__cell"+("number"==(null==n?void 0:n.type)?" sa-text-table__cell--number":""),{textContent:e[r]});t.appendChild(s)}o.appendChild(t)})),e.className="sa-text-table__container",e.appendChild(o),[2])}}))}))},e.prototype.destroy=function(e){e.innerHTML=""},e}(),N=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"text")||this;return s._textTableAdapter=new q(s),s}return(0,p.C6)(t,e),Object.defineProperty(t.prototype,"columns",{get:function(){var e=[];return"multipletext"==this.question.getType()&&this.question.items.forEach((function(t){e.push({name:t.name,title:t.title,type:t.inputType})})),e},enumerable:!1,configurable:!0}),t.prototype.getCalculatedValuesCore=function(){var e=this,t=[],i=0;return this.surveyData.forEach((function(r){var n=r[e.question.name],s=[];n&&(Array.isArray(n)?s=s.concat(n):"object"==typeof n?Object.keys(n).forEach((function(e){return s.push(n[e])})):s.push(n),t.push(s),s.length>i&&(i=s.length))})),{columnCount:i,data:t}},t.prototype.destroyContent=function(t){this._textTableAdapter.destroy(t),e.prototype.destroyContent.call(this,t)},t.prototype.renderContentAsync=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t;return(0,p.YH)(this,(function(i){switch(i.label){case 0:return t=g.gf.createElement("div"),[4,this._textTableAdapter.create(t)];case 1:return i.sent(),e.innerHTML="",e.appendChild(t),[2,e]}}))}))},t.prototype.destroy=function(){this._textTableAdapter.destroy(this.contentContainer),e.prototype.destroy.call(this)},t}(c.w);d.g.registerVisualizer("text",N),d.g.registerVisualizer("comment",N),d.g.registerVisualizer("multipletext",N);var R=function(){function e(e){this.model=e}return e.prototype.create=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t,i,n,s,o,a=this;return(0,p.YH)(this,(function(l){switch(l.label){case 0:return[4,this.model.getAnswersData()];case 1:return t=l.sent(),i=t.datasets,n=t.labels,t.colors,s=t.texts,t.seriesLabels.length,o=g.gf.createElement("p","",{innerText:r.q.getString("noResults")}),0===i.length||0===i[0].length?(e.appendChild(o),[2]):(i.forEach((function(t,i){var o=g.gf.createElement("table","sa-statistics-table");o.style.backgroundColor=a.model.backgroundColor,e.appendChild(o);var l=g.gf.createElement("tr"),u=g.gf.createElement("th","sa-statistics-table__cell-header",{textContent:r.q.getString("answer")});l.appendChild(u);var h=g.gf.createElement("th","sa-statistics-table__cell-header",{textContent:r.q.getString("statistics_chart")});l.appendChild(h);var c=g.gf.createElement("th","sa-statistics-table__cell-header",{textContent:r.q.getString("percentage")});l.appendChild(c);var d=g.gf.createElement("th","sa-statistics-table__cell-header",{textContent:r.q.getString("responses")});l.appendChild(d),o.appendChild(l);for(var p=t.length-1;p>=0;p--){var f=g.gf.createElement("tr");u=g.gf.createElement("td","sa-statistics-table__cell",{textContent:n[p]}),f.appendChild(u),h=g.gf.createElement("td","sa-statistics-table__cell");var m=g.gf.createElement("div","sa-choices-sparkline"),_=g.gf.createElement("div","sa-choices-sparkline-value");_.style.width=s[i][p]+"%",m.appendChild(_),h.appendChild(m),f.appendChild(h),c=g.gf.createElement("td","sa-statistics-table__cell sa-statistics-table__cell-value",{textContent:s[i][p]+"%"}),f.appendChild(c),d=g.gf.createElement("td","sa-statistics-table__cell sa-statistics-table__cell-value",{textContent:t[p]}),f.appendChild(d),o.appendChild(f)}e.className="sa-statistics-table__container",e.appendChild(o)})),[2])}}))}))},e.prototype.destroy=function(e){e.innerHTML=""},e}(),I=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"choices")||this;return s._statisticsTableAdapter=new R(s),s.showPercentages=!0,s}return(0,p.C6)(t,e),t.prototype.destroyContent=function(t){this._statisticsTableAdapter.destroy(t),e.prototype.destroyContent.call(this,t)},t.prototype.renderContentAsync=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t;return(0,p.YH)(this,(function(i){switch(i.label){case 0:return t=g.gf.createElement("div"),[4,this._statisticsTableAdapter.create(t)];case 1:return i.sent(),e.innerHTML="",e.appendChild(t),[2,e]}}))}))},t.prototype.destroy=function(){this._statisticsTableAdapter.destroy(this.contentContainer),e.prototype.destroy.call(this)},t}(o.o);d.g.registerVisualizer("radiogroup",I),d.g.registerVisualizer("dropdown",I),d.g.registerVisualizer("checkbox",I);var j=function(){function e(e,t){this._model=e,this._data=t,this._renderedTarget=void 0}return e.prototype.renderScorePart=function(e,t,i){var n=g.gf.createElement("div","sa-visualizer-nps__score-part"),s=g.gf.createElement("div","sa-visualizer-nps__score-part-title");s.innerText=r.q.getString(e),n.appendChild(s);var o=g.gf.createElement("div","sa-visualizer-nps__score-part-values");n.appendChild(o);var a=g.gf.createElement("div","sa-visualizer-nps__score-part-value");if(a.innerText=""+t,o.appendChild(a),i){var l=g.gf.createElement("div","sa-visualizer-nps__score-part-percent");l.innerText=i+"%",o.appendChild(l)}return n},e.prototype.render=function(e){this._renderedTarget=e;var t=g.gf.createElement("div","sa-visualizer-nps");t.appendChild(this.renderScorePart("npsScore",this.npsScore)),t.appendChild(this.renderScorePart("npsPromoters",this._data.promoters,this.promotersPercent)),t.appendChild(this.renderScorePart("npsPassives",this._data.total-this._data.promoters-this._data.detractors,this.passivePercent)),t.appendChild(this.renderScorePart("npsDetractors",this._data.detractors,this.detractorsPercent)),e.appendChild(t)},Object.defineProperty(e.prototype,"npsScore",{get:function(){return(0,g.QX)((this._data.promoters-this._data.detractors)/this._data.total*100,this._model.precision)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promotersPercent",{get:function(){return(0,g.QX)(this._data.promoters/this._data.total*100,this._model.precision)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"passivePercent",{get:function(){return(0,g.QX)((this._data.total-this._data.promoters-this._data.detractors)/this._data.total*100,this._model.precision)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"detractorsPercent",{get:function(){return(0,g.QX)(this._data.detractors/this._data.total*100,this._model.precision)},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._renderedTarget&&(this._renderedTarget.innerHTML="",this._renderedTarget=void 0)},e}(),H=function(){function e(e){this.model=e}return Object.defineProperty(e.prototype,"npsVisualizer",{get:function(){return this._npsVisualizer},enumerable:!1,configurable:!0}),e.prototype.create=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t;return(0,p.YH)(this,(function(i){switch(i.label){case 0:return[4,this.model.getCalculatedValues()];case 1:return t=i.sent(),this._npsVisualizer=new j(this.model,t),this._npsVisualizer.render(e),[2,this._npsVisualizer]}}))}))},e.prototype.destroy=function(e){this._npsVisualizer&&"function"==typeof this._npsVisualizer.dispose&&this._npsVisualizer.dispose(),this._npsVisualizer=void 0},e}(),F=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"nps")||this;return s.precision=2,s._npsAdapter=new H(s),s}return(0,p.C6)(t,e),t.prototype.getCalculatedValuesCore=function(){var e=this,i={detractors:0,passive:0,promoters:0,total:0};return this.data.forEach((function(r){var n=r[e.question.name],s=parseInt(n);Number.isNaN(s)||(s<=t.DetractorScore?i.detractors++:s>=t.PromoterScore?i.promoters++:i.passive++,i.total++)})),i},t.prototype.destroyContent=function(t){this._npsAdapter.destroy(t),e.prototype.destroyContent.call(this,t)},t.prototype.renderContentAsync=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t;return(0,p.YH)(this,(function(i){switch(i.label){case 0:return t=g.gf.createElement("div"),e.appendChild(t),[4,this._npsAdapter.create(t)];case 1:return i.sent(),e.innerHTML="",e.appendChild(t),[2,e]}}))}))},t.prototype.destroy=function(){this._npsAdapter.destroy(this.contentContainer),e.prototype.destroy.call(this)},t.DetractorScore=6,t.PromoterScore=9,t}(c.w),Y=i(582),G=i(472)},928:(e,t,i)=>{"use strict";i.d(t,{o:()=>l});var r=i(87),n=i(156),s=i(183),o=i(240),a=i(557),l=function(e){function t(t,i,r,n){return e.call(this,t,i,r,n||"boolean")||this}return(0,r.C6)(t,e),t.prototype.getCorrectAnswerText=function(){var e=this.booleanQuestion.correctAnswer;return void 0!==this.booleanQuestion.valueTrue&&this.booleanQuestion.valueTrue===e||e?this.booleanQuestion.locLabelTrue.textOrHtml:void 0!==this.booleanQuestion.valueFalse&&this.booleanQuestion.valueFalse===e||!e?this.booleanQuestion.locLabelFalse.textOrHtml:e},Object.defineProperty(t.prototype,"booleanQuestion",{get:function(){return this.question},enumerable:!1,configurable:!0}),t.prototype.getSelectedItemByText=function(e){var t=this.getLabels(),i=this.getValues();return new n.ItemValue(i[t.indexOf(e)],e)},t.prototype.getValues=function(){var e=[void 0===this.booleanQuestion.valueTrue||this.booleanQuestion.valueTrue,void 0!==this.booleanQuestion.valueFalse&&this.booleanQuestion.valueFalse];return this.showMissingAnswers&&e.push(void 0),e},t.prototype.getLabels=function(){var e=[].concat(this.getValues());return void 0!==this.booleanQuestion.labelTrue&&(e[0]=this.booleanQuestion.locLabelTrue.textOrHtml),void 0!==this.booleanQuestion.labelFalse&&(e[1]=this.booleanQuestion.locLabelFalse.textOrHtml),this.showMissingAnswers&&(e[2]=o.q.getString("missingAnswersLabel")),e},t.trueColor="",t.falseColor="",t}(s.o);a.g.registerVisualizer("boolean",l)},931:(e,t,i)=>{"use strict";i.d(t,{R:()=>u});var r=i(87),n=i(267),s=i(240),o=i(70),a=i(557),l=i(873),u=function(e){function t(t,i,r,a){void 0===r&&(r={});var l=e.call(this,t,i,r,a||"number")||this;return n.w.chartAdapterType&&(l._chartAdapter=new n.w.chartAdapterType(l),l.chartTypes=l._chartAdapter.getChartTypes(),l.chartType=l.chartTypes[0]),l.registerToolbarItem("changeChartType",(function(){return l.chartTypes.length>1?o.gf.createSelector(l.chartTypes.map((function(e){return{value:e,text:s.q.getString("chartType_"+e)}})),(function(e){return l.chartType===e.value}),(function(e){l.setChartType(e.target.value)})):null})),l}return(0,r.C6)(t,e),t.prototype.onDataChanged=function(){this._resultAverage=void 0,this._resultMin=void 0,this._resultMax=void 0,e.prototype.onDataChanged.call(this)},t.prototype.onChartTypeChanged=function(){},t.prototype.setChartType=function(e){-1!==this.chartTypes.indexOf(e)&&this.chartType!==e&&(this.chartType=e,this.onChartTypeChanged(),this.contentContainer&&(this.destroyContent(this.contentContainer),this.renderContent(this.contentContainer)),this.invokeOnUpdate())},t.prototype.destroy=function(){this._resultAverage=void 0,this._resultMin=void 0,this._resultMax=void 0,e.prototype.destroy.call(this)},t.prototype.generateText=function(e,i,r){var n=[];if(5===r)n=["very high ("+e+")","high","medium","low","very low ("+i+")"];else{n.push(e);for(var s=0;s<r-2;s++)n.push("");n.push(i)}return t.generateTextsCallback?t.generateTextsCallback(this.question,e,i,r,n):n},t.prototype.generateValues=function(e,t){for(var i=[],r=0;r<t;r++)i.push(e/t);return i.push(e),i},t.prototype.generateColors=function(e,t,i){for(var r=this.getColors(),n=[],s=0;s<i;s++)n.push(r[s]);return n.push("rgba(255, 255, 255, 0)"),n},t.prototype.convertFromExternalData=function(e){return[e.value||0,e.minValue||0,e.maxValue||0]},t.prototype.getCalculatedValuesCore=function(){var e;return void 0!==this._resultAverage&&void 0!==this._resultMin&&void 0!==this._resultMax||(e=(0,l.MH)(this.surveyData,this.dataNames[0]),this._resultAverage=e[0],this._resultMin=e[1],this._resultMax=e[2]),[this._resultAverage,this._resultMin,this._resultMax]},t.stepsCount=5,t.showAsPercentage=!1,t}(n.w);a.g.registerVisualizer("number",u,200),a.g.registerVisualizer("rating",u,200),a.g.registerVisualizer("expression",u)},999:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><polygon points="8,3 10,5 11,4 8,1 5,4 6,5 "></polygon><polygon points="8,13 6,11 5,12 8,15 11,12 10,11"></polygon></g></svg>'}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var s=r[e]={exports:{}};return i[e].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{"use strict";n.r(s),n.d(s,{AlternativeVisualizersWrapper:()=>E.AlternativeVisualizersWrapper,BooleanModel:()=>E.BooleanModel,BooleanPlotly:()=>w,DataProvider:()=>E.DataProvider,DocumentHelper:()=>E.DocumentHelper,GaugePlotly:()=>S,HistogramModel:()=>E.HistogramModel,HistogramPlotly:()=>C,Matrix:()=>E.Matrix,MatrixDropdownGroupedPlotly:()=>x,MatrixPlotly:()=>T,NpsAdapter:()=>E.NpsAdapter,NpsVisualizer:()=>E.NpsVisualizer,NpsVisualizerWidget:()=>E.NpsVisualizerWidget,NumberModel:()=>E.NumberModel,PivotModel:()=>E.PivotModel,PivotPlotly:()=>P,PlotlyChartAdapter:()=>D,PlotlySetup:()=>o,PostponeHelper:()=>E.PostponeHelper,RankingModel:()=>E.RankingModel,RankingPlotly:()=>A,SelectBase:()=>E.SelectBase,SelectBasePlotly:()=>b,StatisticsTable:()=>E.StatisticsTable,StatisticsTableAdapter:()=>E.StatisticsTableAdapter,Text:()=>E.Text,TextTableAdapter:()=>E.TextTableAdapter,VisualizationManager:()=>E.VisualizationManager,VisualizationMatrixDropdown:()=>E.VisualizationMatrixDropdown,VisualizationMatrixDynamic:()=>E.VisualizationMatrixDynamic,VisualizationPanel:()=>E.VisualizationPanel,VisualizationPanelDynamic:()=>E.VisualizationPanelDynamic,VisualizerBase:()=>E.VisualizerBase,VisualizerFactory:()=>E.VisualizerFactory,WordCloud:()=>E.WordCloud,WordCloudAdapter:()=>E.WordCloudAdapter,hideEmptyAnswersInData:()=>E.hideEmptyAnswersInData,localization:()=>E.localization,plotlyChartTypes:()=>k,surveyStrings:()=>E.surveyStrings,textHelper:()=>E.textHelper});var e=n(156),t=n(240),i=n(70),r=n(931),o=function(){function n(){}return n.setup=function(e,t,i){return this.setups[e](t,i)},n.setupPie=function(e,t){var i=t.datasets,r=t.labels,s=t.colors,o=(t.texts,t.seriesLabels),a=o.length>1||"matrix"===e.question.getType(),l=[],u={type:e.chartType,labels:r,customdata:r,text:r.map((function(t){return n.getTruncatedLabel(t,e.labelTruncateLength)})),hoverinfo:"label+value+percent",textposition:"inside"};"doughnut"===e.chartType&&(u.type="pie",u.hole=.4),a||(u.mode="markers",u.marker={color:s},u.marker.symbol="circle",u.marker.size=16),i.forEach((function(e,t){e.some((function(e){return 0!=e}))&&l.push(Object.assign({},u,{values:e,domain:{column:l.length%2,row:Math.floor(l.length/2)},title:{position:"bottom center",text:o[t]}}))}));var h={font:{family:"Segoe UI, sans-serif",size:14,weight:"normal",color:"#404040"},height:(25+(r.length<10?50*r.length+100:550))*Math.ceil(l.length/2),margin:{l:0,t:25,b:0,r:10},colorway:s,hovermode:"closest",plot_bgcolor:e.backgroundColor,paper_bgcolor:e.backgroundColor,showlegend:!1};return a&&(h.annotations=[],h.grid={rows:Math.ceil(l.length/2),columns:2}),{traces:l,layout:h,hasSeries:a}},n.setupBar=function(e,i){var r=i.datasets,s=i.labels,o=i.colors,a=i.texts,l=i.seriesLabels,u=l.length>1||"matrix"===e.question.getType(),h=[],c={type:"line"===e.chartType?"line":"bar",y:s,customdata:s,hoverinfo:"text",orientation:"h",textposition:"none"};u||(c.width=.5,c.bargap=.5,c.mode="markers",c.marker={color:o}),r.forEach((function(t,i){var r=u?l[i]:s[i],n=e.showPercentages?"%":"",o=Object.assign({},c,{x:t,name:r,width:u&&"stackedbar"!==e.chartType?.5/l.length:.5,text:a[i],hovertext:s.map((function(t,s){return e.showOnlyPercentages?"".concat(a[i][s]).concat(n):u?"".concat(r," : ").concat(t,", ").concat(a[i][s]).concat(n):"".concat(a[i][s]).concat(n,", ").concat(t)}))});if(e.showPercentages){var d=e.showOnlyPercentages?"%{text}%":"%{value} (%{text}%)";o.textposition="inside",o.texttemplate=d,o.width=u&&"stackedbar"!==e.chartType?.7/l.length:.9,o.bargap=u&&"stackedbar"!==e.chartType?.3/l.length:.1}h.push(o)}));var d={font:{family:"Segoe UI, sans-serif",size:14,weight:"normal",color:"#404040"},height:30*(s.length+1)+30+30,margin:{t:30,b:30,r:10},colorway:o,hovermode:"closest",plot_bgcolor:e.backgroundColor,paper_bgcolor:e.backgroundColor,showlegend:u,barmode:u&&"stackedbar"==e.chartType?"stack":"group",xaxis:{rangemode:"nonnegative",automargin:!0},yaxis:{automargin:!0,type:"category",orientation:"h",tickmode:"array",tickvals:s,ticktext:s.map((function(t){return n.getTruncatedLabel(t,e.labelTruncateLength)+" "}))}};return u&&"stackedbar"!==e.chartType&&(d.height=30*(s.length*l.length+1)+30+30),-1!==["ar","fa"].indexOf(t.q.currentLocale)&&(d.xaxis.autorange="reversed",d.yaxis.side="right",d.legend={x:0,y:1,xanchor:"left",yanchor:"top"}),{traces:h,layout:d,hasSeries:u}},n.setupVBar=function(e,t){var i=t.datasets,r=t.labels,s=t.colors,o=t.texts,a=t.seriesLabels,l=a.length>1||"matrix"===e.question.getType();if("histogram"!==e.type&&"pivot"!==e.type){r=[].concat(r).reverse(),a=[].concat(a).reverse(),s=[].concat(s.slice(0,l?a.length:r.length)).reverse();var u=[];o.forEach((function(e){u.push([].concat(e).reverse())})),o=u;var h=[];i.forEach((function(e){h.push([].concat(e).reverse())})),i=h}var c=[],d={type:"line"===e.chartType?"line":"bar",x:r,customdata:l?a:r,hoverinfo:l?void 0:"x+y",orientation:"v",textposition:"none"};"histogram"!==e.type&&l||(d.width=.5,d.bargap=.5,d.mode="markers",d.marker={color:s}),i.forEach((function(t,i){var n=Object.assign({},d,{y:t,name:l?a[i]:r[i],text:o[i]});if(e.showPercentages){var s=e.showOnlyPercentages?"%{text}%":"%{value} (%{text}%)";n.textposition="inside",n.texttemplate=s,l||(n.width=.9,n.bargap=.1)}c.push(n)}));var p={font:{family:"Segoe UI, sans-serif",size:14,weight:"normal",color:"#404040"},margin:{t:30,b:30,r:10},colorway:s,hovermode:"closest",plot_bgcolor:e.backgroundColor,paper_bgcolor:e.backgroundColor,showlegend:l,yaxis:{rangemode:"nonnegative",automargin:!0},xaxis:{automargin:!0,type:"category",tickmode:"array",tickvals:r,ticktext:r.map((function(t){return n.getTruncatedLabel(t,e.labelTruncateLength)+" "}))}};return e.showPercentages&&e.showOnlyPercentages&&(p.yaxis={automargin:!0,tickformat:".0%",range:[0,1],ticklen:e.showOnlyPercentages?25:5,tickcolor:"transparent"}),e.getValueType&&"date"==e.getValueType()||(p.xaxis={automargin:!0,type:"category"}),{traces:c,layout:p,hasSeries:l}},n.setupScatter=function(e,t){var i=t.datasets,r=t.labels,s=t.colors,o=(t.texts,t.seriesLabels),a=o.length>1||"matrix"===e.question.getType(),l=[],u={type:"scatter",y:(a?o:r).map((function(t){return n.getTruncatedLabel(t,e.labelTruncateLength)})),customdata:a?o:r,text:a?o:r,hoverinfo:"x+y",orientation:"h",mode:"markers",width:.5,marker:{}};a||(u.marker.symbol="circle",u.marker.size=16),i.forEach((function(e){var t=Object.assign({},u,{x:e});l.push(t)}));var h={font:{family:"Segoe UI, sans-serif",size:14,weight:"normal",color:"#404040"},height:30*(r.length+1)+30+30,margin:{t:30,b:30,r:10},colorway:s,hovermode:"closest",yaxis:{automargin:!0,type:"category",ticklen:5,tickcolor:"transparent"},xaxis:{rangemode:"nonnegative",automargin:!0},plot_bgcolor:e.backgroundColor,paper_bgcolor:e.backgroundColor,showlegend:!1};return a&&(h.showlegend=!0,h.height=void 0,r.forEach((function(e,t){l[t].hoverinfo="x+name",l[t].marker.color=void 0,l[t].name=e}))),{traces:l,layout:h,hasSeries:a}},n.setupGauge=function(e,t){var n=t,s=n[0],o=n[1],a=n[2];if("rating"===e.question.getType()){var l=e.question.visibleRateValues;a=l[l.length-1].value,o=l[0].value}var u=e.generateColors(a,o,r.R.stepsCount);r.R.showAsPercentage&&(s=i.NW.toPercentage(s,a),o=i.NW.toPercentage(o,a),a=i.NW.toPercentage(a,a));var h=[{type:"indicator",mode:"gauge+number",gauge:{axis:{range:[o,a]},shape:e.chartType,bgcolor:"white",bar:{color:u[0]}},value:s,text:e.name,domain:{x:[0,1],y:[0,1]}}],c="bullet"===e.chartType?60:30;return{traces:h,layout:{height:250,margin:{l:c,r:c,b:c,t:c,pad:5},plot_bgcolor:e.backgroundColor,paper_bgcolor:e.backgroundColor},hasSeries:!1}},n.imageExportFormat="png",n.onImageSaving=new e.Event,n.onPlotCreating=new e.Event,n.setups={bar:n.setupBar,vbar:n.setupVBar,line:n.setupVBar,stackedbar:n.setupBar,doughnut:n.setupPie,pie:n.setupPie,scatter:n.setupScatter,gauge:n.setupGauge,bullet:n.setupGauge},n.getTruncatedLabel=function(e,t){return t?-1===t||e.length<=t+3?e:e.substring(0,t)+"...":e},n}(),a=n(87),l=n(183),u=n(61),h=n.n(u),c=n(267),d=n(928),p=n(226),f=n(143),g=n(873),m=n(557),_=function(e){function t(t,i,r,n){return e.call(this,t,i,r,n||"matrixDropdownGrouped")||this}return(0,a.C6)(t,e),Object.defineProperty(t.prototype,"matrixQuestion",{get:function(){return this.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataNames",{get:function(){return this.matrixQuestion.columns.map((function(e){return e.name}))},enumerable:!1,configurable:!0}),t.prototype.getSeriesValues=function(){return this.matrixQuestion.columns.map((function(e){return e.name}))},t.prototype.getSeriesLabels=function(){return this.matrixQuestion.columns.map((function(e){return e.title}))},t.prototype.valuesSource=function(){return this.matrixQuestion.choices},t.prototype.isSupportMissingAnswers=function(){return!1},t.prototype.getCalculatedValuesCore=function(){var e=this.getValues(),t=this.getSeriesValues(),i=this.matrixQuestion.rows.map((function(e){return e.value}));return(0,g.X3)(this.surveyData,{name:this.name,dataNames:t,getValues:function(){return e},getLabels:function(){return e},getSeriesValues:function(){return i},getSeriesLabels:function(){return i}}).map((function(e){return e[0]}))},t}(l.o);m.g.registerVisualizer("matrixdropdown-grouped",_);var v=n(472),y=n(582),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,a.C6)(t,e),t.types=["bar","vbar","pie","doughnut"],t.displayModeBar=void 0,t}(l.o),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,a.C6)(t,e),t.types=["pie","bar","doughnut"],t}(d.o),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,a.C6)(t,e),t.types=["vbar","bar"],t}(p.Y),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,a.C6)(t,e),t.types=["bar","stackedbar","pie","doughnut"],t}(f.u),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,a.C6)(t,e),t.types=["stackedbar","bar","pie","doughnut"],t}(_),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,a.C6)(t,e),t.types=["vbar","bar","line","stackedbar","pie","doughnut"],t}(v.y),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,a.C6)(t,e),t.displayModeBar=void 0,t.types=["gauge","bullet"],t}(r.R),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,a.C6)(t,e),t}(y.O),k={boolean:w.types,number:S.types,selectBase:b.types,histogram:C.types,matrix:T.types,matrixDropdownGrouped:x.types,pivot:P.types},D=function(){function i(e){this.model=e,this._chart=void 0}return i.prototype.patchConfigParameters=function(e,t,i,r){if("boolean"===this.model.question.getType()){var n=this.model.getColors(),s=[d.o.trueColor||n[0],d.o.falseColor||n[1]];this.model.showMissingAnswers&&s.push(n[2]);var o=this.model.chartType;"pie"===o||"doughnut"===o?t.forEach((function(e){e.marker.colors=s})):"bar"===o&&t.forEach((function(e){e.marker.color=s}))}"number"===this.model.type&&(r.displayModeBar=!0)},Object.defineProperty(i.prototype,"chart",{get:function(){return this._chart},enumerable:!1,configurable:!0}),i.prototype.getChartTypes=function(){var e=this.model.type;return k[e]||[]},i.prototype.create=function(t){return(0,a.sH)(this,void 0,void 0,(function(){var i,r,n,s,o,u=this;return(0,a.YH)(this,(function(a){switch(a.label){case 0:return[4,this.update(t)];case 1:return i=a.sent(),r=i[0],n=i[1],this.model instanceof l.o&&(s=this.model,t.on("plotly_click",(function(t){var i;if(t.points.length>0){var r="";if(n.hasSeries){r=t.points[0].data.name;var o=t.points[0].label,a=u.model.getSeriesValues()[u.model.getSeriesLabels().indexOf(o)],l=s.getSelectedItemByText(r);h=new e.ItemValue(((i={})[a]=l.value,i),o+": "+l.text),s.setSelection(h)}else{r=Array.isArray(t.points[0].customdata)?t.points[0].customdata[0]:t.points[0].customdata;var h=s.getSelectedItemByText(r);s.setSelection(h)}}}))),o=function(){return t.getElementsByClassName("nsewdrag")[0]},t.on("plotly_hover",(function(){var e=o();e&&(e.style.cursor="pointer")})),t.on("plotly_unhover",(function(){var e=o();e&&(e.style.cursor="")})),this._chart=r,[2,r]}}))}))},i.prototype.update=function(e){return(0,a.sH)(this,void 0,void 0,(function(){var i,r,n,s,u,c=this;return(0,a.YH)(this,(function(a){switch(a.label){case 0:return this.model instanceof l.o?[4,this.model.getAnswersData()]:[3,2];case 1:return r=a.sent(),[3,4];case 2:return[4,this.model.getCalculatedValues()];case 3:r=a.sent(),a.label=4;case 4:return i=r,n=o.setup(this.model.chartType,this.model,i),s={displaylogo:!1,responsive:!0,locale:t.q.currentLocale,modeBarButtonsToRemove:["toImage"],modeBarButtonsToAdd:[{name:"toImageSjs",title:t.q.getString("saveDiagramAsPNG"),icon:h().Icons.camera,click:function(e){var t={format:o.imageExportFormat,filename:c.model.question.name};o.onImageSaving.fire(c.model,t),h().downloadImage(e,t)}}]},void 0!==b.displayModeBar&&(s.displayModeBar=b.displayModeBar),this.patchConfigParameters(e,n.traces,n.layout,s),u={traces:n.traces,layout:n.layout,data:i,config:s},o.onPlotCreating.fire(this.model,u),[2,[h().react(e,u.traces,u.layout,u.config),n]]}}))}))},i.prototype.destroy=function(e){e&&h().purge(e),this._chart=void 0},i}();c.w.chartAdapterType=D;var E=n(918)})(),s})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("plotly.js-dist-min"),require("survey-core")):"function"==typeof define&&define.amd?define("SurveyAnalytics",["plotly.js-dist-min","survey-core"],t):"object"==typeof exports?exports.SurveyAnalytics=t(require("plotly.js-dist-min"),require("survey-core")):e.SurveyAnalytics=t(e.Plotly,e.Survey)}(this,((e,t)=>(()=>{var i={24:e=>{e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><g><circle cx="8" cy="4" r="3"></circle><path d="M8,8c-3.31,0-6,2.73-6,4.67S5.27,15,8,15s6-0.4,6-2.33S11.31,8,8,8z"></path></g></svg>'},41:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><path d="M12.79,4.2L16,1l-1-1l-3.32,3.32C10.57,2.55,9.32,2,8,2C3.63,2,0,7.97,0,7.97s1.27,2.1,3.21,3.82l-3.23,3.23 L0.96,16l3.35-3.34C5.41,13.44,6.67,14,8,14c4.37,0,8-6,8-6S14.73,5.91,12.79,4.2z M2,7.97c1.07-1.47,3.61-4,6-4 c0.8,0,1.6,0.27,2.35,0.68L9.57,5.43C9.11,5.14,8.58,4.97,8,4.97c-1.66,0-3,1.34-3,3c0,0.58,0.17,1.11,0.46,1.57l-0.97,0.97 C3.36,9.64,2.45,8.59,2,7.97z M8,11.97c-0.8,0-1.59-0.27-2.33-0.67l0.78-0.77C6.9,10.8,7.43,10.97,8,10.97c1.66,0,3-1.34,3-3 c0-0.57-0.17-1.09-0.44-1.55l0.98-0.98c1.11,0.87,2.01,1.91,2.46,2.52C12.93,9.44,10.39,11.97,8,11.97z"></path></g></svg>'},61:t=>{"use strict";t.exports=e},70:(e,t,i)=>{"use strict";i.d(t,{NW:()=>o,QV:()=>s,QX:()=>a,Qk:()=>n,gf:()=>r});var r=function(){function e(){}return e.createSelector=function(t,i,r,n){var s=document.createElement("div");if(s.className="sa-question__select-wrapper",n){var o=e.createElement("span","sa-question__select-title",{innerText:n});s.appendChild(o)}var a=document.createElement("select");return a.className="sa-question__select",t.forEach((function(t){var r=e.createElement("option","",{value:t.value,text:t.text,selected:i(t)});a.appendChild(r)})),a.onchange=r,s.appendChild(a),s},e.createButton=function(t,i,r){return void 0===i&&(i=""),void 0===r&&(r="sa-toolbar__button"),e.createElement("span",r,{innerText:i,onclick:t})},e.createElement=function(e,t,i){void 0===t&&(t="");var r=document.createElement(e);return r.className=t,i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r},e.createSvgElement=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=document.createElementNS("http://www.w3.org/2000/svg","use");return i.setAttributeNS("http://www.w3.org/1999/xlink","href","#sa-svg-"+e),t.appendChild(i),t},e.createSvgButton=function(t){var i=e.createElement("button","sa-table__svg-button");return i.appendChild(e.createSvgElement(t)),i},e.createSvgToggleButton=function(t,i,r,n,s,o,a,l){void 0===a&&(a="first"),void 0===l&&(l="sa-toolbar__button sa-toolbar__svg-button");var u=e.createSvgElement(t),h=e.createSvgElement(i),c=e.createElement("button",l);return"first"===a?(c.title=r,c.appendChild(u)):(a="second")&&(c.title=n,c.appendChild(h)),c.onclick=function(e){"first"===a?(a="second",c.title=n,c.removeChild(u),c.appendChild(h),o(e)):"second"===a&&(a="first",c.title=r,c.removeChild(h),c.appendChild(u),s(e))},c},e.createInput=function(t,i,r){return void 0===i&&(i=""),void 0===r&&(r=""),e.createElement("input",t,{placeholder:i,defaultValue:r})},e}();function n(){var e=r.createElement("div","sa-commercial"),t=r.createElement("a","sa-commercial__text",{href:"https://www.surveyjs.io/Buy",target:"_blank"}),i=r.createElement("span",""),n=r.createSvgElement("noncommercial"),s=r.createElement("span","sa-commercial__product",{innerText:"Please purchase a SurveyJS Analytics developer license to use it in your app."});return e.appendChild(t).appendChild(i),i.appendChild(n),i.appendChild(s),e}function s(){var e=r.createElement("div","sa-data-loading-indicator-panel"),t=r.createElement("div","sa-data-loading-indicator");return t.innerHTML='\n <svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_17928_11482)">\n <path d="M32 64C14.36 64 0 49.65 0 32C0 14.35 14.36 0 32 0C49.64 0 64 14.35 64 32C64 49.65 49.64 64 32 64ZM32 4C16.56 4 4 16.56 4 32C4 47.44 16.56 60 32 60C47.44 60 60 47.44 60 32C60 16.56 47.44 4 32 4Z" fill="#E5E5E5"></path>\n <path d="M53.2101 55.2104C52.7001 55.2104 52.1901 55.0104 51.8001 54.6204C51.0201 53.8404 51.0201 52.5704 51.8001 51.7904C57.0901 46.5004 60.0001 39.4704 60.0001 31.9904C60.0001 24.5104 57.0901 17.4804 51.8001 12.1904C51.0201 11.4104 51.0201 10.1404 51.8001 9.36039C52.5801 8.58039 53.8501 8.58039 54.6301 9.36039C60.6701 15.4004 64.0001 23.4404 64.0001 31.9904C64.0001 40.5404 60.6701 48.5704 54.6301 54.6204C54.2401 55.0104 53.7301 55.2104 53.2201 55.2104H53.2101Z" fill="#19B394"></path>\n </g>\n <defs>\n <clipPath id="clip0_17928_11482">\n <rect width="64" height="64" fill="white"></rect>\n </clipPath>\n </defs>\n </svg>\n ',e.appendChild(t),e}window.URL.createObjectURL;var o=function(){function e(){}return e.zipArrays=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=[],r=function(t){i[t]=[],e.forEach((function(e){i[t].push(e[t])}))},n=0;n<e[0].length;n++)r(n);return i},e.unzipArrays=function(e){var t=[];return e.forEach((function(e,i){e.forEach((function(e,r){t[r]||(t[r]=[]),t[r][i]=e}))})),t},e.sortDictionary=function(e,t,i){var r=this.zipArrays(e,t),n=function(e,t,i){void 0===i&&(i=!0);var r=e[1]<t[1]?1:e[1]==t[1]?0:-1;return i?r:-1*r};r.sort((function(e,t){return i?n(e,t,!1):n(e,t)}));var s=this.unzipArrays(r);return{keys:s[0],values:s[1]}},e.toPercentage=function(e,t){return e/t*100},e}();function a(e,t){void 0===t&&(t=2);var i=Math.pow(10,t);return Math.round(i*e)/i}},87:(e,t,i)=>{"use strict";i.d(t,{C6:()=>n,Cl:()=>r,YH:()=>o,sH:()=>s});var r=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e};function n(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function s(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))}function o(e,t){var i,r,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(6===s[0]&&o.label<n[1]){o.label=n[1],n=s;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(s);break}n[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{i=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}},143:(e,t,i)=>{"use strict";i.d(t,{u:()=>a});var r=i(87),n=i(156),s=i(183),o=i(557),a=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"matrix")||this;return s._transposeData=!0,s}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"matrixQuestion",{get:function(){return this.question},enumerable:!1,configurable:!0}),t.prototype.isSupportMissingAnswers=function(){return!1},t.prototype.getSeriesValues=function(){return this.matrixQuestion.rows.map((function(e){return""+e.value}))},t.prototype.getSeriesLabels=function(){var e=this;return this.matrixQuestion.rows.map((function(t){return n.ItemValue.getTextOrHtmlByValue(e.matrixQuestion.rows,t.value)}))},t.prototype.getSelectedItemByText=function(e){return this.matrixQuestion.columns.filter((function(t){return t.text===e}))[0]},t.prototype.valuesSource=function(){return this.matrixQuestion.columns},t.prototype.getHasAnswersInAllSeriesArray=function(e){for(var t=Array(),i=0;i<e[0].length;i++)for(var r=0;r<e.length;r++)0!=e[r][i]&&(t[i]=!0);return t},t.prototype.getHasAnswersInSeries=function(e){for(var t=0;t<e.length;t++)if(0!=e[t])return!0;return!1},t.prototype.hideEmptyAnswersInData=function(e){for(var t={datasets:[],labels:[],colors:[],texts:[],seriesLabels:[]},i=this.getHasAnswersInAllSeriesArray(e.datasets),r=0;r<e.datasets.length;r++)if(this.getHasAnswersInSeries(e.datasets[r])){t.labels.push(e.labels[r]),t.colors.push(e.colors[r]);for(var n=[],s=[],o=0;o<e.datasets[0].length;o++)i[o]&&(n.push(e.datasets[r][o]),s.push(e.texts[r][o]));t.datasets.push(n),t.texts.push(s)}for(r=0;r<e.datasets[0].length;r++)i[r]&&t.seriesLabels.push(e.seriesLabels[r]);return t},t}(s.o);o.g.registerVisualizer("matrix",a)},156:e=>{"use strict";e.exports=t},183:(e,t,i)=>{"use strict";i.d(t,{M:()=>u,o:()=>h});var r=i(87),n=i(156),s=i(267),o=i(240),a=i(70),l=i(557);function u(e){var t={datasets:[],labels:[],colors:[],texts:[],seriesLabels:[]};if(0===e.seriesLabels.length){t.datasets.push([]),t.texts.push([]);for(var i=0;i<e.datasets[0].length;i++)0!=e.datasets[0][i]&&(t.datasets[0].push(e.datasets[0][i]),t.labels.push(e.labels[i]),t.colors.push(e.colors[i]),t.texts[0].push(e.texts[0][i]));return t}var r=[];r.length=e.seriesLabels.length;var n=[];n.length=e.labels.length;for(var s=0;s<e.seriesLabels.length;s++)for(var o=0;o<e.labels.length;o++)0!=e.datasets[s][o]&&(r[s]=!0,n[o]=!0);for(o=0;o<n.length;o++)n[o]&&(t.labels.push(e.labels[o]),t.colors.push(e.colors[o]));for(s=0;s<e.seriesLabels.length;s++)r[s]&&t.seriesLabels.push(e.seriesLabels[s]);for(s=0;s<e.datasets.length;s++)if(r[s]){var a=[],l=[];for(o=0;o<e.labels.length;o++)n[o]&&(a.push(e.datasets[s][o]),l.push(e.texts[s][o]));t.datasets.push(a),t.texts.push(l)}return t}var h=function(e){function t(i,r,l,u){var h=e.call(this,i,r,l,u||"selectBase")||this;return h.selectedItem=void 0,h.choicesOrderSelector=void 0,h.showPercentageBtn=void 0,h.emptyAnswersBtn=void 0,h.transposeDataBtn=void 0,h.topNSelector=void 0,h._showPercentages=!1,h._showOnlyPercentages=!1,h._percentagePrecision=0,h._answersOrder="default",h._supportSelection=!0,h._hideEmptyAnswers=!1,h._topN=-1,h.topNValues=[].concat(t.topNValuesDefaults),h._transposeData=!1,h._showMissingAnswers=!1,h.missingAnswersBtn=void 0,h.chartTypes=[],h._chartType="bar",h.onAnswersDataReady=new n.Event,i&&(i.visibleChoicesChangedCallback=function(){h.dataProvider.raiseDataChanged()}),h._showPercentages=!0===h.options.showPercentages,h._showOnlyPercentages=!0===h.options.showOnlyPercentages,h.options.percentagePrecision&&(h._percentagePrecision=h.options.percentagePrecision),void 0!==h.options.transposeData&&(h._transposeData=h.options.transposeData),h._hideEmptyAnswers=!0===h.options.hideEmptyAnswers,h._answersOrder=h.options.answersOrder||"default",h._showMissingAnswers=h.isSupportMissingAnswers()&&!0===h.options.showMissingAnswers,h.options.allowExperimentalFeatures,s.w.chartAdapterType&&(h._chartAdapter=new s.w.chartAdapterType(h),h.chartTypes=h._chartAdapter.getChartTypes(),h.getSeriesValues().length>0&&-1===h.chartTypes.indexOf("stackedbar")&&h.chartTypes.push("stackedbar"),h._chartType=h.chartTypes[0],-1!==h.chartTypes.indexOf(h.options.defaultChartType)&&(h._chartType=h.options.defaultChartType)),h.registerToolbarItem("changeChartType",(function(){return h.chartTypes.length>1?a.gf.createSelector(h.chartTypes.map((function(e){return{value:e,text:o.q.getString("chartType_"+e)}})),(function(e){return h.chartType===e.value}),(function(e){h.setChartType(e.target.value)})):null})),h.registerToolbarItem("changeAnswersOrder",(function(){return h.isSupportAnswersOrder()&&(h.choicesOrderSelector=a.gf.createSelector([{text:o.q.getString("defaultOrder"),value:"default"},{text:o.q.getString("ascOrder"),value:"asc"},{text:o.q.getString("descOrder"),value:"desc"}],(function(e){return!1}),(function(e){h.answersOrder=e.target.value})),h.updateOrderSelector()),h.choicesOrderSelector})),h.registerToolbarItem("showPercentages",(function(){if(h.options.allowShowPercentages&&(-1!==h.chartTypes.indexOf("bar")||-1!==h.chartTypes.indexOf("stackedbar")))return h.showPercentageBtn=a.gf.createButton((function(){h.showPercentages=!h.showPercentages})),h.updateShowPercentageBtn(),h.showPercentageBtn})),h.registerToolbarItem("hideEmptyAnswers",(function(){return h.options.allowHideEmptyAnswers&&(h.emptyAnswersBtn=a.gf.createButton((function(){h.hideEmptyAnswers=!h._hideEmptyAnswers})),h.updateEmptyAnswersBtn()),h.emptyAnswersBtn}),1e3),h.registerToolbarItem("topNAnswers",(function(){return h.options.allowTopNAnswers&&0===h.getSeriesValues().length&&(h.topNSelector=a.gf.createSelector(h.topNValues.map((function(e){return{text:o.q.getString("topNValueText"+e),value:e}})),(function(e){return!1}),(function(e){h.topN=parseInt(e.target.value)})),h.updateTopNSelector()),h.topNSelector})),h.registerToolbarItem("transposeData",(function(){return h.options.allowTransposeData&&(h.transposeDataBtn=a.gf.createButton((function(){h.transposeData=!h.transposeData})),h.updateTransposeDataBtn()),h.transposeDataBtn})),h.registerToolbarItem("showMissingAnswers",(function(){return h.isSupportMissingAnswers()&&h.options.allowShowMissingAnswers&&(h.missingAnswersBtn=a.gf.createButton((function(){h.showMissingAnswers=!h._showMissingAnswers})),h.updateMissingAnswersBtn()),h.missingAnswersBtn})),h}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"chartType",{get:function(){return this._chartType},set:function(e){this.setChartType(e)},enumerable:!1,configurable:!0}),t.prototype.updateEmptyAnswersBtn=function(){this.emptyAnswersBtn&&(this.emptyAnswersBtn.innerText=this._hideEmptyAnswers?o.q.getString("showEmptyAnswers"):o.q.getString("hideEmptyAnswers"),"bar"==this.chartType||"vbar"==this.chartType||"line"==this.chartType||"scatter"==this.chartType?this.emptyAnswersBtn.style.display="inline":this.emptyAnswersBtn.style.display="none")},t.prototype.updateTransposeDataBtn=function(){this.transposeDataBtn&&(this.transposeDataBtn.innerText=this.transposeData?o.q.getString("showPerColumns"):o.q.getString("showPerValues"),this.getSeriesValues().length>0?this.transposeDataBtn.style.display="inline":this.transposeDataBtn.style.display="none")},t.prototype.updateOrderSelector=function(){this.choicesOrderSelector&&("bar"==this.chartType||"vbar"==this.chartType||"line"==this.chartType||"scatter"==this.chartType||("pie"==this.chartType||"doughnut"==this.chartType)&&this.topN>0?this.choicesOrderSelector.style.display="inline-flex":this.choicesOrderSelector.style.display="none",this.choicesOrderSelector.getElementsByTagName("select")[0].value=this.answersOrder)},t.prototype.updateShowPercentageBtn=function(){this.showPercentageBtn&&(this.showPercentageBtn.innerText=this._showPercentages?o.q.getString("hidePercentages"):o.q.getString("showPercentages"),"bar"==this.chartType||"vbar"==this.chartType||"stackedbar"==this.chartType?this.showPercentageBtn.style.display="inline":this.showPercentageBtn.style.display="none")},t.prototype.updateTopNSelector=function(){this.topNSelector&&(this.topNSelector.getElementsByTagName("select")[0].value=this._topN)},t.prototype.updateMissingAnswersBtn=function(){this.missingAnswersBtn&&(this.missingAnswersBtn.innerText=this._showMissingAnswers?o.q.getString("hideMissingAnswers"):o.q.getString("showMissingAnswers"))},t.prototype.onChartTypeChanged=function(){this.updateOrderSelector(),this.updateShowPercentageBtn(),this.updateEmptyAnswersBtn(),this.updateTopNSelector(),this.stateChanged("chartType",this._chartType)},t.prototype.setChartType=function(e){-1!==this.chartTypes.indexOf(e)&&this._chartType!==e&&(this._chartType=e,this.onChartTypeChanged(),this.refreshContent())},t.prototype.getCorrectAnswerText=function(){var t=e.prototype.getCorrectAnswerText.call(this),i=Array.isArray(t)?t:[t],r=this.question;return i.map((function(e){return n.ItemValue.getTextOrHtmlByValue(r.choices,e)})).join(", ")},t.prototype.isSupportSoftUpdateContent=function(){return!0},t.prototype.softUpdateContent=function(){var e,t=null===(e=this.contentContainer)||void 0===e?void 0:e.children[0];t&&this._chartAdapter.update(t)},t.prototype.getSelectedItemByText=function(e){var t=this.question;return this.question.hasOther&&e==t.otherText?t.otherItem:t.choices.filter((function(t){return t.text===e}))[0]},t.prototype.setSelection=function(e){var t;this.selectedItem!==e&&(this.selectedItem=e,void 0!==this.onDataItemSelected&&this.onDataItemSelected(void 0!==e?e.value:void 0,void 0!==e?e.text:""),this.stateChanged("filter",null===(t=this.selectedItem)||void 0===t?void 0:t.value))},Object.defineProperty(t.prototype,"selection",{get:function(){return this.selectedItem},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showOnlyPercentages",{get:function(){return this._showOnlyPercentages},set:function(e){this._showOnlyPercentages=e,this.refreshContent(),this.stateChanged("showOnlyPercentages",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showPercentages",{get:function(){return this._showPercentages},set:function(e){this._showPercentages=e,this.updateShowPercentageBtn(),this.refreshContent(),this.stateChanged("showPercentages",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"answersOrder",{get:function(){return this._answersOrder},set:function(e){this._answersOrder=e,this.updateOrderSelector(),this.refreshContent(),this.stateChanged("answersOrder",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideEmptyAnswers",{get:function(){return this._hideEmptyAnswers},set:function(e){this._hideEmptyAnswers=e,this.updateEmptyAnswersBtn(),this.refreshContent(),this.stateChanged("hideEmptyAnswers",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transposeData",{get:function(){return this._transposeData},set:function(e){this._transposeData=e,this.updateTransposeDataBtn(),this.refreshContent(),this.stateChanged("transposeData",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topN",{get:function(){return this._topN},set:function(e){this._topN=e,this.updateTopNSelector(),this.updateOrderSelector(),this.refreshContent(),this.stateChanged("topN",e)},enumerable:!1,configurable:!0}),t.prototype.isSupportAnswersOrder=function(){return!1!==this.options.allowSortAnswers&&!1!==this.options.allowChangeAnswersOrder&&0===this.getSeriesValues().length},t.prototype.isSupportMissingAnswers=function(){return!0},Object.defineProperty(t.prototype,"showMissingAnswers",{get:function(){return this._showMissingAnswers},set:function(e){this._showMissingAnswers=this.isSupportMissingAnswers()&&e,this.updateMissingAnswersBtn(),this.dataProvider.raiseDataChanged(this.name),this.refreshContent(),this.stateChanged("showMissingAnsewrs",e)},enumerable:!1,configurable:!0}),t.prototype.refreshContent=function(){this.contentContainer&&(this.destroyContent(this.contentContainer),this.renderContent(this.contentContainer)),this.invokeOnUpdate()},Object.defineProperty(t.prototype,"showValuesInOriginalOrder",{get:function(){return!1!==this.options.showValuesInOriginalOrder},enumerable:!1,configurable:!0}),t.prototype.valuesSource=function(){var e=this.question;return e.choicesFromQuestion&&e.survey&&(e=e.survey.getQuestionByName(e.choicesFromQuestion)),e.activeChoices||e.visibleChoices||e.choices||[]},t.prototype.getValues=function(){var e=this.valuesSource().map((function(e){return e.value}));return this.question.hasNone&&e.push(this.question.noneItem.value),this.question.hasOther&&e.push("other"),this.showMissingAnswers&&e.unshift(void 0),this.showValuesInOriginalOrder?e.reverse():e},t.prototype.getLabels=function(){var e=this;if(this.options.useValuesAsLabels)return this.getValues();var t=this.valuesSource().map((function(t){return n.ItemValue.getTextOrHtmlByValue(e.valuesSource(),t.value)})),i=this.question;return i.hasNone&&t.push(i.noneText),i.hasOther&&t.push(i.otherText),this.showMissingAnswers&&t.unshift(o.q.getString("missingAnswersLabel")),this.showValuesInOriginalOrder?t.reverse():t},t.prototype.getPercentages=function(e){var t=[],i=this._percentagePrecision;if(e.length<2)e.forEach((function(e,r){var n=e.reduce((function(e,t){return e+t}),0);t[r]=e.map((function(e){var t=i?+(e/n).toFixed(i):Math.round(e/n*1e4);return n&&t/100}))}));else for(var r=0;r<e[0].length;r++){for(var n=0,s=0;s<e.length;s++)n+=e[s][r];for(s=0;s<e.length;s++){Array.isArray(t[s])||(t[s]=[]);var o=i?+(e[s][r]/n*100).toFixed(i):Math.round(e[s][r]/n*100);t[s][r]=n&&o}}return t},t.prototype.answersDataReady=function(e){var t={};return t=this.hideEmptyAnswers?u(e):e,this.topN>0&&(t.datasets[0]=t.datasets[0].slice(-this.topN),t.labels=t.labels.slice(-this.topN),t.colors=t.colors.slice(-this.topN),t.texts[0]=t.texts[0].slice(-this.topN)),t},t.prototype.getAnswersData=function(){return(0,r.sH)(this,void 0,void 0,(function(){var e,t,i,n,s,o,l,u,h,c;return(0,r.YH)(this,(function(r){switch(r.label){case 0:return e=this.getSeriesLabels(),[4,this.getCalculatedValues()];case 1:return t=r.sent(),i=this.getLabels(),n=this.getColors(),s=this.showPercentages?this.getPercentages(t):t,this.transposeData&&(t=this.transpose(t),s=this.transpose(s),o=e,e=i,i=o),"asc"!=this.answersOrder&&"desc"!=this.answersOrder||(l=this.showPercentages?a.NW.zipArrays(i,n,s[0]):a.NW.zipArrays(i,n),u=a.NW.sortDictionary(l,t[0],"desc"==this.answersOrder),h=a.NW.unzipArrays(u.keys),i=h[0],n=h[1],this.showPercentages&&(s[0]=h[2]),t[0]=u.values),c={datasets:t,labels:i,colors:n,texts:s,seriesLabels:e},c=this.answersDataReady(c),this.onAnswersDataReady.fire(this,c),[2,c]}}))}))},t.prototype.convertFromExternalData=function(e){var t=this.getValues(),i=this.getSeriesValues(),r=[];if(i.length>0)for(var n=0;n<i.length;n++){for(var s=[],o=0;o<t.length;o++)e[i[n]]?s.push(e[i[n]][t[o]]||0):s.push(0);r.push(s)}else{for(s=[],o=0;o<t.length;o++)s.push(e[t[o]]||0);r.push(s)}return r},t.prototype.transpose=function(e){for(var t=e[0].length,i=new Array(t),r=0;r<t;++r)i[r]=new Array(e.length);for(r=0;r<e.length;++r)for(var n=0;n<t;++n)i[n][r]=e[r][n];return i},t.prototype.getState=function(){var e=this,i={};return t._stateProperties.forEach((function(t){i[t]=e[t]})),this.selectedItem&&(i.filter=this.selectedItem.value),i},t.prototype.setState=function(e){var i=this;t._stateProperties.forEach((function(t){void 0!==e[t]&&(i[t]=e[t])}));var r=n.ItemValue.getItemByValue(this.question.visibleChoices,e.filter);this.setSelection(null!=r?r:void 0)},t.topNValuesDefaults=[-1,5,10,20],t._stateProperties=["chartType","answersOrder","hideEmptyAnswers","topN"],t}(s.w);l.g.registerVisualizer("checkbox",h),l.g.registerVisualizer("radiogroup",h),l.g.registerVisualizer("dropdown",h),l.g.registerVisualizer("imagepicker",h),l.g.registerVisualizer("tagbox",h)},226:(e,t,i)=>{"use strict";i.d(t,{Y:()=>u});var r=i(87),n=i(156),s=i(555),o=i(183),a=i(557),l=i(873),u=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"histogram")||this;return s.valueType="number",s._cachedValues=void 0,s._continiousData=void 0,s._cachedIntervals=void 0,s._intervalPrecision=2,s._transposeData=!1,void 0!==s.options.intervalPrecision&&(s._intervalPrecision=s.options.intervalPrecision),"text"!==t.getType()||"date"!==t.inputType&&"datetime"!==t.inputType?s.valueType="number":s.valueType="date",s}return(0,r.C6)(t,e),t.prototype.reset=function(){this._continiousData=void 0,this._cachedValues=void 0,this._cachedIntervals=void 0},t.prototype.getContiniousValue=function(e){return"date"===this.valueType?Date.parse(e):parseFloat(e)},t.prototype.getString=function(e){return"date"===this.valueType?new Date(e).toLocaleDateString():""+e},t.prototype.toPrecision=function(e){var t=Math.pow(10,this._intervalPrecision);return Math.round(t*e)/t},t.prototype.getSelectedItemByText=function(e){if(this.hasCustomIntervals||this.getContiniousValues().length>t.UseIntervalsFrom){var i=this.intervals.filter((function(t){return t.label===e}))[0];return new n.ItemValue(i,void 0!==i?i.label:"")}var r=this.getLabels(),s=r.indexOf(e);return new n.ItemValue(this.getValues()[s],r[s])},t.prototype.updateData=function(t){this.reset(),e.prototype.updateData.call(this,t)},t.prototype.onDataChanged=function(){this.reset(),e.prototype.onDataChanged.call(this)},t.prototype.getContiniousValues=function(){var e=this;if(void 0===this._cachedValues){var t=this.getSeriesValues();0===t.length&&t.push(""),this._continiousData={},t.forEach((function(t){return e._continiousData[t]=[]}));var i={};this.data.forEach((function(t){var r=t[e.name];if(void 0!==r){var n=t[s.M.seriesMarkerKey]||"";e._continiousData[n].push(e.getContiniousValue(r)),i[r]=r}})),this._cachedValues=Object.keys(i).map((function(t){return{original:i[t],continious:e.getContiniousValue(t)}})),this._cachedValues.sort((function(e,t){return e.continious-t.continious}))}return this._cachedValues},t.prototype.isSupportMissingAnswers=function(){return!1},Object.defineProperty(t.prototype,"needUseRateValues",{get:function(){return"rating"==this.question.getType()&&Array.isArray(this.question.rateValues)&&this.question.rateValues.length>0},enumerable:!1,configurable:!0}),t.prototype.getValues=function(){return this.intervals.map((function(e){return e.start}))},t.prototype.getLabels=function(){return this.intervals.map((function(e){return e.label}))},Object.defineProperty(t.prototype,"hasCustomIntervals",{get:function(){return!!this.questionOptions&&Array.isArray(this.questionOptions.intervals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"intervals",{get:function(){if(this.hasCustomIntervals)return this.questionOptions.intervals;if("rating"==this.question.getType()){if(this.needUseRateValues){var e=this.question.rateValues;return e.sort((function(e,t){return e.value-t.value})),e.map((function(t,i){return{start:t.value,end:i<e.length-1?e[i+1].value:t.value+1,label:t.text}}))}for(var i=[],r=this.question.rateMin||0;r<=(this.question.rateMax||t.IntervalsCount-1);r+=this.question.rateStep||1)i.push({start:r,end:r+1,label:""+(this.question.rateMin&&this.question.rateMax?r:r+"-"+(r+1))});return i}if(void 0===this._cachedIntervals){var n=this.getContiniousValues();if(this._cachedIntervals=[],n.length){var s=n[0].continious,o=n[n.length-1].continious,a=t.IntervalsCount,l=(o-s)/a;for(r=0;r<a;++r){var u=s+l,h=this.toPrecision(s),c=this.toPrecision(u);this._cachedIntervals.push({start:h,end:r<a-1?c:c+l/100,label:this.getString(h)+"-"+this.getString(c)}),s=u}}}return this._cachedIntervals},enumerable:!1,configurable:!0}),t.prototype.convertFromExternalData=function(e){return[e]},t.prototype.getCalculatedValuesCore=function(){return this.getContiniousValues(),(0,l.er)(this._continiousData,this.intervals,this.getSeriesValues())},t.prototype.getValueType=function(){return this.valueType},t.IntervalsCount=10,t.UseIntervalsFrom=10,t}(o.o);a.g.registerVisualizer("date",u),a.g.registerVisualizer("number",u,100),a.g.registerVisualizer("rating",u,100)},240:(e,t,i)=>{"use strict";i.d(t,{D:()=>s,q:()=>n});var r=i(391),n={currentLocaleValue:"",defaultLocaleValue:"en",locales:{},localeNames:{},supportedLocales:[],get currentLocale(){return this.currentLocaleValue===this.defaultLocaleValue?"":this.currentLocaleValue},set currentLocale(e){this.currentLocaleValue=e},get defaultLocale(){return this.defaultLocaleValue},set defaultLocale(e){this.defaultLocaleValue=e},getString:function(e){var t=this.currentLocale?this.locales[this.currentLocale]:this.locales[this.defaultLocale];t&&t[e]||(t=this.locales[this.defaultLocale]);var i=t[e];return void 0===i&&(i=this.locales.en[e]||e),i},getLocales:function(){var e=[];if(e.push(""),this.supportedLocales&&this.supportedLocales.length>0)for(var t=0;t<this.supportedLocales.length;t++)e.push(this.supportedLocales[t]);else for(var i in this.locales)e.push(i);return e.sort(),e}},s=r.z;n.locales.en=r.z,n.localeNames.en="English"},267:(e,t,i)=>{"use strict";i.d(t,{b:()=>c,w:()=>d});var r=i(87),n=i(156),s=i(555),o=i(818),a=i(557),l=i(70),u=i(240),h=i(873),c=function(){function e(){}return e.postpone=function(t,i){return e.postponeFunction?e.postponeFunction(t,i):setTimeout(t,i)},e}(),d=function(){function e(e,t,i,r){void 0===i&&(i={});var o,a=this;this.question=e,this.options=i,this._type=r,this._showToolbar=!0,this._footerVisualizer=void 0,this._dataProvider=void 0,this._getDataCore=void 0,this.labelTruncateLength=27,this.renderResult=void 0,this.toolbarContainer=void 0,this.headerContainer=void 0,this.contentContainer=void 0,this.footerContainer=void 0,this._supportSelection=!1,this._chartAdapter=void 0,this.onAfterRender=new n.Event,this.onLocaleChanged=new n.Event,this.onStateChanged=new n.Event,this.toolbarItemCreators={},this._backgroundColor="#f7f7f7",this._calculationsCache=void 0,this.loadingData=!1,this._settingState=!1,this._getDataCore=null===(o=this.questionOptions)||void 0===o?void 0:o.getDataCore,this._dataProvider=i.dataProvider||new s.M(t),this._dataProvider.onDataChanged.add((function(){return a.onDataChanged()})),this.loadingData=!!this._dataProvider.dataFn,void 0!==i.labelTruncateLength&&(this.labelTruncateLength=i.labelTruncateLength)}return e.prototype.afterRender=function(e){this.onAfterRender.fire(this,{htmlElement:e})},e.prototype.stateChanged=function(e,t){this._settingState||this.onStateChanged.fire(this,this.getState())},e.prototype.getToolbarItemCreators=function(){return Object.assign({},this.toolbarItemCreators,this.onGetToolbarItemCreators&&this.onGetToolbarItemCreators()||{})},Object.defineProperty(e.prototype,"questionOptions",{get:function(){var e;return this.options[null===(e=this.question)||void 0===e?void 0:e.name]},enumerable:!1,configurable:!0}),e.prototype.onDataChanged=function(){this._calculationsCache=void 0,this.loadingData=!!this._dataProvider.dataFn,this.refresh()},Object.defineProperty(e.prototype,"name",{get:function(){return this.question.valueName||this.question.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataNames",{get:function(){return[this.name]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasHeader",{get:function(){return!!(this.options&&this.options.showCorrectAnswers&&this.question&&this.question.correctAnswer)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasFooter",{get:function(){return!!this.question&&(this.question.hasComment||this.question.hasOther)},enumerable:!1,configurable:!0}),e.prototype.createVisualizer=function(e,t,i){var r=Object.assign({},t||this.options);return void 0===r.dataProvider&&(r.dataProvider=this.dataProvider),o.D.createVisualizer(e,i||this.data,r)},Object.defineProperty(e.prototype,"footerVisualizer",{get:function(){var e=this;if(this.hasFooter){if(!this._footerVisualizer){var t=new n.QuestionCommentModel(this.question.name+(n.settings||{}).commentPrefix);t.title=this.processText(this.question.title);var i=Object.assign({},this.options);i.renderContent=void 0,this._footerVisualizer=this.createVisualizer(t,i),this._footerVisualizer&&(this._footerVisualizer.onUpdate=function(){return e.invokeOnUpdate()})}return this._footerVisualizer}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportSelection",{get:function(){return(void 0===this.options.allowSelection||this.options.allowSelection)&&this._supportSelection},enumerable:!1,configurable:!0}),e.prototype.getSeriesValues=function(){return this.options.seriesValues||[]},e.prototype.getSeriesLabels=function(){return this.options.seriesLabels||this.getSeriesValues()},e.prototype.getValues=function(){throw new Error("Method not implemented.")},e.prototype.getLabels=function(){return this.getValues()},e.prototype.registerToolbarItem=function(e,t,i){void 0===i&&(i=100),this.toolbarItemCreators[e]={creator:t,order:i}},e.prototype.unregisterToolbarItem=function(e){if(void 0!==this.toolbarItemCreators[e]){var t=this.toolbarItemCreators[e];return delete this.toolbarItemCreators[e],t.creator}},Object.defineProperty(e.prototype,"type",{get:function(){return this._type||"visualizer"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.dataProvider.filteredData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"surveyData",{get:function(){return this.dataProvider.filteredData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataProvider",{get:function(){return this._dataProvider},enumerable:!1,configurable:!0}),e.prototype.updateData=function(e){this.options.dataProvider||(this.dataProvider.data=e),this.hasFooter&&this.footerVisualizer.updateData(e)},e.prototype.invokeOnUpdate=function(){this.onUpdate&&this.onUpdate()},e.prototype.destroy=function(){this.renderResult&&(this.clear(),this.toolbarContainer=void 0,this.headerContainer=void 0,this.contentContainer=void 0,this.footerContainer=void 0,this.renderResult.innerHTML="",this.renderResult=void 0),this._footerVisualizer&&(this._footerVisualizer.destroy(),this._footerVisualizer.onUpdate=void 0,this._footerVisualizer=void 0)},e.prototype.clear=function(){this.toolbarContainer&&this.destroyToolbar(this.toolbarContainer),this.headerContainer&&this.destroyHeader(this.headerContainer),this.contentContainer&&this.destroyContent(this.contentContainer),this.footerContainer&&this.destroyFooter(this.footerContainer)},e.prototype.createToolbarItems=function(e){var t=this.getToolbarItemCreators();Object.keys(t||{}).map((function(e){return(0,r.Cl)({name:e},t[e])})).sort((function(e,t){return e.order-t.order})).forEach((function(t){var i=t.creator(e);i&&e.appendChild(i)}))},e.prototype.getCorrectAnswerText=function(){return this.question?this.question.correctAnswer:""},e.prototype.destroyToolbar=function(e){e.innerHTML=""},e.prototype.renderToolbar=function(e){if(this.showToolbar){var t=l.gf.createElement("div","sa-toolbar");this.createToolbarItems(t),e.appendChild(t)}},e.prototype.destroyHeader=function(e){this.options&&"function"==typeof this.options.destroyHeader?this.options.destroyHeader(e,this):e.innerHTML=""},e.prototype.destroyContent=function(e){this.options&&"function"==typeof this.options.destroyContent?this.options.destroyContent(e,this):this._chartAdapter&&this._chartAdapter.destroy(e.children[0]),e.innerHTML=""},e.prototype.renderHeader=function(e){if(this.options&&"function"==typeof this.options.renderHeader)this.options.renderHeader(e,this);else{var t=l.gf.createElement("div","sa-visualizer__correct-answer");t.innerText=u.q.getString("correctAnswer")+this.getCorrectAnswerText(),e.appendChild(t)}},e.prototype.renderContentAsync=function(e){return(0,r.sH)(this,void 0,void 0,(function(){var t;return(0,r.YH)(this,(function(i){switch(i.label){case 0:return this._chartAdapter?(t=l.gf.createElement("div"),e.innerHTML="",e.appendChild(t),[4,this._chartAdapter.create(t)]):[3,2];case 1:return i.sent(),[3,3];case 2:e.innerText=u.q.getString("noVisualizerForQuestion"),i.label=3;case 3:return[2,e]}}))}))},e.prototype.ensureQuestionIsReady=function(){var e=this;return new Promise((function(t){e.question?e.question.waitForQuestionIsReady().then((function(){return t()})):t()}))},e.prototype.renderContent=function(e){var t=this;this.options&&"function"==typeof this.options.renderContent?!1!==this.options.renderContent(e,this)&&this.afterRender(e):(this.loadingData&&this.renderLoadingIndicator(this.contentContainer),this.ensureQuestionIsReady().then((function(){return t.renderContentAsync(e).then((function(e){return t.afterRender(e)}))})))},e.prototype.destroyFooter=function(e){e.innerHTML=""},e.prototype.renderFooter=function(t){var i=this;if(t.innerHTML="",this.hasFooter){var r=l.gf.createElement("h4","sa-visualizer__footer-title",{innerText:u.q.getString("otherCommentTitle")});t.appendChild(r);var n=l.gf.createElement("div","sa-visualizer__footer-content");n.style.display=e.otherCommentCollapsed?"none":"block";var s=l.gf.createButton((function(){"none"===n.style.display?(n.style.display="block",s.innerText=u.q.getString("hideButton")):(n.style.display="none",s.innerText=u.q.getString(e.otherCommentCollapsed?"showButton":"hideButton")),i.footerVisualizer.invokeOnUpdate()}),u.q.getString("showButton"));t.appendChild(s),t.appendChild(n),this.footerVisualizer.render(n)}},e.prototype.render=function(e){"string"==typeof e&&(e=document.getElementById(e)),this.renderResult=e,this.toolbarContainer=l.gf.createElement("div","sa-visualizer__toolbar"),e.appendChild(this.toolbarContainer),this.renderToolbar(this.toolbarContainer),this.hasHeader&&(this.headerContainer=l.gf.createElement("div","sa-visualizer__header"),e.appendChild(this.headerContainer),this.renderHeader(this.headerContainer)),this.contentContainer=l.gf.createElement("div","sa-visualizer__content"),e.appendChild(this.contentContainer),this.renderContent(this.contentContainer),this.footerContainer=l.gf.createElement("div","sa-visualizer__footer"),e.appendChild(this.footerContainer),this.renderFooter(this.footerContainer)},e.prototype.updateToolbar=function(){var e=this;this.toolbarContainer&&c.postpone((function(){e.destroyToolbar(e.toolbarContainer),e.renderToolbar(e.toolbarContainer)}))},e.prototype.isSupportSoftUpdateContent=function(){return!1},e.prototype.softUpdateContent=function(){},e.prototype.hardUpdateContent=function(){this.destroyContent(this.contentContainer),this.renderContent(this.contentContainer)},e.prototype.updateContent=function(){this.isSupportSoftUpdateContent()?this.softUpdateContent():this.hardUpdateContent()},e.prototype.refresh=function(){var e=this;this.headerContainer&&c.postpone((function(){e.destroyHeader(e.headerContainer),e.renderHeader(e.headerContainer),e.invokeOnUpdate()})),this.contentContainer&&c.postpone((function(){e.updateContent(),e.invokeOnUpdate()})),this.footerContainer&&c.postpone((function(){e.destroyFooter(e.footerContainer),e.renderFooter(e.footerContainer),e.invokeOnUpdate()}))},e.prototype.processText=function(e){return!1!==this.options.stripHtmlFromTitles?(e||"").replace(/(<([^>]+)>)/gi,""):e},e.prototype.getRandomColor=function(){var e=this.getColors();return e[Math.floor(Math.random()*e.length)]},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this.getBackgroundColorCore()},set:function(e){this.setBackgroundColorCore(e)},enumerable:!1,configurable:!0}),e.prototype.getBackgroundColorCore=function(){return this._backgroundColor},e.prototype.setBackgroundColorCore=function(e){this._backgroundColor=e,this.footerVisualizer&&(this.footerVisualizer.backgroundColor=e)},e.prototype.getColors=function(t){void 0===t&&(t=10);for(var i=Array.isArray(e.customColors)&&e.customColors.length>0?e.customColors:e.colors,r=[],n=0;n<t;n++)r=r.concat(i);return r},Object.defineProperty(e.prototype,"showToolbar",{get:function(){return this._showToolbar},set:function(e){e!=this._showToolbar&&(this._showToolbar=e,this.toolbarContainer&&(this.destroyToolbar(this.toolbarContainer),this.renderToolbar(this.toolbarContainer)))},enumerable:!1,configurable:!0}),e.prototype.getData=function(){return this.getCalculatedValuesCore()},e.prototype.getCalculatedValuesCore=function(){return this._getDataCore?this._getDataCore(this):(0,h.X3)(this.surveyData,this)},e.prototype.renderLoadingIndicator=function(e){e.appendChild((0,l.QV)())},e.prototype.convertFromExternalData=function(e){return e},e.prototype.getCalculatedValues=function(){var e=this;return new Promise((function(t,i){if(void 0!==e._calculationsCache&&t(e._calculationsCache),e.dataProvider.dataFn){e.loadingData=!0;var r=e.dataProvider.dataFn({visualizer:e,filter:e.dataProvider.getFilters(),callback:function(r){e.loadingData=!1,!r.error&&Array.isArray(r.data)?(e._calculationsCache=e.convertFromExternalData(r.data),t(e._calculationsCache)):i()}});r&&r.then((function(i){e.loadingData=!1,e._calculationsCache=e.convertFromExternalData(i),t(e._calculationsCache)})).catch((function(){e.loadingData=!1,i()}))}else e._calculationsCache=e.getCalculatedValuesCore(),t(e._calculationsCache)}))},e.prototype.getState=function(){return{}},e.prototype.setState=function(e){},Object.defineProperty(e.prototype,"locale",{get:function(){var e=this.options.survey;return e?e.locale:u.q.currentLocale},set:function(e){this.setLocale(e),this.onLocaleChanged.fire(this,{locale:e}),this.refresh()},enumerable:!1,configurable:!0}),e.prototype.setLocale=function(e){u.q.currentLocale=e;var t=this.options.survey;t&&t.locale!==e&&(t.locale=e)},e.suppressVisualizerStubRendering=!1,e.chartAdapterType=void 0,e.otherCommentCollapsed=!0,e.customColors=[],e.colors=["#86e1fb","#3999fb","#ff6771","#1eb496","#ffc152","#aba1ff","#7d8da5","#4ec46c","#cf37a6","#4e6198"],e}();a.g.defaultVisualizer=d},288:(e,t,i)=>{var r={"./detail.svg":782,"./drag.svg":307,"./hide.svg":41,"./makeprivate.svg":24,"./makepublic.svg":452,"./moveToDetails.svg":637,"./nonCommercial.svg":388,"./sorting.svg":999};function n(e){var t=s(e);return i(t)}function s(e){if(!i.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}n.keys=function(){return Object.keys(r)},n.resolve=s,e.exports=n,n.id=288},307:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><polygon points="13,5 12,6 13,7 9,7 9,3 10,4 11,3 8,0 5,3 6,4 7,3 7,7 3,7 4,6 3,5 0,8 3,11 4,10 3,9 7,9 7,13 6,12 5,13 8,16 11,13 10,12 9,13 9,9 13,9 12,10 13,11 16,8 "></polygon></g></svg>'},358:(e,t,i)=>{"use strict";i.d(t,{AlternativeVisualizersWrapper:()=>m,BooleanModel:()=>l.o,DataProvider:()=>n.M,DocumentHelper:()=>f.gf,HistogramModel:()=>u.Y,Matrix:()=>a.u,NpsAdapter:()=>H,NpsVisualizer:()=>F,NpsVisualizerWidget:()=>j,NumberModel:()=>h.R,PivotModel:()=>Y.y,PostponeHelper:()=>c.b,RankingModel:()=>G.O,SelectBase:()=>o.o,StatisticsTable:()=>I,StatisticsTableAdapter:()=>R,Text:()=>q,TextTableAdapter:()=>N,VisualizationManager:()=>d.g,VisualizationMatrixDropdown:()=>E,VisualizationMatrixDynamic:()=>D,VisualizationPanel:()=>k,VisualizationPanelDynamic:()=>A,VisualizerBase:()=>c.w,VisualizerFactory:()=>s.D,WordCloud:()=>B,WordCloudAdapter:()=>O,hideEmptyAnswersInData:()=>o.M,localization:()=>r.q,surveyStrings:()=>r.D,textHelper:()=>z});var r=i(240);r.q.locales.fa={groupButton:"گروه بندی با",ungroupButton:"حذف گروه",selectButton:"انتخاب",hideColumn:"مخفی کردن ستون",showColumn:"نمایش ستون",makePrivateColumn:"خصوصی کردن ستون",makePublicColumn:"عمومی کردن ستون",moveToDetail:"انتقال به جزئیات",showAsColumn:"نمایش به عنوان ستون",filterPlaceholder:"جستجو...",removeRows:"حذف سطرها",showLabel:"نمایش",entriesLabel:"ورودی",visualizer_text:"متون در جدول",visualizer_wordcloud:"ابر کلمات",visualizer_histogram:"هیستوگرام",visualizer_number:"متوسط",visualizer_choices:"جدول",visualizer_selectBase:"نمودار",chartType_bar:"میله ای",chartType_vbar:"نوار عمودی",chartType_stackedbar:"نوار پشته",chartType_doughnut:"دونات",chartType_pie:"دابره ای(pie)",chartType_scatter:"پراکندگی(Scatter)",chartType_gauge:"عقربه ای",chartType_bullet:"Bullet",hideButton:"مخفی",makePrivateButton:"خصوصی کردن",makePublicButton:"عمومی کردن",showButton:"نمایش",filter:"فیلتر",resetFilter:"بازنشانی فیلترها",changeLocale:"تغییر محلی",clearButton:"پاک کردن",addElement:"انتخاب سوال برای نمایش...",defaultOrder:"ترتیب پیشفرض",ascOrder:"صعودی",descOrder:"نزولی",showMinorColumns:"نمایش ستونهای فرعی",otherCommentTitle:"سایر موارد و نظرات",showPercentages:"نمایش درصد",hidePercentages:"درصدهای مخفی",pdfDownloadCaption:"پی دی اف",xlsxDownloadCaption:"اکسل",csvDownloadCaption:"Csv",saveDiagramAsPNG:"دانلود طرح به عنوان یک فایل PNG",hideEmptyAnswers:"مخفی کردن پاسخهای خالی",showEmptyAnswers:"نمایش پاسخهای خالی","topNValueText-1":"همه پاسخ ها",topNValueText5:"5 پاسخ برتر",topNValueText10:"10 پاسخ برتر",topNValueText20:"20 پاسخ برتر",hideMissingAnswers:"مخفی کردن پاسخهای گمشده",showMissingAnswers:"نمایش پاسخهای گمشده",missingAnswersLabel:"پاسخ های گمشده",noVisualizerForQuestion:"این نوع سوال هنوز تجسم نشده است",noResults:"هنوز نتیجه ای حاصل نشده است",showPerValues:"به ازای هر ارزش",showPerColumns:"در هر ستون",answer:"پاسخ",correctAnswer:"پاسخ صحیح: ",percent:"درصد",responses:"پاسخ"},r.q.localeNames.fa="فارسی",r.q.locales.fr={groupButton:"Grouper",ungroupButton:"Dissocier",selectButton:"Sélectionner",hideColumn:"Masquer colonne",showColumn:"Afficher colonne",makePrivateColumn:"Rendre la colonne privé",makePublicColumn:"Rendre la colonne public",moveToDetail:"Déplacer vers détails",showAsColumn:"Afficher en colonne",filterPlaceholder:"Rechercher...",removeRows:"Supprimer colonne",showLabel:"Afficher",entriesLabel:"entrées",visualizer_text:"Textes en table",visualizer_wordcloud:"Nuages de mots",visualizer_histogram:"Histogramme",visualizer_number:"Moyenne",visualizer_choices:"Table",visualizer_selectBase:"Graphique",chartType_bar:"Barres",chartType_vbar:"Barre verticale",chartType_stackedbar:"Barres empilées",chartType_doughnut:"Anneau",chartType_pie:"Secteurs",chartType_scatter:"Nuages de points",chartType_gauge:"Gauge",chartType_bullet:"Bulles",hideButton:"Masquer",makePrivateButton:"Rendre privé",makePublicButton:"Rendre publique",showButton:"Afficher",filter:"Filtre",resetFilter:"Rafraichir Filtres",changeLocale:"Changer les paramètres régionaux",clearButton:"Rafraichir",addElement:"Choisir la question à afficher...",defaultOrder:"Defaut",ascOrder:"Ascendant",descOrder:"Descendant",showMinorColumns:"Afficher les colonnes mineures",otherCommentTitle:"Autre élément et commentaires",showPercentages:"Afficher les pourcentages",hidePercentages:"Masquer les pourcentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Exceller",csvDownloadCaption:"Fichier CSV",saveDiagramAsPNG:"Sauver en png",hideEmptyAnswers:"Masquer les réponses vides",showEmptyAnswers:"Afficher les réponses vides","topNValueText-1":"Toutes les réponses",topNValueText5:"Top 5 des réponses",topNValueText10:"Top 10 des réponses",topNValueText20:"Top 20 des réponses",hideMissingAnswers:"Masquer les réponses manquantes",showMissingAnswers:"Afficher les réponses manquantes",missingAnswersLabel:"Réponses manquantes",noVisualizerForQuestion:"Ce type de question n'est pas encore visualisé",noResults:"Il n'y a pas encore de résultats",showPerValues:"Par valeur",showPerColumns:"Par colonne",answer:"Réponse",correctAnswer:"Réponse correcte: ",percent:"Pourcentage",responses:"Réponses"},r.q.localeNames.fr="Français",r.q.locales.de={groupButton:"Gruppieren",ungroupButton:"Gruppierung aufheben",selectButton:"Mich auswählen",hideColumn:"Spalte ausblenden",showColumn:"Spalte einblenden",makePrivateColumn:"Spalte privat machen",makePublicColumn:"Spalte veröffentlichen",moveToDetail:"in Details verschieben",showAsColumn:"Als Spalte anzeigen",filterPlaceholder:"Suche...",removeRows:"Zeilen entfernen",showLabel:"anzeigen",entriesLabel:"Einträge",visualizer_text:"Texte in Tabellenform",visualizer_wordcloud:"Wordcloud",visualizer_histogram:"Histogramm",visualizer_number:"Durchschnitt",visualizer_choices:"Liste",visualizer_selectBase:"Diagrammtyp",chartType_bar:"Balkendiagramm",chartType_vbar:"Balkendiagramm vertikal",chartType_stackedbar:"Gestapeltes Balkendiagramm",chartType_doughnut:"Donut-Diagramm",chartType_pie:"Kreisdiagramm",chartType_scatter:"Punktediagramm",chartType_gauge:"Pegeldiagramm",chartType_bullet:"Aufzählungsdiagramm",hideButton:"Ausblenden",makePrivateButton:"Privat machen",makePublicButton:"Öffentlich machen",showButton:"Anzeigen",filter:"Filter",resetFilter:"Filter zurücksetzen",changeLocale:"Lokalisierung ändern",clearButton:"Einstellungen löschen",addElement:"Wählen Sie eine Frage, um zu zeigen...",defaultOrder:"Standardreihenfolge",ascOrder:"Aufsteigend",descOrder:"Absteigend",showMinorColumns:"Kleinere Spalten anzeigen",otherCommentTitle:"Andere Punkte und Kommentare",showPercentages:"Prozentsätze anzeigen",hidePercentages:"Prozentsätze ausblenden",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Diagramm als png herunterladen",hideEmptyAnswers:"Leere Antworten ausblenden",showEmptyAnswers:"Leere Antworten anzeigen","topNValueText-1":"Alle Antworten",topNValueText5:"Top 5 Antworten",topNValueText10:"Top 10 Antworten",topNValueText20:"Top 20 Antworten",hideMissingAnswers:"Fehlende Antworten ausblenden",showMissingAnswers:"Fehlende Antworten anzeigen",missingAnswersLabel:"Fehlede Antworten",noVisualizerForQuestion:"Für diesen Fragetyp gibt es noch keine Visualisierung.",noResults:"Es liegen noch keine Ergebnisse vor",showPerValues:"Pro Wert",showPerColumns:"Pro Spalte",answer:"Antwort",correctAnswer:"Korrekte Antwort: ",percent:"Prozent",responses:"Antworten"},r.q.localeNames.de="Deutsch",r.q.locales.no={groupButton:"Grupper",ungroupButton:"Opphev gruppering",selectButton:"Velg",hideColumn:"Skjul kolonne",showColumn:"Vis kolonne",makePrivateColumn:"Gjør kolonne privat",makePublicColumn:"Gjør kolonne offentlig",moveToDetail:"Flytt til detaljert visning",showAsColumn:"Vis som kolonne",filterPlaceholder:"Søk...",removeRows:"Fjern rader",showLabel:"Vis",entriesLabel:"oppføringer",visualizer_text:"Tabellvisning",visualizer_wordcloud:"Ordsky",visualizer_histogram:"Histogram",visualizer_number:"Gjennomsnitt",visualizer_choices:"Bord",visualizer_selectBase:"Sjøkart",chartType_bar:"Stolpediagram",chartType_vbar:"Vertikal stolpe",chartType_stackedbar:"Stablet stolpediagram",chartType_doughnut:"Hjuldiagram",chartType_pie:"Sektordiagram",chartType_scatter:"Punktdiagram",chartType_gauge:"Målediagram",chartType_bullet:"Kulediagram",hideButton:"Skjul",makePrivateButton:"Gjør privat",makePublicButton:"Gjør offentlig",showButton:"Vis",filter:"Filter",resetFilter:"Nullstill filter",changeLocale:"Bytt språk",clearButton:"Tøm",addElement:"Velg spørsmål...",defaultOrder:"Standard",ascOrder:"Stigende",descOrder:"Synkende",showMinorColumns:"Vis mindre kolonner",otherCommentTitle:"Annet og kommentarer",showPercentages:"Vis prosenter",hidePercentages:"Skjul prosenter",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Overgå",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Last ned plott som en PNG-fil",hideEmptyAnswers:"Skjul tomme svar",showEmptyAnswers:"Vis tomme svar","topNValueText-1":"Alle svar",topNValueText5:"Topp 5 svar",topNValueText10:"Topp 10 svar",topNValueText20:"Topp 20 svar",hideMissingAnswers:"Skjul manglende svar",showMissingAnswers:"Vis manglende svar",missingAnswersLabel:"Mangler svar",noVisualizerForQuestion:"Denne spørsmålstypen er ikke visualisert ennå",noResults:"Det er ingen resultater ennå",showPerValues:"Per verdier",showPerColumns:"Per kolonner",answer:"Svare",correctAnswer:"Riktig svar: ",percent:"Prosent",responses:"Svar"},r.q.localeNames.no="Norsk",r.q.locales.pt={groupButton:"Agrupar Por Mim",ungroupButton:"Desagrupar Por Mim",selectButton:"Selecionar",hideColumn:"Esconder coluna",showColumn:"Mostrar coluna",makePrivateColumn:"Tornar coluna privada",makePublicColumn:"Tornar coluna pública",moveToDetail:"Mover para Detalhes",showAsColumn:"Mostrar como Coluna",filterPlaceholder:"Pesquisar...",removeRows:"Remover linhas",showLabel:"Mostrar",entriesLabel:"entradas",visualizer_text:"Textos em tabela",visualizer_wordcloud:"Nuvem de palavras",visualizer_histogram:"Histograma",visualizer_number:"Média",visualizer_choices:"Tabela",visualizer_selectBase:"Gráfico",chartType_bar:"Barra",chartType_vbar:"Barra vertical",chartType_stackedbar:"Barra Empilhada",chartType_doughnut:"Rosca",chartType_pie:"Tarte",chartType_scatter:"Lastro",chartType_gauge:"Escala",chartType_bullet:"Bala",hideButton:"Esconder",makePrivateButton:"Tornar privado",makePublicButton:"Tornar público",showButton:"Mostrar",filter:"Filtrar",resetFilter:"Restaurar Filtro",changeLocale:"Mudar Localização",clearButton:"Limpar",addElement:"Escolher questão para mostrar...",defaultOrder:"Ordenação Padrão",ascOrder:"Ascendente",descOrder:"Descendente",showMinorColumns:"Mostrar colunas menores",otherCommentTitle:"Outros itens e comentários",showPercentages:"Mostrar percentuais",hidePercentages:"Esconder percentuais",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Baixar diagrama como PNG",hideEmptyAnswers:"Esconder perguntas vazias",showEmptyAnswers:"Mostrar perguntas vazias","topNValueText-1":"Todas as respostas",topNValueText5:"Primeiras 5 respostas",topNValueText10:"Primeiras 10 respostas",topNValueText20:"Primeiras 20 respostas",hideMissingAnswers:"Ocultar perguntas não respondidas",showMissingAnswers:"Mostrar perguntas não respondidas",missingAnswersLabel:"Perguntas não respondidas",noVisualizerForQuestion:"Este tipo de pergunta ainda não foi visualizada",noResults:"Ainda não possui resultados",showPerValues:"Por valores",showPerColumns:"Por colunas",answer:"Resposta",correctAnswer:"Resposta correta: ",percent:"Percentagem",responses:"Respostas"},r.q.localeNames.pt="Português",r.q.locales.ru={groupButton:"Сгруппировать",ungroupButton:"Разгруппировать",selectButton:"Выбрать",hideColumn:"Скрыть столбец",showColumn:"Показать столбец",makePrivateColumn:"Сделать столбец приватным",makePublicColumn:"Сделать столбец публичным",moveToDetail:"Спрятать в раскрывающуюся секцию",showAsColumn:"Показать как столбец",filterPlaceholder:"Поиск...",removeRows:"Удалить строки",showLabel:"Показать",entriesLabel:"записей",visualizer_text:"Таблица",visualizer_wordcloud:"Облако тэгов",visualizer_histogram:"Гистограмма",visualizer_number:"Среднее значение",visualizer_choices:"Таблица",visualizer_selectBase:"Диаграмма",visualizer_matrix:"Диаграмма",chartType_bar:"Столбчатая диаграмма",chartType_vbar:"Вертикальная столбчатая диаграмма",chartType_stackedbar:"Столбчатая диаграмма с накоплением",chartType_doughnut:"Кольцевая диаграмма",chartType_pie:"Круговая диаграмма",chartType_scatter:"Точечная диаграмма",chartType_gauge:"Измерительная диаграмма",chartType_bullet:"Маркированная диаграмма",hideButton:"Скрыть",makePrivateButton:"Сделать приватным",makePublicButton:"Сделать публичным",showButton:"Показать",filter:"Фильтр",resetFilter:"Очистить фильтр",changeLocale:"Сменить язык",clearButton:"Очистить",addElement:"Выберите вопрос...",defaultOrder:"Порядок по умолчанию",ascOrder:"Сортировать по возрастанию",descOrder:"Сортировать по убыванию",showMinorColumns:"Показать второстепенные столбцы",otherCommentTitle:"Другое и комментарии",showPercentages:"Показать проценты",hidePercentages:"Скрыть проценты",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Скачать диаграмму в формате PNG",hideEmptyAnswers:"Скрыть пустые ответы",showEmptyAnswers:"Показать пустые ответы","topNValueText-1":"Все ответы",topNValueText5:"Первые 5 ответов",topNValueText10:"Первые 10 ответов",topNValueText20:"Первые 20 ответов",hideMissingAnswers:"Скрыть отсутствующие ответы",showMissingAnswers:"Показать отсутствующие ответы",missingAnswersLabel:"Отсутствующие ответы",noVisualizerForQuestion:"Этот тип вопроса не поддерживается",noResults:"Результаты отсутствуют",showPerValues:"По значениям",showPerColumns:"По столбцам",answer:"Ответ",correctAnswer:"Правильный ответ: ",percent:"процентов",responses:"ответов"},r.q.localeNames.ru="Русский",r.q.locales.nl={groupButton:"Groeperen op",ungroupButton:"Groepering verwijderen",selectButton:"Selecteer mij",hideColumn:"Kolom verbergen",showColumn:"Toon kolom",makePrivateColumn:"Kolom privé maken",makePublicColumn:"Maak kolom openbaar",moveToDetail:"Ga naar detail",showAsColumn:"Weergeven als kolom",filterPlaceholder:"Zoeken...",removeRows:"Verwijder rijen",showLabel:"Tonen",entriesLabel:"inzendingen",visualizer_text:"Teksten in tabel",visualizer_wordcloud:"Wordcloud",visualizer_histogram:"Histogram",visualizer_number:"Gemiddeld",visualizer_choices:"Tabel",visualizer_selectBase:"Grafiek",chartType_bar:"Staafdiagram (liggend)",chartType_vbar:"Staafdiagram",chartType_stackedbar:"Staafdiagram (gestapeld)",chartType_doughnut:"Donut",chartType_pie:"Cirkeldiagram",chartType_scatter:"Spreidingsdiagram",chartType_gauge:"Meterdiagram",chartType_bullet:"Kogelgrafiek",hideButton:"Verbergen",makePrivateButton:"Maak prive",makePublicButton:"Openbaar maken",showButton:"Tonen",filter:"Filter",resetFilter:"Filter resetten",changeLocale:"Wijzig de landinstelling",clearButton:"Wissen",addElement:"Kies een vraag om weer te geven ...",defaultOrder:"Standaardvolgorde",ascOrder:"Oplopend",descOrder:"Aflopend",showMinorColumns:"Toon kleine kolommen",otherCommentTitle:"Andere items en opmerkingen",showPercentages:"Percentages weergeven",hidePercentages:"Verberg percentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Download plot als PNG",hideEmptyAnswers:"Verberg lege antwoorden",showEmptyAnswers:"Toon lege antwoorden","topNValueText-1":"Alle antwoorden",topNValueText5:"Top 5 antwoorden",topNValueText10:"Top 10 antwoorden",topNValueText20:"Top 20 antwoorden",hideMissingAnswers:"Ontbrekende antwoorden verbergen",showMissingAnswers:"Ontbrekende antwoorden weergeven",missingAnswersLabel:"Ontbrekende antwoorden",noVisualizerForQuestion:"Dit vraagtype is nog niet gevisualiseerd",noResults:"Er zijn nog geen resultaten",showPerValues:"Per waarden",showPerColumns:"Per Kolommen",answer:"Antwoorden",correctAnswer:"Goed antwoord: ",percent:"Procent",responses:"Reacties"},r.q.localeNames.nl="Nederlands",r.q.locales.es={groupButton:"Grupo Por Mí",ungroupButton:"Desagrupar por mí",selectButton:"Seleccionarme",hideColumn:"Ocultar columna",showColumn:"Mostrar columna",makePrivateColumn:"Hacer que la columna sea privada",makePublicColumn:"Hacer pública la columna",moveToDetail:"Mover al detalle",showAsColumn:"Mostrar como columna",filterPlaceholder:"Buscar ...",removeRows:"Eliminar filas",showLabel:"Mostrar",entriesLabel:"Entradas",visualizer_text:"Textos en tabla",visualizer_wordcloud:"Wordcloud",visualizer_histogram:"Histograma",visualizer_number:"Promedio",visualizer_choices:"Mesa",visualizer_selectBase:"Gráfico",chartType_bar:"Bar",chartType_vbar:"Barra vertical",chartType_stackedbar:"Barra apilada",chartType_doughnut:"Donut",chartType_pie:"Pie",chartType_scatter:"Dispersión",chartType_gauge:"Gauge",chartType_bullet:"Bullet",hideButton:"Ocultar",makePrivateButton:"Hacer privado",makePublicButton:"Hacer público",showButton:"Mostrar",filter:"Filtro",resetFilter:"Restablecer filtro",changeLocale:"Cambiar configuración regional",clearButton:"Borrar",addElement:"Elija la pregunta para mostrar ...",defaultOrder:"Orden predeterminado",ascOrder:"Ascendente",descOrder:"Descendente",showMinorColumns:"Mostrar columnas secundarias",otherCommentTitle:"Otros elementos y comentarios",showPercentages:"Mostrar porcentajes",hidePercentages:"Ocultar porcentajes",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Descargar el gráfico como png",hideEmptyAnswers:"Ocultar respuestas vacías",showEmptyAnswers:"Mostrar respuestas vacías","topNValueText-1":"Todas las respuestas",topNValueText5:"Las 5 respuestas principales",topNValueText10:"Las 10 respuestas principales",topNValueText20:"20 respuestas principales",hideMissingAnswers:"Ocultar las respuestas que faltan",showMissingAnswers:"Mostrar las respuestas que faltan",missingAnswersLabel:"Respuestas faltantes",noVisualizerForQuestion:"Este tipo de pregunta aún no se visualiza",noResults:"Aún no hay resultados",showPerValues:"Por valores",showPerColumns:"Por columnas",answer:"Respuesta",correctAnswer:"Respuesta correcta: ",percent:"Por ciento",responses:"Respuestas"},r.q.localeNames.es="Español",r.q.locales.it={groupButton:"Raggruppa",ungroupButton:"Dividi",selectButton:"Selezionami",hideColumn:"Nascondi colonna",showColumn:"Mostra colonna",makePrivateColumn:"Rendi la colonna privata",makePublicColumn:"Rendi la colonna pubblica",moveToDetail:"Sposta in Dettaglio",showAsColumn:"Mostra come Colonna",filterPlaceholder:"Cerca...",removeRows:"Rimuovi righe",showLabel:"Mostra",entriesLabel:"voci",visualizer_text:"Parole in tabella",visualizer_wordcloud:"Nuvola di parole",visualizer_histogram:"Istogramma",visualizer_number:"Media",visualizer_choices:"Tabella",visualizer_selectBase:"Grafico",chartType_bar:"Grafico a barre",chartType_vbar:"Grafico a barre verticali",chartType_stackedbar:"Grafico a barre sovrapposte",chartType_doughnut:"Grafico a ciambella",chartType_pie:"Grafico a torta",chartType_scatter:"Grafico a dispersione",chartType_gauge:"Grafico Gauge",chartType_bullet:"Punto",hideButton:"Nascondi",makePrivateButton:"Rendi privato",makePublicButton:"Rendi pubblico",showButton:"Mostra",filter:"Filtro",resetFilter:"Cancella filtro",changeLocale:"Cambia lingua",clearButton:"Cancella",addElement:"Scegli la domanda da mostrare...",defaultOrder:"Ordine di Default",ascOrder:"Ascendente",descOrder:"Discendente",showMinorColumns:"Mostra colonne secondarie",otherCommentTitle:"Altri punti e commenti",showPercentages:"Mostra percentuali",hidePercentages:"Nascondi percentuali",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Scarica il grafico in formato png",hideEmptyAnswers:"Nascondi risposte vuote",showEmptyAnswers:"Mostra risposte vuote","topNValueText-1":"Tutte le risposte",topNValueText5:"Top 5 risposte",topNValueText10:"Top 10 risposte",topNValueText20:"Top 20 risposte",hideMissingAnswers:"Nascondi le risposte mancanti",showMissingAnswers:"Mostra le risposte mancanti",missingAnswersLabel:"Risposte mancanti",noVisualizerForQuestion:"Questo tipo di domanda non è ancora stato visualizzato",noResults:"Non ci sono ancora risultati",showPerValues:"Per Valori",showPerColumns:"Per Colonne",answer:"Risposta",correctAnswer:"Risposta esatta: ",percent:"Percentuale",responses:"Risposte"},r.q.localeNames.it="Italiano",r.q.locales.ar={groupButton:"زرار المجموعة",ungroupButton:"تم التحديث من خلالى",selectButton:"اختر",hideColumn:"اخفاء العمود",showColumn:"اظهار",makePrivateColumn:"أجعل العمود خاص",makePublicColumn:"أجعل العمود عام",moveToDetail:"انتقل إلى التفاصيل",showAsColumn:"إظهار كعمود",filterPlaceholder:"بحث...",removeRows:"حذف",showLabel:"اظهار",entriesLabel:"مدخلات",visualizer_text:"جداول",visualizer_wordcloud:"كلمات",visualizer_histogram:"الرسم البياني",visualizer_number:"متوسط",visualizer_choices:"جدول",visualizer_selectBase:"رسم بياني",chartType_bar:"شريط",chartType_vbar:"شريط عمودي",chartType_stackedbar:"شريط مكدس",chartType_doughnut:"مخطط حلقي",chartType_pie:"مخطط دائري",chartType_scatter:"مخطط التشتت",chartType_gauge:"مخطط القياس",chartType_bullet:"مخطط نقطي",hideButton:"اخفاء",makePrivateButton:"أجعل خاص",makePublicButton:"أجعل عام",showButton:"اظهار",filter:"ترشح",resetFilter:"إعادة تعيين",changeLocale:"تغيير اللغة",clearButton:"مسح",addElement:"اختر سؤالاً للعرض ...",defaultOrder:"الترتيب الافتراضي",ascOrder:"تصاعدى",descOrder:"تنازلى",showMinorColumns:"إظهار الأعمدة الثانوية",otherCommentTitle:"بنود وتعليقات أخرى",showPercentages:"عرض النسب المئوية",hidePercentages:"إخفاء النسب",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"تنزيل بصيغة png",hideEmptyAnswers:"إخفاء الإجابات الفارغة",showEmptyAnswers:"إظهار الإجابات الفارغة","topNValueText-1":"جميع الإجابات",topNValueText5:"أهم 5 إجابات",topNValueText10:"أفضل 10 إجابات",topNValueText20:"أفضل 20 إجابة",hideMissingAnswers:"إخفاء الإجابات المفقودة",showMissingAnswers:"عرض الإجابات المفقودة",missingAnswersLabel:"أجوبة مفقودة",noVisualizerForQuestion:"لم يتم العرض بعد",noResults:"لا يوجد نتائج للعرض",showPerValues:"لكل القيم",showPerColumns:"لكل الأعمدة",answer:"إجب",correctAnswer:"الاجابة الصحيحة: ",percent:"النسبه المئويه",responses:"الاستجابات"},r.q.localeNames.ar="العربية",r.q.locales.ja={groupButton:"グループ化",ungroupButton:"グループ解除",selectButton:"選択",hideColumn:"列を非表示",showColumn:"列を表示",makePrivateColumn:"列を非公開にする",makePublicColumn:"列を公開する",moveToDetail:"詳細に移動",showAsColumn:"列として表示",filterPlaceholder:"検索...",removeRows:"行を削除",showLabel:"表示",entriesLabel:"件",visualizer_text:"テキスト",visualizer_wordcloud:"ワードクラウド",visualizer_histogram:"ヒストグラム",visualizer_number:"平均",visualizer_choices:"テーブル",visualizer_selectBase:"チャート",chartType_bar:"棒グラフ",chartType_vbar:"縦棒グラフ",chartType_stackedbar:"積み上げ棒グラフ",chartType_doughnut:"ドーナツチャート",chartType_pie:"円グラフ",chartType_scatter:"散布図",chartType_gauge:"ゲージ",chartType_bullet:"バレット",hideButton:"非表示",makePrivateButton:"非公開にする",makePublicButton:"公開する",showButton:"表示",filter:"フィルター",resetFilter:"フィルターをリセット",changeLocale:"言語を変更",clearButton:"クリア",addElement:"表示する質問を選択...",defaultOrder:"デフォルト順",ascOrder:"昇順",descOrder:"降順",showMinorColumns:"マイナー列を表示",otherCommentTitle:"その他のアイテムとコメント",showPercentages:"パーセンテージを表示",hidePercentages:"パーセンテージを非表示",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"プロットをPNGファイルとして保存",hideEmptyAnswers:"空の回答を非表示",showEmptyAnswers:"空の回答を表示","topNValueText-1":"すべての回答",topNValueText5:"上位5つの回答",topNValueText10:"上位10の回答",topNValueText20:"上位20の回答",hideMissingAnswers:"欠損値を非表示",showMissingAnswers:"欠損値を表示",missingAnswersLabel:"欠損値",noVisualizerForQuestion:"この質問タイプはまだ視覚化されていません",noResults:"まだ結果がありません",showPerValues:"値ごとに表示",showPerColumns:"列ごとに表示",answer:"回答",correctAnswer:"正解: ",percent:"パーセント",responses:"回答数"},r.q.localeNames.ja="Japanese",r.q.locales.pl={groupButton:"Grupuj według mnie",ungroupButton:"Rozgrupuj według mnie",selectButton:"Wybierz",hideColumn:"Ukryj kolumnę",showColumn:"Pokaż kolumnę",makePrivateColumn:"Uczyń kolumnę prywatną",makePublicColumn:"Uczyń kolumnę publiczną",moveToDetail:"Przenieś do szczegółów",showAsColumn:"Pokaż jako kolumnę",filterPlaceholder:"Szukaj...",removeRows:"Usuń wiersze",showLabel:"Pokaż",entriesLabel:"wejścia",visualizer_text:"Teksty w tabeli",visualizer_wordcloud:"Chmura słów",visualizer_histogram:"Histogram",visualizer_number:"Średnia",visualizer_choices:"Tabela",visualizer_selectBase:"Wykres",visualizer_matrix:"Wykres",chartType_bar:"Słupkowy",chartType_vbar:"Słupkowy pionowy",chartType_stackedbar:"Słupkowy skumulowany",chartType_doughnut:"Oponka",chartType_pie:"Tarta",chartType_scatter:"Rozrzut",chartType_gauge:"Skala",chartType_bullet:"Pocisk",hideButton:"Ukryj",makePrivateButton:"Uczyń prywatnym",makePublicButton:"Uczyń publicznym",showButton:"Pokaż",filter:"Filtruj",resetFilter:"Resetuj filtr",changeLocale:"Zmień lokalizację",clearButton:"Wyczyść",addElement:"Wybierz pytanie do pokazania...",defaultOrder:"Domyślne sortowanie",ascOrder:"Rosnąco",descOrder:"Malejąco",showMinorColumns:"Pokaż mniejsze kolumny",otherCommentTitle:"Inne elementy i komentarze",showPercentages:"Pokaż procenty",hidePercentages:"Ukryj procenty",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Pobierz diagram jako PNG",hideEmptyAnswers:"Ukryj puste odpowiedzi",showEmptyAnswers:"Pokaż puste odpowiedzi","topNValueText-1":"Wszystkie odpowiedzi",topNValueText5:"Pierwsze 5 odpowiedzi",topNValueText10:"Pierwsze 10 odpowiedzi",topNValueText20:"Pierwsze 20 odpowiedzi",hideMissingAnswers:"Ukryj nieodpowiedziane pytania",showMissingAnswers:"Pokaż nieodpowiedziane pytania",missingAnswersLabel:"Nieodpowiedziane pytania",noVisualizerForQuestion:"Ten typ pytania nie został jeszcze zwizualizowany",noResults:"Nie ma jeszcze wyników",showPerValues:"Według wartości",showPerColumns:"Według kolumn",answer:"Odpowiedź",correctAnswer:"Odpowiedź poprawna: ",percent:"Procent",responses:"Odpowiedzi"},r.q.localeNames.pl="Polish",r.q.locales.fi={groupButton:"Erottele minulla",ungroupButton:"Poista erottele minulla",selectButton:"Valitse minut",hideColumn:"Piilota sarake",showColumn:"Näytä sarake",makePrivateColumn:"Merkitse sarake yksityiseksi",makePublicColumn:"Merkitse sarake julkiseksi",moveToDetail:"Siirrä yksityiskohtiin",showAsColumn:"Näytä sarakkeena",filterPlaceholder:"Etsi...",removeRows:"Poista rivejä",showLabel:"Näytä",entriesLabel:"vastauksia",visualizer_text:"Tekstitaulukko",visualizer_wordcloud:"Sanapilvi",visualizer_histogram:"Histogrammi",visualizer_number:"Keskiarvo",visualizer_choices:"Taulukko",visualizer_selectBase:"Kuvaaja",visualizer_matrix:"Kuvaaja",chartType_bar:"Pylväs",chartType_vbar:"Vaakapyöväs",chartType_stackedbar:"Pinottu pylväs",chartType_doughnut:"Donitsi",chartType_pie:"Piirakka",chartType_scatter:"Hajonta",chartType_gauge:"Mittari",chartType_bullet:"Luoti",chartType_line:"Viiva",hideButton:"Piilota",makePrivateButton:"Merkise yksityiseksi",makePublicButton:"Merkitse julkiseksi",showButton:"Näytä",filter:"Rajaa",resetFilter:"Nollaa Rajaus",changeLocale:"Vaihda kieli",clearButton:"Nollaa",addElement:"Valitse näytettävä kysymys...",defaultOrder:"Oletusjärjestys",ascOrder:"Nouseva",descOrder:"Laskeva",showMinorColumns:"Näytä alasarakkeet",otherCommentTitle:"Muut asiat ja kommentit",showPercentages:"Näytä prosentit",hidePercentages:"Piilota prosentit",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Lataa kuvaaja PNG kuvana",hideEmptyAnswers:"Piilota tyhjät vastaukset",showEmptyAnswers:"Näytä tyhjät vastaukset","topNValueText-1":"Kaikki vastaukset",topNValueText5:"Top 5 vastaukset",topNValueText10:"Top 10 vastaukset",topNValueText20:"Top 20 vastaukset",hideMissingAnswers:"Piilota puuttuvat vastaukset",showMissingAnswers:"Näytä puuttuvat vastaukset",missingAnswersLabel:"Puuttuvat vastaukset",noVisualizerForQuestion:"Tätä kysymystyyppiä ei voida visualisoida.",noResults:"Ei vielä tuloksia",showPerValues:"Näytä arvottain",showPerColumns:"Näytä sarakkeittain",answer:"Vastaus",correctAnswer:"Oikea vastaus: ",percent:"Prosentti",percentage:"Prosenttiyksikkö",statistics_chart:"Kuvaaja",responses:"Vastaukset",visualizer_nps:"NPS",npsScore:"NPS",npsPromoters:"Suosittelija",npsPassives:"Passiivinen",npsDetractors:"Arvostelija"},r.q.localeNames.fi="Suomi",r.q.locales.sv={groupButton:"Gruppera av mig",ungroupButton:"Avgruppera av mig",selectButton:"Välj mig",hideColumn:"Göm kolumn",showColumn:"Visa kolumn",makePrivateColumn:"Gör kolumn privat",makePublicColumn:"Gör kolumn offentlig",moveToDetail:"Flytta till detalj",showAsColumn:"Visa som kolumn",filterPlaceholder:"Sök...",removeRows:"Ta bort rader",showLabel:"Visa",entriesLabel:"poster",visualizer_text:"Texter i tabell",visualizer_wordcloud:"Ordmoln",visualizer_histogram:"Histogram",visualizer_number:"Genomsnitt",visualizer_choices:"Tabell",visualizer_selectBase:"Diagram",visualizer_matrix:"Diagram",chartType_bar:"Stapel",chartType_vbar:"Vertikal stapel",chartType_stackedbar:"Staplad stapel",chartType_doughnut:"Ring",chartType_pie:"Cirkel",chartType_scatter:"Punkt",chartType_gauge:"Mätare",chartType_bullet:"Bullet",chartType_line:"Linje",chartType_radar:"Radar",hideButton:"Göm",makePrivateButton:"Gör privat",makePublicButton:"Gör offentlig",showButton:"Visa",filter:"Filter",resetFilter:"Återställ filter",changeLocale:"Ändra språk",clearButton:"Rensa",addElement:"Välj fråga att visa...",defaultOrder:"Standard ordning",ascOrder:"Stigande",descOrder:"Fallande",showMinorColumns:"Visa mindre kolumner",actionsColumn:"Åtgärder",otherCommentTitle:"Övriga objekt och kommentarer",showPercentages:"Visa procent",hidePercentages:"Göm procent",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Ladda ner diagram som PNG-fil",hideEmptyAnswers:"Göm tomma svar",showEmptyAnswers:"Visa tomma svar","topNValueText-1":"Alla svar",topNValueText5:"Topp 5 svar",topNValueText10:"Topp 10 svar",topNValueText20:"Topp 20 svar",hideMissingAnswers:"Göm saknade svar",showMissingAnswers:"Visa saknade svar",missingAnswersLabel:"Saknade svar",noVisualizerForQuestion:"Detta frågetyp är inte visualiserad ännu",noResults:"Det finns inga resultat ännu",showPerValues:"Per värden",showPerColumns:"Per kolumner",answer:"Svar",correctAnswer:"Rätt svar: ",percent:"Procent",percentage:"Procent",statistics_chart:"Diagram",responses:"Svar",visualizer_nps:"NPS",npsScore:"NPS",npsPromoters:"Promotorer",npsPassives:"Passiva",npsDetractors:"Kritiker",axisXSelectorTitle:"X-axel:",axisYSelectorTitle:"Y-axel:"},r.q.localeNames.sv="Svenska";var n=i(555),s=i(818),o=i(183),a=i(143),l=i(928),u=i(226),h=i(931),c=i(267),d=i(557),p=i(87),g=i(156),f=i(70),m=function(e){function t(t,i,n,s){var o=e.call(this,i,n,s)||this;if(o.visualizers=t,o.visualizersWithSelection=[],o.onAfterVisualizerRenderCallback=function(){o.afterRender(o.contentContainer)},o.onVisualizerStateChangedCallback=function(e,t){o.stateChanged("visualizer",t)},o.onVisualizerChanged=new g.Event,o.showToolbar=!1,o.loadingData=!1,!t||t.length<2)throw new Error("VisualizerArrayWrapper works with visualizers collection only.");return o.visualizers.forEach((function(e){e.onUpdate=function(){return o.invokeOnUpdate()},e.onGetToolbarItemCreators=function(){return o.toolbarItemCreators},e.supportSelection&&(o._supportSelection=!0,o.visualizersWithSelection.push(e))})),o.registerToolbarItem("changeVisualizer",(function(){return o.visualizerSelector=f.gf.createSelector(o.visualizers.map((function(e){return{value:e.type,text:r.q.getString("visualizer_"+e.type)}})),(function(e){return o.visualizer.type===e.value}),(function(e){return o.setVisualizer(e.target.value)}))}),0),o.visualizer=t[0],o.visualizer.onAfterRender.add(o.onAfterVisualizerRenderCallback),o.visualizer.onStateChanged.add(o.onVisualizerStateChangedCallback),o}return(0,p.C6)(t,e),t.prototype.updateVisualizerSelector=function(){this.visualizerSelector&&(this.visualizerSelector.getElementsByTagName("select")[0].value=this.visualizer.type)},Object.defineProperty(t.prototype,"hasFooter",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.getVisualizers=function(){return this.visualizers},t.prototype.setVisualizer=function(e,t){void 0===t&&(t=!1);var i=this.visualizers.filter((function(t){return t.type===e}))[0];i&&i!==this.visualizer&&(this.visualizer&&(this.visualizer.onStateChanged.remove(this.onVisualizerStateChangedCallback),this.visualizer.onAfterRender.remove(this.onAfterVisualizerRenderCallback),this.visualizer.destroy()),this.visualizer=i,this.refresh(),this.visualizer.onAfterRender.add(this.onAfterVisualizerRenderCallback),this.visualizer.onStateChanged.add(this.onVisualizerStateChangedCallback),t||(this.onVisualizerChanged.fire(this,{visualizer:this.visualizer}),this.stateChanged("visualizer",e)),this.updateVisualizerSelector())},t.prototype.getVisualizer=function(){return this.visualizer},t.prototype.updateData=function(t){e.prototype.updateData.call(this,t),this.visualizers.forEach((function(e){e.updateData(t)}))},Object.defineProperty(t.prototype,"onDataItemSelected",{set:function(e){this.visualizersWithSelection.forEach((function(t){t.onDataItemSelected=e}))},enumerable:!1,configurable:!0}),t.prototype.setSelection=function(e){this.visualizersWithSelection.forEach((function(t){t.setSelection(e)}))},Object.defineProperty(t.prototype,"selection",{get:function(){return this.visualizer.selection||this.selectedItem},enumerable:!1,configurable:!0}),t.prototype.renderContent=function(e){this.visualizerContainer=e,this.visualizer.render(this.visualizerContainer)},t.prototype.setBackgroundColorCore=function(t){e.prototype.setBackgroundColorCore.call(this,t),this.visualizers.forEach((function(e){return e.backgroundColor=t}))},t.prototype.getState=function(){var e=this.visualizer.getState(),t={visualizer:this.visualizer.type};return Object.keys(e).length>0&&(t.state=e),t},t.prototype.setState=function(e){e.visualizer&&this.setVisualizer(e.visualizer,!0),e.state&&this.visualizer.setState(e.state)},t.prototype.getValues=function(){return this.visualizer.getValues()},t.prototype.getLabels=function(){return this.visualizer.getLabels()},t.prototype.getCalculatedValues=function(){return this.visualizer.getCalculatedValues()},t.prototype.destroy=function(){var t=this;this.visualizers.forEach((function(e){e.onAfterRender.remove(t.onAfterVisualizerRenderCallback),e.onStateChanged.remove(t.onVisualizerStateChangedCallback),e.onUpdate=void 0})),this.visualizer.destroy(),e.prototype.destroy.call(this)},t}(c.w);d.g.registerAltVisualizerSelector(m);var v=function(){function e(e){this._htmlElement=void 0,this.text=void 0,this._htmlElement=f.gf.createElement("div","sa-question__filter"),this.text=f.gf.createElement("span","sa-question__filter-text"),this._htmlElement.appendChild(this.text);var t=f.gf.createButton((function(){e.setSelection(void 0)}),r.q.getString("clearButton"));this._htmlElement.appendChild(t)}return Object.defineProperty(e.prototype,"htmlElement",{get:function(){return this._htmlElement},enumerable:!1,configurable:!0}),e.prototype.update=function(e){void 0!==e&&void 0!==e.value?(this._htmlElement.style.display="inline-flex",this.text.innerText=r.q.getString("filter")+": ["+e.text+"]"):(this._htmlElement.style.display="none",this.text.innerText="")},e}(),_=i(820),y=i.n(_),b=function(e){function t(t,i,r){void 0===r&&(r=!0);var n=e.call(this,t)||this;return n._selector=i,n.dragEnabled=r,n._muuri=void 0,n._layoutingTimer=void 0,n}return(0,p.C6)(t,e),t.prototype.startCore=function(e){var t=this;this._muuri=new(y())(e,{dragStartPredicate:{handle:".sa-question__title--draggable"},items:this._selector,dragEnabled:this.dragEnabled}),this._muuri.on("dragReleaseEnd",(function(e){var i=e.getGrid().getItems().map((function(e){return e.getElement().dataset.question}));t.onMoveCallback&&t.onMoveCallback(i)}))},t.prototype.stopCore=function(){this._muuri.off("dragReleaseEnd"),this._muuri.destroy(),this._muuri=void 0},t.prototype.updateCore=function(){var e=this;this._muuri&&(void 0!==this._layoutingTimer&&clearTimeout(this._layoutingTimer),this._layoutingTimer=setTimeout((function(){e._layoutingTimer=void 0,e._muuri&&(e._muuri.refreshItems(),e._muuri.layout())}),10))},t.prototype.add=function(e,t){this._allowed&&this._muuri.add(e,t)},t.prototype.remove=function(e,t){this._allowed&&this._muuri.remove(e,t)},t}(function(){function e(e){this._allowed=e}return e.prototype.startCore=function(e){},e.prototype.stopCore=function(){},e.prototype.updateCore=function(){},Object.defineProperty(e.prototype,"allowed",{get:function(){return this._allowed},enumerable:!1,configurable:!0}),e.prototype.start=function(e){this._allowed&&this.startCore(e)},e.prototype.stop=function(){this._allowed&&this.stopCore()},e.prototype.update=function(){this._allowed&&this.updateCore()},e.prototype.add=function(e,t){},e.prototype.remove=function(e,t){},e.prototype.destroy=function(){this.stop()},e}());const w=function(e){var t={};return e.keys().forEach((function(i){t[i.substring(2,i.length-4).toLowerCase()]=e(i)})),t}(i(288));var C=Object.keys(w).map((function(e){return function(e,t){var i=(t=t.trim()).toLowerCase();if("<svg "===i.substring(0,5)&&"</svg>"===i.substring(i.length-6,i.length))return'<symbol id="sa-svg-'+e+'" '+t.substring(5,i.length-6)+"</symbol>"}(e,w[e])})),T='<svg style="display:none;">'.concat(C,"<svg>"),x="sa-question",P="sa-question-layouted";if(document){var S=document.createElement("div");S.style.display="none",S.innerHTML=T,document.head.appendChild(S)}var k=function(e){function t(i,n,s,a){void 0===s&&(s={}),void 0===a&&(a=void 0);var l=e.call(this,null,n,s,"panel")||this;l.questions=i,l._elements=a,l.visualizers=[],l.haveCommercialLicense=!1,l.renderedQuestionsCount=0,l.onAfterRenderQuestionCallback=function(e,t){l.renderedQuestionsCount++,l.renderedQuestionsCount==l.questions.length&&(l.renderedQuestionsCount=0,l.layoutEngine.update(),l.afterRender(l.contentContainer))},l.onStateChangedCallback=function(e,t){var i;l.stateChanged(null===(i=e.question)||void 0===i?void 0:i.name,t)},l.onAlternativeVisualizerChanged=new g.Event,l.onAlternativeVisualizerChangedCallback=function(e,t){l.onAlternativeVisualizerChanged.fire(e,t)},l.onVisibleElementsChanged=new g.Event,l.onElementShown=new g.Event,l.onElementHidden=new g.Event,l.onElementMoved=new g.Event,l.loadingData=!1;var u=g.hasLicense;if(l.haveCommercialLicense=!!u&&u(4)||t.haveCommercialLicense||void 0!==s.haveCommercialLicense&&s.haveCommercialLicense,l._layoutEngine=s.layoutEngine||new b(l.allowDynamicLayout,"."+P,l.allowDragDrop),l._layoutEngine.onMoveCallback=function(e){return l.reorderVisibleElements(e)},l.showToolbar=!0,l.options.survey&&(r.q.currentLocale=l.options.survey.locale),void 0===a&&(l._elements=l.buildElements(i)),l.buildVisualizers(i),l.haveCommercialLicense||l.registerToolbarItem("commercialLicense",(function(){return(0,f.Qk)()})),l.registerToolbarItem("resetFilter",(function(){return f.gf.createButton((function(){l.visualizers.forEach((function(e){(e instanceof o.o||e instanceof m)&&e.setSelection(void 0)}))}),r.q.getString("resetFilter"))}),900),l.registerToolbarItem("addElement",(function(e){if(l.allowHideQuestions){var t=void 0,i=function(i,n){var s=l.hiddenElements;if(s.length>0){var o=f.gf.createSelector([{name:void 0,displayName:r.q.getString("addElement")}].concat(s).map((function(e){return{value:e.name,text:e.displayName}})),(function(e){return!1}),(function(e){l.showElement(e.target.value)}));t&&e.replaceChild(o,t)||e.appendChild(o),t=o}else t&&e.removeChild(t),t=void 0};i(),l.onVisibleElementsChanged.add(i)}})),!l.options.disableLocaleSwitch&&l.locales.length>1){var h=l.locales.map((function(e){return{value:e,text:r.q.localeNames[e]||r.q.getString(e)||e}}));l.registerToolbarItem("changeLocale",(function(){return f.gf.createSelector(h,(function(e){return!!e.value&&(l.locale||g.surveyLocalization.defaultLocale)===e.value}),(function(e){var t=e.target.value;l.locale=t}))}))}return l}return(0,p.C6)(t,e),t.prototype.reorderVisibleElements=function(e){var t=this,i=[];e.forEach((function(e){i.push(t._elements.filter((function(t){return t.name===e}))[0])})),this._elements.forEach((function(t){-1==e.indexOf(t.name)&&i.push(t)})),this._elements=i,this.visibleElementsChanged(void 0,"REORDERED")},t.prototype.onDataChanged=function(){},t.prototype.showElementCore=function(e,t){void 0===t&&(t=-1),e.isVisible=!0;var i=this.renderPanelElement(e,this.contentContainer),r=void 0;t>=0&&(r={index:t}),this.layoutEngine.add([i],r)},t.prototype.showElement=function(e){var t=this.getElement(e),i=this._elements.indexOf(t);this.showElementCore(t,i),this.visibleElementsChanged(t,"ADDED")},t.prototype.hideElementCore=function(e){e.isVisible=!1,e.renderedElement&&(this.layoutEngine.remove([e.renderedElement]),this.contentContainer.removeChild(e.renderedElement),e.renderedElement=void 0)},t.prototype.hideElement=function(e){var t=this.getElement(e);this.hideElementCore(t),this.visibleElementsChanged(t,"REMOVED")},t.prototype.hideAllElements=function(){var e=this,t=[];this._elements.forEach((function(i){i.isVisible&&(e.hideElementCore(i),t.push(i))})),this.visibleElementsChanged(void 0,"REMOVEDALL")},t.prototype.showAllElements=function(){var e=this,t=[];this._elements.forEach((function(i){i.isVisible||(e.showElementCore(i),t.push(i))})),this.visibleElementsChanged(void 0,"ADDEDDALL")},t.prototype.makeElementPrivate=function(e){e.isPublic=!1,this.stateChanged("isPublic",!1),this.onPermissionsChangedCallback&&this.onPermissionsChangedCallback(this)},t.prototype.makeElementPublic=function(e){e.isPublic=!0,this.stateChanged("isPublic",!0),this.onPermissionsChangedCallback&&this.onPermissionsChangedCallback(this)},t.prototype.moveVisibleElement=function(e,t){var i,r,n=this.visibleElements[e],s=this.visibleElements[t];i=this._elements.indexOf(n),r=this._elements.indexOf(s),this.moveElement(i,r)},t.prototype.moveElement=function(e,t){var i=this._elements.splice(e,1);this._elements.splice(t,0,i[0]),this.visibleElementsChanged(i[0],"MOVED")},t.prototype.setBackgroundColorCore=function(t){e.prototype.setBackgroundColorCore.call(this,t),this.visualizers.forEach((function(e){return e.backgroundColor=t}))},t.prototype.buildVisualizers=function(e){var t=this;e.forEach((function(e){var i,n=Object.assign({},t.options),s=t.surveyData;if(i=Array.isArray(e)?new(d.g.getPivotVisualizerConstructor())(e,s,n):t.createVisualizer(e,n,s)){if(t.allowHideQuestions&&i.registerToolbarItem("removeQuestion",(function(){return f.gf.createButton((function(){setTimeout((function(){return t.hideElement(e.name)}),0)}),r.q.getString("hideButton"))}),1e3),t.allowMakeQuestionsPrivate&&i.registerToolbarItem("makePrivatePublic",(function(){var i=t.getElement(e.name),n=i.isPublic?"first":"second",s=r.q.getString("makePrivateButton"),o=r.q.getString("makePublicButton");return f.gf.createSvgToggleButton("makepublic","makeprivate",s,o,(function(e){setTimeout((function(){return t.makeElementPublic(i)}),0)}),(function(e){setTimeout((function(){return t.makeElementPrivate(i)}),0)}),n)})),i.supportSelection){var o=i,a=new v(o);i.registerToolbarItem("questionFilterInfo",(function(){return a.update(o.selection),a.htmlElement}),900),o.onDataItemSelected=function(i,r){a.update({value:i,text:r}),t.setFilter(e.name,i)}}i.onUpdate=function(){return t.layout()},i.onAfterRender.add(t.onAfterRenderQuestionCallback),i.onStateChanged.add(t.onStateChangedCallback),i instanceof m&&i.onVisualizerChanged.add(t.onAlternativeVisualizerChangedCallback),t.visualizers.push(i)}}))},t.prototype.destroyVisualizers=function(){var e=this;this.visualizers.forEach((function(t){t.onUpdate=void 0,t instanceof o.o&&(t.onDataItemSelected=void 0),t instanceof m&&t.onVisualizerChanged.remove(e.onAlternativeVisualizerChangedCallback),t.onStateChanged.remove(e.onStateChangedCallback),t.onAfterRender.remove(e.onAfterRenderQuestionCallback),t.destroy()})),this.visualizers=[]},t.prototype.setLocale=function(t){var i=this;e.prototype.setLocale.call(this,t),(this.questions||[]).forEach((function(e){e=Array.isArray(e)?e[0]:e;var t=i.getElement(e.name);t&&(t.displayName=i.processText(e.title))})),this.visualizers.forEach((function(e){e.options.seriesLabels=i.options.seriesLabels,e.locale=t})),this.stateChanged("locale",t)},Object.defineProperty(t.prototype,"allowDynamicLayout",{get:function(){return void 0===this.options.allowDynamicLayout||!0===this.options.allowDynamicLayout},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowDragDrop",{get:function(){return!g.IsTouch&&(void 0===this.options.allowDragDrop||!0===this.options.allowDragDrop)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowHideQuestions",{get:function(){return void 0===this.options.allowHideQuestions||!0===this.options.allowHideQuestions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowMakeQuestionsPrivate",{get:function(){return!0===this.options.allowMakeQuestionsPrivate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layoutEngine",{get:function(){return this._layoutEngine},enumerable:!1,configurable:!0}),t.prototype.buildElements=function(e){var t=this;return(e||[]).map((function(e){return{name:(e=Array.isArray(e)?e[0]:e).name,displayName:t.processText(e.title),isVisible:!0,isPublic:!0}}))},t.prototype.getElements=function(e){var t=[];return(this._elements||[]).forEach((function(i){e&&-1===e.indexOf(i.name)||t.push({name:i.name,displayName:i.displayName,isVisible:i.isVisible,isPublic:i.isPublic})})),t},Object.defineProperty(t.prototype,"visibleElements",{get:function(){return this._elements.filter((function(e){return e.isVisible}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hiddenElements",{get:function(){return this._elements.filter((function(e){return!e.isVisible}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"publicElements",{get:function(){return this._elements.filter((function(e){return e.isPublic}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"privateElements",{get:function(){return this._elements.filter((function(e){return!e.isPublic}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"locales",{get:function(){return this.options.survey?this.options.survey.getUsedLocales():[]},enumerable:!1,configurable:!0}),t.prototype.getElement=function(e){return this._elements.filter((function(t){return t.name===e}))[0]},t.prototype.getVisualizer=function(e){return this.visualizers.filter((function(t){return t.question.name===e}))[0]},t.prototype.visibleElementsChanged=function(e,t){"SHOWN"!==t||this.onElementShown.isEmpty||this.onElementShown.fire(this,{elements:this._elements,element:e}),"REMOVED"!==t||this.onElementHidden.isEmpty||this.onElementHidden.fire(this,{elements:this._elements,element:e}),"MOVED"!==t||this.onElementMoved.isEmpty||this.onElementMoved.fire(this,{elements:this._elements,element:e}),this.onVisibleElementsChanged.isEmpty||this.onVisibleElementsChanged.fire(this,{elements:this._elements,changed:e,reason:t}),this.stateChanged("visibleElements",t),this.layout()},t.prototype.renderPanelElement=function(e,t){var i=this.getVisualizer(e.name);if(i){var r=f.gf.createElement("div");r.dataset.question=e.name,t&&t.appendChild(r);var n=f.gf.createElement("div"),s=f.gf.createElement("h3"),o=f.gf.createElement("div");return s.innerText=e.displayName,r.className=this.allowDynamicLayout?x+" "+P:x,s.className=x+"__title",this.allowDynamicLayout&&this.allowDragDrop&&(s.className=s.className+" "+x+"__title--draggable"),n.className=x+"__content",n.style.backgroundColor=this.backgroundColor,n.appendChild(s),n.appendChild(o),r.appendChild(n),i.render(o),e.renderedElement=r,r}},t.prototype.renderToolbar=function(t){t.className+=" sa-panel__header",e.prototype.renderToolbar.call(this,t)},t.prototype.renderContent=function(e){var t=this;e.className+=" sa-panel__content sa-grid",this.visibleElements.forEach((function(i){t.renderPanelElement(i,e)})),this.layoutEngine.start(e)},t.prototype.destroyContent=function(t){this.layoutEngine.stop(),e.prototype.destroyContent.call(this,t)},t.prototype.refresh=function(){this.toolbarContainer&&(this.destroyToolbar(this.toolbarContainer),this.renderToolbar(this.toolbarContainer)),e.prototype.refresh.call(this)},t.prototype.layout=function(){this.layoutEngine.update()},t.prototype.setFilter=function(e,t){this.dataProvider.setFilter(e,t)},t.prototype.getState=function(){var e=this;return{locale:this.locale,elements:[].concat(this._elements.map((function(t){var i=e.getVisualizer(t.name),r=(0,p.Cl)((0,p.Cl)({},t),null==i?void 0:i.getState());return void 0!==r.renderedElement&&delete r.renderedElement,r})))}},Object.defineProperty(t.prototype,"state",{get:function(){return this.getState()},set:function(e){var t=this;if(e){this._settingState=!0;try{if(Array.isArray(e.elements)){var i=this.questions.map((function(e){return Array.isArray(e)?e[0].name:e.name}));this._elements=[].concat(e.elements.filter((function(e){return-1!==i.indexOf(e.name)})))}void 0!==e.locale&&this.setLocale(e.locale),this._elements.forEach((function(e){var i=t.getVisualizer(e.name);void 0!==i&&i.setState(e)}))}finally{this._settingState=!1}this.refresh()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"permissions",{get:function(){return this._elements.map((function(e){return{name:e.name,isPublic:e.isPublic}}))},set:function(e){var t=this._elements.map((function(t){return e.forEach((function(e){e.name===t.name&&(t.isPublic=e.isPublic)})),(0,p.Cl)({},t)}));this._elements=[].concat(t),this.refresh(),this.onPermissionsChangedCallback&&this.onPermissionsChangedCallback(this)},enumerable:!1,configurable:!0}),t.prototype.getCalculatedValuesCore=function(){return[]},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.destroyVisualizers()},t.haveCommercialLicense=!1,t}(c.w),A=function(e){function t(t,i,r,n){void 0===r&&(r={});var s=e.call(this,t,i,r,n||"panelDynamic")||this;return s._panelVisualizer=void 0,s.onAfterRenderPanelCallback=function(){s.afterRender(s.contentContainer)},s.loadingData=!1,(r=Object.assign({},r)).allowDynamicLayout=!1,r.dataProvider=void 0,s._panelVisualizer=new k(s.getQuestions(),[],r),s._panelVisualizer.onAfterRender.add(s.onAfterRenderPanelCallback),s.updateData(i),s}return(0,p.C6)(t,e),t.prototype.setLocale=function(t){e.prototype.setLocale.call(this,t),this._panelVisualizer.locale=t},Object.defineProperty(t.prototype,"type",{get:function(){return"panelDynamic"},enumerable:!1,configurable:!0}),t.prototype.updatePanelVisualizerData=function(){var e=this,t=[];this.data.forEach((function(i){void 0!==i[e.question.name]&&(t=t.concat(i[e.question.name]))})),this._panelVisualizer.updateData(t)},t.prototype.updateData=function(t){e.prototype.updateData.call(this,t),this.updatePanelVisualizerData()},t.prototype.onDataChanged=function(){this.updatePanelVisualizerData(),e.prototype.onDataChanged.call(this)},t.prototype.getQuestions=function(){return this.question.template.questions},t.prototype.destroyContent=function(t){this._panelVisualizer.clear(),e.prototype.destroyContent.call(this,this.contentContainer)},t.prototype.renderContent=function(e){this._panelVisualizer.render(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._panelVisualizer.onAfterRender.remove(this.onAfterRenderPanelCallback)},t}(c.w);d.g.registerVisualizer("paneldynamic",A);var D=function(e){function t(t,i,r){return e.call(this,t,i,r)||this}return(0,p.C6)(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return"matrixDynamic"},enumerable:!1,configurable:!0}),t.prototype.getQuestions=function(){var e=this.question.visibleRows;return 0===e.length?[]:e[0].cells.map((function(e){return e.question}))},t}(A);d.g.registerVisualizer("matrixdynamic",D);var E=function(e){function t(t,i,r,n){void 0===r&&(r={});var s=e.call(this,t,i,r,n||"matrixDropdown")||this;if(s._matrixDropdownVisualizer=void 0,s.onPanelAfterRenderCallback=function(){s.afterRender(s.contentContainer)},s.loadingData=!1,s._childOptions=Object.assign({},r),s._childOptions.disableLocaleSwitch=!0,s._childOptions.dataProvider=void 0,s._childOptions.allowDynamicLayout=!1,s._childOptions.transposeData=!0,s._childOptions.seriesValues=t.rows.map((function(e){return e.value})),s._childOptions.seriesLabels=t.rows.map((function(e){return e.text})),s.canGroupColumns){var o=d.g.getVisualizersByType("matrixdropdown-grouped");s._matrixDropdownVisualizer=new o[0](s.question,[],s._childOptions)}else{var a=s.getQuestions();s._matrixDropdownVisualizer=new k(a,[],s._childOptions)}return s._matrixDropdownVisualizer.onAfterRender.add(s.onPanelAfterRenderCallback),s.updateData(i),s}return(0,p.C6)(t,e),Object.defineProperty(t.prototype,"canGroupColumns",{get:function(){var e=this,t=this.getQuestions();return 1==this._childOptions.seriesValues.length&&t.every((function(t){return"boolean"!==t.getType()&&function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(e[i].value!==t[i].value||e[i].text!==t[i].text)return!1;return!0}(t.choices,e.question.choices)}))},enumerable:!1,configurable:!0}),t.prototype.setLocale=function(t){e.prototype.setLocale.call(this,t),this._childOptions.seriesLabels=this.question.rows.map((function(e){return e.text})),this._matrixDropdownVisualizer.locale=t},Object.defineProperty(t.prototype,"matrixDropdownVisualizer",{get:function(){return this._matrixDropdownVisualizer},enumerable:!1,configurable:!0}),t.prototype.updateDropdownVisualizerData=function(){var e=this,t=[];this.data.forEach((function(i){var r=i[e.question.name];r&&Object.keys(r).forEach((function(e){var i=Object.assign({},r[e]);i[n.M.seriesMarkerKey]=e,t.push(i)}))})),this._matrixDropdownVisualizer.updateData(t)},t.prototype.updateData=function(t){e.prototype.updateData.call(this,t),this.updateDropdownVisualizerData()},t.prototype.onDataChanged=function(){this.updateDropdownVisualizerData(),e.prototype.onDataChanged.call(this)},t.prototype.getQuestions=function(){var e=this.question;return e.columns.map((function(t){var i=t.templateQuestion;return Array.isArray(i.choices)&&0===i.choices.length&&(i.choices=e.choices),i}))},t.prototype.destroyContent=function(t){this._matrixDropdownVisualizer.clear(),e.prototype.destroyContent.call(this,this.contentContainer)},t.prototype.renderContent=function(e){this._matrixDropdownVisualizer.render(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._matrixDropdownVisualizer.onAfterRender.remove(this.onPanelAfterRenderCallback)},t}(c.w);d.g.registerVisualizer("matrixdropdown",E);var V={en:["...","a","about","above","across","after","again","against","all","almost","alone","along","already","also","although","always","among","an","and","another","any","anybody","anyone","anything","anywhere","are","area","areas","around","as","ask","asked","asking","asks","at","away","b","back","backed","backing","backs","be","became","because","become","becomes","been","before","began","behind","being","beings","best","better","between","big","both","but","by","c","came","can","cannot","case","cases","certain","certainly","clear","clearly","come","could","d","did","differ","different","differently","do","does","done","down","down","downed","downing","downs","during","e","each","early","either","end","ended","ending","ends","enough","even","evenly","ever","every","everybody","everyone","everything","everywhere","f","face","faces","fact","facts","far","felt","few","find","finds","first","for","four","from","full","fully","further","furthered","furthering","furthers","g","gave","general","generally","get","gets","give","given","gives","go","going","good","goods","got","great","greater","greatest","group","grouped","grouping","groups","h","had","has","have","having","he","her","here","herself","high","high","high","higher","highest","him","himself","his","how","however","i","if","important","in","interest","interested","interesting","interests","into","is","it","its","itself","j","just","k","keep","keeps","kind","knew","know","known","knows","l","large","largely","last","later","latest","least","less","let","lets","like","likely","long","longer","longest","m","made","make","making","man","many","may","me","member","members","men","might","more","most","mostly","mr","mrs","much","must","my","myself","n","necessary","need","needed","needing","needs","never","new","new","newer","newest","next","no","nobody","non","noone","not","nothing","now","nowhere","number","numbers","o","of","off","often","old","older","oldest","on","once","one","only","open","opened","opening","opens","or","order","ordered","ordering","orders","other","others","our","out","over","p","part","parted","parting","parts","per","perhaps","place","places","point","pointed","pointing","points","possible","present","presented","presenting","presents","problem","problems","put","puts","q","quite","r","rather","really","right","right","room","rooms","s","said","same","saw","say","says","second","seconds","see","seem","seemed","seeming","seems","sees","several","shall","she","should","show","showed","showing","shows","side","sides","since","small","smaller","smallest","so","some","somebody","someone","something","somewhere","state","states","still","still","such","sure","t","take","taken","than","that","the","their","them","then","there","therefore","these","they","thing","things","think","thinks","this","those","though","thought","thoughts","three","through","thus","to","today","together","too","took","toward","turn","turned","turning","turns","two","u","under","until","up","upon","us","use","used","uses","v","very","w","want","wanted","wanting","wants","was","way","ways","we","well","wells","went","were","what","when","where","whether","which","while","who","whole","whose","why","will","with","within","without","work","worked","working","works","would","x","y","year","years","yet","you","young","younger","youngest","your","yours","z"],no:["...","alle","andre","arbeid","at","av","bare","begge","ble","blei","bli","blir","blitt","bort","bruke","både","båe","da","de","deg","dei","deim","deira","deires","dem","den","denne","der","dere","deres","det","dette","di","din","disse","ditt","du","dykk","dykkar","då","eg","ein","eit","eitt","eller","elles","en","ene","eneste","enhver","enn","er","et","ett","etter","folk","for","fordi","forsøke","fra","få","før","før","først","gjorde","gjøre","god","gå","ha","hadde","han","hans","har","hennar","henne","hennes","her","hjå","ho","hoe","honom","hoss","hossen","hun","hva","hvem","hver","hvilke","hvilken","hvis","hvor","hvordan","hvorfor","i","ikke","ikkje","ingen","ingi","inkje","inn","innen","inni","ja","jeg","kan","kom","korleis","korso","kun","kunne","kva","kvar","kvarhelst","kven","kvi","kvifor","lage","lang","lik","like","makt","man","mange","me","med","medan","meg","meget","mellom","men","mens","mer","mest","mi","min","mine","mitt","mot","mye","mykje","må","måte","navn","ned","nei","no","noe","noen","noka","noko","nokon","nokor","nokre","ny","nå","når","og","også","om","opp","oss","over","part","punkt","på","samme","seg","selv","si","sia","sidan","siden","sin","sine","sist","sitt","sjøl","skal","skulle","slik","slutt","so","som","somme","somt","start","stille","så","sånn","tid","til","tilbake","tilstand","um","under","upp","ut","uten","var","vart","varte","ved","verdi","vere","verte","vi","vil","ville","vite","vore","vors","vort","vår","være","vært","vøre","vørt","æ","å"],nl:["de","en","van","ik","te","dat","die","in","een","hij","het","niet","zijn","is","was","op","aan","met","als","voor","had","er","maar","om","hem","dan","zou","of","wat","mijn","men","dit","zo","door","over","ze","zich","bij","ook","tot","je","mij","uit","der","daar","haar","naar","heb","hoe","heeft","hebben","deze","u","want","nog","zal","me","zij","nu","ge","geen","omdat","iets","worden","toch","al","waren","veel","meer","doen","toen","moet","ben","zonder","kan","hun","dus","alles","onder","ja","eens","hier","wie","werd","altijd","doch","wordt","wezen","kunnen","ons","zelf","tegen","na","reeds","wil","kon","niets","uw","iemand","geweest","andere"],es:["...","a","actualmente","adelante","además","afirmó","agregó","ahora","ahí","al","algo","alguna","algunas","alguno","algunos","algún","alrededor","ambos","ampleamos","ante","anterior","antes","apenas","aproximadamente","aquel","aquellas","aquellos","aqui","aquí","arriba","aseguró","así","atras","aunque","ayer","añadió","aún","bajo","bastante","bien","buen","buena","buenas","bueno","buenos","cada","casi","cerca","cierta","ciertas","cierto","ciertos","cinco","comentó","como","con","conocer","conseguimos","conseguir","considera","consideró","consigo","consigue","consiguen","consigues","contra","cosas","creo","cual","cuales","cualquier","cuando","cuanto","cuatro","cuenta","cómo","da","dado","dan","dar","de","debe","deben","debido","decir","dejó","del","demás","dentro","desde","después","dice","dicen","dicho","dieron","diferente","diferentes","dijeron","dijo","dio","donde","dos","durante","e","ejemplo","el","ella","ellas","ello","ellos","embargo","empleais","emplean","emplear","empleas","empleo","en","encima","encuentra","entonces","entre","era","erais","eramos","eran","eras","eres","es","esa","esas","ese","eso","esos","esta","estaba","estabais","estaban","estabas","estad","estada","estadas","estado","estados","estais","estamos","estan","estando","estar","estaremos","estará","estarán","estarás","estaré","estaréis","estaría","estaríais","estaríamos","estarían","estarías","estas","este","estemos","esto","estos","estoy","estuve","estuviera","estuvierais","estuvieran","estuvieras","estuvieron","estuviese","estuvieseis","estuviesen","estuvieses","estuvimos","estuviste","estuvisteis","estuviéramos","estuviésemos","estuvo","está","estábamos","estáis","están","estás","esté","estéis","estén","estés","ex","existe","existen","explicó","expresó","fin","fue","fuera","fuerais","fueran","fueras","fueron","fuese","fueseis","fuesen","fueses","fui","fuimos","fuiste","fuisteis","fuéramos","fuésemos","gran","grandes","gueno","ha","haber","habida","habidas","habido","habidos","habiendo","habremos","habrá","habrán","habrás","habré","habréis","habría","habríais","habríamos","habrían","habrías","habéis","había","habíais","habíamos","habían","habías","hace","haceis","hacemos","hacen","hacer","hacerlo","haces","hacia","haciendo","hago","han","has","hasta","hay","haya","hayamos","hayan","hayas","hayáis","he","hecho","hemos","hicieron","hizo","hoy","hube","hubiera","hubierais","hubieran","hubieras","hubieron","hubiese","hubieseis","hubiesen","hubieses","hubimos","hubiste","hubisteis","hubiéramos","hubiésemos","hubo","igual","incluso","indicó","informó","intenta","intentais","intentamos","intentan","intentar","intentas","intento","ir","junto","la","lado","largo","las","le","les","llegó","lleva","llevar","lo","los","luego","lugar","manera","manifestó","mayor","me","mediante","mejor","mencionó","menos","mi","mientras","mio","mis","misma","mismas","mismo","mismos","modo","momento","mucha","muchas","mucho","muchos","muy","más","mí","mía","mías","mío","míos","nada","nadie","ni","ninguna","ningunas","ninguno","ningunos","ningún","no","nos","nosotras","nosotros","nuestra","nuestras","nuestro","nuestros","nueva","nuevas","nuevo","nuevos","nunca","o","ocho","os","otra","otras","otro","otros","para","parece","parte","partir","pasada","pasado","pero","pesar","poca","pocas","poco","pocos","podeis","podemos","poder","podria","podriais","podriamos","podrian","podrias","podrá","podrán","podría","podrían","poner","por","por qué","porque","posible","primer","primera","primero","primeros","principalmente","propia","propias","propio","propios","próximo","próximos","pudo","pueda","puede","pueden","puedo","pues","que","quedó","queremos","quien","quienes","quiere","quién","qué","realizado","realizar","realizó","respecto","sabe","sabeis","sabemos","saben","saber","sabes","se","sea","seamos","sean","seas","segunda","segundo","según","seis","ser","seremos","será","serán","serás","seré","seréis","sería","seríais","seríamos","serían","serías","seáis","señaló","si","sido","siempre","siendo","siete","sigue","siguiente","sin","sino","sobre","sois","sola","solamente","solas","solo","solos","somos","son","soy","su","sus","suya","suyas","suyo","suyos","sí","sólo","tal","también","tampoco","tan","tanto","te","tendremos","tendrá","tendrán","tendrás","tendré","tendréis","tendría","tendríais","tendríamos","tendrían","tendrías","tened","teneis","tenemos","tener","tenga","tengamos","tengan","tengas","tengo","tengáis","tenida","tenidas","tenido","tenidos","teniendo","tenéis","tenía","teníais","teníamos","tenían","tenías","tercera","ti","tiempo","tiene","tienen","tienes","toda","todas","todavía","todo","todos","total","trabaja","trabajais","trabajamos","trabajan","trabajar","trabajas","trabajo","tras","trata","través","tres","tu","tus","tuve","tuviera","tuvierais","tuvieran","tuvieras","tuvieron","tuviese","tuvieseis","tuviesen","tuvieses","tuvimos","tuviste","tuvisteis","tuviéramos","tuviésemos","tuvo","tuya","tuyas","tuyo","tuyos","tú","ultimo","un","una","unas","uno","unos","usa","usais","usamos","usan","usar","usas","uso","usted","va","vais","valor","vamos","van","varias","varios","vaya","veces","ver","verdad","verdadera","verdadero","vez","vosotras","vosotros","voy","vuestra","vuestras","vuestro","vuestros","y","ya","yo","él","éramos","ésta","éstas","éste","éstos","última","últimas","último","últimos"]},z={getStopWords:function(e){return void 0===e&&(e=""),V[e||"en"]||[]}},M={spiralResolution:1,spiralLimit:1800,lineHeight:.8,xWordPadding:0,yWordPadding:3,weightFactor:40,topN:40,maxHeight:0,padding:10},L=function(){function e(e){void 0===e&&(e=M),this._options=e,this._words=[],this._placedWords=[],this._minWeight=1,this._weightFactor=1,this._renderedTarget=void 0,this.colors=["black"]}return Object.defineProperty(e.prototype,"words",{get:function(){return this._words},set:function(e){this._words=[].concat(e||[]),this._minWeight=1,this._weightFactor=1,this._words.length>0&&(this._words.sort((function(e,t){return-1*(e[1]-t[1])})),this._minWeight=this._words[this._words.length-1][1],this._weightFactor=(this._words[0][1]-this._minWeight+1)/this._options.weightFactor)},enumerable:!1,configurable:!0}),e.prototype.createWordElement=function(e,t,i){var r=document.createElement("div");return r.style.position="absolute",r.style.fontSize=(t-this._minWeight+1)/this._weightFactor+"px",r.style.lineHeight=this._options.lineHeight+"em",this.colors.length>0&&(r.style.color=this.colors[i%this.colors.length]),r.title=e+" ("+t+")",r.appendChild(document.createTextNode(e)),r},e.prototype.isIntersectWithPlaced=function(e){for(var t=0;t<this._placedWords.length;t+=1){var i=this._placedWords[t].rect;if(!(e.right+this._options.xWordPadding<i.left-this._options.xWordPadding||e.left-this._options.xWordPadding>i.right+this._options.xWordPadding||e.bottom+this._options.yWordPadding<i.top-this._options.yWordPadding||e.top-this._options.yWordPadding>i.bottom+this._options.yWordPadding))return!0}return!1},e.prototype.arrangeWords=function(e,t){for(var i={x:0,y:0},r=i.y,n=i.y,s=Math.min(this._options.topN,this.words.length),o=0;o<s;o+=1){var a=this.createWordElement(this.words[o][0],this.words[o][1],o);e.appendChild(a);for(var l=0;l<this._options.spiralLimit;l++){var u=this._options.spiralResolution*l;i.x=(1+u)*Math.cos(u),i.y=(1+u)*Math.sin(u);var h=t.x+i.x-a.offsetWidth/2,c=t.y+i.y-a.offsetHeight/2;a.style.left=h+"px",a.style.top=c+"px";var d=a.getBoundingClientRect();if(!this.isIntersectWithPlaced(d)){this._placedWords.push({element:a,rect:d,left:h,top:c});break}}var p=i.y-a.offsetHeight/2;r>p&&(r=p);var g=i.y+a.offsetHeight/2;n<g&&(n=g)}return[r,n]},e.prototype.render=function(e){var t=this;this._renderedTarget=e;var i=document.createElement("div");document.body.appendChild(i),i.style.position="fixed",i.style.top="-1000px",i.style.width="0",i.style.height="0";var r={x:i.offsetWidth/2,y:i.offsetHeight/2},n=this.arrangeWords(i,r),s=n[0],o=n[1];this._placedWords.forEach((function(e){e.element.style.top=e.top-s+t._options.padding+"px"})),i.remove(),i.style.top="auto",i.style.left="50%",i.className="sa-visualizer-wordcloud",i.style.position="relative",this._options.maxHeight>0&&(i.style.height=this._options.maxHeight+"px",i.style.overflow="auto"),0==this._options.maxHeight&&(i.style.height=o-s+2*this._options.padding+"px"),e.appendChild(i)},e.prototype.dispose=function(){this._renderedTarget&&(this._renderedTarget.innerHTML="",this._renderedTarget=void 0)},e}(),O=function(){function e(e){this.model=e}return Object.defineProperty(e.prototype,"wordcloud",{get:function(){return this._wordcloud},enumerable:!1,configurable:!0}),e.prototype.create=function(t){return(0,p.sH)(this,void 0,void 0,(function(){var i,n,s,o;return(0,p.YH)(this,(function(a){switch(a.label){case 0:return[4,this.model.getCalculatedValues()];case 1:return i=a.sent(),this.model.getColors(),0===i.length?(n=f.gf.createElement("p","",{innerText:r.q.getString("noResults")}),t.appendChild(n),[2]):(s=JSON.parse(JSON.stringify(M)),o={config:s},e.onWordcloudCreating.fire(this.model,o),this._wordcloud=new L(s),this._wordcloud.colors=this.model.getColors(),this._wordcloud.words=i,this._wordcloud.render(t),[2,this._wordcloud])}}))}))},e.prototype.destroy=function(e){this._wordcloud&&"function"==typeof this._wordcloud.dispose&&this._wordcloud.dispose(),this._wordcloud=void 0},e.drawOutOfBound=!1,e.shrinkToFit=!0,e.abortThreshold=void 0,e.weightFactor=20,e.onWordcloudCreating=new g.Event,e}(),B=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"wordcloud")||this;return s._wordcloudAdapter=new O(s),s}return(0,p.C6)(t,e),t.prototype.convertFromExternalData=function(e){var t=[];return Object.keys(e||[]).forEach((function(i){t.push([i,e[i]])})),t},t.prototype.getCalculatedValuesCore=function(){var e=this,t={},i=[],n=r.q.currentLocale;i=n?z.getStopWords(n):z.getStopWords();var s=new RegExp("[.,/#!$%^*;:{}=-_`~()]","g"),o=function(e){(e=""+e)&&e.split(" ").forEach((function(e){var r=(e||"").toLowerCase().replace(s,"");r=function(e){return-1!==i.indexOf(e)?"":e}(r),r&&(t[r]?t[r]++:t[r]=1)}))};return this.surveyData.forEach((function(t){var i=t[e.question.name];i&&(Array.isArray(i)?i.forEach(o):"object"==typeof i?Object.keys(i).forEach((function(e){return o(i[e])})):o(i))})),Object.keys(t).map((function(e){return[e,t[e]]}))},t.prototype.destroyContent=function(t){this._wordcloudAdapter.destroy(t),e.prototype.destroyContent.call(this,t)},t.prototype.renderContentAsync=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t;return(0,p.YH)(this,(function(i){switch(i.label){case 0:return t=f.gf.createElement("div"),e.appendChild(t),[4,this._wordcloudAdapter.create(t)];case 1:return i.sent(),e.innerHTML="",e.appendChild(t),[2,e]}}))}))},t.prototype.destroy=function(){this._wordcloudAdapter.destroy(this.contentContainer),e.prototype.destroy.call(this)},t}(c.w);d.g.registerVisualizer("text",B),d.g.registerVisualizer("comment",B),d.g.registerVisualizer("multipletext",B);var N=function(){function e(e){this.model=e}return e.prototype.create=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t,i,n,s,o,a,l=this;return(0,p.YH)(this,(function(u){switch(u.label){case 0:return[4,this.model.getCalculatedValues()];case 1:return t=u.sent(),i=t.columnCount,n=t.data,s=f.gf.createElement("p","",{innerText:r.q.getString("noResults")}),0===n.length?(e.appendChild(s),[2]):((o=f.gf.createElement("table","sa-text-table")).style.backgroundColor=this.model.backgroundColor,e.appendChild(o),this.model.columns&&(a=f.gf.createElement("tr"),this.model.columns.forEach((function(e){var t=f.gf.createElement("th","sa-text-table__cell",{textContent:e.title});a.appendChild(t)})),o.appendChild(a)),n.forEach((function(e){for(var t=f.gf.createElement("tr"),r=0;r<i;r++){var n=l.model.columns[r],s=f.gf.createElement("td","sa-text-table__cell"+("number"==(null==n?void 0:n.type)?" sa-text-table__cell--number":""),{textContent:e[r]});t.appendChild(s)}o.appendChild(t)})),e.className="sa-text-table__container",e.appendChild(o),[2])}}))}))},e.prototype.destroy=function(e){e.innerHTML=""},e}(),q=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"text")||this;return s._textTableAdapter=new N(s),s}return(0,p.C6)(t,e),Object.defineProperty(t.prototype,"columns",{get:function(){var e=[];return"multipletext"==this.question.getType()&&this.question.items.forEach((function(t){e.push({name:t.name,title:t.title,type:t.inputType})})),e},enumerable:!1,configurable:!0}),t.prototype.getCalculatedValuesCore=function(){var e=this,t=[],i=0;return this.surveyData.forEach((function(r){var n=r[e.question.name],s=[];n&&(Array.isArray(n)?s=s.concat(n):"object"==typeof n?Object.keys(n).forEach((function(e){return s.push(n[e])})):s.push(n),t.push(s),s.length>i&&(i=s.length))})),{columnCount:i,data:t}},t.prototype.destroyContent=function(t){this._textTableAdapter.destroy(t),e.prototype.destroyContent.call(this,t)},t.prototype.renderContentAsync=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t;return(0,p.YH)(this,(function(i){switch(i.label){case 0:return t=f.gf.createElement("div"),[4,this._textTableAdapter.create(t)];case 1:return i.sent(),e.innerHTML="",e.appendChild(t),[2,e]}}))}))},t.prototype.destroy=function(){this._textTableAdapter.destroy(this.contentContainer),e.prototype.destroy.call(this)},t}(c.w);d.g.registerVisualizer("text",q),d.g.registerVisualizer("comment",q),d.g.registerVisualizer("multipletext",q);var R=function(){function e(e){this.model=e}return e.prototype.create=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t,i,n,s,o,a=this;return(0,p.YH)(this,(function(l){switch(l.label){case 0:return[4,this.model.getAnswersData()];case 1:return t=l.sent(),i=t.datasets,n=t.labels,t.colors,s=t.texts,t.seriesLabels.length,o=f.gf.createElement("p","",{innerText:r.q.getString("noResults")}),0===i.length||0===i[0].length?(e.appendChild(o),[2]):(i.forEach((function(t,i){var o=f.gf.createElement("table","sa-statistics-table");o.style.backgroundColor=a.model.backgroundColor,e.appendChild(o);var l=f.gf.createElement("tr"),u=f.gf.createElement("th","sa-statistics-table__cell-header",{textContent:r.q.getString("answer")});l.appendChild(u);var h=f.gf.createElement("th","sa-statistics-table__cell-header",{textContent:r.q.getString("statistics_chart")});l.appendChild(h);var c=f.gf.createElement("th","sa-statistics-table__cell-header",{textContent:r.q.getString("percentage")});l.appendChild(c);var d=f.gf.createElement("th","sa-statistics-table__cell-header",{textContent:r.q.getString("responses")});l.appendChild(d),o.appendChild(l);for(var p=t.length-1;p>=0;p--){var g=f.gf.createElement("tr");u=f.gf.createElement("td","sa-statistics-table__cell",{textContent:n[p]}),g.appendChild(u),h=f.gf.createElement("td","sa-statistics-table__cell");var m=f.gf.createElement("div","sa-choices-sparkline"),v=f.gf.createElement("div","sa-choices-sparkline-value");v.style.width=s[i][p]+"%",m.appendChild(v),h.appendChild(m),g.appendChild(h),c=f.gf.createElement("td","sa-statistics-table__cell sa-statistics-table__cell-value",{textContent:s[i][p]+"%"}),g.appendChild(c),d=f.gf.createElement("td","sa-statistics-table__cell sa-statistics-table__cell-value",{textContent:t[p]}),g.appendChild(d),o.appendChild(g)}e.className="sa-statistics-table__container",e.appendChild(o)})),[2])}}))}))},e.prototype.destroy=function(e){e.innerHTML=""},e}(),I=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"choices")||this;return s._statisticsTableAdapter=new R(s),s.showPercentages=!0,s}return(0,p.C6)(t,e),t.prototype.destroyContent=function(t){this._statisticsTableAdapter.destroy(t),e.prototype.destroyContent.call(this,t)},t.prototype.renderContentAsync=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t;return(0,p.YH)(this,(function(i){switch(i.label){case 0:return t=f.gf.createElement("div"),[4,this._statisticsTableAdapter.create(t)];case 1:return i.sent(),e.innerHTML="",e.appendChild(t),[2,e]}}))}))},t.prototype.destroy=function(){this._statisticsTableAdapter.destroy(this.contentContainer),e.prototype.destroy.call(this)},t}(o.o);d.g.registerVisualizer("radiogroup",I),d.g.registerVisualizer("dropdown",I),d.g.registerVisualizer("checkbox",I);var j=function(){function e(e,t){this._model=e,this._data=t,this._renderedTarget=void 0}return e.prototype.renderScorePart=function(e,t,i){var n=f.gf.createElement("div","sa-visualizer-nps__score-part"),s=f.gf.createElement("div","sa-visualizer-nps__score-part-title");s.innerText=r.q.getString(e),n.appendChild(s);var o=f.gf.createElement("div","sa-visualizer-nps__score-part-values");n.appendChild(o);var a=f.gf.createElement("div","sa-visualizer-nps__score-part-value");if(a.innerText=""+t,o.appendChild(a),i){var l=f.gf.createElement("div","sa-visualizer-nps__score-part-percent");l.innerText=i+"%",o.appendChild(l)}return n},e.prototype.render=function(e){this._renderedTarget=e;var t=f.gf.createElement("div","sa-visualizer-nps");t.appendChild(this.renderScorePart("npsScore",this.npsScore)),t.appendChild(this.renderScorePart("npsPromoters",this._data.promoters,this.promotersPercent)),t.appendChild(this.renderScorePart("npsPassives",this._data.total-this._data.promoters-this._data.detractors,this.passivePercent)),t.appendChild(this.renderScorePart("npsDetractors",this._data.detractors,this.detractorsPercent)),e.appendChild(t)},Object.defineProperty(e.prototype,"npsScore",{get:function(){return(0,f.QX)((this._data.promoters-this._data.detractors)/this._data.total*100,this._model.precision)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promotersPercent",{get:function(){return(0,f.QX)(this._data.promoters/this._data.total*100,this._model.precision)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"passivePercent",{get:function(){return(0,f.QX)((this._data.total-this._data.promoters-this._data.detractors)/this._data.total*100,this._model.precision)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"detractorsPercent",{get:function(){return(0,f.QX)(this._data.detractors/this._data.total*100,this._model.precision)},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._renderedTarget&&(this._renderedTarget.innerHTML="",this._renderedTarget=void 0)},e}(),H=function(){function e(e){this.model=e}return Object.defineProperty(e.prototype,"npsVisualizer",{get:function(){return this._npsVisualizer},enumerable:!1,configurable:!0}),e.prototype.create=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t;return(0,p.YH)(this,(function(i){switch(i.label){case 0:return[4,this.model.getCalculatedValues()];case 1:return t=i.sent(),this._npsVisualizer=new j(this.model,t),this._npsVisualizer.render(e),[2,this._npsVisualizer]}}))}))},e.prototype.destroy=function(e){this._npsVisualizer&&"function"==typeof this._npsVisualizer.dispose&&this._npsVisualizer.dispose(),this._npsVisualizer=void 0},e}(),F=function(e){function t(t,i,r,n){var s=e.call(this,t,i,r,n||"nps")||this;return s.precision=2,s._npsAdapter=new H(s),s}return(0,p.C6)(t,e),t.prototype.getCalculatedValuesCore=function(){var e=this,i={detractors:0,passive:0,promoters:0,total:0};return this.data.forEach((function(r){var n=r[e.question.name],s=parseInt(n);Number.isNaN(s)||(s<=t.DetractorScore?i.detractors++:s>=t.PromoterScore?i.promoters++:i.passive++,i.total++)})),i},t.prototype.destroyContent=function(t){this._npsAdapter.destroy(t),e.prototype.destroyContent.call(this,t)},t.prototype.renderContentAsync=function(e){return(0,p.sH)(this,void 0,void 0,(function(){var t;return(0,p.YH)(this,(function(i){switch(i.label){case 0:return t=f.gf.createElement("div"),e.appendChild(t),[4,this._npsAdapter.create(t)];case 1:return i.sent(),e.innerHTML="",e.appendChild(t),[2,e]}}))}))},t.prototype.destroy=function(){this._npsAdapter.destroy(this.contentContainer),e.prototype.destroy.call(this)},t.DetractorScore=6,t.PromoterScore=9,t}(c.w),G=i(582),Y=i(472)},388:e=>{e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><path d="M8,0L0,15h16L8,0z M9,13H7v-2h2V13z M7,10V5h2v5H7z"></path></svg>'},391:(e,t,i)=>{"use strict";i.d(t,{z:()=>r});var r={groupButton:"Group By Me",ungroupButton:"Ungroup By Me",selectButton:"Select Me",hideColumn:"Hide column",showColumn:"Show column",makePrivateColumn:"Make column private",makePublicColumn:"Make column public",moveToDetail:"Move to Detail",showAsColumn:"Show as Column",filterPlaceholder:"Search...",removeRows:"Remove rows",showLabel:"Show",entriesLabel:"entries",visualizer_text:"Texts in table",visualizer_wordcloud:"Wordcloud",visualizer_histogram:"Histogram",visualizer_number:"Average",visualizer_choices:"Table",visualizer_selectBase:"Chart",visualizer_matrix:"Chart",chartType_bar:"Bar",chartType_vbar:"Vertical Bar",chartType_stackedbar:"Stacked Bar",chartType_doughnut:"Doughnut",chartType_pie:"Pie",chartType_scatter:"Scatter",chartType_gauge:"Gauge",chartType_bullet:"Bullet",chartType_line:"Line",chartType_radar:"Radar",hideButton:"Hide",makePrivateButton:"Make private",makePublicButton:"Make public",showButton:"Show",filter:"Filter",resetFilter:"Reset Filter",changeLocale:"Change Locale",clearButton:"Clear",addElement:"Choose question to show...",defaultOrder:"Default Order",ascOrder:"Ascending",descOrder:"Descending",showMinorColumns:"Show minor columns",actionsColumn:"Actions",otherCommentTitle:"Other items and comments",showPercentages:"Show percentages",hidePercentages:"Hide percentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV",saveDiagramAsPNG:"Download plot as a PNG file",hideEmptyAnswers:"Hide empty answers",showEmptyAnswers:"Show empty answers","topNValueText-1":"All answers",topNValueText5:"Top 5 answers",topNValueText10:"Top 10 answers",topNValueText20:"Top 20 answers",hideMissingAnswers:"Hide missing answers",showMissingAnswers:"Show missing answers",missingAnswersLabel:"Missing answers",noVisualizerForQuestion:"This question type is not visualized yet",noResults:"There are no results yet",showPerValues:"Per Values",showPerColumns:"Per Columns",answer:"Answer",correctAnswer:"Correct answer: ",percent:"Percent",percentage:"Percentage",statistics_chart:"Chart",responses:"Responses",visualizer_nps:"NPS",npsScore:"NPS",npsPromoters:"Promoters",npsPassives:"Passives",npsDetractors:"Detractors",axisXSelectorTitle:"X axis:",axisYSelectorTitle:"Y axis:"}},452:e=>{e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve"><g><circle cx="6" cy="5" r="3"></circle><path d="M10,5c0,0.34-0.06,0.67-0.14,0.99C9.91,5.99,9.95,6,10,6c1.66,0,3-1.34,3-3s-1.34-3-3-3 C8.97,0,8.07,0.52,7.53,1.3C8.98,1.91,10,3.33,10,5z"></path><path d="M6,9c-3.31,0-6,2.73-6,4.67S3.27,16,6,16s6-0.4,6-2.33S9.31,9,6,9z"></path><path d="M10,7C9.81,7,9.62,7.01,9.43,7.03C9.09,7.6,8.62,8.07,8.06,8.42c3,0.83,5.23,3.31,5.42,5.28 c1.44-0.31,2.52-0.92,2.52-2.03C16,9.74,13.31,7,10,7z"></path></g></svg>'},472:(e,t,i)=>{"use strict";i.d(t,{y:()=>h});var r=i(87),n=i(156),s=i(183),o=i(70),a=i(267),l=i(240),u=i(557),h=function(e){function t(t,i,r,n){var s=e.call(this,null,i,r,n||"pivot")||this;return s.questions=t,s.valueType="enum",s._cachedValues=void 0,s._continiousData=void 0,s._cachedIntervals=void 0,s._intervalPrecision=2,s.axisYSelectors=[],s.axisYQuestionNames=[],s.questionsY=[],s.questions=s.questions.filter((function(e){return-1===["matrixdropdown","matrixdynamic","matrix","file","signature","multipletext","comment","html","image"].indexOf(e.getType())})),void 0!==s.options.intervalPrecision&&(s._intervalPrecision=s.options.intervalPrecision),s.axisXQuestionName=s.questions.length>0?s.questions[0].name:void 0,s.registerToolbarItem("axisXSelector",(function(){return s.axisXSelector=o.gf.createSelector(s.questions.map((function(e){return{value:e.name,text:e.title||e.name}})),(function(e){return s.axisXQuestionName===e.value}),(function(e){s.axisXQuestionName=e.target.value,s.setupPivot()}),l.q.getString("axisXSelectorTitle"))})),s.registerToolbarItem("axisYSelector0",s.createYSelecterGenerator()),s.setupPivot(),s}return(0,r.C6)(t,e),t.prototype.createYSelecterGenerator=function(){var e=this,t=this.axisYSelectors.length;return function(){var i=e.axisYSelectors[t];return i||(i=e.createAxisYSelector(t),e.axisYSelectors.push(i)),i}},t.prototype.setAxisQuestions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];e.length<1||(this.axisXQuestionName=e[0],this.axisYQuestionNames=e.splice(1),this.setupPivot())},t.prototype.onAxisYSelectorChanged=function(e,t){if(this.axisYQuestionNames[e]=t,e<this.axisYSelectors.length-1){if(!t){for(var i=e+1;i<this.axisYSelectors.length;++i)this.unregisterToolbarItem("axisYSelector"+i);this.axisYSelectors=this.axisYSelectors.slice(0,e+1),this.axisYQuestionNames=this.axisYQuestionNames.slice(0,e+1),this.updateToolbar()}}else t&&(this.registerToolbarItem("axisYSelector"+this.axisYSelectors.length,this.createYSelecterGenerator()),this.updateToolbar());this.setupPivot()},t.prototype.createAxisYSelector=function(e){var t=this;return o.gf.createSelector([{value:"",text:"Not selected"}].concat(this.questions.map((function(e){return{value:e.name,text:e.title||e.name}}))),(function(i){return t.axisYQuestionNames[e]===i.value}),(function(i){t.onAxisYSelectorChanged(e,i.target.value)}),e?void 0:l.q.getString("axisYSelectorTitle"))},t.prototype.getQuestionValueType=function(e){var t=e.getType();return"text"!==t||"date"!==e.inputType&&"datetime"!==e.inputType?"text"===t||"rating"===t||"expression"===t||"range"===t?"number":"enum":"date"},t.prototype.setupPivot=function(){var e=this,t=this.questions.filter((function(t){return t.name===e.axisXQuestionName}))[0];t&&(this.question=t,this.valueType=this.getQuestionValueType(t),this.questionsY=this.axisYQuestionNames.map((function(t){var i=e.questions.filter((function(e){return e.name===t}))[0];if(i)return"enum"===e.getQuestionValueType(i)?new s.o(i,[]):new a.w(i,[])})).filter((function(e){return!!e})),this.onDataChanged())},t.prototype.reset=function(){this._continiousData=void 0,this._cachedValues=void 0,this._cachedIntervals=void 0},t.prototype.getContiniousValue=function(e){return"date"===this.valueType?Date.parse(e):parseFloat(e)},t.prototype.getString=function(e){return"date"===this.valueType?new Date(e).toLocaleDateString():""+e},t.prototype.toPrecision=function(e){var t=Math.pow(10,this._intervalPrecision);return Math.round(t*e)/t},t.prototype.getSelectedItemByText=function(e){if(this.hasCustomIntervals||this.getContiniousValues().length>t.UseIntervalsFrom){var i=this.intervals.filter((function(t){return t.label===e}))[0];return new n.ItemValue(i,void 0!==i?i.label:"")}var r=this.getLabels(),s=r.indexOf(e);return new n.ItemValue(this.getValues()[s],r[s])},t.prototype.updateData=function(t){this.reset(),e.prototype.updateData.call(this,t)},t.prototype.onDataChanged=function(){this.reset(),e.prototype.onDataChanged.call(this)},t.prototype.getContiniousValues=function(){var e=this;if(void 0===this._cachedValues){if(this._continiousData=[],"enum"===this.valueType)return this._cachedValues=[],this._cachedValues;var t={};this.data.forEach((function(i){var r=i[e.name];void 0!==r&&(e._continiousData.push({continious:e.getContiniousValue(r),row:i}),t[r]={value:r,row:i})})),this._cachedValues=Object.keys(t).map((function(i){return{original:t[i].value,continious:e.getContiniousValue(i),row:t[i].row}})),this._cachedValues.sort((function(e,t){return e.continious-t.continious}))}return this._cachedValues},t.prototype.isSupportAnswersOrder=function(){return!1},t.prototype.isSupportMissingAnswers=function(){return!1},Object.defineProperty(t.prototype,"needUseRateValues",{get:function(){return"rating"==this.question.getType()&&Array.isArray(this.question.rateValues)&&this.question.rateValues.length>0},enumerable:!1,configurable:!0}),t.prototype.getSeriesValues=function(){var e=this;if(!this.questionsY||0===this.questionsY.length)return this.options.seriesValues||[];var t=[];return this.questionsY.forEach((function(i){"enum"===e.getQuestionValueType(i.question)?t.push.apply(t,i.getValues().reverse()):t.push(i.question.name)})),t},t.prototype.getSeriesLabels=function(){var e=this;if(0===this.questionsY.length)return this.getSeriesValues();var t=[];return this.questionsY.forEach((function(i){"enum"===e.getQuestionValueType(i.question)?t.push.apply(t,i.getLabels().reverse()):t.push(i.question.title||i.question.name)})),t},t.prototype.getValues=function(){return"enum"===this.valueType?e.prototype.getValues.call(this).reverse():this.intervals.map((function(e){return e.start}))},t.prototype.getLabels=function(){return"enum"===this.valueType?e.prototype.getLabels.call(this).reverse():this.intervals.map((function(e){return e.label}))},Object.defineProperty(t.prototype,"hasCustomIntervals",{get:function(){return!!this.questionOptions&&Array.isArray(this.questionOptions.intervals)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"intervals",{get:function(){if(this.hasCustomIntervals)return this.questionOptions.intervals;if("rating"==this.question.getType()){if(this.needUseRateValues){var e=this.question.rateValues;return e.sort((function(e,t){return e.value-t.value})),e.map((function(t,i){return{start:t.value,end:i<e.length-1?e[i+1].value:t.value+1,label:t.text}}))}for(var i=[],r=this.question.rateMin||0;r<=(this.question.rateMax||t.IntervalsCount-1);r+=this.question.rateStep||1)i.push({start:r,end:r+1,label:""+(this.question.rateMin&&this.question.rateMax?r:r+"-"+(r+1))});return i}if(void 0===this._cachedIntervals){var n=this.getContiniousValues();if(this._cachedIntervals=[],n.length){var s=n[0].continious,o=n[n.length-1].continious,a=t.IntervalsCount,l=(o-s)/a;for(r=0;r<a;++r){var u=s+l,h=this.toPrecision(s),c=this.toPrecision(u);this._cachedIntervals.push({start:h,end:r<a-1?c:c+l/100,label:this.getString(h)+"-"+this.getString(c)}),s=u}}}return this._cachedIntervals},enumerable:!1,configurable:!0}),t.prototype.convertFromExternalData=function(e){return[e]},t.prototype.getSeriesValueIndexes=function(){for(var e=this,t={},i=0,r=0;r<this.questionsY.length;++r)"enum"===this.getQuestionValueType(this.questionsY[r].question)?this.questionsY[r].getValues().reverse().forEach((function(n){t[e.questionsY[r].name+"_"+n]=i++})):t[this.questionsY[r].name]=i++;return t},t.prototype.updateStatisticsSeriesValue=function(e,t,i,r){for(var n=0;n<this.questionsY.length;++n)if(void 0!==t[this.questionsY[n].name]){var s=this.getQuestionValueType(this.questionsY[n].question);"enum"===s||"date"===s?e[r[this.questionsY[n].name+"_"+t[this.questionsY[n].name]]][i]++:e[r[this.questionsY[n].name]][i]+=parseFloat(t[this.questionsY[n].name])}},t.prototype.getCalculatedValuesCore=function(){var e=this,t=[],i=this.getSeriesValues();0===i.length&&i.push("");var r=this.getSeriesValueIndexes();if("enum"===this.valueType){var n=this.getValues(),s={};n.forEach((function(e,t){s[e]=t}));for(var o=0;o<i.length;++o)t.push(n.map((function(e){return 0})));this.data.forEach((function(i){var n=i[e.name];if(void 0!==n&&void 0!==s[n]){var o=s[n];0===e.questionsY.length?t[0][o]++:e.updateStatisticsSeriesValue(t,i,o,r)}}))}else{this.getContiniousValues();var a=this.intervals;for(o=0;o<i.length;++o)t.push(a.map((function(e){return 0})));this._continiousData.forEach((function(i){for(var n=0;n<a.length;++n)if(a[n].start<=i.continious&&(i.continious<a[n].end||n==a.length-1)){0===e.questionsY.length?t[0][n]++:e.updateStatisticsSeriesValue(t,i.row,n,r);break}}))}return t},t.prototype.getValueType=function(){return this.valueType},t.prototype.isSupportSoftUpdateContent=function(){return!1},t.IntervalsCount=10,t.UseIntervalsFrom=10,t}(s.o);u.g.registerPivotVisualizer(h)},555:(e,t,i)=>{"use strict";i.d(t,{M:()=>n});var r=i(156),n=function(){function e(e){void 0===e&&(e=[]),this._data=e,this.filterValues={},this.onDataChanged=new r.Event}return Object.defineProperty(e.prototype,"data",{get:function(){if(Array.isArray(this._data))return this._data},set:function(e){Array.isArray(e)?this._data=[].concat(e):this._data=e,this.raiseDataChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataFn",{get:function(){if("function"==typeof this._data)return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"filteredData",{get:function(){var t=this;return void 0===this._filteredData&&(Object.keys(this.filterValues).length>0?this._filteredData=this.data.filter((function(i){return!Object.keys(t.filterValues).some((function(r){var n=t.filterValues[r],s=typeof n,o=i[r];if(Array.isArray(o)&&"object"!==s)return-1==o.indexOf(n);if("object"==typeof o)return"object"!==s||!function(e,t){var i=Object.keys(e),r=Object.keys(t);if(r.length>i.length)return!1;for(var n=0,s=r;n<s.length;n++){var o=s[n];if(t[o]!=e[o])return!1}return!0}(o,n);var a=i[e.seriesMarkerKey];if(a&&"object"===s)return o!==n[a];if("object"===s&&void 0!==n.start&&void 0!==n.end){var l="number"==typeof o?o:Date.parse(o);return!(!isNaN(l)||(l=parseFloat(o),!isNaN(l)))||l<n.start||l>=n.end}return i[r]!==t.filterValues[r]}))})):this._filteredData=this.data),this._filteredData},enumerable:!1,configurable:!0}),e.prototype.setFilter=function(e,t){var i=!0;void 0!==t?(i=this.filterValues[e]!==t,this.filterValues[e]=t):(i=void 0!==this.filterValues[e],delete this.filterValues[e]),i&&this.raiseDataChanged()},e.prototype.raiseDataChanged=function(e){this._filteredData=void 0,this.onDataChanged.isEmpty||this.onDataChanged.fire(this,{questionName:e})},e.prototype.getFilters=function(){var e=this;return Object.keys(this.filterValues).map((function(t){return{field:t,type:"=",value:e.filterValues[t]}}))},e.seriesMarkerKey="__sa_series_name",e}()},557:(e,t,i)=>{"use strict";i.d(t,{g:()=>r});var r=function(){function e(){}return e.registerVisualizer=function(t,i,r){void 0===r&&(r=Number.MAX_VALUE);var n=e.vizualizers[t];n||(n=[],e.vizualizers[t]=n),n.push({ctor:i,index:r})},e.unregisterVisualizer=function(t,i){var r=[t];t||(r=Object.keys(e.vizualizers)),r.forEach((function(t){if(i){var r=e.vizualizers[t];if(r){var n=r.filter((function(e){return e.ctor===i||e.ctor.isPrototypeOf(i)}))[0];if(n){var s=r.indexOf(n);-1!==s&&r.splice(s,1)}}}else e.vizualizers[t]=[]}))},e.unregisterVisualizerForAll=function(t){e.unregisterVisualizer(void 0,t)},e.getVisualizersByType=function(t){var i=e.vizualizers[t];return i?((i=[].concat(i)).sort((function(e,t){return e.index-t.index})),i.map((function(e){return e.ctor}))):e.defaultVisualizer.suppressVisualizerStubRendering?[]:[e.defaultVisualizer]},e.getAltVisualizerSelector=function(){return e.alternativesVisualizer||e.defaultVisualizer},e.registerAltVisualizerSelector=function(t){e.alternativesVisualizer=t},e.getPivotVisualizerConstructor=function(){return e.pivotVisualizer||e.defaultVisualizer},e.registerPivotVisualizer=function(t){e.pivotVisualizer=t},e.defaultVisualizer=void 0,e.alternativesVisualizer=void 0,e.pivotVisualizer=void 0,e.vizualizers={},e}()},582:(e,t,i)=>{"use strict";i.d(t,{O:()=>s});var r=i(87),n=i(557),s=function(e){function t(t,i,r,n){return e.call(this,t,i,r,n||"ranking")||this}return(0,r.C6)(t,e),t.prototype.getQuestionResults=function(){var e=this.question.name;return this.data.map((function(t){return t[e]}))},t.prototype.getEmptyData=function(){var e=this.getValues(),t=[];return t.length=e.length,t.fill(0),t},t.prototype.getCalculatedValuesCore=function(){var e=this,t=this.getQuestionResults(),i=this.getValues(),r=this.getEmptyData();return t.forEach((function(t){e.applyResultToPlotlyData(t,r,i)})),[r]},t.prototype.applyResultToPlotlyData=function(e,t,i){e&&t&&i&&e.forEach((function(e,r,n){var s=i.indexOf(e);t[s]=+t[s]+(n.length-r)}))},t}(i(183).o);n.g.registerVisualizer("ranking",s)},637:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><circle cx="1.5" cy="14.5" r="1.5"></circle><circle cx="7.5" cy="14.5" r="1.5"></circle><circle cx="13.5" cy="14.5" r="1.5"></circle><rect x="12" y="1" width="3" height="9"></rect><path d="M2.02,7.02L1,6L0,7l3,3l3-3L5,6L4.06,6.94C4.33,4.73,6.21,3,8.5,3C8.67,3,8.83,3.03,9,3.05V1.03 C8.83,1.01,8.67,1,8.5,1C5.08,1,2.27,3.66,2.02,7.02z"></path></g></svg>'},782:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><circle cx="1.5" cy="8.5" r="1.5"></circle><circle cx="7.5" cy="8.5" r="1.5"></circle><circle cx="13.5" cy="8.5" r="1.5"></circle></g></svg>'},818:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});var r=i(557),n=function(){function e(){}return e.createVisualizer=function(e,t,i){var n;n="text"===e.getType()&&e.inputType?e.inputType:e.getType();var s=r.g.getVisualizersByType(n).map((function(r){return new r(e,t,i)}));return s.length>1?new(r.g.getAltVisualizerSelector())(s,e,t,i):s[0]},e}()},820:function(e){e.exports=function(){"use strict";var e={},t="swap",i="move",r="layoutStart",n="layoutEnd",s="remove",o="filter",a="sort",l="move",u="send",h="beforeSend",c="receive",d="beforeReceive",p="dragReleaseEnd";function g(){this._events={},this._queue=[],this._counter=0,this._isDestroyed=!1}g.prototype.on=function(e,t){if(this._isDestroyed)return this;var i=this._events[e];return i||(i=this._events[e]=[]),i.push(t),this},g.prototype.off=function(e,t){if(this._isDestroyed)return this;var i=this._events[e];if(!i||!i.length)return this;if(!t)return i.length=0,this;for(var r=i.length;r--;)t===i[r]&&i.splice(r,1);return this},g.prototype.emit=function(e,t,i,r){if(this._isDestroyed)return this;var n=this._events[e];if(!n||!n.length)return this;var s,o=this._queue,a=o.length,l=arguments.length-1;for(s=0;s<n.length;s++)o.push(n[s]);for(++this._counter,s=a,a=o.length;s<a;s++)if(0===l?o[s]():1===l?o[s](t):2===l?o[s](t,i):o[s](t,i,r),this._isDestroyed)return this;return--this._counter,this._counter||(o.length=0),this},g.prototype.destroy=function(){if(this._isDestroyed)return this;var e,t=this._events;for(e in this._isDestroyed=!0,this._queue.length=this._counter=0,t)t[e]&&(t[e].length=0,t[e]=void 0);return this};var f="transform",m="transform",v=window.document.documentElement.style,_="transform",y=!1;["","Webkit","Moz","O","ms"].forEach((function(e){if(!y){var t=e?e+"Transform":_;void 0!==v[t]&&(e=e.toLowerCase(),f=e?"-"+e+"-"+_:_,m=t,y=!0)}}));var b="function"==typeof WeakMap?new WeakMap:null;function w(e,t){var i=b&&b.get(e);return i||(i=window.getComputedStyle(e,null),b&&b.set(e,i)),i.getPropertyValue("transform"===t?f:t)}var C=/([A-Z])/g;function T(e){return e.replace(C,"-$1").toLowerCase()}function x(e){return"function"==typeof e}function P(e,t){for(var i in t)e.style["transform"===i?m:i]=t[i]}function S(e){this._element=e,this._animation=null,this._callback=null,this._props=[],this._values=[],this._keyframes=[],this._options={},this._isDestroyed=!1,this._onFinish=this._onFinish.bind(this)}S.prototype.start=function(e,t,i){if(!this._isDestroyed){var r=this._animation,n=this._props,s=this._values,o=i||0,a=!1;if(r){var l,u=0;for(var h in t)if(++u,-1===(l=n.indexOf(h))||t[h]!==s[l]){a=!0;break}a||u===n.length||(a=!0)}if(a&&r.cancel(),this._callback=x(o.onFinish)?o.onFinish:null,!r||a){for(h in n.length=s.length=0,t)n.push(h),s.push(t[h]);var c=this._keyframes;c[0]=e,c[1]=t;var d=this._options;d.duration=o.duration||300,d.easing=o.easing||"ease";var p=this._element;(r=p.animate(c,d)).onfinish=this._onFinish,this._animation=r,P(p,t)}}},S.prototype.stop=function(e){if(!this._isDestroyed&&this._animation){var t,i,r,n=this._element,s=this._props,o=this._values;if(e)P(n,e);else for(r=0;r<s.length;r++)i=w(n,T(t=s[r])),n.style["transform"===t?m:t]=i;this._animation.cancel(),this._animation=this._callback=null,s.length=o.length=0}},S.prototype.isAnimating=function(){return!!this._animation},S.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=this._options=this._keyframes=null,this._isDestroyed=!0)},S.prototype._onFinish=function(){var e=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,e&&e()};var k=["","webkit","moz","ms","o","Webkit","Moz","MS","O"];function A(e,t){for(var i,r,n=t[0].toUpperCase()+t.slice(1),s=0;s<k.length;){if((r=(i=k[s])?i+n:t)in e)return r;++s}return null}var D=1e3/60,E=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return this.setTimeout((function(){e(D)}),D)}).bind(window),V=!1;try{var z=Object.defineProperty({},"passive",{get:function(){V=!0}});window.addEventListener("testPassive",null,z),window.removeEventListener("testPassive",null,z)}catch(e){}var M="start",L="move",O="end",B="cancel",N=!(!("ontouchstart"in window)&&!window.TouchEvent),q=!!window.PointerEvent,R=!!window.navigator.msPointerEnabled,I=/(android)/i.test(window.navigator.userAgent),j=!!V&&{passive:!0},H="touchAction",F=A(window.document.documentElement.style,H);function G(e,t){this._element=e,this._emitter=new g,this._isDestroyed=!1,this._cssProps={},this._touchAction="",this._startEvent=null,this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._preStartCheck=this._preStartCheck.bind(this),this._abortNonCancelable=this._abortNonCancelable.bind(this),this._onStart=this._onStart.bind(this),this._onMove=this._onMove.bind(this),this._onCancel=this._onCancel.bind(this),this._onEnd=this._onEnd.bind(this),this.setCssProps(t),this._touchAction||this.setTouchAction("auto"),e.addEventListener("dragstart",G._preventDefault,!1),e.addEventListener(G._events.start,this._preStartCheck,j),!N||q||R||e.addEventListener(G._mouseEvents.start,this._preStartCheck,j)}function Y(){this._nextStep=null,this._queue=[],this._reads={},this._writes={},this._batch=[],this._batchReads={},this._batchWrites={},this._step=this._step.bind(this)}G._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},G._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},G._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},G._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},G._events=q?G._pointerEvents:R?G._msPointerEvents:N?G._touchEvents:G._mouseEvents,G._emitter=new g,G._activeInstances=[],G._preventDefault=function(e){e.preventDefault&&!1!==e.cancelable&&e.preventDefault()},G._activateInstance=function(e){G._activeInstances.indexOf(e)>-1||(G._activeInstances.push(e),G._emitter.on(L,e._onMove),G._emitter.on(B,e._onCancel),G._emitter.on(O,e._onEnd),1===G._activeInstances.length&&G._bindListeners())},G._deactivateInstance=function(e){var t=G._activeInstances.indexOf(e);-1!==t&&(G._activeInstances.splice(t,1),G._emitter.off(L,e._onMove),G._emitter.off(B,e._onCancel),G._emitter.off(O,e._onEnd),G._activeInstances.length||G._unbindListeners())},G._bindListeners=function(){var e=G._events;window.addEventListener(e.move,G._onMove,j),window.addEventListener(e.end,G._onEnd,j),e.cancel&&window.addEventListener(e.cancel,G._onCancel,j)},G._unbindListeners=function(){var e=G._events;window.removeEventListener(e.move,G._onMove,j),window.removeEventListener(e.end,G._onEnd,j),e.cancel&&window.removeEventListener(e.cancel,G._onCancel,j)},G._getEventPointerId=function(e){return"number"==typeof e.pointerId?e.pointerId:e.changedTouches?e.changedTouches[0]?e.changedTouches[0].identifier:null:1},G._getTouchById=function(e,t){if("number"==typeof e.pointerId)return e.pointerId===t?e:null;if(e.changedTouches){for(var i=0;i<e.changedTouches.length;i++)if(e.changedTouches[i].identifier===t)return e.changedTouches[i];return null}return e},G._onMove=function(e){G._emitter.emit(L,e)},G._onCancel=function(e){G._emitter.emit(B,e)},G._onEnd=function(e){G._emitter.emit(O,e)},G.prototype._reset=function(){this._isDestroyed||(this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._startEvent=null,this._element.removeEventListener(G._touchEvents.start,this._abortNonCancelable,j),G._deactivateInstance(this))},G.prototype._createEvent=function(e,t){var i=this._getTrackedTouch(t);return{type:e,srcEvent:t,distance:this.getDistance(),deltaX:this.getDeltaX(),deltaY:this.getDeltaY(),deltaTime:e===M?0:this.getDeltaTime(),isFirst:e===M,isFinal:e===O||e===B,identifier:this._pointerId,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY,pageX:i.pageX,pageY:i.pageY,target:i.target}},G.prototype._emit=function(e,t){this._emitter.emit(e,this._createEvent(e,t))},G.prototype._getTrackedTouch=function(e){return null===this._pointerId?null:G._getTouchById(e,this._pointerId)},G.prototype._preStartCheck=function(e){this._isDestroyed||this.isDragging()||I&&!1===e.cancelable||e.button||(this._pointerId=G._getEventPointerId(e),null!==this._pointerId&&(this._startEvent=e,N&&(q||R)?(I&&this._element.addEventListener(G._touchEvents.start,this._abortNonCancelable,j),E(this._onStart)):this._onStart()))},G.prototype._abortNonCancelable=function(e){this._element.removeEventListener(G._touchEvents.start,this._abortNonCancelable,j),this._startEvent&&!1===e.cancelable&&(this._pointerId=null,this._startEvent=null)},G.prototype._onStart=function(){var e=this._startEvent;if(e){this._startEvent=null;var t=this._getTrackedTouch(e);t&&(this._startX=this._currentX=t.clientX,this._startY=this._currentY=t.clientY,this._startTime=Date.now(),this._emit(M,e),G._activateInstance(this))}},G.prototype._onMove=function(e){var t=this._getTrackedTouch(e);t&&(this._currentX=t.clientX,this._currentY=t.clientY,this._emit(L,e))},G.prototype._onCancel=function(e){this._getTrackedTouch(e)&&(this._emit(B,e),this._reset())},G.prototype._onEnd=function(e){this._getTrackedTouch(e)&&(this._emit(O,e),this._reset())},G.prototype.isDragging=function(){return null!==this._pointerId},G.prototype.setTouchAction=function(e){this._touchAction=e,F&&(this._cssProps[F]="",this._element.style[F]=e),N&&(this._element.removeEventListener(G._touchEvents.start,G._preventDefault,!1),this._element.style[F]!==e&&this._element.addEventListener(G._touchEvents.start,G._preventDefault,!1))},G.prototype.setCssProps=function(e){if(e){var t,i,r=this._cssProps,n=this._element;for(t in r)n.style[t]=r[t],delete r[t];for(t in e)e[t]&&(t!==H?(i=A(n.style,t))&&(r[i]="",n.style[i]=e[t]):this.setTouchAction(e[t]))}},G.prototype.getDeltaX=function(){return this._currentX-this._startX},G.prototype.getDeltaY=function(){return this._currentY-this._startY},G.prototype.getDistance=function(){var e=this.getDeltaX(),t=this.getDeltaY();return Math.sqrt(e*e+t*t)},G.prototype.getDeltaTime=function(){return this._startTime?Date.now()-this._startTime:0},G.prototype.on=function(e,t){this._emitter.on(e,t)},G.prototype.off=function(e,t){this._emitter.off(eventName,t)},G.prototype.destroy=function(){if(!this._isDestroyed){var e=this._element,t=G._events;for(var i in this._reset(),this._emitter.destroy(),e.removeEventListener(t.start,this._preStartCheck,j),e.removeEventListener(G._mouseEvents.start,this._preStartCheck,j),e.removeEventListener("dragstart",G._preventDefault,!1),e.removeEventListener(G._touchEvents.start,G._preventDefault,!1),this._cssProps)e.style[i]=this._cssProps[i],delete this._cssProps[i];this._element=null,this._isDestroyed=!0}},Y.prototype.add=function(e,t,i,r){var n=this._queue.indexOf(e);n>-1&&(this._queue[n]=void 0),r?this._queue.unshift(e):this._queue.push(e),this._reads[e]=t,this._writes[e]=i,this._nextStep||(this._nextStep=E(this._step))},Y.prototype.cancel=function(e){var t=this._queue.indexOf(e);t>-1&&(this._queue[t]=void 0,delete this._reads[e],delete this._writes[e])},Y.prototype._step=function(){var e,t,i=this._queue,r=this._reads,n=this._writes,s=this._batch,o=this._batchReads,a=this._batchWrites,l=i.length;for(this._nextStep=null,t=0;t<l;t++)(e=i[t])&&(s.push(e),o[e]=r[e],delete r[e],a[e]=n[e],delete n[e]);for(i.length=0,t=0;t<l;t++)o[e=s[t]]&&(o[e](),delete o[e]);for(t=0;t<l;t++)a[e=s[t]]&&(a[e](),delete a[e]);s.length=0,!this._nextStep&&i.length&&(this._nextStep=E(this._step))};var Q=new Y,X="layout",W="visibility",U="move",K="scroll",Z="placeholder";function J(e){return Q.cancel(e+W)}function $(e){return Q.cancel(e+U)}function ee(e){return Q.cancel(e+K)}function te(e){return Q.cancel(e+Z)}var ie=window.Element.prototype,re=ie.matches||ie.matchesSelector||ie.webkitMatchesSelector||ie.mozMatchesSelector||ie.msMatchesSelector||ie.oMatchesSelector||function(){return!1};function ne(e,t){return re.call(e,t)}function se(e,t){e.classList?e.classList.add(t):ne(e,"."+t)||(e.className+=" "+t)}var oe=[];function ae(e,t,i){var r="number"==typeof i?i:-1;r<0&&(r=e.length-r+1),e.splice.apply(e,oe.concat(r,0,t)),oe.length=0}function le(e,t,i){var r=e.length,n=Math.max(0,i?r:r-1);return t>n?n:t<0?Math.max(n+t+1,0):t}function ue(e,t,i){if(!(e.length<2)){var r=le(e,t),n=le(e,i);r!==n&&e.splice(n,0,e.splice(r,1)[0])}}function he(e,t,i){if(!(e.length<2)){var r,n=le(e,t),s=le(e,i);n!==s&&(r=e[n],e[n]=e[s],e[s]=r)}}var ce="cancel",de="finish",pe=0;function ge(e,t){var i,r=++pe+"debounce";return t>0?function(n){void 0!==i&&(i=window.clearTimeout(i),Q.cancel(r),n===de&&e()),n!==ce&&n!==de&&(i=window.setTimeout((function(){i=void 0,Q.add(r,e,null,!0)}),t))}:function(t){t!==ce&&e()}}function fe(e){var t=w(e,"transform");if(!t||"none"===t)return!1;var i=w(e,"display");return"inline"!==i&&"none"!==i}function me(e,t){for(var i=window.document,r=(t?e:e.parentElement)||i;r&&r!==i&&"static"===w(r,"position")&&!fe(r);)r=r.parentElement||i;return r}function ve(e,t){return parseFloat(w(e,t))||0}var _e={},ye={},be={};function we(e,t){var i,r=t||{};return r.left=0,r.top=0,e===document||(r.left=window.pageXOffset||0,r.top=window.pageYOffset||0,e.self===window.self||(i=e.getBoundingClientRect(),r.left+=i.left,r.top+=i.top,r.left+=ve(e,"border-left-width"),r.top+=ve(e,"border-top-width"))),r}function Ce(e,t,i){return be.left=0,be.top=0,e===t||i&&(e=me(e,!0))===(t=me(t,!0))||(we(e,_e),we(t,ye),be.left=ye.left-_e.left,be.top=ye.top-_e.top),be}var Te="auto",xe="scroll";function Pe(e){var t=w(e,"overflow");return t===Te||t===xe||(t=w(e,"overflow-x"))===Te||t===xe||(t=w(e,"overflow-y"))===Te||t===xe}function Se(e,t,i){for(var r=i||[],n=t?e:e.parentNode;n&&n!==document;)n.getRootNode&&n instanceof DocumentFragment?n=n.getRootNode().host:(Pe(n)&&r.push(n),n=n.parentNode);return r.push(window),r}var ke={},Ae=/^matrix3d/,De=/([^,]*,){4}/,Ee=/([^,]*,){12}/,Ve=/[^,]*,/;function ze(e){ke.x=0,ke.y=0;var t=w(e,"transform");if(!t||"none"===t)return ke;var i=Ae.test(t),r=t.replace(i?Ee:De,""),n=r.replace(Ve,"");return ke.x=parseFloat(r)||0,ke.y=parseFloat(n)||0,ke}function Me(e,t){return"translateX("+e+"px) translateY("+t+"px)"}function Le(e,t){e.classList?e.classList.remove(t):ne(e,"."+t)&&(e.className=(" "+e.className+" ").replace(" "+t+" "," ").trim())}var Oe,Be,Ne,qe;function Re(e){var t=e._element,i=e.getGrid(),r=i._settings;this._item=e,this._gridId=i._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=x(r.dragStartPredicate)?r.dragStartPredicate:Re.defaultStartPredicate,this._startPredicateState=0,this._startPredicateResult=void 0,this._hBlockedIndex=null,this._hX1=0,this._hX2=0,this._hY1=0,this._hY2=0,this._reset(),this._preStartCheck=this._preStartCheck.bind(this),this._preEndCheck=this._preEndCheck.bind(this),this._onScroll=this._onScroll.bind(this),this._prepareMove=this._prepareMove.bind(this),this._applyMove=this._applyMove.bind(this),this._prepareScroll=this._prepareScroll.bind(this),this._applyScroll=this._applyScroll.bind(this),this._checkOverlap=this._checkOverlap.bind(this);var n=r.dragSortHeuristics.sortInterval;this._checkOverlapDebounce=ge(this._checkOverlap,n),this._dragger=new G(t,r.dragCssProps),this._dragger.on("start",this._preStartCheck),this._dragger.on("move",this._preStartCheck),this._dragger.on("cancel",this._preEndCheck),this._dragger.on("end",this._preEndCheck)}function Ie(e,t){return e.left+e.width<=t.left||t.left+t.width<=e.left||e.top+e.height<=t.top||t.top+t.height<=e.top?0:(Math.min(e.left+e.width,t.left+t.width)-Math.max(e.left,t.left))*(Math.min(e.top+e.height,t.top+t.height)-Math.max(e.top,t.top))/(Math.min(e.width,t.width)*Math.min(e.height,t.height))*100}function je(e){this._item=e,this._animate=new S,this._element=null,this._className="",this._didMigrate=!1,this._resetAfterLayout=!1,this._currentLeft=0,this._currentTop=0,this._nextLeft=0,this._nextTop=0,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this),this._onLayoutStart=this._onLayoutStart.bind(this),this._onLayoutEnd=this._onLayoutEnd.bind(this),this._onReleaseEnd=this._onReleaseEnd.bind(this),this._onMigrate=this._onMigrate.bind(this)}function He(){this._queue=[],this._isDestroyed=!1}function Fe(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isInterrupted=!1,this._currentStyles={},this._targetStyles={},this._currentLeft=0,this._currentTop=0,this._offsetLeft=0,this._offsetTop=0,this._skipNextAnimation=!1,this._animateOptions={onFinish:this._finish.bind(this)},this._queue=new He,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}Re.defaultStartPredicate=function(e,t,i){var r=e._drag,n=r._startPredicateData||r._setupStartPredicate(i);if(!t.isFinal)return!(!n.handleElement&&(n.handleElement=r._getStartPredicateHandle(t),!n.handleElement))&&(n.delay&&(n.event=t,n.delayTimer||(n.delayTimer=window.setTimeout((function(){n.delay=0,r._resolveStartPredicate(n.event)&&(r._forceResolveStartPredicate(n.event),r._resetStartPredicate())}),n.delay))),r._resolveStartPredicate(t));r._finishStartPredicate(t)},Re.defaultSortPredicate=(Oe={},Be={},Ne={},qe=[],function(e,r){var n=e._drag,s=n._getGrid(),o=r&&"number"==typeof r.threshold?r.threshold:50,a=r&&r.action===t?t:i;Oe.width=e._width,Oe.height=e._height,Oe.left=n._elementClientX,Oe.top=n._elementClientY;var l=function(e,t,i){var r,n,s,o,a=null,l=t._settings.dragSort,u=-1;if(!0===l?(qe[0]=t,n=qe):n=l.call(t,e),!Array.isArray(n))return a;for(o=0;o<n.length;o++)(s=n[o])._isDestroyed||(s._updateBoundingRect(),Be.width=s._width,Be.height=s._height,Be.left=s._left,Be.top=s._top,(r=Ie(Oe,Be))>i&&r>u&&(u=r,a=s));return qe.length=0,a}(e,s,o);if(!l)return!1;var u,h,c,d,p,g=0,f=0,m=-1;for(l===s?(Oe.left=n._gridX+e._marginLeft,Oe.top=n._gridY+e._marginTop):(l._updateBorders(1,0,1,0),g=l._left+l._borderLeft,f=l._top+l._borderTop),p=0;p<l._items.length;p++)(c=l._items[p])._isActive&&c!==e&&(h=!0,Be.width=c._width,Be.height=c._height,Be.left=c._left+c._marginLeft+g,Be.top=c._top+c._marginTop+f,(d=Ie(Oe,Be))>m&&(u=p,m=d));return m<o&&e.getGrid()!==l&&(u=h?-1:0,m=1/0),m>=o&&(Ne.grid=l,Ne.index=u,Ne.action=a,Ne)}),Re.prototype.stop=function(){var e=this._item,t=e._element,i=this._getGrid();return this._isActive?this._isMigrating?(this._finishMigration(),this):($(e._id),ee(e._id),this._unbindScrollListeners(),this._checkOverlapDebounce("cancel"),t.parentNode!==i._element&&(i._element.appendChild(t),t.style[m]=Me(this._gridX,this._gridY)),Le(t,i._settings.itemDraggingClass),this._reset(),this):this},Re.prototype.destroy=function(){return this._isDestroyed||(this.stop(),this._dragger.destroy(),this._isDestroyed=!0),this},Re.prototype._getGrid=function(){return e[this._gridId]||null},Re.prototype._reset=function(){this._isActive=!1,this._container=null,this._containingBlock=null,this._dragEvent=null,this._scrollEvent=null,this._scrollers=[],this._left=0,this._top=0,this._gridX=0,this._gridY=0,this._elementClientX=0,this._elementClientY=0,this._containerDiffX=0,this._containerDiffY=0},Re.prototype._bindScrollListeners=function(){var e,t,i=this._getGrid()._element,r=this._container,n=this._scrollers;if(n.length=0,Se(this._item._element,!1,n),r!==i)for(Se(i,!0,e=[]),t=0;t<e.length;t++)n.indexOf(e[t])<0&&n.push(e[t]);for(t=0;t<n.length;t++)n[t].addEventListener("scroll",this._onScroll)},Re.prototype._unbindScrollListeners=function(){var e,t=this._scrollers;for(e=0;e<t.length;e++)t[e].removeEventListener("scroll",this._onScroll);t.length=0},Re.prototype._setupStartPredicate=function(e){var t=e||this._getGrid()._settings.dragStartPredicate||0;return this._startPredicateData={distance:Math.abs(t.distance)||0,delay:Math.max(t.delay,0)||0,handle:"string"==typeof t.handle&&t.handle}},Re.prototype._getStartPredicateHandle=function(e){var t=this._startPredicateData,i=this._item._element,r=i;if(!t.handle)return r;for(r=e.target;r&&!ne(r,t.handle);)r=r!==i?r.parentElement:null;return r||null},Re.prototype._resolveStartPredicate=function(e){var t=this._startPredicateData;if(!(e.distance<t.distance||t.delay)){var i=t.handleElement.getBoundingClientRect(),r=i.left+(window.pageXOffset||0),n=i.top+(window.pageYOffset||0),s=i.width,o=i.height;return this._resetStartPredicate(),s&&o&&e.pageX>=r&&e.pageX<r+s&&e.pageY>=n&&e.pageY<n+o}},Re.prototype._forceResolveStartPredicate=function(e){this._isDestroyed||1!==this._startPredicateState||(this._startPredicateState=2,this._onStart(e))},Re.prototype._finishStartPredicate=function(e){var t=this._item._element,i=Math.abs(e.deltaX)<2&&Math.abs(e.deltaY)<2&&e.deltaTime<200;this._resetStartPredicate(),i&&function(e){if("a"===e.tagName.toLowerCase()){var t=e.getAttribute("href");if(t){var i=e.getAttribute("target");i&&"_self"!==i?window.open(t,i):window.location.href=t}}}(t)},Re.prototype._resetHeuristics=function(e){this._hBlockedIndex=null,this._hX1=this._hX2=e.clientX,this._hY1=this._hY2=e.clientY},Re.prototype._checkHeuristics=function(e){var t=this._getGrid()._settings.dragSortHeuristics,i=t.minDragDistance;if(i<=0)return this._hBlockedIndex=null,!0;var r=e.clientX,n=e.clientY,s=r-this._hX2,o=n-this._hY2,a=i>3&&t.minBounceBackAngle>0;if(a||(this._hBlockedIndex=null),Math.abs(s)>i||Math.abs(o)>i){if(a){var l=Math.atan2(s,o),u=Math.atan2(this._hX2-this._hX1,this._hY2-this._hY1),h=Math.atan2(Math.sin(l-u),Math.cos(l-u));Math.abs(h)>t.minBounceBackAngle&&(this._hBlockedIndex=null)}return this._hX1=this._hX2,this._hY1=this._hY2,this._hX2=r,this._hY2=n,!0}return!1},Re.prototype._resetStartPredicate=function(){var e=this._startPredicateData;e&&(e.delayTimer&&(e.delayTimer=window.clearTimeout(e.delayTimer)),this._startPredicateData=null)},Re.prototype._checkOverlap=function(){if(this._isActive){var e,r,n,s,o,a,p,g=this._item,f=this._getGrid()._settings;(e=x(f.dragSortPredicate)?f.dragSortPredicate(g,this._dragEvent):Re.defaultSortPredicate(g,f.dragSortPredicate))&&"number"==typeof e.index&&(p=(r=g.getGrid())!==(s=e.grid||r),n=r._items.indexOf(g),o=le(s._items,e.index,p),a=e.action===t?t:i,(p||o!==this._hBlockedIndex)&&(p?(this._hBlockedIndex=null,r._hasListeners(h)&&r._emit(h,{item:g,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),s._hasListeners(d)&&s._emit(d,{item:g,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),g._gridId=s._id,this._isMigrating=g._gridId!==this._gridId,r._items.splice(n,1),ae(s._items,g,o),g._sortData=null,r._hasListeners(u)&&r._emit(u,{item:g,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),s._hasListeners(c)&&s._emit(c,{item:g,fromGrid:r,fromIndex:n,toGrid:s,toIndex:o}),r.layout(),s.layout()):n!==o&&(this._hBlockedIndex=n,(a===t?he:ue)(r._items,n,o),r._hasListeners(l)&&r._emit(l,{item:g,fromIndex:n,toIndex:o,action:a}),r.layout())))}},Re.prototype._finishMigration=function(){var e,t,i=this._item,r=i._release,n=i._element,s=i._isActive,o=i.getGrid(),a=o._element,l=o._settings,u=l.dragContainer||a,h=this._getGrid()._settings,c=n.parentNode;this._isMigrating=!1,this.destroy(),Le(n,h.itemClass),Le(n,h.itemVisibleClass),Le(n,h.itemHiddenClass),se(n,l.itemClass),se(n,s?l.itemVisibleClass:l.itemHiddenClass),u!==c&&(u.appendChild(n),t=Ce(c,u,!0),(e=ze(n)).x-=t.left,e.y-=t.top),i._refreshDimensions(),i._refreshSortData(),t=Ce(u,a,!0),r._containerDiffX=t.left,r._containerDiffY=t.top,i._drag=l.dragEnabled?new Re(i):null,u!==c&&(n.style[m]=Me(e.x,e.y)),i._child.removeAttribute("style"),P(i._child,s?l.visibleStyles:l.hiddenStyles),r.start()},Re.prototype._preStartCheck=function(e){0===this._startPredicateState&&(this._startPredicateState=1),1===this._startPredicateState?(this._startPredicateResult=this._startPredicate(this._item,e),!0===this._startPredicateResult?(this._startPredicateState=2,this._onStart(e)):!1===this._startPredicateResult&&(this._startPredicateState=3)):2===this._startPredicateState&&this._isActive&&this._onMove(e)},Re.prototype._preEndCheck=function(e){var t=2===this._startPredicateState;this._startPredicate(this._item,e),this._startPredicateState=0,t&&this._isActive&&this._onEnd(e)},Re.prototype._onStart=function(e){var t=this._item;if(t._isActive){var i,r=t._element,n=this._getGrid(),s=n._settings,o=t._release,a=t._migrate,l=n._element,u=s.dragContainer||l,h=me(u,!0),c=ze(r),d=c.x,p=c.y,g=r.getBoundingClientRect(),f=u!==l;this._resetHeuristics(e),f&&(i=Ce(h,l)),t.isPositioning()&&t._layout.stop(!0,{transform:Me(d,p)}),a._isActive&&(d-=a._containerDiffX,p-=a._containerDiffY,a.stop(!0,{transform:Me(d,p)})),t.isReleasing()&&o._reset(),this._isActive=!0,this._dragEvent=e,this._container=u,this._containingBlock=h,this._elementClientX=g.left,this._elementClientY=g.top,this._left=this._gridX=d,this._top=this._gridY=p,s.dragPlaceholder.enabled&&t._dragPlaceholder.create(),n._emit("dragInit",t,e),f&&(this._containerDiffX=i.left,this._containerDiffY=i.top,r.parentNode===u?(this._gridX=d-this._containerDiffX,this._gridY=p-this._containerDiffY):(this._left=d+this._containerDiffX,this._top=p+this._containerDiffY,u.appendChild(r),r.style[m]=Me(this._left,this._top))),se(r,s.itemDraggingClass),this._bindScrollListeners(),n._emit("dragStart",t,e)}},Re.prototype._onMove=function(e){var t,i,r,n=this._item;if(n._isActive){var s=this._getGrid()._settings.dragAxis;if("y"!==s){var o=e.clientX-this._dragEvent.clientX;this._left+=o,this._gridX+=o,this._elementClientX+=o}if("x"!==s){var a=e.clientY-this._dragEvent.clientY;this._top+=a,this._gridY+=a,this._elementClientY+=a}this._dragEvent=e,t=n._id,i=this._prepareMove,r=this._applyMove,Q.add(t+U,i,r,!0)}else this.stop()},Re.prototype._prepareMove=function(){this._item._isActive&&this._getGrid()._settings.dragSort&&this._checkHeuristics(this._dragEvent)&&this._checkOverlapDebounce()},Re.prototype._applyMove=function(){var e=this._item;e._isActive&&(e._element.style[m]=Me(this._left,this._top),this._getGrid()._emit("dragMove",e,this._dragEvent))},Re.prototype._onScroll=function(e){var t,i,r,n=this._item;n._isActive?(this._scrollEvent=e,t=n._id,i=this._prepareScroll,r=this._applyScroll,Q.add(t+K,i,r,!0)):this.stop()},Re.prototype._prepareScroll=function(){var e=this._item;if(e._isActive){var t,i=e._element,r=this._getGrid(),n=r._settings,s=n.dragAxis,o=r._element,a=i.getBoundingClientRect(),l=this._elementClientX-a.left,u=this._elementClientY-a.top;this._container!==o&&(t=Ce(this._containingBlock,o),this._containerDiffX=t.left,this._containerDiffY=t.top),"y"!==s&&(this._left+=l,this._gridX=this._left-this._containerDiffX),"x"!==s&&(this._top+=u,this._gridY=this._top-this._containerDiffY),n.dragSort&&this._checkOverlapDebounce()}},Re.prototype._applyScroll=function(){var e=this._item;e._isActive&&(e._element.style[m]=Me(this._left,this._top),this._getGrid()._emit("dragScroll",e,this._scrollEvent))},Re.prototype._onEnd=function(e){var t=this._item,i=t._element,r=this._getGrid(),n=r._settings,s=t._release;t._isActive?($(t._id),ee(t._id),n.dragSort&&this._checkOverlapDebounce("finish"),this._unbindScrollListeners(),s._containerDiffX=this._containerDiffX,s._containerDiffY=this._containerDiffY,this._reset(),Le(i,n.itemDraggingClass),r._emit("dragEnd",t,e),this._isMigrating?this._finishMigration():s.start()):this.stop()},je.prototype._onLayoutStart=function(){var e,t,i,r=this._item,n=r.getGrid(),s=n._items.indexOf(r),o=n._layout.slots[2*s],a=n._layout.slots[2*s+1];if(this._didMigrate||r._left!==o||r._top!==a){if(o+=r._marginLeft,a+=r._marginTop,!(n._settings.dragPlaceholder.duration>0)||this._didMigrate){te(r._id);var l={transform:Me(o,a)};return this._animate.isAnimating()?this._animate.stop(l):P(this._element,l),void(this._didMigrate&&(n.getElement().appendChild(this._element),this._didMigrate=!1))}this._nextLeft=o,this._nextTop=a,e=r._id,t=this._setupAnimation,i=this._startAnimation,Q.add(e+Z,t,i)}},je.prototype._setupAnimation=function(){if(this.isActive()){var e=ze(this._element);this._currentLeft=e.x,this._currentTop=e.y}},je.prototype._startAnimation=function(){if(this.isActive()){var e=this._animate,t=this._currentLeft,i=this._currentTop,r=this._nextLeft,n=this._nextTop,s={transform:Me(r,n)};if(t!==r||i!==n){var o=this._item.getGrid()._settings.dragPlaceholder,a={transform:Me(t,i)};e.start(a,s,{duration:o.duration,easing:o.easing,onFinish:this._onLayoutEnd})}else e.isAnimating()&&e.stop(s)}},je.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},je.prototype._onReleaseEnd=function(e){if(e._id===this._item._id){if(!this._animate.isAnimating())return void this.reset();this._resetAfterLayout=!0}},je.prototype._onMigrate=function(e){if(e.item===this._item){var t=this._item.getGrid(),i=e.toGrid;t.off(p,this._onReleaseEnd),t.off(r,this._onLayoutStart),t.off(h,this._onMigrate),i.on(p,this._onReleaseEnd),i.on(r,this._onLayoutStart),i.on(h,this._onMigrate),this._didMigrate=!0}},je.prototype.create=function(){if(this.isActive())this._resetAfterLayout=!1;else{var e,t=this._item,i=t.getGrid(),n=i._settings,s=this._animate;e=x(n.dragPlaceholder.createElement)?n.dragPlaceholder.createElement(t):window.document.createElement("div"),this._element=e,s._element=e,this._className=n.itemPlaceholderClass||"",this._className&&se(e,this._className);var o=t._left+t._marginLeft,a=t._top+t._marginTop;P(e,{display:"block",position:"absolute",left:"0",top:"0",width:t._width+"px",height:t._height+"px",transform:Me(o,a)}),i.on(r,this._onLayoutStart),i.on(p,this._onReleaseEnd),i.on(h,this._onMigrate),x(n.dragPlaceholder.onCreate)&&n.dragPlaceholder.onCreate(t,e),i.getElement().appendChild(e)}},je.prototype.reset=function(){if(this.isActive()){var e=this._element,t=this._item,i=t.getGrid(),n=i._settings,s=this._animate;this._resetAfterLayout=!1,te(t._id),s.stop(),s._element=null,i.off(p,this._onReleaseEnd),i.off(r,this._onLayoutStart),i.off(h,this._onMigrate),this._className&&(Le(e,this._className),this._className=""),e.parentNode.removeChild(e),this._element=null,x(n.dragPlaceholder.onRemove)&&n.dragPlaceholder.onRemove(t,e)}},je.prototype.updateDimensions=function(e,t){this.isActive()&&P(this._element,{width:e+"px",height:t+"px"})},je.prototype.isActive=function(){return!!this._element},je.prototype.destroy=function(){this.reset(),this._animate.destroy(),this._item=this._animate=null},He.prototype.add=function(e){return this._isDestroyed||this._queue.push(e),this},He.prototype.flush=function(e,t){if(this._isDestroyed)return this;var i,r=this._queue,n=r.length;if(!n)return this;var s=1===n,o=s?r[0]:r.slice(0);if(r.length=0,s)return o(e,t),this;for(i=0;i<n&&(o[i](e,t),!this._isDestroyed);i++);return this},He.prototype.destroy=function(){return this._isDestroyed||(this._isDestroyed=!0,this._queue.length=0),this},Fe.prototype.start=function(e,t){if(!this._isDestroyed){var i,r=this._item,n=r._element,s=r._release,o=r.getGrid()._settings,a=this._isActive,l=s._isActive&&!1===s._isPositioningStarted,u=l?o.dragReleaseDuration:o.layoutDuration,h=l?o.dragReleaseEasing:o.layoutEasing,c=!e&&!this._skipNextAnimation&&u>0;return a&&this._queue.flush(!0,r),l&&(s._isPositioningStarted=!0),x(t)&&this._queue.add(t),c?(this._isActive=!0,this._animateOptions.easing=h,this._animateOptions.duration=u,this._isInterrupted=a,d=r._id,p=this._setupAnimation,g=this._startAnimation,Q.add(d+X,p,g),this):(this._updateOffsets(),this._updateTargetStyles(),i=r._animate.isAnimating(),this.stop(!1,this._targetStyles),!i&&P(n,this._targetStyles),this._skipNextAnimation=!1,this._finish())}var d,p,g},Fe.prototype.stop=function(e,t){if(this._isDestroyed||!this._isActive)return this;var i,r=this._item;return i=r._id,Q.cancel(i+X),r._animate.stop(t),Le(r._element,r.getGrid()._settings.itemPositioningClass),this._isActive=!1,e&&this._queue.flush(!0,r),this},Fe.prototype.destroy=function(){return this._isDestroyed||(this.stop(!0,{}),this._queue.destroy(),this._item=this._currentStyles=this._targetStyles=this._animateOptions=null,this._isDestroyed=!0),this},Fe.prototype._updateOffsets=function(){if(!this._isDestroyed){var e=this._item,t=e._migrate,i=e._release;this._offsetLeft=i._isActive?i._containerDiffX:t._isActive?t._containerDiffX:0,this._offsetTop=i._isActive?i._containerDiffY:t._isActive?t._containerDiffY:0}},Fe.prototype._updateTargetStyles=function(){this._isDestroyed||(this._targetStyles.transform=Me(this._item._left+this._offsetLeft,this._item._top+this._offsetTop))},Fe.prototype._finish=function(){if(!this._isDestroyed){var e=this._item,t=e._migrate,i=e._release;this._isActive&&(this._isActive=!1,Le(e._element,e.getGrid()._settings.itemPositioningClass)),i._isActive&&i.stop(),t._isActive&&t.stop(),this._queue.flush(!1,e)}},Fe.prototype._setupAnimation=function(){var e=ze(this._item._element);this._currentLeft=e.x,this._currentTop=e.y},Fe.prototype._startAnimation=function(){var e=this._item,t=e.getGrid()._settings;if(this._updateOffsets(),this._updateTargetStyles(),e._left===this._currentLeft-this._offsetLeft&&e._top===this._currentTop-this._offsetTop)return this._isInterrupted&&this.stop(!1,this._targetStyles),this._isActive=!1,void this._finish();this._isInterrupted||se(e._element,t.itemPositioningClass),this._currentStyles.transform=Me(this._currentLeft,this._currentTop),e._animate.start(this._currentStyles,this._targetStyles,this._animateOptions)};var Ge={};function Ye(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}Ye.prototype.start=function(e,t,i){if(this._isDestroyed)return this;var r,n,s,o,a,l,p,g,f=this._item,v=f._element,_=f.isVisible(),y=f.getGrid(),b=y._settings,w=e._settings,C=e._element,T=e._items,x=y._items.indexOf(f),S=i||window.document.body;if("number"==typeof t)r=le(T,t,!0);else{if(!(n=e._getItem(t)))return this;r=T.indexOf(n)}return(f.isPositioning()||this._isActive||f.isReleasing())&&(p=(l=ze(v)).x,g=l.y),f.isPositioning()&&f._layout.stop(!0,{transform:Me(p,g)}),this._isActive&&(p-=this._containerDiffX,g-=this._containerDiffY,this.stop(!0,{transform:Me(p,g)})),f.isReleasing()&&(p-=f._release._containerDiffX,g-=f._release._containerDiffY,f._release.stop(!0,{transform:Me(p,g)})),f._visibility._stopAnimation(),f._drag&&f._drag.destroy(),f._visibility._queue.flush(!0,f),y._hasListeners(h)&&y._emit(h,{item:f,fromGrid:y,fromIndex:x,toGrid:e,toIndex:r}),e._hasListeners(d)&&e._emit(d,{item:f,fromGrid:y,fromIndex:x,toGrid:e,toIndex:r}),Le(v,b.itemClass),Le(v,b.itemVisibleClass),Le(v,b.itemHiddenClass),se(v,w.itemClass),se(v,_?w.itemVisibleClass:w.itemHiddenClass),y._items.splice(x,1),ae(T,f,r),f._gridId=e._id,S!==(s=v.parentNode)&&(S.appendChild(v),o=Ce(S,s,!0),l||(p=(l=ze(v)).x,g=l.y),v.style[m]=Me(p+o.left,g+o.top)),f._child.removeAttribute("style"),P(f._child,_?w.visibleStyles:w.hiddenStyles),v.style.display=_?"block":"hidden",a=Ce(S,C,!0),f._refreshDimensions(),f._refreshSortData(),f._drag=w.dragEnabled?new Re(f):null,this._isActive=!0,this._container=S,this._containerDiffX=a.left,this._containerDiffY=a.top,y._hasListeners(u)&&y._emit(u,{item:f,fromGrid:y,fromIndex:x,toGrid:e,toIndex:r}),e._hasListeners(c)&&e._emit(c,{item:f,fromGrid:y,fromIndex:x,toGrid:e,toIndex:r}),this},Ye.prototype.stop=function(e,t){if(this._isDestroyed||!this._isActive)return this;var i,r=this._item,n=r._element,s=r.getGrid()._element;return this._container!==s&&(t||(e?(i=ze(n),Ge.transform=Me(i.x-this._containerDiffX,i.y-this._containerDiffY)):Ge.transform=Me(r._left,r._top),t=Ge),s.appendChild(n),P(n,t)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0,this},Ye.prototype.destroy=function(){return this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0),this};var Qe={};function Xe(e){this._item=e,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}function We(e){var t=e._isActive,i=e._element,r=e.getGrid()._settings;this._item=e,this._isDestroyed=!1,this._isHidden=!t,this._isHiding=!1,this._isShowing=!1,this._queue=new He,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),i.style.display=t?"block":"none",se(i,t?r.itemVisibleClass:r.itemHiddenClass),P(e._child,t?r.visibleStyles:r.hiddenStyles)}Xe.prototype.start=function(){if(this._isDestroyed||this._isActive)return this;var e=this._item,t=e.getGrid();return this._isActive=!0,se(e._element,t._settings.itemReleasingClass),t._emit("dragReleaseStart",e),e._layout.start(!1),this},Xe.prototype.stop=function(e,t){if(this._isDestroyed||!this._isActive)return this;var i,r=this._item,n=r._element,s=r.getGrid(),o=s._element;return this._reset(),n.parentNode!==o&&(t||(e?(i=ze(n),Qe.transform=Me(i.x-this._containerDiffX,i.y-this._containerDiffY)):Qe.transform=Me(r._left,r._top),t=Qe),o.appendChild(n),P(n,t)),e||s._emit(p,r),this},Xe.prototype.destroy=function(){return this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0),this},Xe.prototype._reset=function(){if(!this._isDestroyed){var e=this._item;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,Le(e._element,e.getGrid()._settings.itemReleasingClass)}},We.prototype.show=function(e,t){if(this._isDestroyed)return this;var i=this._item,r=i._element,n=this._queue,s=x(t)?t:null,o=i.getGrid()._settings;return this._isShowing||this._isHidden?this._isShowing&&!e?(s&&n.add(s),this):(this._isShowing||(n.flush(!0,i),Le(r,o.itemHiddenClass),se(r,o.itemVisibleClass),this._isHiding||(r.style.display="block")),s&&n.add(s),i._isActive=this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,e,this._finishShow),this):(s&&s(!1,i),this)},We.prototype.hide=function(e,t){if(this._isDestroyed)return this;var i=this._item,r=i._element,n=this._queue,s=x(t)?t:null,o=i.getGrid()._settings;return!this._isHiding&&this._isHidden?(s&&s(!1,i),this):this._isHiding&&!e?(s&&n.add(s),this):(this._isHiding||(n.flush(!0,i),se(r,o.itemHiddenClass),Le(r,o.itemVisibleClass)),s&&n.add(s),this._isHidden=this._isHiding=!0,i._isActive=this._isShowing=!1,this._startAnimation(!1,e,this._finishHide),this)},We.prototype.destroy=function(){if(this._isDestroyed)return this;var e=this._item,t=e._element,i=e.getGrid(),r=this._queue,n=i._settings;return this._stopAnimation({}),r.flush(!0,e).destroy(),Le(t,n.itemVisibleClass),Le(t,n.itemHiddenClass),this._item=null,this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0,this},We.prototype._startAnimation=function(e,t,i){if(!this._isDestroyed){var r,n=this._item,s=n.getGrid()._settings,o=e?s.visibleStyles:s.hiddenStyles,a=parseInt(e?s.showDuration:s.hideDuration)||0,l=(e?s.showEasing:s.hideEasing)||"ease",u=t||a<=0;if(o){if(J(n._id),u)return n._animateChild.isAnimating()?n._animateChild.stop(o):P(n._child,o),void(i&&i());h=n._id,c=function(){r=function(e,t){var i={};for(var r in t)i[r]=w(e,T(r));return i}(n._child,o)},d=function(){n._animateChild.start(r,o,{duration:a,easing:l,onFinish:i})},Q.add(h+W,c,d)}else i&&i()}var h,c,d},We.prototype._stopAnimation=function(e){if(!this._isDestroyed){var t=this._item;J(t._id),t._animateChild.stop(e)}},We.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._queue.flush(!1,this._item))};var Ue={};We.prototype._finishHide=function(){if(this._isHidden){var e=this._item;this._isHiding=!1,Ue.transform=Me(0,0),e._layout.stop(!0,Ue),e._element.style.display="none",this._queue.flush(!1,e)}};var Ke,Ze,Je,$e,et=0;function tt(){return++et}function it(e,t,i){var r=e._settings;this._id=tt(),this._gridId=e._id,this._isDestroyed=!1,this._left=0,this._top=0,this._element=t,this._child=t.children[0],t.parentNode!==e._element&&e._element.appendChild(t),se(t,r.itemClass),"boolean"!=typeof i&&(i="none"!==w(t,"display")),this._isActive=i,t.style.left="0",t.style.top="0",t.style[m]=Me(0,0),this._animate=new S(t),this._animateChild=new S(this._child),this._visibility=new We(this),this._layout=new Fe(this),this._migrate=new Ye(this),this._release=new Xe(this),this._dragPlaceholder=new je(this),this._drag=r.dragEnabled?new Re(this):null,this._refreshDimensions(),this._refreshSortData()}function rt(){this._slots=[],this._slotSizes=[],this._freeSlots=[],this._newSlots=[],this._rectItem={},this._rectStore=[],this._rectId=0,this._layout={slots:null,setWidth:!1,setHeight:!1,width:!1,height:!1},this._sortRectsLeftTop=this._sortRectsLeftTop.bind(this),this._sortRectsTopLeft=this._sortRectsTopLeft.bind(this)}it.prototype.getGrid=function(){return e[this._gridId]},it.prototype.getElement=function(){return this._element},it.prototype.getWidth=function(){return this._width},it.prototype.getHeight=function(){return this._height},it.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},it.prototype.getPosition=function(){return{left:this._left,top:this._top}},it.prototype.isActive=function(){return this._isActive},it.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},it.prototype.isShowing=function(){return!(!this._visibility||!this._visibility._isShowing)},it.prototype.isHiding=function(){return!(!this._visibility||!this._visibility._isHiding)},it.prototype.isPositioning=function(){return!(!this._layout||!this._layout._isActive)},it.prototype.isDragging=function(){return!(!this._drag||!this._drag._isActive)},it.prototype.isReleasing=function(){return!(!this._release||!this._release._isActive)},it.prototype.isDestroyed=function(){return this._isDestroyed},it.prototype._refreshDimensions=function(){if(!this._isDestroyed&&!this._visibility._isHidden){var e=this._element,t=this._dragPlaceholder,i=e.getBoundingClientRect();this._width=i.width,this._height=i.height,this._marginLeft=Math.max(0,ve(e,"margin-left")),this._marginRight=Math.max(0,ve(e,"margin-right")),this._marginTop=Math.max(0,ve(e,"margin-top")),this._marginBottom=Math.max(0,ve(e,"margin-bottom")),t&&t.updateDimensions(this._width,this._height)}},it.prototype._refreshSortData=function(){if(!this._isDestroyed){var e,t=this._sortData={},i=this.getGrid()._settings.sortData;for(e in i)t[e]=i[e](this,this._element)}},it.prototype._destroy=function(e){if(!this._isDestroyed){var t=this._element,i=this.getGrid(),r=i._settings,n=i._items.indexOf(this);this._release.destroy(),this._migrate.destroy(),this._layout.destroy(),this._visibility.destroy(),this._animate.destroy(),this._animateChild.destroy(),this._dragPlaceholder.destroy(),this._drag&&this._drag.destroy(),t.removeAttribute("style"),this._child.removeAttribute("style"),Le(t,r.itemClass),n>-1&&i._items.splice(n,1),e&&t.parentNode.removeChild(t),this._isActive=!1,this._isDestroyed=!0}},rt.prototype.getLayout=function(e,t,i,r,n){var s,o=this._layout,a=!(!n||!n.fillGaps),l=!(!n||!n.horizontal),u=!(!n||!n.alignRight),h=!(!n||!n.alignBottom),c=!(!n||!n.rounding),d=this._slotSizes;if(o.slots=r||this._slots,o.width=l?0:c?Math.round(t):t,o.height=l?c?Math.round(i):i:0,o.setWidth=l,o.setHeight=!l,o.slots.length=0,d.length=0,!e.length)return o;for(s=0;s<e.length;s++)this._addSlot(e[s],l,a,c,u||h);if(u)for(s=0;s<o.slots.length;s+=2)o.slots[s]=o.width-(o.slots[s]+d[s]);if(h)for(s=1;s<o.slots.length;s+=2)o.slots[s]=o.height-(o.slots[s]+d[s]);return d.length=0,this._freeSlots.length=0,this._newSlots.length=0,this._rectId=0,o},rt.prototype._addSlot=($e={},function(e,t,i,r,n){var s,o,a,l,u,h,c=this._layout,d=this._freeSlots,p=this._newSlots;for(p.length=0,$e.left=null,$e.top=null,$e.width=e._width+e._marginLeft+e._marginRight,$e.height=e._height+e._marginTop+e._marginBottom,r&&($e.width=Math.round($e.width),$e.height=Math.round($e.height)),u=0;u<d.length;u++)if((o=d[u])&&(s=this._getRect(o),$e.width<=s.width+.001&&$e.height<=s.height+.001)){$e.left=s.left,$e.top=s.top;break}for(null===$e.left&&($e.left=t?c.width:0,$e.top=t?0:c.height,i||(l=!0)),!t&&$e.top+$e.height>c.height&&($e.left>0&&p.push(this._addRect(0,c.height,$e.left,1/0)),$e.left+$e.width<c.width&&p.push(this._addRect($e.left+$e.width,c.height,c.width-$e.left-$e.width,1/0)),c.height=$e.top+$e.height),t&&$e.left+$e.width>c.width&&($e.top>0&&p.push(this._addRect(c.width,0,1/0,$e.top)),$e.top+$e.height<c.height&&p.push(this._addRect(c.width,$e.top+$e.height,1/0,c.height-$e.top-$e.height)),c.width=$e.left+$e.width),u=i?0:l?d.length:u;u<d.length;u++)if(o=d[u])for(s=this._getRect(o),a=this._splitRect(s,$e),h=0;h<a.length;h++)o=a[h],(s=this._getRect(o)).width>.49&&s.height>.49&&(!t&&s.top<c.height||t&&s.left<c.width)&&p.push(o);p.length&&this._purgeRects(p).sort(t?this._sortRectsLeftTop:this._sortRectsTopLeft),t?c.width=Math.max(c.width,$e.left+$e.width):c.height=Math.max(c.height,$e.top+$e.height),c.slots.push($e.left,$e.top),n&&this._slotSizes.push($e.width,$e.height),this._freeSlots=p,this._newSlots=d}),rt.prototype._addRect=function(e,t,i,r){var n=++this._rectId,s=this._rectStore;return s[n]=e||0,s[++this._rectId]=t||0,s[++this._rectId]=i||0,s[++this._rectId]=r||0,n},rt.prototype._getRect=function(e,t){var i=t||this._rectItem,r=this._rectStore;return i.left=r[e]||0,i.top=r[++e]||0,i.width=r[++e]||0,i.height=r[++e]||0,i},rt.prototype._splitRect=(Je=[],function(e,t){return Je.length=0,this._doRectsOverlap(e,t)?(e.left<t.left&&Je.push(this._addRect(e.left,e.top,t.left-e.left,e.height)),e.left+e.width>t.left+t.width&&Je.push(this._addRect(t.left+t.width,e.top,e.left+e.width-(t.left+t.width),e.height)),e.top<t.top&&Je.push(this._addRect(e.left,e.top,e.width,t.top-e.top)),e.top+e.height>t.top+t.height&&Je.push(this._addRect(e.left,t.top+t.height,e.width,e.top+e.height-(t.top+t.height))),Je):(Je.push(this._addRect(e.left,e.top,e.width,e.height)),Je)}),rt.prototype._doRectsOverlap=function(e,t){return!(e.left+e.width<=t.left||t.left+t.width<=e.left||e.top+e.height<=t.top||t.top+t.height<=e.top)},rt.prototype._isRectWithinRect=function(e,t){return e.left>=t.left&&e.top>=t.top&&e.left+e.width<=t.left+t.width&&e.top+e.height<=t.top+t.height},rt.prototype._purgeRects=(Ke={},Ze={},function(e){for(var t,i=e.length;i--;)if(t=e.length,e[i])for(this._getRect(e[i],Ke);t--;)if(e[t]&&i!==t&&this._isRectWithinRect(Ke,this._getRect(e[t],Ze))){e[i]=0;break}return e}),rt.prototype._sortRectsTopLeft=function(){var e={},t={};return function(i,r){return this._getRect(i,e),this._getRect(r,t),e.top<t.top?-1:e.top>t.top?1:e.left<t.left?-1:e.left>t.left?1:0}}(),rt.prototype._sortRectsLeftTop=function(){var e={},t={};return function(i,r){return this._getRect(i,e),this._getRect(r,t),e.left<t.left?-1:e.left>t.left?1:e.top<t.top?-1:e.top>t.top?1:0}}();function nt(e){var t=Object.prototype.toString.call(e);return"[object HTMLCollection]"===t||"[object NodeList]"===t}var st=Object.prototype.toString;function ot(e){return"object"==typeof e&&"[object Object]"===st.call(e)}function at(e){return nt(e)?Array.prototype.slice.call(e):Array.prototype.concat(e)}var lt=new rt,ut=function(){},ht="number",ct="string",dt="instant";function pt(t,i){var r,n,s,o,a,l,u=this;if(!((t=this._element=typeof t===ct?window.document.querySelector(t):t).getRootNode?t.getRootNode({composed:!0})===document:window.document.body.contains(t))||t===window.document.documentElement)throw new Error("Container element must be an existing DOM element");x((r=this._settings=(o=pt.defaultOptions,a=i,l=gt({},o),a&&(l=gt(l,a)),l.visibleStyles=(a||0).visibleStyles||(o||0).visibleStyles,l.hiddenStyles=(a||0).hiddenStyles||(o||0).hiddenStyles,l)).dragSort)||(r.dragSort=!!r.dragSort),this._id=tt(),e[this._id]=u,this._isDestroyed=!1,this._layout={id:0,items:[],slots:[],setWidth:!1,setHeight:!1,width:0,height:0},this._emitter=new g,se(t,r.containerClass),this._items=[],typeof(n=r.items)===ct?at(t.children).forEach((function(e){("*"===n||ne(e,n))&&u._items.push(new it(u,e))})):(Array.isArray(n)||nt(n))&&(this._items=at(n).map((function(e){return new it(u,e)}))),typeof(s=r.layoutOnResize)!==ht&&(s=!0===s?0:-1),s>=0&&window.addEventListener("resize",u._resizeHandler=ge((function(){u.refreshItems().layout()}),s)),r.layoutOnInit&&this.layout(!0)}function gt(e,t){var i,r,n,s=Object.keys(t),o=s.length;for(n=0;n<o;n++)i=ot(t[r=s[n]]),ot(e[r])&&i?e[r]=gt(gt({},e[r]),t[r]):i?e[r]=gt({},t[r]):Array.isArray(t[r])?e[r]=t[r].slice(0):e[r]=t[r];return e}return pt.Item=it,pt.ItemLayout=Fe,pt.ItemVisibility=We,pt.ItemMigrate=Ye,pt.ItemAnimate=S,pt.ItemDrag=Re,pt.ItemRelease=Xe,pt.ItemDragPlaceholder=je,pt.Emitter=g,pt.Dragger=G,pt.Packer=rt,pt.defaultOptions={items:"*",showDuration:300,showEasing:"ease",hideDuration:300,hideEasing:"ease",visibleStyles:{opacity:"1",transform:"scale(1)"},hiddenStyles:{opacity:"0",transform:"scale(0.5)"},layout:{fillGaps:!1,horizontal:!1,alignRight:!1,alignBottom:!1,rounding:!0},layoutOnResize:100,layoutOnInit:!0,layoutDuration:300,layoutEasing:"ease",sortData:null,dragEnabled:!1,dragContainer:null,dragStartPredicate:{distance:0,delay:0,handle:!1},dragAxis:null,dragSort:!0,dragSortHeuristics:{sortInterval:100,minDragDistance:10,minBounceBackAngle:1},dragSortPredicate:{threshold:50,action:i},dragReleaseDuration:300,dragReleaseEasing:"ease",dragCssProps:{touchAction:"none",userSelect:"none",userDrag:"none",tapHighlightColor:"rgba(0, 0, 0, 0)",touchCallout:"none",contentZooming:"none"},dragPlaceholder:{enabled:!1,duration:300,easing:"ease",createElement:null,onCreate:null,onRemove:null},containerClass:"muuri",itemClass:"muuri-item",itemVisibleClass:"muuri-item-shown",itemHiddenClass:"muuri-item-hidden",itemPositioningClass:"muuri-item-positioning",itemDraggingClass:"muuri-item-dragging",itemReleasingClass:"muuri-item-releasing",itemPlaceholderClass:"muuri-item-placeholder"},pt.prototype.on=function(e,t){return this._emitter.on(e,t),this},pt.prototype.off=function(e,t){return this._emitter.off(e,t),this},pt.prototype.getElement=function(){return this._element},pt.prototype.getItems=function(e){if(this._isDestroyed||!e&&0!==e)return this._items.slice(0);var t,i,r=[],n=at(e);for(i=0;i<n.length;i++)(t=this._getItem(n[i]))&&r.push(t);return r},pt.prototype.refreshItems=function(e){if(this._isDestroyed)return this;var t,i=this.getItems(e);for(t=0;t<i.length;t++)i[t]._refreshDimensions();return this},pt.prototype.refreshSortData=function(e){if(this._isDestroyed)return this;var t,i=this.getItems(e);for(t=0;t<i.length;t++)i[t]._refreshSortData();return this},pt.prototype.synchronize=function(){if(this._isDestroyed)return this;var e,t,i,r=this._element,n=this._items;if(n.length){for(i=0;i<n.length;i++)(t=n[i]._element).parentNode===r&&(e=e||window.document.createDocumentFragment()).appendChild(t);e&&r.appendChild(e)}return this._emit("synchronize"),this},pt.prototype.layout=function(e,t){if(this._isDestroyed)return this;var i,s,o,a=this,l=this._element,u=this._updateLayout(),h=u.id,c=u.items.length,d=c;function p(){if(!(--d>0)){var i=a._layout.id!==h,r=x(e)?e:t;x(r)&&r(i,u.items.slice(0)),!i&&a._hasListeners(n)&&a._emit(n,u.items.slice(0))}}if((u.setHeight&&typeof u.height===ht||u.setWidth&&typeof u.width===ht)&&(i="border-box"===w(l,"box-sizing")),u.setHeight&&(typeof u.height===ht?l.style.height=(i?u.height+this._borderTop+this._borderBottom:u.height)+"px":l.style.height=u.height),u.setWidth&&(typeof u.width===ht?l.style.width=(i?u.width+this._borderLeft+this._borderRight:u.width)+"px":l.style.width=u.width),this._hasListeners(r)&&this._emit(r,u.items.slice(0)),!c)return p(),this;for(o=0;o<c;o++)(s=u.items[o])&&(s._left=u.slots[2*o],s._top=u.slots[2*o+1],s.isDragging()?p():s._layout.start(!0===e,p));return this},pt.prototype.add=function(e,t){if(this._isDestroyed||!e)return[];var i=at(e);if(!i.length)return i;var r,n,s=t||0,o=s.layout?s.layout:void 0===s.layout,a=this._items,l=!1;for(n=0;n<i.length;n++)r=new it(this,i[n],s.isActive),i[n]=r,r._isActive&&(l=!0,r._layout._skipNextAnimation=!0);return ae(a,i,s.index),this._hasListeners("add")&&this._emit("add",i.slice(0)),l&&o&&this.layout(o===dt,x(o)?o:void 0),i},pt.prototype.remove=function(e,t){if(this._isDestroyed)return this;var i,r,n=t||0,o=n.layout?n.layout:void 0===n.layout,a=!1,l=this.getItems(),u=this.getItems(e),h=[];for(r=0;r<u.length;r++)i=u[r],h.push(l.indexOf(i)),i._isActive&&(a=!0),i._destroy(n.removeElements);return this._hasListeners(s)&&this._emit(s,u.slice(0),h),a&&o&&this.layout(o===dt,x(o)?o:void 0),u},pt.prototype.show=function(e,t){return this._isDestroyed||this._setItemsVisibility(e,!0,t),this},pt.prototype.hide=function(e,t){return this._isDestroyed||this._setItemsVisibility(e,!1,t),this},pt.prototype.filter=function(e,t){if(this._isDestroyed||!this._items.length)return this;var i,r,n=[],s=[],a=typeof e===ct,l=x(e),u=t||0,h=!0===u.instant,c=u.layout?u.layout:void 0===u.layout,d=x(u.onFinish)?u.onFinish:null,p=-1,g=ut;if(d&&(g=function(){++p&&d(n.slice(0),s.slice(0))}),l||a)for(r=0;r<this._items.length;r++)i=this._items[r],(l?e(i):ne(i._element,e))?n.push(i):s.push(i);return n.length?this.show(n,{instant:h,onFinish:g,layout:!1}):g(),s.length?this.hide(s,{instant:h,onFinish:g,layout:!1}):g(),(n.length||s.length)&&(this._hasListeners(o)&&this._emit(o,n.slice(0),s.slice(0)),c&&this.layout(c===dt,x(c)?c:void 0)),this},pt.prototype.sort=function(){var e,t,i,r;function n(e){for(var t={},i=0;i<e.length;i++)t[e[i]._id]=i;return t}function s(e,i){var n=r[e._id],s=r[i._id];return t?s-n:n-s}function o(o,a){for(var l,u,h,c,d=0,p=0;p<e.length;p++)if(l=e[p][0],u=e[p][1],h=(o._sortData?o:o._refreshSortData())._sortData[l],c=(a._sortData?a:a._refreshSortData())._sortData[l],d="desc"===u||!u&&t?c<h?-1:c>h?1:0:h<c?-1:h>c?1:0)return d;return d||(r||(r=n(i)),d=s(o,a)),d}function l(o,a){var l=e(o,a);return t&&l&&(l=-l),l||(r||(r=n(i)),s(o,a))}return function(n,s){if(this._isDestroyed||this._items.length<2)return this;var u,h=this._items,c=s||0,d=c.layout?c.layout:void 0===c.layout;if(e=n,t=!!c.descending,i=h.slice(0),r=null,x(e))h.sort(l);else if(typeof e===ct)e=n.trim().split(" ").map((function(e){return e.split(":")})),h.sort(o);else{if(!Array.isArray(e))return this;if(e.length!==h.length)throw new Error("[Muuri] sort reference items do not match with grid items.");for(u=0;u<h.length;u++){if(e.indexOf(h[u])<0)throw new Error("[Muuri] sort reference items do not match with grid items.");h[u]=e[u]}t&&h.reverse()}return this._hasListeners(a)&&this._emit(a,h.slice(0),i),d&&this.layout(d===dt,x(d)?d:void 0),this}}(),pt.prototype.move=function(e,r,n){if(this._isDestroyed||this._items.length<2)return this;var s,o,a=this._items,u=n||0,h=u.layout?u.layout:void 0===u.layout,c=u.action===t,d=c?t:i,p=this._getItem(e),g=this._getItem(r);return p&&g&&p!==g&&(s=a.indexOf(p),o=a.indexOf(g),c?he(a,s,o):ue(a,s,o),this._hasListeners(l)&&this._emit(l,{item:p,fromIndex:s,toIndex:o,action:d}),h&&this.layout(h===dt,x(h)?h:void 0)),this},pt.prototype.send=function(e,t,i,r){if(this._isDestroyed||t._isDestroyed||this===t)return this;if(!(e=this._getItem(e)))return this;var n=r||0,s=n.appendTo||window.document.body,o=n.layoutSender?n.layoutSender:void 0===n.layoutSender,a=n.layoutReceiver?n.layoutReceiver:void 0===n.layoutReceiver;return e._migrate.start(t,i,s),e._migrate._isActive&&e._isActive&&(o&&this.layout(o===dt,x(o)?o:void 0),a&&t.layout(a===dt,x(a)?a:void 0)),this},pt.prototype.destroy=function(t){if(this._isDestroyed)return this;var i,r=this._element,n=this._items.slice(0);for(this._resizeHandler&&window.removeEventListener("resize",this._resizeHandler),i=0;i<n.length;i++)n[i]._destroy(t);return Le(r,this._settings.containerClass),r.style.height="",r.style.width="",this._emit("destroy"),this._emitter.destroy(),e[this._id]=void 0,this._isDestroyed=!0,this},pt.prototype._getItem=function(e){if(this._isDestroyed||!e&&0!==e)return null;if(typeof e===ht)return this._items[e>-1?e:this._items.length+e]||null;if(e instanceof it)return e._gridId===this._id?e:null;for(var t=0;t<this._items.length;t++)if(this._items[t]._element===e)return this._items[t];return null},pt.prototype._updateLayout=function(){var e,t,i,r,n=this._layout,s=this._settings.layout;for(++n.id,n.items.length=0,r=0;r<this._items.length;r++)this._items[r]._isActive&&n.items.push(this._items[r]);return this._refreshDimensions(),e=this._width-this._borderLeft-this._borderRight,t=this._height-this._borderTop-this._borderBottom,i=x(s)?s(n.items,e,t):lt.getLayout(n.items,e,t,n.slots,s),n.slots=i.slots,n.setWidth=Boolean(i.setWidth),n.setHeight=Boolean(i.setHeight),n.width=i.width,n.height=i.height,n},pt.prototype._emit=function(){this._isDestroyed||this._emitter.emit.apply(this._emitter,arguments)},pt.prototype._hasListeners=function(e){var t=this._emitter._events[e];return!(!t||!t.length)},pt.prototype._updateBoundingRect=function(){var e=this._element.getBoundingClientRect();this._width=e.width,this._height=e.height,this._left=e.left,this._top=e.top},pt.prototype._updateBorders=function(e,t,i,r){var n=this._element;e&&(this._borderLeft=ve(n,"border-left-width")),t&&(this._borderRight=ve(n,"border-right-width")),i&&(this._borderTop=ve(n,"border-top-width")),r&&(this._borderBottom=ve(n,"border-bottom-width"))},pt.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1)},pt.prototype._setItemsVisibility=function(e,t,i){var r,n,s=this,o=this.getItems(e),a=i||0,l=!0===a.instant,u=a.onFinish,h=a.layout?a.layout:void 0===a.layout,c=o.length,d=t?"showStart":"hideStart",p=t?"showEnd":"hideEnd",g=t?"show":"hide",f=!1,m=[],v=[];if(c){for(this._hasListeners(d)&&this._emit(d,o.slice(0)),n=0;n<o.length;n++)r=o[n],(t&&!r._isActive||!t&&r._isActive)&&(f=!0),t&&!r._isActive&&(r._layout._skipNextAnimation=!0),t&&r._visibility._isHidden&&v.push(r),r._visibility[g](l,(function(e,t){e||m.push(t),--c<1&&(x(u)&&u(m.slice(0)),s._hasListeners(p)&&s._emit(p,m.slice(0)))}));v.length&&this.refreshItems(v),f&&h&&this.layout(h===dt,x(h)?h:void 0)}else x(u)&&u(o)},pt}()},873:(e,t,i)=>{"use strict";i.d(t,{MH:()=>o,X3:()=>n,er:()=>s});var r=i(555);function n(e,t){var i=t.dataNames,n=[],s=t.getValues(),o={};s.forEach((function(e,t){o[e]=t}));var a=-1!==s.indexOf(void 0),l=t.getSeriesValues(),u={};l.forEach((function(e,t){u[e]=t}));for(var h=l.length||1,c=0;c<i.length;++c){for(var d=new Array,p=0;p<h;++p)d.push(new Array(s.length).fill(0));n.push(d)}var g=function(e){return null!==e&&"object"==typeof e?o[e.value]:o[e]};return e.forEach((function(e){i.forEach((function(t,i){var s=e[t];if(void 0!==s||a){var o=Array.isArray(s)?s:[s];if(l.length>0){var h=e[r.M.seriesMarkerKey];if(void 0!==h){var c=u[h]||0;o.forEach((function(e){var t=g(e);n[i][c][t]++}))}else o.forEach((function(e){l.forEach((function(t){if(void 0!==e[t]){var r=u[t]||0;(Array.isArray(e[t])?e[t]:[e[t]]).forEach((function(e){var t=g(e);n[i][r][t]++}))}}))}))}else o.forEach((function(e){var t=g(e);n[0][0][t]++}))}}))})),t.dataNames.length>1?n:n[0]}function s(e,t,i){var r=[];0===i.length&&i.push("");for(var n=0;n<i.length;++n)r.push(t.map((function(e){return 0}))),e[i[n]].forEach((function(e){for(var i=0;i<t.length;++i)if(t[i].start<=e&&(e<t[i].end||i==t.length-1)){r[n][i]++;break}}));return r}function o(e,t){var i=Number.MAX_VALUE,r=-Number.MAX_VALUE,n=0,s=0;return e.forEach((function(e){if(void 0!==e[t]){var o=+e[t];s++,n+=o,i>o&&(i=o),r<o&&(r=o)}})),s>0&&(n/=s),[n=Math.ceil(100*n)/100,i,r]}},928:(e,t,i)=>{"use strict";i.d(t,{o:()=>l});var r=i(87),n=i(156),s=i(183),o=i(240),a=i(557),l=function(e){function t(t,i,r,n){return e.call(this,t,i,r,n||"boolean")||this}return(0,r.C6)(t,e),t.prototype.getCorrectAnswerText=function(){var e=this.booleanQuestion.correctAnswer;return void 0!==this.booleanQuestion.valueTrue&&this.booleanQuestion.valueTrue===e||e?this.booleanQuestion.locLabelTrue.textOrHtml:void 0!==this.booleanQuestion.valueFalse&&this.booleanQuestion.valueFalse===e||!e?this.booleanQuestion.locLabelFalse.textOrHtml:e},Object.defineProperty(t.prototype,"booleanQuestion",{get:function(){return this.question},enumerable:!1,configurable:!0}),t.prototype.getSelectedItemByText=function(e){var t=this.getLabels(),i=this.getValues();return new n.ItemValue(i[t.indexOf(e)],e)},t.prototype.getValues=function(){var e=[void 0===this.booleanQuestion.valueTrue||this.booleanQuestion.valueTrue,void 0!==this.booleanQuestion.valueFalse&&this.booleanQuestion.valueFalse];return this.showMissingAnswers&&e.push(void 0),e},t.prototype.getLabels=function(){var e=[].concat(this.getValues());return void 0!==this.booleanQuestion.labelTrue&&(e[0]=this.booleanQuestion.locLabelTrue.textOrHtml),void 0!==this.booleanQuestion.labelFalse&&(e[1]=this.booleanQuestion.locLabelFalse.textOrHtml),this.showMissingAnswers&&(e[2]=o.q.getString("missingAnswersLabel")),e},t.trueColor="",t.falseColor="",t}(s.o);a.g.registerVisualizer("boolean",l)},931:(e,t,i)=>{"use strict";i.d(t,{R:()=>u});var r=i(87),n=i(267),s=i(240),o=i(70),a=i(557),l=i(873),u=function(e){function t(t,i,r,a){void 0===r&&(r={});var l=e.call(this,t,i,r,a||"number")||this;return n.w.chartAdapterType&&(l._chartAdapter=new n.w.chartAdapterType(l),l.chartTypes=l._chartAdapter.getChartTypes(),l.chartType=l.chartTypes[0]),l.registerToolbarItem("changeChartType",(function(){return l.chartTypes.length>1?o.gf.createSelector(l.chartTypes.map((function(e){return{value:e,text:s.q.getString("chartType_"+e)}})),(function(e){return l.chartType===e.value}),(function(e){l.setChartType(e.target.value)})):null})),l}return(0,r.C6)(t,e),t.prototype.onDataChanged=function(){this._resultAverage=void 0,this._resultMin=void 0,this._resultMax=void 0,e.prototype.onDataChanged.call(this)},t.prototype.onChartTypeChanged=function(){},t.prototype.setChartType=function(e){-1!==this.chartTypes.indexOf(e)&&this.chartType!==e&&(this.chartType=e,this.onChartTypeChanged(),this.contentContainer&&(this.destroyContent(this.contentContainer),this.renderContent(this.contentContainer)),this.invokeOnUpdate())},t.prototype.destroy=function(){this._resultAverage=void 0,this._resultMin=void 0,this._resultMax=void 0,e.prototype.destroy.call(this)},t.prototype.generateText=function(e,i,r){var n=[];if(5===r)n=["very high ("+e+")","high","medium","low","very low ("+i+")"];else{n.push(e);for(var s=0;s<r-2;s++)n.push("");n.push(i)}return t.generateTextsCallback?t.generateTextsCallback(this.question,e,i,r,n):n},t.prototype.generateValues=function(e,t){for(var i=[],r=0;r<t;r++)i.push(e/t);return i.push(e),i},t.prototype.generateColors=function(e,t,i){for(var r=this.getColors(),n=[],s=0;s<i;s++)n.push(r[s]);return n.push("rgba(255, 255, 255, 0)"),n},t.prototype.convertFromExternalData=function(e){return[e.value||0,e.minValue||0,e.maxValue||0]},t.prototype.getCalculatedValuesCore=function(){var e;return void 0!==this._resultAverage&&void 0!==this._resultMin&&void 0!==this._resultMax||(e=(0,l.MH)(this.surveyData,this.dataNames[0]),this._resultAverage=e[0],this._resultMin=e[1],this._resultMax=e[2]),[this._resultAverage,this._resultMin,this._resultMax]},t.stepsCount=5,t.showAsPercentage=!1,t}(n.w);a.g.registerVisualizer("number",u,200),a.g.registerVisualizer("rating",u,200),a.g.registerVisualizer("expression",u)},999:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g><polygon points="8,3 10,5 11,4 8,1 5,4 6,5 "></polygon><polygon points="8,13 6,11 5,12 8,15 11,12 10,11"></polygon></g></svg>'}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var s=r[e]={exports:{}};return i[e].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{"use strict";n.r(s),n.d(s,{AlternativeVisualizersWrapper:()=>E.AlternativeVisualizersWrapper,BooleanModel:()=>E.BooleanModel,BooleanPlotly:()=>w,DataProvider:()=>E.DataProvider,DocumentHelper:()=>E.DocumentHelper,GaugePlotly:()=>S,HistogramModel:()=>E.HistogramModel,HistogramPlotly:()=>C,Matrix:()=>E.Matrix,MatrixDropdownGroupedPlotly:()=>x,MatrixPlotly:()=>T,NpsAdapter:()=>E.NpsAdapter,NpsVisualizer:()=>E.NpsVisualizer,NpsVisualizerWidget:()=>E.NpsVisualizerWidget,NumberModel:()=>E.NumberModel,PivotModel:()=>E.PivotModel,PivotPlotly:()=>P,PlotlyChartAdapter:()=>D,PlotlySetup:()=>a,PostponeHelper:()=>E.PostponeHelper,RankingModel:()=>E.RankingModel,RankingPlotly:()=>k,SelectBase:()=>E.SelectBase,SelectBasePlotly:()=>b,StatisticsTable:()=>E.StatisticsTable,StatisticsTableAdapter:()=>E.StatisticsTableAdapter,Text:()=>E.Text,TextTableAdapter:()=>E.TextTableAdapter,VisualizationManager:()=>E.VisualizationManager,VisualizationMatrixDropdown:()=>E.VisualizationMatrixDropdown,VisualizationMatrixDynamic:()=>E.VisualizationMatrixDynamic,VisualizationPanel:()=>E.VisualizationPanel,VisualizationPanelDynamic:()=>E.VisualizationPanelDynamic,VisualizerBase:()=>E.VisualizerBase,VisualizerFactory:()=>E.VisualizerFactory,WordCloud:()=>E.WordCloud,WordCloudAdapter:()=>E.WordCloudAdapter,hideEmptyAnswersInData:()=>E.hideEmptyAnswersInData,localization:()=>E.localization,plotlyChartTypes:()=>A,surveyStrings:()=>E.surveyStrings,textHelper:()=>E.textHelper});var e=n(87),t=n(156),i=n(240),r=n(70),o=n(931),a=function(){function n(){}return n.setup=function(e,t,i){return this.setups[e](t,i)},n.setupPie=function(e,t){var i=t.datasets,r=t.labels,s=t.colors,o=(t.texts,t.seriesLabels),a=o.length>1||"matrix"===e.question.getType(),l=[],u={type:e.chartType,labels:r,customdata:r,text:r.map((function(t){return n.getTruncatedLabel(t,e.labelTruncateLength)})),hoverinfo:"label+value+percent",textposition:"inside"};"doughnut"===e.chartType&&(u.type="pie",u.hole=.4),a||(u.mode="markers",u.marker={color:s},u.marker.symbol="circle",u.marker.size=16),i.forEach((function(e,t){e.some((function(e){return 0!=e}))&&l.push(Object.assign({},u,{values:e,domain:{column:l.length%2,row:Math.floor(l.length/2)},title:{position:"bottom center",text:o[t]}}))}));var h={font:{family:"Segoe UI, sans-serif",size:14,weight:"normal",color:"#404040"},height:(25+(r.length<10?50*r.length+100:550))*Math.ceil(l.length/2),margin:{l:0,t:25,b:0,r:10},colorway:s,hovermode:"closest",plot_bgcolor:e.backgroundColor,paper_bgcolor:e.backgroundColor,showlegend:!1};return a&&(h.annotations=[],h.grid={rows:Math.ceil(l.length/2),columns:2}),{traces:l,layout:h,hasSeries:a}},n.setupBar=function(e,t){var r=t.datasets,s=t.labels,o=t.colors,a=t.texts,l=t.seriesLabels,u=l.length>1||"matrix"===e.question.getType(),h=[],c={type:"line"===e.chartType?"line":"bar",y:s,customdata:s,hoverinfo:"text",orientation:"h",textposition:"none"};u||(c.width=.5,c.bargap=.5,c.mode="markers",c.marker={color:o}),r.forEach((function(t,i){var r=u?l[i]:s[i],n=e.showPercentages?"%":"",o=Object.assign({},c,{x:t,name:r,width:u&&"stackedbar"!==e.chartType?.5/l.length:.5,text:a[i],hovertext:s.map((function(t,s){return e.showOnlyPercentages?"".concat(a[i][s]).concat(n):u?"".concat(r," : ").concat(t,", ").concat(a[i][s]).concat(n):"".concat(a[i][s]).concat(n,", ").concat(t)}))});if(e.showPercentages){var d=e.showOnlyPercentages?"%{text}%":"%{value} (%{text}%)";o.textposition="inside",o.texttemplate=d,o.width=u&&"stackedbar"!==e.chartType?.7/l.length:.9,o.bargap=u&&"stackedbar"!==e.chartType?.3/l.length:.1}h.push(o)}));var d={font:{family:"Segoe UI, sans-serif",size:14,weight:"normal",color:"#404040"},height:30*(s.length+1)+30+30,margin:{t:30,b:30,r:10},colorway:o,hovermode:"closest",plot_bgcolor:e.backgroundColor,paper_bgcolor:e.backgroundColor,showlegend:u,barmode:u&&"stackedbar"==e.chartType?"stack":"group",xaxis:{rangemode:"nonnegative",automargin:!0},yaxis:{automargin:!0,type:"category",orientation:"h",tickmode:"array",tickvals:s,ticktext:s.map((function(t){return n.getTruncatedLabel(t,e.labelTruncateLength)+" "}))}};return u&&"stackedbar"!==e.chartType&&(d.height=30*(s.length*l.length+1)+30+30),-1!==["ar","fa"].indexOf(i.q.currentLocale)&&(d.xaxis.autorange="reversed",d.yaxis.side="right",d.legend={x:0,y:1,xanchor:"left",yanchor:"top"}),{traces:h,layout:d,hasSeries:u}},n.setupVBar=function(e,t){var i=t.datasets,r=t.labels,s=t.colors,o=t.texts,a=t.seriesLabels,l=a.length>1||"matrix"===e.question.getType();if("histogram"!==e.type&&"pivot"!==e.type){r=[].concat(r).reverse(),a=[].concat(a).reverse(),s=[].concat(s.slice(0,l?a.length:r.length)).reverse();var u=[];o.forEach((function(e){u.push([].concat(e).reverse())})),o=u;var h=[];i.forEach((function(e){h.push([].concat(e).reverse())})),i=h}var c=[],d={type:"line"===e.chartType?"line":"bar",x:r,customdata:l?a:r,hoverinfo:l?void 0:"x+y",orientation:"v",textposition:"none"};"histogram"!==e.type&&l||(d.width=.5,d.bargap=.5,d.mode="markers",d.marker={color:s}),i.forEach((function(t,i){var n=Object.assign({},d,{y:t,name:l?a[i]:r[i],text:o[i]});if(e.showPercentages){var s=e.showOnlyPercentages?"%{text}%":"%{value} (%{text}%)";n.textposition="inside",n.texttemplate=s,l||(n.width=.9,n.bargap=.1)}c.push(n)}));var p={font:{family:"Segoe UI, sans-serif",size:14,weight:"normal",color:"#404040"},margin:{t:30,b:30,r:10},colorway:s,hovermode:"closest",plot_bgcolor:e.backgroundColor,paper_bgcolor:e.backgroundColor,showlegend:l,yaxis:{rangemode:"nonnegative",automargin:!0},xaxis:{automargin:!0,type:"category",tickmode:"array",tickvals:r,ticktext:r.map((function(t){return n.getTruncatedLabel(t,e.labelTruncateLength)+" "}))}};return e.showPercentages&&e.showOnlyPercentages&&(p.yaxis={automargin:!0,tickformat:".0%",range:[0,1],ticklen:e.showOnlyPercentages?25:5,tickcolor:"transparent"}),e.getValueType&&"date"==e.getValueType()||(p.xaxis={automargin:!0,type:"category"}),{traces:c,layout:p,hasSeries:l}},n.setupScatter=function(e,t){var i=t.datasets,r=t.labels,s=t.colors,o=(t.texts,t.seriesLabels),a=o.length>1||"matrix"===e.question.getType(),l=[],u={type:"scatter",y:(a?o:r).map((function(t){return n.getTruncatedLabel(t,e.labelTruncateLength)})),customdata:a?o:r,text:a?o:r,hoverinfo:"x+y",orientation:"h",mode:"markers",width:.5,marker:{}};a||(u.marker.symbol="circle",u.marker.size=16),i.forEach((function(e){var t=Object.assign({},u,{x:e});l.push(t)}));var h={font:{family:"Segoe UI, sans-serif",size:14,weight:"normal",color:"#404040"},height:30*(r.length+1)+30+30,margin:{t:30,b:30,r:10},colorway:s,hovermode:"closest",yaxis:{automargin:!0,type:"category",ticklen:5,tickcolor:"transparent"},xaxis:{rangemode:"nonnegative",automargin:!0},plot_bgcolor:e.backgroundColor,paper_bgcolor:e.backgroundColor,showlegend:!1};return a&&(h.showlegend=!0,h.height=void 0,r.forEach((function(e,t){l[t].hoverinfo="x+name",l[t].marker.color=void 0,l[t].name=e}))),{traces:l,layout:h,hasSeries:a}},n.setupGauge=function(e,t){var i=t,n=i[0],s=i[1],a=i[2];if("rating"===e.question.getType()){var l=e.question.visibleRateValues;a=l[l.length-1].value,s=l[0].value}var u=e.generateColors(a,s,o.R.stepsCount);o.R.showAsPercentage&&(n=r.NW.toPercentage(n,a),s=r.NW.toPercentage(s,a),a=r.NW.toPercentage(a,a));var h=[{type:"indicator",mode:"gauge+number",gauge:{axis:{range:[s,a]},shape:e.chartType,bgcolor:"white",bar:{color:u[0]}},value:n,text:e.name,domain:{x:[0,1],y:[0,1]}}],c="bullet"===e.chartType?60:30;return{traces:h,layout:{height:250,margin:{l:c,r:c,b:c,t:c,pad:5},plot_bgcolor:e.backgroundColor,paper_bgcolor:e.backgroundColor},hasSeries:!1}},n.setupRadar=function(t,i){var r=i.datasets,s=i.labels,o=i.colors,a=i.texts,l=i.seriesLabels,u=l.length>1||"matrix"===t.question.getType(),h=[],c={type:"scatterpolar",mode:"lines+markers",fill:"toself",line:{width:2},marker:{size:6}};r.forEach((function(t,i){var r=u?l[i]:"",n=Object.assign({},c,{r:t,theta:s,name:r,text:a[i],hoverinfo:"r+theta+name",customdata:s,hovertemplate:"%{theta}: %{r}<extra></extra>",line:(0,e.Cl)((0,e.Cl)({},c.line),{color:o[i%o.length]}),marker:(0,e.Cl)((0,e.Cl)({},c.marker),{color:o[i%o.length]})});h.push(n)}));var d={font:{family:"Segoe UI, sans-serif",size:14,weight:"normal",color:"#404040"},polar:{radialaxis:{visible:!0,range:[0,1.1*Math.max.apply(Math,r.map((function(e){return Math.max.apply(Math,e)})))],tickfont:{size:12}},angularaxis:{tickfont:{size:12},ticktext:s.map((function(e){return n.getTruncatedLabel(e,t.labelTruncateLength)})),tickvals:s}},showlegend:u,colorway:o,plot_bgcolor:t.backgroundColor,paper_bgcolor:t.backgroundColor,margin:{l:50,r:50,t:50,b:50}};return{traces:h,layout:d,hasSeries:u}},n.imageExportFormat="png",n.onImageSaving=new t.Event,n.onPlotCreating=new t.Event,n.setups={bar:n.setupBar,vbar:n.setupVBar,line:n.setupVBar,stackedbar:n.setupBar,doughnut:n.setupPie,pie:n.setupPie,scatter:n.setupScatter,gauge:n.setupGauge,bullet:n.setupGauge,radar:n.setupRadar},n.getTruncatedLabel=function(e,t){return t?-1===t||e.length<=t+3?e:e.substring(0,t)+"...":e},n}(),l=n(183),u=n(61),h=n.n(u),c=n(267),d=n(928),p=n(226),g=n(143),f=n(873),m=n(557),v=function(t){function i(e,i,r,n){return t.call(this,e,i,r,n||"matrixDropdownGrouped")||this}return(0,e.C6)(i,t),Object.defineProperty(i.prototype,"matrixQuestion",{get:function(){return this.question},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dataNames",{get:function(){return this.matrixQuestion.columns.map((function(e){return e.name}))},enumerable:!1,configurable:!0}),i.prototype.getSeriesValues=function(){return this.matrixQuestion.columns.map((function(e){return e.name}))},i.prototype.getSeriesLabels=function(){return this.matrixQuestion.columns.map((function(e){return e.title}))},i.prototype.valuesSource=function(){return this.matrixQuestion.choices},i.prototype.isSupportMissingAnswers=function(){return!1},i.prototype.getCalculatedValuesCore=function(){var e=this.getValues(),t=this.getSeriesValues(),i=this.matrixQuestion.rows.map((function(e){return e.value}));return(0,f.X3)(this.surveyData,{name:this.name,dataNames:t,getValues:function(){return e},getLabels:function(){return e},getSeriesValues:function(){return i},getSeriesLabels:function(){return i}}).map((function(e){return e[0]}))},i}(l.o);m.g.registerVisualizer("matrixdropdown-grouped",v);var _=n(472),y=n(582),b=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return(0,e.C6)(i,t),i.types=["bar","vbar","pie","doughnut"],i.displayModeBar=void 0,i}(l.o),w=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return(0,e.C6)(i,t),i.types=["pie","bar","doughnut"],i}(d.o),C=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return(0,e.C6)(i,t),i.types=["vbar","bar"],i}(p.Y),T=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return(0,e.C6)(i,t),i.types=["bar","stackedbar","pie","doughnut"],i}(g.u),x=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return(0,e.C6)(i,t),i.types=["stackedbar","bar","pie","doughnut"],i}(v),P=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return(0,e.C6)(i,t),i.types=["vbar","bar","line","stackedbar","pie","doughnut"],i}(_.y),S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return(0,e.C6)(i,t),i.displayModeBar=void 0,i.types=["gauge","bullet"],i}(o.R),k=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return(0,e.C6)(i,t),i}(y.O),A={boolean:w.types,number:S.types,selectBase:b.types,histogram:C.types,matrix:T.types,matrixDropdownGrouped:x.types,pivot:P.types,ranking:[].concat(b.types).concat(["radar"])},D=function(){function r(e){this.model=e,this._chart=void 0}return r.prototype.patchConfigParameters=function(e,t,i,r){if("boolean"===this.model.question.getType()){var n=this.model.getColors(),s=[d.o.trueColor||n[0],d.o.falseColor||n[1]];this.model.showMissingAnswers&&s.push(n[2]);var o=this.model.chartType;"pie"===o||"doughnut"===o?t.forEach((function(e){e&&(e.marker||(e.marker={}),e.marker.colors=s)})):"bar"===o&&t.forEach((function(e){e&&(e.marker||(e.marker={}),e.marker.color=s)}))}"number"===this.model.type&&(r.displayModeBar=!0)},Object.defineProperty(r.prototype,"chart",{get:function(){return this._chart},enumerable:!1,configurable:!0}),r.prototype.getChartTypes=function(){var e=this.model.type;return A[e]||[]},r.prototype.create=function(i){return(0,e.sH)(this,void 0,void 0,(function(){var r,n,s,o,a,u=this;return(0,e.YH)(this,(function(e){switch(e.label){case 0:return[4,this.update(i)];case 1:return r=e.sent(),n=r[0],s=r[1],this.model instanceof l.o&&(o=this.model,i.on("plotly_click",(function(e){var i;if(e.points.length>0){var r="";if(s.hasSeries){r=e.points[0].data.name;var n=e.points[0].label,a=u.model.getSeriesValues()[u.model.getSeriesLabels().indexOf(n)],l=o.getSelectedItemByText(r);h=new t.ItemValue(((i={})[a]=l.value,i),n+": "+l.text),o.setSelection(h)}else{r=Array.isArray(e.points[0].customdata)?e.points[0].customdata[0]:e.points[0].customdata;var h=o.getSelectedItemByText(r);o.setSelection(h)}}}))),a=function(){return i.getElementsByClassName("nsewdrag")[0]},i.on("plotly_hover",(function(){var e=a();e&&(e.style.cursor="pointer")})),i.on("plotly_unhover",(function(){var e=a();e&&(e.style.cursor="")})),this._chart=n,[2,n]}}))}))},r.prototype.update=function(t){return(0,e.sH)(this,void 0,void 0,(function(){var r,n,s,o,u,c=this;return(0,e.YH)(this,(function(e){switch(e.label){case 0:return this.model instanceof l.o?[4,this.model.getAnswersData()]:[3,2];case 1:return n=e.sent(),[3,4];case 2:return[4,this.model.getCalculatedValues()];case 3:n=e.sent(),e.label=4;case 4:return r=n,s=a.setup(this.model.chartType,this.model,r),o={displaylogo:!1,responsive:!0,locale:i.q.currentLocale,modeBarButtonsToRemove:["toImage"],modeBarButtonsToAdd:[{name:"toImageSjs",title:i.q.getString("saveDiagramAsPNG"),icon:h().Icons.camera,click:function(e){var t={format:a.imageExportFormat,filename:c.model.question.name};a.onImageSaving.fire(c.model,t),h().downloadImage(e,t)}}]},void 0!==b.displayModeBar&&(o.displayModeBar=b.displayModeBar),this.patchConfigParameters(t,s.traces,s.layout,o),u={traces:s.traces,layout:s.layout,data:r,config:o},a.onPlotCreating.fire(this.model,u),[2,[h().react(t,u.traces,u.layout,u.config),s]]}}))}))},r.prototype.destroy=function(e){e&&h().purge(e),this._chart=void 0},r}();c.w.chartAdapterType=D;var E=n(358)})(),s})()));