survey-analytics
Advanced tools
Comparing version 1.8.3 to 1.8.4
@@ -16,3 +16,3 @@ { | ||
}, | ||
"version": "1.8.3", | ||
"version": "1.8.4", | ||
"name": "survey-analytics", | ||
@@ -19,0 +19,0 @@ "description": "SurveyJS analytics Library.", |
@@ -1,2 +0,2 @@ | ||
/*Type definitions for SurveyJS Analytics library v1.8.3 | ||
/*Type definitions for SurveyJS Analytics library v1.8.4 | ||
Copyright (c) 2015-2019 Devsoft Baltic OÜ - http://surveyjs.io/ | ||
@@ -152,2 +152,7 @@ Definitions by: Devsoft Baltic OÜ <https://github.com/surveyjs/> | ||
static otherCommentCollapsed: boolean; | ||
/** | ||
* The event is fired right after a visualizer's content is rendered in DOM. | ||
**/ | ||
onAfterRender: Event<(sender: VisualizerBase, options: any) => any, any>; | ||
protected afterRender(contentContainer: HTMLElement): void; | ||
protected toolbarItemCreators: { | ||
@@ -337,2 +342,3 @@ [name: string]: (toolbar?: HTMLDivElement) => HTMLElement; | ||
protected questions: Array<any>; | ||
static haveCommercialLicense: boolean; | ||
protected visualizers: Array<VisualizerBase>; | ||
@@ -489,2 +495,3 @@ constructor(questions: Array<any>, data: Array<{ | ||
renderContent(container: HTMLElement): void; | ||
destroy(): void; | ||
} | ||
@@ -513,2 +520,3 @@ | ||
renderContent(container: HTMLElement): void; | ||
destroy(): void; | ||
} | ||
@@ -550,2 +558,3 @@ | ||
static initJQuery($: any): void; | ||
static set haveCommercialLicense(val: boolean); | ||
constructor(survey: SurveyModel, data: Array<Object>, options: DataTablesOptions, _columns?: Array<ITableColumn>); | ||
@@ -589,2 +598,3 @@ destroy(): void; | ||
export class Tabulator extends Table { | ||
static set haveCommercialLicense(val: boolean); | ||
constructor(survey: SurveyModel, data: Array<Object>, options: IOptions, _columns?: Array<any>); | ||
@@ -734,2 +744,3 @@ tabulatorTables: any; | ||
protected _columns: Array<any>; | ||
static haveCommercialLicense: boolean; | ||
protected tableData: any; | ||
@@ -736,0 +747,0 @@ protected extensions: TableExtensions; |
/*! | ||
* surveyjs - SurveyJS Analytics library v1.8.3 | ||
* surveyjs - SurveyJS Analytics library v1.8.4 | ||
* Copyright (c) 2015-2019 Devsoft Baltic OÜ - http://surveyjs.io/ | ||
* License: MIT (http://www.opensource.org/licenses/mit-license.php) | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("survey-core")):"function"==typeof define&&define.amd?define("SurveyAnalyticsDatatables",["survey-core"],t):"object"==typeof exports?exports.SurveyAnalyticsDatatables=t(require("survey-core")):e.SurveyAnalyticsDatatables=t(e.Survey)}(window,(function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(o,a,function(t){return e[t]}.bind(null,a));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=25)}([function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return s}));var o=function(){function e(){}return e.createSelector=function(t,n,o){var a=document.createElement("div");a.className="sa-question__select-wrapper";var i=document.createElement("select");return i.className="sa-question__select",t.forEach((function(t){var o=e.createElement("option","",{value:t.value,text:t.text,selected:n(t)});i.appendChild(o)})),i.onchange=o,a.appendChild(i),a},e.createButton=function(t,n,o){return void 0===n&&(n=""),void 0===o&&(o="sa-toolbar__button"),e.createElement("span",o,{innerText:n,onclick:t})},e.createElement=function(e,t,n){void 0===t&&(t="");var o=document.createElement(e);return o.className=t,n&&Object.keys(n).forEach((function(e){o[e]=n[e]})),o},e.createSvgElement=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=document.createElementNS("http://www.w3.org/2000/svg","use");return n.setAttributeNS("http://www.w3.org/1999/xlink","href","#sa-svg-"+e),t.appendChild(n),t},e.createSvgButton=function(t){var n=e.createElement("button","sa-table__svg-button");return n.appendChild(e.createSvgElement(t)),n},e.createSvgToggleButton=function(t,n,o,a,i,r,s,l){void 0===s&&(s="first"),void 0===l&&(l="sa-toolbar__button sa-toolbar__svg-button");var c=e.createSvgElement(t),u=e.createSvgElement(n),d=e.createElement("button",l);return"first"===s?(d.title=o,d.appendChild(c)):(s="second")&&(d.title=a,d.appendChild(u)),d.onclick=function(e){"first"===s?(s="second",d.title=a,d.removeChild(c),d.appendChild(u),r(e)):"second"===s&&(s="first",d.title=o,d.removeChild(u),d.appendChild(c),i(e))},d},e.createInput=function(t,n,o){return void 0===n&&(n=""),void 0===o&&(o=""),e.createElement("input",t,{placeholder:n,defaultValue:o})},e}(),a={runningInBrowser:"function"==typeof window.URL.createObjectURL};function i(){return a.runningInBrowser}function r(){var e=o.createElement("div","sa-commercial"),t=o.createElement("a","sa-commercial__text",{href:"https://www.surveyjs.io/Buy",target:"_blank"}),n=o.createElement("span",""),a=o.createSvgElement("noncommercial"),i=o.createElement("span","sa-commercial__product",{innerHTML:"Please purchase a SurveyJS Analytics developer license\n to\n use it in your\n app."});return e.appendChild(t).appendChild(n),n.appendChild(a),n.appendChild(i),e}var s=function(){function e(){}return e.zipArrays=function(e,t){for(var n=[],o=0;o<Math.min(e.length,t.length);o++)n[o]=[e[o],t[o]];return n},e.unzipArrays=function(e){var t={first:[],second:[]};return e.forEach((function(e,n){t.first[n]=e[0],t.second[n]=e[1]})),t},e.sortDictionary=function(e,t,n){var o=this.zipArrays(e,t),a=function(e,t,n){void 0===n&&(n=!0);var o=e[1]<t[1]?1:e[1]==t[1]?0:-1;return n?o:-1*o};o.sort((function(e,t){return n?a(e,t,!1):a(e,t)}));var i=this.unzipArrays(o);return{keys:i.first,values:i.second}},e.toPercentage=function(e,t){return e/t*100},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}));var o={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",chartType_bar:"Bar",chartType_stackedbar:"Stacked Bar",chartType_doughnut:"Doughnut",chartType_pie:"Pie",chartType_scatter:"Scatter",chartType_gauge:"Gauge",chartType_bullet:"Bullet",hideButton:"Hide",makePrivateButton:"Make private",makePublicButton:"Make public",showButton:"Show",resetFilter:"Reset Filter",changeLocale:"Change Locale",clearButton:"Clear",addElement:"Choose question to show...",defaultOrder:"Default",ascOrder:"Ascending",descOrder:"Descending",showMinorColumns:"Show minor columns",otherCommentTitle:"Other items and comments",showPercentages:"Show percentages",hidePercentages:"Hide percentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV"},a={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 n=t[e];return void 0===n&&(n=this.locales.en[e]||e),n},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 n in this.locales)e.push(n);return e.sort(),e}},i=o;a.locales.en=o,a.localeNames.en="english"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o=function(){function e(e){this.table=e,this.renderedExtensions=[]}return e.prototype.render=function(t,n,o){var a=this,i=e.extensions[n];i&&(i=this.sortExtensions(i)).forEach((function(e){if(e.render){var n=e.render(a.table,o);n&&(t.appendChild(n),a.renderedExtensions.push(e))}}))},e.prototype.destroy=function(){this.renderedExtensions.forEach((function(e){e.destroy&&e.destroy()})),this.renderedExtensions=[]},e.registerExtension=function(e){this.extensions[e.location]||(this.extensions[e.location]=[]),this.extensions[e.location].push(e)},e.findExtension=function(e,t){return this.extensions[e]&&this.extensions[e].filter((function(e){return e.name==t}))[0]||null},e.prototype.sortExtensions=function(e){if(Array.isArray(e))return[].concat(e.filter((function(e){return e.visibleIndex>=0}))).sort((function(e,t){return e.visibleIndex-t.visibleIndex}))},e.extensions={},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e};function a(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}},function(t,n){t.exports=e},function(e,t,n){"use strict";var o,a;n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),function(e){e[e.Column=0]="Column",e[e.Row=1]="Row"}(o||(o={})),function(e){e[e.Text=0]="Text",e[e.FileLink=1]="FileLink",e[e.Image=2]="Image"}(a||(a={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(0),a=n(5),i=n(2),r=n(1),s=function(){function e(e,t,n){var i=this;this.table=e,this.row=t,this.targetNode=n,this.location="details",this.createShowAsColumnButton=function(e){var t=o.b.createElement("button","sa-table__btn sa-table__btn--gray",{innerHTML:r.a.getString("showAsColumn")});return t.onclick=function(t){t.stopPropagation(),i.table.setColumnLocation(e,a.b.Column)},t};var s=o.b.createElement("table","sa-table__detail-table");this.detailsTable=s,this.table.onColumnsLocationChanged.add((function(){i.close()}))}return e.prototype.open=function(){var e=this;this.detailsTable.innerHTML="";var t=[];this.table.columns.filter((function(e){return e.location===a.b.Row&&e})).forEach((function(n){var a=o.b.createElement("tr","sa-table__detail"),i=o.b.createElement("td","",{innerHTML:n.displayName}),r=o.b.createElement("td");r.textContent=e.row.getRowData()[n.name];var s=o.b.createElement("td");s.appendChild(e.createShowAsColumnButton(n.name)),a.appendChild(i),a.appendChild(r),a.appendChild(s),t.push(a)}));var n=o.b.createElement("tr","sa-table__detail"),r=o.b.createElement("td","",{colSpan:3});new i.a(this.table).render(r,"details",{row:this.row}),0!=r.children.length&&(n.appendChild(r),t.push(n)),t.forEach((function(t){e.detailsTable.appendChild(t)})),this.targetNode.appendChild(this.detailsTable)},e.prototype.close=function(){this.detailsTable.parentNode&&this.detailsTable.parentNode.removeChild(this.detailsTable)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var o=n(3),a=n(4),i=n(5),r=n(6),s=n(1),l=n(2),c=n(0),u=function(){function e(e,t,n,o){var r=this;void 0===o&&(o=[]),this.survey=e,this.data=t,this.options=n,this._columns=o,this.haveCommercialLicense=!1,this.currentPageSize=5,this._rows=[],this.onColumnsVisibilityChanged=new a.Event,this.onColumnsLocationChanged=new a.Event,this.onRowRemoved=new a.Event,this.buildColumns=function(e){return r.survey.getAllQuestions().map((function(e){return{name:e.name,displayName:(e.title||"").trim()||e.name,dataType:"file"!==e.getType()?i.a.Text:i.a.FileLink,isVisible:"file"!==e.getType(),isPublic:!0,location:i.b.Column}}))},this.onStateChanged=new a.Event,0===o.length&&(this._columns=this.buildColumns(e)),this.initTableData(t),s.a.currentLocale=this.survey.locale,0===o.length&&(this._columns=this.buildColumns(e)),this.extensions=new l.a(this),this.haveCommercialLicense=!!n&&void 0!==n.haveCommercialLicense&&n.haveCommercialLicense}return e.prototype.getData=function(){return this.data},e.prototype.render=function(e){e.innerHTML="",this.haveCommercialLicense||e.appendChild(Object(c.d)())},e.prototype.enableColumnReorder=function(){this.isColumnReorderEnabled=!0},e.prototype.disableColumnReorder=function(){this.isColumnReorderEnabled=!1},e.prototype.getPageNumber=function(){return this.currentPageNumber},e.prototype.setPageNumber=function(e){this.currentPageNumber=e},e.prototype.getPageSize=function(){return this.currentPageSize},e.prototype.setPageSize=function(e){this.currentPageSize=e,this.onStateChanged.fire(this,this.state)},e.prototype.getCreatedRows=function(){return[].concat(this._rows)},e.prototype.clearCreatedRows=function(){this._rows.forEach((function(e){e.destroy()})),this._rows=[]},e.prototype.isColumnVisible=function(e){return e.location===i.b.Column&&e.isVisible},Object.defineProperty(e.prototype,"columns",{get:function(){return[].concat(this._columns)},set:function(e){this._columns=e,this.refresh(!0),this.onStateChanged.fire(this,this.state)},enumerable:!1,configurable:!0}),e.prototype.initTableData=function(e){var t=this;this.tableData=(e||[]).map((function(e){var n={};return t.survey.data=e,t._columns.forEach((function(o){var a=e[o.name],i=t.survey.getQuestionByName(o.name);i&&(a=i.displayValue),n[o.name]="string"==typeof a?a:JSON.stringify(a)||""})),n}))},e.prototype.moveColumn=function(e,t){var n=this._columns.splice(e,1);this._columns.splice(t,0,n[0]),this.onStateChanged.fire(this,this.state)},e.prototype.setColumnLocation=function(e,t){this.getColumnByName(e).location=t,this.onColumnsLocationChanged.fire(this,{columnName:e,location:t}),this.onStateChanged.fire(this,this.state)},e.prototype.getColumnByName=function(e){return this._columns.filter((function(t){return t.name===e}))[0]},e.prototype.setColumnVisibility=function(e,t){this.getColumnByName(e).isVisible=t,this.onColumnsVisibilityChanged.fire(this,{columnName:e,columnVisibility:t}),this.onStateChanged.fire(this,this.state)},e.prototype.setColumnWidth=function(e,t){this.getColumnByName(e).width=t,this.onStateChanged.fire(this,this.state)},e.prototype.removeRow=function(e){var t=this._rows.indexOf(e);this._rows.splice(t,1),this.onRowRemoved.fire(this,{row:e})},Object.defineProperty(e.prototype,"locale",{get:function(){return s.a.currentLocale},set:function(e){this.survey.locale=e,s.a.currentLocale=e,this.refresh(!0),this.onStateChanged.fire(this,this.state)},enumerable:!1,configurable:!0}),e.prototype.getLocales=function(){return[].concat(this.survey.getUsedLocales())},e.prototype.refresh=function(e){if(void 0===e&&(e=!1),this.isRendered){this.currentPageNumber=this.getPageNumber(),e&&this.initTableData(this.data);var t=this.renderResult;this.destroy(),this.render(t),this.setPageSize(this.currentPageSize),this.setPageNumber(this.currentPageNumber)}},e.prototype.destroy=function(){this.clearCreatedRows(),this.extensions.destroy(),this.renderResult.innerHTML="",this.renderResult=void 0},Object.defineProperty(e.prototype,"isRendered",{get:function(){return!!this.renderResult},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return{locale:s.a.currentLocale,elements:[].concat(this._columns),pageSize:this.currentPageSize}},set:function(e){e&&(void 0!==e.locale&&(s.a.currentLocale=e.locale,this.survey.locale=e.locale,this.initTableData(this.data)),void 0!==e.elements&&(this._columns=e.elements),void 0!==e.pageSize&&(this.currentPageSize=e.pageSize))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"permissions",{get:function(){return this._columns.map((function(e){return{name:e.name,isPublic:e.isPublic}}))},set:function(e){var t=this._columns.map((function(t){return e.forEach((function(e){e.name===t.name&&(t.isPublic=e.isPublic)})),Object(o.a)({},t)}));this._columns=[].concat(t),this.onPermissionsChangedCallback&&this.onPermissionsChangedCallback(this)},enumerable:!1,configurable:!0}),e}(),d=function(){function e(e,t,n){var o=this;this.table=e,this.extensionsContainer=t,this.detailsContainer=n,this.detailedRowClass="sa-table__detail-row",this.isDetailsExpanded=!1,this.onToggleDetails=new a.Event,this.onColumnLocationChangedCallback=function(){o.closeDetails()},this.details=new r.a(e,this,n),this.extensions=new l.a(e),e.onColumnsLocationChanged.add(this.onColumnLocationChangedCallback)}return e.prototype.render=function(){this.extensions.render(this.extensionsContainer,"row",{row:this})},e.prototype.openDetails=function(){this.details.open(),this.getElement().className+=" "+this.detailedRowClass,this.onToggleDetails.fire(this,{isExpanded:!0}),this.isDetailsExpanded=!0},e.prototype.closeDetails=function(){this.details.close(),this.getElement().classList.remove(this.detailedRowClass),this.onToggleDetails.fire(this,{isExpanded:!1}),this.isDetailsExpanded=!1},e.prototype.toggleDetails=function(){this.isDetailsExpanded?this.closeDetails():this.openDetails()},e.prototype.getIsSelected=function(){return this.isSelected},e.prototype.toggleSelect=function(){this.isSelected=!this.isSelected},e.prototype.remove=function(){this.table.removeRow(this)},e.prototype.destroy=function(){this.table.onColumnsLocationChanged.remove(this.onColumnLocationChangedCallback),this.extensions.destroy()},e}()},function(e,t,n){"use strict";var o=n(1);o.a.locales.fa={groupButton:"گروه بندی با",ungroupButton:"حذف گروه",selectButton:"انتخاب",hideColumn:"مخفی کردن ستون",showColumn:"نمایش ستون",moveToDetail:"انتقال به جزئیات",showAsColumn:"نمایش به عنوان ستون",visualizer_text:"متون در جدول",visualizer_wordcloud:"ابر کلمات",chartType_bar:"میله ای",chartType_pie:"دابره ای(pie)",chartType_scatter:"پراکندگی(Scatter)",chartType_gauge:"عقربه ای",chartType_bullet:"Bullet",hideButton:"مخفی",resetFilter:"بازنشانی فیلترها",clearButton:"پاک کردن",addElement:"انتخاب سوال برای نمایش..."},o.a.localeNames.fa="Farsi(Persian)"},function(e,t,n){"use strict";var o=n(1);o.a.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",visualizer_text:"Textes en table",visualizer_wordcloud:"Nuages de mots",chartType_bar:"Barres",chartType_stackedbar:"Barres empilées",chartType_doughnut:"Anneau",chartType_pie:"Secteurs",chartType_scatter:"Nuages de points",chartType_gauge:"Gauge",chartType_bullet:"Bulles",hideButton:"Masquer",resetFilter:"Rafraichir Filtres",clearButton:"Rafraichir",addElement:"Choisir la question à afficher...",defaultOrder:"Defaut",ascOrder:"Ascendant",descOrder:"Descendant",showMinorColumns:"Afficher les colonnes mineures"},o.a.localeNames.fr="French"},function(e,t,n){"use strict";var o=n(1);o.a.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",chartType_bar:"Stolpediagram",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",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"},o.a.localeNames.no="Norwegian"},function(e,t){e.exports='<svg style="display:none;"><symbol viewBox="0 0 16 16" id="sa-svg-detail"><circle class="st0" cx="1.5" cy="8.5" r="1.5"></circle><circle class="st0" cx="7.5" cy="8.5" r="1.5"></circle><circle class="st0" cx="13.5" cy="8.5" r="1.5"></circle></symbol><symbol viewBox="0 0 16 16" id="sa-svg-drag"><path class="st0" d="M13 5l-1 1 1 1H9V3l1 1 1-1-3-3-3 3 1 1 1-1v4H3l1-1-1-1-3 3 3 3 1-1-1-1h4v4l-1-1-1 1 3 3 3-3-1-1-1 1V9h4l-1 1 1 1 3-3z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-hide"><path class="st1" d="M12.79 4.2L16 1l-1-1-3.32 3.32C10.57 2.55 9.32 2 8 2 3.63 2 0 7.97 0 7.97s1.27 2.1 3.21 3.82l-3.23 3.23.98.98 3.35-3.34C5.41 13.44 6.67 14 8 14c4.37 0 8-6 8-6s-1.27-2.09-3.21-3.8zM2 7.97c1.07-1.47 3.61-4 6-4 .8 0 1.6.27 2.35.68l-.78.78c-.46-.29-.99-.46-1.57-.46-1.66 0-3 1.34-3 3 0 .58.17 1.11.46 1.57l-.97.97A13.38 13.38 0 0 1 2 7.97zm6 4c-.8 0-1.59-.27-2.33-.67l.78-.77c.45.27.98.44 1.55.44 1.66 0 3-1.34 3-3 0-.57-.17-1.09-.44-1.55l.98-.98c1.11.87 2.01 1.91 2.46 2.52-1.07 1.48-3.61 4.01-6 4.01z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-makeprivate"><circle class="st0" cx="8" cy="4" r="3"></circle><path class="st0" d="M8 8c-3.31 0-6 2.73-6 4.67S5.27 15 8 15s6-.4 6-2.33S11.31 8 8 8z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-makepublic"><circle class="st0" cx="6" cy="5" r="3"></circle><path class="st0" d="M10 5c0 .34-.06.67-.14.99.05 0 .09.01.14.01 1.66 0 3-1.34 3-3s-1.34-3-3-3C8.97 0 8.07.52 7.53 1.3 8.98 1.91 10 3.33 10 5zM6 9c-3.31 0-6 2.73-6 4.67S3.27 16 6 16s6-.4 6-2.33S9.31 9 6 9zM10 7c-.19 0-.38.01-.57.03a4.14 4.14 0 0 1-1.37 1.39c3 .83 5.23 3.31 5.42 5.28 1.44-.31 2.52-.92 2.52-2.03C16 9.74 13.31 7 10 7z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-movetodetails"><circle class="st0" cx="1.5" cy="14.5" r="1.5"></circle><circle class="st0" cx="7.5" cy="14.5" r="1.5"></circle><circle class="st0" cx="13.5" cy="14.5" r="1.5"></circle><path class="st0" d="M12 1h3v9h-3zM2.02 7.02L1 6 0 7l3 3 3-3-1-1-.94.94C4.33 4.73 6.21 3 8.5 3c.17 0 .33.03.5.05V1.03C8.83 1.01 8.67 1 8.5 1 5.08 1 2.27 3.66 2.02 7.02z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-noncommercial"><path d="M8 0L0 15h16L8 0zm1 13H7v-2h2v2zm-2-3V5h2v5H7z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-sorting"><path class="st0" d="M8 3l2 2 1-1-3-3-3 3 1 1zM8 13l-2-2-1 1 3 3 3-3-1-1z"></path></symbol></svg>'},function(e,t,n){"use strict";var o=n(1),a=n(0),i=n(2);i.a.registerExtension({location:"row",name:"details",visibleIndex:0,render:function(e,t){var n=a.b.createSvgButton("detail");return n.title=o.a.getString("showMinorColumns"),n.className+=" sa-table__row-extension",n.onclick=function(){t.row.toggleDetails()},n}}),i.a.registerExtension({location:"row",name:"select",visibleIndex:-1,render:function(e,t){var n=t.row,o=a.b.createElement("input","sa-table__row-extension",{type:"checkbox"});return o.checked=n.getIsSelected(),o.onchange=function(){n.toggleSelect()},o}})},function(e,t,n){"use strict";var o=n(1),a=n(0),i=n(2);i.a.registerExtension({location:"header",name:"filter",visibleIndex:0,render:function(e){var t=a.b.createInput("sa-table__global-filter sa-table__header-extension",o.a.getString("filterPlaceholder"));return t.onchange=function(t){e.applyFilter(t.target.value)},t}}),i.a.registerExtension({location:"header",name:"showcolumn",visibleIndex:2,destroy:function(){this.onDestroy()},render:function(e){var t=a.b.createElement("select","sa-table__show-column sa-table__header-extension");function n(){var n=e.columns.filter((function(e){return!e.isVisible}));if(0!=n.length){t.style.display="inline-block",t.innerHTML="";var i=a.b.createElement("option","",{text:o.a.getString("showColumn"),disabled:!0,selected:!0});t.appendChild(i),n.forEach((function(e){var n=e.displayName;n.length>20&&(n=n.substring(0,20)+"...");var o=a.b.createElement("option","",{text:n,title:e.displayName,value:e.name});t.appendChild(o)}))}else t.style.display="none"}t.onchange=function(t){var n=t.target.value;t.stopPropagation(),n&&e.setColumnVisibility(n,!0)},n();var i=function(){n()};return e.onColumnsVisibilityChanged.add(i),this.onDestroy=function(){e.onColumnsVisibilityChanged.remove(i)},t}}),i.a.registerExtension({location:"header",name:"showentries",visibleIndex:3,render:function(e){var t=a.b.createElement("div","sa-table__entries"),n=a.b.createElement("span","sa-table__entries-label sa-table__entries-label--right",{innerHTML:o.a.getString("showLabel")}),i=a.b.createElement("span","sa-table__entries-label sa-table__entries-label--left",{innerHTML:o.a.getString("entriesLabel")});return t.appendChild(n),t.appendChild(function(e){var t=a.b.createElement("select");return["1","5","10","25","50","75","100"].forEach((function(e){var n=a.b.createElement("option","",{value:e,text:e});t.appendChild(n)})),t.value=String(e.getPageSize()),t.onchange=function(){e.setPageSize(Number(t.value))},t}(e)),t.appendChild(i),t}}),i.a.registerExtension({location:"header",name:"removerows",visibleIndex:-1,render:function(e){var t=a.b.createElement("button","sa-table__btn sa-table__btn--green sa-table__header-extension ",{innerHTML:o.a.getString("removeRows")});return t.onclick=function(){e.getCreatedRows().forEach((function(e){e.getIsSelected()&&e.remove()}))},t}}),i.a.registerExtension({location:"header",name:"changelocale",visibleIndex:1,render:function(e){var t=e.getLocales();if(t.length<2)return null;var n=a.b.createElement("select","sa-table__header-extension",{});return[o.a.getString("changeLocale")].concat(t).forEach((function(e){var t=a.b.createElement("option","",{value:e,text:e});n.appendChild(t)})),n.onchange=function(){e.locale=n.value},n}})},function(e,t,n){"use strict";var o=n(0),a=n(1),i=n(2),r=n(5);i.a.registerExtension({location:"column",name:"drag",visibleIndex:0,render:function(e,t){var n=o.b.createElement("button","sa-table__svg-button sa-table__drag-button");return n.appendChild(o.b.createSvgElement("drag")),n.onmousedown=function(t){e.enableColumnReorder()},n}}),i.a.registerExtension({location:"column",name:"sort",visibleIndex:1,render:function(e,t){var n=a.a.getString("descOrder"),i=a.a.getString("ascOrder"),r=o.b.createSvgButton("sorting");r.title="";var s="asc";return r.onclick=function(){"asc"==s?(r.title=n,s="desc"):(r.title=i,s="asc"),e.sortByColumn(t.columnName,s)},r.ondrag=function(e){e.stopPropagation()},r}}),i.a.registerExtension({location:"column",name:"hide",visibleIndex:2,render:function(e,t){var n=o.b.createSvgButton("hide");return n.title=a.a.getString("hideColumn"),n.onclick=function(){e.setColumnVisibility(t.columnName,!1)},n}}),i.a.registerExtension({location:"column",name:"movetodetails",visibleIndex:3,render:function(e,t){var n=o.b.createSvgButton("movetodetails");return n.title=a.a.getString("moveToDetail"),n.onclick=function(n){n.stopPropagation(),e.setColumnLocation(t.columnName,r.b.Row)},n}}),i.a.registerExtension({location:"column",name:"filter",visibleIndex:4,render:function(e,t){var n=o.b.createInput("sa-table__filter",a.a.getString("filterPlaceholder"));return n.onclick=function(e){return e.stopPropagation()},n.onchange=function(o){e.applyColumnFilter(t.columnName,n.value)},n}}),i.a.registerExtension({location:"column",name:"makepublic",visibleIndex:-1,render:function(e,t){var n=o.b.createElement("button"),i=o.b.createSvgElement("makeprivate"),r=o.b.createSvgElement("makepublic"),s=e.getColumnByName(t.columnName);function l(e){e.isPublic?(n.className="sa-table__svg-button",n.title=a.a.getString("makePrivateColumn"),i.style.display="none",r.style.display="block"):(n.className="sa-table__svg-button sa-table__svg-button--active",n.title=a.a.getString("makePublicColumn"),i.style.display="block",r.style.display="none")}return l(s),n.appendChild(i),n.appendChild(r),n.onclick=function(t){t.stopPropagation(),s.isPublic=!s.isPublic,l(s),e.onPermissionsChangedCallback&&e.onPermissionsChangedCallback(e)},n}})},,,function(e,t,n){},,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"localization",(function(){return o.a})),n.d(t,"surveyStrings",(function(){return o.b})),n.d(t,"DataTables",(function(){return h})),n.d(t,"DatatablesRow",(function(){return p})),n.d(t,"TableExtensions",(function(){return m.a})),n.d(t,"DocumentHelper",(function(){return l.b}));var o=n(1),a=(n(8),n(9),n(10),n(12),n(13),n(14),n(6),n(3)),i=n(7),r=n(4),s=n(5),l=n(0);n(17);if(document){var c=n(11),u=document.createElement("div");u.style.display="none",u.innerHTML=c,document.head.appendChild(u)}var d=window.jQuery,h=function(e){function t(t,n,o,a){void 0===a&&(a=[]);var i=e.call(this,t,n,o,a)||this;return i.currentPageNumber=0,i.onColumnsReorder=new r.Event,i}return Object(a.b)(t,e),t.initJQuery=function(e){d=e},t.prototype.destroy=function(){if(this.renderResult){var t=this.renderResult.children[0];d.fn.DataTable.isDataTable(t)&&d(t).DataTable().destroy(),this.datatableApi=void 0,e.prototype.destroy.call(this)}},t.prototype.setColumnVisibility=function(t,n){e.prototype.setColumnVisibility.call(this,t,n),this.datatableApi.column(t+":name").visible(n)},t.prototype.setColumnLocation=function(t,n){e.prototype.setColumnLocation.call(this,t,n);var o=this.datatableApi.column(t+":name"),a=n==s.b.Column;o.visible(a)},t.prototype.applyFilter=function(e){this.datatableApi.search(e).draw(!1)},t.prototype.applyColumnFilter=function(e,t){var n=this.datatableApi.column(e+":name");n.search()!==t&&n.search(t).draw(!1)},t.prototype.sortByColumn=function(e,t){this.datatableApi.column(e+":name").order(t).draw(!1)},t.prototype.setPageSize=function(t){e.prototype.setPageSize.call(this,t),this.isRendered&&this.datatableApi.page.len(t).draw(!1)},t.prototype.setPageNumber=function(t){e.prototype.setPageNumber.call(this,t),this.isRendered&&this.datatableApi.page(t).draw(!1)},t.prototype.getPageNumber=function(){return this.isRendered?this.datatableApi.page():0},t.prototype.render=function(t){var n=this;e.prototype.render.call(this,t);t.className+=" sa-table sa-datatables";var o=l.b.createElement("table",""),a=this.getColumns(),i=a.map((function(e){return e.data})),r="sa-table__btn sa-table__btn--small sa-table__btn--gray",s=d.extend(!0,{buttons:[{extend:"copy",className:r},{extend:"csv",className:r},{extend:"print",className:r}],dom:'B<"sa-table__header-extensions">prtip',data:this.tableData,pageLength:this.currentPageSize,responsive:!1,scrollX:!0,columns:a,colReorder:{fixedColumnsLeft:1,realtime:!1},language:{sSearch:" ",searchPlaceholder:"Search...",sLengthMenu:"Show _MENU_ entries",paginate:{previous:" ",next:" "}},select:"api",headerCallback:function(e,t,a,r,s){var c=d(o).dataTable().api(),u=n;c.columns().eq(0).each((function(e){var t=d(c.columns(e).header());if(t.unbind("click.DT"),i[e]&&0===t.has("button").length){var o=l.b.createElement("div","sa-table__action-container");u.extensions.render(o,"column",{columnName:i[e]}),o.onmousedown=function(e){u.isColumnReorderEnabled?n.disableColumnReorder():e.stopPropagation()}}t.prepend(o)}))}},this.options);t.appendChild(o),o.className="sa-datatables__table display responsive dataTable";var c=this.datatableApi=d(o).DataTable(s),u=d("div.sa-table__header-extensions")[0];this.extensions.render(u,"header"),c.page(this.currentPageNumber),this.datatableApi.rowGroup().enable(!1).draw(!1),c.on("column-reorder",(function(e,t,o){n.moveColumn(o.from-1,o.to-1),n.disableColumnReorder(),n.onColumnsReorder.fire(n,{columns:n.columns})})),c.rows().eq(0).each((function(e){var t=c.row(e),o=l.b.createElement("tr"),a=l.b.createElement("td","sa-datatables__details-container");o.appendChild(a);var i=t.node(),r=t.cell(t.index(),0).node(),s=new p(n,r,a,t);s.onToggleDetails.add((function(e,t){t.isExpanded?(a.colSpan=i.childElementCount,i.parentNode.insertBefore(o,i.nextSibling)):o.parentNode&&o.parentNode.removeChild(o)})),n._rows.push(s),s.render()})),c.draw(!1),this.renderResult=t},t.prototype.getColumns=function(){var e=this,t=this.columns.map((function(t){var n=e.survey.getQuestionByName(t.name);return{name:t.name,data:t.name,sTitle:n&&n.title||t.displayName,visible:e.isColumnVisible(t),orderable:!1,width:"number"==typeof t.width?t.width+"px":t.width,mRender:function(e,n,o){var a=o[t.name];return"string"==typeof a?d("<div>").text(a).html():JSON.stringify(a)}}}));return[{orderable:!1,data:null,defaultContent:""}].concat(t)},t.prototype.layout=function(){this.datatableApi&&this.datatableApi.columns.adjust()},t}(i.a),p=function(e){function t(t,n,o,a){var i=e.call(this,t,n,o)||this;return i.table=t,i.extensionsContainer=n,i.detailsContainer=o,i._innerRow=a,i.rowElement=a.node(),i.rowData=a.data(),i._innerRow=i._innerRow.row(i.rowElement),t.onColumnsReorder.add((function(){i.render()})),i}return Object(a.b)(t,e),Object.defineProperty(t.prototype,"innerRow",{get:function(){return this._innerRow.row(this.rowElement)},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this.rowElement},t.prototype.getRowData=function(){return this.rowData},t.prototype.getDataPosition=function(){return this.innerRow.index()},t.prototype.remove=function(){this.innerRow.remove().draw(),e.prototype.remove.call(this)},t}(i.b),m=n(2)}])})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("survey-core")):"function"==typeof define&&define.amd?define("SurveyAnalyticsDatatables",["survey-core"],t):"object"==typeof exports?exports.SurveyAnalyticsDatatables=t(require("survey-core")):e.SurveyAnalyticsDatatables=t(e.Survey)}(window,(function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(o,a,function(t){return e[t]}.bind(null,a));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return s}));var o=function(){function e(){}return e.createSelector=function(t,n,o){var a=document.createElement("div");a.className="sa-question__select-wrapper";var r=document.createElement("select");return r.className="sa-question__select",t.forEach((function(t){var o=e.createElement("option","",{value:t.value,text:t.text,selected:n(t)});r.appendChild(o)})),r.onchange=o,a.appendChild(r),a},e.createButton=function(t,n,o){return void 0===n&&(n=""),void 0===o&&(o="sa-toolbar__button"),e.createElement("span",o,{innerText:n,onclick:t})},e.createElement=function(e,t,n){void 0===t&&(t="");var o=document.createElement(e);return o.className=t,n&&Object.keys(n).forEach((function(e){o[e]=n[e]})),o},e.createSvgElement=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=document.createElementNS("http://www.w3.org/2000/svg","use");return n.setAttributeNS("http://www.w3.org/1999/xlink","href","#sa-svg-"+e),t.appendChild(n),t},e.createSvgButton=function(t){var n=e.createElement("button","sa-table__svg-button");return n.appendChild(e.createSvgElement(t)),n},e.createSvgToggleButton=function(t,n,o,a,r,i,s,l){void 0===s&&(s="first"),void 0===l&&(l="sa-toolbar__button sa-toolbar__svg-button");var c=e.createSvgElement(t),u=e.createSvgElement(n),d=e.createElement("button",l);return"first"===s?(d.title=o,d.appendChild(c)):(s="second")&&(d.title=a,d.appendChild(u)),d.onclick=function(e){"first"===s?(s="second",d.title=a,d.removeChild(c),d.appendChild(u),i(e)):"second"===s&&(s="first",d.title=o,d.removeChild(u),d.appendChild(c),r(e))},d},e.createInput=function(t,n,o){return void 0===n&&(n=""),void 0===o&&(o=""),e.createElement("input",t,{placeholder:n,defaultValue:o})},e}(),a={runningInBrowser:"function"==typeof window.URL.createObjectURL};function r(){return a.runningInBrowser}function i(){var e=o.createElement("div","sa-commercial"),t=o.createElement("a","sa-commercial__text",{href:"https://www.surveyjs.io/Buy",target:"_blank"}),n=o.createElement("span",""),a=o.createSvgElement("noncommercial"),r=o.createElement("span","sa-commercial__product",{innerHTML:"Please purchase a SurveyJS Analytics developer license\n to\n use it in your\n app."});return e.appendChild(t).appendChild(n),n.appendChild(a),n.appendChild(r),e}var s=function(){function e(){}return e.zipArrays=function(e,t){for(var n=[],o=0;o<Math.min(e.length,t.length);o++)n[o]=[e[o],t[o]];return n},e.unzipArrays=function(e){var t={first:[],second:[]};return e.forEach((function(e,n){t.first[n]=e[0],t.second[n]=e[1]})),t},e.sortDictionary=function(e,t,n){var o=this.zipArrays(e,t),a=function(e,t,n){void 0===n&&(n=!0);var o=e[1]<t[1]?1:e[1]==t[1]?0:-1;return n?o:-1*o};o.sort((function(e,t){return n?a(e,t,!1):a(e,t)}));var r=this.unzipArrays(o);return{keys:r.first,values:r.second}},e.toPercentage=function(e,t){return e/t*100},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));var o={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",chartType_bar:"Bar",chartType_stackedbar:"Stacked Bar",chartType_doughnut:"Doughnut",chartType_pie:"Pie",chartType_scatter:"Scatter",chartType_gauge:"Gauge",chartType_bullet:"Bullet",hideButton:"Hide",makePrivateButton:"Make private",makePublicButton:"Make public",showButton:"Show",resetFilter:"Reset Filter",changeLocale:"Change Locale",clearButton:"Clear",addElement:"Choose question to show...",defaultOrder:"Default",ascOrder:"Ascending",descOrder:"Descending",showMinorColumns:"Show minor columns",otherCommentTitle:"Other items and comments",showPercentages:"Show percentages",hidePercentages:"Hide percentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV"},a={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 n=t[e];return void 0===n&&(n=this.locales.en[e]||e),n},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 n in this.locales)e.push(n);return e.sort(),e}},r=o;a.locales.en=o,a.localeNames.en="english"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o=function(){function e(e){this.table=e,this.renderedExtensions=[]}return e.prototype.render=function(t,n,o){var a=this,r=e.extensions[n];r&&(r=this.sortExtensions(r)).forEach((function(e){if(e.render){var n=e.render(a.table,o);n&&(t.appendChild(n),a.renderedExtensions.push(e))}}))},e.prototype.destroy=function(){this.renderedExtensions.forEach((function(e){e.destroy&&e.destroy()})),this.renderedExtensions=[]},e.registerExtension=function(e){this.extensions[e.location]||(this.extensions[e.location]=[]),this.extensions[e.location].push(e)},e.findExtension=function(e,t){return this.extensions[e]&&this.extensions[e].filter((function(e){return e.name==t}))[0]||null},e.prototype.sortExtensions=function(e){if(Array.isArray(e))return[].concat(e.filter((function(e){return e.visibleIndex>=0}))).sort((function(e,t){return e.visibleIndex-t.visibleIndex}))},e.extensions={},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e};function a(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}},function(t,n){t.exports=e},function(e,t,n){"use strict";var o,a;n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),function(e){e[e.Column=0]="Column",e[e.Row=1]="Row"}(o||(o={})),function(e){e[e.Text=0]="Text",e[e.FileLink=1]="FileLink",e[e.Image=2]="Image"}(a||(a={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var o=n(3),a=n(4),r=n(5),i=n(7),s=n(1),l=n(2),c=n(0),u=function(){function e(t,n,o,i){var c=this;void 0===i&&(i=[]),this.survey=t,this.data=n,this.options=o,this._columns=i,this.haveCommercialLicense=!1,this.currentPageSize=5,this._rows=[],this.onColumnsVisibilityChanged=new a.Event,this.onColumnsLocationChanged=new a.Event,this.onRowRemoved=new a.Event,this.buildColumns=function(e){return c.survey.getAllQuestions().map((function(e){return{name:e.name,displayName:(e.title||"").trim()||e.name,dataType:"file"!==e.getType()?r.a.Text:r.a.FileLink,isVisible:"file"!==e.getType(),isPublic:!0,location:r.b.Column}}))},this.onStateChanged=new a.Event,0===i.length&&(this._columns=this.buildColumns(t)),this.initTableData(n),s.a.currentLocale=this.survey.locale,0===i.length&&(this._columns=this.buildColumns(t)),this.extensions=new l.a(this),this.haveCommercialLicense=e.haveCommercialLicense||!!o&&void 0!==o.haveCommercialLicense&&o.haveCommercialLicense}return e.prototype.getData=function(){return this.data},e.prototype.render=function(e){e.innerHTML="",this.haveCommercialLicense||e.appendChild(Object(c.d)())},e.prototype.enableColumnReorder=function(){this.isColumnReorderEnabled=!0},e.prototype.disableColumnReorder=function(){this.isColumnReorderEnabled=!1},e.prototype.getPageNumber=function(){return this.currentPageNumber},e.prototype.setPageNumber=function(e){this.currentPageNumber=e},e.prototype.getPageSize=function(){return this.currentPageSize},e.prototype.setPageSize=function(e){this.currentPageSize=e,this.onStateChanged.fire(this,this.state)},e.prototype.getCreatedRows=function(){return[].concat(this._rows)},e.prototype.clearCreatedRows=function(){this._rows.forEach((function(e){e.destroy()})),this._rows=[]},e.prototype.isColumnVisible=function(e){return e.location===r.b.Column&&e.isVisible},Object.defineProperty(e.prototype,"columns",{get:function(){return[].concat(this._columns)},set:function(e){this._columns=e,this.refresh(!0),this.onStateChanged.fire(this,this.state)},enumerable:!1,configurable:!0}),e.prototype.initTableData=function(e){var t=this;this.tableData=(e||[]).map((function(e){var n={};return t.survey.data=e,t._columns.forEach((function(o){var a=e[o.name],r=t.survey.getQuestionByName(o.name);r&&(a=r.displayValue),n[o.name]="string"==typeof a?a:JSON.stringify(a)||""})),n}))},e.prototype.moveColumn=function(e,t){var n=this._columns.splice(e,1);this._columns.splice(t,0,n[0]),this.onStateChanged.fire(this,this.state)},e.prototype.setColumnLocation=function(e,t){this.getColumnByName(e).location=t,this.onColumnsLocationChanged.fire(this,{columnName:e,location:t}),this.onStateChanged.fire(this,this.state)},e.prototype.getColumnByName=function(e){return this._columns.filter((function(t){return t.name===e}))[0]},e.prototype.setColumnVisibility=function(e,t){this.getColumnByName(e).isVisible=t,this.onColumnsVisibilityChanged.fire(this,{columnName:e,columnVisibility:t}),this.onStateChanged.fire(this,this.state)},e.prototype.setColumnWidth=function(e,t){this.getColumnByName(e).width=t,this.onStateChanged.fire(this,this.state)},e.prototype.removeRow=function(e){var t=this._rows.indexOf(e);this._rows.splice(t,1),this.onRowRemoved.fire(this,{row:e})},Object.defineProperty(e.prototype,"locale",{get:function(){return s.a.currentLocale},set:function(e){this.survey.locale=e,s.a.currentLocale=e,this.refresh(!0),this.onStateChanged.fire(this,this.state)},enumerable:!1,configurable:!0}),e.prototype.getLocales=function(){return[].concat(this.survey.getUsedLocales())},e.prototype.refresh=function(e){if(void 0===e&&(e=!1),this.isRendered){this.currentPageNumber=this.getPageNumber(),e&&this.initTableData(this.data);var t=this.renderResult;this.destroy(),this.render(t),this.setPageSize(this.currentPageSize),this.setPageNumber(this.currentPageNumber)}},e.prototype.destroy=function(){this.clearCreatedRows(),this.extensions.destroy(),this.renderResult.innerHTML="",this.renderResult=void 0},Object.defineProperty(e.prototype,"isRendered",{get:function(){return!!this.renderResult},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return{locale:s.a.currentLocale,elements:[].concat(this._columns),pageSize:this.currentPageSize}},set:function(e){e&&(void 0!==e.locale&&(s.a.currentLocale=e.locale,this.survey.locale=e.locale,this.initTableData(this.data)),void 0!==e.elements&&(this._columns=e.elements),void 0!==e.pageSize&&(this.currentPageSize=e.pageSize))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"permissions",{get:function(){return this._columns.map((function(e){return{name:e.name,isPublic:e.isPublic}}))},set:function(e){var t=this._columns.map((function(t){return e.forEach((function(e){e.name===t.name&&(t.isPublic=e.isPublic)})),Object(o.a)({},t)}));this._columns=[].concat(t),this.onPermissionsChangedCallback&&this.onPermissionsChangedCallback(this)},enumerable:!1,configurable:!0}),e.haveCommercialLicense=!1,e}(),d=function(){function e(e,t,n){var o=this;this.table=e,this.extensionsContainer=t,this.detailsContainer=n,this.detailedRowClass="sa-table__detail-row",this.isDetailsExpanded=!1,this.onToggleDetails=new a.Event,this.onColumnLocationChangedCallback=function(){o.closeDetails()},this.details=new i.a(e,this,n),this.extensions=new l.a(e),e.onColumnsLocationChanged.add(this.onColumnLocationChangedCallback)}return e.prototype.render=function(){this.extensions.render(this.extensionsContainer,"row",{row:this})},e.prototype.openDetails=function(){this.details.open(),this.getElement().className+=" "+this.detailedRowClass,this.onToggleDetails.fire(this,{isExpanded:!0}),this.isDetailsExpanded=!0},e.prototype.closeDetails=function(){this.details.close(),this.getElement().classList.remove(this.detailedRowClass),this.onToggleDetails.fire(this,{isExpanded:!1}),this.isDetailsExpanded=!1},e.prototype.toggleDetails=function(){this.isDetailsExpanded?this.closeDetails():this.openDetails()},e.prototype.getIsSelected=function(){return this.isSelected},e.prototype.toggleSelect=function(){this.isSelected=!this.isSelected},e.prototype.remove=function(){this.table.removeRow(this)},e.prototype.destroy=function(){this.table.onColumnsLocationChanged.remove(this.onColumnLocationChangedCallback),this.extensions.destroy()},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(0),a=n(5),r=n(2),i=n(1),s=function(){function e(e,t,n){var r=this;this.table=e,this.row=t,this.targetNode=n,this.location="details",this.createShowAsColumnButton=function(e){var t=o.b.createElement("button","sa-table__btn sa-table__btn--gray",{innerHTML:i.a.getString("showAsColumn")});return t.onclick=function(t){t.stopPropagation(),r.table.setColumnLocation(e,a.b.Column)},t};var s=o.b.createElement("table","sa-table__detail-table");this.detailsTable=s,this.table.onColumnsLocationChanged.add((function(){r.close()}))}return e.prototype.open=function(){var e=this;this.detailsTable.innerHTML="";var t=[];this.table.columns.filter((function(e){return e.location===a.b.Row&&e})).forEach((function(n){var a=o.b.createElement("tr","sa-table__detail"),r=o.b.createElement("td","",{innerHTML:n.displayName}),i=o.b.createElement("td");i.textContent=e.row.getRowData()[n.name];var s=o.b.createElement("td");s.appendChild(e.createShowAsColumnButton(n.name)),a.appendChild(r),a.appendChild(i),a.appendChild(s),t.push(a)}));var n=o.b.createElement("tr","sa-table__detail"),i=o.b.createElement("td","",{colSpan:3});new r.a(this.table).render(i,"details",{row:this.row}),0!=i.children.length&&(n.appendChild(i),t.push(n)),t.forEach((function(t){e.detailsTable.appendChild(t)})),this.targetNode.appendChild(this.detailsTable)},e.prototype.close=function(){this.detailsTable.parentNode&&this.detailsTable.parentNode.removeChild(this.detailsTable)},e}()},function(e,t,n){"use strict";var o=n(1);o.a.locales.fa={groupButton:"گروه بندی با",ungroupButton:"حذف گروه",selectButton:"انتخاب",hideColumn:"مخفی کردن ستون",showColumn:"نمایش ستون",moveToDetail:"انتقال به جزئیات",showAsColumn:"نمایش به عنوان ستون",visualizer_text:"متون در جدول",visualizer_wordcloud:"ابر کلمات",chartType_bar:"میله ای",chartType_pie:"دابره ای(pie)",chartType_scatter:"پراکندگی(Scatter)",chartType_gauge:"عقربه ای",chartType_bullet:"Bullet",hideButton:"مخفی",resetFilter:"بازنشانی فیلترها",clearButton:"پاک کردن",addElement:"انتخاب سوال برای نمایش..."},o.a.localeNames.fa="Farsi(Persian)"},function(e,t,n){"use strict";var o=n(1);o.a.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",visualizer_text:"Textes en table",visualizer_wordcloud:"Nuages de mots",chartType_bar:"Barres",chartType_stackedbar:"Barres empilées",chartType_doughnut:"Anneau",chartType_pie:"Secteurs",chartType_scatter:"Nuages de points",chartType_gauge:"Gauge",chartType_bullet:"Bulles",hideButton:"Masquer",resetFilter:"Rafraichir Filtres",clearButton:"Rafraichir",addElement:"Choisir la question à afficher...",defaultOrder:"Defaut",ascOrder:"Ascendant",descOrder:"Descendant",showMinorColumns:"Afficher les colonnes mineures"},o.a.localeNames.fr="French"},function(e,t,n){"use strict";var o=n(1);o.a.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",chartType_bar:"Stolpediagram",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",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"},o.a.localeNames.no="Norwegian"},function(e,t,n){"use strict";var o=n(1);o.a.locales.ru={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",visualizer_text:"Texts in table",visualizer_wordcloud:"Wordcloud",chartType_bar:"Bar",chartType_stackedbar:"Stacked Bar",chartType_doughnut:"Doughnut",chartType_pie:"Pie",chartType_scatter:"Scatter",chartType_gauge:"Gauge",chartType_bullet:"Bullet",hideButton:"Скрыть",showButton:"Показать",resetFilter:"Очистить фильтр",changeLocale:"Сменить язык",clearButton:"Clear",addElement:"Choose question to show...",defaultOrder:"Default",ascOrder:"Ascending",descOrder:"Descending",showMinorColumns:"Show minor columns",otherCommentTitle:"Other items and comments"},o.a.localeNames.ru="Russian"},function(e,t){e.exports='<svg style="display:none;"><symbol viewBox="0 0 16 16" id="sa-svg-detail"><circle class="st0" cx="1.5" cy="8.5" r="1.5"></circle><circle class="st0" cx="7.5" cy="8.5" r="1.5"></circle><circle class="st0" cx="13.5" cy="8.5" r="1.5"></circle></symbol><symbol viewBox="0 0 16 16" id="sa-svg-drag"><path class="st0" d="M13 5l-1 1 1 1H9V3l1 1 1-1-3-3-3 3 1 1 1-1v4H3l1-1-1-1-3 3 3 3 1-1-1-1h4v4l-1-1-1 1 3 3 3-3-1-1-1 1V9h4l-1 1 1 1 3-3z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-hide"><path class="st1" d="M12.79 4.2L16 1l-1-1-3.32 3.32C10.57 2.55 9.32 2 8 2 3.63 2 0 7.97 0 7.97s1.27 2.1 3.21 3.82l-3.23 3.23.98.98 3.35-3.34C5.41 13.44 6.67 14 8 14c4.37 0 8-6 8-6s-1.27-2.09-3.21-3.8zM2 7.97c1.07-1.47 3.61-4 6-4 .8 0 1.6.27 2.35.68l-.78.78c-.46-.29-.99-.46-1.57-.46-1.66 0-3 1.34-3 3 0 .58.17 1.11.46 1.57l-.97.97A13.38 13.38 0 0 1 2 7.97zm6 4c-.8 0-1.59-.27-2.33-.67l.78-.77c.45.27.98.44 1.55.44 1.66 0 3-1.34 3-3 0-.57-.17-1.09-.44-1.55l.98-.98c1.11.87 2.01 1.91 2.46 2.52-1.07 1.48-3.61 4.01-6 4.01z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-makeprivate"><circle class="st0" cx="8" cy="4" r="3"></circle><path class="st0" d="M8 8c-3.31 0-6 2.73-6 4.67S5.27 15 8 15s6-.4 6-2.33S11.31 8 8 8z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-makepublic"><circle class="st0" cx="6" cy="5" r="3"></circle><path class="st0" d="M10 5c0 .34-.06.67-.14.99.05 0 .09.01.14.01 1.66 0 3-1.34 3-3s-1.34-3-3-3C8.97 0 8.07.52 7.53 1.3 8.98 1.91 10 3.33 10 5zM6 9c-3.31 0-6 2.73-6 4.67S3.27 16 6 16s6-.4 6-2.33S9.31 9 6 9zM10 7c-.19 0-.38.01-.57.03a4.14 4.14 0 0 1-1.37 1.39c3 .83 5.23 3.31 5.42 5.28 1.44-.31 2.52-.92 2.52-2.03C16 9.74 13.31 7 10 7z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-movetodetails"><circle class="st0" cx="1.5" cy="14.5" r="1.5"></circle><circle class="st0" cx="7.5" cy="14.5" r="1.5"></circle><circle class="st0" cx="13.5" cy="14.5" r="1.5"></circle><path class="st0" d="M12 1h3v9h-3zM2.02 7.02L1 6 0 7l3 3 3-3-1-1-.94.94C4.33 4.73 6.21 3 8.5 3c.17 0 .33.03.5.05V1.03C8.83 1.01 8.67 1 8.5 1 5.08 1 2.27 3.66 2.02 7.02z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-noncommercial"><path d="M8 0L0 15h16L8 0zm1 13H7v-2h2v2zm-2-3V5h2v5H7z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-sorting"><path class="st0" d="M8 3l2 2 1-1-3-3-3 3 1 1zM8 13l-2-2-1 1 3 3 3-3-1-1z"></path></symbol></svg>'},function(e,t,n){"use strict";var o=n(1),a=n(0),r=n(2);r.a.registerExtension({location:"row",name:"details",visibleIndex:0,render:function(e,t){var n=a.b.createSvgButton("detail");return n.title=o.a.getString("showMinorColumns"),n.className+=" sa-table__row-extension",n.onclick=function(){t.row.toggleDetails()},n}}),r.a.registerExtension({location:"row",name:"select",visibleIndex:-1,render:function(e,t){var n=t.row,o=a.b.createElement("input","sa-table__row-extension",{type:"checkbox"});return o.checked=n.getIsSelected(),o.onchange=function(){n.toggleSelect()},o}})},function(e,t,n){"use strict";var o=n(1),a=n(0),r=n(2);r.a.registerExtension({location:"header",name:"filter",visibleIndex:0,render:function(e){var t=a.b.createInput("sa-table__global-filter sa-table__header-extension",o.a.getString("filterPlaceholder"));return t.onchange=function(t){e.applyFilter(t.target.value)},t}}),r.a.registerExtension({location:"header",name:"showcolumn",visibleIndex:2,destroy:function(){this.onDestroy()},render:function(e){var t=a.b.createElement("select","sa-table__show-column sa-table__header-extension");function n(){var n=e.columns.filter((function(e){return!e.isVisible}));if(0!=n.length){t.style.display="inline-block",t.innerHTML="";var r=a.b.createElement("option","",{text:o.a.getString("showColumn"),disabled:!0,selected:!0});t.appendChild(r),n.forEach((function(e){var n=e.displayName;n.length>20&&(n=n.substring(0,20)+"...");var o=a.b.createElement("option","",{text:n,title:e.displayName,value:e.name});t.appendChild(o)}))}else t.style.display="none"}t.onchange=function(t){var n=t.target.value;t.stopPropagation(),n&&e.setColumnVisibility(n,!0)},n();var r=function(){n()};return e.onColumnsVisibilityChanged.add(r),this.onDestroy=function(){e.onColumnsVisibilityChanged.remove(r)},t}}),r.a.registerExtension({location:"header",name:"showentries",visibleIndex:3,render:function(e){var t=a.b.createElement("div","sa-table__entries"),n=a.b.createElement("span","sa-table__entries-label sa-table__entries-label--right",{innerHTML:o.a.getString("showLabel")}),r=a.b.createElement("span","sa-table__entries-label sa-table__entries-label--left",{innerHTML:o.a.getString("entriesLabel")});return t.appendChild(n),t.appendChild(function(e){var t=a.b.createElement("select");return["1","5","10","25","50","75","100"].forEach((function(e){var n=a.b.createElement("option","",{value:e,text:e});t.appendChild(n)})),t.value=String(e.getPageSize()),t.onchange=function(){e.setPageSize(Number(t.value))},t}(e)),t.appendChild(r),t}}),r.a.registerExtension({location:"header",name:"removerows",visibleIndex:-1,render:function(e){var t=a.b.createElement("button","sa-table__btn sa-table__btn--green sa-table__header-extension ",{innerHTML:o.a.getString("removeRows")});return t.onclick=function(){e.getCreatedRows().forEach((function(e){e.getIsSelected()&&e.remove()}))},t}}),r.a.registerExtension({location:"header",name:"changelocale",visibleIndex:1,render:function(e){var t=e.getLocales();if(t.length<2)return null;var n=a.b.createElement("select","sa-table__header-extension",{});return[o.a.getString("changeLocale")].concat(t).forEach((function(e){var t=a.b.createElement("option","",{value:e,text:e});n.appendChild(t)})),n.onchange=function(){e.locale=n.value},n}})},function(e,t,n){"use strict";var o=n(0),a=n(1),r=n(2),i=n(5);r.a.registerExtension({location:"column",name:"drag",visibleIndex:0,render:function(e,t){var n=o.b.createElement("button","sa-table__svg-button sa-table__drag-button");return n.appendChild(o.b.createSvgElement("drag")),n.onmousedown=function(t){e.enableColumnReorder()},n}}),r.a.registerExtension({location:"column",name:"sort",visibleIndex:1,render:function(e,t){var n=a.a.getString("descOrder"),r=a.a.getString("ascOrder"),i=o.b.createSvgButton("sorting");i.title="";var s="asc";return i.onclick=function(){"asc"==s?(i.title=n,s="desc"):(i.title=r,s="asc"),e.sortByColumn(t.columnName,s)},i.ondrag=function(e){e.stopPropagation()},i}}),r.a.registerExtension({location:"column",name:"hide",visibleIndex:2,render:function(e,t){var n=o.b.createSvgButton("hide");return n.title=a.a.getString("hideColumn"),n.onclick=function(){e.setColumnVisibility(t.columnName,!1)},n}}),r.a.registerExtension({location:"column",name:"movetodetails",visibleIndex:3,render:function(e,t){var n=o.b.createSvgButton("movetodetails");return n.title=a.a.getString("moveToDetail"),n.onclick=function(n){n.stopPropagation(),e.setColumnLocation(t.columnName,i.b.Row)},n}}),r.a.registerExtension({location:"column",name:"filter",visibleIndex:4,render:function(e,t){var n=o.b.createInput("sa-table__filter",a.a.getString("filterPlaceholder"));return n.onclick=function(e){return e.stopPropagation()},n.onchange=function(o){e.applyColumnFilter(t.columnName,n.value)},n}}),r.a.registerExtension({location:"column",name:"makepublic",visibleIndex:-1,render:function(e,t){var n=o.b.createElement("button"),r=o.b.createSvgElement("makeprivate"),i=o.b.createSvgElement("makepublic"),s=e.getColumnByName(t.columnName);function l(e){e.isPublic?(n.className="sa-table__svg-button",n.title=a.a.getString("makePrivateColumn"),r.style.display="none",i.style.display="block"):(n.className="sa-table__svg-button sa-table__svg-button--active",n.title=a.a.getString("makePublicColumn"),r.style.display="block",i.style.display="none")}return l(s),n.appendChild(r),n.appendChild(i),n.onclick=function(t){t.stopPropagation(),s.isPublic=!s.isPublic,l(s),e.onPermissionsChangedCallback&&e.onPermissionsChangedCallback(e)},n}})},,,function(e,t,n){},,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"localization",(function(){return o.a})),n.d(t,"surveyStrings",(function(){return o.b})),n.d(t,"DataTables",(function(){return h})),n.d(t,"DatatablesRow",(function(){return p})),n.d(t,"TableExtensions",(function(){return m.a})),n.d(t,"DocumentHelper",(function(){return l.b}));var o=n(1),a=(n(8),n(9),n(10),n(11),n(13),n(14),n(15),n(7),n(3)),r=n(6),i=n(4),s=n(5),l=n(0);n(18);if(document){var c=n(12),u=document.createElement("div");u.style.display="none",u.innerHTML=c,document.head.appendChild(u)}var d=window.jQuery,h=function(e){function t(t,n,o,a){void 0===a&&(a=[]);var r=e.call(this,t,n,o,a)||this;return r.currentPageNumber=0,r.onColumnsReorder=new i.Event,r}return Object(a.b)(t,e),t.initJQuery=function(e){d=e},Object.defineProperty(t,"haveCommercialLicense",{set:function(e){r.a.haveCommercialLicense=e},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){if(this.renderResult){var t=this.renderResult.children[0];d.fn.DataTable.isDataTable(t)&&d(t).DataTable().destroy(),this.datatableApi=void 0,e.prototype.destroy.call(this)}},t.prototype.setColumnVisibility=function(t,n){e.prototype.setColumnVisibility.call(this,t,n),this.datatableApi.column(t+":name").visible(n)},t.prototype.setColumnLocation=function(t,n){e.prototype.setColumnLocation.call(this,t,n);var o=this.datatableApi.column(t+":name"),a=n==s.b.Column;o.visible(a)},t.prototype.applyFilter=function(e){this.datatableApi.search(e).draw(!1)},t.prototype.applyColumnFilter=function(e,t){var n=this.datatableApi.column(e+":name");n.search()!==t&&n.search(t).draw(!1)},t.prototype.sortByColumn=function(e,t){this.datatableApi.column(e+":name").order(t).draw(!1)},t.prototype.setPageSize=function(t){e.prototype.setPageSize.call(this,t),this.isRendered&&this.datatableApi.page.len(t).draw(!1)},t.prototype.setPageNumber=function(t){e.prototype.setPageNumber.call(this,t),this.isRendered&&this.datatableApi.page(t).draw(!1)},t.prototype.getPageNumber=function(){return this.isRendered?this.datatableApi.page():0},t.prototype.render=function(t){var n=this;e.prototype.render.call(this,t);t.className+=" sa-table sa-datatables";var o=l.b.createElement("table",""),a=this.getColumns(),r=a.map((function(e){return e.data})),i="sa-table__btn sa-table__btn--small sa-table__btn--gray",s=d.extend(!0,{buttons:[{extend:"copy",className:i},{extend:"csv",className:i},{extend:"print",className:i}],dom:'B<"sa-table__header-extensions">prtip',data:this.tableData,pageLength:this.currentPageSize,responsive:!1,scrollX:!0,columns:a,colReorder:{fixedColumnsLeft:1,realtime:!1},language:{sSearch:" ",searchPlaceholder:"Search...",sLengthMenu:"Show _MENU_ entries",paginate:{previous:" ",next:" "}},select:"api",headerCallback:function(e,t,a,i,s){var c=d(o).dataTable().api(),u=n;c.columns().eq(0).each((function(e){var t=d(c.columns(e).header());if(t.unbind("click.DT"),r[e]&&0===t.has("button").length){var o=l.b.createElement("div","sa-table__action-container");u.extensions.render(o,"column",{columnName:r[e]}),o.onmousedown=function(e){u.isColumnReorderEnabled?n.disableColumnReorder():e.stopPropagation()}}t.prepend(o)}))}},this.options);t.appendChild(o),o.className="sa-datatables__table display responsive dataTable";var c=this.datatableApi=d(o).DataTable(s),u=d("div.sa-table__header-extensions")[0];this.extensions.render(u,"header"),c.page(this.currentPageNumber),this.datatableApi.rowGroup().enable(!1).draw(!1),c.on("column-reorder",(function(e,t,o){n.moveColumn(o.from-1,o.to-1),n.disableColumnReorder(),n.onColumnsReorder.fire(n,{columns:n.columns})})),c.rows().eq(0).each((function(e){var t=c.row(e),o=l.b.createElement("tr"),a=l.b.createElement("td","sa-datatables__details-container");o.appendChild(a);var r=t.node(),i=t.cell(t.index(),0).node(),s=new p(n,i,a,t);s.onToggleDetails.add((function(e,t){t.isExpanded?(a.colSpan=r.childElementCount,r.parentNode.insertBefore(o,r.nextSibling)):o.parentNode&&o.parentNode.removeChild(o)})),n._rows.push(s),s.render()})),c.draw(!1),this.renderResult=t},t.prototype.getColumns=function(){var e=this,t=this.columns.map((function(t){var n=e.survey.getQuestionByName(t.name);return{name:t.name,data:t.name,sTitle:n&&n.title||t.displayName,visible:e.isColumnVisible(t),orderable:!1,width:"number"==typeof t.width?t.width+"px":t.width,mRender:function(e,n,o){var a=o[t.name];return"string"==typeof a?d("<div>").text(a).html():JSON.stringify(a)}}}));return[{orderable:!1,data:null,defaultContent:""}].concat(t)},t.prototype.layout=function(){this.datatableApi&&this.datatableApi.columns.adjust()},t}(r.a),p=function(e){function t(t,n,o,a){var r=e.call(this,t,n,o)||this;return r.table=t,r.extensionsContainer=n,r.detailsContainer=o,r._innerRow=a,r.rowElement=a.node(),r.rowData=a.data(),r._innerRow=r._innerRow.row(r.rowElement),t.onColumnsReorder.add((function(){r.render()})),r}return Object(a.b)(t,e),Object.defineProperty(t.prototype,"innerRow",{get:function(){return this._innerRow.row(this.rowElement)},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this.rowElement},t.prototype.getRowData=function(){return this.rowData},t.prototype.getDataPosition=function(){return this.innerRow.index()},t.prototype.remove=function(){this.innerRow.remove().draw(),e.prototype.remove.call(this)},t}(r.b),m=n(2)}])})); |
/*! | ||
* surveyjs - SurveyJS Analytics library v1.8.3 | ||
* surveyjs - SurveyJS Analytics library v1.8.4 | ||
* Copyright (c) 2015-2019 Devsoft Baltic OÜ - http://surveyjs.io/ | ||
* License: MIT (http://www.opensource.org/licenses/mit-license.php) | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("survey-core"),require("tabulator-tables")):"function"==typeof define&&define.amd?define("SurveyAnalyticsTabulator",["survey-core","tabulator-tables"],t):"object"==typeof exports?exports.SurveyAnalyticsTabulator=t(require("survey-core"),require("tabulator-tables")):e.SurveyAnalyticsTabulator=t(e.Survey,e.Tabulator)}(window,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return s}));var o=function(){function e(){}return e.createSelector=function(t,n,o){var i=document.createElement("div");i.className="sa-question__select-wrapper";var a=document.createElement("select");return a.className="sa-question__select",t.forEach((function(t){var o=e.createElement("option","",{value:t.value,text:t.text,selected:n(t)});a.appendChild(o)})),a.onchange=o,i.appendChild(a),i},e.createButton=function(t,n,o){return void 0===n&&(n=""),void 0===o&&(o="sa-toolbar__button"),e.createElement("span",o,{innerText:n,onclick:t})},e.createElement=function(e,t,n){void 0===t&&(t="");var o=document.createElement(e);return o.className=t,n&&Object.keys(n).forEach((function(e){o[e]=n[e]})),o},e.createSvgElement=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=document.createElementNS("http://www.w3.org/2000/svg","use");return n.setAttributeNS("http://www.w3.org/1999/xlink","href","#sa-svg-"+e),t.appendChild(n),t},e.createSvgButton=function(t){var n=e.createElement("button","sa-table__svg-button");return n.appendChild(e.createSvgElement(t)),n},e.createSvgToggleButton=function(t,n,o,i,a,r,s,l){void 0===s&&(s="first"),void 0===l&&(l="sa-toolbar__button sa-toolbar__svg-button");var c=e.createSvgElement(t),u=e.createSvgElement(n),d=e.createElement("button",l);return"first"===s?(d.title=o,d.appendChild(c)):(s="second")&&(d.title=i,d.appendChild(u)),d.onclick=function(e){"first"===s?(s="second",d.title=i,d.removeChild(c),d.appendChild(u),r(e)):"second"===s&&(s="first",d.title=o,d.removeChild(u),d.appendChild(c),a(e))},d},e.createInput=function(t,n,o){return void 0===n&&(n=""),void 0===o&&(o=""),e.createElement("input",t,{placeholder:n,defaultValue:o})},e}(),i={runningInBrowser:"function"==typeof window.URL.createObjectURL};function a(){return i.runningInBrowser}function r(){var e=o.createElement("div","sa-commercial"),t=o.createElement("a","sa-commercial__text",{href:"https://www.surveyjs.io/Buy",target:"_blank"}),n=o.createElement("span",""),i=o.createSvgElement("noncommercial"),a=o.createElement("span","sa-commercial__product",{innerHTML:"Please purchase a SurveyJS Analytics developer license\n to\n use it in your\n app."});return e.appendChild(t).appendChild(n),n.appendChild(i),n.appendChild(a),e}var s=function(){function e(){}return e.zipArrays=function(e,t){for(var n=[],o=0;o<Math.min(e.length,t.length);o++)n[o]=[e[o],t[o]];return n},e.unzipArrays=function(e){var t={first:[],second:[]};return e.forEach((function(e,n){t.first[n]=e[0],t.second[n]=e[1]})),t},e.sortDictionary=function(e,t,n){var o=this.zipArrays(e,t),i=function(e,t,n){void 0===n&&(n=!0);var o=e[1]<t[1]?1:e[1]==t[1]?0:-1;return n?o:-1*o};o.sort((function(e,t){return n?i(e,t,!1):i(e,t)}));var a=this.unzipArrays(o);return{keys:a.first,values:a.second}},e.toPercentage=function(e,t){return e/t*100},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var o={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",chartType_bar:"Bar",chartType_stackedbar:"Stacked Bar",chartType_doughnut:"Doughnut",chartType_pie:"Pie",chartType_scatter:"Scatter",chartType_gauge:"Gauge",chartType_bullet:"Bullet",hideButton:"Hide",makePrivateButton:"Make private",makePublicButton:"Make public",showButton:"Show",resetFilter:"Reset Filter",changeLocale:"Change Locale",clearButton:"Clear",addElement:"Choose question to show...",defaultOrder:"Default",ascOrder:"Ascending",descOrder:"Descending",showMinorColumns:"Show minor columns",otherCommentTitle:"Other items and comments",showPercentages:"Show percentages",hidePercentages:"Hide percentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV"},i={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 n=t[e];return void 0===n&&(n=this.locales.en[e]||e),n},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 n in this.locales)e.push(n);return e.sort(),e}},a=o;i.locales.en=o,i.localeNames.en="english"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o=function(){function e(e){this.table=e,this.renderedExtensions=[]}return e.prototype.render=function(t,n,o){var i=this,a=e.extensions[n];a&&(a=this.sortExtensions(a)).forEach((function(e){if(e.render){var n=e.render(i.table,o);n&&(t.appendChild(n),i.renderedExtensions.push(e))}}))},e.prototype.destroy=function(){this.renderedExtensions.forEach((function(e){e.destroy&&e.destroy()})),this.renderedExtensions=[]},e.registerExtension=function(e){this.extensions[e.location]||(this.extensions[e.location]=[]),this.extensions[e.location].push(e)},e.findExtension=function(e,t){return this.extensions[e]&&this.extensions[e].filter((function(e){return e.name==t}))[0]||null},e.prototype.sortExtensions=function(e){if(Array.isArray(e))return[].concat(e.filter((function(e){return e.visibleIndex>=0}))).sort((function(e,t){return e.visibleIndex-t.visibleIndex}))},e.extensions={},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};function i(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}},function(t,n){t.exports=e},function(e,t,n){"use strict";var o,i;n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i})),function(e){e[e.Column=0]="Column",e[e.Row=1]="Row"}(o||(o={})),function(e){e[e.Text=0]="Text",e[e.FileLink=1]="FileLink",e[e.Image=2]="Image"}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(0),i=n(5),a=n(2),r=n(1),s=function(){function e(e,t,n){var a=this;this.table=e,this.row=t,this.targetNode=n,this.location="details",this.createShowAsColumnButton=function(e){var t=o.b.createElement("button","sa-table__btn sa-table__btn--gray",{innerHTML:r.a.getString("showAsColumn")});return t.onclick=function(t){t.stopPropagation(),a.table.setColumnLocation(e,i.b.Column)},t};var s=o.b.createElement("table","sa-table__detail-table");this.detailsTable=s,this.table.onColumnsLocationChanged.add((function(){a.close()}))}return e.prototype.open=function(){var e=this;this.detailsTable.innerHTML="";var t=[];this.table.columns.filter((function(e){return e.location===i.b.Row&&e})).forEach((function(n){var i=o.b.createElement("tr","sa-table__detail"),a=o.b.createElement("td","",{innerHTML:n.displayName}),r=o.b.createElement("td");r.textContent=e.row.getRowData()[n.name];var s=o.b.createElement("td");s.appendChild(e.createShowAsColumnButton(n.name)),i.appendChild(a),i.appendChild(r),i.appendChild(s),t.push(i)}));var n=o.b.createElement("tr","sa-table__detail"),r=o.b.createElement("td","",{colSpan:3});new a.a(this.table).render(r,"details",{row:this.row}),0!=r.children.length&&(n.appendChild(r),t.push(n)),t.forEach((function(t){e.detailsTable.appendChild(t)})),this.targetNode.appendChild(this.detailsTable)},e.prototype.close=function(){this.detailsTable.parentNode&&this.detailsTable.parentNode.removeChild(this.detailsTable)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var o=n(3),i=n(4),a=n(5),r=n(6),s=n(1),l=n(2),c=n(0),u=function(){function e(e,t,n,o){var r=this;void 0===o&&(o=[]),this.survey=e,this.data=t,this.options=n,this._columns=o,this.haveCommercialLicense=!1,this.currentPageSize=5,this._rows=[],this.onColumnsVisibilityChanged=new i.Event,this.onColumnsLocationChanged=new i.Event,this.onRowRemoved=new i.Event,this.buildColumns=function(e){return r.survey.getAllQuestions().map((function(e){return{name:e.name,displayName:(e.title||"").trim()||e.name,dataType:"file"!==e.getType()?a.a.Text:a.a.FileLink,isVisible:"file"!==e.getType(),isPublic:!0,location:a.b.Column}}))},this.onStateChanged=new i.Event,0===o.length&&(this._columns=this.buildColumns(e)),this.initTableData(t),s.a.currentLocale=this.survey.locale,0===o.length&&(this._columns=this.buildColumns(e)),this.extensions=new l.a(this),this.haveCommercialLicense=!!n&&void 0!==n.haveCommercialLicense&&n.haveCommercialLicense}return e.prototype.getData=function(){return this.data},e.prototype.render=function(e){e.innerHTML="",this.haveCommercialLicense||e.appendChild(Object(c.d)())},e.prototype.enableColumnReorder=function(){this.isColumnReorderEnabled=!0},e.prototype.disableColumnReorder=function(){this.isColumnReorderEnabled=!1},e.prototype.getPageNumber=function(){return this.currentPageNumber},e.prototype.setPageNumber=function(e){this.currentPageNumber=e},e.prototype.getPageSize=function(){return this.currentPageSize},e.prototype.setPageSize=function(e){this.currentPageSize=e,this.onStateChanged.fire(this,this.state)},e.prototype.getCreatedRows=function(){return[].concat(this._rows)},e.prototype.clearCreatedRows=function(){this._rows.forEach((function(e){e.destroy()})),this._rows=[]},e.prototype.isColumnVisible=function(e){return e.location===a.b.Column&&e.isVisible},Object.defineProperty(e.prototype,"columns",{get:function(){return[].concat(this._columns)},set:function(e){this._columns=e,this.refresh(!0),this.onStateChanged.fire(this,this.state)},enumerable:!1,configurable:!0}),e.prototype.initTableData=function(e){var t=this;this.tableData=(e||[]).map((function(e){var n={};return t.survey.data=e,t._columns.forEach((function(o){var i=e[o.name],a=t.survey.getQuestionByName(o.name);a&&(i=a.displayValue),n[o.name]="string"==typeof i?i:JSON.stringify(i)||""})),n}))},e.prototype.moveColumn=function(e,t){var n=this._columns.splice(e,1);this._columns.splice(t,0,n[0]),this.onStateChanged.fire(this,this.state)},e.prototype.setColumnLocation=function(e,t){this.getColumnByName(e).location=t,this.onColumnsLocationChanged.fire(this,{columnName:e,location:t}),this.onStateChanged.fire(this,this.state)},e.prototype.getColumnByName=function(e){return this._columns.filter((function(t){return t.name===e}))[0]},e.prototype.setColumnVisibility=function(e,t){this.getColumnByName(e).isVisible=t,this.onColumnsVisibilityChanged.fire(this,{columnName:e,columnVisibility:t}),this.onStateChanged.fire(this,this.state)},e.prototype.setColumnWidth=function(e,t){this.getColumnByName(e).width=t,this.onStateChanged.fire(this,this.state)},e.prototype.removeRow=function(e){var t=this._rows.indexOf(e);this._rows.splice(t,1),this.onRowRemoved.fire(this,{row:e})},Object.defineProperty(e.prototype,"locale",{get:function(){return s.a.currentLocale},set:function(e){this.survey.locale=e,s.a.currentLocale=e,this.refresh(!0),this.onStateChanged.fire(this,this.state)},enumerable:!1,configurable:!0}),e.prototype.getLocales=function(){return[].concat(this.survey.getUsedLocales())},e.prototype.refresh=function(e){if(void 0===e&&(e=!1),this.isRendered){this.currentPageNumber=this.getPageNumber(),e&&this.initTableData(this.data);var t=this.renderResult;this.destroy(),this.render(t),this.setPageSize(this.currentPageSize),this.setPageNumber(this.currentPageNumber)}},e.prototype.destroy=function(){this.clearCreatedRows(),this.extensions.destroy(),this.renderResult.innerHTML="",this.renderResult=void 0},Object.defineProperty(e.prototype,"isRendered",{get:function(){return!!this.renderResult},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return{locale:s.a.currentLocale,elements:[].concat(this._columns),pageSize:this.currentPageSize}},set:function(e){e&&(void 0!==e.locale&&(s.a.currentLocale=e.locale,this.survey.locale=e.locale,this.initTableData(this.data)),void 0!==e.elements&&(this._columns=e.elements),void 0!==e.pageSize&&(this.currentPageSize=e.pageSize))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"permissions",{get:function(){return this._columns.map((function(e){return{name:e.name,isPublic:e.isPublic}}))},set:function(e){var t=this._columns.map((function(t){return e.forEach((function(e){e.name===t.name&&(t.isPublic=e.isPublic)})),Object(o.a)({},t)}));this._columns=[].concat(t),this.onPermissionsChangedCallback&&this.onPermissionsChangedCallback(this)},enumerable:!1,configurable:!0}),e}(),d=function(){function e(e,t,n){var o=this;this.table=e,this.extensionsContainer=t,this.detailsContainer=n,this.detailedRowClass="sa-table__detail-row",this.isDetailsExpanded=!1,this.onToggleDetails=new i.Event,this.onColumnLocationChangedCallback=function(){o.closeDetails()},this.details=new r.a(e,this,n),this.extensions=new l.a(e),e.onColumnsLocationChanged.add(this.onColumnLocationChangedCallback)}return e.prototype.render=function(){this.extensions.render(this.extensionsContainer,"row",{row:this})},e.prototype.openDetails=function(){this.details.open(),this.getElement().className+=" "+this.detailedRowClass,this.onToggleDetails.fire(this,{isExpanded:!0}),this.isDetailsExpanded=!0},e.prototype.closeDetails=function(){this.details.close(),this.getElement().classList.remove(this.detailedRowClass),this.onToggleDetails.fire(this,{isExpanded:!1}),this.isDetailsExpanded=!1},e.prototype.toggleDetails=function(){this.isDetailsExpanded?this.closeDetails():this.openDetails()},e.prototype.getIsSelected=function(){return this.isSelected},e.prototype.toggleSelect=function(){this.isSelected=!this.isSelected},e.prototype.remove=function(){this.table.removeRow(this)},e.prototype.destroy=function(){this.table.onColumnsLocationChanged.remove(this.onColumnLocationChangedCallback),this.extensions.destroy()},e}()},function(e,t,n){"use strict";var o=n(1);o.a.locales.fa={groupButton:"گروه بندی با",ungroupButton:"حذف گروه",selectButton:"انتخاب",hideColumn:"مخفی کردن ستون",showColumn:"نمایش ستون",moveToDetail:"انتقال به جزئیات",showAsColumn:"نمایش به عنوان ستون",visualizer_text:"متون در جدول",visualizer_wordcloud:"ابر کلمات",chartType_bar:"میله ای",chartType_pie:"دابره ای(pie)",chartType_scatter:"پراکندگی(Scatter)",chartType_gauge:"عقربه ای",chartType_bullet:"Bullet",hideButton:"مخفی",resetFilter:"بازنشانی فیلترها",clearButton:"پاک کردن",addElement:"انتخاب سوال برای نمایش..."},o.a.localeNames.fa="Farsi(Persian)"},function(e,t,n){"use strict";var o=n(1);o.a.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",visualizer_text:"Textes en table",visualizer_wordcloud:"Nuages de mots",chartType_bar:"Barres",chartType_stackedbar:"Barres empilées",chartType_doughnut:"Anneau",chartType_pie:"Secteurs",chartType_scatter:"Nuages de points",chartType_gauge:"Gauge",chartType_bullet:"Bulles",hideButton:"Masquer",resetFilter:"Rafraichir Filtres",clearButton:"Rafraichir",addElement:"Choisir la question à afficher...",defaultOrder:"Defaut",ascOrder:"Ascendant",descOrder:"Descendant",showMinorColumns:"Afficher les colonnes mineures"},o.a.localeNames.fr="French"},function(e,t,n){"use strict";var o=n(1);o.a.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",chartType_bar:"Stolpediagram",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",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"},o.a.localeNames.no="Norwegian"},function(e,t){e.exports='<svg style="display:none;"><symbol viewBox="0 0 16 16" id="sa-svg-detail"><circle class="st0" cx="1.5" cy="8.5" r="1.5"></circle><circle class="st0" cx="7.5" cy="8.5" r="1.5"></circle><circle class="st0" cx="13.5" cy="8.5" r="1.5"></circle></symbol><symbol viewBox="0 0 16 16" id="sa-svg-drag"><path class="st0" d="M13 5l-1 1 1 1H9V3l1 1 1-1-3-3-3 3 1 1 1-1v4H3l1-1-1-1-3 3 3 3 1-1-1-1h4v4l-1-1-1 1 3 3 3-3-1-1-1 1V9h4l-1 1 1 1 3-3z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-hide"><path class="st1" d="M12.79 4.2L16 1l-1-1-3.32 3.32C10.57 2.55 9.32 2 8 2 3.63 2 0 7.97 0 7.97s1.27 2.1 3.21 3.82l-3.23 3.23.98.98 3.35-3.34C5.41 13.44 6.67 14 8 14c4.37 0 8-6 8-6s-1.27-2.09-3.21-3.8zM2 7.97c1.07-1.47 3.61-4 6-4 .8 0 1.6.27 2.35.68l-.78.78c-.46-.29-.99-.46-1.57-.46-1.66 0-3 1.34-3 3 0 .58.17 1.11.46 1.57l-.97.97A13.38 13.38 0 0 1 2 7.97zm6 4c-.8 0-1.59-.27-2.33-.67l.78-.77c.45.27.98.44 1.55.44 1.66 0 3-1.34 3-3 0-.57-.17-1.09-.44-1.55l.98-.98c1.11.87 2.01 1.91 2.46 2.52-1.07 1.48-3.61 4.01-6 4.01z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-makeprivate"><circle class="st0" cx="8" cy="4" r="3"></circle><path class="st0" d="M8 8c-3.31 0-6 2.73-6 4.67S5.27 15 8 15s6-.4 6-2.33S11.31 8 8 8z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-makepublic"><circle class="st0" cx="6" cy="5" r="3"></circle><path class="st0" d="M10 5c0 .34-.06.67-.14.99.05 0 .09.01.14.01 1.66 0 3-1.34 3-3s-1.34-3-3-3C8.97 0 8.07.52 7.53 1.3 8.98 1.91 10 3.33 10 5zM6 9c-3.31 0-6 2.73-6 4.67S3.27 16 6 16s6-.4 6-2.33S9.31 9 6 9zM10 7c-.19 0-.38.01-.57.03a4.14 4.14 0 0 1-1.37 1.39c3 .83 5.23 3.31 5.42 5.28 1.44-.31 2.52-.92 2.52-2.03C16 9.74 13.31 7 10 7z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-movetodetails"><circle class="st0" cx="1.5" cy="14.5" r="1.5"></circle><circle class="st0" cx="7.5" cy="14.5" r="1.5"></circle><circle class="st0" cx="13.5" cy="14.5" r="1.5"></circle><path class="st0" d="M12 1h3v9h-3zM2.02 7.02L1 6 0 7l3 3 3-3-1-1-.94.94C4.33 4.73 6.21 3 8.5 3c.17 0 .33.03.5.05V1.03C8.83 1.01 8.67 1 8.5 1 5.08 1 2.27 3.66 2.02 7.02z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-noncommercial"><path d="M8 0L0 15h16L8 0zm1 13H7v-2h2v2zm-2-3V5h2v5H7z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-sorting"><path class="st0" d="M8 3l2 2 1-1-3-3-3 3 1 1zM8 13l-2-2-1 1 3 3 3-3-1-1z"></path></symbol></svg>'},function(e,t,n){"use strict";var o=n(1),i=n(0),a=n(2);a.a.registerExtension({location:"row",name:"details",visibleIndex:0,render:function(e,t){var n=i.b.createSvgButton("detail");return n.title=o.a.getString("showMinorColumns"),n.className+=" sa-table__row-extension",n.onclick=function(){t.row.toggleDetails()},n}}),a.a.registerExtension({location:"row",name:"select",visibleIndex:-1,render:function(e,t){var n=t.row,o=i.b.createElement("input","sa-table__row-extension",{type:"checkbox"});return o.checked=n.getIsSelected(),o.onchange=function(){n.toggleSelect()},o}})},function(e,t,n){"use strict";var o=n(1),i=n(0),a=n(2);a.a.registerExtension({location:"header",name:"filter",visibleIndex:0,render:function(e){var t=i.b.createInput("sa-table__global-filter sa-table__header-extension",o.a.getString("filterPlaceholder"));return t.onchange=function(t){e.applyFilter(t.target.value)},t}}),a.a.registerExtension({location:"header",name:"showcolumn",visibleIndex:2,destroy:function(){this.onDestroy()},render:function(e){var t=i.b.createElement("select","sa-table__show-column sa-table__header-extension");function n(){var n=e.columns.filter((function(e){return!e.isVisible}));if(0!=n.length){t.style.display="inline-block",t.innerHTML="";var a=i.b.createElement("option","",{text:o.a.getString("showColumn"),disabled:!0,selected:!0});t.appendChild(a),n.forEach((function(e){var n=e.displayName;n.length>20&&(n=n.substring(0,20)+"...");var o=i.b.createElement("option","",{text:n,title:e.displayName,value:e.name});t.appendChild(o)}))}else t.style.display="none"}t.onchange=function(t){var n=t.target.value;t.stopPropagation(),n&&e.setColumnVisibility(n,!0)},n();var a=function(){n()};return e.onColumnsVisibilityChanged.add(a),this.onDestroy=function(){e.onColumnsVisibilityChanged.remove(a)},t}}),a.a.registerExtension({location:"header",name:"showentries",visibleIndex:3,render:function(e){var t=i.b.createElement("div","sa-table__entries"),n=i.b.createElement("span","sa-table__entries-label sa-table__entries-label--right",{innerHTML:o.a.getString("showLabel")}),a=i.b.createElement("span","sa-table__entries-label sa-table__entries-label--left",{innerHTML:o.a.getString("entriesLabel")});return t.appendChild(n),t.appendChild(function(e){var t=i.b.createElement("select");return["1","5","10","25","50","75","100"].forEach((function(e){var n=i.b.createElement("option","",{value:e,text:e});t.appendChild(n)})),t.value=String(e.getPageSize()),t.onchange=function(){e.setPageSize(Number(t.value))},t}(e)),t.appendChild(a),t}}),a.a.registerExtension({location:"header",name:"removerows",visibleIndex:-1,render:function(e){var t=i.b.createElement("button","sa-table__btn sa-table__btn--green sa-table__header-extension ",{innerHTML:o.a.getString("removeRows")});return t.onclick=function(){e.getCreatedRows().forEach((function(e){e.getIsSelected()&&e.remove()}))},t}}),a.a.registerExtension({location:"header",name:"changelocale",visibleIndex:1,render:function(e){var t=e.getLocales();if(t.length<2)return null;var n=i.b.createElement("select","sa-table__header-extension",{});return[o.a.getString("changeLocale")].concat(t).forEach((function(e){var t=i.b.createElement("option","",{value:e,text:e});n.appendChild(t)})),n.onchange=function(){e.locale=n.value},n}})},function(e,t,n){"use strict";var o=n(0),i=n(1),a=n(2),r=n(5);a.a.registerExtension({location:"column",name:"drag",visibleIndex:0,render:function(e,t){var n=o.b.createElement("button","sa-table__svg-button sa-table__drag-button");return n.appendChild(o.b.createSvgElement("drag")),n.onmousedown=function(t){e.enableColumnReorder()},n}}),a.a.registerExtension({location:"column",name:"sort",visibleIndex:1,render:function(e,t){var n=i.a.getString("descOrder"),a=i.a.getString("ascOrder"),r=o.b.createSvgButton("sorting");r.title="";var s="asc";return r.onclick=function(){"asc"==s?(r.title=n,s="desc"):(r.title=a,s="asc"),e.sortByColumn(t.columnName,s)},r.ondrag=function(e){e.stopPropagation()},r}}),a.a.registerExtension({location:"column",name:"hide",visibleIndex:2,render:function(e,t){var n=o.b.createSvgButton("hide");return n.title=i.a.getString("hideColumn"),n.onclick=function(){e.setColumnVisibility(t.columnName,!1)},n}}),a.a.registerExtension({location:"column",name:"movetodetails",visibleIndex:3,render:function(e,t){var n=o.b.createSvgButton("movetodetails");return n.title=i.a.getString("moveToDetail"),n.onclick=function(n){n.stopPropagation(),e.setColumnLocation(t.columnName,r.b.Row)},n}}),a.a.registerExtension({location:"column",name:"filter",visibleIndex:4,render:function(e,t){var n=o.b.createInput("sa-table__filter",i.a.getString("filterPlaceholder"));return n.onclick=function(e){return e.stopPropagation()},n.onchange=function(o){e.applyColumnFilter(t.columnName,n.value)},n}}),a.a.registerExtension({location:"column",name:"makepublic",visibleIndex:-1,render:function(e,t){var n=o.b.createElement("button"),a=o.b.createSvgElement("makeprivate"),r=o.b.createSvgElement("makepublic"),s=e.getColumnByName(t.columnName);function l(e){e.isPublic?(n.className="sa-table__svg-button",n.title=i.a.getString("makePrivateColumn"),a.style.display="none",r.style.display="block"):(n.className="sa-table__svg-button sa-table__svg-button--active",n.title=i.a.getString("makePublicColumn"),a.style.display="block",r.style.display="none")}return l(s),n.appendChild(a),n.appendChild(r),n.onclick=function(t){t.stopPropagation(),s.isPublic=!s.isPublic,l(s),e.onPermissionsChangedCallback&&e.onPermissionsChangedCallback(e)},n}})},,,,function(e,t,n){},function(e,n){e.exports=t},,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"localization",(function(){return o.a})),n.d(t,"surveyStrings",(function(){return o.b})),n.d(t,"Tabulator",(function(){return h})),n.d(t,"TabulatorRow",(function(){return p})),n.d(t,"TableExtensions",(function(){return m.a})),n.d(t,"DocumentHelper",(function(){return s.b}));var o=n(1),i=(n(8),n(9),n(10),n(12),n(13),n(14),n(6),n(3)),a=n(7),r=n(5),s=(n(18),n(0)),l=n(19);if(document){var c=n(11),u=document.createElement("div");u.style.display="none",u.innerHTML=c,document.head.appendChild(u)}var d={tabulatorOptions:{},actionsColumnWidth:60,downloadHiddenColumns:!1,downloadButtons:["pdf","xlsx","csv"],downloadOptions:{pdf:{orientation:"portrait",autoTable:{styles:{fillColor:[26,179,148]},columnStyles:{id:{fillColor:255}},margin:{top:60}}},csv:{delimiter:","},xlsx:{sheetName:"results"}}},h=function(e){function t(t,n,o,i){void 0===i&&(i=[]);var a=e.call(this,t,n,o,i)||this;a.COLUMN_MIN_WIDTH=155,a.tabulatorTables=null,a.tableContainer=null,a.destroy=function(){a.tabulatorTables.destroy(),e.prototype.destroy.call(a)},a.columnMovedCallback=function(e,t){var n=a._columns.indexOf(a.getColumnByName(e.getField())),o=t.indexOf(e)-1;a.moveColumn(n,o),a.disableColumnReorder()},a.columnResizedCallback=function(e){a.setColumnWidth(e.getField(),e.getWidth()),a.layout()},a.rowFormatter=function(e){var t=new p(a,e.getCells()[0].getElement(),e.getElement(),e);t.onToggleDetails.add((function(){e.normalizeHeight(),a.layout()})),t.render(),a._rows.push(t)};var r={};return Object.assign(r,d,o),a.options=r,a}return Object(i.b)(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),t.className+=" sa-table sa-tabulator";var n=this.getColumns(),o=this.tableData,i=s.b.createElement("div","sa-tabulator__header"),a=s.b.createElement("div","sa-tabulator__pagination-container");this.tableContainer=s.b.createElement("div"),t.appendChild(i),t.appendChild(this.tableContainer);var r={};Object.assign(r,{data:o,layout:"fitColumns",pagination:"local",paginationSize:this.currentPageSize,movableColumns:!0,maxHeight:"100%",columns:n,rowFormatter:this.rowFormatter,paginationElement:a,columnMoved:this.columnMovedCallback,columnResized:this.columnResizedCallback,tooltipsHeader:!0,tooltips:function(e){return e.getValue()},downloadRowRange:"all",columnMinWidth:248,paginationButtonCount:3},this.options.tabulatorOptions),this.tabulatorTables=new l(this.tableContainer,r);var c=s.b.createElement("div","sa-table__header-extensions");i.appendChild(this.createDownloadsBar()),i.appendChild(c),i.appendChild(a),this.extensions.render(c,"header"),this.renderResult=t},t.prototype.createDownloadsBar=function(){var e=this,t=s.b.createElement("div","sa-tabulator__downloads-bar");return this.options.downloadButtons.forEach((function(n){t.appendChild(function(t,n){return s.b.createElement("button","sa-table__btn sa-table__btn--small sa-table__btn--gray",{innerHTML:n,onclick:function(){e.download(t)}})}(n,o.a.getString(n+"DownloadCaption")))})),t},t.prototype.getTitleFormatter=function(e,t,n,o){var i=this,a=s.b.createElement("div"),r=s.b.createElement("span","",{innerHTML:e.getValue()}),l=this.getHeaderActions(o);return a.appendChild(l),a.appendChild(r),a.onmousedown=function(e){i.isColumnReorderEnabled?i.disableColumnReorder():e.stopPropagation()},a},t.prototype.getHeaderActions=function(e){var t=s.b.createElement("div","sa-table__action-container");return this.extensions.render(t,"column",{columnName:e}),t},t.prototype.getColumns=function(){var e=this,t=this.columns.map((function(t,n){var o=e.survey.getQuestionByName(t.name);return{field:t.name,title:o&&o.title||t.displayName,width:t.width,widthShrink:t.width?0:1,visible:e.isColumnVisible(t),headerSort:!1,download:!!e.options.downloadHiddenColumns||void 0,titleFormatter:function(n,o,i){return e.getTitleFormatter(n,o,i,t.name)}}}));return t.unshift({field:"",title:"",download:!1,resizable:!1,minWidth:this.options.actionsColumnWidth,width:this.options.actionsColumnWidth}),t},t.prototype.setColumnVisibility=function(t,n){e.prototype.setColumnVisibility.call(this,t,n),this.isRendered&&(n?this.tabulatorTables.showColumn(t):this.tabulatorTables.hideColumn(t),this.layout())},t.prototype.setColumnLocation=function(t,n){e.prototype.setColumnLocation.call(this,t,n),this.isRendered&&(n==r.b.Row?this.tabulatorTables.hideColumn(t):this.tabulatorTables.showColumn(t),this.layout())},t.prototype.setColumnWidth=function(t,n){if(e.prototype.setColumnWidth.call(this,t,n),this.isRendered){var o=this.tabulatorTables.getColumn(t).getDefinition();o.width=n,o.widthShrink=0,this.layout()}},t.prototype.sortByColumn=function(e,t){this.tabulatorTables.setSort(e,t)},t.prototype.applyColumnFilter=function(e,t){this.tabulatorTables.setFilter(e,"like",t)},t.prototype.applyFilter=function(e){this.tabulatorTables.setFilter((function(e,t){for(var n in e)if(e[n].toLowerCase().includes(t.value.toLowerCase()))return!0;return!1}),{value:e})},t.prototype.getPageNumber=function(){return this.isRendered?this.tabulatorTables.getPage():1},t.prototype.setPageNumber=function(t){e.prototype.setPageNumber.call(this,t),this.isRendered&&this.tabulatorTables.setPage(t)},t.prototype.setPageSize=function(t){e.prototype.setPageSize.call(this,t),this.isRendered&&this.tabulatorTables.setPageSize(t)},t.prototype.download=function(e){this.tabulatorTables.download(e,"results."+e,this.options.downloadOptions[e]||d.downloadOptions[e])},t.prototype.layout=function(e){void 0===e&&(e=!1),this.tabulatorTables.redraw(e)},t}(a.a),p=function(e){function t(t,n,o,i){var a=e.call(this,t,n,o)||this;return a.table=t,a.extensionsContainer=n,a.detailsContainer=o,a.innerRow=i,a}return Object(i.b)(t,e),t.prototype.getElement=function(){return this.innerRow.getElement()},t.prototype.getRowData=function(){return this.innerRow.getData()},t.prototype.getDataPosition=function(){return this.innerRow.getPosition()},t.prototype.remove=function(){this.innerRow.delete(),e.prototype.remove.call(this)},t}(a.b),m=n(2)}])})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("survey-core"),require("tabulator-tables")):"function"==typeof define&&define.amd?define("SurveyAnalyticsTabulator",["survey-core","tabulator-tables"],t):"object"==typeof exports?exports.SurveyAnalyticsTabulator=t(require("survey-core"),require("tabulator-tables")):e.SurveyAnalyticsTabulator=t(e.Survey,e.Tabulator)}(window,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=27)}([function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return s}));var o=function(){function e(){}return e.createSelector=function(t,n,o){var i=document.createElement("div");i.className="sa-question__select-wrapper";var a=document.createElement("select");return a.className="sa-question__select",t.forEach((function(t){var o=e.createElement("option","",{value:t.value,text:t.text,selected:n(t)});a.appendChild(o)})),a.onchange=o,i.appendChild(a),i},e.createButton=function(t,n,o){return void 0===n&&(n=""),void 0===o&&(o="sa-toolbar__button"),e.createElement("span",o,{innerText:n,onclick:t})},e.createElement=function(e,t,n){void 0===t&&(t="");var o=document.createElement(e);return o.className=t,n&&Object.keys(n).forEach((function(e){o[e]=n[e]})),o},e.createSvgElement=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=document.createElementNS("http://www.w3.org/2000/svg","use");return n.setAttributeNS("http://www.w3.org/1999/xlink","href","#sa-svg-"+e),t.appendChild(n),t},e.createSvgButton=function(t){var n=e.createElement("button","sa-table__svg-button");return n.appendChild(e.createSvgElement(t)),n},e.createSvgToggleButton=function(t,n,o,i,a,r,s,l){void 0===s&&(s="first"),void 0===l&&(l="sa-toolbar__button sa-toolbar__svg-button");var c=e.createSvgElement(t),u=e.createSvgElement(n),d=e.createElement("button",l);return"first"===s?(d.title=o,d.appendChild(c)):(s="second")&&(d.title=i,d.appendChild(u)),d.onclick=function(e){"first"===s?(s="second",d.title=i,d.removeChild(c),d.appendChild(u),r(e)):"second"===s&&(s="first",d.title=o,d.removeChild(u),d.appendChild(c),a(e))},d},e.createInput=function(t,n,o){return void 0===n&&(n=""),void 0===o&&(o=""),e.createElement("input",t,{placeholder:n,defaultValue:o})},e}(),i={runningInBrowser:"function"==typeof window.URL.createObjectURL};function a(){return i.runningInBrowser}function r(){var e=o.createElement("div","sa-commercial"),t=o.createElement("a","sa-commercial__text",{href:"https://www.surveyjs.io/Buy",target:"_blank"}),n=o.createElement("span",""),i=o.createSvgElement("noncommercial"),a=o.createElement("span","sa-commercial__product",{innerHTML:"Please purchase a SurveyJS Analytics developer license\n to\n use it in your\n app."});return e.appendChild(t).appendChild(n),n.appendChild(i),n.appendChild(a),e}var s=function(){function e(){}return e.zipArrays=function(e,t){for(var n=[],o=0;o<Math.min(e.length,t.length);o++)n[o]=[e[o],t[o]];return n},e.unzipArrays=function(e){var t={first:[],second:[]};return e.forEach((function(e,n){t.first[n]=e[0],t.second[n]=e[1]})),t},e.sortDictionary=function(e,t,n){var o=this.zipArrays(e,t),i=function(e,t,n){void 0===n&&(n=!0);var o=e[1]<t[1]?1:e[1]==t[1]?0:-1;return n?o:-1*o};o.sort((function(e,t){return n?i(e,t,!1):i(e,t)}));var a=this.unzipArrays(o);return{keys:a.first,values:a.second}},e.toPercentage=function(e,t){return e/t*100},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var o={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",chartType_bar:"Bar",chartType_stackedbar:"Stacked Bar",chartType_doughnut:"Doughnut",chartType_pie:"Pie",chartType_scatter:"Scatter",chartType_gauge:"Gauge",chartType_bullet:"Bullet",hideButton:"Hide",makePrivateButton:"Make private",makePublicButton:"Make public",showButton:"Show",resetFilter:"Reset Filter",changeLocale:"Change Locale",clearButton:"Clear",addElement:"Choose question to show...",defaultOrder:"Default",ascOrder:"Ascending",descOrder:"Descending",showMinorColumns:"Show minor columns",otherCommentTitle:"Other items and comments",showPercentages:"Show percentages",hidePercentages:"Hide percentages",pdfDownloadCaption:"PDF",xlsxDownloadCaption:"Excel",csvDownloadCaption:"CSV"},i={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 n=t[e];return void 0===n&&(n=this.locales.en[e]||e),n},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 n in this.locales)e.push(n);return e.sort(),e}},a=o;i.locales.en=o,i.localeNames.en="english"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o=function(){function e(e){this.table=e,this.renderedExtensions=[]}return e.prototype.render=function(t,n,o){var i=this,a=e.extensions[n];a&&(a=this.sortExtensions(a)).forEach((function(e){if(e.render){var n=e.render(i.table,o);n&&(t.appendChild(n),i.renderedExtensions.push(e))}}))},e.prototype.destroy=function(){this.renderedExtensions.forEach((function(e){e.destroy&&e.destroy()})),this.renderedExtensions=[]},e.registerExtension=function(e){this.extensions[e.location]||(this.extensions[e.location]=[]),this.extensions[e.location].push(e)},e.findExtension=function(e,t){return this.extensions[e]&&this.extensions[e].filter((function(e){return e.name==t}))[0]||null},e.prototype.sortExtensions=function(e){if(Array.isArray(e))return[].concat(e.filter((function(e){return e.visibleIndex>=0}))).sort((function(e,t){return e.visibleIndex-t.visibleIndex}))},e.extensions={},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};function i(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function o(){this.constructor=e}e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}},function(t,n){t.exports=e},function(e,t,n){"use strict";var o,i;n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i})),function(e){e[e.Column=0]="Column",e[e.Row=1]="Row"}(o||(o={})),function(e){e[e.Text=0]="Text",e[e.FileLink=1]="FileLink",e[e.Image=2]="Image"}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var o=n(3),i=n(4),a=n(5),r=n(7),s=n(1),l=n(2),c=n(0),u=function(){function e(t,n,o,r){var c=this;void 0===r&&(r=[]),this.survey=t,this.data=n,this.options=o,this._columns=r,this.haveCommercialLicense=!1,this.currentPageSize=5,this._rows=[],this.onColumnsVisibilityChanged=new i.Event,this.onColumnsLocationChanged=new i.Event,this.onRowRemoved=new i.Event,this.buildColumns=function(e){return c.survey.getAllQuestions().map((function(e){return{name:e.name,displayName:(e.title||"").trim()||e.name,dataType:"file"!==e.getType()?a.a.Text:a.a.FileLink,isVisible:"file"!==e.getType(),isPublic:!0,location:a.b.Column}}))},this.onStateChanged=new i.Event,0===r.length&&(this._columns=this.buildColumns(t)),this.initTableData(n),s.a.currentLocale=this.survey.locale,0===r.length&&(this._columns=this.buildColumns(t)),this.extensions=new l.a(this),this.haveCommercialLicense=e.haveCommercialLicense||!!o&&void 0!==o.haveCommercialLicense&&o.haveCommercialLicense}return e.prototype.getData=function(){return this.data},e.prototype.render=function(e){e.innerHTML="",this.haveCommercialLicense||e.appendChild(Object(c.d)())},e.prototype.enableColumnReorder=function(){this.isColumnReorderEnabled=!0},e.prototype.disableColumnReorder=function(){this.isColumnReorderEnabled=!1},e.prototype.getPageNumber=function(){return this.currentPageNumber},e.prototype.setPageNumber=function(e){this.currentPageNumber=e},e.prototype.getPageSize=function(){return this.currentPageSize},e.prototype.setPageSize=function(e){this.currentPageSize=e,this.onStateChanged.fire(this,this.state)},e.prototype.getCreatedRows=function(){return[].concat(this._rows)},e.prototype.clearCreatedRows=function(){this._rows.forEach((function(e){e.destroy()})),this._rows=[]},e.prototype.isColumnVisible=function(e){return e.location===a.b.Column&&e.isVisible},Object.defineProperty(e.prototype,"columns",{get:function(){return[].concat(this._columns)},set:function(e){this._columns=e,this.refresh(!0),this.onStateChanged.fire(this,this.state)},enumerable:!1,configurable:!0}),e.prototype.initTableData=function(e){var t=this;this.tableData=(e||[]).map((function(e){var n={};return t.survey.data=e,t._columns.forEach((function(o){var i=e[o.name],a=t.survey.getQuestionByName(o.name);a&&(i=a.displayValue),n[o.name]="string"==typeof i?i:JSON.stringify(i)||""})),n}))},e.prototype.moveColumn=function(e,t){var n=this._columns.splice(e,1);this._columns.splice(t,0,n[0]),this.onStateChanged.fire(this,this.state)},e.prototype.setColumnLocation=function(e,t){this.getColumnByName(e).location=t,this.onColumnsLocationChanged.fire(this,{columnName:e,location:t}),this.onStateChanged.fire(this,this.state)},e.prototype.getColumnByName=function(e){return this._columns.filter((function(t){return t.name===e}))[0]},e.prototype.setColumnVisibility=function(e,t){this.getColumnByName(e).isVisible=t,this.onColumnsVisibilityChanged.fire(this,{columnName:e,columnVisibility:t}),this.onStateChanged.fire(this,this.state)},e.prototype.setColumnWidth=function(e,t){this.getColumnByName(e).width=t,this.onStateChanged.fire(this,this.state)},e.prototype.removeRow=function(e){var t=this._rows.indexOf(e);this._rows.splice(t,1),this.onRowRemoved.fire(this,{row:e})},Object.defineProperty(e.prototype,"locale",{get:function(){return s.a.currentLocale},set:function(e){this.survey.locale=e,s.a.currentLocale=e,this.refresh(!0),this.onStateChanged.fire(this,this.state)},enumerable:!1,configurable:!0}),e.prototype.getLocales=function(){return[].concat(this.survey.getUsedLocales())},e.prototype.refresh=function(e){if(void 0===e&&(e=!1),this.isRendered){this.currentPageNumber=this.getPageNumber(),e&&this.initTableData(this.data);var t=this.renderResult;this.destroy(),this.render(t),this.setPageSize(this.currentPageSize),this.setPageNumber(this.currentPageNumber)}},e.prototype.destroy=function(){this.clearCreatedRows(),this.extensions.destroy(),this.renderResult.innerHTML="",this.renderResult=void 0},Object.defineProperty(e.prototype,"isRendered",{get:function(){return!!this.renderResult},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return{locale:s.a.currentLocale,elements:[].concat(this._columns),pageSize:this.currentPageSize}},set:function(e){e&&(void 0!==e.locale&&(s.a.currentLocale=e.locale,this.survey.locale=e.locale,this.initTableData(this.data)),void 0!==e.elements&&(this._columns=e.elements),void 0!==e.pageSize&&(this.currentPageSize=e.pageSize))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"permissions",{get:function(){return this._columns.map((function(e){return{name:e.name,isPublic:e.isPublic}}))},set:function(e){var t=this._columns.map((function(t){return e.forEach((function(e){e.name===t.name&&(t.isPublic=e.isPublic)})),Object(o.a)({},t)}));this._columns=[].concat(t),this.onPermissionsChangedCallback&&this.onPermissionsChangedCallback(this)},enumerable:!1,configurable:!0}),e.haveCommercialLicense=!1,e}(),d=function(){function e(e,t,n){var o=this;this.table=e,this.extensionsContainer=t,this.detailsContainer=n,this.detailedRowClass="sa-table__detail-row",this.isDetailsExpanded=!1,this.onToggleDetails=new i.Event,this.onColumnLocationChangedCallback=function(){o.closeDetails()},this.details=new r.a(e,this,n),this.extensions=new l.a(e),e.onColumnsLocationChanged.add(this.onColumnLocationChangedCallback)}return e.prototype.render=function(){this.extensions.render(this.extensionsContainer,"row",{row:this})},e.prototype.openDetails=function(){this.details.open(),this.getElement().className+=" "+this.detailedRowClass,this.onToggleDetails.fire(this,{isExpanded:!0}),this.isDetailsExpanded=!0},e.prototype.closeDetails=function(){this.details.close(),this.getElement().classList.remove(this.detailedRowClass),this.onToggleDetails.fire(this,{isExpanded:!1}),this.isDetailsExpanded=!1},e.prototype.toggleDetails=function(){this.isDetailsExpanded?this.closeDetails():this.openDetails()},e.prototype.getIsSelected=function(){return this.isSelected},e.prototype.toggleSelect=function(){this.isSelected=!this.isSelected},e.prototype.remove=function(){this.table.removeRow(this)},e.prototype.destroy=function(){this.table.onColumnsLocationChanged.remove(this.onColumnLocationChangedCallback),this.extensions.destroy()},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(0),i=n(5),a=n(2),r=n(1),s=function(){function e(e,t,n){var a=this;this.table=e,this.row=t,this.targetNode=n,this.location="details",this.createShowAsColumnButton=function(e){var t=o.b.createElement("button","sa-table__btn sa-table__btn--gray",{innerHTML:r.a.getString("showAsColumn")});return t.onclick=function(t){t.stopPropagation(),a.table.setColumnLocation(e,i.b.Column)},t};var s=o.b.createElement("table","sa-table__detail-table");this.detailsTable=s,this.table.onColumnsLocationChanged.add((function(){a.close()}))}return e.prototype.open=function(){var e=this;this.detailsTable.innerHTML="";var t=[];this.table.columns.filter((function(e){return e.location===i.b.Row&&e})).forEach((function(n){var i=o.b.createElement("tr","sa-table__detail"),a=o.b.createElement("td","",{innerHTML:n.displayName}),r=o.b.createElement("td");r.textContent=e.row.getRowData()[n.name];var s=o.b.createElement("td");s.appendChild(e.createShowAsColumnButton(n.name)),i.appendChild(a),i.appendChild(r),i.appendChild(s),t.push(i)}));var n=o.b.createElement("tr","sa-table__detail"),r=o.b.createElement("td","",{colSpan:3});new a.a(this.table).render(r,"details",{row:this.row}),0!=r.children.length&&(n.appendChild(r),t.push(n)),t.forEach((function(t){e.detailsTable.appendChild(t)})),this.targetNode.appendChild(this.detailsTable)},e.prototype.close=function(){this.detailsTable.parentNode&&this.detailsTable.parentNode.removeChild(this.detailsTable)},e}()},function(e,t,n){"use strict";var o=n(1);o.a.locales.fa={groupButton:"گروه بندی با",ungroupButton:"حذف گروه",selectButton:"انتخاب",hideColumn:"مخفی کردن ستون",showColumn:"نمایش ستون",moveToDetail:"انتقال به جزئیات",showAsColumn:"نمایش به عنوان ستون",visualizer_text:"متون در جدول",visualizer_wordcloud:"ابر کلمات",chartType_bar:"میله ای",chartType_pie:"دابره ای(pie)",chartType_scatter:"پراکندگی(Scatter)",chartType_gauge:"عقربه ای",chartType_bullet:"Bullet",hideButton:"مخفی",resetFilter:"بازنشانی فیلترها",clearButton:"پاک کردن",addElement:"انتخاب سوال برای نمایش..."},o.a.localeNames.fa="Farsi(Persian)"},function(e,t,n){"use strict";var o=n(1);o.a.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",visualizer_text:"Textes en table",visualizer_wordcloud:"Nuages de mots",chartType_bar:"Barres",chartType_stackedbar:"Barres empilées",chartType_doughnut:"Anneau",chartType_pie:"Secteurs",chartType_scatter:"Nuages de points",chartType_gauge:"Gauge",chartType_bullet:"Bulles",hideButton:"Masquer",resetFilter:"Rafraichir Filtres",clearButton:"Rafraichir",addElement:"Choisir la question à afficher...",defaultOrder:"Defaut",ascOrder:"Ascendant",descOrder:"Descendant",showMinorColumns:"Afficher les colonnes mineures"},o.a.localeNames.fr="French"},function(e,t,n){"use strict";var o=n(1);o.a.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",chartType_bar:"Stolpediagram",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",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"},o.a.localeNames.no="Norwegian"},function(e,t,n){"use strict";var o=n(1);o.a.locales.ru={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",visualizer_text:"Texts in table",visualizer_wordcloud:"Wordcloud",chartType_bar:"Bar",chartType_stackedbar:"Stacked Bar",chartType_doughnut:"Doughnut",chartType_pie:"Pie",chartType_scatter:"Scatter",chartType_gauge:"Gauge",chartType_bullet:"Bullet",hideButton:"Скрыть",showButton:"Показать",resetFilter:"Очистить фильтр",changeLocale:"Сменить язык",clearButton:"Clear",addElement:"Choose question to show...",defaultOrder:"Default",ascOrder:"Ascending",descOrder:"Descending",showMinorColumns:"Show minor columns",otherCommentTitle:"Other items and comments"},o.a.localeNames.ru="Russian"},function(e,t){e.exports='<svg style="display:none;"><symbol viewBox="0 0 16 16" id="sa-svg-detail"><circle class="st0" cx="1.5" cy="8.5" r="1.5"></circle><circle class="st0" cx="7.5" cy="8.5" r="1.5"></circle><circle class="st0" cx="13.5" cy="8.5" r="1.5"></circle></symbol><symbol viewBox="0 0 16 16" id="sa-svg-drag"><path class="st0" d="M13 5l-1 1 1 1H9V3l1 1 1-1-3-3-3 3 1 1 1-1v4H3l1-1-1-1-3 3 3 3 1-1-1-1h4v4l-1-1-1 1 3 3 3-3-1-1-1 1V9h4l-1 1 1 1 3-3z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-hide"><path class="st1" d="M12.79 4.2L16 1l-1-1-3.32 3.32C10.57 2.55 9.32 2 8 2 3.63 2 0 7.97 0 7.97s1.27 2.1 3.21 3.82l-3.23 3.23.98.98 3.35-3.34C5.41 13.44 6.67 14 8 14c4.37 0 8-6 8-6s-1.27-2.09-3.21-3.8zM2 7.97c1.07-1.47 3.61-4 6-4 .8 0 1.6.27 2.35.68l-.78.78c-.46-.29-.99-.46-1.57-.46-1.66 0-3 1.34-3 3 0 .58.17 1.11.46 1.57l-.97.97A13.38 13.38 0 0 1 2 7.97zm6 4c-.8 0-1.59-.27-2.33-.67l.78-.77c.45.27.98.44 1.55.44 1.66 0 3-1.34 3-3 0-.57-.17-1.09-.44-1.55l.98-.98c1.11.87 2.01 1.91 2.46 2.52-1.07 1.48-3.61 4.01-6 4.01z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-makeprivate"><circle class="st0" cx="8" cy="4" r="3"></circle><path class="st0" d="M8 8c-3.31 0-6 2.73-6 4.67S5.27 15 8 15s6-.4 6-2.33S11.31 8 8 8z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-makepublic"><circle class="st0" cx="6" cy="5" r="3"></circle><path class="st0" d="M10 5c0 .34-.06.67-.14.99.05 0 .09.01.14.01 1.66 0 3-1.34 3-3s-1.34-3-3-3C8.97 0 8.07.52 7.53 1.3 8.98 1.91 10 3.33 10 5zM6 9c-3.31 0-6 2.73-6 4.67S3.27 16 6 16s6-.4 6-2.33S9.31 9 6 9zM10 7c-.19 0-.38.01-.57.03a4.14 4.14 0 0 1-1.37 1.39c3 .83 5.23 3.31 5.42 5.28 1.44-.31 2.52-.92 2.52-2.03C16 9.74 13.31 7 10 7z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-movetodetails"><circle class="st0" cx="1.5" cy="14.5" r="1.5"></circle><circle class="st0" cx="7.5" cy="14.5" r="1.5"></circle><circle class="st0" cx="13.5" cy="14.5" r="1.5"></circle><path class="st0" d="M12 1h3v9h-3zM2.02 7.02L1 6 0 7l3 3 3-3-1-1-.94.94C4.33 4.73 6.21 3 8.5 3c.17 0 .33.03.5.05V1.03C8.83 1.01 8.67 1 8.5 1 5.08 1 2.27 3.66 2.02 7.02z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-noncommercial"><path d="M8 0L0 15h16L8 0zm1 13H7v-2h2v2zm-2-3V5h2v5H7z"></path></symbol><symbol viewBox="0 0 16 16" id="sa-svg-sorting"><path class="st0" d="M8 3l2 2 1-1-3-3-3 3 1 1zM8 13l-2-2-1 1 3 3 3-3-1-1z"></path></symbol></svg>'},function(e,t,n){"use strict";var o=n(1),i=n(0),a=n(2);a.a.registerExtension({location:"row",name:"details",visibleIndex:0,render:function(e,t){var n=i.b.createSvgButton("detail");return n.title=o.a.getString("showMinorColumns"),n.className+=" sa-table__row-extension",n.onclick=function(){t.row.toggleDetails()},n}}),a.a.registerExtension({location:"row",name:"select",visibleIndex:-1,render:function(e,t){var n=t.row,o=i.b.createElement("input","sa-table__row-extension",{type:"checkbox"});return o.checked=n.getIsSelected(),o.onchange=function(){n.toggleSelect()},o}})},function(e,t,n){"use strict";var o=n(1),i=n(0),a=n(2);a.a.registerExtension({location:"header",name:"filter",visibleIndex:0,render:function(e){var t=i.b.createInput("sa-table__global-filter sa-table__header-extension",o.a.getString("filterPlaceholder"));return t.onchange=function(t){e.applyFilter(t.target.value)},t}}),a.a.registerExtension({location:"header",name:"showcolumn",visibleIndex:2,destroy:function(){this.onDestroy()},render:function(e){var t=i.b.createElement("select","sa-table__show-column sa-table__header-extension");function n(){var n=e.columns.filter((function(e){return!e.isVisible}));if(0!=n.length){t.style.display="inline-block",t.innerHTML="";var a=i.b.createElement("option","",{text:o.a.getString("showColumn"),disabled:!0,selected:!0});t.appendChild(a),n.forEach((function(e){var n=e.displayName;n.length>20&&(n=n.substring(0,20)+"...");var o=i.b.createElement("option","",{text:n,title:e.displayName,value:e.name});t.appendChild(o)}))}else t.style.display="none"}t.onchange=function(t){var n=t.target.value;t.stopPropagation(),n&&e.setColumnVisibility(n,!0)},n();var a=function(){n()};return e.onColumnsVisibilityChanged.add(a),this.onDestroy=function(){e.onColumnsVisibilityChanged.remove(a)},t}}),a.a.registerExtension({location:"header",name:"showentries",visibleIndex:3,render:function(e){var t=i.b.createElement("div","sa-table__entries"),n=i.b.createElement("span","sa-table__entries-label sa-table__entries-label--right",{innerHTML:o.a.getString("showLabel")}),a=i.b.createElement("span","sa-table__entries-label sa-table__entries-label--left",{innerHTML:o.a.getString("entriesLabel")});return t.appendChild(n),t.appendChild(function(e){var t=i.b.createElement("select");return["1","5","10","25","50","75","100"].forEach((function(e){var n=i.b.createElement("option","",{value:e,text:e});t.appendChild(n)})),t.value=String(e.getPageSize()),t.onchange=function(){e.setPageSize(Number(t.value))},t}(e)),t.appendChild(a),t}}),a.a.registerExtension({location:"header",name:"removerows",visibleIndex:-1,render:function(e){var t=i.b.createElement("button","sa-table__btn sa-table__btn--green sa-table__header-extension ",{innerHTML:o.a.getString("removeRows")});return t.onclick=function(){e.getCreatedRows().forEach((function(e){e.getIsSelected()&&e.remove()}))},t}}),a.a.registerExtension({location:"header",name:"changelocale",visibleIndex:1,render:function(e){var t=e.getLocales();if(t.length<2)return null;var n=i.b.createElement("select","sa-table__header-extension",{});return[o.a.getString("changeLocale")].concat(t).forEach((function(e){var t=i.b.createElement("option","",{value:e,text:e});n.appendChild(t)})),n.onchange=function(){e.locale=n.value},n}})},function(e,t,n){"use strict";var o=n(0),i=n(1),a=n(2),r=n(5);a.a.registerExtension({location:"column",name:"drag",visibleIndex:0,render:function(e,t){var n=o.b.createElement("button","sa-table__svg-button sa-table__drag-button");return n.appendChild(o.b.createSvgElement("drag")),n.onmousedown=function(t){e.enableColumnReorder()},n}}),a.a.registerExtension({location:"column",name:"sort",visibleIndex:1,render:function(e,t){var n=i.a.getString("descOrder"),a=i.a.getString("ascOrder"),r=o.b.createSvgButton("sorting");r.title="";var s="asc";return r.onclick=function(){"asc"==s?(r.title=n,s="desc"):(r.title=a,s="asc"),e.sortByColumn(t.columnName,s)},r.ondrag=function(e){e.stopPropagation()},r}}),a.a.registerExtension({location:"column",name:"hide",visibleIndex:2,render:function(e,t){var n=o.b.createSvgButton("hide");return n.title=i.a.getString("hideColumn"),n.onclick=function(){e.setColumnVisibility(t.columnName,!1)},n}}),a.a.registerExtension({location:"column",name:"movetodetails",visibleIndex:3,render:function(e,t){var n=o.b.createSvgButton("movetodetails");return n.title=i.a.getString("moveToDetail"),n.onclick=function(n){n.stopPropagation(),e.setColumnLocation(t.columnName,r.b.Row)},n}}),a.a.registerExtension({location:"column",name:"filter",visibleIndex:4,render:function(e,t){var n=o.b.createInput("sa-table__filter",i.a.getString("filterPlaceholder"));return n.onclick=function(e){return e.stopPropagation()},n.onchange=function(o){e.applyColumnFilter(t.columnName,n.value)},n}}),a.a.registerExtension({location:"column",name:"makepublic",visibleIndex:-1,render:function(e,t){var n=o.b.createElement("button"),a=o.b.createSvgElement("makeprivate"),r=o.b.createSvgElement("makepublic"),s=e.getColumnByName(t.columnName);function l(e){e.isPublic?(n.className="sa-table__svg-button",n.title=i.a.getString("makePrivateColumn"),a.style.display="none",r.style.display="block"):(n.className="sa-table__svg-button sa-table__svg-button--active",n.title=i.a.getString("makePublicColumn"),a.style.display="block",r.style.display="none")}return l(s),n.appendChild(a),n.appendChild(r),n.onclick=function(t){t.stopPropagation(),s.isPublic=!s.isPublic,l(s),e.onPermissionsChangedCallback&&e.onPermissionsChangedCallback(e)},n}})},,,,function(e,t,n){},function(e,n){e.exports=t},,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"localization",(function(){return o.a})),n.d(t,"surveyStrings",(function(){return o.b})),n.d(t,"Tabulator",(function(){return h})),n.d(t,"TabulatorRow",(function(){return p})),n.d(t,"TableExtensions",(function(){return m.a})),n.d(t,"DocumentHelper",(function(){return s.b}));var o=n(1),i=(n(8),n(9),n(10),n(11),n(13),n(14),n(15),n(7),n(3)),a=n(6),r=n(5),s=(n(19),n(0)),l=n(20);if(document){var c=n(12),u=document.createElement("div");u.style.display="none",u.innerHTML=c,document.head.appendChild(u)}var d={tabulatorOptions:{},actionsColumnWidth:60,downloadHiddenColumns:!1,downloadButtons:["pdf","xlsx","csv"],downloadOptions:{pdf:{orientation:"portrait",autoTable:{styles:{fillColor:[26,179,148]},columnStyles:{id:{fillColor:255}},margin:{top:60}}},csv:{delimiter:","},xlsx:{sheetName:"results"}}},h=function(e){function t(t,n,o,i){void 0===i&&(i=[]);var a=e.call(this,t,n,o,i)||this;a.COLUMN_MIN_WIDTH=155,a.tabulatorTables=null,a.tableContainer=null,a.destroy=function(){a.tabulatorTables.destroy(),e.prototype.destroy.call(a)},a.columnMovedCallback=function(e,t){var n=a._columns.indexOf(a.getColumnByName(e.getField())),o=t.indexOf(e)-1;a.moveColumn(n,o),a.disableColumnReorder()},a.columnResizedCallback=function(e){a.setColumnWidth(e.getField(),e.getWidth()),a.layout()},a.rowFormatter=function(e){var t=new p(a,e.getCells()[0].getElement(),e.getElement(),e);t.onToggleDetails.add((function(){e.normalizeHeight(),a.layout()})),t.render(),a._rows.push(t)};var r={};return Object.assign(r,d,o),a.options=r,a}return Object(i.b)(t,e),Object.defineProperty(t,"haveCommercialLicense",{set:function(e){a.a.haveCommercialLicense=e},enumerable:!1,configurable:!0}),t.prototype.render=function(t){e.prototype.render.call(this,t),t.className+=" sa-table sa-tabulator";var n=this.getColumns(),o=this.tableData,i=s.b.createElement("div","sa-tabulator__header"),a=s.b.createElement("div","sa-tabulator__pagination-container");this.tableContainer=s.b.createElement("div"),t.appendChild(i),t.appendChild(this.tableContainer);var r={};Object.assign(r,{data:o,layout:"fitColumns",pagination:"local",paginationSize:this.currentPageSize,movableColumns:!0,maxHeight:"100%",columns:n,rowFormatter:this.rowFormatter,paginationElement:a,columnMoved:this.columnMovedCallback,columnResized:this.columnResizedCallback,tooltipsHeader:!0,tooltips:function(e){return e.getValue()},downloadRowRange:"all",columnMinWidth:248,paginationButtonCount:3},this.options.tabulatorOptions),this.tabulatorTables=new l(this.tableContainer,r);var c=s.b.createElement("div","sa-table__header-extensions");i.appendChild(this.createDownloadsBar()),i.appendChild(c),i.appendChild(a),this.extensions.render(c,"header"),this.renderResult=t},t.prototype.createDownloadsBar=function(){var e=this,t=s.b.createElement("div","sa-tabulator__downloads-bar");return this.options.downloadButtons.forEach((function(n){t.appendChild(function(t,n){return s.b.createElement("button","sa-table__btn sa-table__btn--small sa-table__btn--gray",{innerHTML:n,onclick:function(){e.download(t)}})}(n,o.a.getString(n+"DownloadCaption")))})),t},t.prototype.getTitleFormatter=function(e,t,n,o){var i=this,a=s.b.createElement("div"),r=s.b.createElement("span","",{innerHTML:e.getValue()}),l=this.getHeaderActions(o);return a.appendChild(l),a.appendChild(r),a.onmousedown=function(e){i.isColumnReorderEnabled?i.disableColumnReorder():e.stopPropagation()},a},t.prototype.getHeaderActions=function(e){var t=s.b.createElement("div","sa-table__action-container");return this.extensions.render(t,"column",{columnName:e}),t},t.prototype.getColumns=function(){var e=this,t=this.columns.map((function(t,n){var o=e.survey.getQuestionByName(t.name);return{field:t.name,title:o&&o.title||t.displayName,width:t.width,widthShrink:t.width?0:1,visible:e.isColumnVisible(t),headerSort:!1,download:!!e.options.downloadHiddenColumns||void 0,titleFormatter:function(n,o,i){return e.getTitleFormatter(n,o,i,t.name)}}}));return t.unshift({field:"",title:"",download:!1,resizable:!1,minWidth:this.options.actionsColumnWidth,width:this.options.actionsColumnWidth}),t},t.prototype.setColumnVisibility=function(t,n){e.prototype.setColumnVisibility.call(this,t,n),this.isRendered&&(n?this.tabulatorTables.showColumn(t):this.tabulatorTables.hideColumn(t),this.layout())},t.prototype.setColumnLocation=function(t,n){e.prototype.setColumnLocation.call(this,t,n),this.isRendered&&(n==r.b.Row?this.tabulatorTables.hideColumn(t):this.tabulatorTables.showColumn(t),this.layout())},t.prototype.setColumnWidth=function(t,n){if(e.prototype.setColumnWidth.call(this,t,n),this.isRendered){var o=this.tabulatorTables.getColumn(t).getDefinition();o.width=n,o.widthShrink=0,this.layout()}},t.prototype.sortByColumn=function(e,t){this.tabulatorTables.setSort(e,t)},t.prototype.applyColumnFilter=function(e,t){this.tabulatorTables.setFilter(e,"like",t)},t.prototype.applyFilter=function(e){this.tabulatorTables.setFilter((function(e,t){for(var n in e)if(e[n].toLowerCase().includes(t.value.toLowerCase()))return!0;return!1}),{value:e})},t.prototype.getPageNumber=function(){return this.isRendered?this.tabulatorTables.getPage():1},t.prototype.setPageNumber=function(t){e.prototype.setPageNumber.call(this,t),this.isRendered&&this.tabulatorTables.setPage(t)},t.prototype.setPageSize=function(t){e.prototype.setPageSize.call(this,t),this.isRendered&&this.tabulatorTables.setPageSize(t)},t.prototype.download=function(e){this.tabulatorTables.download(e,"results."+e,this.options.downloadOptions[e]||d.downloadOptions[e])},t.prototype.layout=function(e){void 0===e&&(e=!1),this.tabulatorTables.redraw(e)},t}(a.a),p=function(e){function t(t,n,o,i){var a=e.call(this,t,n,o)||this;return a.table=t,a.extensionsContainer=n,a.detailsContainer=o,a.innerRow=i,a}return Object(i.b)(t,e),t.prototype.getElement=function(){return this.innerRow.getElement()},t.prototype.getRowData=function(){return this.innerRow.getData()},t.prototype.getDataPosition=function(){return this.innerRow.getPosition()},t.prototype.remove=function(){this.innerRow.delete(),e.prototype.remove.call(this)},t}(a.b),m=n(2)}])})); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1848280
15342