survey-analytics
Version:
SurveyJS analytics Library.
2 lines • 217 kB
JavaScript
/*! For license information please see survey.analytics.min.js.LICENSE.txt */
!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",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.getQuestionVa